Autonomous driving trajectory prediction method based on driving style

By combining graphical models and spatiotemporal graph Transformer models, driving style features are extracted and trajectory attention is dynamically adjusted, solving the problem that the influence of driving style is not considered in vehicle trajectory prediction, achieving higher accuracy trajectory prediction, and supporting the development of intelligent transportation systems.

CN119577968BActive Publication Date: 2025-10-28CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411653435.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-10-28
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Existing vehicle trajectory prediction models fail to adequately consider vehicle interactions and time dependencies, and fail to effectively integrate the influence of different driving styles, resulting in poor accuracy of prediction results.

Method used

A graph model is used to extract driving features from vehicle trajectory data, classify them to obtain different driving style features, and use a spatiotemporal graph Transformer model to handle the interaction and temporal dependency between vehicles. A style attention module is constructed to dynamically adjust the trajectory feature attention and generate the future trajectory of the vehicle.

Benefits of technology

It improves the accuracy of vehicle trajectory prediction, enabling it to more accurately reflect actual driving behavior, adapt to prediction needs in different driving environments, and support the development of intelligent transportation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577968B_ABST
    Figure CN119577968B_ABST
Patent Text Reader

Abstract

This invention relates to a driving style-based autonomous driving trajectory prediction method, belonging to the field of autonomous driving technology. The method includes: collecting historical trajectory data of vehicles using sensors and onboard systems; preprocessing the data to ensure its continuity and accuracy; constructing a spatiotemporal traffic map using vehicle trajectory information; constructing a driving style feature extraction module to extract driving style features from the preprocessed trajectory data; constructing a spatial sub-attention layer and a temporal convolutional layer to process the trajectory data and obtain interaction features between vehicles; and dynamically generating attention weights using a style attention module to guide a decoding module to predict future trajectories based on different driving styles. This invention is applicable to autonomous driving systems and can effectively improve trajectory prediction accuracy and driving safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of autonomous driving technology and relates to an autonomous driving trajectory prediction method based on driving style. Background Technology

[0002] Autonomous driving technology, as a key transformative technology in intelligent transportation systems, offers unique potential solutions to long-standing traffic problems such as traffic safety, urban traffic congestion, and improved energy efficiency. Vehicle trajectory prediction relies on the rapid development of autonomous driving technology, the continuous improvement of intelligent transportation systems, and the urgent need for improved traffic safety and efficiency. By accurately predicting vehicle trajectories, potential hazards can be identified in a timely manner, allowing for appropriate safety measures to be taken, thereby reducing the incidence of traffic accidents. Due to the diversity and complexity of driving styles and vehicle interactions, existing trajectory prediction models still require further improvement. Research on vehicle trajectory prediction is of great significance to promoting the development of intelligent transportation systems and autonomous driving technology. Therefore, research on vehicle trajectory prediction has high application value and is an important research direction for autonomous driving.

[0003] In early research on vehicle trajectory prediction algorithms, due to the computing power limitations of onboard computing platforms, many studies commonly employed physical methods based on kinematic and dynamic models to predict the trajectories of surrounding vehicles. Traditional methods consider only a single factor in trajectory prediction and cannot utilize environmental information or spatiotemporal interaction information for modeling. While they achieve good accuracy in short-term trajectory prediction, long-term predictions result in large discrepancies between predicted and actual positions, leading to insufficient accuracy. Given the superior capabilities of deep learning in processing large datasets, extracting complex target features, and capturing long-term dependencies, vehicle trajectory prediction has gradually shifted from traditional methods to deep model-based approaches, such as graph neural networks and attention mechanisms.

