Dynamic simulation test scene generation method based on deep learning

Through the method of generating network based on time sliding windows and adversarial networks, the multi-source information fusion and long-term dynamic simulation problems generated by traffic scenarios in the prior art are solved, real test scenario generation for complex interactions is realized, and the flexibility and coverage of testing are improved.

CN120407419APending Publication Date: 2025-08-01CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510564854.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing test scenario generation methods are difficult to fully simulate multi-source information, dynamic interactions and long-term continuous traffic scenarios, resulting in limited testing flexibility and coverage.

Method used

By dividing the real traffic data set, a data loading module based on the time sliding window is built, and a data augmentation and adversarial generation network is adopted, and a dynamic scene generation and scroll generation is achieved by combining map information and traffic flow statistics.

Benefits of technology

It realizes steady-state generation of real test scenarios for multiple traffic participants, enhances the authenticity and diversity of scene generation, and supports long-term complex interactive testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407419A_ABST
    Figure CN120407419A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic simulation test scene generation method based on deep learning, and belongs to the technical field of automatic driving automobile testing. The method comprises the following steps: S1, dividing a real traffic data set and extracting traffic flow updating characteristics; s2, scene data are extracted based on a time sliding window to construct a data loading module; S3, data enhancement means of corresponding scales are adopted for different contents of input track data; s4, constructing an adversarial generative network for generating a dynamic test scene; and S5, establishing a dynamic scene rolling generation framework. According to the method, the universality of a deep learning model is enhanced through a data processing means, long-term deduction of a real test scene is realized in combination with traffic flow analysis and rolling generation, and steady-state generation of a complex interactive simulation test scene is realized. Compared with a traditional dynamic test scene generation method, the method can achieve the generation of a real test scene of multiple traffic participants of non-fixed fragments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous vehicle testing, and relates to a method for generating dynamic simulation test scenarios based on deep learning. Background Art

[0002] The rapid development of autonomous vehicle technology aims to improve the safety, efficiency, and sustainability of the transportation system, and thus has received extensive attention from the academic and industrial communities. Its core functions are realized through the coupling of modules such as perception, prediction, decision-making, and control. As a key link in the verification and optimization of autonomous driving systems, test scenario generation directly affects the reliability and robustness of the system. An efficient and realistic test scenario generation method can simulate diverse traffic environments, provide rich verification data for autonomous driving algorithms, and ensure their stable operation in complex dynamic scenarios.

[0003] Currently, test scenario generation methods mainly include rule-based manual design, real data playback, statistical modeling, and deep learning-based methods. Traditional methods such as manual design and data playback are simple and easy to implement, but it is difficult to cover complex traffic interaction scenarios, and the diversity and authenticity of the generated scenarios are limited by human experience or existing datasets. Statistical modeling-based methods simulate traffic behavior through probability distributions and can generate random scenarios to a certain extent, but their modeling ability for high-dynamic and strong-interactivity traffic environments is limited. With the increasing demand for autonomous driving testing, deep learning-based methods have gradually become a research hotspot due to their powerful data-driven feature extraction ability and non-linear modeling ability. Deep learning methods can be further refined into specific technologies such as generative adversarial networks (GANs), variational autoencoders (VAEs), graph neural networks (GNNs), and recurrent neural networks (RNNs). Among them, generative adversarial networks are particularly suitable for constructing dynamic traffic test scenarios due to their superiority in generating realistic data; while graph neural networks can effectively capture the interaction relationships between traffic participants and enhance the authenticity and complexity of the scenarios.

[0004] However, in the test scenario generation task, relying solely on a single data source or model is difficult to fully meet the actual needs. The generation of traffic scenarios not only needs to consider the dynamic interactions between participants but also needs to integrate multi-source information such as scenario maps, traffic rules, and the motion characteristics of participants themselves. In addition, existing methods are mostly limited to the generation of fixed-fragment scenarios and are difficult to achieve continuous long-term dynamic scenario simulation, which limits the flexibility and coverage of testing. Therefore, there is an urgent need for a new method for generating dynamic simulation test scenarios to solve the above problems. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method for generating a dynamic simulation test scenario based on deep learning, a test scenario generation framework that integrates multi-source information, supports continuous generation, and has a high degree of authenticity, so as to meet the test requirements of the autonomous driving system in diverse and highly complex environments, and provide reliable support for safe and efficient algorithm verification.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for generating a dynamic simulation test scenario based on deep learning specifically includes the following steps:

