Keywords

1 Introduction

As we all know, toll stations are the main channel for vehicles to enter and exit high-way networks, and it has always been a bottleneck in traffic networks [1]. Short-term traffic flow of toll station is affected by many external factors such as time period, geographical location and spatial distance between highway network nodes. Due to these factors, the uncertainty of short term traffic flow forecasting is difficult to accurately predict by only using traditional forecasting methods. Therefore, studying how to obtain accurate and efficient traffic forecasts is necessary. High-quality predictions can not only relieve traffic pressure, but also make people travel more convenient.

At present, traffic prediction methods in the transportation fields are mainly based on statistics, machine learning, and deep learning. Among them, the statistical-based methods mainly include the autoregressive integrated moving average method (ARIMA) and the improved methods of ARIMA [2, 3]. The machine learning based methods mainly include Bayesian networks [4], support vector regression [5], gradient boosting decision tree (GBDT) [6], and neural networks [7]. The deep learning based methods include deep belief networks [8], stacked auto-encoders [9], and deep neural network models that extract the spatial-temporal characteristics of traffic data through combination of multiple models [10,11,12]. Due to the fact that Long Short Term Memory Network (LSTM) has long-term memory which is suitable for solving long-term dependence problems, it’s widely used in natural language processing, weather prediction and other fields. Reference [13] first applied LSTM to the field of traffic flow prediction, and then more and more researchers began to improve LSTM and continue to exert the prediction effect of LSTM in the field of transportation [14,15,16]. In this paper, we propose a traffic prediction model based on LSTM to predict the exit traffic flow of toll stations. This model combines the sequence characteristics of the exit traffic flow with the spatial-temporal characteristics of the enter traffic flow of the associated stations. The main contributions of this paper as follows:

  • We propose a model named LSTM_SPLSTM, which can respectively extract the sequence features of exit traffic flow of a target toll station and the spatial-temporal features of its associated toll stations. By combining the two features, it can accurately predict the short-term exit traffic flow of the target toll station;

  • Considering the different impacts of associated stations on a target toll station, the Pearson correlation coefficient is used to measure the impacts and also used as the combined weight of the hidden layer of different associated toll stations in the spatial-temporal model;

  • Experiments are performed on real toll station datasets. The experimental results show that the model we proposed has better prediction performance than many traditional machine models and models trained with a single feature.

2 Methodology

2.1 Problem Description

The structure of a road network is usually divided into many road sections with toll stations as dividing points. The stations on the same road segment are associated with each other and a toll station can be associated with multiple other toll stations. The Fig. 1 shows toll stations in a road network. The enter and exit traffic flows are illustrated in the Fig. 2. As shown in the Fig. 2, the road AB is divided by station A and B and the road AC is divided by station A and C. Additionally, station B and C are called the associated stations for station A. Cars entering the road AB or AC by station A belong to the enter flows of station A. On the contrary, cars leaving the road AB or AC through station A are called the exit flows of station A.

Fig. 1.
figure 1

Schematic of toll Stations in a road network

Fig. 2.
figure 2

The exit and enter flows of a station in road segments

According to the charging records of a toll station, the traffic information of the station can be counted and expressed as the following:

$$ X_{m\_in} = \left( {(x_{in} )_{m1} ,(x_{in} )_{m2} , \ldots ,(x_{in} )_{mt} } \right) $$
(1)
$$ X_{m\_out} = ((x_{out} )_{m1} ,(x_{out} )_{m2} , \ldots ,(x_{out} )_{mt} ) $$
(2)

Where m indicates a toll station, \( (x_{in} )_{mt} \) is the enter information of toll station m within time t, \( (x_{out} )_{mt} \) represents the exit information of toll station m within time t.

2.2 Model Design

Model Description.