[0004] Existing vehicle trajectory prediction models have overcome the limitations of simple scenarios and perform well in complex scenarios with high interactivity. However, existing methods do not fully consider the interactions and temporal dependencies between vehicles, nor do they effectively integrate the influence of different driving styles, resulting in poor prediction accuracy. Different driving styles can lead to different driving behaviors in the same traffic scenario, directly affecting the vehicle's trajectory. Considering driving style in vehicle trajectory prediction can more accurately predict the personalized trajectory of the vehicle. How to accurately predict the future trajectory of a vehicle using its historical motion state characteristics, interaction characteristics between vehicles, and driving style characteristics has attracted much attention and become one of the key problems that urgently need to be solved in autonomous driving. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide an autonomous driving trajectory prediction method based on driving style, which improves the trajectory prediction accuracy of autonomous vehicles in complex traffic scenarios through the collaborative work of multiple modules. This invention utilizes a graph model to extract driving features from vehicle trajectory data, classifying them into different driving style features. Furthermore, it captures feature information in both temporal and spatial dimensions in a hierarchical manner. Spatially, a spatial self-attention sublayer is used to capture the interactions between adjacent vehicles in the scene. Temporally, a temporal convolutional sublayer is employed to extract the temporal dependencies between consecutive frames. The style attention module generates attention weights based on different driving styles, ultimately guiding the decoding module to generate the vehicle's future trajectory.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] An autonomous driving trajectory prediction method based on driving style includes the following steps:

[0008] S1: Collect historical trajectory data of the vehicle through sensors and on-board systems, and preprocess the historical trajectory data of the vehicle.

[0009] S2. The driving scene is modeled as an undirected spatiotemporal traffic graph G using vehicle motion information;

[0010] S3. Use a graph model to extract the driver's driving features from the vehicle trajectory data, and use Softmax classification to obtain different driving style features;

[0011] S4. The spatiotemporal graph Transformer model is used to process the interaction and temporal dependence between vehicles, and the trajectory features containing the coupling relationship between temporal and spatial information are obtained.

[0012] S5. Construct a style attention module to capture trajectory feature changes under different driving styles, dynamically adjust the allocation of trajectory feature attention, obtain trajectory feature changes under different driving styles, and then predict the future trajectory of the vehicle.

[0013] Furthermore, in step S1, historical trajectory data of the vehicle is collected through sensors and the vehicle system, wherein the historical trajectory data of the vehicle includes the vehicle's position information, speed, and acceleration.

[0014] Vehicle trajectory information is divided into sequence data. Based on the vehicle's position in the global coordinate system and the positions of surrounding traffic participants in their respective coordinate systems, the coordinates of the surrounding traffic participants are mapped to the global coordinate system to generate data segments in units of frames.

[0015] Data preprocessing operations include: noise reduction, standardization, and interpolation.

[0016] Furthermore, in step S2, the driving scene is modeled as an undirected spatiotemporal traffic graph using vehicle motion information:

[0017] G = (V, E)

[0018] in, Represents the set of vehicle nodes. Let N represent the i-th vehicle at time t, and N and T represent the number of vehicles and the historical trajectory time period, respectively; E represents the set of edges connecting the nodes.

[0019] The set of edges connecting nodes includes the spatial edge set E. s and time edge set E t They are represented as follows:

[0020]

[0021]

[0022] Spatial edge sets represent the virtual connection relationships between different vehicles within the same frame, while temporal edge sets represent the temporal relationships between consecutive frames of the same vehicle.

[0023] Furthermore, in step S3, degree centrality and tight centrality are used to measure the probability and intensity of different driving behaviors, thereby reflecting the driver's driving style. Degree centrality... and tight centrality They are represented as follows:

[0024]

[0025]

[0026] Among them, v j Represents vehicles j and N i (t) represents the set of neighboring vehicles of the i-th vehicle, d ij This represents the Euclidean distance path between vehicle i and vehicle j;

[0027] Based on the spatiotemporal traffic map at time t, the selected features Divided into motion states and driving style status The state of a vehicle node is determined by the hidden states of its neighboring nodes. Features of surrounding vehicle nodes and the hidden state of features A decision is expressed as:

[0028]

[0029]

[0030]

[0031] Where σ represents the activation function, W s W n and W ns There are three trainable weight matrices;

[0032] The vehicle's hidden state is obtained by expanding the recursion over a fixed time step. Softmax is used to estimate the probability distribution of driving styles and determine the style categories. The different driving styles are then processed into m-type values ​​using one-hot encoding. s Let (1,0) represent offensive vehicles and (0,1) represent defensive vehicles. The calculation formula is as follows:

