Vehicle trajectory prediction method and system based on decoupling graph diffusion neural network
Through a method based on decoupled graph diffusion neural network, using sparse high-dimensional representation and generalized graph diffusion mechanism, the problems of training complexity and low information efficiency of graph neural network in vehicle trajectory prediction are solved, and more accurate vehicle path prediction is achieved. , optimizing traffic conditions.
Patent Information
- Application Number
- CN202410719516.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Existing graph neural networks have problems in vehicle trajectory prediction, such as discrete data structure, high training complexity, difficulty in comprehensively considering information features, and low efficiency.
Using a method based on decoupled graph diffusion neural network, the vehicle trajectory map is processed through sparse high-dimensional representation, combined with generalized graph diffusion and multi-head attention mechanism, using hierarchical decoupling to represent the learning process to capture global information and prevent information loss.
The accuracy and reliability of vehicle trajectory prediction are improved, vehicle paths can be predicted more accurately, traffic congestion can be reduced, and road utilization can be optimized.
Smart Images

Figure CN118569307A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle trajectory prediction, and in particular to a vehicle trajectory prediction method and system based on a decoupled graph diffusion neural network. Background Art
[0002] As urbanization intensifies, the number of vehicles in cities continues to rise, roads are congested, traffic accidents occur frequently, and the problem of vehicle path prediction becomes increasingly important. Accurately predicting the driving path of vehicles helps to better plan and manage traffic, improve road utilization and reduce traffic congestion. Path prediction is also an important prerequisite for autonomous driving technology, which can help autonomous vehicles better perceive the surrounding environment, make more accurate decisions, and improve the safety and reliability of autonomous driving.
[0003] Path prediction collects and analyzes vehicle driving data and uses advanced algorithms and models to predict the possible trajectory of a vehicle in the future. In recent years, the development of deep learning technology has provided new ideas and methods for vehicle path prediction; however, in related technologies, the application of graph neural networks still has the following problems:
[0004] (1) The data structure of the graph is discrete and consists of nodes and edges; this increases the complexity of training and optimization of graph generation models (e.g., gradient calculation), making it difficult to directly apply widely used optimization algorithms to back-propagation training.
[0005] (2) There may be some information features that cannot be effectively taken into account, and it relies on neighboring nodes to update the hidden state of the current node, which is inefficient. Summary of the invention
[0006] In order to solve the problems existing in the related art, the present invention provides a vehicle trajectory prediction method and system based on a decoupled graph diffusion neural network, which can obtain information features more comprehensively and improve the accuracy of vehicle trajectory prediction.
[0007] To achieve the above object, the present invention provides a vehicle trajectory prediction method based on a decoupled graph diffusion neural network, comprising:
[0008] Acquire driving process information from real-time vehicle data, and construct a vehicle trajectory map based on the driving process information;
[0009] Processing the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph;
[0010] Inputting the initial graph into a pre-trained trajectory prediction model to obtain a vehicle prediction trajectory output by the trajectory prediction model;
[0011] Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
[0012] Optionally, processing the vehicle trajectory graph based on a sparse high-dimensional representation method includes:
[0013] Classifying the node data in the vehicle trajectory graph according to attributes;
[0014] Discretize the classified node data and construct the unique hot vector of each attribute;
[0015] A mapping relationship between each of the one-hot vectors and the corresponding high-dimensional real-valued embedding vector is constructed.
[0016] Optionally, the driving process information includes an angle relative to the road, a distance to an adjacent left lane mark, a distance to an adjacent right lane mark, and a distance to a front obstacle; constructing a vehicle trajectory map according to the driving process information includes:
[0017] According to the driving process information, obtaining the historical driving trajectory of the vehicle;
[0018] Uniformly sampling the historical driving trajectory of the vehicle to obtain the historical trajectory nodes of the vehicle;
[0019] Based on the vehicle historical trajectory nodes, a vehicle trajectory graph is constructed.
[0020] Optionally, two adjacent trajectory nodes v in the initial structure graph i to v j The side information transmission process uses A i,j Indicates that A i,j The expression is as follows:
[0021]
[0022] In the formula, E() represents signal energy; S() represents information entropy; x i is the i-th trajectory node v i The eigenvector of j is the jth trajectory node v j The eigenvector of
[0023] Trajectory node v i The signal energy is calculated using the following formula:
[0024]
[0025] In the formula, M represents the number of trajectory node features; τ represents the trajectory time length of the historical backtracking window; n represents x i The length of the sequence;
[0026] Trajectory node v i The information entropy of is calculated using the following formula:
[0027]
[0028] In the formula, x i The non-repeating sequence is represented by {s 0 , ..., sj}; p(s j ) represents the value s j The probability of j For x j Status statement;
[0029]
[0030] Where δ() represents the Dirac delta function.
[0031] Optionally, the trajectory prediction model uses the following formula when performing a generalized graph diffusion operation:
[0032]
[0033] In the formula, Q l represents the diffusion matrix of the lth neural network layer; k represents the maximum diffusion step length; θ l,k represents the weight coefficient; T l,k Represents a column random transformation matrix.
[0034] Optionally, the trajectory prediction model uses a hierarchical decoupling method to represent the learning process, including:
[0035] A hierarchical decoupled representation learning strategy is used to capture the hierarchical features of each hidden layer; each hidden layer includes a parallel generalized graph diffusion layer and an attention layer; the update rule of the hidden layer adopts the following formula:
[0036]
[0037]
[0038] Where H' l represents the node representation of the lth layer; σ() represents the activation function; ζ() represents multi-head attention; || represents concatenation; Q l represents the diffusion matrix of the lth neural network layer; W l Represents the weight matrix of layer-wise training; The weight matrix representing the diffusion process; H represents the weight matrix of the update process of the l-th layer node; l Represents potential diffusion representation; A t represents the adjacency matrix of all nodes; ⊙ is the Hadamard product, which means the multiplication of corresponding elements; Represents the bias vector of the lth layer.
[0039] Optionally, the training method of the trajectory prediction model includes:
[0040] Input the training data into the trajectory prediction model;
[0041] The trajectory prediction model outputs a prediction value by forward propagating the features of the training data through a decoupled graph diffusion neural network;
[0042] The trajectory prediction model obtains the loss value by calculating the cross entropy function between the actual output probability and the expected output probability, and then uses back propagation to update the weight parameters;
[0043] The trajectory prediction model iteratively updates the weight parameters until the predicted value and the true value meet the preset conditions.
[0044] Optionally, the trajectory prediction model includes: a generalized graph diffusion layer, a multi-head attention layer and a graph neural network;
[0045] A hierarchical decoupling method is used between the generalized graph diffusion layer and the multi-head attention layer to capture hierarchical features and relationships at different levels between trajectory nodes in the initial graph; the generalized graph diffusion layer uses generalized graph diffusion to capture the global information of the initial graph; the multi-head attention layer uses the output of the generalized graph diffusion layer as input to capture the global correlation of connected nodes and the global dependency of non-connected nodes in the initial graph; the graph neural network uses the output of the multi-head attention layer as input to aggregate features from the vicinity of the trajectory nodes.
[0046] Optionally, the method further includes:
[0047] The predicted vehicle trajectory is rendered and displayed on a UI interface.
[0048] The present invention also provides a vehicle trajectory prediction system based on a decoupled graph diffusion neural network, comprising:
[0049] A trajectory map acquisition module is used to acquire the driving process information in the real-time data of the vehicle and construct a vehicle trajectory map according to the driving process information;
[0050] An initial graph acquisition module, used for processing the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph;
[0051] A prediction module, used to input the initial graph into a pre-trained trajectory prediction model to obtain a vehicle prediction trajectory output by the trajectory prediction model;
[0052] Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
[0053] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0054] The present invention provides a vehicle trajectory prediction method based on a decoupled graph diffusion neural network. By using a sparse high-dimensional representation method to process vehicle trajectory data (vehicle trajectory graph), the feature space can be expanded to a higher dimension under the premise of given relatively low-dimensional observed vehicle real-time data, thereby avoiding the difficulty of encoding complex motion in a low-dimensional space; getting rid of the constraints of expressing complex motion patterns in a low-dimensional space, and providing a solid theoretical basis and technical support for the accuracy and reliability of vehicle trajectory prediction.
[0055] The trajectory prediction model adopted by the present invention when performing trajectory prediction utilizes generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph; through generalized graph diffusion, information can be diffused in a larger neighborhood, so that the relationship and global information in the graph can be better captured, which helps to have a deeper understanding of the structure of the graph.
[0056] In the related art, GNN obtains the final node information representation by continuously aggregating and updating node information; however, this may lead to a high degree of distortion of node feature representation; the trajectory prediction model used in the present invention adopts a hierarchical decoupled representation learning strategy, constructing each layer as a generalized graph diffusion layer and an attention layer in parallel, capturing the internal hierarchical features between each trajectory node, which can effectively prevent the loss of unique local information in the learning representation, help aggregate global information, and avoid omissions of potential information. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.
[0058] Figure 1 A schematic diagram of a method flow of a vehicle trajectory prediction method based on a decoupled graph diffusion neural network according to an embodiment of the present invention;
[0059] Figure 2 Schematic diagram of the logical structure of the vehicle trajectory prediction method shown in an embodiment of the present invention Figure 1 ;
[0060] Figure 3 Schematic diagram of the logical structure of the vehicle trajectory prediction method shown in an embodiment of the present invention Figure 2 ;
[0061] Figure 4 A schematic diagram of a hierarchical decoupled representation learning method according to an embodiment of the present invention;
[0062] Figure 5 A data representation diagram showing the application of high-dimensional embedding vectors to represent vehicle trajectories according to an embodiment of the present invention;
[0063] Figure 6 A schematic diagram of constructing a four-hot vector and a multi-resolution loss function vector according to an embodiment of the present invention;
[0064] Figure 7 A schematic diagram of a decoupled graph diffusion neural network model shown in an embodiment of the present invention;
[0065] Figure 8 This is a diagram showing the trajectory prediction results of an autonomous driving vehicle according to an embodiment of the present invention;
[0066] Fig. 9 A schematic diagram of the module structure of a vehicle trajectory prediction system based on a decoupled graph diffusion neural network according to an embodiment of the present invention;
[0067] Fig.10 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] See also Figure 2 and Figure 3 The present invention collects real-time data from the vehicle sensor system, extracts vehicle driving information, and creates a vehicle trajectory graph; then, a sparse high-dimensional representation of the node data is performed, a mapping relationship with a high-dimensional real-valued embedding vector is established, and the initial graph is constructed using the node information; then, the processed node and edge information is input into the prediction model, and the optimal graph topology structure is learned through generalized graph diffusion, and the connection between each node is gradually established. A hierarchical decoupling method is used to represent the learning process, and the optimal objective function is obtained by minimizing the risk function, so that the model is optimized and learned, and finally the predicted trajectory is output.
[0070] The present invention provides a vehicle trajectory prediction method and system based on a decoupled graph diffusion neural network, which adopts a DGDNN model, which is a decoupled graph diffusion neural network. From the perspective of information transmission, the signal energy is used as a quantitative indicator, and information entropy is used as directional connectivity to construct a graph structure. The application of a decoupled graph diffusion neural network can improve the accuracy of trajectory prediction, and can more accurately grasp the driving path of the vehicle, which helps to reduce traffic congestion, optimize road utilization, and thus improve the traffic conditions in the city, bringing more convenient and efficient travel experience to citizens.
[0071] See also Figure 1 The above-mentioned vehicle trajectory prediction method based on the decoupled graph diffusion neural network may include the following steps:
[0072] Step 101: Acquire driving process information in real-time vehicle data, and construct a vehicle trajectory map based on the driving process information.
[0073] In the application, the vehicle can be equipped with a data acquisition device to collect driving trajectory data in real time, that is, to obtain real-time data; real-time data may exemplarily include: images collected by camera sensors, point clouds collected by lidar sensors, point clouds collected by millimeter-wave radar sensors, etc.; by setting up a data acquisition device, the vehicle's motion data and original road data can be obtained in real time.
[0074] In one embodiment, the driving process information includes the angle relative to the road, the distance to the adjacent left lane mark, the distance to the adjacent right lane mark, and the distance to the obstacle ahead; wherein the obstacles include: vehicles, pedestrians, barricades, guardrails, etc.; the above-mentioned vehicle trajectory map constructed according to the driving process information includes:
[0075] According to the driving process information, the historical driving trajectory of the vehicle is obtained;
[0076] Uniformly sample the historical driving trajectory of the vehicle to obtain the historical trajectory nodes of the vehicle;
[0077] Based on the vehicle historical trajectory nodes, a vehicle trajectory graph is constructed.
[0078] In the application, the vehicle trajectory segments can be uniformly sampled at time intervals t to obtain the vehicle historical trajectory nodes v i ,Through data processing, four types of information are obtained, including the angle of the car relative to the road, the distance to the signs of the two adjacent lanes (left lane and right lane), and the distance from the vehicle to the car in front, as the characteristic information of the trajectory node.
[0079] Edge feature information: Information quantity is used as a metric. Information quantity is the information brought by a node. Information entropy is the expectation of the amount of information that may be generated before the result comes out, that is, considering all possible values of the random variable, that is, the expectation of the amount of information brought by all possible events. Information entropy is used as the quantification of connectivity between two trajectory points, and signal energy is used as its strength. The information quantity measures the quantitative information brought by a trajectory node. A weight matrix is associated with each edge to represent the information transmission relationship between different nodes. Thus, A i,j Indicates that from v i to v j The side information transmission relationship.
[0080] Since the energy of the signal reflects its strength during propagation, which may affect the information received by the receiver, the information entropy is used as the directional connectivity between two adjacent trajectory points, and the signal energy is used as its strength to quantify the link between the nodes; its adjacency matrix can be expressed as A.
[0081] Two adjacent trajectory nodes v in the initial structure graph i to v j The side information transmission process can be used by the above A i,j To express; A i,j The expression is as follows:
[0082]
[0083] In the formula, E() represents signal energy; S() represents information entropy;
[0084] Trajectory node v i The signal energy is calculated using the following formula:
[0085]
[0086] Where M represents the number of trajectory point features; τ represents the trajectory time length of the historical backtracking window;
[0087] Trajectory node v i The information entropy of is calculated using the following formula:
[0088]
[0089] In the formula, x i The non-repeating sequence is {s 0 , ..., s j}; p(s j ) represents the value s j The probability of
[0090]
[0091] Where δ() represents the Dirac delta function.
[0092] It should be noted that since the collected real-time data and data sets are being used to predict the future trend of the current vehicle's trajectory, it is necessary to convert the regression task of predicting the precise trajectory route into a time node classification task. Given a path trajectory over a period of time τ in the past, let the model learn from the historical backtracking window of length τ and predict their probability in the next time period. The mapping relationship of the prediction work is expressed as follows:
[0093]
[0094] Where, f() represents the DGDNN model; E t represents an edge set; represents a node set; G t represents the graph structure at time t; C t+1 Represents the prediction result at time t+1.
[0095] Step 102: Process the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph.
[0096] In the application, the node data can be processed by sparse high-dimensional representation method, which includes constructing high-dimensional real-valued embedding vector e att The mapping relationship of Display vehicle tracks, using (A t ) i,j Represents edge information and constructs the initial graph. 0:T Represents the vehicle trajectory.
[0097] The outliers and missing data that data often contain can affect predictions; in the training phase, the presence of outliers and missing data introduces additional noise and uncertainty, which may affect the convergence of the learning process; in the evaluation phase, missing data prevents the calculation of prediction errors, while outliers lead to inaccurate evaluations of prediction accuracy. In order to mitigate the impact of outliers and missing data, the vehicle trajectory map can be preprocessed; data preprocessing can include: data cleaning, feature selection and scaling, data set construction, encoding construction, data normalization, etc.
[0098] 1) Data cleaning: Clean the noise, outliers and inconsistencies in the data; specifically, remove the vehicle position information with unrealistic speed values; remove the vehicle position information with unchanged position; remove the vehicle position observations that are too close to the starting point; divide long distances into shorter distances with a maximum sequence length of 10 minutes.
[0099] 2) Feature selection and scaling: In the initial stage of data preprocessing, selecting relevant features and scaling them helps eliminate redundancy and maintain data consistency. Feature selection identifies and retains only the most relevant attributes while discarding irrelevant or redundant attributes while ensuring that all features are within a consistent range, thereby facilitating more efficient and effective data analysis.
[0100] 3) Dataset Partitioning: The dataset used for analysis is carefully partitioned into three different subsets: training set, validation set, and test set. The training set is the largest portion of the data and is used for model building and parameter estimation. The validation set, although smaller, plays a crucial role in fine-tuning the model and preventing overfitting. Finally, the test set serves as an independent evaluation tool that allows researchers to assess the generalization and predictive power of the model.
[0101] 4) Data encoding: The process of data encoding is to systematically encode the collected and pre-processed data to make model calculations easier and more efficient. This stage involves mapping the raw data to a set of pre-defined categories or values to enable the data to be processed by machines. The goal of data encoding is to convert the data into a format that is computer-readable and conducive to statistical analysis.
[0102] 5) Data Normalization: Data normalization is a key step in data preprocessing, the goal is to ensure consistency in the numerical range of all features. This technique rescales the data to a common range, between 0 and 1. This normalization can alleviate the problem of different scales and ranges between different features. By normalizing the data, it is ensured that all features contribute equally to the model and the results are not distorted by a few dominant features with large values.
[0103] In one embodiment, the vehicle trajectory graph is processed based on the sparse high-dimensional representation method, including:
[0104] Classify the node data in the vehicle trajectory graph according to the attributes;
[0105] Discretize the classified node data and construct the unique hot vector of each attribute;
[0106] Construct a mapping relationship between each one-hot vector and the corresponding high-dimensional real-valued embedding vector.
[0107] Please attend Figure 4 , Figure 5 and Figure 6 In the application, the node data can be discretized by constructing a one-hot encoding, constructing a four-hot vector, and establishing a mapping relationship with the high-dimensional embedding vector; the observation value of each trajectory data is discretized according to the attribute classification and a one-hot vector h is constructed for each attribute. att , the connection of the four unique hot vectors forms the vector ht ; Each h att With the high-dimensional real-valued embedding vector e att Construct a mapping relationship and use the embedding vector e t Indicates e att The set and, where e t Represents x t high-dimensional embedding vector of .
[0108] Discretization of node data: The observation values of each trajectory data are discretized according to attribute classification. In order to express the size relationship within the data, the ranking is used instead of the original data for processing. In this processing process, the features are converted into numerical inputs acceptable to the machine learning algorithm, effectively expanding the feature space to represent more comprehensive and accurate feature information.
[0109] Construct one-hot encoding: construct a one-hot vector h for each attribute att , that is, by using an N-bit state register to encode N states, each state has its own independent register bit, and at any time, only one of them is valid.
[0110] Construct a four-hot vector: Concatenate the four one-hot encodings sequentially to form a long vector consisting of four one-hot vectors. The concatenation of the four one-hot vectors forms the vector h t .
[0111] Establish a mapping relationship with the high-dimensional embedding vector: transform each h att With the high-dimensional real-valued embedding vector e att Construct a mapping relationship and use the embedding vector e t Indicates e att The set and then e t It means x t high-dimensional embedding vector; that is, use a linear transformation to map the high-dimensional unique hot vector representing the real value to a low-dimensional space through a linear transformation, and transform to obtain a low-dimensional vector representing the real value, embedding the high-dimensional representation of the item into the low-dimensional space, and the i-th column of the matrix for linear transformation is the i-th real-valued "embedding vector". att With the high-dimensional real-valued embedding vector e att The mapping relationship is constructed and the mapping is effectively adjusted by imposing this sparsity constraint, and overfitting can be avoided when the original 4-dimensional observations are expanded to a higher-dimensional space.
[0112] Step 103: inputting the initial graph into the pre-trained trajectory prediction model to obtain the vehicle prediction trajectory output by the trajectory prediction model;
[0113] Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
[0114] In the application, the processed node and edge information can be input into the prediction model, and the multi-head attention mechanism can be combined with generalized graph diffusion to learn the optimal graph topology structure of the task, so as to gradually establish the connection between each node. The hierarchical decoupling method is used to represent the learning process, and the best model performance is obtained by minimizing the optimal objective function, and finally the prediction trajectory is output.
[0115] like Figure 7 As shown in the figure, a vehicle trajectory prediction model is established using DGDNN. The model uses the diffusion and propagation methods of DGDNN (Decoupled Graph Diffusion Neural Network) to perform hierarchical decoupling, establish a prediction model for the complex relationship between vehicle points, and learn to obtain the global and local correlation of the vehicle.
[0116] In one embodiment, the trajectory prediction model includes: a generalized graph diffusion layer, a multi-head attention layer, and a graph neural network;
[0117] A hierarchical decoupling method is used between the generalized graph diffusion layer and the multi-head attention layer to capture the hierarchical features and relationships at different levels between the trajectory nodes in the initial graph; the generalized graph diffusion layer uses generalized graph diffusion to capture the global information of the initial graph; the multi-head attention layer takes the output of the generalized graph diffusion layer as input to capture the global correlation of connected nodes and the global dependency of non-connected nodes in the initial graph; the graph neural network takes the output of the multi-head attention layer as input to aggregate features from the vicinity of trajectory nodes.
[0118] In the application, the trajectory prediction model mainly includes a generalized graph diffusion layer, a multi-head attention layer, and a graph neural network. A hierarchical decoupling method is used between graph diffusion and multi-head attention, so that the model can gradually capture features and relationships at different levels, thereby learning a more accurate and comprehensive graph topology. The generalized graph diffusion layer can capture complex relationships and global information in the graph through global diffusion, learn the optimal edges for the task, and propagate different types of information adaptively. The multi-head attention layer introduces a multi-head attention mechanism after graph diffusion. The multi-head attention layer uses the output of the generalized graph diffusion layer as input; the purpose is to better capture the global correlation of connected nodes and the global dependency of non-connected nodes.
[0119] Graph neural networks can aggregate features from node neighbors to propagate information. Each neuron receives the output of neurons in the previous layer and performs a weighted summation before processing it through a softmax activation function. This enables it to handle nonlinear problems and establish a mapping relationship between input and output by learning appropriate weights and biases.
[0120] In the trajectory prediction model, each hidden layer is composed of a generalized graph diffusion layer and an attention layer. The augmented graph, as a global view, better aggregates global features and can more effectively capture long-range relationships in the graph. At the same time, the attention mechanism is introduced. The multi-head attention mechanism can extract global features at different stages and update them layer by layer. The loss function is used to calculate the loss value, that is, the similarity between the actual output probability and the expected output probability. The weight parameters are updated through back propagation to reduce the loss between the true value and the predicted value for optimization until the optimal result is obtained. After learning, training and optimization, the trajectory prediction model can be used to predict driving behavior.
[0121] The trajectory prediction model used in the present invention is a prediction model based on a graph neural network, and its specific structure is as follows:
[0122] Given a graph G, the aggregation update process of neighbor node features can be expressed as follows:
[0123]
[0124] Among them, N(v)={u∈V|(u,v)∈E} represents the neighbor nodes of node v; represents the neighbor information aggregation function; Represents a node update function. Indicates that the neighbor node v is Node representation of the layer; represents the update function; Indicates that node v is in Node representation of a layer.
[0125] Ordinary graph convolutional networks only aggregate features from node neighbors to propagate information, but this may ignore potential incompatibilities between the provided graph and the task objectives, and some edges are irrelevant to the task, resulting in performance degradation. In order to solve such problems, the present invention captures complex relationships and global information in the graph through global diffusion, and the learned task-optimal edges adaptively propagate different types of information. Specifically, the following formula can be used to represent the generalized aggregation update process of the node:
[0126]
[0127] Among them, Conv2d 1×1 () represents a 2D convolutional layer with a 1x1 kernel; represents the function of stacking all relationship node representations; S l,r represents the diffusion matrix; represents the weight matrix in the diffusion process; H l-1 represents the potential diffusion of l-1 layers; H l Represents potential diffusion representation.
[0128] The optimal graph topology of the deep learning task is captured through generalized graph diffusion technology, capturing various complex relationships and global information in the graph. Each node can receive information from its neighbor nodes or non-neighbor nodes and update its own state, capturing and propagating information in each layer. The specific diffusion matrix representation method is as follows:
[0129]
[0130] In the formula, Q l represents the diffusion matrix of the lth neural network layer; K represents the maximum diffusion step; k represents the diffusion index of the kth step; θ l,k represents the weight coefficient; T l,k represents the column random transformation matrix. Among them, θ l,k As a trainable parameter; T l,k as a trainable matrix; k as a hyperparameter.
[0131] Furthermore, by defining the neighborhood radius to control the effectiveness of generalized graph diffusion, we can avoid redundant and ineffective propagation by representing the set of all nodes r steps away from the central node. l The expression is:
[0132]
[0133] Where K is the maximum diffusion step size, which is a hyperparameter and represents the diffusion range; Θ l,k Represents the weight coefficient.
[0134] The global and local correlations are further captured by combining the multi-head attention module and graph diffusion. The multi-head self-attention mechanism is introduced to better capture the global correlation of connected nodes and the global dependency of non-connected nodes. For a molecular graph with N nodes, the attention mechanism f att The input of is composed of three components, namely, the query Q∈R k×dk , key K∈R N×dk The sum V∈R N×dv , where Q, K, V are linear projections of the input sequence (e for the first layer t, for other layers it is the output sequence of the previous layer). Where dk and dv represent dimensions. To extend the attention to multiple heads, linear projections of Q, K, and V are further used to produce M to represent the subspace. At each layer, the input sequence is projected into a new space V, and the output of the attention block is a weighted sum in V, where the weights represent the relative contribution of each time step. The projection operators of Q, K, and V are learned during the training phase, and the computations are performed in parallel.
[0135] The multi-head self-attention mechanism can learn the different attentions between queries and keys, thereby improving the expressiveness of the model. The multi-head self-attention formula is:
[0136]
[0137] Among them, W O ∈R Mdh×do is the linear projection matrix used to learn the subspace representation of the shrinking head output to the output dimension; W Q m ∈R dk×dk ,W K m ∈R dk×dk and W V m ∈R dv×dv are the projection matrices in the mth head for query, key, and value, respectively. represents the output of each head in the multi-head self-attention mechanism; where O m represents the specific output representation of each head in the multi-head self-attention mechanism; f Aut () represents the function used to calculate self-attention.
[0138] A multi-head self-attention mechanism is used to assist efficient information exchange to capture the long-range interactions between points in the trajectory graph, as described in the following formula:
[0139]
[0140] In the formula, Represents the node representation after being processed by the multi-head self-attention mechanism; LayerNorm() represents the layer normalization operation; Indicates Node representations in the layer that have not been processed by multi-head self-attention; Represents the element-by-element addition operation of the feature; MultiHead() represents the multi-head self-attention mechanism.
[0141] Hierarchical decoupling divides complex systems into multiple levels, separates different focus points or change points into different levels or modules, so that each level or module can focus more on its own tasks, thereby reducing the complexity of the system. Through hierarchical decoupling, the graph diffusion process is separated from tasks such as feature extraction and classification, so that each level can focus on its own tasks. The self-attention layer assigns weights to nodes based on the feature information of the current layer, guiding the model to focus on important nodes and relationships. This layer-by-layer in-depth learning method enables the model to gradually capture the features and relationships of different levels, thereby learning a more accurate and comprehensive graph topology. The layer update rules are defined as follows:
[0142]
[0143]
[0144] Among them, H' l represents the node representation of the lth layer; σ() is the activation function; ζ() represents multi-head attention; || represents concatenation; W l Represents a layer-wise trainable weight matrix.
[0145] The introduction of loss function can measure the difference between the model's predicted value and the true value. In order to avoid gradient dissipation, the present invention introduces the cross entropy function. After obtaining the loss value by calculating the similarity between the actual output probability and the expected output probability, the model updates each parameter through back propagation to reduce the loss between the true value and the predicted value, so that the predicted value generated by the model is closer to the true value. Here, the vector h t It is a discrete representation of continuous text. This discretization can be performed at different resolutions. Here, the cross entropy function is improved to a multi-resolution version cross entropy function. By calculating h t+l The cross entropy at different spatial resolutions can slightly improve the prediction effect of the model. The cross entropy function is defined as follows:
[0146]
[0147] in, h′ t+l Yes t+l is a coarse version of ; β is a scalar for the relative importance of the coarse resolution loss; CE denotes cross entropy. p' t+l Indicates the prediction result at time t+1; h' t+l Four-hot vector representing coarse resolution; e 0:T+l-1 represents the high-dimensional embedding vector of the trajectory from 0 to T+l-1; p() represents the probability distribution function; p t+l represents the predicted probability at time t+l; h t+lrepresents a four-hot vector; β represents a scalar for the relative importance of the coarse resolution loss; represents the multi-resolution cross entropy loss function; L represents the total number of information propagation layers.
[0148] Through back propagation, each trainable parameter is updated to gradually reduce the prediction error. The above steps are repeated until the model performance is optimized by calculating the final objective function on the validation set to minimize the objective function. The discriminant function of the linear classifier is used as the final objective function as follows:
[0149]
[0150] Among them, B represents the batch size, which means the number of samples in the data set; represents the multi-resolution cross entropy loss function; L represents the number of information propagation layers; α represents the weight coefficient for controlling the neighborhood radius. g represents the objective function; t represents the time step; p t+1 represents the predicted probability at time t+1; f() represents the diffusion neural network model of this decoupled graph; X t represents the input features at time t; A represents the adjacency matrix; α represents the weight coefficient controlling the neighborhood radius; l represents the current layer number; L represents the total number of layers of information propagation; r l represents the residual of the lth layer; Θ l,k represents the weight coefficient in the diffusion process; k represents the diffusion index of the kth step; K represents the maximum diffusion step length.
[0151] Finally, the regression task of predicting the precise trajectory route can be converted into a time node classification task. Given a path trajectory at a past time τ, the model is allowed to learn from a historical backtracking window of length τ to obtain the final driving behavior output sequence, which is activated by the Softmax function and predicted to have a probability in the next time period. Then, possible potential future trajectory points are sampled from them and decoded using a potential decoder to obtain the endpoint information generated by the network.
[0152] In applications, the training set and validation set data can be used to train the constructed prediction model, and the optimal objective function value can be obtained by minimizing it, thereby gradually improving the model performance.
[0153] In one embodiment, a method for training a trajectory prediction model includes:
[0154] Define the dataset: Input the processed training data into the predictive model.
[0155] Forward propagation: The prediction model transmits the required data features through the forward propagation through the decoupled graph diffusion neural network to output the prediction result.
[0156] Back propagation: Use the residuals in the training data to correct the errors in the test data. The loss value is obtained by calculating the cross entropy function between the actual output probability and the expected output probability, and then back propagation is used to update each parameter to reduce the loss between the true value and the predicted value, so that the predicted value generated by the model is closer to the true value.
[0157] Iteration: Repeat the above steps to update the parameters and gradually optimize the performance of the model.
[0158] Tuning: Use the validation data set prepared during data processing to estimate the generalization error during or after training. Based on the validation results, update the hyperparameters of the prediction model to optimize model performance.
[0159] When training the trajectory prediction model, first, collect the data set related to the prediction problem and complete the data cleaning and preprocessing. The cleaned and preprocessed data set is divided into a training set, a validation set, and a test set. When training, the selected model is trained using the training set. During the training process, the model learns the relationship between the input data and the output target; by setting a suitable loss function, the difference between the model prediction value and the true value can be measured; the loss function used can be exemplarily a cross entropy function, and the parameters of the model are updated iteratively to minimize the loss function. Secondly, the model is tuned to adjust the model's hyperparameters (such as learning rate, regularization coefficient, batch size, etc.) according to the performance of the model on the validation set; try different model architectures or increase the complexity of the model to improve the prediction performance. Finally, the model is evaluated and tuned, and the tuned model is evaluated using the test set. Evaluation indicators include accuracy, precision, etc. After the model training reaches the expected optimal performance, the model is deployed and monitored. The trained model is deployed in actual applications and its performance is continuously monitored; new data is introduced regularly, and the model is updated and retrained to maintain its prediction ability.
[0160] In one embodiment, the vehicle trajectory prediction method further includes:
[0161] Render the predicted vehicle trajectory and display it on the UI interface.
[0162] In the application, the trajectory prediction model can also be visualized to show the predicted trajectory; according to the predicted probability distribution of each driving behavior category, prompts for going straight, turning left, turning right, accelerating, decelerating and stopping can be given to help drivers more intuitively understand the prediction results of this model.
[0163] like Figure 8As shown in the figure, the results of the prediction of autonomous driving behavior are displayed. The vehicle trajectory prediction display interface shows the historical trajectory of the target vehicle at the current moment, the local interaction with the surrounding roads and vehicles, and provides interaction information of nearby vehicles. "Target historical trajectory" refers to the driving trajectory record of the target vehicle of interest in the past period of time. "Predicted trajectory" means the system's prediction result of the target vehicle's future driving path based on the historical trajectory analysis during the vehicle's operation. "True value trajectory" represents the target vehicle's driving trajectory actually observed during the training process. By comparing it with the predicted trajectory, the system is trained and optimized, and the accuracy and reliability of the prediction system are evaluated. During use, this interface can show the driver the real-time driving behavior of the vehicle and provide relevant route suggestions.
[0164] The vehicle trajectory prediction method provided by the present invention, by constructing a sparse high-dimensional representation of vehicle trajectory data, cleverly solves the problem of difficulty in accurately modeling the inherent heterogeneity and multimodal characteristics of motion data given a relatively low-dimensional observation; not only does it expand the feature space to a higher dimension to avoid the difficulty of encoding complex motion in a low-dimensional space, but it also uses a unique four-hot connection method to effectively adjust the mapping, thereby greatly reducing the possibility of overfitting; this high-dimensional expansion of the feature space provides an effective solution to the problem of limited trajectory prediction of vehicles under insufficient data collection conditions, gets rid of the constraints of expressing complex motion patterns in a low-dimensional space, and provides a solid theoretical basis and technical support for the accuracy and reliability of vehicle trajectory prediction.
[0165] The present invention adopts the method of generalized graph diffusion to learn the optimal graph topology of the task, so as to better capture the relationships and global information in the graph. The process of generalized graph diffusion can be performed on the trajectory scatter plot we constructed. Through this method, the principle of generalized diffusion can be used to learn the optimal topological structure. The advantage of this method is that by diffusing information in a larger neighborhood, it can more effectively capture the long-range dependencies and global information in the graph. Long-range dependencies and global information are key elements for better understanding and parsing the structure of vehicle trajectory graphs. In the specific implementation process, through generalized graph diffusion, information can be diffused in a larger neighborhood, which can better capture the relationships and global information in the graph, thereby having a deeper understanding of the structure of the graph.
[0166] Existing GNNs obtain the final node information representation by continuously aggregating and updating node information. However, this may lead to a high degree of distortion in the node feature representation. The present invention adopts a hierarchical decoupled representation learning strategy, constructing each layer as a generalized graph diffusion layer and an attention layer in parallel, capturing the internal hierarchical features between each trajectory point, which can prevent the loss of unique local information in the learning representation, help aggregate global information, and avoid the omission of potential information.
[0167] Corresponding to the aforementioned application function implementation method embodiment, the present invention also provides a vehicle trajectory prediction system, device, medium and corresponding embodiments based on a decoupled graph diffusion neural network.
[0168] See also Fig. 9 , Fig. 9 The module structure diagram of the vehicle trajectory prediction system is shown in FIG. The vehicle trajectory prediction system includes:
[0169] A trajectory map acquisition module 91 is used to acquire driving process information in the real-time data of the vehicle and construct a vehicle trajectory map according to the driving process information;
[0170] An initial graph acquisition module 92, used to process the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph;
[0171] A prediction module 93, used for inputting the initial graph into a pre-trained trajectory prediction model to obtain a vehicle prediction trajectory output by the trajectory prediction model;
[0172] Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
[0173] In one embodiment, the vehicle trajectory prediction system further includes:
[0174] The data preprocessing module is used to perform data preprocessing on the vehicle trajectory map.
[0175] Among them, data preprocessing may exemplarily include: data cleaning, feature selection and scaling, data set construction, encoding construction, data normalization, etc.
[0176] In one embodiment, the vehicle trajectory prediction system further includes:
[0177] The visualization module is used to render the predicted vehicle trajectory and display it on the UI interface.
[0178] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0179] An electronic device is also provided in an embodiment of the present invention. Fig.10 , the electronic device 1000 includes a memory 1010 and a processor 1020 .
[0180] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0181] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0182] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.
[0183] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing part or all of the steps in the above method of the present invention.
[0184] Alternatively, the present invention may also be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) on which an executable code (or a computer program or a computer instruction code) is stored. When the executable code (or a computer program or a computer instruction code) is executed by a processor of an electronic device (or a server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present invention.
[0185] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A vehicle trajectory prediction method based on decoupled graph diffusion neural network, characterized in that: include: Acquire driving process information from real-time vehicle data, and construct a vehicle trajectory map based on the driving process information; Processing the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph; Inputting the initial graph into a pre-trained trajectory prediction model to obtain a vehicle prediction trajectory output by the trajectory prediction model; Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
2. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The vehicle trajectory graph is processed based on a sparse high-dimensional representation method, including: Classifying the node data in the vehicle trajectory graph according to attributes; Discretize the classified node data and construct the unique hot vector of each attribute; A mapping relationship between each of the one-hot vectors and the corresponding high-dimensional real-valued embedding vector is constructed.
3. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The driving process information includes an angle relative to the road, a distance to an adjacent left lane mark, a distance to an adjacent right lane mark, and a distance to a front obstacle; Constructing a vehicle trajectory map according to the driving process information includes: According to the driving process information, obtaining the historical driving trajectory of the vehicle; Uniformly sampling the historical driving trajectory of the vehicle to obtain the historical trajectory nodes of the vehicle; Based on the vehicle historical trajectory nodes, a vehicle trajectory graph is constructed.
4. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: Two adjacent trajectory nodes v in the initial structure graph i to v j The side information transmission process uses A i,j Indicates that A i,j The expression is as follows: In the formula, E() represents signal energy; S() represents information entropy; x i is the i-th trajectory node v i The eigenvector of j is the jth trajectory node v j The eigenvector of Trajectory node v i The signal energy is calculated using the following formula: In the formula, M represents the number of trajectory node features; τ represents the trajectory time length of the historical backtracking window; n represents x i The length of the sequence; Trajectory node v i The information entropy of is calculated using the following formula: In the formula, x i A non-repeating sequence of j }; p(s j ) represents the value s j The probability of j For x j Status statement; Where δ() represents the Dirac delta function.
5. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The trajectory prediction model uses the following formula when performing the generalized graph diffusion operation: In the formula, Q l represents the diffusion matrix of the lth neural network layer; k represents the maximum diffusion step length; θ l,k represents the weight coefficient; T l,k Represents a column random transformation matrix.
6. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The trajectory prediction model adopts a hierarchical decoupling method to represent the learning process, including: A hierarchical decoupled representation learning strategy is used to capture the hierarchical features of each hidden layer; each hidden layer includes a parallel generalized graph diffusion layer and an attention layer; the update rule of the hidden layer adopts the following formula: Where H' l represents the node representation of the lth layer; σ() represents the activation function; ζ() represents multi-head attention; || represents concatenation; Q l represents the diffusion matrix of the lth neural network layer; W l Represents the weight matrix of layer-wise training; The weight matrix representing the diffusion process; H represents the weight matrix of the update process of the l-th layer node; l Represents potential diffusion representation; A t represents the adjacency matrix of all nodes; ⊙ is the Hadamard product, which means the multiplication of corresponding elements; Represents the bias vector of the lth layer.
7. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The training method of the trajectory prediction model includes: Input the training data into the trajectory prediction model; The trajectory prediction model outputs a prediction value by forward propagating the features of the training data through a decoupled graph diffusion neural network; The trajectory prediction model obtains the loss value by calculating the cross entropy function between the actual output probability and the expected output probability, and then uses back propagation to update the weight parameters; The trajectory prediction model iteratively updates the weight parameters until the predicted value and the true value meet the preset conditions.
8. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The trajectory prediction model includes: a generalized graph diffusion layer, a multi-head attention layer and a graph neural network; A hierarchical decoupling method is used between the generalized graph diffusion layer and the multi-head attention layer to capture hierarchical features and relationships at different levels between trajectory nodes in the initial graph; the generalized graph diffusion layer uses generalized graph diffusion to capture the global information of the initial graph; the multi-head attention layer uses the output of the generalized graph diffusion layer as input to capture the global correlation of connected nodes and the global dependency of non-connected nodes in the initial graph; the graph neural network uses the output of the multi-head attention layer as input to aggregate features from the vicinity of the trajectory nodes.
9. The vehicle trajectory prediction method based on decoupled graph diffusion neural network according to claim 1 is characterized in that: The method further comprises: The predicted vehicle trajectory is rendered and displayed on a UI interface.
10. A vehicle trajectory prediction system based on a decoupled graph diffusion neural network, characterized in that: include: A trajectory map acquisition module is used to acquire the driving process information in the real-time data of the vehicle and construct a vehicle trajectory map according to the driving process information; An initial graph acquisition module, used for processing the vehicle trajectory graph based on a sparse high-dimensional representation method to obtain an initial graph; A prediction module, used to input the initial graph into a pre-trained trajectory prediction model to obtain a vehicle prediction trajectory output by the trajectory prediction model; Among them, the trajectory prediction model is a decoupled graph diffusion neural network; the trajectory prediction model uses generalized graph diffusion and multi-head attention mechanism to capture the global information of the initial graph, and adopts a hierarchical decoupling method to represent the learning process.
Citation Information
Patent Citations
Vehicle track prediction method based on dynamic interaction graph convolution
CN114802296A
Vehicle track prediction method based on intention perception space-time attention network
CN117141518A
Ship track long-term prediction method based on spatial-temporal feature fusion
CN117933492A
Emergency rescue automatic driving vehicle collision risk prediction method and system based on HM-TRW and HAGENN structure search
CN118013856A
Dr big book 5
GB202111188D0
Cited By
Trajectory prediction method and device based on distraction attention model
CN119313703A
A trajectory prediction method and device based on a diffusion attention model
CN119313703B
Robust trajectory prediction method and system based on decoupling space-time network
CN119314333A
A robust trajectory prediction method and system based on decoupled spatiotemporal network
CN119314333B
Method, device and equipment for predicting confrontation trajectory of automatic driving vehicle and medium
CN120096626A
