Attention mechanism-based surrounding vehicle trajectory prediction method and system in network connection environment

By employing an attention-based Transformer model in vehicle trajectory prediction, combined with dynamic learning rate and hybrid teacher-enforcement strategy, the problems of large long-term prediction error and poor adaptability to dynamic scenarios in existing technologies are solved, achieving efficient and stable trajectory prediction and collaborative decision-making.

CN121075173APending Publication Date: 2025-12-05CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511188187.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing vehicle trajectory prediction methods suffer from large errors in long-term prediction, slow real-time interactive response, and poor adaptability to dynamic scenarios. Furthermore, the Transformer model has failed to effectively address key challenges in trajectory prediction, such as dynamic weight allocation and real-time data fusion.

Method used

A Transformer trajectory prediction model based on an attention mechanism is constructed. Collaborative driving data is acquired through roadside units and vehicle sensors, preprocessed, and then input into the model for trajectory prediction. A training optimization framework with dynamic learning rate adjustment and hybrid teacher-forced strategy is adopted, and vehicle collaborative decision-making is realized by combining V2X communication.

Benefits of technology

It significantly improves the accuracy and speed of trajectory prediction, enhances the stability and robustness of the model in complex scenarios, and supports emergency obstacle avoidance decisions in high-speed scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121075173A_ABST
    Figure CN121075173A_ABST
Patent Text Reader

Abstract

The invention provides a surrounding vehicle track prediction method and system based on an attention mechanism in a network connection environment, and the method comprises the steps: constructing a vehicle network which comprises a road side unit and a vehicle; cooperative driving data of the target vehicle and surrounding vehicles are obtained through a road side unit and a sensor on the vehicle; the driving data is preprocessed; inputting the preprocessed driving data into the trained Transform trajectory prediction model based on the attention mechanism to obtain a trajectory prediction result of the surrounding vehicles; calculating a root-mean-square error between the trajectory prediction result and the actual running trajectory of the vehicle; constructing a vehicle collaborative decision according to the trajectory prediction result and the root-mean-square error, and controlling the operation of the vehicle based on the vehicle collaborative decision; according to the invention, an attention mechanism is adopted to effectively capture a complex dynamic interaction relationship between vehicles, and the precision of trajectory prediction is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of intelligent driving, and particularly relates to a surrounding vehicle trajectory prediction method and system based on an attention mechanism in a networked environment. BACKGROUND

[0002] With the development of automatic driving technology, vehicle trajectory prediction has become a core link of environment perception. Traditional methods are mainly divided into three categories: one is based on a physical kinematics model (such as a CTRA model, a nonlinear Kalman filter), which is stable in short-time prediction, but it is difficult to model the driver's intention and multi-vehicle interaction behavior, resulting in a sharp increase in long-time prediction error; the second is a hidden Markov chain (HMM) and Gaussian process model based on statistical learning, which is sensitive to data distribution and has weak generalization ability, and the prediction fails in complex scenes with a high risk; the third is a deep learning model based on a recurrent neural network (such as LSTM, GRU), which can capture temporal dependencies, but RNN models have three major defects due to their serial computing mechanism:

[0003] (1) Long-range dependency modeling is insufficient: the gradient vanishing problem of RNN models leads to a significant increase in prediction error of more than 4 seconds (such as the root mean square error of LSTM in 4-second prediction period is 3.67m);

[0004] (2) Real-time interaction response lag: serial computing cannot utilize the multi-vehicle parallel data stream in the networked environment, and the decision delay increases the risk of collision;

[0005] (3) Poor adaptability to dynamic scenes: fixed network structure is difficult to adapt to complex conditions such as traffic flow mutation and occlusion.

[0006] Although some researches have tried to combine driving intention recognition (such as STA-LSTM model) or graph neural network (GAT) in recent years, there are still problems such as low computational efficiency and insufficient multi-modal interaction modeling. The Transformer model has broken through the long-range dependency bottleneck in natural language processing with its multi-head attention mechanism, but its application in trajectory prediction has not yet solved the key challenges of dynamic weight allocation, real-time data fusion and networked collaborative decision-making. Therefore, there is an urgent need for a trajectory prediction scheme that combines the advantages of V2X communication and the adaptive characteristics of the attention mechanism. SUMMARY