[0033]

[0034] m s =P(c k |H i =Softmax(H) i )

[0035] in, These represent the target vehicle at time t and time tt respectively. obs The hidden state of neighboring nodes at time j∈N(v i Let H(t) denote the set of vehicles in the neighborhood of the i-th vehicle, tanh(·) denote the hyperbolic tangent function, and H(t) denote the set of vehicles in the neighborhood of the i-th vehicle. i Let P(c) represent the feature set. k |H i ) represents the probability distribution of driving style.

[0036] Furthermore, step S4 includes the following steps:

[0037] S41. The historical feature vector of each vehicle is embedded into a higher dimension through a fully connected layer to obtain the embedding vector. Among them, the relative position information between trajectories is embedded through position encoding;

[0038] S42. A multi-head self-attention mechanism is used to aggregate information from different feature subspaces. After v aggregations, a fully connected layer is used to merge the outputs of each attention head to form the final multi-head attention output.

[0039] S43. Construct a spatial self-attention layer to capture interactive information in the spatial dimension;

[0040] S44. Construct a temporal convolutional layer to capture dependencies in the temporal dimension, and interact with and fuse temporal dependencies to obtain spatiotemporal features.

[0041] Furthermore, in step S41, firstly, the fully connected layer inputs the motion state of the i-th vehicle at time t. Convert to hidden vector

[0042] Secondly, the relative position information between the input trajectories is obtained through position encoding. The position encoding method is as follows:

[0043]

[0044]

[0045] Where pos represents the location information, and ξ represents the dimension. total The total dimension of the input embedding;

[0046] In the position encoder section, a masking sublayer is used to ensure that the prediction at time t depends only on the known input before time t, resulting in the final input embedding vector as follows:

[0047] In step S42, the final multi-head attention output is represented as:

[0048]

[0049] Among them, W S It is a learnable weight matrix; Attention to each head;

[0050] In step S43, the spatial self-attention layer captures the relationships between input features based on a multi-head scaling dot product attention mechanism. The process is as follows:

[0051] Characteristics of the vehicle at time t As input, we first learn the feature vectors at each time step:

[0052]

[0053]

[0054]

[0055] in, Let W be the query vector, key vector, and value vector of the i-th vehicle at time t. q W k W v All are learnable weight matrices;

[0056] right and A scaled dot product is performed to normalize the weights of the spatial edges between vehicle i and its surrounding vehicles j, and then the summation is used to obtain the attention weight of a single attention head at node i. The calculation method is as follows:

[0057]

[0058] Where, ξ k The dimension of the feature vector is represented; the feature ω is obtained based on the attention weights.

[0059] In step S44, the temporal convolutional layer takes the feature ω as input and normalizes it to obtain an input map of size (T, N, C), where T is the number of historical frames, N is the number of vehicle nodes, and C is the embedding dimension. After the temporal convolutional layer, residual connections and normalization are introduced to obtain the final trajectory feature ω′.

[0060]

[0061]

[0062] Among them, M i W represents the final output of multi-head attention. T This represents the learnable weight matrix. For each head's attention, `concat(·)` is the concatenation function; Q i Represents the query vector matrix. Denotes the key vector matrix, d k V represents the dimension of the feature vector. i Let represent the value vector matrix, and softmax(·) be the softmax activation function.

[0063] Furthermore, step S5 includes the following steps:

[0064] S51. Dynamic attention weights are generated based on different driving style characteristics through the style attention module;

[0065] S52. It adopts a decoding module combined with a driving style attention mechanism to dynamically adjust the weight distribution of trajectory feature attention according to different driving styles and output accurate future trajectories.

[0066] Furthermore, in step S51, the trajectory features, driving style features, and interaction features are processed by the style attention module. A feedforward neural network is introduced to learn the weights of the attention module, and the driving style features m are... s The hidden state vector p of the predicted trajectory at the previous time step t-1 and the hidden state vector of the historical trajectory Three vectors are used as inputs to a feedforward neural network, which learns these three vectors along with attention weights. Nonlinear relationship between them:

[0067]

[0068] in, and There are three learnable weight matrices; tanh(·) is the hyperbolic tangent function.

[0069] Furthermore, in step S52, trajectory prediction is performed by a decoder, which includes two multi-head attention sublayers and a feedforward fully connected sublayer; the multi-head self-attention sublayer performs self-attention calculation on the input sequence through multiple attention heads to learn the local relationships of the vehicle trajectory;

[0070] Adding a masking mechanism ensures that the predicted trajectory at time t depends only on the output before time t;

[0071] Residual connections are introduced before normalization. The feedforward fully connected sublayer integrates the outputs of the preceding sublayers through a fully connected approach, then inputs them into the fully connected linear layer, and finally obtains the predicted trajectory result through the SoftMax layer.

[0072]

[0073] Where, γ t The fused features are represented by Linear(·), which represents a linear operation.

[0074] Furthermore, the L2 loss between the predicted trajectory and the true trajectory is used as the loss function for decoder training:

[0075]

[0076] Among them, y t Represents the actual trajectory. Represents the predicted trajectory, t = t obs +1 indicates the predicted start time.

[0077] The beneficial effects of this invention are as follows:

[0078] This invention uses real-world driving data from real-world scenarios for training and learning to improve the accuracy of vehicle trajectory prediction. By considering driving style, it can more accurately reflect actual driving behavior. A spatial attention module and a temporal convolution module are constructed to calculate the relative importance of adjacent vehicles using the vehicle's local positional features and to obtain the correlation of features in the temporal dimension. Furthermore, the introduction of a style attention module enables dynamic adjustment of trajectory features, thereby optimizing prediction results under different driving environments. This invention improves the accuracy of vehicle trajectory prediction, demonstrates broad application prospects, and provides strong support for future intelligent transportation systems.

[0079] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0080] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0081] Figure 1 This is an overall flowchart of the trajectory prediction method of the present invention;

[0082] Figure 2 This is a schematic diagram of the vehicle prediction coding module of the present invention;

[0083] Figure 3 This is a schematic diagram of spatial attention and temporal attention in this invention;

[0084] Figure 4 This is a schematic diagram of the vehicle prediction decoding module of the present invention. Detailed Implementation

[0085] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0086] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0087] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0088] Please see Figures 1-4 This is a method for predicting autonomous driving trajectories based on driving style.

[0089] Example

[0090] This embodiment provides a specific implementation of an autonomous driving trajectory prediction method based on driving style. The method includes: acquiring historical trajectory information of the vehicle and preprocessing the vehicle trajectory; extracting driving style features, spatial interaction features, and temporal dependency features; processing the fused features; and obtaining the predicted trajectory result of the vehicle. The specific process is as follows: Figure 1 As shown, it includes the following steps:

[0091] S1: Collect historical trajectory data of the vehicle through sensors and on-board systems, including information such as location, speed and acceleration, and preprocess the historical trajectory information of the vehicle.

[0092] S2. Model the driving scene as an undirected spatiotemporal traffic graph G using vehicle motion information;

[0093] S3. Use a graph model to extract the driver's driving features from the vehicle trajectory data, and use Softmax classification to obtain different driving styles;

[0094] S4. The space-time graph Transformer model is used to process the interaction and time dependency between vehicles, and to obtain the coupling relationship between time and space information.

[0095] S5. Construct a style attention module to capture trajectory feature changes under different driving styles, dynamically adjust the allocation of trajectory feature attention, obtain trajectory feature changes under different driving styles, and thus more accurately predict the future trajectory of the vehicle.

[0096] In step S1 of this embodiment, historical trajectory data of the vehicle, including location information, speed, and acceleration, is collected through sensors and the vehicle-mounted system. The vehicle trajectory information is then divided into sequential data. Based on the vehicle's position in the global coordinate system and the positions of surrounding traffic participants in their respective coordinate systems, the coordinates of the surrounding traffic participants are mapped to the global coordinate system, thereby generating data segments in frames.

[0097] Meanwhile, the vehicle trajectory data undergoes preprocessing such as denoising, standardization, and interpolation to ensure data continuity and accuracy.

