Vehicle trajectory prediction method, electronic equipment and storage medium

By adopting an improved Mamba architecture and a hybrid architecture of Transformer and graph attention mechanism in vehicle trajectory prediction, the problem of limited effects of existing methods in complex interactive scenarios is solved, and more efficient and accurate trajectory prediction is achieved.

CN119538041APending Publication Date: 2025-02-28WUXI UNIV
View PDF 0 Cites 14 Cited by

Patent Information

Application Number
CN202411591352.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing trajectory prediction methods have limited effects when dealing with complex interactive scenarios, high computational complexity, and it is difficult to capture the timing and spatial relationships between vehicles at the same time.

Method used

Using an improved Mamba architecture and a hybrid architecture of Transformer encoder and graph attention mechanism, a vehicle trajectory prediction network model is built, and multimodal trajectory prediction results are generated through the timing feature extraction module, the spatial interactive feature extraction module and the decoder.

Benefits of technology

The calculation efficiency and accuracy of the model in long-sequence data processing is improved, and the complex interaction relationships between vehicles and road environment constraints can be better captured, and trajectory prediction results are generated that are more in line with reality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538041A_ABST
    Figure CN119538041A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle trajectory prediction method, electronic equipment and a storage medium, and the method comprises the steps: obtaining vehicle trajectory data, and carrying out the classification processing and feature extraction of the vehicle trajectory data, so as to generate a standardized data set; based on the standardized data set, a vehicle trajectory prediction network model is trained, and the vehicle trajectory prediction network model comprises a time sequence feature extraction module, a space interaction feature extraction module and a decoder; the time sequence feature extraction module is realized based on an improved Mama architecture; the space interaction feature extraction module is used for processing by using a mixed framework of a Transform framework and a graph attention mechanism; the decoder processes the encoded features through a multi-head attention mechanism and considers the relevance between different time steps and different vehicles so as to generate a prediction result of the vehicle trajectory; and inputting the data of the scene to be predicted into the trained vehicle trajectory prediction network model to obtain a prediction result of the vehicle trajectory, and the method has significant advantages in the aspects of calculation efficiency, prediction accuracy and scene adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of trajectory prediction, and more specifically, to a vehicle trajectory prediction method, electronic equipment and storage medium. Background Art

[0002] Vehicle trajectory prediction plays a vital role in autonomous driving systems. By accurately predicting the future trajectories of surrounding vehicles, autonomous vehicles can plan safe and efficient driving strategies in advance, effectively avoiding potential collision risks and achieving a smoother driving experience. This not only helps to improve the safety, reliability and ride comfort of autonomous driving systems, but also better cope with complex traffic scenarios, such as high-risk situations such as vehicle lane changes, turns and intersections. Accurate trajectory prediction capabilities further ensure the overall safety of road traffic.

[0003] However, existing trajectory prediction methods have their own advantages and disadvantages. Although traditional physical models have good interpretability, they only consider the kinematic characteristics of vehicles and are difficult to effectively model the complex interaction behaviors between vehicles, resulting in limited prediction effects in actual scenarios. Probabilistic methods, such as Gaussian mixture models (GMMs) and hidden Markov models (HMMs), can express the uncertainty in predictions, but their modeling capabilities are limited, especially in scenarios where long-term historical information needs to be considered. Sampling-based methods can generate diverse prediction trajectories, but are usually accompanied by high computational costs, and the stability of the prediction results is not satisfactory.

[0004] In recent years, with the rapid development of deep learning technology, methods based on convolutional neural networks (CNNs) have performed well in processing spatial features, but have shortcomings in modeling the temporal dependencies of trajectories; although methods based on recurrent neural networks (RNNs) are good at processing temporal information, they face the problems of long-term dependency information loss and difficulty in parallel computing. In addition, although the traditional attention mechanism can pay attention to spatiotemporal information at the same time, its computational complexity increases quadratically with the increase of sequence length, resulting in low efficiency when processing long sequence data and prone to performance bottlenecks. These limitations have seriously restricted the effectiveness and widespread promotion of existing methods in practical applications. Summary of the invention