[0007] To solve the problems in the prior art, the present application provides a surrounding vehicle trajectory prediction method based on an attention mechanism in a network environment, which comprises the following steps: constructing a vehicle network, wherein the vehicle network comprises roadside units and vehicles; acquiring cooperative driving data of a target vehicle and surrounding vehicles through sensors on the roadside units and the vehicles; preprocessing the driving data; constructing a Transformer trajectory prediction model based on an attention mechanism; training the Transformer trajectory prediction model based on the attention mechanism by using a training optimization framework combining a dynamic learning rate adjustment and a mixed teacher forced strategy; inputting the preprocessed driving data into the trained Transformer trajectory prediction model based on the attention mechanism to obtain trajectory prediction results of the surrounding vehicles; calculating root mean square errors between the trajectory prediction results and actual running trajectories of the vehicles; constructing vehicle cooperative decision-making based on the trajectory prediction results and the root mean square errors; and controlling vehicle operation based on the vehicle cooperative decision-making.

[0008] A surrounding vehicle trajectory prediction system based on an attention mechanism in a network environment, which comprises a data acquisition module, a preprocessing module, a trajectory prediction module and a decision application module.

[0009] The data acquisition module acquires position, speed and acceleration data of a target vehicle and surrounding vehicles through vehicle-mounted sensors and V2X communication equipment.

[0010] The preprocessing module is used for performing wavelet denoising, feature standardization and heading angle calculation, and constructing a multi-dimensional feature matrix.

[0011] The trajectory prediction module is used for deploying a Transformer model and generating future trajectory sequences of surrounding vehicles by using a multi-head attention mechanism.

[0012] The decision application module triggers a hierarchical control strategy according to the predicted trajectory and the minimum distance between the surrounding vehicles.

[0013] To achieve the above-mentioned purposes, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any of the above-mentioned surrounding vehicle trajectory prediction methods based on an attention mechanism in a network environment.

[0014] To achieve the above-mentioned purposes, the present application further provides a surrounding vehicle trajectory prediction device based on an attention mechanism in a network environment, which comprises a processor and a memory; the memory is used for storing a computer program; the processor is connected to the memory and is used for executing the computer program stored in the memory, so that the surrounding vehicle trajectory prediction device based on an attention mechanism in a network environment executes any of the above-mentioned surrounding vehicle trajectory prediction methods based on an attention mechanism in a network environment.

[0015] The beneficial effects of the present application are as follows:

[0016] The present application effectively captures the complex dynamic interaction relationship between vehicles by adopting the attention mechanism, significantly improves the accuracy of trajectory prediction; at the same time, benefiting from the inherent parallel computing architecture of the Transformer model, the prediction speed is greatly improved, realizing efficient real-time prediction, providing key support for emergency obstacle avoidance decision in high-speed scenarios. By fusing V2X networked data, the present application significantly optimizes the construction efficiency of the feature matrix, and exhibits excellent robustness. Even in challenging complex scenarios such as occlusion and confluence area, the prediction result remains highly stable. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The present application is a whole flow chart of the surrounding vehicle trajectory prediction method based on the attention mechanism in the networked environment.

[0018] Figure 2 The present application is a Transformer model structure diagram based on the attention mechanism.

[0019] Figure 3 The present application is a system module structure diagram of the surrounding vehicle trajectory prediction method based on the attention mechanism in the networked environment.

[0020] Figure 4 The present application is a specific implementation process diagram of the surrounding vehicle trajectory prediction method based on the attention mechanism in the networked environment.

