Automatic driving scene generation method based on target vehicle driving track
By processing natural driving data and generating models, the problem of insufficient number of scenarios in autonomous driving simulation testing has been solved, generating a large number of virtual scenarios that conform to the distribution pattern, thereby improving the realism of simulation testing and reducing costs.
Patent Information
- Application Number
- CN202511185286.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-11-21
AI Technical Summary
The current number of scenarios in autonomous driving simulation tests is insufficient, which prevents the tests from achieving their objectives and results in low realism and efficiency.
By collecting and processing natural driving data, modeling the trajectory, constructing a Gaussian mixture model of trajectory parameters and performing importance sampling, virtual trajectory data that conforms to the distribution pattern is generated and converted into scene files in OpenScenario format.
This increases the number of scenarios required for simulation testing, enhances the realism of simulation testing, and reduces testing costs.
Smart Images

Figure CN120995311A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle automatic driving simulation test, and more particularly to an automatic driving scene generation method based on target vehicle driving trajectory. BACKGROUND
[0002] With the rapid development of automatic driving technology, its testing task is also increasing, and simulation testing based on scene has become an important part of automatic driving testing and verification due to its high efficiency and low cost. However, simulation testing requires a large number of test scenes, and pure natural driving collection is no longer feasible. How to generate virtual data conforming to the distribution law based on limited natural driving collection data through technical means to construct simulation test scenes has become a research hotspot. However, the existing automatic driving simulation test verification requires a small number of scenes, which can easily cause the automatic driving simulation test to fail to achieve the testing purpose. Therefore, how to increase the number of scenes required for automatic driving simulation test verification to improve the authenticity of simulation testing is of great significance. SUMMARY
[0003] The present application provides an automatic driving scene generation method based on target vehicle driving trajectory, which solves the problem of insufficient number of existing automatic driving scenes that can easily cause simulation testing to fail to meet testing requirements, can improve the number of scenes required for simulation testing, improve the authenticity of simulation testing, and reduce the cost of simulation testing.
[0004] To achieve the above purpose, the present application provides the following technical scheme:
[0005] An automatic driving scene generation method based on target vehicle driving trajectory, comprising:
[0006] Data collection is performed on natural driving, and the original data collected by natural driving is processed to obtain target vehicle trajectory data;
[0007] The target vehicle trajectory data is classified according to scene types to form a target vehicle trajectory data set under different scenes;
[0008] Trajectory modeling is performed according to the target vehicle trajectory data set, and model parameters are calculated by least square method, each trajectory corresponds to a group of model parameters, and a trajectory model parameter set is obtained;
[0009] A trajectory parameter Gaussian mixture model is constructed according to the trajectory model parameter set, and the corresponding distribution law is obtained;
[0010] The trajectory parameter Gaussian mixture model is sampled by an importance sampling method to generate model parameter data, and the virtual trajectory data is restored by a trajectory model;
[0011] The generated virtual trajectory data is converted into an OPEN format scene file for scene simulation test.
[0012] Preferably, the data collection for natural driving includes:
[0013] First, the abnormal values in the data are processed, and the values with abnormal large / small values in the data are set to null.
[0014] Then, the data is matched according to the camera frame, the target vehicle horizontal and vertical coordinate data under the camera frame and the main vehicle coordinate system are taken out, and the camera frame is converted into time according to the camera frequency, with the camera frame at the start time of the scene as 0 seconds.
[0015] Finally, in order to ensure the quality of the scene, only the data within 10 seconds before and after the time when the front wheel of the target vehicle touches the line is retained for the scene with a total time greater than 20 seconds.
[0016] Preferably, the trajectory modeling according to the target vehicle trajectory data set includes:
[0017] After data processing, the target vehicle trajectory data of a single scene is composed of multiple discrete trajectory points s (t, x, y), where t represents time, x represents the longitudinal distance of the target vehicle from the main vehicle, and y represents the lateral distance of the target vehicle from the main vehicle.
[0018] According to the target vehicle trajectory data, a curve in a corresponding three-dimensional coordinate system is established, and a mathematical model is established for the curve.
[0019] Preferably, the mathematical model is represented as:
[0020] ;
[0021] ;
[0022] wherein, 、 、 are the coefficients of the quadratic term, the linear term, and the constant term of , 、 、 are the coefficients of the quadratic term, the linear term, and the constant term of .
[0023] Preferably, the trajectory model parameters include: and corresponding coefficients of the quadratic term, the linear term, and the constant term.
[0024] Preferably, the construction of the trajectory parameter Gaussian mixture model according to the trajectory model parameter set includes:
[0025] An EM algorithm is used for the trajectory model parameters, a probability distribution of the hidden variable is estimated based on the current parameter, an expectation of a log-likelihood function is calculated, the parameter is updated by maximizing the expected likelihood function, and a Gaussian mixture model is obtained by solving the trajectory model parameter set.
[0026] Preferably, the corresponding distribution law is obtained by:
[0027] The optimal model component is determined by the BIC value of the Gaussian mixture model, and the optimal Gaussian mixture model is determined, so as to obtain the trajectory parameter distribution law.
[0028] Preferably, the trajectory parameter Gaussian mixture model is sampled by importance sampling, including:
[0029] An importance sampling algorithm is selected, and a trajectory point data is generated every 20 ms from 0 time.
[0030] Preferably, the generated virtual trajectory data is converted into an OPEN format scene file, including:
[0031] Firstly, the coordinate system of the trajectory point is converted into a global coordinate system required by OpenScenario, then a vehicle type is declared and an initial position is specified, the trajectory starting point is set as the initial state of the vehicle, then the trajectory data is split into discrete state points according to time, each point contains position, speed and acceleration information, an XML file is written according to the OpenScenario standard, and the Act, Maneuver and Event levels in the Storyboard are filled level by level, and finally the OpenScenario file is obtained.
[0032] The application provides an automatic driving scene generation method based on a target vehicle driving trajectory, which generates an OpenScenario format file that can be directly used for simulation test through natural driving data collection, data processing, trajectory modeling, trajectory parameter GMM construction, model sampling and scene conversion. The application solves the problem that the existing automatic driving scene is insufficient and easy to cause simulation test to not meet the test requirements, improves the number of scenes required for simulation test, improves the authenticity of simulation test, and reduces the cost of simulation test. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the specific embodiments of the application, the drawings required to be used in the embodiments will be briefly introduced as follows.
[0034] Figure 1 is a schematic diagram of an automatic driving scene generation method based on a target vehicle driving trajectory provided by the application.
[0035] Figure 2is a flowchart of an automatic driving scene generation method based on a target vehicle driving trajectory provided by an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the embodiments of the present application, the embodiments of the present application are further described in detail below in combination with the drawings and embodiments.
[0037] In order to solve the problem that the current existing automatic driving scene quantity is insufficient and easy to cause simulation test to not meet the test requirement, the present application provides an automatic driving scene generation method based on a target vehicle driving trajectory, which can improve the scene quantity required for simulation test, improve the authenticity of simulation test, and reduce the cost of simulation test.
[0038] As shown in Figure 1 An automatic driving scene generation method based on a target vehicle driving trajectory, comprising:
[0039] S1: data collection is performed on natural driving, and original data collected by natural driving is processed to obtain target vehicle trajectory data.
[0040] S2: the target vehicle trajectory data is classified according to scene types to form a target vehicle trajectory data set under different scenes.
[0041] S3: trajectory modeling is performed according to the target vehicle trajectory data set, and model parameters are calculated by a least square method, each trajectory corresponds to a group of model parameters, and a trajectory model parameter set is obtained.
[0042] S4: a trajectory parameter Gaussian mixture model is constructed according to the trajectory model parameter set, and a corresponding distribution rule is obtained.
[0043] S5: the trajectory parameter Gaussian mixture model is sampled by an importance sampling method, model parameter data is generated, and virtual trajectory data is restored by a trajectory model.
[0044] S6: the generated virtual trajectory data is converted into an OPEN format scene file for scene simulation test.
[0045] Specifically, the flow is as shown in Figure 2As shown, data processing: after processing the original data collected by natural driving, target vehicle trajectory data is obtained, classified according to scene categories, and constitutes target vehicle trajectory data sets in different scenes, such as target vehicle trajectory data set in cut-in scene. Trajectory modeling: mathematical modeling of target vehicle trajectory in cut-in / cut-out scene, and calculation of model parameters by least square method, each trajectory corresponding to a set of model parameters, obtaining trajectory model parameter set. Building trajectory parameter GMM: solving Gaussian mixed model (hereinafter referred to as GMM) model for trajectory model parameter set, and obtaining its distribution rule. Model sampling: sampling GMM model by importance sampling to generate model parameter data, and further restoring virtual trajectory data by trajectory model. Scene conversion: finally, the generated virtual trajectory data is converted into an OPEN format scene file for scene simulation test.
[0046] Further, natural driving data may have different data formats according to different collection devices and schemes, so the uniformity of input data needs to be ensured. First, process the abnormal values in the data, and fill in the large / small values in the null data according to the uplink and downlink content; then, match the data according to the camera frame, take out the target vehicle horizontal and vertical coordinate data under the camera frame and the main vehicle coordinate system, and then convert the camera frame to time according to the camera frequency, taking the camera frame at the beginning of the scene as 0 seconds; finally, in order to ensure the quality of the scene, for scenes with a total time greater than 20 seconds, only the data within 10 seconds before and after the target vehicle front wheel pressure line time is retained.
[0047] Further, the trajectory modeling according to the target vehicle trajectory data set comprises:
[0048] After data processing, the target vehicle trajectory data of a single scene is composed of multiple discrete trajectory points s(t, x, y), where t represents time, x represents the longitudinal distance of the target vehicle from the main vehicle, and y represents the lateral distance of the target vehicle from the main vehicle. According to the target vehicle trajectory data, a curve in a corresponding three-dimensional coordinate system is established, and a mathematical model is established for the curve.
[0049] Further, the mathematical model is represented as:
[0050] ;
[0051] ;
[0052] wherein, , , are the coefficients of the quadratic term, the linear term and the constant term of , , , , The coefficients of the quadratic, linear, and constant terms are collectively referred to as the trajectory model parameters. Once the trajectory model is obtained, the specific trajectory model parameters for each scenario are solved using the least squares method based on the actual trajectory point data of the scene, resulting in the trajectory model parameter set.
[0053] Furthermore, the step of constructing a Gaussian mixture model of trajectory parameters based on the trajectory model parameter set and obtaining the corresponding distribution pattern includes:
[0054] The EM algorithm is used on the trajectory model parameters to estimate the probability distribution of latent variables based on the current parameters, calculate the expectation of the log-likelihood function (E step), update the parameters by maximizing the expected likelihood function (M step), solve the trajectory model parameter set to obtain the Gaussian mixture model, and determine the optimal model components by the BIC value (Bayesian Information Criterion) of the Gaussian mixture model, thereby determining the optimal Gaussian mixture model and obtaining the trajectory parameter distribution law.
[0055] Furthermore, the sampling of the trajectory parameter Gaussian mixture model by importance includes:
[0056] An importance sampling algorithm is selected, and a trajectory point data is generated every 20ms starting from time 0.
[0057] Specifically, an importance sampling algorithm is selected to sample the GMM model obtained in the previous step, resulting in a new trajectory model parameter set that conforms to its distribution pattern. Then, for each set of trajectory model parameters, virtual discrete trajectory point data is obtained through the trajectory model. The specific generation rule is to generate discrete trajectory point data s(t,x,y) starting from 0 seconds, according to the camera frequency of the natural driving data collection. Taking a camera frequency of 50Hz as an example, one trajectory point data is generated every 20ms starting from time 0. In particular, and The first and second derivatives represent the instantaneous velocity of the target vehicle in that direction, respectively. , With instantaneous acceleration , Therefore, the content of the trajectory point data s is expanded to (t, x, y, ... , , , ).
[0058] Furthermore, the step of converting the generated virtual trajectory data into an OPEN format scene file includes:
[0059] First, the coordinate system of the trajectory points is converted to the global coordinate system required by OpenScenario. Then, the vehicle type is declared and the initial position is specified. The trajectory start point is set as the initial state of the vehicle. Next, the trajectory data is split into discrete state points according to time. Each point contains position, velocity, and acceleration information. An XML file is written according to the OpenScenario standard. The Act, Maneuver, and Event levels in the Storyboard are populated level by level to finally obtain the OpenScenario file.
[0060] As can be seen, this invention provides a method for generating autonomous driving scenarios based on the target vehicle's driving trajectory. Through natural driving data collection, data processing, trajectory modeling, construction of trajectory parameter GMM, model sampling, and scenario transformation, it generates OpenScenario format files that can be directly used for simulation testing. This method, based on natural driving data collection, generalizes and generates a large amount of entirely new virtual data, ensuring that the generated data closely approximates the original data distribution. It addresses the problem of insufficient existing autonomous driving scenarios leading to simulation tests failing to meet testing requirements, increasing the number of scenarios required for simulation testing, improving the realism of simulation tests, and reducing simulation testing costs.
[0061] The structure, features, and effects of the present invention have been described in detail above with reference to the embodiments shown in the figures. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, shall be within the protection scope of the present invention as long as they do not exceed the spirit covered by the specification and figures.
Claims
1. A method for generating autonomous driving scenarios based on the driving trajectory of a target vehicle, characterized in that, include: Data is collected from natural driving, and the raw data collected from natural driving is processed to obtain the target vehicle trajectory data; The target vehicle trajectory data is classified according to scene type to form target vehicle trajectory datasets under different scenes; Trajectory modeling is performed based on the target vehicle trajectory dataset, and model parameters are calculated using the least squares method. Each trajectory corresponds to a set of model parameters, resulting in a trajectory model parameter set. Construct a Gaussian mixture model of trajectory parameters based on the trajectory model parameter set, and obtain the corresponding distribution pattern; The trajectory parameter Gaussian mixture model is sampled using an importance sampling method to generate model parameter data, and then the trajectory model is used to reconstruct virtual trajectory data. The generated virtual trajectory data is converted into an OPEN format scene file for scene simulation testing.
2. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 1, characterized in that, The data collection for natural driving includes: First, handle outliers in the data by emptying abnormally large / small values in the data, and then fill in the empty data according to the content of the previous and next lines. Next, the data is matched based on the camera frames. The horizontal and vertical coordinates of the target vehicle in the main vehicle coordinate system are extracted from the camera frames. Then, based on the camera frequency, the camera frames at the start of the scene are taken as 0 seconds and the camera frames are converted into time. Finally, to ensure scene quality, for scenes with a total duration of more than 20 seconds, only the data within 10 seconds before and after the moment the target car's front wheel crossed the line is retained.
3. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 2, characterized in that, The trajectory modeling based on the target vehicle trajectory dataset includes: After data processing, the target vehicle trajectory data for a single scene consists of multiple discrete trajectory points s(t,x,y), where t represents time, x represents the longitudinal distance between the target vehicle and the host vehicle, and y represents the lateral distance between the target vehicle and the host vehicle. Based on the target vehicle trajectory data, a curve corresponding to a three-dimensional coordinate system is established, and a mathematical model is built for the curve.
4. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 3, characterized in that, The mathematical model is expressed as follows: ; ; in, , , They are respectively The coefficients of the quadratic, linear, and constant terms, , , They are respectively The coefficients of the quadratic, linear, and constant terms.
5. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 4, characterized in that, The trajectory model parameters include: and The coefficients of the corresponding quadratic, linear, and constant terms.
6. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 5, characterized in that, The step of constructing a Gaussian mixture model of trajectory parameters based on the trajectory model parameter set includes: The EM algorithm is used on the trajectory model parameters to estimate the probability distribution of latent variables based on the current parameters, calculate the expectation of the log-likelihood function, update the parameters by maximizing the expected likelihood function, and solve the trajectory model parameter set to obtain the Gaussian mixture model.
7. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 6, characterized in that, The acquisition of the corresponding distribution pattern includes: The optimal model components are determined by the BIC value of the Gaussian mixture model, and then the optimal Gaussian mixture model is determined to obtain the trajectory parameter distribution law.
8. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 7, characterized in that, The sampling of the trajectory parameters Gaussian mixture model by importance includes: An importance sampling algorithm is selected, and a trajectory point data is generated every 20ms starting from time 0.
9. The method for generating autonomous driving scenarios based on the target vehicle's driving trajectory according to claim 8, characterized in that, The step of converting the generated virtual trajectory data into an OPEN format scene file includes: First, the coordinate system of the trajectory points is converted to the global coordinate system required by OpenScenario. Then, the vehicle type is declared and the initial position is specified. The trajectory start point is set as the initial state of the vehicle. Next, the trajectory data is split into discrete state points according to time. Each point contains position, velocity, and acceleration information. An XML file is written according to the OpenScenario standard. The Act, Maneuver, and Event levels in the Storyboard are populated level by level to finally obtain the OpenScenario file.