[0005] In order to overcome the above problems in the prior art, the present invention provides a vehicle trajectory prediction method, an electronic device and a storage medium. Compared with the existing methods, they can better handle complex interactive scenarios, provide more accurate multimodal predictions while maintaining computational efficiency, and take into account actual road constraints, thereby providing a more reliable trajectory prediction solution for the autonomous driving system.

[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0007] A vehicle trajectory prediction method comprises the following steps:

[0008] S1. Acquire vehicle trajectory data, perform classification processing and feature extraction on the vehicle trajectory data to generate a standardized data set for model training;

[0009] S2. Based on the standardized data set, training a vehicle trajectory prediction network model, wherein the vehicle trajectory prediction network model includes a temporal feature extraction module, a spatial interaction feature extraction module and a decoder;

[0010] The temporal feature extraction module is implemented based on the improved Mamba architecture; the spatial interaction feature extraction module is processed using a hybrid architecture of the Transformer architecture and the graph attention mechanism; the decoder processes the encoded features through a multi-head attention mechanism, taking into account the correlation between different time steps and different vehicles, thereby generating a prediction result of the vehicle trajectory;

[0011] S3. Input the data of the scene to be predicted into the trained vehicle trajectory prediction network model to obtain the prediction result of the vehicle trajectory.

[0012] Further, step S1 is specifically as follows:

[0013] Extract vehicle trajectory information for each scene, each trajectory contains 40 consecutive frames of data;

[0014] The 40-frame continuous sequence of each vehicle is taken as a sample, and then the sample data is passed into the pre-built vehicle trajectory prediction network model for training the vehicle trajectory prediction network model.

[0015] Furthermore, each frame of data records the vehicle's position, speed, orientation, size, acceleration, curvature, and trajectory ID.

[0016] Further, step S2 is specifically as follows:

[0017] S21, inputting the sequence of vehicle trajectories into the time series feature extraction module in the vehicle trajectory prediction network model to extract feature information of each vehicle's historical trajectory;

[0018] S22, inputting the result output by the temporal feature extraction module into the spatial interaction feature extraction module to extract spatial interaction feature information between each vehicle;

[0019] S23. The decoder combines the temporal features and the spatial interaction features to output the prediction result of the vehicle trajectory.

[0020] Further, step S21 is specifically as follows:

[0021] The input data X of t time steps is X = (X1,...,X t ) performs position encoding to introduce temporal position information into the input sequence data. The position encoding PE formula is as follows:

[0022]

[0023]

[0024] Among them, pos represents the position in the sequence (0, 1, 2, ...), i represents the dimension index, and d represents the dimension of the model;

[0025] The position-encoded input sequence data is input into the improved Mamba framework and first normalized by layer normalization to enhance the stability of the model data processing. The data is then input into the linear attention layer and the attention mechanism is used to calculate the correlation strength between different time steps.

[0026] The linear attention layer is based on the calculation of query, key and value. The input sequence data is transformed through three different linear transformations to generate the query matrix Q, key matrix K and value matrix V. The query matrix Q, key matrix K and value matrix V are obtained by linearly projecting the input sequence data. The formula is as follows:

[0027] Q=W q XK=W k XV=W v X

[0028] Among them, W q , W k and W v is a learnable projection matrix, X represents the input sequence data;

[0029] The feature mapping is applied to the query matrix Q, key matrix K, value matrix V and linear attention calculation. The specific formula is as follows:

[0030] φ(x)=exp(-0.5x 2 )

[0031]

[0032]

[0033] Where φ(x) is the Gaussian feature mapping function, d is the dimension of each attention head, ε is a constant for numerical stability, Q′ is the result after Q feature mapping, and K′ is the result after K feature mapping;

[0034] The data is standardized again through layer normalization and sent to the convolutional gating unit for further feature transformation;

[0035] The convolutional gating unit is first transformed by the first fully connected layer and then divided into two parts; the first part is processed by depthwise separable convolution and activation function to capture local features and introduce nonlinearity; the second part is used as a gating signal and multiplied with the processed first part to implement an adaptive feature selection mechanism; this process allows the network to dynamically adjust the importance of different features. The specific formula is as follows:

[0036]