[0021] Figure 5 The present application is a model prediction experimental result diagram of the surrounding vehicle trajectory prediction method based on the attention mechanism in the networked environment. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0023] The application discloses a surrounding vehicle trajectory prediction method based on an attention mechanism in a network environment, and the method comprises the following steps: constructing a vehicle network, wherein the vehicle network comprises a roadside unit and a vehicle; acquiring cooperative driving data of a target vehicle and surrounding vehicles through sensors on the roadside unit and the vehicle; preprocessing the driving data; constructing a Transformer trajectory prediction model based on an attention mechanism; training the Transformer trajectory prediction model based on the attention mechanism by adopting a training optimization framework of a dynamic learning rate adjustment and a mixed teacher forced strategy; inputting the preprocessed driving data into the trained Transformer trajectory prediction model based on the attention mechanism to obtain a trajectory prediction result of the surrounding vehicles; calculating a root mean square error of the trajectory prediction result and an actual running trajectory of the vehicle; constructing a vehicle cooperative decision according to the trajectory prediction result and the root mean square error, and controlling the vehicle to run based on the vehicle cooperative decision.

[0024] To achieve the above object, as shown in the description Figure 1 , the application provides a surrounding vehicle trajectory prediction method based on an attention mechanism in a network environment, comprising the following steps:

[0025] S1, cooperative driving data in a network environment is collected in real time through multi-source sensing devices deployed on a target vehicle and roadside infrastructure.As shown in the description Figure 4 , the specific implementation comprises:

[0026] (1) a vehicle-mounted sensing unit: a millimeter wave radar (detection frequency 77GHz, effective detection distance 200m) and a binocular camera (resolution 1920x1080, frame rate 30fps) installed on the target vehicle are used to obtain real-time self-position coordinates (x, y), instantaneous speed (v, unit m / s), acceleration (a, unit m / s2), steering wheel angle (θ), lane ID (Lane_ID) and other self-data, and the sampling frequency is 10Hz.

[0027] (2) a V2X communication unit: a DSRC protocol communication is performed between the roadside unit (RSU) and surrounding vehicles to realize real-time interaction of environmental data, including: relative distances (Space_Headway, unit: feet) of vehicles in front and behind in the current lane and adjacent lanes; time headway (Time_Headway, unit: seconds) of the vehicles; speeds (v), accelerations (a) and driving direction vectors (θ) of the cooperative vehicles; lane curvatures (κ), slopes (β) and traffic sign semantic information provided by a high-precision map. The calculation processes of the key features are as follows: ​​​​​​​​​

[0028]

[0029]

[0030]

[0031] (3) Data fusion rule: a 50-meter radius perception range is dynamically defined around the target vehicle, Kalman filtering is used to align multi-source data in time and space, ensuring that all interactive vehicle data is synchronized to the same timestamp, and finally the optimal state estimation value after fusion is output :

[0032]

[0033] where K is the Kalman gain, is the radar data, including the absolute position of the target vehicle , ); is the camera data, providing lane-level relative position (such as vehicle centerline offset).

[0034] S2, data preprocessing and feature enhancement are performed on the collected driving data in the networked environment, including noise reduction, feature generation, and standardization processing on the original driving data, the specific process is as follows:

[0035] Step one, wavelet denoising processing is performed on the original driving data. Daubechies 4 (db4) wavelet basis is used for 5-layer decomposition, high-frequency noise is removed and low-frequency motion trend signal is retained . The reconstruction formula is:

[0036]

[0037] where is the 5th layer approximation coefficient, is the i-th layer detail coefficient.

[0038] Step two, feature enhancement work is performed on the reconstructed data. On the basis of the original data, the heading angle is calculated and added, and the speed and acceleration data of each vehicle are decomposed to generate speed and acceleration feature information in the horizontal and vertical coordinates respectively, the calculation formula is as follows:

[0039]

[0040]

[0041]

[0042]

[0043] wherein, is the sampling time interval (0.1s).

[0044] Step three, standardization of data features. Including three contents of unified conversion of data unit, data normalization processing, and construction of feature matrix. The feature values of data are mapped to the interval [0, 1] by using Min-Max scaling, and the normalization formula is as follows:

[0045]

[0046] wherein, is the original feature value, is the minimum value of the feature in the data set, is the maximum value of the feature in the data set.

