Vehicle driving track prediction method, system, equipment and medium
By combining the trajectory prediction model of Transformer and graph neural network, combined with Bayesian optimization and vehicle dynamics constraints, the accuracy and real-time problems of vehicle trajectory prediction in the prior art are solved, and high-precision trajectory prediction in complex traffic environments are achieved, and the safety and real-time nature of the autonomous driving system are improved.
Patent Information
- Application Number
- CN202510548918.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-11
AI Technical Summary
When dealing with complex traffic environments and emergencies, existing vehicle trajectory prediction methods have problems such as low prediction accuracy, poor adaptability and insufficient real-time performance, especially in autonomous driving systems, which are difficult to meet the needs of efficient and accurate trajectory prediction.
Transformer is used to build a trajectory prediction model with graph neural network, combined with Bayesian optimization and vehicle dynamics constraints, and optimize trajectory parameters through multi-task loss functions and feature extraction to form an end-to-end trajectory prediction solution to improve the prediction stability of the model in noise data and complex interactive scenarios.
It improves the accuracy and adaptability of vehicle trajectory prediction, ensures that the predicted trajectory meets actual driving conditions, enhances the safety and real-time nature of autonomous driving, is suitable for edge computing devices, and supports intelligent traffic management.
Smart Images

Figure CN120299251A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of vehicle trajectory prediction, and particularly relates to a vehicle driving trajectory prediction method, system, device and medium. Background Art
[0002] With the rapid development of intelligent transportation systems and autonomous driving, vehicle driving trajectory prediction plays a crucial role in improving road safety, optimizing traffic flow, and assisting autonomous driving decision-making. Accurately predicting the future driving trajectory of vehicles can not only help the autonomous driving system plan the path in advance, but also provide data support for intelligent traffic management, thereby effectively alleviating traffic congestion and reducing traffic accidents.
[0003] Currently, the methods for vehicle trajectory prediction mainly include: First, methods based on kinematic and physical models, such as uniform linear motion models, uniformly accelerated motion models, and Bezier curve methods based on vehicle dynamics. These methods are simple to calculate and easy to run in real time, but usually ignore the influence of traffic environment and driver behavior, resulting in low prediction accuracy and difficulty in adapting to complex road conditions. Second, methods based on statistics, which use a large amount of historical data to establish trajectory distribution models, such as Markov models, Gaussian mixture models, etc., can learn the trajectory patterns of different types of vehicles, but have poor adaptability to sudden situations, such as emergency lane changes and braking, and require a large amount of high-quality data for training. Third, methods based on deep learning, which have achieved certain results in the field of trajectory prediction. For example, recurrent neural networks and long short-term memory networks can be used to model time series data, but it is difficult to handle long-term dependence relationships. However, deep learning methods usually have a large amount of calculations, are difficult to run efficiently in real-time systems, and have poor generalization ability in the case of little data. Summary of the Invention
[0004] In a first aspect, an embodiment of this application provides a vehicle driving trajectory prediction method, including the following steps: S1. Collect the historical trajectory of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess the trajectory data and extract feature sequences; S2. Use Transformer combined with a graph neural network to construct a trajectory prediction model, use the extracted feature sequences to construct a training set to train the trajectory prediction model, and use a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during the training process; S3. Use the trajectory prediction model to predict the vehicle trajectory. With the goal of minimizing the prediction error for the predicted vehicle trajectory, use the Bayesian optimization method to optimize the trajectory parameters, and adjust the optimized parameters with vehicle dynamics constraints and road constraints as the constraint conditions during the optimization process to obtain the optimized vehicle prediction trajectory. By combining deep learning denoising, the Transformer-graph neural network fusion model, Bayesian optimization, and dynamics constraints, an end-to-end trajectory prediction scheme is formed, breaking through the limitations of single modeling in traditional methods; through multi-stage processing of denoising, feature extraction, multi-task training, and constraint optimization, the prediction stability of the model in noisy data and complex interaction scenarios is improved.
[0005] Further, the vehicle state information in step S1 includes vehicle speed, acceleration, direction angle, and steering angle; The environmental information includes road topology, lane lines, traffic signal states, relevant vehicles, pedestrian, and obstacle positions; In step S1, a convolutional neural network model is used to extract the feature sequence of the trajectory data and filter the noise. By limiting the vehicle state to the steering angle and acceleration, and limiting the environmental elements to the collection dimensions of traffic signals and obstacle positions, the input of feature extraction is determined to avoid missing key information; by using a convolutional neural network for denoising and feature extraction, sensor noise is filtered, and the spatio-temporal features of the trajectory data are retained to improve the quality of the model input.
[0006] Further, the specific steps of step S2 are as follows: S21. Input the extracted feature sequence into the Transformer model, and use the Transformer model to perform position encoding on the feature sequence and calculate the attention weights to obtain the partial features of the attention output; S22. Calculate the relative positions of the current vehicle and the relevant vehicles based on the positions of the relevant vehicles in the extracted feature sequence, and construct an adjacency matrix with each relative position as an element; S23. Input the partial features of the attention output and the adjacency matrix into the graph neural network model, and update the node features of the current vehicle through message passing in the graph neural network to obtain the partial interaction features of the graph neural network; S24. Fuse the partial features of the attention output and the partial interaction features of the graph neural network to complete the construction of the trajectory prediction model; S25. Construct a multi-task loss function including a trajectory prediction error term and an uncertainty estimation term; S26. Construct a training set using the extracted feature sequences, train the trajectory prediction model, and adjust the parameters of the trajectory prediction model with the goal of minimizing the multi-task loss function value during the training process. Through the positional encoding and attention mechanism of Transformer, long-term trajectory dependencies can be captured, solving the gradient vanishing problem of traditional RNN-based models; while using a graph neural network to model the relative positions between vehicles through an adjacency matrix to achieve interactive modeling of dynamic traffic participants and improve the prediction accuracy in multi-vehicle scenarios; the joint optimization of trajectory prediction error and uncertainty estimation enables the model to not only output accurate trajectories but also quantify prediction risks, providing confidence references for autonomous driving decisions.
[0007] Further, the specific steps of step S3 are as follows: S31. Collect the trajectory data of the vehicle's current trajectory point and input it into the trajectory prediction model to obtain the predicted trajectory; S32. Define the optimization objective function including a prediction error term, a smoothness penalty term, and a traffic rule penalty term, and use the lateral offset and smoothness coefficient of the trajectory point as the trajectory parameter variables; S33. Use the Bayesian optimization method to optimize the trajectory parameters. By constructing a Gaussian process model of the optimization objective function and adopting the expected improvement criterion to select the optimal trajectory parameters, several groups of candidate trajectories are generated; S34. Use the random tree search algorithm to search for feasible paths that satisfy road constraints and vehicle dynamics constraints from multiple groups of candidate trajectories, and use minimizing the path length and path curvature penalty as the search objective during the search process; S35. Perform second-order dynamics verification on the trajectory points in the searched feasible paths, and locally adjust the feasible paths that fail the verification through numerical optimization to obtain the final optimized path; S36. According to the target trajectory points corresponding to the final optimized path, use the model predictive control algorithm to control the vehicle state information of the vehicle's current trajectory point, so that the vehicle travels along the optimized target trajectory points. By introducing smoothness penalty and traffic rule penalty in the optimization objective function, it is ensured that the trajectory meets driving comfort and safety; through the Gaussian process model and the expected improvement criterion, the number of optimization iterations is reduced, quickly converging to the optimal trajectory parameters and improving real-time performance.
[0008] Further, the specific steps of step S34 are as follows: S341. Initialize the random tree search algorithm, set the starting point as the vehicle's current trajectory point, and the ending point as the target trajectory point; S342. Randomly sample trajectory points in the candidate trajectories to construct the nodes of the random tree; S343. Calculate the connection paths between each sampled trajectory point and the nearest node to ensure that the connection paths satisfy road constraints and vehicle dynamics constraints; S344. Evaluate the path length and path curvature penalty of each connection path, and select the connection path with the shortest path length and the smallest curvature as the feasible path; S345. Select the optimal path from all the feasible paths as the optimized path. Random tree search can efficiently search for feasible paths in the candidate trajectory space through random sampling and constraint verification, avoiding the local optimum problem; while directly embedding road constraints and dynamic constraints into the path connection condition to ensure the physical feasibility of the generated trajectory.
[0009] Furthermore, the specific steps of step S35 are as follows: S351. Take the derivatives of the acceleration and curvature of the optimized path output by the random tree search algorithm; When the derivative of the acceleration exceeds the physical limit of the vehicle actuator or the derivative of the curve exceeds the comfort threshold, mark it as a path to be corrected; If both the derivative of the acceleration or the derivative of the curvature meet the requirements, enter step S36; S352. Use a quadratic programming optimizer to perform local adjustment on the path to be corrected to ensure that the corrected trajectory meets the vehicle dynamic constraints and comfort requirements; S353. Use the locally adjusted trajectory segment to replace the corresponding trajectory segment in the original optimized path to obtain the final optimized path. Through the verification of the acceleration derivative and the curvature derivative, filter out uncomfortable trajectories such as sudden acceleration and sharp turns, and perform local correction through quadratic programming to improve the riding experience and make the control feasible; through the second-order dynamic verification of the optimized path, avoid the defect that the traditional kinematic model ignores the physical limitations of the actuator, and ensure that the trajectory can be actually executed by the vehicle.
[0010] Furthermore, the specific steps of step S36 are as follows: S361. Adjust the control inputs of the vehicle, including the steering angle and acceleration, according to the trajectory parameters of the target trajectory points corresponding to the final optimized path; S362. Use the model predictive control algorithm to control the vehicle state information of the current trajectory point of the vehicle to ensure that the vehicle travels along the optimized trajectory. By converting the optimized trajectory points into control inputs such as the steering angle and acceleration, realize trajectory tracking through model predictive control to ensure that the vehicle dynamic response is consistent with the predicted trajectory; through the rolling optimization of model predictive control, the control inputs can be dynamically adjusted to adapt to the real-time changes of the environment.
[0011] In a second aspect, the embodiments of the present application further provide a vehicle driving trajectory prediction system, including: A data acquisition and feature extraction module, which is used to collect the historical trajectories of vehicles to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess and extract features from the trajectory data; A trajectory prediction module, which is used to construct a trajectory prediction model by combining Transformer and a graph neural network, construct a multi-task loss function based on estimated prediction accuracy and uncertainty estimation, and then use the extracted features to construct a training set to train the trajectory prediction model, and adjust the parameters of the trajectory prediction model according to the minimum value of the multi-task loss function during the training process; A trajectory optimization module, which is used to predict the vehicle trajectory using the trajectory prediction model, optimize the parameters of the predicted vehicle trajectory with the goal of minimizing the prediction error, and adjust the optimization parameters with vehicle dynamics constraints and road constraints as constraints during the optimization process to obtain the optimized predicted vehicle trajectory. Through the interaction and collaboration of the data acquisition and feature extraction module, the trajectory prediction module and the trajectory optimization module, a complete closed-loop is achieved from data acquisition, model training to trajectory optimization, which can be seamlessly embedded in the intelligent driving system and provide a basis for path planning and control.
[0012] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the vehicle driving trajectory prediction method described in the first aspect are implemented.
[0013] In a fourth aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle driving trajectory prediction method described in the first aspect are implemented.
[0014] From the above technical solutions, it can be seen that the present application has the following advantages: In the vehicle driving trajectory prediction method, system, device and medium provided by the present application, by combining Transformer and a graph neural network, the time series features of the vehicle and the interaction relationship between vehicles can be captured, and the accuracy of vehicle driving trajectory prediction can be improved; by adopting Bayesian optimization and multi-task learning, it can adapt to different driving behaviors and complex traffic environments; through vehicle dynamics constraints and traffic rule constraints, it is ensured that the predicted trajectory conforms to the actual driving conditions and improves the safety of autonomous driving; the optimized trajectory prediction model can run efficiently on edge computing devices to meet the requirements of real-time trajectory prediction; it can also provide high-precision traffic flow trend prediction for the intelligent transportation management system, optimize signal light scheduling, and alleviate traffic congestion. Description of the Drawings
[0015] To more clearly illustrate the technical solution of this application, the following will briefly introduce the accompanying drawings required for the description. Obviously, the accompanying drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0016] Figure 1 It is a schematic flow chart of the vehicle driving trajectory prediction method of the present invention.
[0017] Figure 2 It is a schematic diagram of the vehicle driving trajectory prediction system of the present invention. Detailed implementation manners
[0018] In the following, the specific steps of the vehicle driving trajectory prediction method will be described in detail, and various embodiments of the present disclosure will be described more comprehensively. The present disclosure may have various embodiments, and adjustments and changes can be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents, and / or alternative solutions falling within the spirit and scope of the various embodiments of the present disclosure.
[0019] Exemplarily speaking, with the continuous progress of intelligent transportation systems and autonomous driving technologies, vehicle driving trajectory prediction plays a key role in improving road safety, optimizing traffic flow, and assisting autonomous driving decision-making. Accurately predicting the future driving path of a vehicle can not only help the autonomous driving system plan the driving route in advance, but also provide strong data support for intelligent traffic management, thereby effectively alleviating traffic congestion and reducing the incidence of traffic accidents.
[0020] Currently, the methods for vehicle trajectory prediction mainly include the following categories: Methods based on kinematics and physical models: Such methods include the uniform linear motion model, the uniformly accelerated motion model, and the Bezier curve method based on vehicle dynamics, etc. The advantage of these methods is that the calculation process is simple and suitable for real-time operation. However, they often ignore the complexity of the traffic environment and driver behavior, resulting in limited prediction accuracy and difficulty in dealing with complex road conditions. Methods based on statistics: By using a large amount of historical data to construct a trajectory distribution model, such as the Markov model, the Gaussian mixture model, etc. These methods can learn the trajectory patterns of different types of vehicles, but their adaptability is weak when faced with sudden situations, such as emergency lane changes, sudden brakes, etc., and a large amount of high-quality data is required for training. Methods based on deep learning: Deep learning methods have achieved certain results in the field of trajectory prediction. For example, recurrent neural networks and long short-term memory networks can model time series data, but they have deficiencies in dealing with long-term dependence relationships. In addition, deep learning methods usually have a large amount of calculations and are difficult to operate efficiently in real-time systems, and their generalization ability will also be limited to a certain extent when the amount of data is limited.
[0021] Although existing methods can meet the requirements of vehicle trajectory prediction to a certain extent, they still have many deficiencies in terms of accuracy, adaptability, and real-time performance. Therefore, developing an efficient trajectory prediction method that can comprehensively consider vehicle dynamics, traffic environment, and driver behavior is of great significance for promoting the development of autonomous driving and intelligent transportation systems.
[0022] To address the above problems, this embodiment provides a vehicle driving trajectory prediction method, which realizes high-precision prediction of vehicle trajectories in complex traffic environments through multi-fusion and multi-stage optimization.
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] Please refer to Figure 1 The following is a flowchart of the vehicle driving trajectory prediction method in a specific embodiment. The method includes the following steps: S1. Collect the historical trajectories of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess the trajectory data and extract feature sequences; It should be noted that by collecting the historical trajectories and environmental information of the vehicle and using a deep learning denoising algorithm for preprocessing, data noise can be reduced, and the accuracy and efficiency of feature extraction can be improved; S2. Use a Transformer combined with a graph neural network to construct a trajectory prediction model. Use the extracted feature sequences to construct a training set to train the trajectory prediction model, and use a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during training; It should be noted that by combining a Transformer and a GNN to construct a trajectory prediction model and using a multi-task loss function for training, it is possible to capture the time series features of vehicles and the interaction relationships between vehicles, improving the accuracy of trajectory prediction; S3. Use the trajectory prediction model to predict the vehicle trajectory. With the goal of minimizing the prediction error for the predicted vehicle trajectory, use the Bayesian optimization method to optimize the trajectory parameters, and adjust the optimized parameters with vehicle dynamics constraints and road constraints as the constraint conditions during the optimization process to obtain the optimized vehicle prediction trajectory; It should be noted that by optimizing the trajectory parameters using the Bayesian optimization method and combining vehicle dynamics and traffic rule constraints, it is ensured that the optimized trajectory conforms to the actual driving conditions, improving the safety and reliability of autonomous driving.
[0025] In this embodiment, by combining deep learning denoising, a Transformer-graph neural network fusion model, Bayesian optimization, and dynamics constraints, an end-to-end trajectory prediction scheme is formed, breaking through the limitations of single modeling in traditional methods; through multi-stage processing of denoising, feature extraction, multi-task training, and constraint optimization, the prediction stability of the model in noisy data and complex interaction scenarios is improved.
[0026] Further, as a refinement and extension of the specific implementation manner of the above embodiment, to fully illustrate the specific implementation process in this embodiment, another vehicle driving trajectory prediction method is provided. This method includes the following steps: S1. Collect the historical trajectory of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess the trajectory data and extract feature sequences; The vehicle state information in step S1 includes vehicle speed, acceleration, direction angle, and steering angle; The environmental information includes road topology, lane lines, traffic signal states, positions of relevant vehicles within a set distance, positions of pedestrians, and obstacles; In step S1, a convolutional neural network model is used to extract features and filter noise from the trajectory data; Exemplarily, when the vehicle is driving on a straight road, its historical trajectory data is shown in Table 1 below: Table 1
[0027] Use a Convolutional Neural Network (CNN) to extract features and filter noise from trajectory data. Taking the input data as X = v , a , θ , δ as an example, the CNN model is expressed as:
[0028] where W is the convolutional kernel, represents the convolution operation, and b is the bias term; It should be noted that by restricting the vehicle states to steering angle and acceleration, and the environmental factors to the collection dimensions of traffic lights and obstacle positions, the input for feature extraction is determined to avoid omission of key information; by using a convolutional neural network for denoising and feature extraction, sensor noise is filtered, and the spatio-temporal features of the trajectory data are retained, improving the quality of the model input; S2. Use a Transformer combined with a graph neural network to construct a trajectory prediction model. Use the extracted feature sequence to construct a training set to train the trajectory prediction model, and use a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during training. The specific steps of step S2 are as follows: S21. Input the extracted feature sequence into the Transformer model, and use the Transformer model to perform positional encoding on the feature sequence and calculate the attention weights to obtain the partial features of the attention output; Taking the feature sequence as as an example, where F t is the feature vector at time step t ; The positional encoding is:
[0029]
[0030] where pos represents the index of the trajectory point in the sequence, i represents the dimension index of the feature vector, and d model is the total dimension of the feature vector; It should be noted that by using the sine function for even dimensions and the cosine function for odd dimensions, alternating the sine / cosine functions, the model can learn the relative relationships between positions; the exponential decay in the sine / cosine functions of the positional encoding ensures that the encoding differences between adjacent positions decrease as the dimension increases; The trajectory feature sequence is X = [F0, F1, F2] (corresponding to times t = 0.0s, 0.5s, 1.0s), where Ft is the 4D feature (speed, acceleration, direction angle, steering angle) extracted by the CNN: Linear transformation: The dimension of the input X is 3×4, where 3 represents the time step and 4 represents the 4-dimensional features at each time step; Through the weight matrix W of dimension 4×8 Q , W K , W^ V Map the trajectory feature sequence X to the query parameter Q, key parameter K, and value parameter V of dimension 3×8; Attention weight calculation: Calculate QK^ of dimension 3×3 T to represent the similarity between time steps; After scaling, obtain the weight matrix through softmax:
[0031] S22. Calculate the relative positions of the current vehicle and the relevant vehicles based on the relevant vehicle positions in the extracted feature sequence, and construct an adjacency matrix with each relative position as an element; Taking the position of the current vehicle as ( x t , y t ) and the position of the relevant vehicle as ( x i , y i ) as an example; x i − x t , y i − y t ) as an example; The elements in the adjacency matrix A are represented as A ij , where less than the set threshold, take 1, greater than or equal to the set threshold, take 0; S23. Input the partial features of the attention output and the adjacency matrix into the graph neural network model, and update the node features of the current vehicle through message passing in the graph neural network to obtain the partial interaction features of the graph neural network;
[0032] where h i ( l ) is the feature of node i at the l -th layer, N( i ) is the neighbor set of node i , W( l ) is the learnable weight matrix, σ is the activation function; is the normalization coefficient, d i 、d j respectively represent the number of neighbors of nodes i and j; Sum over all neighbor nodes j of vehicle node i; S24. Fuse the attention output part features and the graph neural network part interaction features to complete the construction of the trajectory prediction model;
[0033] where, represents the attention output part features, represents the graph neural network part interaction features, and MLP is a multi-layer perceptron function used to map the fused features to the trajectory prediction space; S25. Construct a multi-task loss function including a trajectory prediction error term and an uncertainty estimation term ;
[0034] where, is the true trajectory, is the predicted trajectory; λ 1 和 λ 2 is the weight coefficient used to balance the influence of the trajectory prediction error term and the uncertainty estimation term in the loss function; KL is the Kullback-Leibler divergence used to measure the difference between the model prediction distribution p(Y∣X) and the standard normal distribution N(0, I); p(Y∣X) represents the probability distribution of the predicted output Y given the input X, and N(0, I) represents the standard normal distribution with a mean of 0 and a covariance matrix of the identity matrix I; S26. Use the extracted feature sequence to construct a training set, train the trajectory prediction model, and adjust the parameters of the trajectory prediction model with the goal of minimizing the multi-task loss function value during the training process; It should be noted that the position encoding and attention mechanism of Transformer can capture long-time sequence trajectory dependencies and solve the gradient vanishing problem of traditional RNN-like models; while using graph neural networks to model the relative positions between vehicles through the adjacency matrix, realizing the interactive modeling of dynamic traffic participants and improving the prediction accuracy in multi-vehicle scenarios; the joint optimization of trajectory prediction error and uncertainty estimation enables the model to not only output accurate trajectories but also quantify the prediction risks, providing confidence references for autonomous driving decisions; S3. Use the trajectory prediction model to predict the vehicle trajectory. With the goal of minimizing the prediction error, use the Bayesian optimization method to optimize the trajectory parameters, and adjust the optimized parameters with vehicle dynamics constraints and road constraints as the constraint conditions during the optimization process to obtain the optimized vehicle prediction trajectory. The specific steps of step S3 are as follows: S31. Collect the trajectory data of the vehicle's current trajectory point and input it into the trajectory prediction model to obtain the predicted trajectory; S32. Define the optimization objective function including the prediction error term, smoothness penalty term, and traffic rule penalty term, and use the lateral offset of the trajectory point and the smoothness coefficient as the trajectory parameter variables;
[0035] Among them, f(d,λ) is the optimization objective function, which evaluates the advantages and disadvantages of the trajectory parameter d and the smoothness coefficient λ. The goal of optimization is to find d and λ that minimize f(d,λ); is the prediction error term, which measures the difference between the predicted trajectory and the prior trajectory through the mean square error function. The purpose is to minimize the error between the predicted trajectory and the prior trajectory and ensure that the optimized trajectory is as consistent as possible with the expected trajectory; is a smoothness penalty term, λ is a hyperparameter that controls the intensity of the smoothness penalty, represents the predicted trajectory 's rate of change 's squared norm. By penalizing this term, the optimized trajectory can be made smoother and avoid drastic fluctuations; is a traffic rule penalty term to ensure that the optimized trajectory complies with traffic rules and road constraint conditions; for example, the trajectory should not exceed the lane boundary and should comply with traffic lights. By introducing this penalty term, it can be ensured that the optimized trajectory is not only smooth but also legal and safe; S33. Use the Bayesian optimization method to optimize the trajectory parameters. By constructing a Gaussian process model of the optimization objective function and adopting the expected improvement criterion to select the optimal trajectory parameters, several groups of candidate trajectories are generated;
[0036] wherein, is the criterion used to select the next evaluation point in Bayesian optimization, and the goal is to maximize the expected improvement; represents the expectation operator, which calculates the average value of a certain random variable under a given probability distribution; f best is the optimal function value among the currently evaluated points, that is, the loss function value corresponding to the currently known best trajectory parameters; f ( x ) is the function value at the position x , that is, the loss function value corresponding to the trajectory parameter x ; represents the expected improvement at the position x; S34. Use the random tree search algorithm to search for a feasible path that satisfies the road constraints and vehicle dynamics constraints from multiple groups of candidate trajectories, and minimize the path length and path curvature penalty as the search objective during the search process; S35. Perform second-order dynamics verification on the trajectory points in the searched feasible path, and locally adjust the feasible path that fails the verification through numerical optimization to obtain the final optimized path; S36. According to the target trajectory points corresponding to the final optimized path, use the model predictive control algorithm to control the vehicle state information of the current trajectory point of the vehicle, so that the vehicle travels along the optimized target trajectory points; It should be noted that by introducing smoothness penalty and traffic rule penalty through the optimization objective function, it is ensured that the trajectory meets driving comfort (such as continuous curvature) and safety (such as lane keeping); through the Gaussian process model and the expected improvement criterion, the number of optimization iterations is reduced, and it quickly converges to the optimal trajectory parameters, improving real-time performance.
[0037] In an embodiment of the present invention, based on steps S34, S35, and S36, a possible embodiment will be given below to non-limitingly elaborate on its specific implementation.
[0038] The specific steps of step S34 are as follows: S341. Initialize the random tree search algorithm, set the starting point as the current trajectory point of the vehicle , and the end point as the target trajectory point ; S342. Randomly sample trajectory points in the candidate trajectories to construct the nodes of the random tree; Specifically, randomly sample trajectory points in the state space, and the state space can be the configuration space of the vehicle, such as position and direction; S343. Calculate the connection path between each sampled trajectory point and the nearest node, and ensure that the connection path satisfies the road constraints and vehicle dynamics constraints; Specifically, find the node p rand closest to p near in the constructed search tree, and calculate the connection path p new from the nearest node to the random point; S344. Evaluate the path length and path curvature penalty of each connection path, and select the connection path with the shortest path length and the smallest curvature as the feasible path; Evaluate path p new to see if it meets the road constraints and vehicle dynamics constraints; Calculate the length and curvature penalty of the path:
[0039] where, is the path length, κ is the curvature of the path, λ is the weight coefficient; S345. Select the optimal path from all feasible paths as the optimized path; Specifically, the nearest node is calculated by the following formula:
[0040] The new node is calculated by the following formula:
[0041] where, ϵ is the step size parameter that controls the distance of each movement; Then calculate the path cost through the following formula:
[0042] Select the optimal path through the following formula:
[0043] Exemplarily, the vehicle moves from the starting point p start =(0,0) to the target point p goal =(10,10). In each iteration, randomly sample a point p rand , find the nearest node p near , calculate the new node p new , and evaluate the path cost. Finally, select the path with the minimum path cost as the optimized path; It should be noted that the random tree search can efficiently search for feasible paths in the candidate trajectory space through random sampling and constraint verification, avoiding the local optimum problem; while directly embedding road constraints (such as lane lines) and dynamics constraints (acceleration limits) into the path connection conditions to ensure the physical feasibility of the generated trajectory; The specific steps of step S35 are as follows: S351. Take the derivatives of the acceleration and curvature of the optimized path output by the random tree search algorithm; When the derivative of the acceleration exceeds the physical limit of the vehicle actuator or the derivative of the curve exceeds the comfort threshold, it is marked that the path needs to be corrected; If both the derivative of the acceleration and the derivative of the curvature meet the requirements, proceed to step S36; Derivative of acceleration:
[0044]
[0045] where x and y are the position coordinates on the path, and t is the time; Curvature Derivative:
[0046] If Accel > Accelmax or κ > κ max, it is marked that the path needs to be corrected; S352. Use a quadratic programming optimizer to perform local adjustment on the path to be corrected to ensure that the corrected trajectory meets the vehicle dynamics constraints and comfort requirements; Quadratic programming optimizer formula:
[0047] where y pred is the predicted trajectory, y ref is the reference trajectory, u is the control input, λ is the regularization parameter; Constraint conditions:
[0048]
[0049] Specifically, divide the optimized path into multiple local segments, apply the quadratic programming optimizer to each local segment, adjust the control input u, and replace the corresponding trajectory segment in the original optimized path to obtain the corrected optimized path; S353. Use the locally adjusted trajectory segment to replace the corresponding trajectory segment in the original optimized path to obtain the final optimized path; It should be noted that through the verification of the acceleration derivative and the curvature derivative, uncomfortable trajectories such as sudden acceleration and sharp turns are filtered, and local correction is performed through quadratic programming to improve the riding experience and make the control feasible; by performing second-order dynamics verification on the optimized path, the defect that the traditional kinematic model ignores the physical limitations of the actuator is avoided, ensuring that the trajectory can be actually executed by the vehicle; The specific steps of step S36 are as follows: S361. Adjust the control inputs of the vehicle, including the steering angle and acceleration, according to the trajectory parameters of the target trajectory points corresponding to the final optimized path; control input ; target trajectory point ; S362. Use the model predictive control algorithm to control the vehicle state information of the current trajectory point of the vehicle to ensure that the vehicle travels along the optimized trajectory; Model predictive control algorithm formula:
[0050] where y pred is the predicted trajectory, y ref is the reference trajectory, u is the control input, λ is the regularization parameter; Vehicle dynamic model:
[0051] where x t is the state of the vehicle at time t u t is the control input, and f is the dynamic model of the vehicle; Constraint conditions:
[0052]
[0053] Specifically, according to the target trajectory point y ref of the optimized path, calculate the control input u, use the model predictive control algorithm to solve the optimization problem, and obtain the optimal control input , apply the optimal control input , and drive the vehicle to travel along the optimized trajectory.
[0054] It should be noted that by converting the optimized trajectory points into control inputs such as the steering angle and acceleration, trajectory tracking is achieved through model predictive control to ensure that the vehicle's dynamic response is consistent with the predicted trajectory; the rolling optimization of model predictive control can dynamically adjust the control input to adapt to real-time environmental changes.
[0055] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0056] Such as Figure 2As shown below, the following is an embodiment of the vehicle driving trajectory prediction system provided by the present disclosure. This system and the vehicle driving trajectory prediction methods of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the vehicle driving trajectory prediction system, reference may be made to the embodiments of the above vehicle driving trajectory prediction methods.
[0057] The system includes: A data collection and feature extraction module, configured to collect the historical trajectory of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess and extract features from the trajectory data; A trajectory prediction module, configured to use a Transformer combined with a graph neural network to construct a trajectory prediction model, construct a multi-task loss function based on estimated prediction accuracy and uncertainty estimation, then use the extracted features to construct a training set to train the trajectory prediction model, and adjust the parameters of the trajectory prediction model according to the minimum value of the multi-task loss function during the training process; A trajectory optimization module, configured to use the trajectory prediction model to predict the vehicle trajectory, optimize the trajectory parameters of the prediction with the goal of minimizing the prediction error, and adjust the optimization parameters with vehicle dynamics constraints and road constraints as constraint conditions during the optimization process to obtain an optimized vehicle prediction trajectory.
[0058] Through the interaction and cooperation of the data collection and feature extraction module, the trajectory prediction module, and the trajectory optimization module in this embodiment, a complete closed loop is realized from data collection, model training to trajectory optimization, which can be seamlessly embedded in the intelligent driving system to provide a basis for path planning and control.
[0059] The vehicle driving trajectory prediction method provided by the embodiments of the present application can be applied to an electronic device. Those skilled in the art can understand that the structure of the electronic device involved in the embodiments of the present invention does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.
[0060] The electronic device may include a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, buttons, a camera, a display screen, and a Subscriber Identity Module (SIM) card interface, etc.
[0061] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor may include one or more processing units. For example, the processor may include a Central Processing Unit (CPU), etc., an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-Network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0063] Among them, the processor may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0064] A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory may save the instructions or data that the processor has just used or recycled. If the processor needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor, and thus improves the system efficiency.
[0065] The above-mentioned electronic device implements the technical solution of the vehicle driving trajectory prediction method of the present application, which includes collecting the historical trajectory of the vehicle to determine each trajectory point, collecting the vehicle state information and environmental information of each trajectory point as trajectory data, and using a deep learning denoising algorithm to preprocess the trajectory data and extract feature sequences; using a Transformer combined with a graph neural network to construct a trajectory prediction model, using the extracted feature sequences to construct a training set to train the trajectory prediction model, and using a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during the training process; using the trajectory prediction model to predict the vehicle trajectory, aiming to minimize the prediction error, using the Bayesian optimization method to optimize the trajectory parameters, and adjusting the optimized parameters with vehicle dynamics and road constraints as constraints during the optimization process to obtain the optimized vehicle predicted trajectory, achieving the beneficial effect of high-precision prediction of vehicle trajectories in complex traffic environments through multi-fusion and multi-stage optimization.
[0066] In the storage medium provided by the present application, there is a program product capable of implementing the vehicle driving trajectory prediction method.
[0067] The vehicle driving trajectory prediction method includes: collecting the historical trajectory of the vehicle to determine each trajectory point, collecting the vehicle state information and environmental information of each trajectory point as trajectory data, and using a deep learning denoising algorithm to preprocess the trajectory data and extract feature sequences; using a Transformer combined with a graph neural network to construct a trajectory prediction model, using the extracted feature sequences to construct a training set to train the trajectory prediction model, and using a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during the training process; using the trajectory prediction model to predict the vehicle trajectory, aiming to minimize the prediction error, using the Bayesian optimization method to optimize the trajectory parameters, and adjusting the optimized parameters with vehicle dynamics constraints and road constraints as constraints during the optimization process to obtain the optimized vehicle predicted trajectory.
[0068] In some possible implementation manners, the vehicle driving trajectory prediction method of the present disclosure can be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.
[0069] The storage medium of the present disclosure may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0070] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle driving trajectory prediction method, characterized in that It includes the following steps: S1. Collect the historical trajectories of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use a deep learning denoising algorithm to preprocess the trajectory data and extract the feature sequence; S2. Use Transformer combined with a graph neural network to build a trajectory prediction model, use the extracted feature sequence to build a training set to train the trajectory prediction model, and use a multi-task loss function constructed based on trajectory prediction accuracy and uncertainty estimation to adjust the parameters of the trajectory prediction model during the training process; S3. Use the trajectory prediction model to predict the vehicle trajectory. With the goal of minimizing the prediction error for the predicted vehicle trajectory, use the Bayesian optimization method to optimize the trajectory parameters, and adjust the optimized parameters with vehicle dynamics constraints and road constraints as the constraint conditions during the optimization process to obtain the optimized vehicle prediction trajectory.
2. The vehicle driving trajectory prediction method according to claim 1, wherein In step S1, the vehicle state information includes vehicle speed, acceleration, direction angle, and steering angle; The environmental information includes road topology, lane lines, traffic signal states, relevant vehicles, pedestrian, and obstacle positions; In step S1, a convolutional neural network model is used to extract the feature sequence and filter the noise from the trajectory data.
3. The vehicle driving trajectory prediction method according to claim 2, wherein The specific steps of step S2 are as follows: S21. Input the extracted feature sequence into the Transformer model, and use the Transformer model to perform position encoding on the feature sequence and calculate the attention weights to obtain the attention output partial features; S22. Calculate the relative positions of the current vehicle and relevant vehicles based on the positions of relevant vehicles in the extracted feature sequence, and construct an adjacency matrix with each relative position as an element; S23. Input the attention output partial features and the adjacency matrix into the graph neural network model, and update the node features of the current vehicle through message passing in the graph neural network to obtain the graph neural network partial interaction features; S24. Fuse the attention output partial features and the graph neural network partial interaction features to complete the construction of the trajectory prediction model; S25. Construct a multi-task loss function including a trajectory prediction error term and an uncertainty estimation term; S26. Use the extracted feature sequence to build a training set to train the trajectory prediction model, and adjust the parameters of the trajectory prediction model with the goal of minimizing the multi-task loss function value during the training process.
4. The vehicle driving trajectory prediction method according to claim 3, wherein The specific steps of step S3 are as follows: S31. Collect the trajectory data of the current trajectory point of the vehicle and input it into the trajectory prediction model to obtain the predicted trajectory; S32. Define the optimization objective function including a prediction error term, a smoothness penalty term, and a traffic rule penalty term, and use the lateral offset and smoothness coefficient of the trajectory point as the trajectory parameter variables; S33. Use the Bayesian optimization method to optimize the trajectory parameters, generate a Gaussian process model of the optimization objective function, and use the expected improvement criterion to select the optimal trajectory parameters to generate several groups of candidate trajectories; S34. Use the random tree search algorithm to search for a feasible path that satisfies road constraints and vehicle dynamics constraints from multiple groups of candidate trajectories, and use minimizing the path length and path curvature penalty as the search objective during the search process; S35. Perform second-order dynamics verification on the trajectory points in the searched feasible paths, and locally adjust the feasible paths that fail the verification through numerical optimization to obtain the final optimized path; S36. According to the target trajectory points corresponding to the final optimized path, use the model predictive control algorithm to control the vehicle state information of the current vehicle trajectory point, so that the vehicle travels along the optimized target trajectory point.
5. The vehicle driving trajectory prediction method according to claim 4, wherein The specific steps of step S34 are as follows: S341. Initialize the random tree search algorithm, set the starting point as the current vehicle trajectory point, and the ending point as the target trajectory point; S342. Randomly sample trajectory points in the candidate trajectories to construct the nodes of the random tree; S343. Calculate the connection path between each sampled trajectory point and the nearest node, and ensure that the connection path satisfies the road constraints and vehicle dynamics constraints; S344. Evaluate the path length and path curvature penalty of each connection path, and select the connection path with the shortest path length and the smallest curvature as the feasible path; S345. Select the optimal path from all feasible paths as the optimized path.
6. The vehicle driving trajectory prediction method according to claim 5, wherein The specific steps of step S35 are as follows: S351. Take the derivatives of the acceleration and curvature of the optimized path output by the random tree search algorithm; When the derivative of the acceleration exceeds the physical limit of the vehicle actuator or the derivative of the curve exceeds the comfort threshold, mark it as a path to be corrected; If both the acceleration derivative and the curvature derivative meet the requirements, go to step S36; S352. Locally adjust the path to be corrected using a quadratic programming optimizer to ensure that the corrected trajectory meets the vehicle dynamics constraints and comfort requirements; S353. Replace the corresponding trajectory segment in the original optimized path with the locally adjusted trajectory segment to obtain the final optimized path.
7. The vehicle driving trajectory prediction method according to claim 6, characterized in that The specific steps of step S36 are as follows: S361. Adjust the control inputs of the vehicle, including the steering angle and acceleration, according to the trajectory parameters of the target trajectory points corresponding to the final optimized path; S362. Use the model predictive control algorithm to control the vehicle state information of the current vehicle trajectory point to ensure that the vehicle travels along the optimized trajectory.
8. A vehicle driving trajectory prediction system, characterized in that, Including: The data acquisition and feature extraction module is used to collect the historical trajectories of the vehicle to determine each trajectory point, collect the vehicle state information and environmental information of each trajectory point as trajectory data, and use the deep learning denoising algorithm to preprocess and extract features from the trajectory data; The trajectory prediction module is used to construct a trajectory prediction model using Transformer combined with a graph neural network, construct a multi-task loss function with estimated prediction accuracy and uncertainty estimation, and then use the extracted features to construct a training set to train the trajectory prediction model, and adjust the trajectory prediction model parameters according to the minimum value of the multi-task loss function during the training process; The trajectory optimization module is used to use the trajectory prediction model to predict the vehicle trajectory, optimize the trajectory parameters of the predicted vehicle trajectory with the goal of minimizing the prediction error, and adjust the optimization parameters with the vehicle dynamics constraints and road constraints as the constraint conditions during the optimization process to obtain the optimized vehicle predicted trajectory.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. It is characterized in that when the processor executes the program, it implements the steps of the vehicle driving trajectory prediction method according to any one of claims 1 to 7.
10. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the vehicle driving trajectory prediction method according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent automobile path tracking control method based on dual-network iterative optimization
CN120686638A
Vehicle control method, computer readable storage medium and vehicle
CN120697763A
Sparse trajectory recovery method, device and system, and storage medium
CN121051416A
Sparse trajectory recovery method and device, system, storage medium
CN121051416B
Expressway interleaving area lane change accident risk early warning method and system based on vehicle trajectory data
CN121305922A