[0037] Among them, X1 is the first part of the input X after passing through the first fully connected layer, X2 is the second part, and X 1k is the kth channel feature of X1, W k is the corresponding convolution kernel weight, represents the convolution operation, ⊙ represents element-by-element multiplication, and K is the number of feature channels;

[0038] The result after the multiplication operation passes through a dropout layer to increase the robustness of the model; then, the data passes through a second fully connected layer for the final feature transformation; then, the dropout layer is applied again to enhance the generalization ability of the model, and the output of the convolutional gated unit is added to the original input through a residual connection to obtain the final output.

[0039] Further, step S22 is specifically as follows:

[0040] Perform position encoding of the features processed by the temporal feature extraction module in S21, input the data into the encoder architecture of the Transformer, and reorganize the input tensor into a two-dimensional matrix form, so that the vehicle state at each spatiotemporal position is regarded as an independent node in the graph;

[0041] Construct a fully connected graph G = (V, E) of vehicles so that each vehicle node can establish an information transmission channel with other vehicles in the scene, thereby capturing the interaction between vehicles, which at least includes following behavior, lane change interaction, and avoidance behavior; where V is a node set, used to represent a single vehicle in a scene; E is an edge set, used to represent the connection between any two vehicle nodes;

[0042] The processed node features and edge indexes are input into the graph attention layer, which contains multiple attention heads to learn vehicle interaction patterns from different perspectives. Learning vehicle interaction patterns from different perspectives includes identifying the impact of the preceding vehicle’s motion state on the vehicle, capturing the lateral motion characteristics of vehicles in adjacent lanes, learning the priority relationship of intersections, and modeling multi-vehicle collaborative avoidance. For the connected node pair (i, j), the attention coefficient is calculated as follows:

[0043]

[0044] Among them, α ij represents the attention coefficient from node i to node j, a T is the transpose of the learnable attention vector, W h is the shared weight matrix, h i 、h j and h k is the node feature, ‖ represents the feature concatenation operation, N i represents the neighbor set of node i, and LeakyReLU is the activation function.

[0045] Furthermore, the trajectory prediction process of the decoder in step S23 is a single-step generation mechanism, specifically:

[0046] Use c learnable seed parameter matrices, each of which corresponds to a possible prediction mode;

[0047] These seed parameter matrices are repeatedly expanded in the dimension of the number of all vehicles in a scene and then fed into the decoder for processing;

[0048] The decoder generates bivariate Gaussian distribution parameters for each time step and each vehicle for sampling specific trajectory points.

[0049] Further, step S3 is specifically as follows:

[0050] Inputting the data of the scene to be predicted into the trained vehicle trajectory prediction network model, learning the time series features of the vehicle's historical trajectory through the time series feature extraction module and learning the spatial interaction features between vehicles through the spatial interaction feature extraction module;

[0051] The decoder generates multiple possible future trajectory prediction results in a single forward propagation based on different seed parameter matrices, each of which contains the position distribution of all vehicles in the scene at future time steps, and finally outputs a multimodal trajectory prediction result that conforms to physical constraints and driving behavior.

[0052] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the aforementioned vehicle trajectory prediction method through the computer program.

[0053] A computer-readable storage medium includes a stored computer program, wherein the computer program executes the aforementioned vehicle trajectory prediction method when running.

[0054] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0055] The present invention provides a vehicle trajectory prediction method, an electronic device and a storage medium. The vehicle trajectory prediction method of the present invention is based on an improved Mamba architecture, which greatly improves the model's ability to process long sequence data while reducing computational complexity. In the process of extracting spatial interaction features, the Transformer encoder and the graph attention mechanism are innovatively integrated, so that the model can simultaneously capture the temporal interaction relationship and spatial topological relationship between vehicles. Combined with high-precision map information, the model can fully understand the constraint effect of the road environment on vehicle behavior and achieve comprehensive perception and understanding of the driving scene. In order to cope with the uncertainty in real traffic scenes, this solution adopts a multimodal prediction strategy, which can generate multiple reasonable future trajectories and their corresponding probability distributions. The entire prediction process adopts an end-to-end design concept, and the model can automatically learn the most discriminative feature representation from the original data. At the same time, by integrating multi-source information such as vehicle trajectory temporal information, vehicle interaction space information and road structure, the prediction results are more in line with actual driving constraints. Compared with the prior art, the solution of the present application has significant advantages in terms of computational efficiency, prediction accuracy and scene adaptability, and can provide a more reliable trajectory prediction service for the automatic driving system, which has important application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 is a flow chart of a vehicle trajectory prediction method provided in one embodiment of the present application;