[0047] After completing the normalization work, the output data is constructed into a 44-dimensional feature matrix, so as to be used for the vehicle trajectory prediction model based on attention mechanism.

[0048] S3, processing the data collected in the networked environment, and establishing a vehicle trajectory prediction model based on attention mechanism.

[0049] In this embodiment, first, the standard Transformer model structure is optimized to better adapt to the spatio-temporal features of vehicle trajectory sequences. In the encoder, the sine-cosine position encoding is introduced to effectively capture the time sequence features of vehicle motion; in the decoder, the mask multi-head attention mechanism is used to prevent the leakage of future information of the sequence, so as to ensure the causality of prediction; in addition, the encoder-decoder cross attention layer is added in the decoder to realize the deep fusion of multi-vehicle interaction features, thereby significantly improving the prediction ability of the model to complex interaction scenarios.

[0050] In order to solve the problem of slow training process of the Transformer model and improve the generalization ability of the prediction model, the learning rate dynamic adjustment mechanism is also innovatively added in this embodiment, which can adjust the learning rate according to the progress of the model training round, effectively avoiding the problem of slow convergence in the early stage or local optimum in the later stage of the prediction model training process with fixed learning rate, thereby improving the training speed, training stability and generalization ability of the prediction model in complex traffic scenarios. The dynamic learning rate l r is determined by the following formula:

[0051]

[0052] In the formula, epoch refers to the current training round number, and ​The result obtained by backward rounding down is taken as an index into the formula, and the learning rate is dynamically adjusted.

[0053] In order to further improve the accuracy and stability of the predicted trajectory, in the embodiment, when the model is trained, a hybrid teacher forcing strategy is innovatively adopted, which effectively alleviates the problems of prediction error accumulation caused by recursive prediction and teacher forcing prediction easily affected by noise by dynamically adjusting the injection ratio (i.e. hybrid forcing rate TR) of real data and predicted data in the model training process. Through multiple rounds of experimental comparison of the prediction performance under different TR values, the optimal value is finally determined as 0.4, that is, the real trajectory data is injected with a probability of 40% in the training process, thereby significantly improving the robustness of the prediction model of the embodiment in the real vehicle environment.

[0054] Overall, the embodiment improves the basic Transformer model, and organically combines the dynamic learning rate and the hybrid teacher forcing strategy to form a collaborative optimization training framework, thereby effectively improving the convergence efficiency and prediction accuracy of the model.

[0055] A training process of a surrounding vehicle trajectory prediction model based on an attention mechanism in a networked environment includes: (1) data input: inputting the historical 5s trajectory of the vehicle, and generating context features through an encoder; (2) trajectory generation: after the decoder receives the context features generated by the encoder, the context features generated by the encoder and the state features generated by the decoder are fused, and then the result is mapped from a high-dimensional space to a low-dimensional space through an encoder layer, the real value or the predicted value is selected according to the TR value as the input of the next prediction, and finally the predicted vehicle trajectory is obtained; (3) dynamic adjustment: during the training process of the model, the learning rate of the model is dynamically reduced with the increase of the training rounds, so as to improve the prediction accuracy of the model, and the training results under different TR values are compared, and finally the best TR value is obtained.

[0056] The application adopts a Transformer model to complete the work, mainly including the core architecture of an encoder-decoder, as shown in Figure 2 , and formulating a training and prediction strategy of the vehicle trajectory prediction model. The main implementation process is as follows:

[0057] Step one, encoder construction. The output feature matrix after data preprocessing is mapped to a high-dimensional space, in the method, the spatial dimension of the high-dimensional space is 512 dimensions, and the mapping process is as follows:

[0058]

[0059] wherein, is the high-dimensional feature representation after linear projection, ​for learnable weight matrices, for bias terms.

[0060] Meanwhile, the data also needs to be added with sinusoidal position encoding, and the position encoding formula is as follows:

[0061]

[0062]

[0063] wherein, represents the time step position in the sequence, and i is the index of the feature dimension.

[0064] Step two, decoder construction. Contrary to the working process of the encoder, the decoder is responsible for reducing the processed information from a high-dimensional space to a low-dimensional space. Specifically, it includes: first, the multi-head attention mechanism needs to be masked to prevent information leakage, the process is as follows:

