Trajectory data synthesis method based on diffusion probability model and dynamic simulation application thereof
By generating environmentally consistent trajectory data using a diffusion probability model and a conditional denoising network, the high cost and lack of diversity in data acquisition for autonomous driving and urban traffic simulations are addressed, achieving efficient and stable trajectory generation and simulation testing results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PEKING UNIV SHENZHEN GRADUATE SCHOOL
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies for autonomous driving and urban traffic simulation suffer from problems such as high data acquisition costs, insufficient diversity of generated trajectories, difficulty in incorporating environmental constraints, and lack of realism in simulation, resulting in insufficient simulation test coverage and difficulties in verifying system safety.
A trajectory data synthesis method based on a diffusion probability model is adopted. Through a conditional denoising network and an environment perception guidance mechanism, high-quality and highly diverse trajectory data that conforms to environmental physical constraints are generated. This includes trajectory preprocessing, forward diffusion, conditional denoising network training, backsampling, and environment perception guidance to ensure that the generated trajectory is consistent with the environment.
The generated trajectory data is smooth and realistic in both space and time, naturally reflecting the randomness and uncertainty of the agent's movement, improving the coverage and efficiency of dynamic simulation, and enhancing the safety and testing quality of autonomous driving systems.
Smart Images

Figure CN122452304A_ABST
Abstract
Description
Technical fields:
[0001] This invention belongs to the fields of computer vision, deep learning and urban traffic simulation technology, and in particular relates to a trajectory data synthesis method based on a diffusion probability model and its dynamic simulation application. Background technology:
[0002] In fields such as autonomous driving, urban planning, and robot navigation, trajectory prediction of future agent behavior and dynamic simulation of large-scale traffic behavior are core technologies. These applications heavily rely on high-quality, highly diverse trajectory datasets for model training, scenario testing, and system validation. However, existing technologies suffer from the following major problems:
[0003] 1. High and limited data acquisition costs: Real-world trajectory data acquisition requires a large number of sensors and human resources, resulting in enormous costs. More importantly, certain extremely dangerous scenarios or rare long-tail events have a very low probability of occurring in the real environment and are difficult to obtain through natural data collection. This leads to insufficient coverage in simulation testing, posing a significant challenge to the safety verification of autonomous driving systems.
[0004] 2. Deficiencies of Traditional Generative Models: Existing trajectory generation methods, such as those based on generative adversarial networks or variational autoencoders, generally suffer from pattern collapse, meaning the models tend to generate only a few high-frequency trajectory patterns, resulting in insufficient diversity in the generated results. Furthermore, the trajectories generated by these models often lack temporal smoothness and physical feasibility.
[0005] 3. Difficulty in integrating environmental constraints: Existing methods struggle to effectively incorporate complex environmental constraints into the trajectory generation process. The generated trajectories often exhibit physically unreasonable phenomena such as "passing through walls" or "flying off the road surface," making them unsuitable for direct use in high-fidelity dynamic simulation systems.
[0006] 4. Lack of realism in dynamic simulation: Traditional simulations typically rely on manually set rules or simple random models to generate background traffic flow. This background traffic flow lacks the complexity and uncertainty of the real world, causing autonomous driving systems tested in it to perform unpredictably in the real world.
[0007] Therefore, there is an urgent need for a new technological means to overcome the above-mentioned defects and efficiently and stably generate trajectory data with high precision, high diversity, and strict adherence to environmental physical constraints, so as to significantly improve the simulation test quality and efficiency of autonomous driving and urban transportation systems. Summary of the Invention:
[0008] This invention discloses an innovative trajectory data synthesis method. The core of this method lies in using a conditional diffusion probability model to address the shortcomings of traditional trajectory generation models in terms of diversity and consistency of environmental constraints. The specific technical solution is as follows.
[0009] A trajectory data synthesis method based on a diffusion probability model includes the following steps:
[0010] a. Trajectory data preprocessing: Acquire real-world observation trajectory data and corresponding environmental map data, and encode the trajectory data into a unified spatiotemporal sequence tensor. Encode environmental map data into environmental feature tensors .
[0011] b. Forward diffusion process: Define a Markov chain and schedule it according to a preset noise pattern. Gradually towards trajectory tensor Add Gaussian noise until... After a time step It approximates a standard Gaussian distribution.
[0012] c. Conditional Denoising Network Training: Training a denoising network Predict at any time step Add to noisy tracks Noise in The input to the denoising network includes Time step and environmental feature tensors .
[0013] d. Inverse sampling generation: from standard Gaussian noise Initially, through this denoising network The learning process involves progressively removing noise from the inverse Markov chain at each time step. The mean of the forecast is calculated below. Covariance And sampled to obtain the denoised trajectory .
[0014] e. Environmental awareness guidance: An environmental guidance item is introduced during the backsampling process. The prediction results of the denoising network are corrected to ensure that the final sampled trajectory matches the environmental feature tensor. The physical constraints indicated are consistent.
[0015] f. Synthetic trajectory output: at time step The final denoising trajectory is obtained at the location. This refers to synthesized trajectory data that is consistent with the environment.
[0016] Preferably, the forward diffusion process is achieved by the following formula:
[0017]
[0018] in, Indicates at time step The noisy trajectory, Indicates at time step The noisy trajectory, Indicates a Gaussian distribution. Indicates at time step The noise level, Represents the identity matrix.
[0019] Preferably, the conditional denoising network It is a spatiotemporal fusion deep neural network structure, which includes the following modules:
[0020] a. Trajectory Encoding Module: Uses a one-dimensional convolutional neural network or a long short-term memory network to encode the input noisy trajectory. Feature extraction is performed to obtain the temporal feature representation of the trajectory.
[0021] b. Environment Map Encoding Module: Uses a two-dimensional convolutional neural network to encode environmental feature tensors. The process involves extracting environmental feature vectors containing information such as road boundaries and obstacle locations.
[0022] c. Spatiotemporal attention fusion module: The self-attention mechanism is used to fuse the trajectory temporal features output by the trajectory encoding module with the environmental feature vector output by the environment map encoding module, so that the denoising network can perceive the interaction between the trajectory and the environment.
[0023] d. Noise prediction module: Uses a multilayer perceptron or transformer structure to map the fused spatiotemporal features back to the trajectory tensor. Noise estimation tensors of the same dimension .
[0024] Preferably, in the synthesis method of claim 1, environmental perception guidance is used. It is achieved through a gradient-guided mechanism, and the denoised mean of the inverse sampling process is... The calculation formula is as follows:
[0025]
[0026] in, , This is the noise predicted by the denoising network. The environmental perception guidance item... The denoised mean is corrected using the following method:
[0027]
[0028] in, It is the corrected mean. It is a guide strength parameter. It is an environmental loss function Noisy trajectories The gradient of the environmental loss function. It should include at least a collision penalty term to constrain the trajectory from aligning with the environment map. The obstacle areas overlap.
[0029] Preferably, the synthesis method according to claim 1 is characterized in that the dynamic simulation application includes the following steps:
[0030] a. Simulation Environment Construction: Based on Environment Feature Tensors In the corresponding physical world, a virtual dynamic simulation scene is constructed in the computer, which includes roads, obstacles and background traffic.
[0031] b. Synthetic data injection: injecting the trajectory data synthesized by the method described in claim 1. It is injected into the virtual dynamic simulation scene as input to the motion planning or control system of the intelligent agent under test.
[0032] c. Dynamic simulation execution: Run the agent under test in the virtual dynamic simulation scene, so that it moves in real time according to the synthetic trajectory data, and interacts dynamically with other environmental elements and background traffic bodies in the scene.
[0033] d. Performance evaluation and feedback: Record the performance indicators of the tested intelligent agent during the dynamic simulation process, including safety, comfort and efficiency, and use the evaluation results as feedback signals for improving the model or system design.
[0034] The beneficial effects of the fabrication system for forming liquid metal conductive channels via microfluidic injection provided by this invention include:
[0035] 1. High realism and diversity of synthetic trajectories
[0036] The diffusion probability model possesses powerful generative capabilities, enabling it to learn and capture all modal and detailed information of real trajectory data distributions. The trajectories synthesized by this method are smoother and more realistic in both spatial and temporal dimensions, naturally reflecting the randomness and uncertainty of agent motion. This significantly enriches the datasets used for dynamic simulations, ensuring the realism of simulation scenarios.
[0037] 2. Consistency of mandatory environmental constraints
[0038] By introducing an environmental perception-guided mechanism, environmental map information is directly integrated into the backsampling process of the diffusion model in the form of gradients. This allows the synthesized trajectory to perfectly conform to the rules of the physical world.
[0039] 3. Improve the efficiency and coverage of dynamic simulation.
[0040] This method generates high-quality, environmentally consistent synthetic data, enabling the efficient creation of numerous extreme scenarios and long-tail events. These rare or dangerous scenarios are difficult to capture in the real world but are crucial for testing the robustness of autonomous driving systems. Therefore, this invention significantly improves the coverage and efficiency of dynamic simulation and testing, helping to shorten the system development and verification cycle.
[0041] 4. Stability and controllability of model training
[0042] The diffusion model is trained based on the noise prediction target. Its loss function is simple and has good mathematical properties, avoiding the pattern collapse or training instability problems commonly encountered in traditional generative adversarial networks. Furthermore, the design of the guidance strength parameter λ provides explicit control over the balance between the diversity of generated trajectories and environmental consistency.
[0043] Appendix Figure 1 : Overall workflow diagram of the present invention.
[0044] Appendix Figure 2 : Schematic diagram of the forward-reverse diffusion principle of the present invention.
[0045] Appendix Figure 3 : The conditional denoising network structure diagram of the present invention.
[0046] Appendix Figure 4 : Flowchart of the environmental perception guidance mechanism of the present invention. Detailed implementation method:
[0047] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. These specific embodiments provide a further detailed explanation and description of each technical feature in the claims, ensuring that the technical solution of the present invention can be clearly understood and implemented by those skilled in the art.
[0048] A trajectory data synthesis method based on a diffusion probability model includes the following steps:
[0049] a. Trajectory data preprocessing: Acquire real-world observation trajectory data and corresponding environmental map data, and encode the trajectory data into a unified spatiotemporal sequence tensor. Encode environmental map data into environmental feature tensors .
[0050] First, raw trajectory data is collected from urban traffic databases or sensors on actual operating vehicles. This raw data includes data from vehicles or intelligent agents at continuous time points. Two-dimensional coordinates on And timestamps.
[0051] spatiotemporal sequence tensor Construction: From raw trajectory data Resampled into discrete sequences at fixed time intervals, forming a sequence of fixed length. sequence. The dimensions are organized as In a preferred embodiment, the feature dimension is at least two, i.e. Coordinates. To enhance the autoregressive properties of the model, this invention uses the trajectory... Decomposed into observation trajectory and future predicted trajectory During training and reasoning, As a hard condition input for the diffusion model.
[0052] Environmental feature tensor Construction: Environmental Map Data The data originates from high-precision maps or sensor-perceived raster maps. The map data should include road topology, lane boundaries, pedestrian zones, and the location of static obstacles. Map features are encoded as a multi-channel two-dimensional tensor. In a preferred embodiment, one channel represents the lane centerline, another channel represents the lane boundary, and a third channel represents a vehicular zone. This tensor... As conditional input and trajectory They are fed together into a noise reduction network to achieve environmental perception.
[0053] b. Forward diffusion process: Define a Markov chain and schedule it according to a preset noise pattern. Gradually towards trajectory tensor Gaussian noise is added, and in a preferred embodiment, noise scheduling is introduced. , It is a preset sequence that controls the amount of noise added at each time step. It is set to a sequence from... arrive The value gradually increases from arrive Linear or cosine scheduling, until After a time step It approximates a standard Gaussian distribution.
[0054] c. Conditional Denoising Network Training: Training a denoising network Predict at any time step Add to noisy tracks Noise in The input to the denoising network includes Time step and environmental feature tensors .
[0055] d. Inverse sampling generation: from standard Gaussian noise Initially, through this denoising network The learning process involves progressively removing noise from the inverse Markov chain at each time step. The mean of the forecast is calculated below. Covariance And sampled to obtain the denoised trajectory .
[0056] e. Environmental awareness guidance: An environmental guidance item is introduced during the backsampling process. The prediction results of the denoising network are corrected to ensure that the final sampled trajectory matches the environmental feature tensor. The physical constraints indicated are consistent.
[0057] f. Synthetic trajectory output: at time step The final denoising trajectory is obtained at the location. This refers to synthesized trajectory data that is consistent with the environment.
[0058] The forward diffusion process is achieved through the following formula:
[0059]
[0060] in, Indicates at time step The noisy trajectory, Indicates at time step The noisy trajectory, Indicates a Gaussian distribution. Indicates at time step The noise level, This represents the identity matrix. Based on the Markov property, it can be directly derived that at any time step... Below, from arrive The closed form of the noisy trajectory:
[0061]
[0062] in, During training, this invention utilizes this closed-loop structure to directly obtain data through a single sampling. and corresponding noise This allows for efficient training.
[0063] Conditional Denoising Network It is a spatiotemporal fusion deep neural network structure that is responsible for learning to reverse the forward process, that is, predicting trajectories in noisy environments. Added Gaussian noise Denoising network Receive three inputs: noisy future trajectory Time step coding and environmental feature tensor Observe the trajectory Integrating into the system through rigid conditions In, that is The observation section remains The value remains unchanged, while the future prediction portion is noisy. It includes the following modules:
[0064] a. Trajectory Encoding Module: Uses a one-dimensional convolutional neural network or a long short-term memory network to encode the input noisy trajectory. Feature extraction is performed to obtain the temporal feature representation of the trajectory.
[0065] b. Environment Map Encoding Module: Uses a two-dimensional convolutional neural network to encode environmental feature tensors. The process involves extracting environmental feature vectors containing information such as road boundaries and obstacle locations. Specifically, a spatial pyramid pooling technique is employed to aggregate environmental features at different scales into a single, fixed-dimensional environmental feature vector. .
[0066] c. Spatiotemporal Attention Fusion Module: A self-attention mechanism is used to fuse the temporal features of the trajectory output from the trajectory encoding module with the environmental feature vector output from the environment map encoding module, enabling the denoising network to perceive the interaction between the trajectory and the environment. In a preferred embodiment, a multi-head attention mechanism is employed, using the output of the trajectory encoder as the query. , environmental feature vector After expansion, it can be used as a key. Sum By calculating the dependence of the trajectory on environmental features through cross-attention, environmental constraint information is injected into the trajectory features, enabling the network to determine whether the generated trajectory passes through impassable areas.
[0067] d. Noise prediction module: Uses a multilayer perceptron or transformer structure to map the fused spatiotemporal features back to the trajectory tensor. Noise estimation tensors of the same dimension The training objective of the network is to minimize prediction noise. Add noise to reality Mean square error between .
[0068]
[0069] Environmental perception guidance It is achieved through a gradient-guided mechanism, and the denoised mean of the inverse sampling process is... The calculation formula is as follows:
[0070]
[0071] in, , This is the noise predicted by the denoising network. The environmental perception guidance item... The denoised mean is corrected using the following method:
[0072]
[0073] in, It is the corrected mean. It is a guide strength parameter. It is an environmental loss function Noisy trajectories The gradient of the environmental loss function. It should include at least a collision penalty term to constrain the trajectory from aligning with the environment map. The obstacle regions overlap. At each time step... Below, the final denoising trajectory The sample is obtained using the following formula:
[0074]
[0075] Repeat the process until To obtain the final synthetic trajectory .
[0076] The application of dynamic simulation in the synthesis method includes the following steps:
[0077] a. Simulation Environment Construction: Based on Environment Feature Tensors In the corresponding physical world, in a preferred embodiment, a virtual dynamic simulation scene is constructed in the computer using professional traffic simulation software or a 3D rendering engine, such as the open-source CARLA platform or the commercial VISSIM software. This scene includes roads, obstacles, background traffic bodies, and an environmental map. The data structure is directly mapped to the physical geometry and logical topology of the simulation scene.
[0078] b. Synthetic data injection: injecting the trajectory data synthesized by the method described in claim 1. The background traffic flow module and test case generation module injected into the simulation system serve as inputs to the motion planning or control system of the agent under test. In a preferred embodiment, these trajectories are used as:
[0079] 1. Background vehicle movement trajectory: Used to provide highly realistic and diverse background traffic flow to simulate complex traffic interactions.
[0080] 2. Reference trajectory for testing intelligent agents: used to test the motion planning capabilities of autonomous vehicles in specific, complex, or rare scenarios.
[0081] c. Dynamic simulation execution: Run the agent under test in the virtual dynamic simulation scene, so that it moves in real time according to the synthetic trajectory data, and interacts dynamically with other environmental elements and background traffic bodies in the scene.
[0082] d. Performance Evaluation and Feedback: Record the various performance indicators of the tested intelligent agent during the dynamic simulation process, including safety, comfort, and efficiency. In a preferred embodiment, safety includes the number of collisions and the number of violations of the minimum safe distance; comfort includes the fluctuation range of acceleration and angular velocity; and efficiency refers to the time required to complete the task or the average driving speed. The evaluation results are used as feedback signals for improving the model or system design. In a preferred embodiment, if the algorithm has a low comfort score when following a high curvature synthetic trajectory, the control parameters can be adjusted in a targeted manner to achieve closed-loop optimization of the algorithm.
[0083] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A trajectory data synthesis method based on a diffusion probability model, characterized in that, Includes the following steps: a. Trajectory data preprocessing: Acquire real-world observation trajectory data and corresponding environmental map data, and encode the trajectory data into a unified spatiotemporal sequence tensor. Encode environmental map data into environmental feature tensors . b. Forward diffusion process: Define a Markov chain and schedule it according to a preset noise pattern. Gradually towards the trajectory tensor Add Gaussian noise until... After a time step It approximates a standard Gaussian distribution. c. Conditional Denoising Network Training: Training a denoising network Predict at any time step Add to noisy tracks Noise in The input to the denoising network includes Time step and environmental feature tensors . d. Inverse sampling generation: from standard Gaussian noise Initially, through this denoising network The learning process involves progressively removing noise from the inverse Markov chain at each time step. The mean of the forecast is calculated below. Covariance And sampled to obtain the denoised trajectory . e. Environmental awareness guidance: An environmental guidance item is introduced during the backsampling process. The prediction results of the denoising network are corrected to ensure that the final sampled trajectory matches the environmental feature tensor. The physical constraints indicated are consistent. f. Synthetic trajectory output: at time step The final denoising trajectory is obtained at the point. This refers to synthesized trajectory data that is consistent with the environment.
2. The synthesis method according to claim 1, characterized in that, The forward diffusion process is achieved through the following formula: in, Indicates at time step The noisy trajectory, Indicates at time step The noisy trajectory, Indicates a Gaussian distribution. Indicates at time step The noise level, Represents the identity matrix.
3. The synthesis method according to claim 1, characterized in that, The conditional denoising network It is a spatiotemporal fusion deep neural network structure, which includes the following modules: a. Trajectory Encoding Module: Uses a one-dimensional convolutional neural network or a long short-term memory network to encode the input noisy trajectory. Feature extraction is performed to obtain the temporal feature representation of the trajectory. b. Environment Map Encoding Module: Uses a two-dimensional convolutional neural network to encode environmental feature tensors. The process involves extracting environmental feature vectors containing information such as road boundaries and obstacle locations. c. Spatiotemporal attention fusion module: The self-attention mechanism is used to fuse the trajectory temporal features output by the trajectory encoding module with the environmental feature vector output by the environment map encoding module, so that the denoising network can perceive the interaction between the trajectory and the environment. d. Noise prediction module: Uses a multilayer perceptron or transformer structure to map the fused spatiotemporal features back to the trajectory tensor. Noise estimation tensors of the same dimension .
4. The synthesis method according to claim 1, characterized in that, The environmental perception guidance It is achieved through a gradient-guided mechanism, and the denoised mean of the inverse sampling process is... The calculation formula is as follows: in, , This is the noise predicted by the denoising network. The environmental perception guidance item... The denoised mean is corrected using the following method: in, It is the corrected mean. It is a guide strength parameter. It is an environmental loss function Noisy trajectories The gradient of the environmental loss function. It should include at least a collision penalty term to constrain the trajectory from colliding with the environment map. The obstacle regions overlap, and it calculates the trajectory. Coordinates at each time step and the environment map The minimum distance to the obstacle area. If this distance is less than a preset threshold, a larger loss value is generated.
5. The synthesis method according to claim 1, characterized in that, The dynamic simulation application includes the following steps: a. Simulation Environment Construction: Based on Environment Feature Tensors In the corresponding physical world, a virtual dynamic simulation scene is constructed in the computer, which includes roads, obstacles and background traffic. b. Synthetic data injection: injecting the trajectory data synthesized by the method described in claim 1. It is injected into the virtual dynamic simulation scene as input to the motion planning or control system of the intelligent agent under test. c. Dynamic simulation execution: Run the agent under test in the virtual dynamic simulation scene, so that it moves in real time according to the synthetic trajectory data, and interacts dynamically with other environmental elements and background traffic bodies in the scene. d. Performance evaluation and feedback: Record the performance indicators of the tested intelligent agent during the dynamic simulation process, including safety, comfort and efficiency, and use the evaluation results as feedback signals for improving the model or system design.