[0058] Figure 2 A model structure diagram of the vehicle trajectory prediction network model in this application;

[0059] Figure 3This is a schematic diagram of the structure of the improved Mamba architecture in this application;

[0060] Figure 4 Schematic diagram of the structure of the convolutional gating unit in this application. DETAILED DESCRIPTION

[0061] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0062] Embodiment 1:

[0063] like Figure 1 As shown, the present invention provides a technical solution:

[0064] A vehicle trajectory prediction method comprises the following steps:

[0065] S1. Acquire vehicle trajectory data, perform classification processing and feature extraction on the vehicle trajectory data to generate a standardized data set for model training;

[0066] S2. Based on the standardized data set, training a vehicle trajectory prediction network model, wherein the vehicle trajectory prediction network model includes a temporal feature extraction module, a spatial interaction feature extraction module and a decoder;

[0067] The temporal feature extraction module is implemented based on the improved Mamba architecture; the spatial interaction feature extraction module is processed using a hybrid architecture of the Transformer architecture and the graph attention mechanism; the decoder processes the encoded features through a multi-head attention mechanism, fully considering the correlation between different time steps and different vehicles, thereby generating a prediction result of the vehicle trajectory;

[0068] S3. Input the data of the scene to be predicted into the trained vehicle trajectory prediction network model to obtain the prediction result of the vehicle trajectory.

[0069] This embodiment provides a vehicle trajectory prediction method, which is a vehicle trajectory prediction method based on a hybrid architecture of Mamba and Transformer. First, a data set is obtained and the historical trajectories of the vehicles in the data set are preprocessed to obtain standardized data that meets the model input requirements; secondly, a vehicle trajectory prediction network based on a hybrid architecture of Mamba and Transformer is constructed, and the historical trajectory of a single vehicle is extracted using the improved Mamba architecture to capture the dynamic change characteristics of the vehicle, and the architecture based on Transformer and graph attention mechanism is used to effectively model the interaction relationship between vehicles, thereby extracting the spatial interaction characteristics between vehicles; finally, the possible future trajectory information of the vehicle is output through the decoder. By innovatively integrating the Mamba and Transformer architectures, the present invention can not only accurately capture the dynamic characteristics of a single vehicle, but also effectively model the complex interaction relationship between multiple vehicles, effectively improving the robustness of vehicle trajectory prediction in complex traffic scenarios.

[0070] Embodiment 2:

[0071] Based on Example 1, Figure 2-4 , step S1 is specifically as follows:

[0072] Extract vehicle trajectory information for each scene, each trajectory contains 40 consecutive frames of data;

[0073] The 40-frame continuous sequence of each vehicle is taken as a sample, and then the sample data is passed into the pre-built vehicle trajectory prediction network model for training the vehicle trajectory prediction network model.

[0074] Furthermore, each frame of data records the vehicle's position, speed, orientation, size, acceleration, curvature, and trajectory ID.

[0075] Further, step S2 is specifically as follows:

[0076] S21, inputting the sequence of vehicle trajectories into the time series feature extraction module in the vehicle trajectory prediction network model to extract feature information of each vehicle's historical trajectory;

[0077] S22, inputting the result output by the temporal feature extraction module into the spatial interaction feature extraction module to extract spatial interaction feature information between each vehicle;

[0078] S23: Output the prediction result of the vehicle trajectory through the Transformer decoder.

[0079] Further, step S21 is specifically as follows:

[0080] The input data X of t time steps is X = (X1,...,Xt ) performs position encoding to introduce temporal position information into the input sequence data. The position encoding PE formula is as follows:

[0081]

[0082]

[0083] Among them, pos represents the position in the sequence (0, 1, 2, ...), i represents the dimension index, and d represents the dimension of the model;

