Research on Lane-level Travel Time Prediction Method Based on Gated Recurrent Neural Network

In order to meet the needs of refined traffic guidance in the environment of the Internet of Vehicles, a lane-level travel time prediction method based on Gated Recurrent Neural Network is proposed. The research is based on the vehicle information collected by electronic police equipment, and analyzes and integrates the trip time of a single vehicle as model input; builds a gated recurrent unit(GRU) model deep learning framework, and performs multiple iterations through deviation correction and parameter update; The vehicle travel time data is verified and compared with the ARIMA model, BPNN model and LSTM model. The results show that the MAE and RMSE values of the GRU model are lower than other models, so it has good prediction accuracy.


Introduction
With the growth of private vehicles and the increase in people's travel frequency, road traffic congestion has intensified and the traffic environment has become complicated. In the current development of the Internet of Vehicles technology, in order to solve this traffic problem, related research uses the intelligent transportation system's vehicle travel time prediction method for traffic guidance. Traditional travel time prediction methods mainly include ARIMA model, Markov model, Kalman filter model and so on. Cui Qinghua et al [1] used the ARIMA model to predict the timevarying confidence interval of road travel time. Tran Duy et al [2] used Hidden Markov Model (HMM) to predict the driver's intention. The traditional travel time prediction method does not have real-time performance, cannot handle large-scale data well, and the model itself lacks the ability to update.
In recent years, with the development of artificial intelligence and deep learning, Support Vector Regression (SVR) models, Back propagation Neural Network(BPNN), wavelet neural networks and other models have been increasingly applied to travel time prediction. Miao Xu et al [3] proposed a comprehensive model of pre-order section state and two-layer BPNN to predict the bus arrival time. Yu Quan et al [4] used particle swarm optimization wavelet neural network (PSO-WNN) in order to improve the accuracy of expressway travel time prediction. Xie Jiaming et al [5] input historical data and real-time data into the neural network for traffic in Hong Kong Make predictions. Wang Xueyuan et al [6] used the cuckoo algorithm to optimize the Elman neural network, and used the collected onboard OBD data to perform map matching to complete the travel time prediction of urban roads. Huang Wenhao et al [7] proposed a deep structure composed of deep belief network (DBN) and multitask regression to complete the traffic flow prediction. Deep learning methods can improve the predictive ability to a certain extent, but they have certain limitations in dealing with time series. Lane-level travel time data is a non-linear time series, while cyclic neural networks (RNN) can handle variable-length time series problems, but RNNs have gradient disappearance and explosion phenomena. Current researches mostly use long and short-term memory units (LSTM) solves this problem. Chen Yuan-yuan et al [8] used the stacked long-term memory network model to learn and predict traffic conditions based on the traffic flow conditions obtained from the Web map. Petersen et al [9] combined LSTM neural network and convolutional neural network to predict the bus travel time. However, the LSTM network also has too many parameters and a complex structure. Based on the above research, this paper takes into account the complexity of lane-level travel time data, in order to improve the prediction accuracy and speed up the prediction, the gated recurrent unit neural network is applied to the lane-level travel time prediction research.

Travel time data collection and processing
Use the electronic police equipment installed on the road to collect data on the travel time of the vehicle. First, export the vehicle information collected by the electronic police on the road section and perform data preprocessing; then calculate the vehicle travel time between the two electronic police and record the vehicles, drive lane location; finally integrate the travel time of each vehicle section and related information about the subordinate lane. Process data according to standardized technology: Where: i x is the standard value of the sample data, i x is the original sample data, min x and max x , are the maximum and minimum values of the original sample data, respectively. The time series data set obtained after processing is divided into historical data training set, model test set, and method verification set.

