A Location Prediction Method Based on GA-LSTM Networks and Associated Movement Behavior Information

Due to the lack of consideration of movement behavior information other than time and location perception in current location prediction methods, the movement characteristics of trajectory data cannot be well expressed, which in turn affects the accuracy of the prediction results. First, a new trajectory data expression method by associating the movement behavior information is given. The pre-association method is used to model the movement behavior information according to the individual movement behavior features and the group movement behavior features extracted from the trajectory sequence and the region. The movement behavior features based on pre-association may not always be the best for the prediction model. Therefore, through association analysis and importance analysis, the final association feature is selected from the pre-association features. The trajectory data is input into the LSTM networks after associated features and genetic algorithm (GA) is used to optimize the combination of the length of time window and the number of hidden layer nodes. The experimental results show that compared with the original trajectory data, the trajectory data associated with the movement behavior information helps to improve the accuracy of location prediction.


Introduction
With the development of GPS and the prosperity of the taxi industry, a large amount of trajectory data is generated from moving vehicles every day. The trajectory data not only reflects the driving path of the vehicle, but also reflects the behavior of residents and urban traffic characteristics [1]. The application research of GPS trajectory data has attracted the attention of academia and industry. The main research directions are location-based services (LBS) [2] and intelligent transportation (ITS) [3]. Location prediction is the core and underlying support of LBS. Predicting the behavior of vehicles and users through trajectory features can provide more accurate and professional services [4]. Therefore, how to effectively and accurately predict the next location or target location has become a hot issue in the research field of location prediction.
In recent years, there have been many research results in location prediction. Reference [5] proposed a destination prediction method based on frequent pattern mining. However, frequent pattern mining is only suitable for specific situations, and the maintenance of the decision tree is complicated, and it will take a lot of time to process a large amount of trajectory data. The Markov-based location prediction method has also made remarkable achievements. Reference [6] predicted the destination of the taxi through the low-order Markov method, but the Markov prediction method cannot solve the long-term dependence of a large amount of trajectory data. The emergence of Recurrent Neural Networks (RNN) has solved the above problems and has become a general model in recent years. For time series data, the RNN model can capture the correlation between data [7], so it has become a general model for time series data prediction. However, RNN cannot solve the problem of long-term dependence. The LSTM model is a variant of RNN, which solves the long-term dependency problem [8][9][10]. For time series data, each record is a context sequence, so time and sequence are especially important in trajectory data. The time window is introduced in RNN to alleviate the over-fitting problem and enhance the correlation between time series data. For the length of the time window, too small or too large will have a great impact on the prediction results. Commonly used methods always use time interval mode, average value or empirical value to determine the length of the time window [11]. However, the above methods are suitable for data sets with good data quality and time distribution, but not for data sets with uneven time intervals. Reference [12] optimized the window size in the LSTM model by genetic algorithm. At the same time, network parameters such as hidden node numbers can also be optimized by GA [13,14].
In addition, trajectory data preprocessing can improve data quality, but data processing should not only focus on improving data quality, but also pay attention to improving data expression ability through trajectory data analysis and mining [15,16]. For trajectory data, it is important to express the movement behavior of the trajectory. Reference [17] associated the individual movement behavior information of the vehicle with the original data. In the traffic environment, a certain amount of individual movement behaviors will lead to group movement behaviors, and then affect individual movement behaviors. Therefore, vehicle movement behavior should not be limited to individuals. References [18,19] considered the scene features and traffic environment of the trajectory. The above two methods both improve the prediction accuracy by adding associated information, but the choice of associated information is subjective, and the effectiveness of the added information is not analyzed. In trajectory expression, it is not that the more relevant information contained the better. On the contrary, highcorrelation features and low-contribution features will cause model complexity and increase training time. Therefore, when adding relevant information, their importance and relevance should be considered.
In order to solve the above problems, First, we pre-correlates the movement behavior features of vehicles from the individual movement behavior and group movement behavior, and obtains the behavior features values through statistics, calculation, visualization and other methods. Second, analyzes the importance and relevance of pre-associated movement behavior features to remove redundant and low contribution features, and then obtains the final association features. Third, the original data is incorporated with the association features and put into LSTM, and GA was used to optimize the length of window and the number of hidden layer node. Finally, the experiment is designed to verify the influence of trajectory data associated with movement behavior information on prediction accuracy.