The traffic flow prediction of toll stations has typical spatial-temporal correlations and serial characteristics. Vehicles can drive into different roads from different toll stations and leave roads from the same toll station after a period of time. This shows that the enter traffic flow of associated toll stations at different moments will affect the exit traffic flow of target toll station in the future. Furthermore, the traffic flow records of a toll station are a series of statistical values within time intervals and those values reflect certain periodicity and trend over time. Therefore, a method combining sequence features and spatial-temporal features is more conducive to simulating and predicting traffic flow. As shown in the Fig. 3, the proposed traffic flow prediction model (LSTM_SPLSTM) is composed of two parts: one is a LSTM model that extracts sequence features from the exit traffic flow of target toll station; the other is SPLSTM model that extracts spatial-temporal features from the enter traffic flow of associated stations.

Fig. 3.
figure 3

The overall architecture of LSTM_SPLSTM

Fig. 4.
figure 4

SPLSTM structure for extracting spatial-temporal features

Sequence Feature Model.

A toll station’s traffic records are a series of statistical values within time intervals. The Fig. 5 illustrates the statistics of a toll station at different time intervals. We can see that the toll station has a large traffic volume at noon and afternoon, and a smaller traffic volume in the early morning and night in a day. From the statistics of three weeks, the traffic flow at this toll station has certain periodicity.

Fig. 5.
figure 5

A toll station’s exit traffic, charge amount and mileages in one day and three weeks

The LSTM model is shown in the Fig. 6. The internal gate control mechanism of each LSTM neuron includes forgotten gate f, input gate i and output gate o. The neuron output of the hidden layer is denoted as \( H = (h_{1} ,h_{2} , \ldots ,h_{t} ) \), the weight is W, the bias is b, and the neuron state is c. \( g,\varphi ,\sigma \) are three different sigmoid functions:

$$ f_{t} = \sigma (W_{xf} (x_{out} )_{t} + W_{hf} (x_{out} )_{t - 1} + W_{cf} c_{t - 1} + b_{f} ) $$
(3)
$$ i_{t} = \sigma (W_{xi} (x_{out} )_{t} + W_{hi} h_{t - 1} + W_{ci} c_{t - 1} + b_{i} ) $$
(4)
$$ c_{t} = f_{t} * c_{t - 1} + i_{t} * g(W_{xc} (x_{out} )_{t} + W_{hc} h_{t - 1} + b_{c} ) $$
(5)
$$ o_{t} = \sigma (W_{xo} (x_{out} )_{t} + W_{ho} h_{t - 1} + W_{co} c_{t} + b_{o} ) $$
(6)
$$ h_{t} = o_{t} \varphi \left( {c_{t} } \right) $$
(7)
Fig. 6.
figure 6

LSTM structure for extracting sequence features

Spatial-Temporal Feature Model.

The exit traffic flow of a toll station within a certain period of time is closely related to the entrance traffic flow of different historical moments of its associated toll stations. In order to obtain the impact of each associated site on the target site’s exit traffic flow at different times, as shown in the Fig. 4, the SPLSTM model establishes an independent LSTM module for representing the enter traffic information of each associated site and connects the hidden layer information representing each associated site to the second stacked LSTM module according to same time step, thereby extracting the spatial-temporal features of the target station with its associated stations.

Although vehicles drive into high-speed sections from every associated station and leave high-speed sections from the same target station every day, the impact of each associated station on the target station is different. Therefore, in the SPLSTM model, the characteristics of each associated site in the independent LSTM model cannot be directly combined and connected to the second stacked LSTM module. In order to measure the difference impacts of associated sites on the target site, the combination weights of hidden layers in the spatial-temporal features model SPLSTM are represented according to the Pearson correlation coefficient computed on historical data. The calculation formula is as follows:

