A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention
Patent Information
- Application Number
- CN202410876451.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-07-02
AI Technical Summary
[0006]本发明的目的是在于提供一种基于GWO-CNN-GRU-Attention的高速车辆轨迹预测方法,以解决CNN在处理序列数据方面相对较弱,计算代价较高以及GRU的门控机制可能导致信息丢失,且在数据量不足时容易过拟合,其遗忘能力相对较弱的问题
(1)本发明的基于GWO-CNN-GRU-Attention的高速车辆轨迹预测方法,构建了包含坐标、速度、加速度等车辆状态和交互信息特征的特征集,可以充分发挥CNN网络在数据挖掘领域的优势,提取非连续数据在高维空间中的潜在联系。
Smart Images

Figure CN118862010B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent vehicle and computer technology, specifically relating to a high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention. Background Technology
[0002] The rapid development of mobile wireless communication and global positioning technology has led to the emergence of GPS positioning technology, which can track vehicle trajectories with remarkable accuracy. GPS navigation systems can acquire vehicle location, direction of travel, and other factors in real time. Location data and movement trajectories can be used to interpret rich spatial structures of information, combined with user behavior, making vehicle trajectory prediction possible. Accurate and reliable vehicle trajectory prediction is a crucial component of any intelligent transportation system, improving traffic safety and facilitating effective urban road planning. However, because vehicle trajectories are uncertain and susceptible to environmental and user behavior influences, accurate prediction using modern trajectory prediction techniques is challenging. In recent years, the field of trajectory prediction has seen significant development, shifting from initial physics-based and rule-based methods to those based on machine learning and deep learning.
[0003] Traditional machine learning methods are easy to understand and implement, but they have limited ability to model complex spatiotemporal relationships and struggle to handle large-scale and high-dimensional data. Deep learning's greatest advantage lies in its ability to capture more complex spatiotemporal features and process large-scale and high-dimensional data. However, its drawbacks are also significant: it requires a large amount of data for training, has high model complexity, and demands high hardware resources. Therefore, how to minimize the shortcomings of deep learning and maximize its advantages has become a research goal for many scholars.
[0004] CNNs excel at processing image data, extracting spatial features through convolution and pooling operations, reducing the number of parameters, and possessing hierarchical feature learning capabilities. However, they are relatively weak in processing sequential data, incurring high computational costs and requiring a large amount of labeled data. GRU, on the other hand, is suitable for processing sequential data, addressing long-term dependencies and the vanishing gradient problem through gating mechanisms. It has fewer parameters, faster training speed, and performs well in sequence modeling. However, GRU's gating mechanism may lead to information loss, and it is prone to overfitting when data is insufficient; its forgetting ability is relatively weak. By combining the two, the model can utilize both spatial and temporal information simultaneously, achieving more comprehensive feature learning. Introducing an attention mechanism, assigning different weights to different parts of the input, allows for more precise focus on important parts when processing input data, improving the model's performance on complex tasks. The GWO optimization algorithm, compared to other algorithms, has advantages in its simple and intuitive structure, easy parameter tuning, powerful adaptive adjustment capabilities, and efficient and robust solution performance. This enables GWO to perform excellently in solving complex optimization problems. By combining GWO with CNN-GRU-Attention, not only is the accuracy and generalization ability of the model improved, but the risk of overfitting is also reduced.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention, in order to solve the problems that CNN is relatively weak in processing sequential data, has a high computational cost, and that the gating mechanism of GRU may cause information loss, is prone to overfitting when the amount of data is insufficient, and has a relatively weak forgetting ability.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention includes the following steps: S1. Define the start and end times of trajectory points in the dataset by the start and end times of vehicle lane changes, and use them as input to the training model dataset; S2. Combine the trajectory point features with 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. The training data of the vehicle trajectory model includes labeled vehicle behavior information. S4. Optimize the parameters of the CNN-GRU-Attention model using the Grey Wolf optimization algorithm; S5. Input the combined features into the vehicle trajectory prediction model to obtain the vehicle's lateral and longitudinal velocities and coordinates; S6. Combine the last trajectory point of the historical trajectory and use the acceleration trajectory algorithm to calculate the 3s trajectory.
[0008] Preferably, the trajectory point features input in S2 include vehicle status and interactive information features. Vehicle status includes coordinates, speed, and acceleration; vehicle behavior information features include going straight, turning left or right, and changing lanes.
[0009] As a preferred embodiment, the training process using CNN-GRU-Attention in S3 includes the following steps: S3.1 Combine the trajectory point features with vehicle behavior information features as model input variables; S3.2. Normalize the acquired training data to make its numerical range uniform. Then, the processed data will be input into the CNN convolutional neural network for convolution and max pooling. S3.3. The features processed in S3.2 are fed into a gated recurrent unit network for further processing to complete the regression. S3.4. Introduce an attention mechanism to dynamically assign different weights to different input parts, allowing the model to focus more flexibly on important parts when processing input sequences.
[0010] As a preferred method, the parameters of the CNN-GRU-Attention model are optimized in S4 using the Grey 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 Update the position of each gray wolf based on 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 if 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.
[0011] Compared with the prior art, the present invention has the following beneficial effects: (1) The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of the present invention constructs a feature set containing vehicle state and interaction information features such as coordinates, speed, and acceleration, 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.
[0012] (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, which has good temporal data fitting and regression ability and high prediction efficiency.
[0013] (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 CNN-GRU structure to dynamically assign different weights to different input parts so that the model can pay more attention to the important parts, thereby improving the performance and generalization ability of the model.
[0014] (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 that is closest to the model parameters in a short time, which is very much in line with the current practical needs of high-speed trajectory prediction.
[0015] (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 attention mechanism to enhance attention ability, and combines the fast solution efficiency of GWO optimization algorithm. Compared with existing artificial intelligence prediction methods, it has high prediction accuracy while maintaining fast model training speed. Attached Figure Description
[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a basic structure diagram of a GRU network; Figure 3 This is a flowchart of the CNN-GRU model training process of the present invention; Figure 4 This is a flowchart of the overall CNN-GRU-Attention model of this invention; Figure 5 This is the flowchart of the Grey Wolf optimization algorithm. Detailed Implementation
[0017] The technical solution of this invention patent will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0018] See attached document Figure 1 A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention includes the following steps: Step 1: Extracting the lane change trajectory dataset plays an important role in the vehicle trajectory displacement prediction model. In this method, the time required for the lateral position of the vehicle to change lanes continuously in one direction is selected as the lane change duration. Based on the analysis of the highD dataset, the average vehicle lane change duration can be obtained by calculating 2203 data points.
[0019] Step 2: Divide the motion trajectory features into coordinate, coordinate, Directional velocity, Directional velocity, Directional acceleration and Six feature variables, including directional acceleration, are used as model input variables.
[0020] Step 3: First, use a CNN for local feature extraction to capture local patterns and features in the data. A Convolutional Neural Network (CNN) is a widely used feedforward neural network in deep learning, mainly composed of convolutional layers, pooling layers, and fully connected layers. Data undergoes feature extraction and selection through convolutional layers, achieved through pooling and information filtering. This allows the features of a single point to replace the feature statistics of its neighboring regions, retaining some high-intensity and low-intensity filtered-out portions. The matrix size is compressed after convolution to ensure a complete fit with the fully connected layers without affecting the classifier's quality. The fully connected layer follows the convolutional and pooling layers, and its signal transmission is specific. The feature map transmitted to the fully connected layer loses its topological structure and is output as a vector. The output layer follows the fully connected layer. The formula is:
[0021] In the formula, , This is a sequence of vehicle trajectory data, where It is the characteristic number. For convolution kernel, is the length of the convolution kernel. This is a batch normalization operation. This is for activation.
[0022] The model is then trained using a Gated Recurrent Unit (GRU) model. Compared to an LSTM neural network, the GRU network has one-third fewer parameters, thus reducing the likelihood of overfitting. Furthermore, the GRU network requires less time in terms of the number of iterations needed and convergence time. LSTM can capture long-term dependencies and is suitable for analyzing time series data, but its complex internal structure leads to long training times. GRU optimizes LSTM to reduce training parameters while ensuring prediction accuracy. GRU includes update and reset gates. Compared to the three-gate structure of LSTM, GRU has fewer parameters and faster convergence speed. The threshold of the update gate indicates where information from previous time steps is retained in the current state. The larger the value, the more information from the previous time step 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 outputs the results using the following formula.
[0023]
[0024] In the formula: Indicates an update to the door. This indicates that the door is being reset. This indicates the output information from the previous layer. This represents the activation function. Represents the training parameter matrix. This represents a summary of the input and output information from the previous layer. This indicates the output information. The basic structure of a GRU network is shown in the attached figure. Figure 2 As shown, the CNN-GRU model training flowchart is as follows: Figure 3 As shown.
[0025] Finally, an attention mechanism is introduced to filter important dynamic interaction information between vehicles. This focuses attention on information more critical to the current task from among numerous input data, reducing attention to other information and even filtering out irrelevant information. This solves the problem of information overload and improves the efficiency and accuracy of task processing. The attention mechanism plays a crucial role in sequence learning tasks, effectively improving model performance in a natural, sequential manner. Its formula is:
[0026] in Given the input feature sequence, For characteristic number, For time step. This is the weight matrix. This is a bias term. For activation, For exponential operations. This is a normalization operation.
[0027] Step 4: Considering the large number of parameters that need to be tuned in the CNN-GRU model and the difficulty of parameter tuning, the Grey Wolf optimization algorithm is used to optimize the hyperparameters of the CNN-GRU, such as the number of layers and neurons. The flowchart of the Grey Wolf optimization algorithm is attached. Figure 5 As shown. First, the gray wolf population is initialized by randomly generating a certain number of gray wolves and assigning each wolf a random initial position. In the mathematical model, the most suitable solution is called alpha ( The second best is beta ( Therefore, the third best one was named delta ( The remaining candidate solutions are assumed to be omegas (). All omegas are guided by these three gray wolves during the search (optimization) and hunting process. The formula can be expressed as:
[0028]
[0029] in, Indicates the current iteration number. Let be the gray wolf's position vector. and For the coefficient vector, the calculation formula is:
[0030] in, A random variable in the range [0,1] Let be the convergence factor. Theoretically, if This means the wolf pack will flee their prey to explore a larger area; this is the global search in optimization. If They approach the dominant species, meaning the wolf pack will approach the prey; this is known as local search in optimization. Next, based on each gray wolf's fitness and the positions of other gray wolves, the position of each gray wolf is updated. This step simulates search, encirclement, chase, and escape behaviors, updates the global optimum, records the position and fitness of the gray wolf with the best fitness, checks if termination conditions are met, such as reaching the maximum number of iterations or a preset fitness threshold, and finally returns the global optimum as the algorithm's result, inputting it into the CNN-GRU-Attention model. The overall flowchart of the CNN-GRU-Attention model is attached. Figure 4 As shown.
[0031] Step 5: The core function of the vehicle behavior model is to accurately predict the future travel path of a vehicle. This prediction process is not only affected by the vehicle's own state but also heavily influenced by surrounding traffic participants such as other vehicles, pedestrians, and bicycles. When building this model, the data sources for behavioral features are diverse. On the one hand, these features can be obtained through detailed labeling in the dataset beforehand; on the other hand, these key features can be identified and extracted in real time using a pre-trained vehicle behavior recognition model. The trajectory prediction results output by the model include the vehicle's future horizontal and vertical velocities, as well as the corresponding horizontal and vertical coordinates and other key parameters. Its loss function uses the mean squared error loss function (MSELoss), the formula of which is:
[0032] Where n is the total number of variables. This is the actual value. These are predicted values.
[0033] Step Six: Acceleration Trajectory Optimization Algorithm, referencing the following physical formulas:
[0034] in It is displacement. It is the final speed. It is the initial velocity, 'a' is... The acceleration at that point. The lateral and longitudinal accelerations are shown below:
[0035] In the formula The time interval between two points. and Let t represent the horizontal and longitudinal velocities of the vehicle predicted by the trajectory prediction model, and t be the time interval at the trajectory point. The lateral and longitudinal displacements are then:
[0036] The coordinate values are derived from the following formula:
[0037] in, and This represents the coordinates of the previous trajectory point. and This represents the coordinates of the trajectory point. This invention uses the last historical trajectory point as the starting trajectory point and calculates sequentially until the coordinates of all predicted trajectory points are calculated. In this invention, the time interval between trajectory points is 0.1 s.
[0038] The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention of this invention combines the advantages of CNN network and GRU network, introduces an attention mechanism to enhance attention ability, and combines the fast solution efficiency of GWO optimization algorithm. Compared with existing artificial intelligence prediction methods, it has higher prediction accuracy while maintaining a faster model training speed.
[0039] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention, characterized in that, Includes the following steps: S1. Define the start and end times of trajectory points in the dataset by the start and end times of vehicle lane changes, and use them as input to the training model dataset; S2. Combine the trajectory point features with 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. The training data of the vehicle trajectory model includes labeled vehicle behavior information. S4. Optimize the parameters of the CNN-GRU-Attention model using the Grey Wolf optimization algorithm; S5. Input the combined features into the vehicle trajectory prediction model to obtain the vehicle's lateral and longitudinal velocities and coordinates; S6. Combine the last trajectory point of the historical trajectory and use the acceleration trajectory algorithm to calculate the 3-second trajectory; The training process using CNN-GRU-Attention in S3 includes the following steps: S3.1 Combine the trajectory point features with vehicle behavior information features as model input variables; S3.
2. Normalize the acquired training data to make its numerical range uniform. Then, the processed data will be input into the CNN convolutional neural network for convolution and max pooling. S3.
3. The features processed in S3.2 are fed into a gated recurrent unit network for further processing to complete the regression. S3.
4. Introduce an attention mechanism to dynamically assign different weights to different input parts, allowing the model to focus more flexibly on important parts when processing input sequences.
2. The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention according to claim 1, characterized in that, The trajectory point features input in S2 include vehicle status and interactive information features. Vehicle status includes coordinates, speed, and acceleration; vehicle behavior information features include going straight, turning left or right, and changing lanes.
3. The high-speed vehicle trajectory prediction method based on GWO-CNN-GRU-Attention according to claim 1, characterized in that, In S4, the parameters of the CNN-GRU-Attention model are optimized using the Grey 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 Update the position of each gray wolf based on 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 if 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