[0084] The data is input into the improved Mamba framework and first standardized through layer normalization to enhance the stability of the model data processing; the data is then input into the linear attention layer, and the attention mechanism is used to calculate the correlation strength between different time steps; this design can not only capture the long-range temporal dependencies and long-term motion patterns of the vehicle, but also identify typical behavior patterns such as acceleration, deceleration, and steering, while adaptively fusing multi-dimensional features such as position, speed, and acceleration; by reducing the computational complexity of the linear attention structure, the model can efficiently process long-sequence trajectory data, learn the interaction pattern between the vehicle and the surrounding environment, and ultimately generate richer trajectory representations, providing effective feature representations for subsequent trajectory predictions;

[0085] The linear attention layer is based on the calculation of query, key and value. The input sequence data is transformed through three different linear transformations to generate the query matrix Q, key matrix K and value matrix V. The query matrix Q, key matrix K and value matrix V are obtained by linearly projecting the input sequence data. The formula is as follows:

[0086] Q=W q XK=W k XV=W v X

[0087] Among them, W q , W k and W v is a learnable projection matrix, X represents the input sequence data;

[0088] The feature mapping is applied to the query matrix Q, key matrix K, value matrix V and linear attention calculation. The specific formula is as follows:

[0089] φ(x)=exp(-0.5x 2 )

[0090]

[0091]

[0092] Where φ(x) is the Gaussian feature mapping function, d is the dimension of each attention head, ε is a small constant for numerical stability, Q′ is the result after Q feature mapping, and K′ is the result after K feature mapping;

[0093] Then it is normalized again through layer normalization and sent to the convolutional gating unit for further feature transformation;

[0094] The convolutional gating unit is first transformed through the first fully connected layer and then divided into two parts; the first part is processed by depthwise separable convolution and activation function to capture local features and introduce nonlinearity; the second part is used as a gating signal and multiplied with the processed first part to implement an adaptive feature selection mechanism; this process allows the network to dynamically adjust the importance of different features, the specific formula is as follows:

[0095]

[0096] Among them, X1 is the first part of the input X after passing through the first fully connected layer, X2 is the second part, and X 1k is the kth channel feature of X1, W k is the corresponding convolution kernel weight, represents the convolution operation, ⊙ represents element-by-element multiplication, and K is the number of feature channels;

[0097] The result after the multiplication operation passes through a dropout layer to increase the robustness of the model; then, the data passes through a second fully connected layer for the final feature transformation; then, dropout is applied again to get the final output;

[0098] Finally, a residual connection is used to add the output of the convolutional gated unit to the original input to obtain the final output.

[0099] Further, step S22 is specifically as follows:

[0100] The features processed by the temporal feature extraction module are position-encoded in S21, the data is input into the encoder architecture of the Transformer, and the input tensor is reorganized into a two-dimensional matrix form, so that the vehicle state at each spatiotemporal position is regarded as an independent node in the graph; a vehicle fully connected graph G = (V, E) is constructed so that each vehicle node can establish an information transmission channel with other vehicles in the scene, thereby capturing the interaction between vehicles, and the interaction behavior at least includes following behavior, lane change interaction, and avoidance behavior; wherein V is a node set, which is used to represent a single vehicle in a scene; E is an edge set, which is used to represent the connection between any two vehicle nodes;

[0101] That is to say, the spatial interaction feature extraction module models the interaction relationship between vehicles by combining the Transformer architecture and the graph attention mechanism. In specific implementation, the position encoding information is first added to the features output by the temporal feature extraction module, and then the feature is input into the Transformer encoder for processing. During the processing, the input data is reorganized into a two-dimensional matrix form, and the vehicle state information at each spatiotemporal position is represented as a node in the graph. Then, a fully connected graph G = (V, E) is constructed, so that each vehicle node in the graph is connected to other vehicle nodes, thereby establishing an information transmission channel. The design of this graph structure enables the model to learn and capture a variety of interaction behaviors between vehicles, including typical scenarios such as following a vehicle, changing lanes, and avoiding. In this graph, the node set V corresponds to each vehicle in the scene, and the edge set E represents the connection relationship between vehicles.