[0098] In step S2 of this embodiment, the driving scene is modeled as an undirected spatiotemporal traffic graph G = (V, E) using vehicle motion information, where, Represents the set of vehicle nodes. Let E represent the i-th vehicle at time t, and let E represent the set of edges connecting nodes. E consists of two parts: the spatial edge set and the edge set. and time edge set Spatial edge sets represent the virtual connection relationships between different vehicles within the same frame, while temporal edge sets represent the temporal relationships between consecutive frames of the same vehicle.

[0099] Step S3 in this embodiment specifically includes the following process:

[0100] Using degree centrality and compact centrality as two metrics, the likelihood and intensity of driving behaviors such as speeding and overtaking are measured, thereby reflecting the driver's driving style;

[0101] Specifically, using degree centrality and tight centrality Two measurement methods are used to assess the likelihood and intensity of driving behaviors such as speeding and overtaking, thereby reflecting the driver's driving style. Among them, v... j Represents vehicles j and N i (t) represents the set of neighboring vehicles of the i-th vehicle, d ij This represents the Euclidean distance path between node i and node j.

[0102] Based on the spatiotemporal traffic map at time t, the selected features Divided into motion states and driving style status The state of a vehicle node is determined by the hidden states of its neighboring nodes. Features of surrounding vehicle nodes and the hidden state of features A decision is expressed as: Where σ represents the activation function, W s W n and W ns There are three trainable weight matrices;

[0103] The vehicle's hidden state is obtained by expanding the recursion over a fixed time step. Softmax is used to estimate the probability distribution of driving styles and determine the style categories. The different driving styles are then processed into m-type values ​​using one-hot encoding. s Let (1,0) represent offensive vehicles and (0,1) represent defensive vehicles. The calculation formula is:

[0104]

[0105] m s =P(c k |H i =Softmax(H) i )

[0106] in, These represent the target vehicle at time t and time tt respectively. obs The hidden state of neighboring nodes at time j∈N(v i Let H(t) denote the set of vehicles in the neighborhood of the i-th vehicle, tanh(·) denote the hyperbolic tangent function, and H(t) denote the set of vehicles in the neighborhood of the i-th vehicle. i Let P(c) represent the feature set. k |H i ) represents the probability distribution of driving style.

[0107] In step S4 of this embodiment, the historical motion information and vehicle motion state information of all vehicles in the scene are embedded and encoded by the trajectory input encoding module. Spatially, a spatial self-attention sublayer is used to capture the interactions between adjacent vehicles in the scene; temporally, a temporal convolution sublayer is used to extract the temporal dependencies of consecutive frames; a multi-head self-attention mechanism is used to aggregate information from different feature subspaces; a spatiotemporal Transformer model is used to encode the spatial interactions and temporal dependencies between vehicles, obtaining hidden vectors containing spatiotemporal features. The encoding effect is improved through a position encoding module and a spatial self-attention layer, ensuring that the spatiotemporal features of the trajectory input sequence are fully captured. Figure 2 As shown, it includes the following steps:

[0108] S41. The historical feature vector of each vehicle is embedded into a higher dimension through a fully connected layer. The fully connected layer incorporates the input motion state of the i-th vehicle at time t. Convert to hidden vector Because the model uses parallel input, the input information does not include position information. To obtain the relative position information between the input trajectories, a position encoding module needs to be constructed. Position information is added to the input embedding, and the encoding method is as follows: Where pos represents the location information, and ξ represents the dimension. total Let be the total dimension of the input embedding. Furthermore, a masking sublayer is used in the encoder part to ensure that the prediction at time t depends only on known inputs prior to time t. The final input embedding vector is...

[0109] S42. To enhance the modeling of complex interaction relationships from multiple perspectives, a multi-head self-attention mechanism is adopted to aggregate information from different feature subspaces. This process is performed τ times, and a fully connected layer is used to merge the outputs of each attention head to form the final multi-head attention output:

[0110]

[0111] Among them, W S It is a learnable weight matrix; Attention to each head;

