Vehicle trajectory prediction method, system and device based on adaptive edge generation
By processing vehicle trajectory data through adaptive edge generation and vectorization, combined with MLP decoder and negative log-likelihood function optimization, the accuracy and computational complexity problems of traditional methods in complex traffic scenes are solved, and efficient vehicle trajectories are achieved. predict.
Patent Information
- Application Number
- CN202411049712.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Traditional vehicle trajectory prediction methods are difficult to meet the requirements for high accuracy, robustness and real-time performance in complex traffic scenarios, and the computational complexity and storage overhead are large, making it difficult to effectively capture the sparsity and local features in traffic data.
The adaptive edge generation method is used to process vehicle trajectories and map data through vectorization. The nodes are divided into static and dynamic nodes. Different connection strategies are used to generate edges. The MLP decoder is combined for trajectory prediction, and the negative log likelihood is used to predict the trajectory. Function optimizes model parameters.
It reduces the algorithm complexity, improves the model's computing speed and prediction accuracy, and is suitable for vehicle trajectory prediction in complex traffic scenarios.
Smart Images

Figure CN118568470B_ABST
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, system and device based on adaptive edge generation. Background Art
[0002] In the development of autonomous driving technology, vehicle trajectory prediction is a crucial link. In complex traffic environments, such as urban roads, highways, and intersections, vehicles need to make decisions continuously to deal with various complex situations. By predicting the behavior of other vehicles and pedestrians, the autonomous driving system can respond in time to avoid traffic accidents. In addition, vehicle trajectory prediction also helps to improve traffic fluency and efficiency. By accurately predicting the future driving path of the vehicle, the autonomous driving system can optimize route planning and speed control, thereby reducing traffic congestion and improving road traffic efficiency. Complex interactive scenarios usually include multiple vehicles driving together, frequent lane changes, and intersection crossings. These scenarios increase the complexity of trajectory prediction. Traditional vehicle trajectory prediction methods are mainly based on traditional methods such as rules, statistics, and machine learning. They usually rely on prior knowledge and manually designed features, and show certain effects in some scenarios. However, in complex and dynamic interactive scenarios, due to the limited modeling ability of nonlinear relationships and dynamics, they cannot meet the requirements of autonomous driving systems for high accuracy, robustness, and real-time performance.
[0003] To solve the above problems, researchers usually convert scene maps into bird's-eye images and use convolutional neural networks (CNNs) for analysis. This method is convenient for using general image models, but it is computationally expensive and has a limited perception range. Recent studies have begun to focus on the vectorization of scene maps to achieve more compact scene descriptions. Vectorized maps extract information from trajectories and map features, and use models such as graph neural networks and Transformers to process these scenes to learn the relationship between vectorized entities (such as trajectory waypoints and lane segments). In contrast, vectorized maps provide more detailed and accurate map information, thereby providing more comprehensive perception data for autonomous driving systems. However, in complex traffic scenes such as intersections, objects such as lane lines and obstacles have high complexity and change frequency. Whether the machine driver can also search for objects that need attention in the map to reduce the complexity of the algorithm and improve the operation speed, and whether the amount of calculation can be reduced and the operation efficiency can be improved in the process of building the map, and adding an appropriate amount of semantic information to the constructed map is an urgent problem to be solved.
[0004] In graph convolutional neural networks, edges are expressions of relationships or interactions between nodes, conveying information and influence between nodes. The way they are constructed directly affects the representational capabilities and performance of the network. Traditionally, fully connected graphs are usually used to construct edges in graph neural networks. However, fully connected graphs complicate the network structure and increase computational and storage overhead. In addition, fully connected graphs often have difficulty effectively capturing the sparsity and local features in traffic data, which affects model performance. Summary of the invention
[0005] The purpose of the present invention is to provide a vehicle trajectory prediction method, system and device based on adaptive edge generation to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a vehicle trajectory prediction method based on adaptive edge generation, specifically comprising the following steps:
[0007] Receive vehicle trajectory data and map data of traffic participants and surrounding traffic participants, and perform vector processing on the vehicle trajectory data and map data;
[0008] According to the different node attributes, the nodes are divided into static nodes and dynamic nodes, and an adaptive edge generator is constructed. Different connection strategies are adopted for different nodes to realize edge connection.
[0009] Build a prediction model and use MLP decoder to achieve accurate trajectory prediction;
[0010] The negative log-likelihood function is used as the regression loss to analyze the trajectory prediction results and modify the model parameters. The prediction model is trained to obtain a prediction model that meets the accuracy requirements and is used for vehicle trajectory prediction.
[0011] Furthermore, the vehicle trajectory data and map data are vectorized as follows:
[0012] (1) For map data features, select a starting point and direction, uniformly sample key points from the spline curve with the same spatial distance, and connect adjacent key points sequentially as vectors; for trajectories, start from t = 0 and sample key points at fixed time intervals;
[0013] (2) Connect the samples at each fixed time interval end to end to obtain a directional vector;
[0014] (3) Name the vector , the vector is represented as:
[0015] In the formula , denote the starting point and end point of the vector respectively. Represents this vector feature example.
[0016] Furthermore, the vector feature is specifically an object type, a timestamp of a trajectory, a road feature type, or a speed limit of a lane.
[0017] Furthermore, according to different node attributes, nodes are divided into static nodes and dynamic nodes, and an adaptive edge generator is constructed. Different connection strategies are adopted for different nodes to realize edge connection. The specific strategies are as follows:
[0018] (1) For the edge connections between dynamic nodes, the attention mechanism is improved by introducing the relative angle factor, calculating the relative position between the vehicle to be predicted and other vehicles, and calculating different attention mechanism weights based on the relative positions, and connecting the dynamic nodes based on the weight values;
[0019] (2) For the edge connections of static nodes, the corresponding edges are connected according to the maximum distance control.
[0020] Furthermore, for the edge connections between dynamic nodes, the details are as follows:
[0021] (1) By introducing the relative position factor, the relative position information between vehicles is integrated into the calculation process of the attention weight according to formulas (1) and (2), and the angular relationship between dynamic vehicles is added to the model as a characteristic factor. The specific formula is as follows:
[0022] (1)
[0023] (2)
[0024] in is the activation function. In the graph neural network, it is a two-layer multi-layer perceptron. The three values of Q, K, and V in attention are:
[0025]
[0026] in , is a learnable matrix, according to formula (3) The weight of the edge at time for:
[0027] (3)
[0028] in for and The distance between is the normalization function, is the angle feature, defined as:
[0029] (4)
[0030] in is a learnable matrix, is the effect of the relative angle factor;
[0031] in Expressed as a relative angle factor, in the vehicle In the trajectory prediction of exist The location feature information at a certain moment is expressed as ,in It is a vehicle feature information, T is the historical time of the vehicle; for the lane line ξ, its geometric attributes are given by Given, where and are the starting and ending coordinates of ξ respectively; the vehicle and vehicles In time The relative position information is defined as ,Relative position information includes the relative angle factor, distance, and speed relationship information between the two vehicles;
[0032] (2) To indicate vehicles With vehicle The relative spatial relationship of the vehicle With vehicle The relative angle factor , then the two cars are The relative angle at a moment is defined as , calculate the relative angle value according to formula (5):
[0033] (5)
[0034] in , for The coordinates of the vehicle at the time, , for The coordinates of the vehicle at the time, calculate the weight of the edge Then, a first-order subgraph centered on the vehicle to be predicted is generated according to formulas (6), (7), and (8). The formula is as follows:
[0035] (6)
[0036] (7)
[0037] (8)
[0038] in is the weight value obtained by formula (3), For its own characteristics, is the set of predicted vehicle neighbors, , is a learnable matrix, through The activation function combines the weight features between vehicles and its own characteristics , and finally connect the edges through a selection gate function, and the output is .
[0039] Furthermore, for the edge connections of static nodes, the details are as follows:
[0040] (1) Calculate the relative position information between the vehicle and the lane line on the map, as shown in formula (9):
[0041] (9)
[0042] in, is the MLP encoder for lane segments, are the starting position, ending position and feature vector of lane segment ξ respectively, the spatiotemporal features of the predicted vehicle are used as query input, the lane segment features encoded by MLP are used as key / value input, and the weight between the vehicle and the lane line is calculated;
[0043] (2) Setting hyperparameter thresholds Used to measure the maximum length of the connecting edge between the vehicle and the lane line, the length between the vehicle and the lane line ,when When, through Calculate the weights of vehicles and lane lines , and according to the weights of the vehicle and the lane line Generate edges between vehicle and lane line nodes and build a first-order subgraph centered on the predicted vehicle.
[0044] Furthermore, the MLP decoder is used to achieve accurate trajectory prediction, as follows:
[0045] A two-layer MLP is used as the decoder, which receives the representation of the adaptive edge generator as input and outputs the position of the vehicle at each future time step in the local coordinate frame. and its associated uncertainties , the formula is as follows:
[0046] Assume the input is , the first hidden layer is linearly transformed:
[0047] (10)
[0048] The first hidden layer activation function:
[0049] (11)
[0050] Linear transformation of the second output layer:
[0051] (12)
[0052] Output: (13)
[0053] in , , , are all learnable parameters, where , is the weight matrix, , is the bias vector, is the activation function, To extract the function, is the position index, The index is uncertain.
[0054] Furthermore, the negative log-likelihood function is used as the regression loss to analyze the trajectory prediction results and modify the model parameters. The prediction model is trained to obtain a prediction model that meets the accuracy requirements and is used for vehicle trajectory prediction. The details are as follows:
[0055] (1) Calculate the error between the model-predicted mixture and the ground truth position of each predicted vehicle at each time step. Then, accumulate the errors over all time steps to form a matrix of dimension [F; N];
[0056] (2) According to this matrix, select the trajectory with the smallest error in each predicted vehicle, that is, find the minimum value of each column in the error matrix. The final loss function is the regression loss and equal-weighted classification loss composition:
[0057] (18)
[0058] Use negative log-likelihood as regression loss:
[0059] (19)
[0060] In the formula is the probability density function of the Laplace distribution, , Forecasting vehicles for The position and uncertainty of the best predicted trajectory, To predict the location, For the true position, the cross entropy loss is used as the classification loss to optimize the mixing coefficient.
[0061] According to one aspect of the present invention, the present invention proposes a vehicle trajectory prediction system based on adaptive edge generation, comprising:
[0062] A vectorization module is used to receive the trajectory data of traffic participants in the vehicle trajectory area, the trajectory data of surrounding traffic participants around the vehicle trajectory area, and the environmental feature data in the vehicle trajectory area, and perform vectorization processing on the trajectory data of traffic participants, the trajectory data of surrounding traffic participants, and the map data to obtain the trajectory vectorization data of traffic participants, the trajectory vectorization data of surrounding traffic participants, and the environmental feature vectorization data;
[0063] An encoder module, used to use environmental feature vectorized data as static node data, and use trajectory vectorized data of traffic participants and trajectory vectorized data of surrounding traffic participants as dynamic node data;
[0064] A decoder module is used to input static node data and dynamic node data into a pre-built prediction model, and the prediction model outputs predicted trajectory data, wherein the prediction model is solved by an MLP decoder;
[0065] The training module is used to analyze the trajectory prediction results of the prediction model and modify the prediction model parameters through the negative log-likelihood function as the regression loss, and train the prediction model until the prediction model meets the accuracy requirements.
[0066] According to another aspect of the present invention, the present invention proposes a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the above-mentioned vehicle trajectory prediction method based on adaptive edge generation is adopted.
[0067] The present invention has at least the following beneficial effects:
[0068] The technical solution of the present invention can reduce the complexity of the algorithm, improve the calculation speed of the model, and ensure excellent prediction accuracy.
[0069] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic diagram of the process of the method of the present invention;
[0071] Figure 2 A schematic diagram of a scene showing the calculation principle of the relative angle factor according to the first embodiment of the present invention;
[0072] Figure 3 This is a schematic diagram of the calculation of the relative angle of a vehicle after vectorization according to the first embodiment of the present invention;
[0073] Figure 4 This is a schematic diagram of the trajectory prediction results of the present invention in a straight line lane change situation;
[0074] Figure 5 This is a schematic diagram of the trajectory prediction results at a complex intersection of the present invention;
[0075] Figure 6 This is a schematic diagram of the trajectory prediction result at a crossroads according to the present invention;
[0076] Figure 7 This is a schematic diagram of the turning result at a three-way intersection according to the trajectory prediction of the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0078] Embodiment 1:
[0079] See also Figure 1-Figure 6 The present invention provides a technical solution: a vehicle trajectory prediction method based on adaptive edge generation, which specifically includes the following steps:
[0080] S1 Data vectorization: receiving the trajectory data of the traffic participants in the vehicle trajectory area, the trajectory data of the surrounding traffic participants around the vehicle trajectory area, and the environmental feature data in the vehicle trajectory area, and performing vectorization processing on the trajectory data of the traffic participants, the trajectory data of the surrounding traffic participants, and the environmental feature data, to obtain the trajectory vectorization data of the traffic participants, the trajectory vectorization data of the surrounding traffic participants, and the environmental feature vectorization data, as follows:
[0081] (1) The environmental feature data is downloadable map data. Most annotations in the map data are in the form of spline curves (such as lanes), closed shapes (such as intersection areas), and points (such as traffic lights), as well as additional attribute information. For vehicles, their trajectories are in the form of directed spline curves relative to time;
[0082] All these elements can be approximated as vector sequences: for map data features, a starting point and direction are selected, key points are uniformly sampled from a spline curve with the same spatial distance, and adjacent key points are sequentially connected as vectors; for trajectories, key points are sampled at fixed time intervals (0.1 seconds) starting from t = 0;
[0083] (2) Connect each 0.1 second sample end to end to obtain a directional vector;
[0084] (3) Name the vector , the vector is represented as:
[0085] In the formula , denote the starting point and end point of the vector respectively. Represents the features of this vector, such as object type, timestamp of trajectory, or road feature type or speed limit of lane;
[0086] S2 determines dynamic and static nodes: using environmental feature vectorized data as static node data, and using the trajectory vectorized data of traffic participants and the trajectory vectorized data of surrounding traffic participants as dynamic node data (for example, vehicles and pedestrians are divided into dynamic nodes, and lane lines, street lights, green belts, etc. are divided into static nodes), constructs an adaptive edge generator, and uses different connection strategies for different nodes to achieve edge connection, as follows:
[0087] (1) Dynamic node edge generation: For the edge connection between dynamic nodes, the attention mechanism is improved by introducing the relative angle factor, calculating the relative position between the vehicle to be predicted and other vehicles, and calculating different attention mechanism weights based on the relative position. The connection of dynamic nodes is realized according to the weight value, as follows:
[0088] (1.1) By introducing the relative position factor, the relative position information between vehicles is integrated into the calculation process of the attention weight according to formulas (1) and (2), and the angle relationship between dynamic vehicles is added to the model as a characteristic factor. The specific formula is as follows:
[0089] (1)
[0090] (2)
[0091] in is the activation function. In the graph neural network, it is a two-layer multi-layer perceptron. The three values of Q, K, and V in attention are:
[0092]
[0093] in , , is a learnable matrix, according to formula (3) The weight of the edge at time for:
[0094] (3)
[0095] in for and The distance between is the normalization function, is the angle feature, defined as:
[0096] (4)
[0097] in is a learnable matrix, is the effect of the relative angle factor;
[0098] in Expressed as a relative angle factor, in the vehicle In the trajectory prediction of exist The location feature information at a certain moment is expressed as ,in It is a vehicle feature information, T is the historical time of the vehicle; for the lane line ξ, its geometric attributes are given by Given, where and are the starting and ending coordinates of ξ respectively; the vehicle and vehicles In time The relative position information is defined as ,Relative position information includes the relative angle factor, distance, and speed relationship information between the two vehicles;
[0099] (1.2) To represent the vehicle With vehicle The relative spatial relationship of Figure 2-Figure 3 As shown, define the vehicle With vehicle The relative angle factor , defining the east direction as Axis positive direction, , For vehicles , exist The direction information of the two vehicles at the moment The relative angle at a moment is defined as , calculate the relative angle value according to formula (5):
[0100] (5)
[0101] in , for The coordinates of the vehicle at the time, , for The coordinates of the vehicle at the time, calculate the weight of the edge Then, a first-order subgraph centered on the vehicle to be predicted is generated according to formulas (6), (7), and (8). The formula is as follows:
[0102] (6)
[0103] (7)
[0104] (8)
[0105] in is the weight value obtained by formula (3), For its own characteristics, is the set of predicted vehicle neighbors, , is a learnable matrix, through The activation function combines the weight features between vehicles and its own characteristics , and finally connect the edges through a selection gate function, and the output is ;
[0106] (2) Static node edge generation: For the edge connections of static nodes, the corresponding edges are connected according to the maximum distance control, as follows:
[0107] (2.1) Calculate the relative position information between the vehicle and the lane line on the map, as shown in formula (9):
[0108] (9)
[0109] in, is the MLP encoder for lane segments, are the starting position, ending position and feature vector of lane segment ξ respectively, the spatiotemporal features of the predicted vehicle are used as query input, the lane segment features encoded by MLP are used as key / value input, and the weight between the vehicle and the lane line is calculated;
[0110] (2.2) Setting hyperparameter thresholds Used to measure the maximum length of the connecting edge between the vehicle and the lane line, the length between the vehicle and the lane line ,when When, through Calculate the weights of vehicles and lane lines , and according to the weights of the vehicle and the lane line Generate edges between vehicle and lane line nodes and build a first-order subgraph centered on the predicted vehicle;
[0111] S3. Input the data representation of the static nodes and dynamic node edge connections into the pre-built prediction model, and the prediction model outputs the predicted trajectory data; wherein the prediction model is solved by the MLP decoder, as follows:
[0112] A two-layer MLP is used as the decoder, which receives the representation of the adaptive edge generator as input and outputs the position of the vehicle at each future time step in the local coordinate frame. and its associated uncertainties , the formula is as follows:
[0113] Assume the input is , the first hidden layer is linearly transformed:
[0114] (10)
[0115] The first hidden layer activation function:
[0116] (11)
[0117] Linear transformation of the second output layer:
[0118] (12)
[0119] Output: (13)
[0120] in , , , are all learnable parameters, where , is the weight matrix, , is the bias vector, is the activation function, To extract the function, is the position index, For uncertain index;
[0121] S4. Using the negative log-likelihood function as the regression loss, analyze the trajectory prediction results of the prediction model and modify the prediction model parameters, and train the prediction model until the prediction model meets the accuracy requirements, as follows:
[0122] (1) Calculate the error between the model-predicted mixture and the ground truth position of each predicted vehicle at each time step. Then, accumulate the errors over all time steps to form a matrix of dimension [F; N];
[0123] (2) According to this matrix, select the trajectory with the smallest error in each predicted vehicle, that is, find the minimum value of each column in the error matrix. The final loss function is the regression loss and equal-weighted classification loss composition:
[0124] (18)
[0125] Use negative log-likelihood as regression loss:
[0126] (19)
[0127] In the formula is the probability density function of the Laplace distribution, , Forecasting vehicles for The position and uncertainty of the best predicted trajectory, To predict the location, For the true position, the cross entropy loss is used as the classification loss to optimize the mixing coefficient.
[0128] It should be noted that the pre-built prediction model includes determining dynamic and static nodes in S2 and using different connection strategies for different nodes to achieve edge connection (i.e., the encoder part), using MLP as a decoder to predict the trajectory in S3 (i.e., the decoder part), and training the prediction model in S4 (i.e., the training process).
[0129] Next, the technical solution of the present invention is further described in conjunction with specific embodiments:
[0130] In order to verify the accuracy and lightness of this design in vehicle trajectory prediction, experiments were conducted on the Argoverse dataset. The ablation experiment analyzed the impact of different modules on the model performance. The experimental results proved the effectiveness of the technical solution of this embodiment. In the comparative test, the technical solution of this embodiment is superior to some current mainstream algorithms in comprehensive performance. Finally, corresponding visualization analysis was carried out to display the experimental results more intuitively.
[0131] Dataset and evaluation metrics:
[0132] The Argoverse Motion Forecasting dataset provides predicted vehicle trajectories and HD map data. The dataset contains 323,557 real driving scenes, divided into training, validation, and test sets, with 205,942, 39,472, and 78,143 samples, respectively. All training and validation scenes are 5-second sequences sampled at 10 Hz, while only the first 2 seconds of trajectories are public in the test set. Taking into account the initial 2 seconds of observation, the Argoverse Motion Forecasting Challenge requires predicting the vehicle's motion for the next 3 seconds.
[0133] Performance metrics for motion prediction typically include the minimum average displacement error (MinADE), the minimum final displacement error (MinFDE), and the miss rate (MR), which allow the model to make 6 predictions for each trajectory. minADE is the average distance (in meters) between the best predicted trajectory and the ground truth trajectory for all future time steps, minFDE is the error in the future final time step, the best predicted trajectory is defined as the trajectory with the smallest endpoint error, and MR refers to the ratio of scenes where the distance between the ground truth endpoint and the best predicted endpoint is greater than 2 meters.
[0134] set up is the predicted trajectory, is the true trajectory, where the trajectory is a series of position points in the time series. For each time step , the predicted position is , the real location If the trajectory is If prediction is performed on time steps, then ADE is defined as:
[0135]
[0136] FDE is defined as:
[0137]
[0138] MR is the missing rate, which measures the ratio of the number of true targets that the model fails to correctly predict or detect to the total number of true targets and is defined as follows:
[0139]
[0140] Experimental environment and hyperparameter settings:
[0141] This example uses the AdamW optimizer for training on the RTX 4070super GPU and uses the Vectornet encoder for data preprocessing. The experimental environment is shown in Table 1:
[0142] Table 1 Experimental environment
[0143]
[0144] The training epoch is set to 64, and the batch size, initial learning rate, weight decay, and dropout rate are set to 32, 3×10, respectively. −4 , 1×10 −4 and 0.2. The model of this embodiment consists of 2 layers of edge generator interaction modules and 1 layer of decoder module. The radius of the area when the number of static node connections is , that is For nodes with a distance less than 20m, the parameter settings are shown in Table 2.
[0145] Table 2 Parameter settings
[0146]
[0147] Ablation experiment:
[0148] This example conducts an ablation experiment on the Argoverse motion prediction dataset to verify the effectiveness of each module. The contribution of each module to the prediction performance is tested by alternately removing one of the components. Specifically, this example removes the dynamic edge generation module, the static edge generation module, and the map information, respectively. The results are shown in Table 3:
[0149] Table 3 Ablation experiment results
[0150]
[0151] As can be seen from the table, each module has improved the performance to a certain extent. After removing the dynamic edge generation module, the model structure is basically similar to Vectornet, so the accuracy is the lowest. After removing the static edge generation module, the model performance remains basically unchanged, because the principle of static edge generation is similar to GAT, but a range of thresholds is added to reduce the complexity of the operation. In addition, map information is crucial in motion prediction. After removing the map information, the accuracy drops significantly.
[0152] Comparison with advanced methods:
[0153] The method of this embodiment is compared with other models on the Argoverse dataset, and the experimental results are shown in Table 4. As can be seen from the table, the model size of this embodiment is only 2360K, which is significantly smaller than the parameters of other models, 15.4% of SceneTransformer, and 63.6% of LaneGCN. Although the model size is larger than DenseTNT, the performance is much better than DenseTNT. Under the premise of reducing the number of parameters, the performance of this embodiment is much better than Scene Transformer and LaneGCN.
[0154] Table 4 Comparison with advanced methods
[0155]
[0156] Result visualization:
[0157] The results of vehicle trajectory prediction in the Argoverse dataset are as follows: Figure 4-Figure 7 As shown, the red track represents the known track of the vehicle in the first two seconds given by the data set, that is, the historical track, the green track represents the real track of the vehicle in the last three seconds, the blue track represents the predicted track using the technical solution of this embodiment, and the black track represents the predicted track using the Vectornet method. The prediction of the adaptive edge generator method can accurately predict the turning performance of the vehicle and the acceleration performance of the vehicle, which are difficult to achieve in the Vectornet method. In general, this embodiment has a significant improvement in the accuracy of prediction compared to Vectornet.
[0158] Embodiment 2:
[0159] The present invention proposes a vehicle trajectory prediction system based on adaptive edge generation, comprising:
[0160] A vectorization module is used to receive the trajectory data of traffic participants in the vehicle trajectory area, the trajectory data of surrounding traffic participants around the vehicle trajectory area, and the environmental feature data in the vehicle trajectory area, and perform vectorization processing on the trajectory data of traffic participants, the trajectory data of surrounding traffic participants, and the map data to obtain the trajectory vectorization data of traffic participants, the trajectory vectorization data of surrounding traffic participants, and the environmental feature vectorization data;
[0161] The encoder module is used to construct an adaptive edge generator using environmental feature vectorized data as static node data and trajectory vectorized data of traffic participants and trajectory vectorized data of surrounding traffic participants as dynamic node data, and to realize edge connection by adopting different connection strategies for different nodes;
[0162] The decoder module is used to input the data representation of static nodes and dynamic node edge connections into the pre-built prediction model, and the prediction model outputs the predicted trajectory data, wherein the prediction model is solved by the MLP decoder;
[0163] The training module is used to analyze the trajectory prediction results of the prediction model and modify the prediction model parameters through the negative log-likelihood function as the regression loss, and train the prediction model until the prediction model meets the accuracy requirements.
[0164] Specifically, the above-mentioned vectorization module, encoder module, decoder module and training module can be embedded in a computer processing system. The computer calls the above-mentioned modules to complete the task of equivalent modeling according to the vehicle trajectory prediction method based on adaptive edge generation provided in Example 1; the above-mentioned vectorization module, encoder module, decoder module and training module can perform operations according to the specific steps given in the vehicle trajectory prediction method based on adaptive edge generation in Example 1.
[0165] It should be noted that it should be understood that the division of the various modules of the above system is only the division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated, and these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the vectorization module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0166] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0167] Embodiment three:
[0168] The present invention proposes a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The memory stores a computer program capable of running on the processor. When the processor loads and executes the computer program, the vehicle trajectory prediction method based on adaptive edge generation in Example 1 is adopted.
[0169] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses.
[0170] Furthermore, the processor may adopt a central processing module (CPU). Of course, according to actual usage, 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. may also be adopted. The general-purpose processor may adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0171] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0172] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a centered element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for illustrative purposes and are not intended to be the only implementation method.
[0173] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0174] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
Claims
1. A vehicle trajectory prediction method based on adaptive edge generation, characterized in that: The specific steps include: Receiving trajectory data of traffic participants in a vehicle trajectory area, trajectory data of surrounding traffic participants around the vehicle trajectory area, and environmental feature data in the vehicle trajectory area, and performing vectorization processing on the trajectory data of traffic participants, the trajectory data of surrounding traffic participants, and the environmental feature data to obtain vectorized trajectory data of traffic participants, vectorized trajectory data of surrounding traffic participants, and vectorized environmental feature data; Using environmental feature vectorized data as static node data, and the trajectory vectorized data of traffic participants and surrounding traffic participants as dynamic node data, an adaptive edge generator is constructed, and different connection strategies are adopted for different nodes to realize edge connection. The data representation of the static nodes and dynamic node edge connections is input into the pre-built prediction model, and the prediction model outputs the predicted trajectory data; wherein the prediction model is solved by the MLP decoder; the prediction model uses the negative log-likelihood function as the regression loss, analyzes the trajectory prediction results of the prediction model, modifies the prediction model parameters, and trains the prediction model until the prediction model meets the accuracy requirements; The sampling key points are abstracted into nodes. According to the different node attributes, the nodes are divided into static nodes and dynamic nodes. An adaptive edge generator is constructed. Different connection strategies are adopted for different nodes to realize edge connection. The specific strategies are as follows: For the edge connections between dynamic nodes, the attention mechanism is improved by introducing the relative angle factor, calculating the relative position between the vehicle to be predicted and other vehicles, and calculating different attention mechanism weights based on the relative positions, and connecting the dynamic nodes based on the weight values; For the edge connections of static nodes, the corresponding edges are connected according to the maximum distance control; For the edge connections between dynamic nodes, the details are as follows: (1) By introducing the relative position factor, the relative position information between vehicles is integrated into the calculation process of the attention weight according to formulas (1) and (2), and the angle relationship between dynamic vehicles is added to the model as a characteristic factor. The specific formula is as follows: (1) (2) in Represents a vector feature example, vehicle and vehicles In time The relative position information is defined as , is the activation function. In the graph neural network, it is a two-layer multi-layer perceptron. The three values of Q, K, and V in attention are: in , , is a learnable matrix, according to formula (3) The weight of the edge at time for: (3) in for and The distance between is the normalization function, is the angle feature, defined as: (4) in is a learnable matrix, is the effect of the relative angle factor; in Expressed as a relative angle factor, in the vehicle In the trajectory prediction of exist The location feature information at the moment is expressed as: It is a vehicle The characteristic information of lane line ξ is given by Given, where and are the starting and ending coordinates of ξ respectively; the vehicle and vehicles In time The relative position information is defined as ,Relative position information includes the relative angle factor, distance, and speed relationship information between the two vehicles; (2) To indicate vehicles With vehicle The relative spatial relationship of the vehicle With vehicle The relative angle factor , then the two cars are The relative angle at a moment is defined as , calculate the relative angle value according to formula (5): (5) in , for The coordinates of the vehicle at the time, , for The coordinates of the vehicle at the time, calculate the weight of the edge Then, a first-order subgraph centered on the vehicle to be predicted is generated according to formulas (6), (7), and (8). The formula is as follows: (6) (7) (8) in is the weight value obtained by formula (3), For its own characteristics, is the set of predicted vehicle neighbors, , is a learnable matrix, through The activation function combines the weight features between vehicles and its own characteristics , and finally connect the edges through a selection gate function, and the output is ; For the edge connections of static nodes, the details are as follows: (3) Calculate the relative position information between the vehicle and the lane line on the map, as shown in formula (9): (9) in, is the MLP encoder for lane segments, are the starting position, ending position and feature vector of lane segment ξ respectively, the spatiotemporal features of the predicted vehicle are used as query input, the lane segment features encoded by MLP are used as key / value input, and the weight between the vehicle and the lane line is calculated; (4) Setting hyperparameter thresholds Used to measure the maximum length of the connecting edge between the vehicle and the lane line, the length between the vehicle and the lane line ,when When, through Calculate the weights of vehicles and lane lines , and according to the weights of the vehicle and the lane line Generate edges between vehicle and lane line nodes and build a first-order subgraph centered on the predicted vehicle.
2. The vehicle trajectory prediction method based on adaptive edge generation according to claim 1, characterized in that: The environmental feature data is downloadable map data, which vectorizes the trajectory data of traffic participants, the trajectory data of surrounding traffic participants, and environmental feature data, as follows: (1) For map data features, select a starting point and direction, uniformly sample key points from the spline curve with the same spatial distance, and connect adjacent key points sequentially as vectors; for trajectories, start from t = 0 and sample key points at fixed time intervals; (2) Connect the samples at each fixed time interval end to end to obtain a directional vector; (3) Name the vector , the vector is represented as: In the formula , denote the starting point and end point of the vector respectively. Represents this vector feature example.
3. The vehicle trajectory prediction method based on adaptive edge generation according to claim 2, characterized in that: The vector feature is specifically an object type, a timestamp of a trajectory, a road feature type, or a speed limit of a lane.
4. The vehicle trajectory prediction method based on adaptive edge generation according to claim 3 is characterized in that: The data of static nodes and dynamic node edge connections are input into the pre-built prediction model, and the MLP decoder is used to output the predicted trajectory data, as follows: A two-layer MLP is used as the decoder. The MLP receives the data representation output by the adaptive edge generator as input and outputs the position of the vehicle at each future time step in the local coordinate frame. and its associated uncertainties , the formula is as follows: Assume the input is , the first hidden layer is linearly transformed: (10) The first hidden layer activation function: (11) Linear transformation of the second output layer: (12) Output: (13) in , , , are all learnable parameters, where , is the weight matrix, , is the bias vector, is the activation function, To extract the function, is the position index, The index is uncertain.
5. The vehicle trajectory prediction method based on adaptive edge generation according to claim 4, characterized in that: The negative log-likelihood function is used as the regression loss to analyze the trajectory prediction results of the prediction model and modify the prediction model parameters. The prediction model is trained until the prediction model meets the accuracy requirements, as follows: (1) Calculate the error between the model-predicted mixture and the ground truth position of each predicted vehicle at each time step. Then, accumulate the errors over all time steps to form a matrix of dimension [F; N]; (2) According to this matrix, select the trajectory with the smallest error in each predicted vehicle, that is, find the minimum value of each column in the error matrix. The final loss function is the regression loss and equal-weighted classification loss composition: (18) Use negative log-likelihood as regression loss: (19) In the formula is the probability density function of the Laplace distribution, Forecasting vehicles for The position and uncertainty of the best predicted trajectory, To predict the location, For the true position, the cross entropy loss is used as the classification loss to optimize the mixing coefficient.
6. A vehicle trajectory prediction system based on adaptive edge generation, used to implement a vehicle trajectory prediction method based on adaptive edge generation according to any one of claims 1 to 5, characterized in that: include: A vectorization module is used to receive the trajectory data of traffic participants in the vehicle trajectory area, the trajectory data of surrounding traffic participants around the vehicle trajectory area, and the environmental feature data in the vehicle trajectory area, and perform vectorization processing on the trajectory data of traffic participants, the trajectory data of surrounding traffic participants, and the map data to obtain the trajectory vectorization data of traffic participants, the trajectory vectorization data of surrounding traffic participants, and the environmental feature vectorization data; The encoder module is used to construct an adaptive edge generator using environmental feature vectorized data as static node data and trajectory vectorized data of traffic participants and trajectory vectorized data of surrounding traffic participants as dynamic node data, and to realize edge connection by adopting different connection strategies for different nodes; The decoder module is used to input the data representation of static nodes and dynamic node edge connections into the pre-built prediction model, and the prediction model outputs the predicted trajectory data, wherein the prediction model is solved by the MLP decoder; The training module is used to analyze the trajectory prediction results of the prediction model and modify the prediction model parameters through the negative log-likelihood function as the regression loss, and train the prediction model until the prediction model meets the accuracy requirements.
7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the vehicle trajectory prediction method based on adaptive edge generation according to any one of claims 1 to 5 is adopted.
Citation Information
Patent Citations
Vehicle trajectory prediction method and device, electronic equipment and readable storage medium
CN113989330A
High-precision map vectorization code construction and vehicle track prediction method
CN117268366A