[0065]

[0066] wherein, Q represents the query, K represents the key, and V represents the value matrix, represents the dimension of the key vector, and M is a lower triangular mask matrix.

[0067] Then use the cross-attention mechanism to fuse all the output results of the encoder.

[0068] Step three, the training and prediction strategy of the vehicle trajectory prediction model is optimized. In this embodiment, the learning rate of the vehicle trajectory prediction model is dynamically processed:

[0069]

[0070] wherein, epoch is the current training round (0-100 rounds), and the result of is rounded down.

[0071] In terms of prediction strategy, the hybrid teacher forced prediction strategy is adopted, and the hybrid forced rate (TR value) is set to 0.4, that is, the real trajectory is injected into the decoder with a probability of 40%:

[0072]

[0073] wherein, is the real coordinate trajectory in the data set, is the predicted trajectory in the last step.

[0074] S4, test the vehicle trajectory prediction model designed in this embodiment by more real data to verify the robustness of the model in this embodiment and the generalization ability to different scenarios, and formulate different driving strategies as shown in Table 2 according to the minimum distance between the target vehicle and the interactive vehicle.

[0075] Step one, use the built Transformer model to generate the predicted trajectory of the target vehicle, and output the trajectory sequence of the future 25 time steps (5s):

[0076]

[0077] wherein, is a learnable matrix, is the final hidden state of the decoder (512 dimensions), is a bias term. Then the model outputs the trajectory sequence of the future 25 time steps (5s):

[0078]

[0079] Step two, according to the trajectory generated by the prediction model, the cooperative decision system formulates the next driving strategy. In this embodiment, the model is used to calculate the minimum distance between the target vehicle and the interactive vehicle, and according to the minimum distance formulated three corresponding strategies as shown in Table 2:

[0080]

[0081] wherein, , is the predicted trajectory point of the target vehicle, , is the real-time position of the other cooperative vehicle.

[0082] A surrounding vehicle trajectory prediction system based on attention mechanism in a networked environment, as shown in Figure 3 , the system comprises a V2X data acquisition module, a driving data preprocessing module, a Transformer trajectory prediction module and a decision application module.

[0083] The V2X data acquisition module is used to collect the position coordinates, instantaneous speed, acceleration and lane environment data of the target vehicle and the surrounding vehicles in real time through the vehicle-mounted millimeter wave radar, binocular camera and roadside unit (RSU), and to define a 50-meter perception radius with the target vehicle as the center, to realize the spatio-temporal alignment of multi-source data by using Kalman filtering, and to build a dynamic interactive perception basis.

[0084] The driving data preprocessing module is used to perform wavelet noise reduction on the raw data and to generate a 44-dimensional standardized feature matrix by calculating the heading angle and generating lateral / longitudinal velocity acceleration features, providing high-quality input for trajectory prediction.

[0085] The Transformer trajectory prediction module is used to deploy an encoder-decoder architecture based on an attention mechanism. The encoder maps 44-dimensional features to a 512-dimensional high-dimensional space through a linear projection layer and adds sinusoidal position encoding. The decoder adopts a masked multi-head attention mechanism (number of heads h=8) to prevent future information leakage. It combines dynamic learning rate adjustment (initial 0.001, decaying by 50% every 10 rounds) and a hybrid teacher-forced strategy (TR=0.4) to output the trajectory prediction sequence for the next 25 time steps.

[0086] The decision application module is used to match the predicted trajectory with the high-precision map in real time and trigger a three-level coordinated response based on the minimum distance between the predicted trajectory and surrounding vehicles: when the minimum distance is greater than 10 meters, maintain the cruise speed; when it is 5-10 meters, execute a warning deceleration (the target vehicle speed is reduced to 80%); when it is less than 5 meters, trigger an emergency obstacle avoidance command with a maximum deceleration of 8m / s².