$$ per_{m\_k} = \left| {\frac{{T\sum\limits_{t = 1}^{T} {x_{m\_t} y_{k\_t} } - \sum\limits_{t = 1}^{T} {x_{m\_t} \sum\limits_{t = 1}^{T} {y_{k\_t} } } }}{{\sqrt {T\sum\limits_{t = 1}^{T} {x_{m\_t}^{2} - (\sum\limits_{t = 1}^{T} {x_{m\_t} } )^{2} } } \sqrt {T\sum\limits_{t = 1}^{T} {y_{k\_t}^{2} - (\sum\limits_{t = 1}^{T} {y_{k\_t} } )^{2} } } }}} \right| $$
(8)
$$ H_{t} = per_{m\_k} * h_{m,t} $$
(9)

Where \( x_{m\_t} \) represents the enter traffic of associated station m at time t, \( y_{k\_t} \) represents the exit traffic of the target station k at time t, and T represents the number of moments participating in the calculation. \( h_{m\_t} \) represents the hidden layer output of the independent LSTM module of associated station m at time t.

3 Experiments and Results Analysis

3.1 Dataset Introduction and Hyper-parameter Setting

The datasets used in this paper are the charging records of toll stations in a certain area throughout August. After a series of preprocessing operations, we select six stations as forecast targets. Each target station has 2496 time-series data and has 11, 15, 36, 18, 19, and 58 associated sites respectively.

In the toll station exit traffic flow prediction model, for each target station and associated stations, the time step is 4 and the hidden layer size is 2, among which the number of hidden units is 64. The mean square error (MSE) is used as the loss function and the Adam optimization algorithm is used to optimize the network structure.

3.2 Experimental Evaluation Index

To evaluate the accuracy of the traffic prediction model, we mainly measure the error between the predicted value and the true value. The smaller the error, the closer the predicted value to the true value. We take root mean square error (RMSE) and average absolute error (MAE) as the evaluation indicators.

3.3 Experiment Analysis

In order to verify the effectiveness, this paper compares the performance of the proposed model (LSTM_SPLSTM) with the following 7 models: ARIMA, SVR, BP, GBDT, SAES, LSTM and SPLSTM. Table 1 shows the prediction results of different models on six toll stations’ exit flow values for the next 15 min. It can be seen from Table 1 that when the prediction time is 15 min, The RMSEs and MAEs of LSTM_SPLSTM on different stations are lower than traditional machine learning methods. And it also performs better than LSTM, SAES and SPLSTM models.

Table 1. Performance comparison of 6 stations with a predicted duration of 15 min

For further proving the effectiveness of the model, this article predicts the exit traffic flow of target stations between 20 min and 60 min within 5 min spans. As shown in Figs. 7, 8, 9, 10, 11 and 12, with the increase of the prediction time, the prediction performance of all models shows an upward trend. But all machine learning methods have faster prediction errors increase than that of the deep learning methods. Among them, ARIMA, BP neural network and support vector regression have poor prediction performance. By combining the sequence characteristics and the spatial-temporal characteristics, the prediction effect of LSTM_SPLSTM still performs better as illustrated that the values of MAE and RMSE have the lowest rise with the increase of prediction time.

Fig. 7.
figure 7

Index performance of station S1 with different forecast intervals

Fig. 8.
figure 8

Index performance of station S2 with different forecast intervals

Fig. 9.
figure 9

Index performance of station S3 with different forecast intervals

Fig. 10.
figure 10

Index performance of station S4 with different forecast intervals

Fig. 11.
figure 11

Index performance of station S5 with different forecast intervals

Fig. 12.
figure 12

Index performance of station S6 with different forecast intervals

4 Conclusion

In this paper, we propose a model (LSTM_SPLSTM) to predict the exit traffic flow of a toll station by using its sequence characteristics and the spatial-temporal characteristics with its associated stations. By comparing with many traditional machine learning models and models only considering a single feature, LSTM_SPLSTM can more accurately predict the exit traffic flow of toll station, and its superiority becomes more obvious when the forecast time increasing. Overall, our proposed LSTM_SPLSTM model is more suitable for predicting the exit flow of toll stations. For future work, how to effectively select associated stations for a target station without affecting the prediction effect will be our next research focus.