[0102] Subsequently, the processed node features and edge indexes are input into the graph attention layer, and the attention mechanism is used to dynamically calculate the weight coefficients of different interaction relationships, so that the model can automatically adjust the importance of various interaction information according to the actual scenario; this layer contains multiple attention heads, which learn vehicle interaction patterns from different perspectives: including identifying the impact of the front vehicle's motion state on the vehicle, capturing the lateral motion characteristics of vehicles in adjacent lanes, learning the priority relationship of intersections, and modeling complex interaction behaviors such as multi-vehicle collaborative avoidance; for the connected node pair (i, j), the attention coefficient calculation formula is:

[0103]

[0104] Among them, α ij represents the attention coefficient from node i to node j, a T is the transpose of the learnable attention vector, W h is the shared weight matrix, h i 、h j and h k is the node feature, ‖ represents the feature concatenation operation, N i represents the neighbor set of node i, and LeakyReLU is the activation function.

[0105] In the Transformer encoder, the original motion information of the vehicle is maintained through residual connections and layer normalization, and high-order interaction features are further extracted through a feedforward network consisting of two layers of linear transformation and ReLU activation function. Multiple Dropout mechanisms are used for regularization to improve the generalization ability of the model. This architecture explicitly models the spatial relationship between vehicles through a graph structure, and combines the attention mechanism to adaptively adjust the importance of different interaction relationships. It can effectively capture the close-following relationship and long-range influence transmission between vehicles. At the same time, it has a strong modeling ability for multi-vehicle avoidance modes and group collaborative behaviors such as convoy formations in complex scenarios such as intersections, and ultimately provides a rich representation of spatial interaction features for trajectory prediction tasks.

[0106] Specifically, after processing the output of the attention mechanism, the model standardizes the features through layer normalization technology. This step can effectively maintain the original motion information of the vehicle and avoid the gradient vanishing problem during deep network training. Subsequently, a feedforward neural network consisting of two layers of linear transformation layers and ReLU activation functions is used to further transform and extract the features. Among them, the first layer of linear transformation maps the features to a higher-dimensional space to enhance the expression ability. The ReLU activation function introduces nonlinear transformations to improve the model's ability to model complex vehicle interaction patterns. The second layer of linear transformation maps the features back to the original dimension. In this process, the Dropout mechanism is introduced between key layers for random inactivation. By randomly discarding some neurons during training, the model is prevented from overfitting and its generalization performance in unseen scenarios is improved.

[0107] Furthermore, the trajectory prediction process of the decoder in step S23 is an efficient single-step generation mechanism, that is, the decoder adopts an innovative single-step generation mechanism, specifically: first, c learnable seed parameter matrices are constructed, each matrix corresponds to a possible motion mode. These seed matrices are then expanded and replicated in the dimensions of all vehicles in the scene to meet the needs of multimodal prediction. The expanded matrices are input into the decoder for processing, and the decoder generates corresponding binary Gaussian distribution parameters for each vehicle in the scene at each prediction time step. These parameters describe the possible position distribution of the vehicle, and specific trajectory points can be obtained by sampling these distributions. The specific formula is as follows:

[0108]

[0109] Among them, μ x and μ y is the mean vector, indicating the center of the distribution, σ x is the standard deviation in the x direction, σ y is the standard deviation in the y direction, is the correlation coefficient, ranging from [-1,1], and ρ represents the correlation between x and y.

[0110] This design not only avoids the efficiency issues of traditional autoregressive methods, but also generates diverse trajectory predictions that comply with physical and social constraints through different seed parameters, fully demonstrating the superiority of the model in handling multimodal trajectory prediction tasks.

[0111] Further, step S3 is specifically as follows:

[0112] Inputting the data of the scene to be predicted (including the characteristic information of the historical trajectory position, speed, etc. of the vehicle and the road network information of the scene) into the trained vehicle trajectory prediction network model, learning the temporal features of the historical trajectory of the vehicle through the temporal feature extraction module and learning the spatial interaction features between vehicles through the spatial interaction feature extraction module;

[0113] Finally, the decoder generates multiple possible future trajectory prediction results in a single forward propagation based on different seed parameter matrices, each of which contains the position distribution of all vehicles in the scene in the future time step. These prediction results not only ensure the continuity of the trajectory in time, but also ensure the reasonable interaction between different vehicle trajectories, and ultimately output multimodal trajectory prediction results that conform to physical constraints and driving behavior.