Expression of Trajectory
The data set used in this paper contains the GPS trajectories of 10,357 taxis in Beijing from February 2 to February 8, 2008. The data set includes vehicle's time and location information. Tab. 1 shows a sample of track points. A track point contains attributes as follows: 1) Taxi ID; 2) date time; 3) longitude; 4) latitude.
The trajectory can be expressed as:

Information Pre-Association Based on Movement Behavior
The movement behavior of vehicles is composed of individual movement behavior and group movement behavior. The individual movement behavior is the movement behavior of a single moving object, such as velocity and direction of a single vehicle. The group movement behavior shows the aggregation characteristics of a large number of moving objects in the movement law and trend and its research object is region. In this section we extract the moving behavior features of vehicles from individual and group movement features and show the calculate method.

Individual Movement Behavior
 Velocity feature The velocity of the vehicle is different every moment. The next location is related to the speed of the previous moment, and the velocity can reflect the driving state of the vehicle. The velocity of the i − th trajectory point V i is calculated as follows:

Direction feature
The direction of the vehicle in driving is dynamic, and the direction can reflect the dynamic change trend .The direction is the angle between the two locations and the north direction. The velocity of the i − th trajectory point D i = 1 is calculated as follows:

Group Movement Behavior
 Traffic Rush feature During rush hours, the vehicle will slow down and may even remain stationary. Therefore, the characteristics of traffic rush is a great significance to predict the next location. Reference [16] analyzed the peak period characteristics based on Beijing taxi data. The results are as follows: On weekdays, the peak traffic hours are 7:00-10:00 and 17:00-20:00. On weekends, peak traffic hours are 13:00-15:00. The traffic rush feature value of the i − th trajectory point T_R i = 1, if t i in rush hours. Otherwise, T_R i = 0.  Grid Area feature In order to study the traffic characteristics, this paper adopts the grid division method for analysis. Divide the area enclosed by the track points into a 500 m grid. The location of the i − th trajectory point will be converted into grid area G_id i . On the one hand, point movement can be converted into regional movement; on the other hand, regional characteristics can be analyzed from group vehicles.  Grid Velocity feature The grid velocity value of the i − th trajectory point G_V i is a macro expression of V i , which can reflect the traffic environment where the vehicle is located. When t i belongs to the peak period, the G_V i is the average velocity of m trajectory points entered into the grid G_id i in rush hour, otherwise, the average velocity is trajectories' velocity in the off-peak period.
After adding pre-association features of individual and group movement behavior information, the trajectory points will contain more state information. The trajectory expression is changed as：Tra2 = (tra2 i |i = 1,2, ⋯ , n), The example is shown in Tab. 2.

Feature Selection
After adding pre-associated features, the trajectory data dimension will be expanded to 9. However, the current features are not necessarily optimal expression for location prediction. This paper uses random forest algorithm to estimate the importance of features. The basic idea is to rearrange the order of eigenvalues and observe how much accuracy is reduced. The correlation coefficient is calculated by Eq. (4). The feature correlation degree is obtained from Tab. 3. Based on the above results, low contribution and high correlation features will be removed, and the final correlation feature will be selected. The results are as follows:  Fig. 1, we can see that the most important for location prediction is location information. The velocity feature's contribution to the location prediction is the lowest, which is marked as low contribution. The reason may be that the time interval is large, the average speed cannot express the vehicle state, and the relative grid speed can better express it. In Fig. 2, there is a strong correlation between grid congestion and grid velocity. With reference to their importance evaluation, grid velocity has a greater contribution to prediction accuracy, so grid congestion features are removed. Therefore, seven features are selected: time, longitude, latitude, direction, traffic rush, grid area and grid velocity .After feature selection, the final trajectory of this model is expressed as：Tra3 = (tra3 i |i = 1,2, ⋯ , n), tra3 i = {t i , lon i , lat i , D i , T_R i , G_id i , G_V i }. The example is shown in Tab. 4.