[0112] S43. A spatial self-attention layer is constructed to capture interaction information in the spatial dimension, and a temporal convolutional layer captures dependencies in the temporal dimension. The two sub-layers are stacked to handle vehicle interactions and temporal dependencies, fusing spatiotemporal features. The spatial self-attention layer is based on a multi-head scaling dot-product attention mechanism to capture the relationships between input features, such as the vehicle features at time t. As input, obtain spatial interactions between vehicles, such as Figure 3 As shown. First, the feature vectors at each time step are learned. right and A scaled dot product is performed to normalize the weights of the spatial edges between vehicle i and its surrounding vehicles j, and then the summation is used to obtain the attention weight of a single attention head at node i. The calculation method is as follows: The three vectors above are the query vectors for the i-th vehicle at time t. key vector value vector W q W k W v There are three learnable weight matrices, ξ k This represents the dimension of the feature vector. The feature ω is obtained based on the attention weights.

[0113] S44. A temporal convolutional module is used to extract the temporal correlation of vehicle spatial features, thereby obtaining a spatiotemporal feature representation between vehicles. This module expands the receptive field and captures the temporal dependencies of local features. The temporal convolutional layer takes the processed features as input, and after normalization, obtains an input map of size (T, N, C), where T is the number of historical frames, N is the number of vehicle nodes, and C is the embedding dimension. Residual connections and normalization are introduced after the temporal convolutional layer. Temporal self-attention uses a multi-head self-attention mechanism, similar to spatial self-attention, but the temporal correlation of each vehicle node is calculated independently.

[0114]

[0115]

[0116] Among them, M i W represents the final output of multi-head attention. T This represents the learnable weight matrix. For each head's attention, `concat(·)` is the concatenation function; Q i Represents the query vector matrix. Denotes the key vector matrix, d k V represents the dimension of the feature vector. i Let represent the value vector matrix, and softmax(·) be the softmax activation function.

[0117] In step S5 of this embodiment, the trajectory decoding module decodes the acquired driving style feature vector and the spatiotemporal feature vector of the trajectory to predict the future trajectory of the vehicle, such as... Figure 4 As shown, the specific steps include:

[0118] S51. Generate dynamic attention weights based on different driving style characteristics to influence the prediction of the trajectory decoding module, so as to adapt to the differences in driving behavior caused by different driving styles.

[0119] Specifically, to account for the coupling relationships between features, a style attention module is established, enabling it to select more critical and useful information from a large number of feature vectors for trajectory prediction. When predicting the future trajectory at each time step, the prediction model dynamically adjusts the allocation of trajectory feature attention probabilities based on different driving styles, rather than processing trajectory features the same way for all time steps. In this way, the model can better capture the changes in trajectory features under different driving styles, thus predicting future trajectories more accurately. During the learning process, a feedforward neural network is introduced to learn the weights of the attention module, incorporating the driving style features m... s The hidden state vector p of the predicted trajectory at the previous time step t-1and the hidden state vector of the historical trajectory Three vectors are used as inputs to a feedforward neural network, which learns these three vectors along with attention weights. Nonlinear relationship between them:

[0120]

[0121] in, and There are three learnable weight matrices; tanh(·) is the hyperbolic tangent function.

[0122] S52, the decoding module combines the driving style attention mechanism to dynamically adjust the weight distribution of trajectory feature attention according to different driving styles, and outputs accurate future trajectories;

[0123] Specifically, the decoder consists of three sub-layers: two multi-head attention sub-layers and a feedforward fully connected sub-layer. The multi-head attention sub-layers perform self-attention computation on the input sequence using multiple attention heads. This self-attention is used to learn local relationships in the vehicle trajectory, thereby capturing dependencies in the input trajectory sequence. To ensure that the predicted trajectory at time t depends only on outputs before time t, a masking mechanism is added, preventing the prediction from depending on outputs after time t and ensuring that the predicted trajectory sequence does not expose future information at time t. Furthermore, residual connections are introduced before normalization, allowing the network to better adapt to the characteristics of the input sequence when handling complex tasks. The feedforward fully connected sub-layer integrates the outputs of the preceding sub-layers through a fully connected approach, then inputs them into a fully connected linear layer, and finally obtains the predicted trajectory result through a SoftMax layer. in, The fused features are represented by Linear(·), which represents a linear operation.