[0114] Embodiment 3:

[0115] The present invention provides a technical solution:

[0116] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the aforementioned vehicle trajectory prediction method through the computer program.

[0117] In this embodiment, the computer system suitable for implementing the electronic device of the embodiment of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM), such as executing the method described in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other through a bus. Input / output (I / O) interface is also connected to the bus.

[0118] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the storage part as needed.

[0119] Embodiment 4:

[0120] The present invention provides a technical solution:

[0121] A computer-readable storage medium includes a stored computer program, wherein the computer program executes the aforementioned vehicle trajectory prediction method when it is run. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0122] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0125] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.

[0126] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various application aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present application should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the corresponding claims, the application point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0127] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

[0128] It should be noted that the above embodiments illustrate rather than limit the present application, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be construed as a limitation to the claims. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

Claims

1. A vehicle trajectory prediction method, characterized in that: The following steps are involved: S1. Acquire vehicle trajectory data, perform classification processing and feature extraction on the vehicle trajectory data to generate a standardized data set for model training; S2. Based on the standardized data set, training a vehicle trajectory prediction network model, wherein the vehicle trajectory prediction network model includes a temporal feature extraction module, a spatial interaction feature extraction module and a decoder; The temporal feature extraction module is implemented based on the improved Mamba architecture; the spatial interaction feature extraction module is processed using a hybrid architecture of the Transformer architecture and the graph attention mechanism; the decoder processes the encoded features through a multi-head attention mechanism, taking into account the correlation between different time steps and different vehicles, thereby generating a prediction result of the vehicle trajectory; S3. Input the data of the scene to be predicted into the trained vehicle trajectory prediction network model to obtain the prediction result of the vehicle trajectory.

2. The vehicle trajectory prediction method according to claim 1, characterized in that: Step S1 is specifically as follows: Extract vehicle trajectory information for each scene, each trajectory contains 40 consecutive frames of data; The 40-frame continuous sequence of each vehicle is taken as a sample, and then the sample data is passed into the pre-built vehicle trajectory prediction network model for training the vehicle trajectory prediction network model.

3. The vehicle trajectory prediction method according to claim 2, characterized in that: Each frame of data records the vehicle's position, speed, orientation, size, acceleration, curvature, and trajectory ID.

4. The vehicle trajectory prediction method according to claim 2, characterized in that: Step S2 is specifically as follows: S21, inputting the sequence of vehicle trajectories into the time series feature extraction module in the vehicle trajectory prediction network model to extract feature information of each vehicle's historical trajectory; S22, inputting the result output by the temporal feature extraction module into the spatial interaction feature extraction module to extract spatial interaction feature information between each vehicle; S23. The decoder combines the temporal features and the spatial interaction features to output the prediction result of the vehicle trajectory.

5. The vehicle trajectory prediction method according to claim 4, characterized in that: Step S21 is specifically as follows: The input data X of t time steps is X = (X1,...,X t ) performs position encoding to introduce temporal position information into the input sequence data. The position encoding PE formula is as follows: Among them, pos represents the position in the sequence (0,1,2,...), i represents the dimension index, d Represents the dimensions of the model; The position-encoded input sequence data is input into the improved Mamba framework and first normalized by layer normalization to enhance the stability of the model data processing. The data is then input into the linear attention layer and the attention mechanism is used to calculate the correlation strength between different time steps. The linear attention layer is based on the calculation of query, key and value. The input sequence data is transformed through three different linear transformations to generate the query matrix Q, key matrix K and value matrix V. The query matrix Q, key matrix K and value matrix V are obtained by linearly projecting the input sequence data. The formula is as follows: Q=W q XK=W k X V=W v X Among them, W q , W k and W v is a learnable projection matrix, X represents the input sequence data; The feature mapping is applied to the query matrix Q, key matrix K, value matrix V and linear attention calculation. The specific formula is as follows: φ(x)=exp(-0.5x 2 ) Where φ(x) is the Gaussian feature mapping function, d is the dimension of each attention head, ε is a constant for numerical stability, Q′ is the result after Q feature mapping, and K′ is the result after K feature mapping; The data is standardized again through layer normalization and sent to the convolutional gating unit for further feature transformation; The convolutional gating unit is first transformed by the first fully connected layer and then divided into two parts; the first part is processed by depthwise separable convolution and activation function to capture local features and introduce nonlinearity; the second part is used as a gating signal and multiplied with the processed first part to implement an adaptive feature selection mechanism; this process allows the network to dynamically adjust the importance of different features. The specific formula is as follows: Among them, X1 is the first part of the input X after passing through the first fully connected layer, X2 is the second part, and X 1k is the kth channel feature of X1, W k is the corresponding convolution kernel weight, represents the convolution operation, ⊙ represents element-by-element multiplication, and K is the number of feature channels; The result after the multiplication operation passes through a dropout layer to increase the robustness of the model; then, the data passes through a second fully connected layer for the final feature transformation; then, the dropout layer is applied again to enhance the generalization ability of the model, and the output of the convolutional gated unit is added to the original input through a residual connection to obtain the final output.