[0008] S1: Divide the real traffic data set and extract the traffic flow update characteristics;

[0009] S2: Extract scenario data based on a time sliding window to construct a data loading module;

[0010] S3: Adopt corresponding scale data augmentation means for different contents of the input trajectory data;

[0011] S4: Construct an adversarial generation network for generating dynamic test scenarios;

[0012] S5: Build a dynamic scenario rolling generation framework.

[0013] Further, step S1 specifically includes the following steps:

[0014] S11: Divide the real traffic (interaction) data set by scenario cases (cases), where the scene information of each frame of each scenario case (case) is represented as G t and is saved as a pickle file:

[0015]

[0016] where n represents the number of vehicle nodes in the scenario, represents the state information of vehicle node i at time t;

[0017] S12: Count the vehicle entry situation P at all lane entrances in the map and the state set D of the vehicles entering each lane:

[0018] P = [p1, p2..., p j ..., p k

[0019] D = [D1, D2,..., D j ,...]

[0020] D j = [n1, n2..., n i ​​

[0021] Among them, k represents the number of lanes for vehicles to enter, and p j represents the probability of vehicles entering lane j, and D j represents the set of initial states of vehicles entering lane j, and n i represents the state information of the vehicle node i where the vehicle enters.

[0022] Furthermore, step S2 specifically includes the following steps:

[0023] S21: Extract the input data a of the training model according to each scenario case, l1 and the comparison item a of the output data; extract short-term trajectories from the scenario trajectory data using a time sliding window: l2 ;

[0024]

[0025] l = l1 + l2

[0026] Among them, A i represents the set of trajectories extracted from the i-th scenario case, represents each short-term trajectory, s represents the sliding window step size, l1 represents the length of the input data, and l2 represents the length of the output data.

[0027] S22: Complete the missing information of the vehicle node according to the trajectory information; for the input data with a length of less than five steps, use the speed information to complete the missing position information, and use the method of linear interpolation to complete the missing heading angle information;

[0028] S23: By identifying whether there are valid values in the input data, perform nan value masking processing on the corresponding positions of the output comparison true values.

[0029] Furthermore, step S3 specifically includes the following steps:

[0030] S31: Through statistical analysis of the input trajectory data, obtain the data distribution to determine the noise intensity b of the position information v v and the noise intensity of the heading angle information ;

[0031]

[0032] a Among them, N(μ v , σ v ) represents the distribution of speeds in the dataset, represents the distribution of heading angles in the dataset, σ represents the standard deviation of the distribution, and b represents the noise intensity coefficient; <~

[0033] S32: To increase the diversity of data, the generalization of the model is improved through data augmentation. Gaussian noise is used to add data perturbation with the noise intensity as the standard deviation:

[0034] β~N(0,1)

[0035]

[0036] where M v represents the position mask matrix, represents the heading angle mask matrix, N(0,1) represents the normal distribution, α v represents the position noise obtained by sampling, represents the heading angle noise, and β represents the random sampling value of the normal distribution.

[0037] Furthermore, in step S32, during the data augmentation process, for a single batch of data, which is a tensor data of fixed shape (n, t, c), there are ineffective vehicle node modellings in dimension n, which may cause the model to learn fixed node relationships when extracting spatial interaction relationships. Therefore, implicit data augmentation is also performed through random node order.

[0038] Furthermore, step S4 specifically includes the following steps:

[0039] S41: Based on the basic paradigm of the model in the trajectory prediction task, a dynamic test scenario generator is constructed, including an encoding layer ModuleList0, a feature extraction layer ModuleList1, and an output head ModuleList2:

[0040] x hidden = ModuleList0(x in )

[0041] x hidden = ModuleList1(x hidden )

[0042] x out = ModuleList2(x hidden )

[0043] where x in represents the input trajectory information, x hidden represents the intermediate hidden state, and x out represents the model output of the subsequent trajectory;

[0044] S42: To generate a fidelity test scenario, an adversarial generation network is built; a discriminator with an MLP architecture is introduced. The discriminator inputs the real control trajectory and the trajectory output by the generator respectively, and outputs the discrimination results of the two trajectories:

[0045] Value true = MLP(traj true )

[0046] Value fake = MLP(traj fake )

[0047] Among them, Value true represents the discrimination result of the true control trajectory, and Value fake represents the discrimination result of the trajectory output by the generator.

[0048] Furthermore, in step S42, due to the particularity of the task, a multi-task learning method is adopted for the generator, integrating the trajectory reconstruction task and the adversarial generation task. The absolute mean error is used to guide the trajectory reconstruction, and the cross-entropy loss is used to guide the adversarial generation task between the discriminator and the generator; during the training process, a standard alternating training rhythm is adopted, and the discriminator is trained first and then the generator in each step.

[0049] Furthermore, step S5 specifically includes the following steps:

[0050] S51: During the actual inference process, first extract the scene initialization data from the trajectory dataset through Monte Carlo sampling; since all scene cases in the trajectory dataset are of the same length, the scene case distribution is established as a uniform distribution:

[0051] id case ~ U(0, id max )

[0052]

[0053] Among them, id case represents the scene case index id, U(0, id max ) represents constructing the case index as a uniform distribution, i represents the sampling time step index, l1 represents the initialization trajectory length, traj i represents the trajectory data of the i-th scene case, and h i represents the updated scene state output by the generator;

[0054] S52: General test cases focus on testing specific types of functional scenarios. Therefore, using the map information and the trajectory dataset as a reference, the QGIS software is used to divide multiple polygon regions to represent different driving regions, including the driving-in region, the interaction region, and the non-drivable region in the lane:

[0055] P poly = [p0, p1,..., pi ,...]

[0056] Among them, P poly represents a set of polygon regions, and p i represents the i-th sub-region;

[0057] S53: Establish a basic scenario deduction loop. Use the initialized scenario trajectory as the scenario start input. The generator outputs subsequent trajectories. Only extract the first-step state of the output trajectory as the scenario advancement state for each step of scenario deduction:

[0058] h first = traj out [0,:,:]

[0059] traj new = traj in + h first

[0060] Among them, traj in represents the initialized trajectory, traj out represents the generator output trajectory, h first represents the extracted generator output state, and traj new represents the updated scenario trajectory;

[0061] S54: For the updated traffic flow trajectory, remove the vehicles outside the feasible region with reference to the feasible region; according to the initial vehicle set and the lane entry vehicle probability, traverse to judge whether there are vehicles entering the lane according to the probability and sample the entry vehicle state; realize the final update of each step of the scenario trajectory according to the removal and addition of scenario vehicles:

[0062]

[0063] Among them, h i represents the updated scenario state output by the generator, N out represents the set of removed vehicles, and N in represents the set of lane entry vehicle states, and traj new represents the finally generated scenario state;

[0064] S55: For each advanced scenario state, perform a collision check. Judge by traversing the vehicle nodes in the scenario state. If a collision exists, end the current scenario. If no collision exists, continue to advance:

[0065] flag = dist(poly i , poly j )

[0066] Among them, flag represents the collision flag bit, and polyi The shape box represents the vehicle node i, and dist() represents collision checking.

[0067] The beneficial effects of the present invention are as follows: By means of data processing, the present invention enhances the versatility of the deep learning model, combines traffic flow analysis with rolling generation to achieve long-term deduction of real test scenarios, and realizes the steady-state generation of complex interactive simulation test scenarios. Compared with traditional dynamic test scenario generation methods, the present invention can generate real test scenarios of multiple traffic participants with non-fixed segments.

[0068] (1) The present invention designs an efficient scenario feature extraction and initialization method. By dividing the real trajectory dataset by cases and combining map information, the dynamic characteristics and static constraints of traffic participants are extracted. An input data sequence is constructed using a time-sliding window, and short-term or missing data is processed through data completion technology to ensure the integrity and consistency of the input tensor. This module provides a robust initial feature representation for the subsequent deep learning model, enhancing the authenticity and diversity of scenario generation.

[0069] (2) The present invention constructs a generator architecture that combines an encoder, self-attention mechanism, and temporal convolution to achieve the generation of realistic dynamic test scenarios through a generative adversarial network (GAN). The generator receives trajectory inputs that have undergone data augmentation (Gaussian noise perturbation, random node rearrangement), captures the spatio-temporal interaction features between traffic participants, and outputs continuous scenario trajectories. The discriminator adopts an MLP structure to discriminate between real trajectories and generated trajectories respectively, and optimizes the model through a multi-task loss function to ensure that the generated scenarios are both close to the real distribution and have diverse interaction patterns.

[0070] (3) The present invention proposes a dynamic scenario rolling generation framework. The scenario state is initialized through Monte Carlo sampling, and the continuous deduction of the scenario is driven by the single-step output of the generator. Combining map constraints and traffic flow statistics, vehicles outside the area are removed and new vehicles are randomly added during each step update to achieve the dynamic balance of the traffic scenario. In addition, each step of the scenario state is verified through a collision detection mechanism to ensure that the generated scenarios meet physical constraints and safety requirements, thus supporting the generation of long-term and stable complex interactive test scenarios.

[0071] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification. Brief Description of the Drawings

[0072] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail and preferably below in conjunction with the accompanying drawings, where:

[0073] Figure 1 is the overall flowchart of the method for generating a dynamic simulation test scenario based on deep learning proposed by the present invention;

[0074] Figure 2 is the flowchart of data processing and trajectory generation based on the GAN architecture;

[0075] Figure 3 is the working flowchart of the dynamic scene rolling generation framework. Specific Embodiments

[0076] The following uses specific specific examples to illustrate the embodiments of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0077] Among them, the accompanying drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation to the present invention; in order to better illustrate the embodiments of the present invention, some components in the accompanying drawings will be omitted, enlarged or reduced, and do not represent the dimensions of actual products; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the accompanying drawings may be omitted.

[0078] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc. indicating the orientation or positional relationship, they are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the accompanying drawings are only for illustrative purposes and should not be construed as a limitation to the present invention. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.

[0079] Please refer to Figures 1 to 3, the present invention provides a method for generating a dynamic simulation test scenario based on deep learning, including: dividing scenario segments according to a real traffic data set and extracting scenario traffic characteristics; constructing a deep learning model data loading module based on a time sliding window; adopting a data augmentation technique to robustify input trajectory data; constructing a deep learning model based on a generative adversarial network; constructing a dynamic scenario rolling generation framework. The present invention enhances the versatility of the deep learning model through data processing means, combines traffic flow analysis and rolling generation to realize the long-term deduction of real test scenarios, and realizes the steady-state generation of complex interactive simulation test scenarios. Compared with the traditional dynamic test scenario generation method, the present invention can realize the generation of real test scenarios of multiple traffic participants with non-fixed segments. The method specifically includes the following steps:

[0080] S1: Divide the real traffic data set and extract traffic flow update characteristics;

[0081] S2: Extract scenario data based on a time sliding window to construct a data loading module;

[0082] S3: Adopt corresponding scale data augmentation means for different contents of the trajectory data;

[0083] S4: Construct a generative adversarial network for generating dynamic test scenarios;

[0084] S5: Build a dynamic scenario rolling generation framework.

[0085] Embodiment:

[0086] In step S1, in this example, scenario cases are divided through real traffic flow trajectories and the overall traffic flow dynamic characteristics are extracted. Specifically, the dynamic characteristics of the traffic flow include motion characteristic distribution and scenario evolution characteristics, and the processed trajectory data and dynamic characteristics are used for subsequent dynamic test scenario generation. Specifically, it includes the following steps:

[0087] S11: Divide the interaction data set by case, where the scene information of each frame of each case is represented as G t and is saved as a pickle file:

[0088]

[0089] where n represents the number of vehicle nodes in the scenario, represents the state information of vehicle node i at time t.

[0090] S12: Count the vehicle entry situation P at all lane entrances in the map and the state set D of the vehicles entering each lane:

[0091] P = [p1, p2..., p j ..., pk

[0092] D = [D1, D2,..., D j ,...]

[0093] D j = [n1, n2..., n i

[0094] where k represents the number of lanes for vehicles to enter, p j represents the probability of vehicles entering lane j, D j represents the initial state set of vehicles entering lane j, and n i represents the state information of the vehicle node i where the vehicle enters.

[0095] Since the data sets in specific scenarios contain a large number of cases, and each case is a continuous spatio-temporal segment, when analyzing the update characteristics and dynamic characteristics of traffic flow, all the used data sets are aggregated for statistical analysis.

[0096] In step S2, by means of a sliding window, information completion, and invalid information elimination, the integrity and effectiveness of the overall training data are ensured, which specifically includes the following steps:

[0097] S21: Extract the input data a l1 of the training model and the corresponding item a l2 of the output data according to each scenario case; extract short-term trajectories from the scenario trajectory data using a time sliding window:

[0098]

[0099] l = l1 + l2

[0100] where A i represents the trajectory set extracted from the i-th case, represents each short-term trajectory, s represents the sliding window step size, l1 represents the length of the input data, and l2 represents the length of the output data.

[0101] S22: Complete the missing information of the vehicle nodes according to the trajectory information; for the input data with a length of less than five steps, the missing position information is completed using the speed information, and the missing heading angle information is completed using the method of linear interpolation.

[0102] S23: Mask the nan values at the same positions of the output control true values by identifying whether there are valid values in the input data.

[0103] In step S3, noise perturbations are added to the training data through analysis and debugging to supplement diversity, and a series of data augmentation methods are used to improve the generalization of the final model. The specific steps are as follows:

[0104] S31: Through statistical analysis of the data, obtain the noise intensity b of the position information and the noise intensity b of the heading angle information by determining the data distribution:

[0105]

[0106] Among them, N(μ v ,σ v ) represents the distribution of speed in the dataset, represents the distribution of the heading angle in the dataset, σ represents the standard deviation of the distribution, and b represents the noise intensity coefficient.

[0107] S32: To increase the diversity of the data, the generalization of the model is improved through data augmentation methods; using the noise intensity as the standard deviation, Gaussian noise is used to add data perturbations:

[0108] β~N(0,1)

[0109]

[0110] Among them, M v represents the position mask matrix, represents the heading angle mask matrix, N(0,1) represents the normal distribution, α v represents the position noise obtained by sampling, represents the heading angle noise.

[0111] In addition, for a single batch of data, which is a tensor data of fixed shape (n, t, c), there are invalid vehicle node models in dimension n, which may cause the model to learn fixed node relationships when extracting spatial interaction relationships. Therefore, implicit data augmentation is also performed through random node order.

[0112] In step S4, a scene generator is constructed by combining the characteristics of traffic flow trajectory data, and a generator-discriminator adversarial model is established based on the adversarial generative network architecture to realize the generation training of real dynamic scenes. The specific steps are as follows:

[0113] S41: Based on the basic paradigm of the model in the trajectory prediction task, construct a dynamic test scene generator composed of an encoding layer ModuleList0, a feature extraction layer ModuleList1, and an output head ModuleList2:

[0114] x hidden =ModuleList0(x in )

[0115] x hidden = ModuleList1(x hidden )

[0116] x out = ModuleList2(x hidden )

[0117] Among them, x in represents the input trajectory information, x hidden represents the intermediate hidden state, and x out represents the model output of the subsequent trajectory.

[0118] S42: To generate a fidelity test scenario, build an adversarial generation network; introduce a discriminator with an MLP architecture. The discriminator inputs the real reference trajectory and the output trajectory of the generator respectively, and outputs the discrimination results of the two trajectories:

[0119] Value true = MLP(traj true )

[0120] Value fake = MLP(traj fake )

[0121] Among them, Value true represents the discrimination result of the real reference trajectory, and Value fake represents the discrimination result of the output trajectory of the generator.

[0122] In addition, due to the special nature of the task, for the generator, we adopt a multi-task learning method, integrating the trajectory reconstruction task and the adversarial generation task, guiding the trajectory reconstruction with the mean absolute error, and guiding the adversarial generation task of the discriminator and the generator with the cross-entropy loss. During the training process, a standard alternating training rhythm is adopted, where the discriminator is trained first and then the generator in each step.

[0123] In step S5, use the map information to construct the scene static constraints, combine the scene characteristics extracted in step S1, and build a "generate - eliminate - update - check" scene generation loop based on the generator, which specifically includes the following steps:

[0124] S51: During the actual inference process, first extract the scene initialization data from the trajectory dataset through Monte Carlo sampling; since all cases in the trajectory dataset have the same length, the case distribution is established as a uniform distribution as follows:

[0125] id case ~ U(0, id max )

[0126]

[0127] Among them, i represents the sampling time step index, l1 represents the initialized trajectory length, and traj i represents the trajectory data of the i-th case.

[0128] S52: General test cases focus on testing specific types of functional scenarios. Therefore, using map information and trajectory data sets as references, the QGIS software is used to divide multiple polygon regions to represent different driving regions, including the driving-in region, the interaction region, and the non-drivable region in the lane:

[0129] P poly = [p0, p1,..., p i ,...]

[0130] Among them, P poly represents the set of polygon regions, and p i represents the i-th sub-region.

[0131] S53: Establish a basic scenario deduction loop. Using the initialized scenario trajectory as the scenario start input, the generator outputs subsequent trajectories. Only the first-step state of the output trajectory is extracted as the scenario advancement state for each step of scenario deduction:

[0132] h first = traj out [0, :, :]

[0133] traj new = traj in + h first

[0134] Among them, traj in represents the initialized trajectory, traj out represents the generator output trajectory, h first represents the extracted generator output state, and traj new represents the updated scenario trajectory.

[0135] S54: For the updated traffic flow trajectory, vehicles outside the region are removed with reference to the drivable region; according to the initial vehicle set and the lane entry vehicle probability, it is traversed to judge whether there are vehicles entering the lane according to the probability and sample the entry vehicle state; the final update of each step of the scenario trajectory is realized according to the removal and addition of scenario vehicles:

[0136]

[0137] Among them, h i represents the updated scenario state output by the generator, Nout Denote the set of vehicles to be excluded, N in Denote the set of vehicle entry states for the lane, traj new Denote the finally generated scene state.

[0138] S55: For each promoted scene state, collision checking shall be performed. It is judged by traversing the vehicle nodes in the scene state. If a collision exists, the current scene ends; if there is no collision, it continues to be promoted:

[0139] flag = dist(poly i , poly j )

[0140] where poly i Denotes the shape frame representation of vehicle node i, and dist() denotes collision checking.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the present technical solution, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A method for generating a dynamic simulation test scenario based on deep learning, characterized in that, The method specifically includes the following steps: S1: Divide the real traffic dataset and extract traffic flow update characteristics; S2: Extract scenario data based on a time-sliding window to construct a data loading module; S3: Adopt corresponding scale data augmentation means for different contents of the input trajectory data; S4: Construct an adversarial generation network for generating dynamic test scenarios; S5: Build a dynamic scenario rolling generation framework.

2. The method for generating a dynamic simulation test scenario according to claim 1, wherein Step S1 specifically includes the following steps: S11: Divide the real traffic dataset according to scenario cases, where the scene information of each frame of each scenario case is represented as G t is saved as a pickle file: where n represents the number of vehicle nodes in the scenario, represents the state information of vehicle node i at time t; S12: Statistically analyze the vehicle entry situation P at all lane entrances in the map and the state set D of the vehicles entering each lane: P = [p1, p2..., p j ..., p k ​ D = [D1, D2,..., D j ,...] D j = [n1, n2..., n i ​ Among them, k represents the number of lanes for vehicles to enter, and p j represents the probability of vehicles entering lane j, and D j represents the set of initial states of vehicles entering lane j, and n i represents the state information of the vehicle at node i entering the lane.

3. The method for generating a dynamic simulation test scenario according to claim 2, wherein Step S2 specifically includes the following steps: S21: Extract the training model input data a according to each scenario case l1 and the output data comparison item a l2 ; Extract short-term trajectories from the scenario trajectory data using a time sliding window: Among them, A i represents the trajectory set extracted from the i-th scenario case, represents each short-term trajectory, s represents the sliding window step size, l1 represents the input data length, and l2 represents the output data length; S22: Complete the missing information of the vehicle nodes according to the trajectory information; for input data with a length of less than five steps, the missing position information is completed using speed information, and the missing heading angle information is completed using linear interpolation; S23: By identifying whether there are valid values in the input data, perform nan value masking processing on the corresponding positions of the output reference true values.

4. The method for generating a dynamic simulation test scenario according to claim 3, wherein Step S3 specifically includes the following steps: S31: By performing statistical analysis on the input trajectory data, obtain the noise intensity b of the position information v determined by the data distribution v and the noise intensity of the heading angle information ​ Among them, N(μ v ,σ v ) represents the distribution of speeds in the dataset, represents the distribution of heading angles in the dataset, σ represents the standard deviation of the distribution, and b represents the noise intensity coefficient; S32: Improve the generalization of the model through data augmentation; use the noise intensity as the standard deviation to add data perturbations through Gaussian noise: β~N(0,1) Among them, M v represents a position mask matrix, represents a heading angle mask matrix, N(0,1) represents a normal distribution, and α v represents the position noise obtained by sampling, represents the heading angle noise, and β represents the random sampling value of the normal distribution.

5. The method for generating a dynamic simulation test scenario according to claim 4, wherein In step S32, during the data augmentation process, for a single batch of data, which is a tensor data of fixed shape (n, t, c), implicit data augmentation is performed through random node order.

6. The method for generating a dynamic simulation test scenario according to claim 4, wherein Step S4 specifically includes the following steps: S41: Based on the basic paradigm of the model in the trajectory prediction task, construct a dynamic test scenario generator, including an encoding layer ModuleList0, a feature extraction layer ModuleList1, and an output head ModuleList2: x hidden = ModuleList0(x in ) x hidden = ModuleList1(x hidden ) x out = ModuleList2(x hidden ) where x in represents the input trajectory information, x hidden represents the hidden state in the middle, x out represents the model output of the subsequent trajectory; S42: Build an adversarial generation network; introduce a discriminator with an MLP architecture. The discriminator inputs the real reference trajectory and the trajectory output by the generator respectively, and outputs the discrimination results of the two trajectories: Value true = MLP(traj true ) Value fake = MLP(traj fake ) Among them, Value true represents the discrimination result of the true control trajectory, and Value fake represents the discrimination result of the trajectory output by the generator.

7. The method for generating a dynamic simulation test scenario according to claim 6, wherein In step S42, for the generator, a multi-task learning method is adopted, integrating the trajectory reconstruction task and the adversarial generation task. The absolute mean error is used to guide the trajectory reconstruction, and the cross-entropy loss is used to guide the adversarial generation task between the discriminator and the generator; During the training process, a standard alternating training rhythm is adopted. In each step, the discriminator is trained first, and then the generator is trained.

8. The method for generating a dynamic simulation test scenario according to claim 6 or 7, characterized in that Step S5 specifically includes the following steps: S51: During the actual inference process, first extract scenario initialization data from the trajectory dataset through Monte Carlo sampling; since all scenario cases in the trajectory dataset have the same length, the scenario case distribution is established as a uniform distribution: id case ~U(0, id max ) Among them, id case represents the scenario case index id, U(0, id max ) represents constructing the case index as a uniform distribution, i represents the sampling time step index, l1 represents the initialized trajectory length, traj i represents the trajectory data of the i-th scenario case, h i represents the updated scenario state output by the generator; S52: Using the map information and the trajectory dataset as references, use QGIS software to divide multiple polygon regions to represent different driving regions, including the entry region, the interaction region, and the non-drivable region in the lane: P poly = [p0, p1,..., p i ,...] Among them, P poly represents a set of polygon regions, and p i represents the i-th sub-region; S53: Establish a basic scenario deduction loop, use the initialized scenario trajectory as the scenario start input, the generator outputs subsequent trajectories, and only the first step state of the output trajectory is extracted as the scenario advancement state for each step of scenario deduction: h first = traj out [0,:,:] traj new = traj in + h first Among them, traj in represents the initialized trajectory, traj out represents the generator output trajectory, h first represents the extracted generator output state, traj new represents the updated scenario trajectory; S54: For the updated traffic flow trajectory, vehicles outside the feasible area are removed with reference to the feasible area; according to the initial vehicle set and the lane entry vehicle probability, traverse to determine whether there is a vehicle entering the lane based on the probability and sample the state of the entering vehicle; the final update of each step of the scenario trajectory is realized according to the removal and addition of scenario vehicles: Among them, h i represents the updated scene state output by the generator, N out represents the set of vehicles to be excluded, N in represents the set of lane-incoming vehicle states, traj new represents the finally generated scene state; S55: Collision checking is to be performed for each promoted scenario state. It is judged by traversing the vehicle nodes in the scenario state. If a collision exists, the current scenario ends; if there is no collision, it continues to be promoted: flag = dist(poly i , poly j ) Among them, flag represents the collision flag bit, and poly i represents the shape box representation of vehicle node i, and dist() represents collision checking.