Next Location Prediction
The overall framework of GA-LSTM is composed of data processing module, optimization algorithm module and prediction module, as shown in Fig. 3. The data set is standardized and classified into training data set and test data set. Put the training data set into the LSTM model optimized by GA to train the network, and finally put the test data set into the network to predict the next location.

LSTM Networks
The difference between the LSTM model and the original RNN model is that it contains a gate structure, which consists of a forget gate, an input gate and an output gate. The structure of LSTM is shown in Fig. 4. According to the structure of the gate, choose the information to forget and remember. The calculation method is shown in the Eqs.
w f , w i , w o are weight matrices for the corresponding inputs of the network activation functions σ. In this paper, we use square loss function given by the following Eq. (7), Where y is observed value, y′ is predict value and n 1 is the number of all predicted values.

GA Based LSTM Optimization
Genetic algorithm originated from the computer simulation of biological system. It is a stochastic global search and optimization method developed by imitating the evolution mechanism of natural organisms, and is often used to solve combinatorial optimization problems. In this paper, we select GA to obtain the optimal combination of window size w and hidden layer node h. Specific algorithm is shown in Algorithm 1.

Model Parameter Settings
The optimal combination of hidden layer node number and window size of LSTM is solved by GA. Set the population scale is 50, and the maximum iteration is 100. The error reached the minimum before 40 generation, and the corresponding combination value is (5,80). The parameter configuration of LSTM model is shown in Tab. 5.

Evaluation Metric
In order to express the performance of the model accuracy, root mean square error (RMSE) is used as the evaluation metric. The smaller the RMSE is, the higher the accuracy is. The calculation method is shown in the Eq. (8), where p and p′ are the observed value and the predicted value, n 2 is the number of all predicted values.

Experiment and Analysis
The experiment is designed to verify the influence of different trajectory expressions and parameters optimized based on genetic algorithm on the prediction model. The experiment results are as follows:   It can be seen from Fig. 5 that after the information is associated, the model is more complicated and the training time is longer due to the increase of the dimensionality. Therefore, compared with the model represented by the original trajectory, the convergence speed of the prediction model based on the information-related trajectory data is slightly slower, but the impact is not significant. As shown in Fig. 6, after using GA to optimize the number of hidden nodes and the window size, the error of the model reaches the minimum error in the range significantly faster than that without GA. This shows that proper window size and hidden layer nodes can improve the model learning efficiency, and GA is effective for optimization of combination parameters. Fig. 7 increases the number of iterations. It can be seen that as the number of iterations increases, the prediction errors of tra1 and Tra1 are smaller than those of Tra2, indicating that the model using associated features still has an accuracy advantage under the condition of increasing g iterations. According to Tab. 6, it can be seen that the RMSE of the prediction model expressed by the trajectory of Tra2 is lower than that of the prediction model expressed by the trajectory of Tra1 . Therefore, the association of movement information features helps to improve the accuracy of location prediction. In addition, compared with the RMSE of the prediction model expressed using Tra2, the RMSE of the prediction model expressed using Tra3 hardly increased, and the training time is shorter. Therefore, feature selection can reduce the complexity of the model without increasing the prediction error. Under the same prediction model, the RMSE of the prediction model using genetic algorithm is obviously greater than that of the prediction model without GA optimization. Therefore, GA is effective for optimizing model parameters.

Conclusion
This paper designs a location prediction method that combines GA-LSTM and related movement behavior feature information, and uses Beijing taxi data to test the prediction error. The results show that associating movement behavior features and then selecting features will help reduce the accuracy of prediction and the complexity of the model, and GA can optimize parameters within the search range. The significance of this work is that accurate prediction of vehicle location can make the recommendation service more professional and provide technical support for ITS optimization.
Funding Statement: This work is supported by the Hunan University of Science and Technology Doctoral Research Foundation Project (E51873). The authors have no conflicts of interest to report regarding the present study.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.