6. The vehicle trajectory prediction method according to claim 5, characterized in that: Step S22 is specifically as follows: Perform position encoding of the features processed by the temporal feature extraction module in S21, input the data into the encoder architecture of the Transformer, and reorganize the input tensor into a two-dimensional matrix form, so that the vehicle state at each spatiotemporal position is regarded as an independent node in the graph; Construct a fully connected graph G = (V, E) of vehicles so that each vehicle node can establish an information transmission channel with other vehicles in the scene, thereby capturing the interaction between vehicles, which at least includes following behavior, lane change interaction, and avoidance behavior; where V is a node set, used to represent a single vehicle in a scene; E is an edge set, used to represent the connection between any two vehicle nodes; The processed node features and edge indexes are input into the graph attention layer, which contains multiple attention heads to learn vehicle interaction patterns from different perspectives. Learning vehicle interaction patterns from different perspectives includes identifying the impact of the preceding vehicle’s motion state on the vehicle, capturing the lateral motion characteristics of vehicles in adjacent lanes, learning the priority relationship of intersections, and modeling multi-vehicle collaborative avoidance. For the connected node pair (i, j), the attention coefficient is calculated as follows: Among them, α ij represents the attention coefficient from node i to node j, a T is the transpose of the learnable attention vector, W h is the shared weight matrix, h i 、h j and h k is the node feature, ‖ represents the feature concatenation operation, N i represents the neighbor set of node i, and LeakyReLU is the activation function.

7. The vehicle trajectory prediction method according to claim 4, characterized in that: The trajectory prediction process of the decoder in step S23 is a single-step generation mechanism, specifically: Use c learnable seed parameter matrices, each of which corresponds to a possible prediction mode; These seed parameter matrices are repeatedly expanded in the dimension of the number of all vehicles in a scene and then fed into the decoder for processing; The decoder generates bivariate Gaussian distribution parameters for each time step and each vehicle for sampling specific trajectory points.

8. The vehicle trajectory prediction method according to claim 7, characterized in that: Step S3 is specifically as follows: Inputting the data of the scene to be predicted into the trained vehicle trajectory prediction network model, learning the time series features of the vehicle's historical trajectory through the time series feature extraction module and learning the spatial interaction features between vehicles through the spatial interaction feature extraction module; The decoder generates multiple possible future trajectory prediction results in a single forward propagation based on different seed parameter matrices, each of which contains the position distribution of all vehicles in the scene at future time steps, and finally outputs a multimodal trajectory prediction result that conforms to physical constraints and driving behavior.

9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the vehicle trajectory prediction method according to any one of claims 1 to 8 through the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the vehicle trajectory prediction method according to any one of claims 1 to 8 is executed when the computer program is run.

Citation Information

Cited By

  • Robot action prediction method and device, equipment and storage medium

    CN120002675A

  • Robot Motion Prediction Method, Apparatus, Device, and Storage Medium

    CN120002675B

  • Cross-wind-field adaptive wind power prediction method

    CN120579672A

  • Track detection method and device based on edge perception and risk prediction, and medium

    CN120808436A

  • Pedestrian trajectory prediction method based on dual Mama architecture and related equipment

    CN120852466A