High-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention
By combining the GWO optimization algorithm, CNN and GRU networks, and introducing the attention mechanism, the shortcomings of CNN and GRU in vehicle trajectory prediction are solved, and more accurate and efficient trajectory prediction is achieved.
Patent Information
- Application Number
- CN202410876451.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In the current vehicle trajectory prediction, CNN is weak in processing sequence data and has high computational cost. The gating mechanism of GRU may cause information loss and is prone to over-fitting when the amount of data is insufficient. The forgetting ability is weak.
Using a method based on GWO-CNN-GRU-Attention, by combining vehicle trajectory point characteristics and behavioral information, the CNN-GRU-Attention model is used for training, and the model parameters are optimized through the gray wolf optimization algorithm, and the attention mechanism is introduced for dynamic attention The important part is to improve the accuracy and generalization ability of the model.
It improves the accuracy and generalization ability of vehicle trajectory prediction, reduces the risk of over-fitting, achieves efficient model training and rapid solution, and is suitable for high-speed trajectory prediction needs.
Smart Images

Figure BDA0004923200610000051 
Figure BDA0004923200610000061 
Figure BDA0004923200610000071
Abstract
Description
Technical Field
[0001] The invention belongs to the field of intelligent automobile and computer technology, and particularly relates to a high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention. Background Art
[0002] The rapid development of mobile wireless communications and global positioning technology has produced GPS positioning technology, which can track the movement trajectory of vehicles very accurately. GPS navigation systems can obtain the vehicle's position, driving direction and other factors in real time. The position data movement trajectory can be used to explain the rich information space structure combined with user behavior, which makes the vehicle movement trajectory prediction possible. Trajectory prediction Accurate and reliable vehicle trajectory prediction is an important part of any intelligent transportation system, which can improve traffic safety and promote effective urban road planning. Since vehicle trajectories are uncertain and susceptible to the environment and user behavior, it is difficult to accurately predict them through modern trajectory prediction technology. In recent years, the field of trajectory prediction has made great progress, gradually shifting from the initial physics-based and rule-based methods to machine learning and deep learning-based methods.
[0003] The advantage of traditional machine learning methods is that they are easy to understand and implement, but they have limited ability to model complex spatiotemporal relationships and are difficult to process large-scale and high-dimensional data. The biggest advantage of deep learning is that it can capture more complex spatiotemporal features and process large-scale and high-dimensional data, but at the same time, its disadvantages are also more prominent. It requires a large amount of data for training, has high model complexity, and requires high hardware resources. Therefore, how to improve the shortcomings of deep learning to the greatest extent and maximize its advantages has become the research goal of many scholars.
[0004] CNN performs well in processing image data. It extracts spatial features through convolution and pooling operations, reduces the number of parameters, and has the ability to learn hierarchical features. However, it is relatively weak in processing sequence data, has a high computational cost, and requires a large amount of labeled data. GRU is suitable for processing sequence data. It solves the problems of long-term dependency and gradient disappearance through the gating mechanism. It has fewer parameters and fast training speed, and works well in sequence modeling. However, the gating mechanism of GRU may cause information loss, and it is easy to overfit when the amount of data is insufficient. Its forgetting ability is relatively weak. By combining the two, the model can simultaneously utilize spatial information and temporal information to achieve more comprehensive feature learning. The introduction of the attention mechanism assigns different weights to different parts of the input, so that when processing the input data, it can pay more attention to the important parts, and improve the performance of the model on complex tasks. Compared with other algorithms, the advantages of the GWO optimization algorithm are its simple and intuitive structure, simple parameter adjustment, powerful adaptive adjustment ability, and efficient and robust solution performance. This enables GWO to perform well in solving complex optimization problems. By combining GWO with CNN-GRU-Attention, not only the accuracy and generalization ability of the model are improved, but also the risk of overfitting is reduced.
[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0006] The purpose of the present invention is to provide a high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention to solve the problems that CNN is relatively weak in processing sequence data, has high computational cost, and the gating mechanism of GRU may cause information loss, and is prone to overfitting when the amount of data is insufficient, and its forgetting ability is relatively weak.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention includes the following steps:
[0009] S1. Define the start and end times of the trajectory points in the data set by the start and end times of the vehicle lane change as the input of the training model data set;
[0010] S2, combining the trajectory point features of the trajectory with the vehicle behavior information features;
[0011] S3. Use CNN-GRU-Attention to establish separate vehicle behavior recognition models and vehicle trajectory prediction models and train them separately, where the training data of the vehicle trajectory model contains labeled vehicle behavior information;
[0012] S4. Optimize the parameters of the CNN-GRU-Attention model using the Gray Wolf Optimization Algorithm;
[0013] S5, inputting the combined features into a vehicle trajectory prediction model to obtain the lateral and longitudinal speeds and coordinates of the vehicle;
[0014] S6. Combine the last trajectory point of the historical trajectory and use the acceleration trajectory algorithm to calculate the 3s trajectory.
[0015] Preferably, the trajectory point features input in S2 include vehicle status and interactive information features, the vehicle status includes coordinates, speed and acceleration; the vehicle behavior information features include straight driving, left and right turns and lane changing.
[0016] Preferably, the training process using CNN-GRU-Attention in S3 includes the following steps:
[0017] S3.1, combining the trajectory point features of the trajectory with the vehicle behavior information features as model input variables;
[0018] S3.2, the obtained training data is normalized to make its numerical range uniform, and then the processed data is input into the CNN convolutional neural network for convolution and maximum pooling processing;
[0019] S3.3, sending the features processed by S3.2 to the gated recurrent unit network for further processing to complete the regression;
[0020] S3.4. Introduce the attention mechanism to dynamically assign different weights to different input parts, allowing the model to focus on important parts more flexibly when processing input sequences.
[0021] Preferably, in S4, the parameters of the CNN-GRU-Attention model are optimized by the Gray Wolf Optimization Algorithm, including the following steps:
[0022] S4.1. randomly generate a certain number of gray wolves and assign a random initial position to each gray wolf;
[0023] S4.2, updating the position of each gray wolf according to its fitness and the positions of other gray wolves;
[0024] S4.3, update the global optimal solution, and record the position and fitness of the gray wolf with the best fitness;
[0025] S4.4, check whether the termination condition is met; the termination condition is: reaching the maximum number of iterations or reaching the preset fitness threshold;
[0026] S4.5. Return the global optimal solution as the result of the algorithm.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] (1) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention constructs a feature set including vehicle status and interactive information features such as coordinates, speed, acceleration, etc., which can give full play to the advantages of CNN network in the field of data mining and extract the potential connection of non-continuous data in high-dimensional space.
[0029] (2) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention can fully consider the temporal characteristics of the input features by using the GRU network model, has good temporal data fitting regression capability, and has high prediction efficiency.
[0030] (3) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention introduces an attention mechanism on the basis of the CNN-GRU structure, which is used to dynamically assign different weights to different input parts so that the model pays more attention to important parts, thereby improving the performance and generalization ability of the model.
[0031] (4) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention uses the GWO optimization algorithm to optimize the CNN-GR-Attention model, and can find the optimal solution closest to the model parameters in a short time, which is very consistent with the actual needs of current high-speed trajectory prediction.
[0032] (5) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention combines the advantages of CNN network and GRU network, introduces the attention mechanism to enhance the attention ability, and combines the fast solution efficiency of GWO optimization algorithm. Compared with the existing artificial intelligence prediction method, it has higher prediction accuracy while maintaining a faster model training speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flow chart of the method of the present invention;
[0034] Figure 2 This is the basic structure diagram of the GRU network;
[0035] Figure 3 It is a CNN-GRU model training flow chart of the present invention;
[0036] Figure 4 It is the flow chart of the overall CNN-GRU-Attention model of the present invention;
[0037] Figure 5 It is the flowchart of the Gray Wolf optimization algorithm;
[0038] Figure 6 This is the basic structure diagram of the CNN-GRU-Attention model. DETAILED DESCRIPTION
[0039] The following is a clear and complete description of the technical solution of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0040] See attached Figure 1 , a high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention, comprising the following steps:
[0041] Step 1: The extraction of lane-changing trajectory dataset plays an important role in the vehicle trajectory displacement prediction model. This method selects the time required for the lateral position of the vehicle to change in one direction continuously during the lane-changing process as the lane-changing duration. According to the analysis of the highD dataset, 2203 data are calculated to obtain the average vehicle lane-changing duration.
[0042] Step 2: Divide the motion trajectory characteristics into x-coordinate, y-coordinate, x-direction velocity, y-direction velocity, x-direction acceleration and y-direction acceleration, a total of 6 characteristic variables as model input variables.
[0043] Step 3: First, use CNN to extract local features to capture local patterns and features in the data; Convolutional Neural Network (CNN) is a feedforward neural network widely used in the field of deep learning, mainly composed of convolutional layers, pooling layers and fully connected layers. The data is passed through the convolutional layer for feature extraction and feature selection, which is achieved through pooling and information filtering. It can display the characteristics of a single point to replace the feature statistics of its adjacent area, retain some high-intensity and low-intensity filtered parts, and compress the matrix size after convolution to ensure full fit of the normal connection layer without affecting the quality of the classifier. The fully connected layer is located after the convolutional layer and the pooling layer, and its signal transmission is specific. The feature map transmitted to the fully connected layer will lose its topological structure and be output in the form of a vector. The output layer is located after the fully connected layer. The formula is:
[0044]
[0045] In the formula, x t , t is the vehicle trajectory data sequence, where n is the number of features. k is the convolution kernel, k is the length of the convolution kernel, BN(.) is the batch normalization operation, and ReLU(.) is the activation operation.
[0046] Then the gated recurrent unit (GRU) model is used for model training. Compared with the LSTM neural network, the parameters of the GRU network are reduced by 1 / 3, so it is not easy to overfit. In addition, in terms of the number of iterations required and the convergence time, the GRU network takes less time. LSTM can capture long-term dependencies and is suitable for analyzing time series data, but its complex internal structure leads to long training time. GRU optimizes LSTM to reduce training parameters and ensure prediction accuracy. GRU contains an update gate and a reset gate. Compared with the LSTM three-gate structure, GRU has fewer parameters and faster convergence speed. The threshold of the update gate indicates where the state information of the previous moment is retained to the current state. The larger the value, the more information of the previous moment is retained. The threshold of the reset gate indicates the degree of combination between the current state and the previous state. The larger the value, the more information is combined; the smaller the value, the more information is ignored. GRU obtains the output result through the following formula.
[0047]
[0048] Where: z t represents the update gate, r t represents the reset gate, h t-1 represents the output information of the previous layer, σ represents the activation function, W z ,W r ,W represents the training parameter matrix, Indicates the summary of input and output information of the previous layer, h t Represents output information. The basic structure of the GRU network is shown in the attached figure. Figure 2 As shown, the CNN-GRU model training flow chart is as follows Figure 3 shown.
[0049] Finally, the attention mechanism is introduced to filter the important dynamic interaction information between vehicles, focusing on the information that is more critical to the current task among the numerous input information, reducing attention to other information, and even filtering out irrelevant information, thereby solving the problem of information overload and improving the efficiency and accuracy of task processing. The attention mechanism plays an important role in sequence learning tasks and can effectively improve the performance of the model in a natural order-to-order manner. Its formula is:
[0050] E′ y=tanh((W 1,m .x n,m )+b 1,m )
[0051] y 1,m =x n,m .Nor(Exp(E y ))
[0052] where x n,m is the input feature sequence, m is the number of features, and n is the time step. 1,m is the weight matrix, b 1,m is the bias term. tanh is the activation operation, Exp(.) is the exponential operation, and Nor(.) is the normalization operation.
[0053] Step 4: Considering that the CNN-GRU model requires many parameters to be adjusted and the parameters are difficult to adjust, the Gray Wolf Optimization Algorithm is used to optimize the hyperparameters of the CNN-GRU, such as the number of layers and the number of neurons. The flowchart of the Gray Wolf Optimization Algorithm is shown in the attached figure. Figure 5 As shown. First, initialize the gray wolf population, randomly generate a certain number of gray wolves, and assign a random initial position to each gray wolf. In the mathematical model, the most suitable solution is called alpha (α), the second best is beta (β), and therefore, the third best is named delta (δ). The remaining candidate solutions are all assumed to be omegas (ω). All omegas will be guided by these three gray wolves during the search (optimization) and hunting process. The formula can be expressed as:
[0054]
[0055] Where t represents the current iteration number, is the gray wolf position vector. and is the coefficient vector, and the calculation formula is:
[0056]
[0057] in, is a random variable in [0,1], and a is the convergence factor. Theoretically, if This means that the wolves will flee from their prey and explore a larger space, which is the global search in optimization. They are close to the dominant population, which means that the wolves will get close to the prey, which is called local search in optimization. Secondly, according to the fitness of each gray wolf and the position of other gray wolves, the position of each gray wolf is updated. This step simulates the search, siege, pursuit and escape behaviors, updates the global optimal solution, records the position and fitness of the gray wolf with the best fitness, checks whether the termination conditions are met, such as reaching the maximum number of iterations or reaching the preset fitness threshold, and finally returns the global optimal solution as the result of the algorithm and inputs it into the CNN-GRU-Attention model. The overall flow chart of the CNN-GRU-Attention model is shown in the attached figure. Figure 4 shown.
[0058] Step 5: The core function of the vehicle behavior model is to accurately predict the future path of the vehicle. This prediction process is not only affected by the vehicle's own state, but also deeply constrained by surrounding traffic participants such as other vehicles, pedestrians, and bicycles. When building this model, the data sources of behavioral characteristics are diverse. On the one hand, these features can be obtained by pre-marking in the data set in detail; on the other hand, with the help of the trained vehicle behavior recognition model, these key features can also be identified and extracted in real time. The trajectory prediction results output by the model include key parameters such as the horizontal and longitudinal speeds of the vehicle at future moments, as well as the corresponding horizontal and longitudinal coordinates. Its loss function uses the mean square error loss function (MSELoss), and its formula is:
[0059]
[0060] Where n is the total number of variables, y i is the actual value, is the predicted value.
[0061] Step 6: Acceleration trajectory optimization algorithm, refer to the following physical formula:
[0062]
[0063] Where S is the displacement, v is the final velocity, and v o is the initial velocity, a is v o The lateral and longitudinal accelerations are as follows:
[0064]
[0065] Where Δt is the interval time between two points, v x and v y are the horizontal and longitudinal speeds of the vehicle predicted by the trajectory prediction model, and t is the time of the trajectory point. The lateral and longitudinal displacements are:
[0066]
[0067] The coordinate values are obtained according to the following formula:
[0068]
[0069] Among them, x t-1 and t-1 Indicates the coordinates of the previous trajectory point, x t and t Indicates the coordinates of the trajectory point. The present invention takes the last point of the historical trajectory point as the starting trajectory point and calculates in sequence until the coordinates of all predicted trajectory points are calculated. In the present invention, the time interval of the trajectory point is 0.1s.
[0070] The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention combines the advantages of CNN network and GRU network, introduces the attention mechanism to enhance the attention ability, and combines the fast solution efficiency of GWO optimization algorithm. Compared with the existing artificial intelligence prediction method, it has higher prediction accuracy while maintaining a faster model training speed.
[0071] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention, characterized in that: The following steps are involved: S1. Define the start and end times of the trajectory points in the data set by the start and end times of the vehicle lane change as the input of the training model data set; S2, combining the trajectory point features of the trajectory with the vehicle behavior information features; S3. Use CNN-GRU-Attention to establish separate vehicle behavior recognition models and vehicle trajectory prediction models and train them separately, where the training data of the vehicle trajectory model contains labeled vehicle behavior information; S4. Optimize the parameters of the CNN-GRU-Attention model using the Gray Wolf Optimization Algorithm; S5, inputting the combined features into a vehicle trajectory prediction model to obtain the lateral and longitudinal speeds and coordinates of the vehicle; S6. Combine the last trajectory point of the historical trajectory and use the acceleration trajectory algorithm to calculate the 3s trajectory.
2. The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention according to claim 1 is characterized in that: The trajectory point features input in S2 include vehicle status and interactive information features. The vehicle status includes coordinates, speed and acceleration; the vehicle behavior information features include straight driving, left and right turns and lane changing.
3. The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention according to claim 1 is characterized in that: The training process using CNN-GRU-Attention in S3 includes the following steps: S3.1, combining the trajectory point features of the trajectory with the vehicle behavior information features as model input variables; S3.2, the obtained training data is normalized to make its numerical range uniform, and then the processed data is input into the CNN convolutional neural network for convolution and maximum pooling processing; S3.3, sending the features processed by S3.2 to the gated recurrent unit network for further processing to complete the regression; S3.
4. Introduce the attention mechanism to dynamically assign different weights to different input parts, allowing the model to focus on important parts more flexibly when processing input sequences.
4. The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention according to claim 1 is characterized in that: In S4, the parameters of the CNN-GRU-Attention model are optimized using the Gray Wolf Optimization Algorithm, including the following steps: S4.
1. randomly generate a certain number of gray wolves and assign a random initial position to each gray wolf; S4.2, updating the position of each gray wolf according to its fitness and the positions of other gray wolves; S4.3, update the global optimal solution, and record the position and fitness of the gray wolf with the best fitness; S4.4, check whether the termination condition is met; the termination condition is: reaching the maximum number of iterations or reaching the preset fitness threshold; S4.
5. Return the global optimal solution as the result of the algorithm.
Citation Information
Patent Citations
Multi-modal vehicle trajectory prediction method based on long and short term memory network
CN113076599A
Vehicle track destination prediction method considering space-time semantics and driving state
CN113204718A
Inertial navigation long-time auxiliary correction method based on time window attention mechanism
CN116718211A
Sequential pedestrian trajectory prediction using step attention for collision avoidance
US20230038673A1
Cited By
Metal fatigue life prediction method and system based on deep learning small sample increment iterative training of self-attention mechanism
CN120449668A
Ground surface settlement prediction method based on feature selection and GWO optimization hybrid model
CN122173794A
Land subsidence prediction method based on feature selection and gwo optimization hybrid model
CN122173794B
