Interactive vehicle trajectory prediction and driving intention recognition method based on multi-task learning
Through the CTG-MTLN model of multitask learning, combined with the multi-head self-attention and cross-attention mechanism, the problems of error accumulation and high computing resource consumption in interactive vehicle trajectory prediction and driving intention recognition are solved, and more accurate and efficient prediction is achieved and recognition effect.
Patent Information
- Application Number
- CN202411420373.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In the prior art, there is an error accumulation problem in the autoregressive model in the prediction of trajectory of interactive vehicles and driving intention recognition, and the modular design method requires a lot of computing resources, resulting in low accuracy and efficiency of prediction and recognition, especially in high density. Outstanding performance in traffic flow.
Using the CTG-MTLN model based on multi-task learning, the Convolutional Transformer Gated-recurrent-unit Multi-task Transfer Learning Network is designed to perform interactive vehicle trajectories through the combined architecture of the embedding layer, extended embedding layer, encoder layer and decoder layer. Forecasting and driving intention recognition, multi-head self-attention and cross-attention mechanisms extract the interaction characteristics and long-term dependencies between vehicles, and shared models perform robust spatial feature extraction.
Improve the accuracy and efficiency of interactive vehicle trajectory prediction and driving intention recognition, and can share the model to extract long-term dependencies in time series data and interactive features between agents in the lane environment to achieve more accurate and efficient multi-task goals Finish.
Smart Images