[0087] like Figure 5 As shown, the trajectories of four vehicles were randomly selected from the test dataset for trajectory prediction. The predictions for the following five seconds were based on the first five seconds of real data. In the figure, green dots represent the starting points, and red dots represent the ending points. It can be seen that the predicted trajectories differ little from the actual trajectories, indicating that the prediction model performs well.

[0088] This embodiment uses the key simulation parameters shown in Table 1:

[0089] Table 1. Parameter settings for the attention-based vehicle trajectory prediction model

[0090] Key parameters Values Encoder / decoder layers 6 Attention heads 8 Feed-forward network dimensions 2048 Initial learning rate 0.001 Training batch size 1024 Iteration rounds 100 Planned sampling ratio 0.6

[0091] Table 2 Three-level response strategy

[0092] Minimum distance (m) Response strategy >10 Maintain cruise 5≤ ≤10 Reduce speed to 80% <5 Trigger maximum deceleration and steer to avoid obstacle

[0093] The system implementation method of the present invention is the same as the method implementation method.

[0094] In one embodiment of the present invention, the present invention further includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the surrounding vehicle trajectory prediction method based on the attention mechanism in any of the above-described connected environments.

[0095] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by computer program related hardware. The foregoing computer program can be stored in a computer readable storage medium. The program executes the steps of the above-mentioned method embodiments when executed; and the foregoing storage medium includes ROM, RAM, magnetic disc or optical disc and various storage medium capable of storing program codes.

[0096] A surrounding vehicle trajectory prediction device based on an attention mechanism in a network environment, comprising a processor and a memory; the memory is used to store a computer program; the processor is connected with the memory, and is used to execute the computer program stored in the memory, so that the surrounding vehicle trajectory prediction device based on the attention mechanism in the network environment executes any of the above-mentioned surrounding vehicle trajectory prediction methods based on the attention mechanism in the network environment.

[0097] Specifically, the memory includes ROM, RAM, magnetic disc, U disk, memory card or optical disc and various storage medium capable of storing program codes.