[0124] S53. Use the L2 loss between the predicted trajectory and the true trajectory as the loss function for network training:

[0125]

[0126] Among them, y t Represents the actual trajectory. Represents the predicted trajectory, t = t obs +1 indicates the predicted start time.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An autonomous driving trajectory prediction method based on driving style, characterized in that: The prediction method includes the following steps: S1: Collect historical trajectory data of the vehicle through sensors and on-board systems, and preprocess the historical trajectory data of the vehicle. S2. Model the driving scene as an undirected spatiotemporal traffic map using vehicle motion information. ; S3. Use a graph model to extract the driver's driving features from the vehicle trajectory data, and use Softmax classification to obtain different driving style features; S4. The spatiotemporal graph Transformer model is used to process the interaction and temporal dependence between vehicles, and the trajectory features containing the coupling relationship between temporal and spatial information are obtained. S5. Construct a style attention module to capture trajectory feature changes under different driving styles, dynamically adjust the allocation of trajectory feature attention, obtain trajectory feature changes under different driving styles, and then predict the future trajectory of the vehicle. In step S2, the driving scene is modeled as an undirected spatiotemporal traffic graph using vehicle motion information: in, Represents the set of vehicle nodes. express Time of the first a car, and These represent the number of vehicles and the historical trajectory time period, respectively. Represents the set of edges connecting nodes; The set of edges connecting nodes includes the spatial edge set. and time edge set They are represented as follows: Spatial margin sets represent the virtual connection relationships between different vehicles within the same frame, while temporal margin sets represent the temporal relationships between consecutive frames of the same vehicle. In step S3, degree centrality and tight centrality are used to measure the probability and intensity of different driving behaviors, thereby reflecting the driver's driving style. Degree centrality... and tight centrality They are represented as follows: in, Indicates vehicle , Indicates the first The set of neighboring vehicles of a vehicle. Indicates vehicle and vehicles The path between them is a Euclidean distance; according to The spatiotemporal traffic map at any given time will include the selected features. Divided into motion states and driving style status The state of a vehicle node is determined by the hidden states of its neighboring nodes. Features of surrounding vehicle nodes and the hidden state of features A decision is expressed as: in, This represents the activation function. , and There are three trainable weight matrices; The vehicle's hidden state is obtained by expanding the recursion over a fixed time step. Softmax is used to estimate the probability distribution of driving styles and determine the style categories. The different driving styles are then processed using one-hot encoding. ,use Indicates an offensive vehicle. The formula for calculating the conservative vehicle type is as follows: in, These respectively represent the target vehicle in and The hidden state of neighboring nodes at any given time. Indicates the first Vehicle neighborhood vehicle collection, Represents the hyperbolic tangent function. Represents the feature set, This represents the probability distribution of driving styles.

2. The autonomous driving trajectory prediction method based on driving style according to claim 1, characterized in that: In step S1, historical trajectory data of the vehicle is collected through sensors and the vehicle system. The historical trajectory data of the vehicle includes the vehicle's position information, speed, and acceleration. Vehicle trajectory information is divided into sequence data. Based on the vehicle's position in the global coordinate system and the positions of surrounding traffic participants in their respective coordinate systems, the coordinates of the surrounding traffic participants are mapped to the global coordinate system to generate data segments in units of frames. Data preprocessing operations include: noise reduction, standardization, and interpolation.

3. The autonomous driving trajectory prediction method based on driving style according to claim 1, characterized in that: Step S4 includes the following steps: S41. The historical feature vector of each vehicle is embedded into a higher dimension through a fully connected layer to obtain the embedding vector. In this process, relative position information between trajectories is embedded through position encoding; S42. A multi-head self-attention mechanism is used to aggregate information from different feature subspaces, wherein... After the aggregation, a fully connected layer is used to merge the outputs of each attention head to form the final multi-head attention output; S43. Construct a spatial self-attention layer to capture interactive information in the spatial dimension; S44. Construct a temporal convolutional layer to capture dependencies in the temporal dimension, and interact with and fuse temporal dependencies to obtain spatiotemporal features.