Figure CN119293450A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to an interactive vehicle trajectory prediction and driving intention recognition method based on multi-task learning. Background Art
[0002] With the rapid growth of the number of cars and the increasing number of complex traffic scenes, accurate prediction of interactive vehicle trajectories and recognition of driving intentions will help improve the quality of early warning and intervention decisions, thereby effectively avoiding collision accidents. In addition, interactive vehicle trajectory prediction and driving intention recognition methods can also be applied to autonomous driving technology to achieve human-like vehicle trajectory planning. However, the complex behavior of vehicles, the limitations of structured roads, and social interactions between agents all pose challenges to vehicle trajectory prediction and driving intention recognition. At the same time, in complex traffic scenes, incomplete observations and object occlusions will cause sensors to generate high noise, which affects the accuracy of interactive vehicle trajectory prediction and driving intention recognition. Since recurrent neural networks (RNNs) and their variants can effectively capture temporal correlations, they are widely used in interactive vehicle trajectory prediction and driving intention recognition. However, the dimensionality reduction process of this method usually transfers perceptual features from encoders to cells, which not only leads to the loss of key perceptual information, but may even lead to suboptimal predictions. This problem is particularly prominent in interactive vehicle trajectory prediction and driving intention recognition under high-density traffic flow conditions. In addition, traditional interactive vehicle trajectory prediction and driving intention recognition usually adopt a modular design, which requires a lot of computing resources to realize the corresponding interactive vehicle trajectory prediction and driving intention recognition functions by constructing an interactive vehicle trajectory prediction module and a driving intention recognition module respectively. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide an interactive vehicle trajectory prediction and driving intention recognition method based on multi-task learning, so as to solve the problem that the autoregressive model used in interactive vehicle trajectory prediction and driving intention recognition has inherent error accumulation, and the interactive vehicle trajectory prediction and driving intention recognition function based on modular design requires a large amount of computing resources.
[0004] To achieve the above object, the present invention adopts the following technical solution: a method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning, comprising the following steps:
[0005] Step 1: Process the interactive vehicle trajectory prediction and driving intention recognition dataset data;
[0006] Step 2: Determine the problem definition of trajectory prediction;
[0007] Step 3: Use the multi-task learning method to design the CTG-MTLN (Convolutional Transformer Gated-recurrent-unit Multi-task Transfer Learning Network) model for interactive vehicle trajectory prediction and driving intention recognition.
[0008] In a preferred embodiment, the step 1 specifically includes: first, loading data based on the target vehicle ID and classifying the trajectory data according to the lane change operation type; then, searching for the surrounding traffic agent ID and matching it with the corresponding trajectory; after processing, obtaining the position, speed, acceleration and vehicle type parameter information relative to the target vehicle; calculating the safety factor and lane environment information of the target vehicle;
[0009] In addition, after processing the trajectory data of all agents, n+m seconds of historical trajectory data are extracted, where n seconds are used for understanding and m seconds are used for prediction; the model training is divided into two stages: the first stage focuses on trajectory prediction, and the entire dataset is shuffled, using a fixed random seed regardless of the data type; the second stage focuses on driving intention recognition, keeping the fixed order of the interacting vehicle trajectories and the lane keeping data in the driving intention dataset; finally, the data of the two stages are divided into training set, validation set and test set.
[0010] In a preferred embodiment, the step 2 specifically includes: interactive vehicle trajectory prediction and driving intention recognition refer to estimating the future motion state of the interactive vehicle and the future operation intention of the target vehicle driver respectively; interactive vehicle trajectory prediction and driving intention data include attributes describing each observed traffic subject, safety risk indicators and road structure information;
[0011] Select the preprocessed observable feature matrix as input V = [v1, v2, ...v t ,…v T ]; At the same time, a predictor is designed to output the future interactive vehicle trajectory and driving intention Where t = {1, 2, ..., T} is a timestamp; l = {1, 2, ..., L} is a timestamp for future predictions, and L represents the output / prediction range;
[0012] Interactive vehicle trajectory prediction and driving intention recognition parameter matrix v t =(x target , x Other , x RI , x RR , x label} consists of five parameter matrices, including the target vehicle feature set x target , surrounding traffic participant feature set x Other, the risk indicator feature set x of the target vehicle RI , the spatial relationship feature set x between vehicles and roads RR and driving intention label feature set x label ;x target and x Other All include kinematic parameters such as vehicle type, position, velocity and acceleration; x target Additional kinematic parameters specific to the target vehicle are included, such as yaw rate, acceleration rate, and heading angle; surrounding traffic participants are represented by x Other ={x p , x rp , x lp , x ra , x la , x f , x rf , x lf} means that x p represents the traffic participant ahead, x rp Indicates the traffic participant on the right ahead, x lp represents the traffic participant on the left ahead, x ra represents the adjacent traffic participant on the right, x la represents the adjacent traffic participant on the left, x f represents the rear traffic participant, x rf represents the rear right traffic participant, x lf Indicates traffic participants on the left behind;
[0013] Target vehicle feature set x RI Contains risk indicators related to the vehicles ahead and behind, and the road feature set x RR It includes the target vehicle's relative lane position, lane type, lane number, lane width, and vehicle size information.
[0014] In a preferred embodiment, the attributes of the traffic subject include a 2D bounding box, a 2D position, a speed, and an acceleration; the safety risk indicators include collision time TTC and headway THW; and the road structure information includes the number of lanes and the current lane position.
[0015] In a preferred embodiment, the CTG-MTLN model has a four-layer architecture, including an embedding layer, an extended embedding layer, an encoder layer and a decoder layer; the embedding layer maps the sequence data to a high-dimensional space so that the encoder layer can better extract features; the extended embedding layer expands the trajectory data within a time length of L and maps it to a high-dimensional space to enhance the feature extraction capability of the model; the encoder layer is responsible for analyzing the interactions between vehicles and converting the extracted features into hidden states as a summary and understanding of the trajectory of traffic entities; the decoder layer extracts these understandings from the sequence input and generates future trajectories in combination with driving intentions.
[0016] In a preferred embodiment, the embedding layer converts the observed trajectory sequence V = [v1, v2, ...v t ,…v T ] is mapped to a high-dimensional space to generate an output sequence O of hidden features em ={h1, h2, ... h t ,…h T}, where each h t Yes model Hidden feature vector of dimension; output sequence O em Calculate layer by layer from top to bottom:
[0017] O em =E token +E spat +E pos (1)
[0018] As shown in formula (1), the embedding layer consists of the label embedding E token , spatial embedding E spat , position embedding E pos The composition is described as follows:
[0019] E token =Conv1d(V Tra ) (2)
[0020] E spat =W spat2 ·(W spat1 ·X RR +b spat1 )+b spat2 (3)
[0021]
[0022] Among them, W spat1 and W spat2 are the trainable weights of the linear layer;
[0023] Formulas (2) and (3) show that the former uses a one-dimensional convolutional layer, while the latter uses two linear transformation layers; both convert V Tra and X RR Mapped to a high-dimensional representation for subsequent processing or feature extraction; Formula (4) describes the relative position encoding function of the model, where pos represents the position, d model Represents the dimension of the hidden layer, i represents the dimension; the position information of each dimension corresponds to a sine function.
[0024] In a preferred embodiment, the extended embedding layer calculates E token and E spat Before encoding the vector, the observation trajectory sequence V and the spatial feature representation X RR Perform temporal expansion to generate the expanded observation trajectory sequence V′ and the expanded spatial feature representation X′ RR , their time length is T+L, then, the characteristics of the extended embedding layer that are different from the embedding layer are as follows:
[0025] z t =σ(W z ·[h t-1 , v t ]) (5)
[0026] r t =σ(W r ·[h t-1 , v t ]) (6)
[0027]
[0028]
[0029] The above formulas (5) to (8) describe the basic structure of the gated recurrent unit GRU, where h t-1 represents the hidden state at time step t-1, represents the candidate hidden state at time step t, z t is the update gate, used to control the activation update, r t is the reset gate, which is used to decide whether to discard h when calculating candidate activations. t-1 ; W z , W r ,and are the trainable weights of the functions σ(·) and tanh(·);
[0030] The following formulas (9) to (11) describe how the bidirectional structure of BiGRU can obtain a more comprehensive understanding of the context information of the sequence data and predict the hidden layer output yt at time step T+1 based on the previous data of time length T;
[0031]
[0032]
[0033]
[0034] Among them, b y is the bias term; the hidden state h t The arrows → or ← above the function GRU(·) represent the forward or backward calculation process respectively; the hidden layer output y of BiGRU t Mapped to v′ through a linear layer t+1 , as follows:
[0035]
[0036] An additional gelu activation layer is introduced; in which, and are the weights and bias terms of the linear layer respectively; based on the composite structure described in formulas (9) to (12), the observed trajectory sequence V and the spatial feature representation X RR is extended to a time length of T+L in an autoregressive manner; the observation trajectory sequence V′ of time length T+L and the extended spatial feature representation X′ RR Convert to a high-dimensional output sequence O′ em ={h′1, h′2, … h′ t , …h′ T+L}, its expression is as follows:
[0037] O′ em =E′ token +E′ spat +E′ pos (13)
[0038] E token =Conv1d(V′) (14)
[0039] E′ spat =W′ spat2 ·(W′ spat1 ·X′ RR +b′ spat1 )+b′ spat2 (15)
[0040]
[0041] Among them, W′ spat1 , W′ spat2 , b′ spat1 , b′ spat2are the trainable weights and bias terms of the linear layer.
[0042] In a preferred embodiment, the encoder layer processes the hidden feature matrix O em ={h1, h2, ... h t ,…h T}, encoder output matrix O en ={O1, O2, ...O t , …O T}, which encapsulates the interaction between different agents in the observable input sequence and the potential features in the long-term dependency; the output sequence O en It is calculated from top to bottom layer by layer; the Multi-Head Attention module is described as:
[0043]
[0044] Among them, the query matrix Q, key matrix K and value matrix V all come from the linear transformation of the input matrix; the constant h represents the number of attention heads in the block; the multi-head self-attention mechanism and feedforward Feed Forword network are as follows:
[0045] H1=lnorm(O em +Attention(O em , O em , O em )) (18)
[0046] H2=lnorm(relu(H1W1)W′1+H1) (19)
[0047] H3=lnorm(H2+Attention(H2, H2, H2)) (20)
[0048] H4=lnorm(relu(H3W2)W′2+H3) (21)
[0049] Where W1, W′1, W2, W′2 are trainable weights of lnorm(·) and relu(·) functions; each sublayer contains a residual connection followed by layer normalization; residual connections act as direct skip connections; layer normalization is used to normalize the outputs of all neurons in the layer; the relu activation function in formula (19) introduces nonlinearity; the following formula (22) describes the hidden features obtained by the multi-head attention mechanism through convolution, elu activation, maximum pooling and layer normalization to extract and enhance relevant features:
[0050] O en =lnorm(MaxPool1d(elu(Conv1d(H4)))) (22).
[0051] In a preferred embodiment, the decoder processes the extended output sequence V′={v′1, v′2, …, v′ t ,…,v′ T+L} and the encoder output sequence O en ={O1, O2, ...O t , …O T}, to generate future trajectory sequences and the driver's operating intention The proposed decoder generates a complete output sequence by performing a top-down computation; the decoder input sequence V′ = {v′1, v′2, …, v′ t ,…,v′ T+L} is generated in an autoregressive manner, as described in formulas (9) to (12), to form an initial predicted interactive vehicle trajectory sequence; the top-down calculation process is as follows:
[0052] H5=lnorm(O′ em +Attention(O′ em , O′ em , O′ em )) (twenty three)
[0053] H6=lnorm(relu(H5W3)W′3+H5) (24)
[0054] H7=lnorm(H6+Attention(H6,O en , O en )) (25)
[0055] H8=lnorm(relu(H7W4)W′4+H7) (26)
[0056]
[0057] H9=lnorm(H8)(28)
[0058] H 10 =W′6relu((W6dropout(H9)+b6)+H9)+b′6 (29)
[0059] H 11 = dropout(H 10 ) (30)
[0060]
[0061] Where W3, W′3, W4, W′4, W5, W6, W′6, W7, W′7 are the trainable weights of the fully connected layer and the linear connection layer; b5, b6, b′6, b7, b′7 are the trainable biases of the fully connected layer and the linear connection layer; dropout(·) is the regularization function;
[0062] The above formulas (23) and (24) describe the multi-head self-attention layer in the decoder, which is the same as formulas (18) and (19) in the encoder; formulas (25) and (26) describe the multi-head cross-attention layer, where the key and value vectors come from the encoder output O en The query vector is obtained from O′ through a multi-head self-attention mechanism. em The linear mapping of hidden features further extracted in ; the cross attention layer plays a key role in establishing the similarity features between the initial predicted interactive vehicle trajectory V′ and the historical interactive vehicle trajectory V; Formula (27) describes the network prediction of interactive vehicle trajectory This is the result obtained by outputting the linear connection layer; Formulas (28) and (29) describe how the cross attention mechanism extracts and enhances the hidden features of driving intention related features through dropout, relu activation, linear connection layer, residual connection and layer normalization; Finally, Formulas (30) and (31) describe how to output the hidden features through the feature classification layer to form a driving intention sequence; The last layer outputs the driving intention sequence through the linear connection layer
[0063] Compared with the prior art, the present invention has the following beneficial effects: a method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning, robust spatial feature extraction in a lane environment, and a transfer learning framework, which enables a shared model to extract long-term dependencies in time series data and interactive features between agents. This method enables the CTG-MTLN model to simultaneously complete the multi-task goals of interactive vehicle trajectory prediction and driving intention recognition, making it more accurate and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A flowchart of a method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning is provided for a preferred embodiment of the present invention.
[0065] Figure 2 A schematic diagram of the structure of a CTG-MTLN model for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided in a preferred embodiment of the present invention.
[0066] Figure 3A schematic diagram of the model embedding layer structure in a CTG-MTLN model for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided in a preferred embodiment of the present invention.
[0067] Figure 4 A schematic diagram of the model extension embedding layer structure in a CTG-MTLN model for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided in a preferred embodiment of the present invention.
[0068] Figure 5 A schematic diagram of the model encoding layer structure in a CTG-MTLN model for implementing interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided in a preferred embodiment of the present invention.
[0069] Figure 6 A schematic diagram of the model decoding layer structure in a CTG-MTLN model for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0070] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0071] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0072] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0073] In order to more clearly demonstrate the purpose, technical solutions and advantages of one or more embodiments in this specification, the technical solutions of one or more embodiments of this specification will be described in detail and completely in combination with specific embodiments and related drawings. Obviously, the embodiments are only part of this specification, not all embodiments. Based on the embodiments in this specification, other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of one or more embodiments of this specification.
[0074] In conjunction with the accompanying drawings, the technical solutions provided by the embodiments of this specification will be described in detail below.
[0075] In the prior art, the autoregressive model used in interactive vehicle trajectory prediction and driving intention recognition has an inherent error accumulation problem, and the implementation of interactive vehicle trajectory prediction and driving intention recognition functions based on modular design requires a large amount of computing resources, resulting in low accuracy and computational efficiency of the prediction and recognition results.
[0076] In view of the deficiencies in the prior art, the following embodiments are proposed:
[0077] A method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning, combined with the Figure 1-6 Provide specific instructions.
[0078] Figure 1 The flowchart of a method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning provided by this embodiment is shown. From a software perspective, the execution subject of the process can be a program or application client deployed on an application server. From a hardware perspective, the execution subject of the process can be a cloud control platform, etc. This embodiment does not specifically limit this.
[0079] like Figure 1 As shown, the process may include the following steps:
[0080] Step 1: Process the interactive vehicle trajectory prediction and driving intention recognition dataset data.
[0081] First, data is loaded based on the target vehicle ID and trajectory data is classified according to the lane change maneuver type. Subsequently, the surrounding traffic agent IDs are searched and matched with the corresponding trajectory. After processing, various parameters such as position, speed, acceleration, and vehicle type relative to the target vehicle are obtained. Safety factors and lane environment information of the target vehicle are calculated based on the available data.
[0082] In addition, after processing the trajectory data of all agents, n+m seconds of historical trajectory data are extracted (where n seconds are used for understanding and m seconds are used for prediction). Model training is divided into two stages. The first stage focuses on trajectory prediction, and the entire dataset is shuffled, using a fixed random seed regardless of the data type. The second stage focuses on driving intention recognition, keeping a fixed order between the trajectories of interacting vehicles and the lane keeping data in the driving intention dataset. To address the class imbalance problem, these data are sampled at a certain sampling rate, while the left and right lane change data remain unchanged. Finally, the data from the two stages are divided into training set, validation set, and test set according to a certain ratio.
[0083] Step 2: Determine the problem definition of trajectory prediction.
[0084] Interactive vehicle trajectory prediction and driving intention recognition refer to estimating the future motion state of the interactive vehicle and the future operation intention of the target vehicle driver, respectively, which depends on their previously observed trajectories. The interactive vehicle trajectory prediction and driving intention data not only contain various attributes describing each observed traffic subject (such as 2D bounding box, 2D position, speed, acceleration, etc.), but also include safety risk indicators (such as time to collision (TTC), time headway (THW), etc.) and road structure information (such as the number of lanes, current lane position, etc.).
[0085] In order to simultaneously solve the two tasks of interactive vehicle trajectory prediction in regression problem and driving intention recognition in classification task, the preprocessed observable feature matrix is selected as input V = [v1, v2, ...v t ,…v T ]. At the same time, a predictor is designed to output the future interactive vehicle trajectory and driving intention Where t = {1, 2, ..., T} is a timestamp; l = {1, 2, ..., L} is a timestamp for future predictions, and L represents the output / prediction range.
[0086] Interactive vehicle trajectory prediction and driving intention recognition parameter matrix v t ={x target , x Other , x RI , x RR , x label} consists of five parameter matrices, including the target vehicle feature set x target , surrounding traffic participant feature set x Other , the risk indicator feature set x of the target vehicle RI , the spatial relationship feature set x between vehicles and roads RR and driving intention label feature set x label .x target and x Other Both include kinematic parameters such as vehicle type, position, velocity, and acceleration. The difference is that x target Additional kinematic parameters specific to the target vehicle are also included, such as yaw rate, acceleration rate, and heading angle. target The surrounding traffic participants are represented by x Other ={x p , x rp , x lp , x ra , x la , x f , x rf , x lf} means that x p represents the traffic participant ahead, xrp Indicates the traffic participant on the right ahead, x lp represents the traffic participant on the left ahead, x ra represents the adjacent traffic participant on the right, x la represents the adjacent traffic participant on the left, x f represents the rear traffic participant, x rf represents the rear right traffic participant, x lf Indicates traffic participants behind you on the left.
[0087] In addition, the target vehicle feature set x RI Contains risk indicators related to the vehicles ahead and behind, such as time to collision (TTC) and time headway (THW). Road feature set x RR It includes information such as the relative lane position of the target vehicle, lane type, number of lanes, lane width, and vehicle size.
[0088] Step 3: Design the CTG-MTLN model using a multi-task learning approach.
[0089] like Figure 2 As shown in the figure, the designed CTG-MTLN model has a four-layer architecture, including an embedding layer, an extended embedding layer, an encoder layer, and a decoder layer. In this architecture, the embedding layer maps the sequence data to a high-dimensional space so that the encoder layer can better extract features. The extended embedding layer expands the trajectory data within a time length of L and maps it to a high-dimensional space to enhance the feature extraction ability of the model. The encoder layer is responsible for analyzing the interactions between vehicles and converting the extracted features into hidden states as a summary and understanding of the trajectory of the traffic subject. The decoder layer extracts these understandings from the sequence input and generates future trajectories in combination with driving intentions. The specific details about the embedding layer, extended embedding layer, encoder layer, and decoder layer are described as follows:
[0090] Embedding layer: The embedding layer converts the observed trajectory sequence V = [v1, v2, …v t ,…v T ] is mapped to a high-dimensional space to generate an output sequence O of hidden features em ={h1, h2, ... h t ,…h T}, where each h t Yes model The hidden feature vector of dimension. Figure 3 As shown, the output sequence O em Calculate layer by layer from top to bottom.
[0091] O em =E token +E spat +E pos #(1)
[0092] As shown in formula (1), the embedding layer consists of the label embedding E token , spatial embedding E spat , position embedding E pos The composition is described as follows:
[0093] E token =Conv1d(V Tra )#(2)
[0094] E spat =W spat2 ·(W spat1 ·X RR +b spat1 )+b spat2 #(3)
[0095]
[0096] Among them, W spat1 and W spat2 are the trainable weights of the linear layer; the role of the Conv1d(·) function will be introduced below.
[0097] Formulas (2) and (3) show that the former uses a one-dimensional convolutional layer, while the latter uses two linear transformation layers. Tra and X RR Mapped to a high-dimensional representation for subsequent processing or feature extraction. Formula (4) describes the relative position encoding function of the model, where pos represents the position and d model represents the dimension of the hidden layer, i represents the dimension. Each dimension of position information corresponds to a sine function.
[0098] Extended Embedding Layer: When computing E token and E spat Before encoding the vector, the observation trajectory sequence V and the spatial feature representation X RR The temporal expansion is performed to generate the expanded observation trajectory sequence V′ and the expanded spatial feature representation X′ RR , their time length is T+L, and their structure is as follows Figure 4 Then, the characteristics of the extended embedding layer that are different from the embedding layer are introduced as follows:
[0099] z t =σ(W z ·[h t-1 , v t ])#(5)
[0100] r t =σ(W r ·[h t-1 , vt ])#(6)
[0101]
[0102]
[0103] The above formulas (5) to (8) describe the basic structure of the gated recurrent unit (GRU), where h t-1 represents the hidden state at time step t-1, represents the candidate hidden state at time step t, z t is the update gate, used to control the activation update, r t is the reset gate, which is used to decide whether to discard h when calculating candidate activations. t-1 ; W z , W r ,and are the trainable weights of the functions σ(·) and tanh(·).
[0104] The following formulas (9) to (11) describe how the bidirectional structure of BiGRU can obtain a more comprehensive understanding of the context information of the sequence data and predict the hidden layer output yt at time step T+1 based on the previous data of time length T.
[0105]
[0106]
[0107]
[0108] Among them, b y is the bias term; the hidden state h t The arrows → or ← above the function GRU(·) represent the forward or backward calculation process respectively. The hidden layer output y of BiGRU t Mapped to v′ through a linear layer t+1 , as follows:
[0109]
[0110] In order to alleviate the effect of gradient vanishing, an additional gelu activation layer is introduced; and are the weights and biases of the linear layer, respectively. Based on the composite structure described in formulas (9) to (12), the observed trajectory sequence V and the spatial feature representation X RR It is extended to a time length of T+L in an autoregressive manner. In order to further process or extract features, the observation trajectory sequence V′ of time length T+L and the extended spatial feature representation X′ RR Convert to a high-dimensional output sequence O′em ={h′1, h′2, … h′ t , …h′ T+L}, its expression is as follows:
[0111] O′ em =E′ token +E′ spat +E′ pos #(13)
[0112] E token =Conv1d(V′)#(14)
[0113] E′ spat =W′ spat2 ·(W′ spat1 ·X′ RR +b′ spat1 )+b′ spat2 #(15)
[0114]
[0115] Among them, W′ spat1 , W′ spat2 , b′ spat1 , b′ spat2 are the trainable weights and bias terms of the linear layer.
[0116] Encoder layer: By processing the hidden feature matrix O em ={h1, h2, ... h t ,…h T}, encoder output matrix O en ={O1, O2, ...O t , …O T}, which encapsulates the interactions between different agents in the observable input sequence and the potential features in the long-term dependencies. Figure 5 , output sequence O en It is calculated layer by layer from top to bottom. The Multi-Head Attention module can be described as:
[0117]
[0118] Among them, the query matrix Q, key matrix K and value matrix V are all derived from the linear transformation of the input matrix; the constant h represents the number of attention heads in the block. The mechanism calculates the attention weights through scaled dot products and softmax normalization operations. In addition, the included The variance of the dot product can be stabilized, making it less sensitive to the number of attention heads, thereby improving model performance. The multi-head self-attention mechanism and feedforward network are shown below:
[0119] H1=lnorm(O em +Attention(O em , O em , O em ))#(18)
[0120] H2=lnorm(relu(H1W1)W′1+H1)#(19)
[0121] H3=lnorm(H2+Attention(H2, H2, H2))#(20)
[0122] H4=lnorm(relu(H3W2)W′2+H3)#(21)
[0123] Where W1, W′1, W2, W′2 are trainable weights of lnorm(·) and relu(·) functions. Each sublayer contains a residual connection followed by layer normalization. As a direct skip connection, the residual connection effectively solves the gradient vanishing problem and promotes the convergence of the model. Layer normalization is used to normalize the outputs of all neurons in the layer, thereby improving the generalization performance of the model. The relu activation function in formula (19) introduces nonlinearity, which helps the network learn features related to complex interactions between traffic agents and long-term dependencies in trajectory sequences. The following formula (22) describes the hidden features obtained by the multi-head attention mechanism through convolution, elu activation, maximum pooling and layer normalization to extract and enhance relevant features:
[0124] O en =lnorm(MaxPool1d(elu(Conv1d(H4))))#(22)
[0125] Convolution operations are used to reduce the dimensionality of the data, helping the model to better understand the hidden features in the observed trajectory sequence. In addition, the integrated max pooling layer further reduces the spatial dimension of the input data, thereby capturing the most critical features. The presence of elu activation and layer normalization further enhances the nonlinearity and generalization capabilities of the model.
[0126] Decoder: The decoder processes the extended output sequence V′={v′1, v′2, …, v′ t ,…,v′ T+L} and the encoder output sequence O en ={O1, O2, ...O t , …O T}, to generate future trajectory sequences and the driver's operating intention The proposed decoder can generate the complete output sequence by performing a top-down computation, similar to the encoder. The decoder’s input sequence V′ = {v′1, v′2, …, v′ t ,…,v′ T+L} is generated in an autoregressive manner, as described in formulas (9) to (12), to form the initial predicted interactive vehicle trajectory sequence. em and O en , the hidden features in the ,cross-attention mechanism is widely used in the decoder layer, achieving ,global optimization of the hidden features in the initial predicted interactive vehicle trajectory sequence. Figure 6 As shown, the top-down calculation process is as follows:
[0127] H5=lnorm(O′ em +Attention(O′ em , O′ em , O′ em ))#(twenty three)
[0128] H6=lnorm(relu(H5W3)W′3+H5)#(24)
[0129] H7=lnorm(H6+Attention(H6,O en , O en ))#(25)
[0130] H8=lnorm(relu(H7W4)W′4+H7)#(26)
[0131]
[0132] H9=lnorm(H8)#(28)
[0133] H 10 =W′6relu((W6dropout(H9)+b6)+H9)+b′6#(29)
[0134] H 11 = dropout(H 10 )#(30)
[0135]
[0136] Where W3, W′3, W4, W′4, W5, W6, W′6, W7, W′7 are the trainable weights of the fully connected layer and the linear connection layer; b5, b6, b′6, b7, b′7 are the trainable biases of the fully connected layer and the linear connection layer; dropout(·) is the regularization function.
[0137] The above formulas (23) and (24) describe the multi-head self-attention layer in the decoder, which is the same as formulas (18) and (19) in the encoder. Formulas (25) and (26) describe the multi-head cross-attention layer, where the key and value vectors come from the encoder output O en The query vector is obtained from O′ through a multi-head self-attention mechanism. em The cross-attention layer plays a key role in establishing the similarity features between the initial predicted interactive vehicle trajectory V′ and the historical interactive vehicle trajectory V. This approach helps to globally optimize the hidden layer features in the output sequence, thereby enhancing the model's understanding of the trajectory and its long-term dependencies. Formula (27) describes the network's prediction of the interactive vehicle trajectory , which is the result obtained by outputting the linear connection layer. Formulas (28) and (29) describe how the cross-attention mechanism extracts and enhances the hidden features of driving intention-related features through dropout, relu activation, linear connection layer, residual connection, and layer normalization. Dropout can prevent the network from over-relying on any single neuron and promote better generalization ability. Finally, formulas (30) and (31) describe how to output hidden features through the feature classification layer to form a driving intention sequence. These layers use dropout and contain residual connections and relu activations to extract and enhance features related to driving intention. This method effectively enhances the classification ability and generalization performance of the network. The last layer outputs the driving intention sequence through a linear connection layer
Claims
1. A method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning, characterized in that: The following steps are involved: Step 1: Process the interactive vehicle trajectory prediction and driving intention recognition dataset data; Step 2: Determine the problem definition of trajectory prediction; Step 3: Use multi-task learning method to design CTG-MTLN model for interactive vehicle trajectory prediction and driving intention recognition.
2. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 1, characterized in that: The step 1 specifically includes: first, loading data based on the target vehicle ID and classifying the trajectory data according to the lane change operation type; then, searching for the surrounding traffic agent ID and matching it with the corresponding trajectory; after processing, obtaining the position, speed, acceleration and vehicle type parameter information relative to the target vehicle; calculating the safety factor and lane environment information of the target vehicle; In addition, after processing the trajectory data of all agents, n+m seconds of historical trajectory data are extracted, where n seconds are used for understanding and m seconds are used for prediction; the model training is divided into two stages: the first stage focuses on trajectory prediction, and the entire dataset is shuffled, using a fixed random seed regardless of the data type; the second stage focuses on driving intention recognition, keeping the fixed order of the interacting vehicle trajectories and the lane keeping data in the driving intention dataset; finally, the data of the two stages are divided into training set, validation set and test set.
3. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 1, characterized in that: The step 2 specifically includes: interactive vehicle trajectory prediction and driving intention recognition refer to estimating the future motion state of the interactive vehicle and the future operation intention of the target vehicle driver respectively; interactive vehicle trajectory prediction and driving intention data include attributes, safety risk indicators and road structure information describing each observed traffic subject; Select the preprocessed observable feature matrix as input V = [v1, v2, ...v t ,…v T ]; At the same time, a predictor is designed to output the future interactive vehicle trajectory and driving intention Where t = {1, 2, ..., T} is a timestamp; l = {1, 2, ..., L} is a timestamp for future predictions, and L represents the output / prediction range; Interactive vehicle trajectory prediction and driving intention recognition parameter matrix v t ={x target, x Other , x RI , x RR , x label } consists of five parameter matrices, including the target vehicle feature set x target , surrounding traffic participant feature set x Other , the risk indicator feature set x of the target vehicle RI , the spatial relationship feature set x between vehicles and roads RR and driving intention label feature set x label ;x target and x Other All include kinematic parameters such as vehicle type, position, velocity and acceleration; x target Additional kinematic parameters specific to the target vehicle are included, such as yaw rate, acceleration rate, and heading angle; surrounding traffic participants are represented by x Other ={x p , x rp , x lp , x ra , x la , x f , x rf , x lf } means that x p represents the traffic participant ahead, x rp Indicates the traffic participant on the right ahead, x lp represents the traffic participant on the left ahead, x ra represents the adjacent traffic participant on the right, x la represents the adjacent traffic participant on the left, x f represents the rear traffic participant, x rf represents the rear right traffic participant, x lf Indicates traffic participants on the left behind; Target vehicle feature set x RI Contains risk indicators related to the vehicles ahead and behind, and the road feature set x RR It includes the target vehicle's relative lane position, lane type, lane number, lane width, and vehicle size information.
4. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 3 is characterized in that: The attributes of the traffic subject include 2D bounding box, 2D position, speed and acceleration; the safety risk indicators include collision time TTC and headway THW; the road structure information includes the number of lanes and the current lane position.
5. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 1, characterized in that: The CTG-MTLN model has a four-layer architecture, including an embedding layer, an extended embedding layer, an encoder layer, and a decoder layer; the embedding layer maps the sequence data to a high-dimensional space so that the encoder layer can better extract features; The extended embedding layer expands the trajectory data within a time range of L and maps it to a high-dimensional space to enhance the model’s feature extraction capabilities. The encoder layer is responsible for analyzing the interactions between vehicles and converting the extracted features into hidden states as a summary and understanding of the trajectory of the traffic subject. The decoder layer extracts these insights from the sequence input and combines them with driving intent to generate future trajectories.
6. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 5, characterized in that: The embedding layer converts the observed trajectory sequence V = [v1, v2, ...v t ,…v T ] is mapped to a high-dimensional space to generate an output sequence O of hidden features em ={h1, h2, ... h t ,…h T }, where each h t Yes model Hidden feature vector of dimension; output sequence O em Calculate layer by layer from top to bottom: THE em =And token +E spat +E pos (1) As shown in formula (1), the embedding layer consists of the label embedding E token , spatial embedding E spat , position embedding E pos The composition is described as follows: E token =Conv1d(V Tra ) (2) E spat =W spat2 ·(W spat1 ·X RR +b spat1 )+b spat2 (3) Among them, W spat1 and W spat2 are the trainable weights of the linear layer; Formulas (2) and (3) show that the former uses a one-dimensional convolutional layer, while the latter uses two linear transformation layers; both convert V Tra and X RR Mapped to a high-dimensional representation for subsequent processing or feature extraction; Formula (4) describes the relative position encoding function of the model, where pos represents the position, d model Represents the dimension of the hidden layer, i represents the dimension; the position information of each dimension corresponds to a sine function.
7. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 5, characterized in that: The extended embedding layer is used to calculate E token and E spat Before encoding the vector, the observation trajectory sequence V and the spatial feature representation X RR Perform temporal expansion to generate the expanded observation trajectory sequence V′ and the expanded spatial feature representation X′ RR , their time length is T+L, then, the characteristics of the extended embedding layer that are different from the embedding layer are as follows: With t =σ(W z ·[h t-1 ,v t ]) (5) r t =σ(W r ·[h t-1 ,v t ]) (6) The above formulas (5) to (8) describe the basic structure of the gated recurrent unit GRU, where h t-1 represents the hidden state at time step t-1, represents the candidate hidden state at time step t, z t is the update gate, used to control the activation update, r t is the reset gate, which is used to decide whether to discard h when calculating candidate activations. t-1 ; W z , W r ,and are the trainable weights of the functions σ(·) and tanh(·); The following formulas (9) to (11) describe how the bidirectional structure of BiGRU can obtain a more comprehensive understanding of the context information of the sequence data and predict the hidden layer output yt at time step T+1 based on the previous data of time length T; Among them, b y is the bias term; the hidden state h t The arrows → or ← above the function GRU(·) represent the forward or backward calculation process respectively; the hidden layer output y of BiGRU t Mapped to v′ through a linear layer t+1 , as follows: An additional gelu activation layer is introduced; in which, and are the weights and bias terms of the linear layer respectively; based on the composite structure described in formulas (9) to (12), the observed trajectory sequence V and the spatial feature representation X RR is extended to a time length of T+L in an autoregressive manner; the observation trajectory sequence V′ of time length T+L and the extended spatial feature representation X′ RR Convert to a high-dimensional output sequence O′ em ={h′1, h′2, … h′ t , …h′ T+L }, its expression is as follows: THE' em =E′ token +E′ spat +E′ pos (13) E token =Conv1d(V′) (14) E′ spat =W′ spat2 ·(W′ spat1 ·X′ RR +b′ spat1 )+b′ spat2 (15) Among them, W′ spat1 , W′ spat2 , b′ spat1 , b′ spat2 are the trainable weights and bias terms of the linear layer.
8. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 5, characterized in that: The encoder layer processes the hidden feature matrix O em ={h1, h2, ... h t ,…h T }, encoder output matrix O en ={O1, O2, ...O t , …O T }, which encapsulates the latent features of the interactions between different agents and long-term dependencies in the observable input sequence; Output sequence O en It is calculated from top to bottom layer by layer; the Multi-Head Attention module is described as: Among them, the query matrix Q, key matrix K and value matrix V all come from the linear transformation of the input matrix; the constant h represents the number of attention heads in the block; the multi-head self-attention mechanism and feedforward Feed Forword network are as follows: H1=lnorm(O em +Attention(O em ,O em ,O em )) (18) H2=lnorm(relu(H1W1)W′1+H1) (19) H3=lnorm(H2+Attention(H2, H2, H2)) (20) H4=lnorm(relu(H3W2)W′2+H3) (21) Where W1, W′1, W2, W′2 are trainable weights of lnorm(·) and relu(·) functions; each sublayer contains a residual connection followed by layer normalization; residual connections act as direct skip connections; layer normalization is used to normalize the outputs of all neurons in the layer; the relu activation function in formula (19) introduces nonlinearity; the following formula (22) describes the hidden features obtained by the multi-head attention mechanism through convolution, elu activation, maximum pooling and layer normalization to extract and enhance relevant features: O en = lnorm(MaxPool1d(elu(Conv1d(H4)))) (22).
9. The method for interactive vehicle trajectory prediction and driving intention recognition based on multi-task learning according to claim 5, characterized in that: The decoder processes the extended output sequence V′={v′1, v′2, …, v′ t ,…,v′ T+L } and the encoder output sequence O en ={O1, O2, ...O t , …O T }, to generate future trajectory sequences and the driver's operating intention The proposed decoder generates a complete output sequence by performing a top-down computation; the decoder input sequence V′ = {v′1, v′2, …, v′ t ,…,v′ T+L } is generated in an autoregressive manner, as described in formulas (9) to (12), to form an initial predicted interactive vehicle trajectory sequence; the top-down calculation process is as follows: H5=lnorm(O′ em +Attention(O′ em ,O′ em ,O′ em )) (23) H6=lnorm(relu(H5W3)W′3+H5) (24) H7=lnorm(H6+Attention(H6,O en ,O en )) (25) H8=lnorm(relu(H7W4)W′4+H7) (26) H9=lnorm(H8)(28) A 10 =W′6relu((W6dropout(H9)+b6)+H9)+b′6 (29) H 11 =dropout(H 10 ) (30) Where W3, W′3, W4, W′4, W5, W6, W′6, W7, W′7 are the trainable weights of the fully connected layer and the linear connection layer; b5, b6, b′6, b7, b′7 are the trainable biases of the fully connected layer and the linear connection layer; dropout(·) is the regularization function; The above formulas (23) and (24) describe the multi-head self-attention layer in the decoder, which is the same as formulas (18) and (19) in the encoder; formulas (25) and (26) describe the multi-head cross-attention layer, where the key and value vectors come from the encoder output O en The query vector is obtained from O' through a multi-head self-attention mechanism. em The linear mapping of hidden features further extracted in ; the cross attention layer plays a key role in establishing the similarity features between the initial predicted interactive vehicle trajectory V' and the historical interactive vehicle trajectory V; Formula (27) describes the network prediction of interactive vehicle trajectory This is the result obtained by outputting the linear connection layer; Formulas (28) and (29) describe how the cross attention mechanism extracts and enhances the hidden features of driving intention related features through dropout, relu activation, linear connection layer, residual connection and layer normalization; Finally, Formulas (30) and (31) describe how to output the hidden features through the feature classification layer to form a driving intention sequence; The last layer outputs the driving intention sequence through the linear connection layer
Citation Information
Patent Citations
Intention trajectory prediction method combined with social generative adversarial network
CN111930110A
Vehicle track prediction and driving manipulation identification method based on time mode attention mechanism
CN112949597A
Vehicle trajectory prediction method based on self-learning of interactive motion relation between workshops
CN116702986A
Vehicle track prediction method based on intention perception space-time attention network
CN117141518A
Vehicle multi-mode driving behavior track prediction system and method based on GAT-CS-LSTM
CN117523821A
Cited By
Automatic driving emission interpretable prediction method considering road geometric condition influence
CN119688330A
Fine-grained multi-task driving risk prediction method fused with trajectory prediction auxiliary task
CN121393151A
Vehicle track prediction and monitoring method based on discriminator implicit future interactive learning guidance
CN121744243A