[0098] Preferably, the processor can be a general processor, including central processing unit (CPU), network processor (NP) and the like; and can also be digital signal processor (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.

[0099] The above-mentioned embodiments further explain the purpose, technical scheme and advantages of the present application. It should be understood that the above-mentioned embodiments are only preferred embodiments of the present application, and do not limit the present application. Any modification, equivalent replacement, improvement and the like made to the present application within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for predicting trajectories of surrounding vehicles based on an attention mechanism in a connected environment, characterized in that, The application relates to a vehicle networking method. The vehicle networking method comprises the following steps: Collecting cooperative driving data of target vehicles and surrounding vehicles through sensors on roadside units and vehicles; Preprocessing the driving data, constructing a Transformer trajectory prediction model based on an attention mechanism, training the Transformer trajectory prediction model based on the attention mechanism by adopting a dynamic learning rate adjustment and a mixed teacher forced strategy, inputting the preprocessed driving data into the trained Transformer trajectory prediction model based on the attention mechanism to obtain trajectory prediction results of the surrounding vehicles, calculating root mean square errors between the trajectory prediction results and actual running trajectories of the vehicles, constructing vehicle cooperative decision-making based on the trajectory prediction results and the root mean square errors, and controlling vehicle running based on the vehicle cooperative decision-making.

2. The trajectory prediction method for surrounding vehicles based on attention mechanism in a network environment according to claim 1, characterized in that, The cooperative driving data comprises positions, speeds, accelerations and environmental information of the vehicles.

3. The trajectory prediction method for surrounding vehicles based on attention mechanism in a network environment according to claim 1, characterized in that, The preprocessing of the driving data comprises filtering and denoising of vehicle trajectories, feature standardization and heading angle calculation, specifically comprising the following steps:

4. The trajectory prediction method for surrounding vehicles based on attention mechanism in a network environment according to claim 1, characterized in that, The wavelet decomposition method is adopted to perform denoising processing on original trajectory data, low-frequency signals are retained and high-frequency noises are removed, the English units are converted into international standard units, and vehicle heading angles are calculated, transverse / longitudinal speed and acceleration features are added, and a multi-dimensional feature matrix is constructed.

5. The trajectory prediction method for surrounding vehicles based on attention mechanism in a network environment according to claim 4, characterized in that, The training of the Transformer trajectory prediction model based on the attention mechanism by adopting the dynamic learning rate adjustment and the mixed teacher forced strategy comprises the following steps: The learning rate of model training is set, 5s historical trajectories of the vehicles are obtained, the historical 5s trajectories are input into an encoder of the Transformer trajectory prediction model to obtain context features, the context features are input into a decoder of the Transformer trajectory prediction model to obtain state features, the state features and the context features are fused to obtain fused features, the fused features are mapped to obtain predicted trajectories, a mixed forced rate is set, the real value or the predicted trajectory is selected as the input of the next step of prediction according to the mixed forced rate, and the mixed forced rate and the learning rate are dynamically adjusted, the training results under different mixed forced rates are compared, and finally the optimal mixed forced rate is obtained, the optimal mixed forced rate is taken as an optimal parameter of model training, and the model training is completed. The Transformer module comprises an encoder and a decoder, the encoder comprises an input linear projection layer, a sine-cosine position encoding layer and a multi-layer encoder layer, the input linear projection layer maps input features to a high-dimensional space, the sine-cosine position encoding layer adds position representation information to time steps of an input sequence, and the multi-layer encoder layer is used for feature extraction of the input sequence with the added position representation information to obtain context features; The decoder comprises a masked multi-head attention layer, an encoder-decoder cross attention layer and an output projection layer, the masked multi-head attention layer performs mask processing on the context features by using a mask matrix; The encoder-decoder cross attention layer is used for fusing the context features after the mask processing to obtain fused features. The output projection layer maps the fused features to the prediction trajectory dimension.

6. The trajectory prediction method for surrounding vehicles based on attention mechanism in a network environment according to claim 5, characterized in that, The mask multi-head attention layer processes the input data, including: dividing the input sequence into h attention heads, calculating the query matrix Q, the key matrix K and the value matrix V in parallel; and calculating the feature dimension and the attention weight matrix of each head through a scaling dot product formula. 7.A surrounding vehicle trajectory prediction system based on attention mechanism in a connected environment, which is configured to perform the method of any one of claims 1-6. The method comprises the following steps: a data acquisition module, a preprocessing module, a trajectory prediction module and a decision application module; The data acquisition module obtains the position, speed and acceleration data of the target vehicle and surrounding vehicles through vehicle-mounted sensors and V2X communication equipment. The preprocessing module is used for performing wavelet denoising, feature standardization and heading angle calculation, and constructing a multi-dimensional feature matrix. The trajectory prediction module is used for deploying a Transformer model and generating a future trajectory sequence of the surrounding vehicles by using a multi-head attention mechanism. The decision application module triggers a hierarchical control strategy according to the predicted trajectory and the minimum distance to the surrounding vehicles.

8. The trajectory prediction system for surrounding vehicles in a connected environment based on an attention mechanism according to claim 7, characterized in that, The specific execution logic of the decision application module is: if the prediction result shows that the surrounding vehicles have lane changing intentions, the target vehicle reduces speed or changes route in advance; if a collision risk is predicted, an emergency braking or steering instruction is triggered; the predicted trajectory is matched with a high-precision map, and a path planning algorithm is optimized.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the trajectory prediction method of surrounding vehicles based on an attention mechanism in a networked environment according to any one of claims 1 to 6.

10. An attention mechanism-based surrounding vehicle trajectory prediction device in a networked environment, comprising: The computer program is executed by a processor to implement the trajectory prediction method of surrounding vehicles based on an attention mechanism in a networked environment according to any one of claims 1 to 6. The computer program is executed by a processor to implement the trajectory prediction method of surrounding vehicles based on an attention mechanism in a networked environment according to any one of claims 1 to 6.

Citation Information

Cited By

  • Intelligent vehicle group cooperative control method based on attention mechanism

    CN121325887A

  • Internet of vehicles cooperative driving control method and system based on deep reinforcement learning

    CN121375850A