4. The autonomous driving trajectory prediction method based on driving style according to claim 3, characterized in that: In step S41, firstly, the fully connected layer will Time of the first Vehicle input motion state Convert to hidden vector ; Secondly, the relative position information between the input trajectories is obtained through position encoding. The position encoding method is as follows: in, For location information, For dimension, The total dimension of the input embedding; A mask sublayer is used in the position encoder section to ensure The prediction of time depends only on Given the input before time step [time], the embedding vector of the final input is obtained as follows: ; In step S42, the final multi-head attention output is represented as: in, It is a learnable weight matrix; Attention to each head; In step S43, the spatial self-attention layer captures the relationships between input features based on a multi-head scaling dot product attention mechanism. The process is as follows: Characteristics of vehicles at any time As input, we first learn the feature vectors at each time step: in, They are respectively Time of the first The query vector, key vector, and value vector of a vehicle. All are learnable weight matrices; right and Perform a scaled dot product on the vehicle. and surrounding vehicles The weights of the edges in the space are normalized, and the results are summed to obtain the node values. Attention weight of a single attention head The calculation method is as follows: in, Represent the dimension of the feature vector; obtain the features based on the attention weights. ; In step S44, the temporal convolutional layer will... As input, after normalization, we obtain a value of... The input image, where It is the historical frame rate. It refers to the number of vehicle nodes. The embedding dimension involves introducing residual connections and normalization after the temporal convolutional layer to obtain the final trajectory features. : in, This represents the final output of the multi-headed attention. This represents the learnable weight matrix. Attention to each head, This is a concatenation function; Represents the query vector matrix. Represents the key vector matrix, Represents the dimension of the feature vector. Represents a value vector matrix. This is the softmax activation function.

5. The autonomous driving trajectory prediction method based on driving style according to claim 3, characterized in that: Step S5 includes the following steps: S51. Dynamic attention weights are generated based on different driving style characteristics through the style attention module; S52. It adopts a decoding module combined with a driving style attention mechanism to dynamically adjust the weight distribution of trajectory feature attention according to different driving styles and output accurate future trajectories.

6. The autonomous driving trajectory prediction method based on driving style according to claim 5, characterized in that: In step S51, the trajectory features, driving style features, and interaction features are processed by the style attention module. A feedforward neural network is introduced to learn the weights of the attention module, thus incorporating the driving style features. The hidden state vector of the predicted trajectory at the previous time step. and the hidden state vector of the historical trajectory Three vectors are used as inputs to a feedforward neural network, which learns these three vectors along with attention weights. Nonlinear relationship between them: in, , and There are three learnable weight matrices; It is the hyperbolic tangent function.

7. The autonomous driving trajectory prediction method based on driving style according to claim 6, characterized in that: In step S52, trajectory prediction is performed by a decoder, which includes two multi-head attention sublayers and a feedforward fully connected sublayer. The multi-head self-attention sublayer performs self-attention calculation on the input sequence through multiple attention heads to learn the local relationships of the vehicle trajectory. Adding a masking mechanism ensures that in prediction Time trajectory only depends on Output before the current time; Residual connections are introduced before normalization. The feedforward fully connected sublayer integrates the outputs of the preceding sublayers through a fully connected approach, then inputs them into the fully connected linear layer, and finally obtains the predicted trajectory result through the SoftMax layer. in, Indicates the characteristics after fusion. This indicates a linear operation.

8. The autonomous driving trajectory prediction method based on driving style according to claim 7, characterized in that: The L2 loss between the predicted trajectory and the true trajectory is used as the loss function for decoder training: in, Represents the actual trajectory. Indicates the predicted trajectory. Indicates the start time of the prediction.

Citation Information

Patent Citations

  • Vehicle track prediction method based on graph attention interaction mechanism

    CN114692762A

  • Vehicle track prediction method based on driver interaction behavior characteristics in network connection environment

    CN115520223A