Trajectory optimization method, electronic device, vehicle and readable storage medium
Patent Information
- Application Number
- CN202611073707.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-07-20
AI Technical Summary
[0004]然而,纯粹的数据驱动模型也存在其固有缺陷
[0022] Furthermore, it provides more comfortable and safer control commands for subsequent vehicle planning and control, so as to ensure the stability and reliability of the overall driving operation and avoid unreasonable control actions caused by sudden trajectory changes. Without changing the overall prediction capability of the original data-driven trajectory prediction model, it corrects the trajectory prediction model at low cost, outputs possible physical distortion problems, and improves the quality of the final trajectory.
Smart Images

Figure CN122585235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-assisted driving technology, and in particular to a trajectory optimization method, electronic device, vehicle, and readable storage medium. Background Technology
[0002] Trajectory planning is currently one of the core modules of driver assistance systems. The accuracy, smoothness, and rationality of its results directly affect the performance of subsequent control modules and are key to ensuring driving safety and comfort.
[0003] In recent years, data-driven methods based on deep learning have become mainstream in the field of trajectory planning. These models, trained on massive amounts of driving data, learn the association between complex scene contexts and motion patterns, enabling them to predict multimodal, probabilistic trajectories. This surpasses the predictive capabilities of traditional simple kinematic models based on constant velocity (CV) and constant acceleration (CA).
[0004] However, purely data-driven models also have their inherent limitations. For example, due to their black-box nature, the model's output may sometimes violate basic physical laws or kinematic principles, leading to unreasonable predictions. Summary of the Invention
[0005] This application provides an improved trajectory optimization method, an electronic device, a vehicle, and a readable storage medium.
[0006] This application provides a trajectory optimization method, which includes: outputting a predicted trajectory of a vehicle from a trajectory prediction model, and using a kinematic model to extrapolate a prior kinematic trajectory for a future time period after the current time, with the current real state of the vehicle as the initial value; determining whether the predicted trajectory exhibits physical distortion in the initial segment based on the difference between the trajectory points at corresponding times of the prior kinematic trajectory and the predicted trajectory; and smoothing the trajectory points in the initial segment when physical distortion occurs in the predicted trajectory to obtain the final output trajectory.
[0007] Furthermore, determining whether physical distortion occurs in the initial segment of the predicted trajectory based on the difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory includes: comparing the degree of difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory with the current dynamic threshold corresponding to the current scene of the vehicle to determine whether physical distortion occurs in the initial segment of the predicted trajectory; wherein, the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold.
[0008] Furthermore, determining whether the predicted trajectory exhibits physical distortion in the initial segment based on the difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory includes: if the degree of difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory is less than the current dynamic threshold corresponding to the current scene of the vehicle, then it is determined that the predicted trajectory does not exhibit physical distortion in the initial segment; the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold; if the degree of difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory is greater than the dynamic threshold, then it is determined that the predicted trajectory exhibits physical distortion in the initial segment.
[0009] Furthermore, the method also includes determining the dynamic threshold by: acquiring an image collected by the vehicle; the image being used to describe scene data of the environment surrounding the vehicle; extracting the scene feature vector of the current frame of the image; nonlinearly mapping the scene feature vector to a scalar threshold as the dynamic threshold; the dynamic threshold being positively correlated with the complexity of the scene.
[0010] Furthermore, the step of nonlinearly mapping the scene feature vector to a scalar threshold as the dynamic threshold includes: using a nonlinear function to map the scene feature vector to a scalar threshold as the dynamic threshold; the nonlinear function includes a differentiable function.
[0011] Furthermore, when the predicted trajectory exhibits physical distortion in the initial segment, smoothing the trajectory points in the initial segment to obtain the final output trajectory includes: when the predicted trajectory exhibits physical distortion in the initial segment, weighted fusion of the kinematic prior trajectory and the initial segment of the predicted trajectory to obtain the final output trajectory.
[0012] Furthermore, the step of weightedly fusing the kinematic prior trajectory with the initial segment of the predicted trajectory to obtain the final output trajectory includes: outputting the trajectory points of the predicted trajectory and the first confidence level of each trajectory point through the trajectory prediction model; the confidence level is used to represent the uncertainty estimate of each trajectory point; fusing the constant second confidence level of the prior model with the first confidence level to obtain the fusion weight; using the fusion weight, weightedly fusing the kinematic prior trajectory with the initial segment of the predicted trajectory to generate the fused trajectory; and smoothing and optimizing the fused trajectory to obtain the final output trajectory.
[0013] Furthermore, the smoothing of the trajectory points of the initial segment to obtain the final output trajectory includes: analyzing the validation set to observe that the predicted trajectory begins to become physically reasonable, thus obtaining a segment to be replaced; the segment to be replaced includes the first N points; using the kinematic prior trajectory to replace the segment to be replaced, thus obtaining a replaced segment; and using interpolation to smoothly connect the connection points of the replaced segment and the predicted segment to obtain the final output trajectory.
[0014] Furthermore, before outputting the predicted trajectory of the vehicle from the trajectory prediction model, the method further includes: acquiring scene data and vehicle data of the vehicle; inputting the scene data and vehicle data into the trajectory prediction model to output the predicted trajectory; the trajectory prediction model is trained using a loss function that includes at least one of position loss, velocity loss, and acceleration loss.
[0015] Furthermore, the trajectory prediction model is trained using a loss function that includes at least one of position loss, velocity loss, and acceleration loss. The step of inputting the scene data and vehicle data into the trajectory prediction model to output the predicted trajectory includes: inputting the scene data and vehicle data into the trajectory prediction model to be trained; the total loss function used to train the trajectory prediction model to be trained includes at least one of position loss, velocity loss, and acceleration loss; when the loss value of the total loss function converges, the trajectory prediction model is obtained; the trajectory prediction model is used to output the predicted trajectory.
[0016] This application provides a vehicle including one or more processors for implementing the trajectory optimization method described above.
[0017] This application provides an electronic device including one or more processors for implementing the method described in any of the preceding claims.
[0018] This application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the method described in any of the preceding claims.
[0019] This application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any of the preceding claims.
[0020] In some embodiments, the trajectory optimization method of this application outputs the predicted trajectory of the vehicle from the trajectory prediction model, and uses a kinematic model to extrapolate the kinematic prior trajectory in the future time after the current time, with the current real state of the vehicle as the initial value; the difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory; when the predicted trajectory has physical distortion in the initial segment, the trajectory points in the initial segment are smoothed to obtain the final output trajectory.
[0021] Thus, by utilizing the uncertainty metric output by the trajectory prediction model itself, the degree of dependence on prior knowledge is adaptively and dynamically adjusted, making the predicted trajectory closer to the prior trajectory, thereby conforming to basic physical laws or kinematic common sense and producing reasonable predictions. Furthermore, when physical distortion occurs in the initial segment of the predicted trajectory, the trajectory points in that initial segment are smoothed, ensuring that the starting point of the predicted trajectory (at the current moment) matches the vehicle's actual current state, avoiding a sudden, uneven trajectory start. Possessing extremely high physical realism from the outset results in a final output trajectory that is physically continuous and smoothly transitioning, making it more reasonable.
[0022] Furthermore, it provides more comfortable and safer control commands for subsequent vehicle planning and control, so as to ensure the stability and reliability of the overall driving operation and avoid unreasonable control actions caused by sudden trajectory changes. Without changing the overall prediction capability of the original data-driven trajectory prediction model, it corrects the trajectory prediction model at low cost, outputs possible physical distortion problems, and improves the quality of the final trajectory. Attached Figure Description
[0023] Figure 1 The diagram shown is a schematic flowchart of the trajectory optimization method provided in an embodiment of this application; Figure 2 As shown Figure 1 The flowchart shown illustrates the trajectory prediction model training process of the trajectory optimization method. Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0025] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0026] In related technologies, purely data-driven models also have inherent flaws. For example, due to their black-box nature, the model's output may sometimes violate basic physical laws or kinematic common sense, resulting in unreasonable predictions. For instance, the starting point of the predicted trajectory (the current moment) may not match the vehicle's actual current state (especially speed and acceleration), resulting in a sudden, uneven trajectory starting point, which may trigger control commands such as sudden acceleration or braking that seriously affect comfort or even safety.
[0027] To address the issue that the black-box nature of the aforementioned related technologies sometimes leads to model outputs that violate basic physical laws or kinematic principles, resulting in unreasonable predictions, this application provides a trajectory optimization method. This method compares the predicted trajectory of a vehicle output by a trajectory prediction model with a prior kinematic trajectory derived from a kinematic model using the vehicle's current real state as an initial value. The method then uses the difference between the trajectory points at corresponding times of the prior kinematic trajectory and the predicted trajectory. If physical distortion occurs in the initial segment of the predicted trajectory, the trajectory points in the initial segment are smoothed to obtain the final output trajectory.
[0028] Thus, by utilizing the uncertainty measure output by the trajectory prediction model itself, the degree of dependence on prior knowledge is adaptively and dynamically adjusted, making the predicted trajectory closer to the prior trajectory, thereby conforming to basic physical laws or kinematic common sense and producing reasonable predictions. Furthermore, when physical distortion occurs in the initial segment of the predicted trajectory, the trajectory points in that initial segment are smoothed, ensuring that the starting point of the predicted trajectory (at the current moment) matches the vehicle's actual current state, avoiding a sudden, uneven trajectory start. Possessing extremely high physical realism from the outset results in a physically continuous and smoothly transitioning trajectory, making it more reasonable. Moreover, it provides more comfortable and safer control commands for subsequent vehicle planning and control, ensuring the stability and reliability of the overall driving operation and avoiding unreasonable control actions caused by trajectory abrupt changes. Without altering the overall predictive capability of the original data-driven trajectory prediction model, it low-costly corrects potential physical distortion issues in the output of the trajectory prediction model, improving the quality of the final trajectory.
[0029] Figure 1 The diagram shown is a schematic flowchart of the trajectory optimization method provided in an embodiment of this application.
[0030] like Figure 1 As shown, the trajectory optimization method may include, but is not limited to, the following steps 110 to 130: Step 110: Output the predicted trajectory of the vehicle from the trajectory prediction model, and use the kinematic model to extrapolate the kinematic prior trajectory in the future time after the current time, with the current real state of the vehicle as the initial value.
[0031] The predicted trajectory mentioned above represents the set of discrete trajectory points of the vehicle at multiple future moments, output by the deep learning model. The kinematic prior trajectory is the future driving trajectory derived from the vehicle's own motion laws and satisfies physical constraints. This application outputs the predicted trajectory of the vehicle from the trajectory prediction model by acquiring the vehicle's scene data and vehicle data, and then inputting the scene data and vehicle data into the trajectory prediction model.
[0032] Next, the above trajectory prediction model, or prediction model for short, is used to represent a deep learning model that outputs the future driving trajectory of the vehicle based on environmental information and historical state information collected by the vehicle's sensors. The current real state of the vehicle may include, but is not limited to, at least one of the core motion parameters such as current position, speed, acceleration, and heading angle.
[0033] The trajectory prediction model described above is a deep learning model. As a data-driven model, it is trained using massive amounts of driving data to understand and predict multimodal trajectories in complex scenarios. However, it may produce illusions that violate the laws of physics.
[0034] Furthermore, the prior kinematic trajectory of the aforementioned kinematic model is obtained as follows: using the current real state of the vehicle as the initial value, and according to a preset time step, based on the Ackerman steering geometry or bicycle kinematic model, the vehicle's position, speed, heading angle, and other motion parameters at each future moment are successively deduced. Finally, a continuous sequence of prior trajectory points over a future period is obtained. During the deduction process, physical constraints such as the vehicle's maximum speed, maximum acceleration, and maximum steering angle are added to ensure that the obtained prior kinematic trajectory conforms to the vehicle's own motion characteristics and does not produce abnormal results that do not conform to physical laws.
[0035] The kinematic models described above belong to the category of physical prior models, such as CV (Constant Velocity) / CA (Constant Acceleration) models. These are generative models based on explicit physical formulas, rather than data-driven models. While they are computationally efficient and produce stable outputs, they cannot understand complex scenarios and have limited predictive capabilities.
[0036] The fusion of trajectory prediction models and kinematic models refers to the deep and adaptive fusion of a kinematic model based on explicit physical formulas (as a reliable prior) and a data-driven trajectory prediction model based on deep learning.
[0037] In this regard, the embodiments of this application actually perform a deep adaptive fusion of data-driven and physical prior models, and use them as dynamic prior knowledge to perform a deep and adaptive fusion with the data-driven trajectory prediction model.
[0038] Specifically, this approach utilizes kinematic models to generate short-term deterministic trajectories as a physically plausible baseline. A data-driven adaptive thresholding network then dynamically evaluates the deep learning model's output. This fully leverages the powerful scene understanding and multimodal prediction capabilities of deep learning models while effectively constraining their output range with a physical prior model. This fundamentally curbs the problems of random predictions and illusions that violate physical laws, achieving explainable AI (Artificial Intelligence). Furthermore, the introduction of physical priors provides strong guidance for model optimization, reducing reliance on massive amounts of training data and improving learning efficiency. See below for a detailed solution.
[0039] Step 120: Based on the difference between the trajectory points at corresponding times of the kinematic prior trajectory and the predicted trajectory, determine whether the predicted trajectory exhibits physical distortion in the initial segment.
[0040] Step 130: When the predicted trajectory exhibits physical distortion in the initial segment, the trajectory points in the initial segment are smoothed to obtain the final output trajectory, which is then output to the downstream planning and control module to complete this trajectory optimization process.
[0041] If the predicted trajectory does not exhibit physical distortion in the initial segment, then return to step 110 to continue execution.
[0042] The final output trajectory refers to the future trajectory obtained by fusing the predicted trajectory after smoothing the initial segment with the kinematic prior trajectory. The final output trajectory has at least three physical characteristics: physical rationality that conforms to Newtonian mechanics and vehicle kinematics constraints, spatiotemporal smoothness that conforms to the continuity of position, velocity, and acceleration, and accuracy of behavioral intent that reflects the true intention of the driver or the environment in interaction.
[0043] The starting segment here refers to the trajectory segment corresponding to the first few predicted times closest to the current time in the predicted trajectory.
[0044] The aforementioned physical distortion refers to the difference between the starting point of the original predicted trajectory and the corresponding point of the kinematic prior trajectory exceeding a preset reasonable range, thus failing to meet the physical constraints of vehicle motion.
[0045] In the embodiments of this application, the trajectory prediction is based on kinematic prior trajectory constraints, which can adaptively adjust the degree of dependence on prior knowledge. This not only preserves the trajectory prediction model's adaptability to complex scenarios, but also corrects the distortion problem in the prediction results that does not conform to the physical motion rules. At the same time, special distortion cases in the initial segment are handled separately, ensuring that the final output trajectory meets the requirements of physical continuity and motion smoothness from the starting point, effectively improving the reliability of the trajectory prediction results.
[0046] Combination Figure 1 As shown, at least one of the following optional methods is used to determine whether physical distortion occurs in the initial segment of the predicted trajectory: In the first optional method of step 120 above, step 210 compares the degree of difference between the kinematic prior trajectory and the trajectory points at the corresponding time with the current dynamic threshold corresponding to the current scene of the vehicle to determine whether the predicted trajectory has physical distortion in the initial segment; the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold.
[0047] The correspondence between scenarios and dynamic thresholds is a highly nonlinear, data-driven relationship, not a lookup table mapping. This correspondence refers to a mapping model from scenario feature vectors to dynamic thresholds. This mapping model is pre-trained using labeled sample data and can adaptively output appropriate dynamic thresholds based on the driving characteristics of different scenarios. It eliminates the need to pre-set fixed thresholds for each scenario, thus adapting to complex and ever-changing real-world driving scenarios and improving the accuracy of physical distortion judgment.
[0048] In the embodiments of this application, the correspondence between the scene and the dynamic threshold is used to indicate the constraint capability of scene perception. In normal scenes, the dynamic threshold is tightened, requiring the predicted trajectory to be smooth and ensuring comfort; in emergency scenes, the dynamic threshold is relaxed, allowing the predicted trajectory to deviate from simple kinematic priors, thereby preserving the ability of the data prediction model to capture complex and intense driving behaviors, and achieving an adaptive balance between smoothness and agility.
[0049] Combination Figure 1 As shown, in the second optional method of step 120 above, in step 310, if the difference between the trajectory points at the corresponding time of the kinematic prior trajectory and the predicted trajectory is less than the current dynamic threshold corresponding to the current scene of the vehicle, then it is determined that the predicted trajectory has not experienced physical distortion in the initial segment; the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold.
[0050] Step 320: If the difference between the trajectory points at the corresponding time points of the kinematic prior trajectory and the predicted trajectory is greater than the dynamic threshold, then it is determined that the predicted trajectory has physical distortion in the initial segment.
[0051] In this embodiment, by matching corresponding dynamic thresholds for different scenarios, the standard for distortion judgment can be adaptively adjusted based on scenario characteristics, avoiding judgment bias caused by a uniform threshold. In scenarios with complex and ever-changing road conditions, dynamic thresholds can be adapted to the scenario characteristics to set a reasonable judgment range. This avoids missing distortion problems due to overly loose threshold settings, and also avoids misjudging normal predicted trajectories due to overly tight threshold settings, further improving the accuracy of trajectory correction and ensuring that the final output trajectory meets both physical feasibility and scenario adaptation requirements.
[0052] The trajectory optimization method may also include, but is not limited to, determining the dynamic threshold using at least one of the following optional methods: In the first method of determining the dynamic threshold described above, step 410 involves acquiring an image collected by the vehicle; the image is used to describe scene data of the environment surrounding the vehicle.
[0053] The aforementioned scenario data association process possesses context-aware capabilities, enabling higher-level assisted driving decision-making to advance further.
[0054] Step 420: Extract the scene feature vector of the current frame of the image.
[0055] Step 430: The scene feature vector is nonlinearly mapped to a scalar threshold, which is used as the dynamic threshold; the dynamic threshold is positively correlated with the complexity of the scene.
[0056] In this embodiment, the limitations of traditional fixed constraints are overcome. By using adaptive thresholds, the prediction model can intelligently determine when to maintain smoothness and when to respond to intense actions. This improves the performance and reliability of the prediction system in extreme scenarios and emergency situations.
[0057] In related technologies, the if-then conditional statements are pre-defined rules written by the programmer, such as static thresholds if the light is green, the vehicle in front has moved, or there are no nearby obstacles. Therefore, fixed, pre-written rules are rigid, difficult to cover all situations, and require a lot of manual debugging.
[0058] Compared to fixed, pre-defined rules, the dynamic threshold in this application is an adaptive threshold prediction network that predicts thresholds based on the input scene feature vector. It is a comprehensive result calculated through its internal complex nonlinear functions such as the sigmoid function and ReLU activation functions.
[0059] The adaptive threshold prediction network in this application, after learning from a large amount of data, discovered that when the input features exhibit a pattern of a green traffic light, a large displacement of the vehicle in front, and a long distance to the nearest obstacle, outputting a moderately sized threshold ε optimizes the performance of the entire tracking system. (Identification Switch) has the fewest number of switches and the most continuous trajectory.
[0060] Based on this, the adaptive threshold prediction network learns the correspondence between feature patterns and optimal dynamic thresholds. Therefore, different scenarios in the embodiments of this application correspond to different dynamic thresholds.
[0061] The dynamic threshold changes continuously and automatically, and is derived by the adaptive threshold prediction network based on a large number of scene features, rather than relying on manually defined if-then rules. This allows it to capture complex feature interactions that are difficult for humans to design.
[0062] In the second method of determining the dynamic threshold described above, a scene feature vector is extracted based on the current scene using a pre-built scene feature model. Then, the scene feature vector is input into a pre-trained dynamic threshold prediction network, which directly outputs a current dynamic threshold adapted to the current scene. This eliminates the need for manually pre-setting fixed thresholds for each scene, enabling the matching of physical distortion judgment requirements under different scenarios and improving the accuracy of the judgment.
[0063] In this embodiment, the criteria for judging physical distortion can be adaptively adjusted according to the characteristics of different driving scenarios, avoiding misjudgment or omission of fixed thresholds in complex scenarios, improving the adaptability and accuracy of trajectory correction, and ensuring that the final output trajectory always conforms to the actual physical laws of vehicle motion.
[0064] For example, the threshold size used to represent different levels of strictness or width is automatically adjusted based on the real-time perceived complexity of the scene.
[0065] A high threshold is used to match complex and highly uncertain scenarios, allowing for a more lenient matching process. This allows for matching associations with slightly higher costs, which may introduce some errors, but the target must not be lost.
[0066] Low thresholds are used for matching simple and highly deterministic scenarios, allowing for strict matching. This only allows matching of associations with very low cost, pursuing extremely high matching accuracy. The value of the high threshold mentioned above is greater than the value of the low threshold. Of course, the low threshold mentioned above can include, but is not limited to, at least one of medium-low thresholds and the lowest threshold.
[0067] A medium threshold is used to match scenarios with moderate uncertainty, performing intermediate matching, such as fuzzy matching or approximate matching. Please refer to Table 1 below for details on scenario and threshold allocation: Table 1. Correspondence between scene categories and dynamic threshold allocation
[0068] The adaptive threshold prediction network in this paper learns the above correspondence through training. The detailed learning process is as follows: First, we collected a large number of driving data sequences containing different scenarios.
[0069] Then, experts or automated tools will label each frame of data with an optimal dynamic threshold. This optimal dynamic threshold can be derived by working backward from the tracking results, such as whether the track is lost or whether an ID switch has occurred.
[0070] Next, the scene feature vector F_scene for each frame is used as input, and the optimal labeled threshold is used as the target output to train the aforementioned adaptive threshold prediction network. This adaptive threshold prediction network adjusts its weight parameters by minimizing the difference between the predicted value and the true value. Here, the difference is used to represent minimizing the error between the predicted value and the true value. This error may include, but is not limited to, mean squared error.
[0071] Finally, the trained adaptive threshold prediction network is deployed on the vehicle, which can then predict the most suitable dynamic threshold ε for the current frame based on the real-time extracted F_scene.
[0072] The aforementioned adaptive threshold prediction network analyzes multi-dimensional scene features, implicitly "understanding" the complexity and uncertainty of the current environment, and outputs a continuously changing optimal threshold accordingly. This allows the multi-target tracking system to achieve optimal performance in different scenarios. Compared to any static threshold or manually defined rule system, this is far more intelligent and powerful.
[0073] In the third method of determining the dynamic threshold mentioned above, firstly, the key features of the current driving scene are extracted, which may include, but are not limited to, at least one of the following: road type, vehicle driving status and distribution of surrounding obstacles. After normalizing the above information, they are concatenated to construct the scene feature vector F_scene.
[0074] Next, based on the scene feature vector, a dynamic threshold corresponding to the current scene is determined. This dynamic threshold is used to judge the difference between the predicted trajectory and the kinematic prior trajectory, thereby determining the dependency weight on prior knowledge.
[0075] The greater the difference, the higher the dependence weight corresponding to the dynamic threshold, and the final output trajectory will be more biased towards the kinematic prior trajectory, thereby correcting the physical distortion problem of the predicted trajectory; the smaller the difference, the higher the rationality of the predicted trajectory itself, and the dependence on prior knowledge will be appropriately reduced, preserving the adaptability of the predicted trajectory to the scene.
[0076] Compared to related technologies that use fixed thresholds to correct trajectories, the embodiments of this application do not use a uniform correction intensity. Instead, they can adaptively adjust the correction intensity based on the current actual driving scenario. This avoids overcorrection that could lead to a loss of scenario adaptability in trajectory prediction, and also avoids retaining the physical distortion of the predicted trajectory when the correction is insufficient. Overall, this improves the physical rationality and scenario adaptability of the predicted trajectory.
[0077] Combination Figure 1 As shown, the nonlinear mapping of the scene feature vector to a scalar threshold as the dynamic threshold may include, but is not limited to, the following: using a nonlinear function to map the scene feature vector to a scalar threshold as the dynamic threshold; the nonlinear function includes a differentiable function.
[0078] In this embodiment, the aforementioned differentiable function can be learned through a neural network. For different driving scenarios, the network learns different mapping parameters, and the resulting dynamic threshold also changes with the scenario, thereby achieving adaptive adjustment of the correction intensity. The entire mapping process is differentiable, supporting end-to-end model training without requiring separate tuning of the threshold module, simplifying the training process while ensuring the overall training effect of the trajectory prediction model.
[0079] Compared to static thresholds in related technologies It cannot cope with complex and ever-changing driving scenarios. The dynamic threshold of this application embodiment... The value is determined by the scene feature vector. Certainly, real-time adaptive weighting is achieved. Furthermore, dynamic thresholding... The value is derived from the scene feature vector extracted in real time. Through a lightweight adaptive mapping function Calculated, i.e. This enables real-time, fine-tuning of the obstacle mismatch tolerance.
[0080] Furthermore, in complex scenarios with dense obstacles and high uncertainty, the mapping function... It will automatically output a larger dynamic threshold. Relax matching restrictions to prevent losing the target due to mismatches; in scenarios with few obstacles and simple road conditions, the mapping function... Output a small dynamic threshold Strict matching is implemented to prevent identity switching.
[0081] In this regard, the adjustment of the dynamic threshold is a non-linear mapping process from scene to threshold, that is, the correspondence between scene type and dynamic threshold. The detailed process is as follows: Step 1: Acquire the input image; the image is used to describe scene data of the environment surrounding the vehicle; the scene data is used to describe the complexity and uncertainty of the current scene. Based on the scene data, the constructed scene feature vector F_scene may include, but is not limited to, at least one of the following dimensions: 1. The density of obstacles around the target is the number of vehicles, pedestrians, and other obstacles within a certain radius around the main vehicle.
[0082] 2. The main vehicle speed is the current driving speed of the main vehicle. For high-speed scenarios, the matching strictness needs to be increased.
[0083] 3. Scene type encoding is a scene label obtained through high-precision maps or perception results, such as intersection, ramp, congested road section, or highway, which can be one-hot encoded.
[0084] 4. The confidence level of the tracking module is the average confidence level or quality score of the tracking results in the previous frame.
[0085] 5. Sensor uncertainty estimation is the variance of the uncertainty in the position and velocity of the detection box provided by the perception model.
[0086] Step 2: Through mapping functions High-dimensional features Mapped to a scalar threshold .
[0087] Among them, the mapping function It is a differentiable function. For example, the nonlinear function mentioned above is used to represent a model that does not use a linear function. It can include, but is not limited to, at least one of lightweight neural networks and support vector machines or decision tree ensembles.
[0088] The aforementioned lightweight neural network includes: constructing a fully connected neural network with two hidden layers. Each of the two hidden layers has 8-16 neurons, uses the ReLU activation function, and the output layer uses the Sigmoid function to compress the values. Interval. .in and These are the preset lower and upper thresholds. Represents forward propagation in lightweight networks. Normalize the network output and then scale it. Within the range.
[0089] The aforementioned support vector machine or decision tree ensemble models can include, but are not limited to, trained SVR (Support Vector Regression) or Gradient Boosting models. Training SVR or Gradient Boosting models can be used to learn the aforementioned correspondences, making the model more interpretable, providing feature importance analysis, and aiding in understanding the threshold decision logic.
[0090] Step 3: In each calculation cycle (or per frame), the application and online adjustment of the dynamic threshold shall perform the following operations: 1. Extract the current frame .
[0091] 2. Input mapping function The current dynamic threshold ε is obtained. The parameters of the mapping function g(·) can be learned through reinforcement learning or offline optimization. For example, the parameters of g(·) can be optimized by using minimizing the number of tracking ID (Identifier) switching and maximizing the target retention rate as reward signals, so that the threshold adjustment strategy directly serves the final tracking performance index, thus achieving end-to-end optimization.
[0092] 3. Use the current dynamic threshold ε as the cost threshold for associating current frame data (such as the Hungarian algorithm).
[0093] Compared to related technologies that use rule-based systems for adjustment, such as setting a dynamic threshold of 0.8 for scenarios like traffic congestion, static adjustments are not precise enough and rely heavily on manual rules. In this embodiment, dynamic threshold adjustment uses a lightweight, learnable function model to replace manual experience. Based on real-time understanding of the current environment, an optimal fault-tolerant threshold is automatically and continuously output, thus ensuring the robustness and accuracy of the entire multi-target tracking system in different scenarios.
[0094] Examples of application scenarios in this application are as follows: Example 1: The scenario is highway cruising with stable traffic flow. Accordingly, the adaptive threshold prediction network outputs a small current dynamic threshold. The predicted trajectory must be very smooth, closely follow the kinematic priors, and ensure comfort.
[0095] Example 2: The scenario is an emergency cut-in, or a pedestrian suddenly entering the lane. Accordingly, the adaptive threshold prediction network outputs a larger current dynamic threshold. It allows the predicted trajectory to deviate sharply from the prior trajectory in response to emergencies, such as emergency braking or sharp turns, ensuring agility and safety.
[0096] Example 3: The scenario is rainy or snowy weather with a low road surface adhesion coefficient. Accordingly, the adaptive threshold prediction network outputs a moderate but conservative current dynamic threshold ε. This allows for necessary risk avoidance actions while preventing the use of overly aggressive predicted trajectories that could lead to loss of control due to an excessively large threshold.
[0097] Combination Figure 1 As shown, step 130 above can be performed using at least one of the following optional embodiments to obtain the final output trajectory: In the first optional embodiment of step 130 above, when the predicted trajectory exhibits physical distortion in the initial segment, the kinematic prior trajectory and the initial segment of the predicted trajectory are weighted and fused to obtain the final output trajectory.
[0098] In this embodiment, the scene features F_scene of the current frame are extracted and input into a pre-trained adaptive threshold prediction network to output a dynamic fault-tolerant threshold ε adapted to the current scene. This dynamic threshold is then passed to the subsequent trajectory optimization process to constrain the allowable offset range of the predicted trajectory relative to the kinematic prior trajectory during trajectory optimization.
[0099] Furthermore, the scene feature F_scene can be directly stitched together from the environmental data collected in the current frame. The scene feature can include, but is not limited to, two or more categories of information such as scene type, weather conditions, traffic density, and road surface condition. It can fully reflect the characteristics of the current driving scene and achieve automatic adaptation of the fault tolerance threshold according to the scene without the need for additional manual setting of fixed thresholds.
[0100] In this embodiment of the application, the kinematic prior trajectory and the initial segment of the predicted trajectory are weighted and fused to obtain the final output trajectory. This can retain the environmental responsiveness of the predicted trajectory while correcting the distortion results caused by sudden scene changes in the initial segment, so that the final output trajectory not only meets the risk requirements of the current scene, but also satisfies the physical feasibility of vehicle movement.
[0101] Furthermore, the weighted fusion of the kinematic prior trajectory and the initial segment of the predicted trajectory to obtain the final output trajectory includes the following steps 510 to 540: Step 510: Output the trajectory points of the predicted trajectory and the first confidence level of each trajectory point through the trajectory prediction model; the confidence level is used to represent the uncertainty estimate of each trajectory point.
[0102] Step 520: The second confidence level, which is constant in the prior model, is fused with the first confidence level to obtain the fusion weight.
[0103] Step 530: Using the fusion weights, the kinematic prior trajectory and the starting segment of the predicted trajectory are weighted and fused to generate the fused trajectory.
[0104] Step 530 can employ at least one of the following optional examples: using the fusion weights, the kinematic prior trajectory and the initial segment of the predicted trajectory are weighted and fused to generate the fused trajectory.
[0105] Step 540: The fused trajectory is smoothed and optimized to obtain the final output trajectory.
[0106] In this embodiment, the confidence level can be used as a reference to judge the stability of the current scene, further ensuring the rationality of the weighted fusion process. When the confidence level of the tracking result is low, the proportion of the kinematic prior trajectory in the weighted fusion can be increased accordingly, further avoiding trajectory distortion caused by sudden scene changes.
[0107] In the first fusion method, Adaptive Weighted Smoothing (T_pred) and T_prior are weighted and fused at the beginning of the trajectory to obtain the final output trajectory T_final. Thus, compared to related techniques where smoothing or correction is usually independent of the post-processing steps of the trajectory prediction model, this first fusion method is closely integrated with the uncertainty estimation within the trajectory prediction model. It utilizes the reliability signal of the trajectory prediction model itself to guide the correction process, achieving synergy and unification between front-end prediction and back-end correction.
[0108] The weights in the aforementioned weighted fusion are not fixed values, nor are they simply based on linear changes over time. Instead, they are adaptively calculated based on the uncertainty or confidence level of the trajectory prediction model at each time point. Specifically, they are obtained as follows: a. Input: The trajectory prediction model (Uncertainty-Aware Prediction Model) not only outputs trajectory points ( And simultaneously output the uncertainty estimate for each point. This uncertainty estimate can be expressed as: 1. Variance If the trajectory prediction model outputs Gaussian distribution parameters, such as the mean... and variance Therefore, if the trajectory prediction model outputs trajectory points that follow a Gaussian distribution (e.g., mean...) and variance ), The confidence level can then be defined as: ,in, This is a scaling factor used to control sensitivity. The larger the variance, the lower the confidence level.
[0109] 2. The confidence score is a scalar score between 0 and 1 if the trajectory prediction model outputs a confidence score between 0 and 1 for each point. Thus, if the trajectory prediction model outputs multiple trajectory modes and their probability distributions... Then the entropy can be calculated. A higher entropy value indicates a more dispersed modal distribution and greater uncertainty in the prediction. In this case, the confidence level is defined as... ,in Let the maximum possible entropy be (e.g., logk), where, The model predicts the first The probability of each trajectory mode. k represents the total number of trajectory modes output by the model.
[0110] 3. Entropy is defined as the probability distribution output by a trajectory prediction model, for example, across multiple modalities. (b.) Representative trajectory prediction model The confidence level at time t. A higher confidence level indicates greater reliability. Represents a fixed prior model The constant confidence level is set to a moderate value, such as 0.5. Thus, if the trajectory prediction model outputs directly through independent branches... Scalar confidence scores, such as confidence headers trained through supervised learning, are directly used as... .
[0111] The embodiments of this invention are not limited to specific implementation methods; any of the above methods can be used to generate c_pred(t) to support model deployments of different architectures. In actual systems, the appropriate method can be flexibly selected based on computing resources, model structure, and accuracy requirements.
[0112] In response, the adaptive weighted smoothing fusion strategy dynamically calculates the fusion weights based on the model prediction confidence. Let... Let c_prior be the confidence score of the deep learning model at time t for the predicted trajectory point T_pred(t) (range [0, 1]), and c_prior be the fixed confidence score of the kinematic prior model T_prior(t), for example, 0.5. Then the fusion weight is defined as follows: .
[0113] .
[0114] The final trajectory point T_final(t) is obtained by weighted fusion: .
[0115] in, Let be the prediction confidence of the trajectory prediction model at time t. This represents the confidence level of a deep learning trajectory prediction model in predicting the point at time t, and its value range is [range missing]. This value is generated by the uncertainty estimation module of the model output and reflects the reliability of the model's trajectory prediction in the current scene. For example, in situations with occlusion, complex interactions, or ambiguous multimodal distributions, The value is low; in clear, stable scenes, Close to 1.
[0116] This represents the constant confidence level of the kinematic prior model. For simplicity, the confidence level of the kinematic model (such as CV / CA) is set to a fixed constant, such as 0.5, representing the basic credibility of its physical plausibility. `c_prior` does not change with the scene but serves as a safety baseline in the weight calculation. This value can be fine-tuned experimentally, and is generally set to 0.4~0.6 to avoid an overly strong or weak prior.
[0117] The fusion weights for predicting the trajectory at time t. (From...) and The relative size is dynamically determined. The more confident the trajectory prediction model, the better. The larger the value, the more it relies on the predicted trajectory; conversely, the smaller the value, the more it relies on prior knowledge.
[0118] Let be the fusion weight of the prior trajectory at time t. Complementary, satisfying .
[0119] T_pred(t) represents the trajectory state predicted by the deep learning model at time t, which includes position, velocity, and acceleration (e.g., ...). The original predicted trajectory points output by the model are shown below. Compared to the single velocity constraint that related technologies mainly focus on, the multi-state vector constraint of this application embodiment ensures the coordination and consistency of position, velocity, and acceleration changes, and the generated trajectory has extremely high physical realism from the beginning, providing a higher quality and more stable input for the subsequent planning and control module.
[0120] The trajectory state generated by the kinematic prior model at time t. This is the trajectory state generated by the CV or CA model with the true initial state. The short-term trajectory points derived from the starting point strictly satisfy kinematic constraints physically, but lack the ability to express intent.
[0121] These are the final output fused trajectory points. The weighted fused trajectory combines data-driven intent expression with the rationality guarantee of physical priors.
[0122] In response, The uncertainty estimation module is provided by the model output. A preset constant is used to ensure that the prior trajectory always has a basic level of credibility. In this way, the prior influence is automatically enhanced during periods of low model confidence (such as occlusion or complex interactions) to ensure physical rationality; during periods of high confidence, it quickly transitions to data-driven prediction, achieving smooth and adaptive trajectory correction.
[0123] To ensure the fusion trajectory It possesses continuity in position, velocity, and acceleration in the time dimension. Continuously, in this embodiment of the invention, trajectory smoothing optimization is further applied after weighted fusion. Specifically, for The first N points (e.g. arrive The trajectory segment, corresponding to 1 second, is resampled and optimized using quintic spline interpolation, with the goal of minimizing the trajectory's jerk. .
[0124] The above constraints are: 1. The interpolation curve must pass through... 1. All sampling points; 2. Initial point Compared to the actual state Consistent; and, 3. The final output trajectory acceleration and predicted trajectory Maintain continuity.
[0125] The optimization process described above can be achieved by solving a system of tridiagonal linear equations with boundary conditions, which is computationally efficient and suitable for real-time deployment. This not only achieves point-to-point adaptive fusion but also ensures the kinematic consistency of the entire trajectory segment, fundamentally avoiding local abrupt changes or jitter caused by fusion.
[0126] Compared to the use of fixed, heuristic weights in related technologies, such as linear interpolation weights... This means that the prediction results are gradually trusted over time. Thus, the dynamic changes in the reliability of the trajectory prediction model at different times and in different scenarios are ignored.
[0127] Compared to related technologies, the dynamic weights in the embodiments of this application are adaptive and data-driven. When the trajectory prediction model itself has high uncertainty, such as occlusion and complex interactions, it relies more heavily on physically reasonable prior trajectories. When the trajectory prediction model is highly confident, switch to its prediction results more quickly. In this way, more precise and intelligent corrections can be achieved.
[0128] In the second optional embodiment of step 130 above, in step 610, by analyzing the validation set and observing that the predicted trajectory begins to become physically reasonable, a segment to be replaced is obtained; the segment to be replaced includes the first N points. Here, N is a positive integer, and the value of N is determined based on the physically reasonable starting time point obtained from the validation set analysis. Furthermore, the value of N can be adjusted according to the actual motion characteristics in different scenarios. N represents the specific number of trajectory points in the segment to be replaced.
[0129] Next, N is not a fixed hyperparameter, but rather relates to the time required for the trajectory prediction model to converge to a steady state. For example, N can be determined by analyzing the validation set and observing after a specific time point when the acceleration / jerk of the predicted trajectory begins to become physically reasonable.
[0130] Step 620: Use the kinematic prior trajectory to replace the segment to be replaced to obtain the replaced segment; thus, the replacement is to give the trajectory physical meaning and real significance.
[0131] Step 630: Using interpolation, the connection points of the replaced segment and the predicted segment are smoothly connected to obtain the final output trajectory.
[0132] In step 630, at the connection point between the replaced segment and the predicted segment ( and ), using fifth-order polynomial interpolation or spline interpolation for smooth connections to ensure the continuity of position, velocity, acceleration, and even jerk, and to avoid new abrupt changes.
[0133] Compared to related technologies that rely heavily on manual experience to set parameters such as fixed weights and fixed replacement lengths, the second fusion method allows for more direct segment replacement and smooth connection. Complete replacement The first N points are selected, and then the connection points are smoothed. Thus, this embodiment determines the weights based on uncertainty and the replacement length based on physical rationality analysis, making the entire system more robust and interpretable, reducing the burden of manual parameter tuning. Furthermore, by prioritizing short-term physical rationality (the foundation of safety control), this solution improves the safety redundancy of the assisted driving system from the source of prediction. Even if long-term predictions are misjudged, the vehicle's behavior within the initial emergency decision-making window is physically feasible, thereby achieving higher safety assurance.
[0134] In response, the uncertainty measure output by the trajectory prediction model itself is used to adaptively and dynamically adjust the degree of dependence on prior knowledge, thereby achieving a smarter and more tightly coupled correction, which goes beyond simple linear interpolation post-processing.
[0135] Figure 2 As shown Figure 1 The flowchart shown is a training flowchart for the trajectory prediction model of the trajectory optimization method.
[0136] like Figure 2 As shown, before using the trajectory prediction model in steps 110 to 130 above, the above method may also include, but is not limited to, the following steps 710 to 720: Step 710: Obtain scene data and vehicle data for the vehicle itself.
[0137] The scene data in step 710 can refer to the scene features extracted from the current frame, denoted as... Scene features include the position and motion of obstacles around the vehicle, as well as road topology information, which can directly provide structured scene input for subsequent trajectory prediction and fusion correction.
[0138] Step 720: Input the scene data and vehicle data into the trajectory prediction model to output the predicted trajectory; the trajectory prediction model is trained by a loss function that includes at least one of position loss, velocity loss and acceleration loss.
[0139] In this embodiment, during the training phase of the trajectory prediction model, the loss function includes multiple constraint terms. Position, velocity, and acceleration are treated as a single state vector for overall constraint, with the true value as the constraint target, rather than simply constraining velocity. This is achieved by introducing adjustable hyperparameter weights (…). This controls the constraint strength of different state components, which is used to guide the model to learn how to generate a physically continuous and smoothly transitioning future trajectory starting from a given, realistic multi-state initial condition, rather than rigidly matching a single state variable.
[0140] Furthermore, by constraining the state vector as a whole, the continuity of the predicted trajectory's starting point with the real state across all physical dimensions is ensured from the source of trajectory prediction model optimization. This fundamentally eliminates the phenomena of velocity mismatch at the first point and the shifting of the transition point due to uneven dimensional constraints, achieving a truly smooth trajectory start. Thus, it overcomes the limitations of traditional methods that only constrain velocity, achieving for the first time a three-dimensional collaborative constraint, preventing starting point jumps from the source of model optimization, and ensuring that the predicted trajectory is physically feasible from the very first frame.
[0141] Furthermore, the trajectory prediction model is trained using a loss function that includes at least one of position loss, velocity loss, and acceleration loss. Correspondingly, inputting the scene data and vehicle data into the trajectory prediction model to output the predicted trajectory may include, but is not limited to, steps 810 to 830: Step 810: Input the scene data and vehicle data into the trajectory prediction model to be trained; the total loss function of the trajectory prediction model to be trained includes at least one of position loss, velocity loss and acceleration loss.
[0142] Step 820: When the loss value of the total loss function converges, the trajectory prediction model is obtained; the trajectory prediction model is used to output the predicted trajectory.
[0143] Step 830: If the loss value of the total loss function does not converge, return to step 810 to continue iterative training.
[0144] In this way, by using loss constraints of position, velocity, and acceleration in multiple dimensions, the trajectory prediction model can fully learn the physical laws of obstacle motion in different driving scenarios during training. This makes the final output predicted trajectory more consistent with the real motion trend, avoids prediction results that violate common sense physics, further improves the accuracy of the initial predicted trajectory, and provides a better input basis for subsequent fusion and correction.
[0145] Furthermore, the aforementioned constraint objective is used to ensure that the predicted trajectory is within... state of time Infinitely close.
[0146] in, This is the initial moment, i.e., the current moment when trajectory prediction is performed. This is the predicted state vector output by the trajectory prediction model for time t=0. The vector represents the model's estimate of the vehicle's current state. Predicted by trajectory prediction model The vehicle's position at any given time, such as 2D coordinates, is... . Predicted by trajectory prediction model The vehicle velocity vector at any given time, for example, along velocity in direction . The vehicle acceleration vector predicted by the trajectory prediction model at time t=0, for example, along... acceleration in direction . For information from vehicle sensors and perception systems, in The observed true state vector at time t. T represents the transpose of a vector in linear algebra, here representing a column vector arranging multiple state variables such as position, velocity, and acceleration. Vehicle sensors include GPS (Global Positioning System), IMU (Global Positioning System), and wheel speedometers.
[0147] The total loss function Ltotal during the training of the prediction model can include, but is not limited to, the prediction loss. (e.g., HuberLoss) and the multi-state initial constraint loss term Linit, i.e. The formula for calculating Linit is: ; , , These are pre-set weighting coefficients used to adjust the stringency of constraints in the three dimensions of position, velocity, and acceleration. For example, if the accelerometer sensor has high noise, these coefficients can be appropriately lowered. If extremely smooth starting performance is required, the setting can be increased accordingly. and .in, The L2 norm is used to calculate the Euclidean distance between the predicted and actual values as the error. for The actual measured value of the vehicle's position at any given time. for The actual measured value of the vehicle speed at any given time (usually obtained through sensor data filtering or differential calculation). for The actual measured value of the vehicle's acceleration at any given time (usually obtainable directly from the IMU inertial measurement unit). for Predicted vehicle position at any given time. for Predicted vehicle speed at any given time. for Predicted values of vehicle acceleration at any given time.
[0148] In this embodiment of the application, the loss term is forced to guide the parameter optimization direction of the neural network model through backpropagation, so that the trajectory prediction model learns to infer the future from the real starting point, rather than directly regressing the entire trajectory sequence, thereby eliminating the starting point jump from the root.
[0149] The specific application of this application takes the vehicle starting scenario at an urban intersection as an example: 1. The initial state of the vehicle is that it is stationary after the red light turns green. ).
[0150] 2. The trajectory prediction model predicts and outputs a starting trajectory. .
[0151] To achieve adaptive weights, the trajectory prediction model in this application, for example, is based on an architecture of a Transformer or a GNN (Graph Neural Network). While outputting the trajectory points, a lightweight confidence prediction branch is introduced. This branch consists of 1-2 fully connected layers, with the hidden features of the trajectory prediction as input and a scalar confidence score for each time step t as output. The prediction branch is optimized during the training phase through supervised learning: a loss function is constructed using trajectory prediction errors, such as ADE (Average Displacement Error) / FDE (Final Displacement Error), as labels. This enables the model to learn to output low confidence levels when prediction errors are large. express Normalized error of the predicted trajectory at any given time.
[0152] During the reasoning stage, This serves as a quantitative indicator of the model's reliability for the current prediction point, used to drive adaptive fusion weights. .when At times, it depends on prior knowledge; when At that time, predicted trajectories are used. This mechanism makes uncertainty perception an intrinsic capability of the system, rather than an external add-on module.
[0153] During the training phase of the prediction model to be trained, due to the multi-state constraint training, the starting point of Tpred perfectly matches the real state of the vehicle (position is the current point, speed and acceleration are 0), without any jumps.
[0154] In the inference phase of the predictive model, this can be achieved through the following paths one through three: Path 1: Use a computationally efficient and stable kinematic model, such as a constant velocity (CV) model or a constant acceleration (CA) model, with the vehicle's current true state Strue(0) as the initial value, to extrapolate the kinematic prior trajectory over a short period of time, such as 1 second. While a priori kinematic trajectories cannot reflect complex intentions, they serve as a baseline for satisfying physical laws and maintaining rationality.
[0155] For example, taking the constant acceleration CA model: using a stable constant acceleration CA model, with real-world conditions... Using initial conditions, extrapolate the future. Trajectory within seconds The CA model formula is as follows: ; ; .
[0156] in, Let be the position of the vehicle at time t. This represents the vehicle's position at time 0, which is also its starting position. Let be the initial velocity of the vehicle, and t be the time. For the initial acceleration, here It represents constant acceleration.
[0157] The specific application example of Path 1 is as follows: The prior trajectory Tprior generated by the CV model in the current state (velocity is 0) is a straight line that remains stationary.
[0158] Path 2: The input is the real-time scene feature vector Fscene obtained from the perception system, which may include: vehicle speed, vehicle acceleration, distance to the nearest obstacle, average speed of surrounding obstacles, scene labels such as: congestion, highway, intersection, VRU (Vulnerable Road User) appearance, etc.
[0159] The mapping model is a lightweight fully connected neural network, which is an adaptive threshold prediction network. Its input is Fscene and its output is a scalar value, namely the dynamic rationality threshold ε.
[0160] The adaptive threshold prediction network is trained on a dataset containing a large amount of human driving data through imitation learning. It learns the mapping relationship of how much deviation the predicted trajectory can deviate from the simple kinematic prior in different scenarios.
[0161] To address this, an imitation learning model is introduced. Based on current scene features such as vehicle speed, surrounding vehicle density, and behavioral interaction complexity, a reasonable threshold, called the dynamic threshold, is dynamically predicted. This dynamic threshold determines the degree to which the predicted trajectory is allowed to deviate from the kinematic prior in the current scene.
[0162] The specific example of path two is as follows: Scene features (green light, vehicle in front has moved, no nearby obstacles) are input into an adaptive threshold prediction network. The network determines that this is a normal starting scenario and outputs a medium-sized dynamic threshold. .
[0163] Path 3: First, calculate the difference between the trajectory Tpred predicted by the neural network and the kinematic prior trajectory Tprior. The Hausdorff distance can be used, or the average Euclidean distance between the two trajectory points can be calculated.
[0164] Then, the difference degree d is compared with the dynamic threshold ε, and different strategies are implemented based on the comparison result: if If so, then output Tpred, indicating that the predicted trajectory is reasonable. If the output is Tpred, the correction strategy is activated, indicating that the predicted trajectory may have unreasonable jumps or deviations.
[0165] Finally, several correction schemes can be used. For example, the first few points of Tpred can be weighted and smoothed to make it closer to Tprior; or, Tprior can be directly replaced in the first half and Tpred can be used to smooth the connection in the second half.
[0166] To effectively suppress physical distortion of the predicted trajectory T_pred in the initial segment, this paper introduces a trajectory T_prior based on kinematic priors for correction. Specifically, one or a combination of the following two strategies can be used.
[0167] The specific example of path three is as follows: First, calculate the difference d between Tpred (an accelerating curve) and Tprior (a stationary straight line). The value of d is relatively large, but does not exceed the moderate dynamic threshold ε.
[0168] Second, although the acceleration trajectory differs greatly from the CV prior, it is reasonable and necessary in the current green light start scenario, so this output is used.
[0169] Compared to related technologies that use fixed threshold schemes, which may incorrectly filter out reasonable starting acceleration trajectories due to excessively small threshold settings, leading to vehicle hesitation at start-up, this application embodiment makes a more intelligent and reasonable decision through scene-adaptive dynamic thresholds.
[0170] During the reasoning phase, a scene-aware dynamic rationality verification module is constructed, which may include the following: a kinematic prior generation module: using the real state as the initial value, quickly infers a short-term (e.g., 1 second) deterministic trajectory. Dynamic threshold prediction network: Input real-time scene features, output a scene-adaptive reasonableness threshold. Adaptive trajectory fusion module: dynamically weights and fuses trajectories based on model prediction confidence. and Furthermore, the continuity of the trajectory is ensured through quintic spline interpolation.
[0171] In this way, constraints are tightened in stable scenarios to ensure comfort, while constraints are relaxed in emergency scenarios to retain agility, achieving a dynamic balance between smoothness and agility for the first time, and enabling intelligent fault tolerance.
[0172] The trajectory optimization method of this application embodiment is applied to an electronic device. The aforementioned electronic device can be a PC (Personal Computer) device. The PC device can include, but is not limited to, desktop computers, tablet computers, or laptop computers.
[0173] Set up an input interface on the webpage or app page of a PC device. This way, the user can fill in the required information through the displayed input interface to obtain the user's desired information and achieve the user's goal.
[0174] Of course, this electronic device may also include, but is not limited to, an in-vehicle terminal connected to the vehicle. The in-vehicle terminal connected to the vehicle may be, but is not limited to, a vehicle controller, body processor, center console, or automotive HUD (Head-Up Display).
[0175] This application provides a vehicle including one or more processors for implementing the trajectory optimization method described above. Exemplarily, the vehicle may include, but is not limited to, one or more of commercial vehicles, passenger vehicles, and special-purpose vehicles.
[0176] Figure 3 The diagram shown is a structural schematic of the electronic device 90 provided in an embodiment of this application.
[0177] like Figure 3 As shown, the electronic device 90 includes one or more processors 91 for implementing the trajectory optimization method as described above.
[0178] In some embodiments, electronic device 90 may include storage medium 99. For example, a computer-readable storage medium may store a program that can be invoked by processor 91, and may include non-volatile storage medium. In some embodiments, electronic device 90 may include memory 98 and interface 97. In some embodiments, electronic device 90 may also include other hardware depending on the specific application.
[0179] The computer-readable storage medium of this application embodiment stores a program that, when executed by processor 91, is used to implement the trajectory optimization method described above.
[0180] This application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any of the preceding claims.
[0181] This application also provides a computer program stored in a computer-readable storage medium, for example... Figure 3 The storage medium 99, and when the processor executes the computer program, causes the processor 91 to perform the method described above.
[0182] This application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented using any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0183] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0184] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
[0185] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element qualified by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A trajectory optimization method, characterized in that, include: The trajectory prediction model outputs the predicted trajectory of the vehicle, and the kinematic model is used to extrapolate the kinematic prior trajectory in the future time after the current time, with the current real state of the vehicle as the initial value. Based on the degree of difference between the trajectory points at corresponding time points of the kinematic prior trajectory and the predicted trajectory, a comparison is made with the current dynamic threshold corresponding to the current scene of the vehicle to determine whether physical distortion occurs in the initial segment of the predicted trajectory; the initial segment is the trajectory segment corresponding to the N predicted time points closest to the current time in the predicted trajectory, where N is a preset positive integer; the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold; the dynamic threshold changes with the scene; When the predicted trajectory exhibits physical distortion in the initial segment, the trajectory points in the initial segment are smoothed to obtain the final output trajectory.
2. The trajectory optimization method as described in claim 1, characterized in that, The step of comparing the degree of difference between the trajectory points at corresponding time points of the kinematic prior trajectory and the predicted trajectory with the current dynamic threshold corresponding to the current scene of the vehicle to determine whether the predicted trajectory exhibits physical distortion in the initial segment includes: If the difference between the trajectory points at the corresponding time points of the kinematic prior trajectory and the predicted trajectory is less than the current dynamic threshold corresponding to the current scene of the vehicle, then it is determined that the predicted trajectory has no physical distortion in the initial segment; the current dynamic threshold is determined according to the current scene of the vehicle from the correspondence between the scene and the dynamic threshold. If the difference between the kinematic prior trajectory and the predicted trajectory at the corresponding time point is greater than the current dynamic threshold, then it is determined that the predicted trajectory has physical distortion in the initial segment.
3. The trajectory optimization method as described in claim 1 or 2, characterized in that, The method further includes determining the dynamic threshold using the following method: Acquire images captured by the vehicle; the images are used to describe scene data of the environment surrounding the vehicle; Extract the scene feature vector of the current frame of the image; The scene feature vector is nonlinearly mapped to a scalar threshold, which is used as the dynamic threshold; the dynamic threshold is positively correlated with the complexity of the scene.
4. The trajectory optimization method as described in claim 3, characterized in that, The step of nonlinearly mapping the scene feature vector to a scalar threshold as the dynamic threshold includes: A nonlinear function is used to map the scene feature vector to a scalar threshold, which serves as the dynamic threshold; the nonlinear function includes a differentiable function.
5. The trajectory optimization method as described in claim 1, characterized in that, When the predicted trajectory exhibits physical distortion in the initial segment, smoothing the trajectory points in the initial segment to obtain the final output trajectory includes: When the predicted trajectory exhibits physical distortion in the initial segment, the kinematic prior trajectory is weighted and fused with the initial segment of the predicted trajectory to obtain the final output trajectory.
6. The trajectory optimization method as described in claim 5, characterized in that, The weighted fusion of the kinematic prior trajectory and the initial segment of the predicted trajectory to obtain the final output trajectory includes: The trajectory prediction model outputs the trajectory points of the predicted trajectory and the first confidence level of each trajectory point; the first confidence level is used to represent the uncertainty estimate of each trajectory point. The second confidence level, which is constant in the kinematic model, is fused with the first confidence level to obtain the fusion weight; Using the fusion weights, the kinematic prior trajectory and the initial segment of the predicted trajectory are weighted and fused to generate the fused trajectory. The fused trajectory is then smoothed and optimized to obtain the final output trajectory.
7. The trajectory optimization method according to any one of claims 1 to 2, 4 to 6, characterized in that, The process of smoothing the trajectory points of the initial segment to obtain the final output trajectory includes: By analyzing the validation set, the predicted trajectory begins to appear physically plausible, thus obtaining the segment to be replaced; the segment to be replaced includes the first N points. Using the kinematic prior trajectory, the segment to be replaced is replaced to obtain the replaced segment; Interpolation is used to smoothly connect the connection points of the replaced segment and the predicted segment to obtain the final output trajectory.
8. The trajectory optimization method according to any one of claims 1 to 2, 4 to 6, characterized in that, Before outputting the trajectory prediction model of the vehicle's predicted trajectory, the method further includes: Acquire scene data and vehicle data for the vehicle itself; The scene data and vehicle data are input into the trajectory prediction model to output the predicted trajectory; the trajectory prediction model is trained using a loss function that includes at least one of position loss, velocity loss and acceleration loss.
9. The trajectory optimization method as described in claim 8, characterized in that, The trajectory prediction model is trained using a loss function that includes at least one of position loss, velocity loss, and acceleration loss. The step of inputting the scene data and vehicle data into the trajectory prediction model to output the predicted trajectory includes: The scene data and vehicle data are input into the trajectory prediction model to be trained; the total loss function for training the trajectory prediction model to be trained includes at least one of position loss, velocity loss and acceleration loss. When the loss value of the total loss function converges, the trajectory prediction model is obtained; the trajectory prediction model is used to output the predicted trajectory.
10. An electronic device, characterized in that, It includes one or more processors for implementing the trajectory optimization method as described in any one of claims 1 to 9.
11. A vehicle, characterized in that, It includes one or more processors for implementing the trajectory optimization method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the trajectory optimization method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Deep learning trajectory prediction method introducing vehicle kinematics constraint
CN121386791A