The principle of gated recurrent unit neural network
In the current deep learning related research, RNN recurrent neural network is mostly used to process time series data. This network allows the internal connection of hidden units and can handle the relationship between discontinuous data. Because RNN has the problem of gradient disappearance, and LSTM neural network can solve this problem, it is widely used in the field of time series prediction. In recent years, GRU neural network has been used more and more. Compared with LSTM, this network has fewer training parameters and better prediction effect. GRU uses a gated recurrent neural network structure, and combines the input gate and the forget gate in LSTM into one update gate, and the other is a reset gate. The update gate controls the state information retention degree at the previous moment, and the reset gate determines the degree of combination of previous information and current information.   figure 1, the input of the GRU unit at the current moment in the recurrent neural network is t x , Last moment state activation value is 1 t h  , The current state activation value is t h ;U is the recursive connect weight matrix, t r and t z are the reset gate and update gate of GRU at time t: Where: r U is the output weight matrix of the reset gate at t-1, r W is the input weight matrix of the reset gate, r b represents the bias vector of the reset gate; z U is the output weight matrix of the update gate at t-1, z W is the update gate's Enter the weight matrix, which z b represents the bias vector of the update gate.
At this time, the candidate hidden state and the current state activation value in the GRU unit are: Where: c U is the output weight matrix of the candidate hidden state at t-1, c W is the input weight matrix of the candidate hidden state, and c b represents the bias vector of the candidate hidden state. The value range of the reset gate and update gate in the GRU unit is controlled by the sigmoid function. Through the reset gate, the input of the GRU unit t x is combined with the state activation value 1 t h  at the previous moment, and the value of t r is between 0 and 1, which tends to 1, The larger the proportion of 1 t h  ; on the other hand, the information transfer from 1 t h  to t h in the update gate control, which is similar to the memory unit in LSTM, which memorizes the hidden state information in the RNN.

Model settings
This paper uses the travel time data of the preamble period to realize the prediction of the vehicle lanelevel travel time by the GRU neural network. In order to predict the travel time of the vehicle during t+1 period, it is necessary to predict the travel time during t period and t-n period. The number of neurons in the input layer and output layer in the GRU unit is n+1 and 1, respectively, and the model input is expressed as 1 2 3 ( , , , )  . Initialize the connection weight value between each layer and the bias vector of each neuron, select the appropriate activation function, and determine the mean square error as the loss function: Where: N is the number of training samples of the model, i o is the observed value, and i p is the predicted (output) value.
Input the training set and the validation set into the adaptive gradient optimization model for algorithm training. Set the global learning rate as  , the model initialization parameter as 0 w , and the time step count t ; the gradient calculation performed in the loop is: Where: t g is the gradient value at the th t time step, 1 t w  is the weight matrix at the 1 t  time step, and J is the cost function of the gradient model.
After the time step is updated, the first-order and second-order biased estimation matrices are: Where: t m , t v are the first-order and second-order momentum terms, respectively, and 1  , 2  are the exponential decay rates of the first-and second-order moment estimates, respectively.
The deviation correction and parameter update of the first-order and second-order matrices are: Where: The default value is 8 10  . To update the parameters: (13) The trained model is tested and de-standardized, and finally the predicted value of travel time is obtained. In order to better evaluate the prediction accuracy of the model, this paper adopts two indicators, mean absolute error (MAE) and root mean square error (RMSE), to evaluate the prediction results of the model. 1

| |
Where: i y is the actual observation value, i f is the predicted value, and N is the sample size.

Case analysis
According to the electronic bayonet data of Hong Kong Middle Road, Shinan District, Qingdao, the road section is two-way four-lane, the length is 825m, the distance between electronic bayonet is 200m, and the data upload time is 15s/time. This article selects the vehicle travel time data during the peak period from 10:00 to 11:00 in the morning for a continuous month as the research object, and divides the data into historical data training set, model test set, and historical data training set at a ratio of 5:2:3. The historical data training set is shown in the figure 2:

Figure 3 GRU model prediction results
The solid line and the dashed line in Figure 3 represent the original data and model prediction results, respectively. According to the curve in the figure, it can be known that the GRU model has a better prediction effect.   Tables 1 and 2. Among them, the LSTM model has the same structure as the GRU model in this paper. It can be seen from the table that compared with other models, the model in this paper obtains the highest prediction accuracy, and the two error indicators are significantly lower than other models. As the time step increases, the prediction accuracy of the model first increases and then decreases. When the model input length is 6, MAE and RMSE indicators are the lowest. Therefore, the use of the GRU model can better predict the lane-level travel time.

Conclusion
This paper proposes a lane-level travel time prediction method based on a gated recurrent neural network. A time series set is established based on the nonlinear characteristics of the lane-level travel time data, and the GRU neural network is applied to the travel time prediction. It provides a new way of thinking in terms of class travel time prediction. Therefore, the collected data is used to predict the travel time of Hong Kong Middle Road, Shinan District, Qingdao. The experimental results show that the MAE and RMSE indicators of the GRU model are significantly better than other models, and the effect of predicting travel time at the lane level is better.