An accident scene generation method based on a large language model and a differential evolution algorithm

By combining a large language model and an improved differential evolution algorithm, high-value accident scenarios that conform to logical descriptions and have accurate physical parameters are generated. This solves the problem of inconsistency between the logical and physical parameters of scenario generation in existing technologies, and improves the safety and accuracy of autonomous driving simulation testing.

CN123182227APending Publication Date: 2026-11-27CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611426032.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing methods for generating autonomous driving scenarios struggle to produce high-value accident scenarios that are both logically consistent and possess precise physical parameters. Data-driven methods lack extreme scenario data, knowledge-driven methods have weak generalization capabilities, and traditional evolutionary algorithms lack high-level semantic understanding.

Method used

By combining a large language model with an improved differential evolution algorithm, unstructured text and structured data of real traffic accidents are obtained. The LLM is used to extract scene feature vectors and determine the optimization parameter space. The differential evolution algorithm searches for optimization in this space and combines the fitness function of numerical fitting error, text semantic consistency and accident criticality for optimization.

Benefits of technology

It generates high-value accident scenarios that conform to logical descriptions and have accurate physical parameters, thereby improving the safety and accuracy of autonomous driving simulation testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182227A_ABST
    Figure CN123182227A_ABST
Patent Text Reader

Abstract

The application discloses an accident scene generation method based on a large language model and a differential evolution algorithm, and comprises the following steps: acquiring unstructured accident text reports and structured accident numerical data of a real traffic accident; inputting the data into a large language model to infer a scene feature vector of the traffic accident through a thinking chain; selecting a plurality of to-be-optimized parameters from the scene feature vector and determining an optimization space of each to-be-optimized parameter; and optimizing the to-be-optimized parameter vector by using an improved differential evolution algorithm to obtain an optimal scene parameter set of the traffic accident; wherein a convergence scaling factor in the improved differential evolution algorithm is dynamically determined according to a diversity convergence trend of a current population in the differential evolution algorithm by using the large language model. The application can generate a high-value accident scene which not only conforms to logical description but also has accurate physical parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving simulation testing technology, specifically to a method for generating accident scenarios based on a large language model and differential evolution algorithm. Background Technology

[0002] In the development and verification of autonomous driving systems, scenario-based testing is a crucial step in ensuring their safety. Real-world traffic accident scenarios, due to their high risk and difficulty in reproduction, typically rely on simulation testing. Existing scenario generation methods are mainly divided into two categories: data-driven and knowledge-driven. Data-driven methods depend on massive amounts of road test data, but for extreme, long-tailed accident scenarios, training is often difficult due to the scarcity of samples; knowledge-driven methods rely on expert rules, resulting in weak generalization ability.

[0003] In recent years, generative artificial intelligence, especially large language models (LLM), has demonstrated powerful semantic understanding and generation capabilities. However, directly using LLM to generate driving scenarios suffers from the illusion problem, where the generated scene parameters (such as speed, acceleration, and trajectory coordinates) may violate physical laws or cannot be accurately executed in a simulator. On the other hand, traditional evolutionary algorithms (such as differential evolution) excel in parameter optimization but lack the ability to understand high-level semantic logic, making it difficult to generate logical scenarios that conform to specific accident descriptions based solely on numerical optimization. Summary of the Invention

[0004] This invention provides a method for generating accident scenarios based on a large language model and differential evolution algorithm, which can generate high-value accident scenarios that conform to logical descriptions and have accurate physical parameters.

[0005] To achieve the above technical objectives, the present invention adopts the following technical solution:

[0006] An accident scene generation method based on a large language model and differential evolution algorithm includes:

[0007] Obtain unstructured accident text reports of real traffic accidents and structured accident numerical data ;

[0008] Will and Input a large language model and infer scene feature vectors of traffic accidents through thought chains. Select several parameters to be optimized from the scene feature vector and determine the optimization space for each parameter.

[0009] An improved differential evolution algorithm is used to optimize the parameter vector to obtain the optimal scenario parameter set for traffic accidents. The convergence scaling factor in the improved differential evolution algorithm is dynamically determined by a large language model based on the convergence trend of the current population diversity in the differential evolution algorithm.

[0010] Furthermore, the unstructured accident text report The data originates from the accident report; the structured accident numerical data is derived from this report. Data is derived from event data loggers or roadside sensing devices, including vehicle speed time series, peak acceleration, and collision point coordinates.

[0011] Furthermore, the scene feature vector This includes key logical parameters before and after a traffic accident: road topology, types of traffic participants, participants' driving direction, behavioral intentions, traffic control status, conflict triggering relationships, environmental conditions, and accident results.

[0012] Furthermore, parameters to be optimized are selected based on the type of traffic accident and the key conflict process.

[0013] Furthermore, an improved differential evolution algorithm is used to optimize the parameter vector to be optimized, specifically including:

[0014] Step 3.1: Use individuals to represent the set of parameters to be optimized, sample and generate an initial population within the optimization space of the set of parameters to be optimized, and calculate the fitness function of each individual;

[0015] Step 3.2, Mutation Operation: For any population in generation G, the mutation operation is performed on the [missing information - likely a specific generation number]. target individuals Generate mutated individuals ;

[0016]

[0017] in, Three distinct individuals are randomly selected from the current G-generation population, and all three individuals are related to the target individual. different; To converge the scaling factor, a large language model is adopted and the results are given based on the dispersion of the population distribution in the normalized parameter space, the decrease in fitness values ​​over several consecutive generations, the proportion of unexecutable scenarios or semantic default scenarios, and according to preset prompting rules.

[0018] Step 3.3, Crossover Operation: Generating Experimental Individuals ;

[0019]

[0020] in, For test individuals The j-th parameter to be optimized; For mutated individuals The j-th parameter to be optimized For target individuals The j-th parameter to be optimized; For the j-th parameter to be optimized in A random number that is uniformly distributed within an interval; Indicates the crossover probability; The dimension index is randomly selected;

[0021] Step 3.4, the test individuals The data is decoded into a standard traffic scenario description file, input into an autonomous driving simulation engine, and the initial states and trigger logic of traffic participants are set in the simulation engine. Dynamic simulation is then performed to generate trajectory data. and collision event information;

[0022] Step 3.5, Calculate the experimental individuals The fitness function value;

[0023] Step 3.6, Select Operations and Iterations:

[0024]

[0025] in, Indicates the first The first generation Individual, and They represent the test individuals respectively. and target individuals The fitness function value;

[0026] Step 3.7: Repeat steps 3.2 to 3.6 until the preset convergence condition is met. The set of parameters to be optimized corresponding to the individual with the best fitness function value in the current population is the optimal scenario parameter set.

[0027] Furthermore, the individual's fitness function The terms include numerical fitting error, text semantic consistency, and incident threshold, and are expressed as follows:

[0028]

[0029] in, , , These represent the numerical fitting error, text semantic consistency, and accident threshold of individual X, respectively. The weight coefficients for the numerical fitting error term, the text semantic consistency term, and the accident threshold term are respectively, satisfying... .

[0030] Furthermore, numerical fitting error By comparing simulated trajectories with real numerical data The Euclidean distance is expressed as:

[0031]

[0032] in, , Representing simulated trajectories and actual numerical data respectively. The Middle The location coordinates of each time point This represents the total number of sampling time points;

[0033] Textual semantic consistency Calculating text reports using a multimodal encoder Representation of Simulation Scenes Semantic distance representation:

[0034]

[0035] in, This represents a multimodal feature extractor used to convert text into vectors; is the cosine similarity function, used to measure the directional consistency between two vectors in the semantic space;

[0036] Accident threshold It is used to measure whether a simulated scenario presents a high-risk state close to an accident or actual collision, and is based on a penalty term constructed from minimum TTC, PET, minimum relative distance, or collision marker.

[0037] Furthermore, the crossover probability in the differential evolution algorithm is improved by employing a large language model and based on scene feature vectors. The complexity of the scenario is assessed, and the determination is made by combining simulation feedback from the previous generation or evaluated populations.

[0038] This invention takes real accident text reports and structured accident numerical data as input, and extracts them through LLM. Based on this, decision variables, candidate search boundaries, and semantic constraints are determined; differential evolution algorithm is used to search for executable accident reproduction scenarios within the semantic constraint parameter space; the fitness function simultaneously considers numerical fitting error, text semantic consistency, and accident criticality. Attached Figure Description

[0039] Figure 1 This is a flowchart illustrating the overall process architecture of the method described in the embodiments of the present invention.

[0040] Figure 2This is a logical diagram illustrating how a large language model is used to parse text and generate a parameter space in an embodiment of the present invention.

[0041] Figure 3 This is a schematic diagram illustrating the principle of optimizing vehicle trajectories using an improved differential evolution algorithm in an embodiment of the present invention. Detailed Implementation

[0042] The embodiments of the present invention will be described in detail below. These embodiments are based on the technical solutions of the present invention and provide detailed implementation methods and specific operation processes to further explain the technical solutions of the present invention.

[0043] Example 1

[0044] This embodiment provides a method for generating accident scenarios based on a large language model and differential evolution algorithm. Through multi-source data preprocessing, LLM-based parameter space definition, LLM-guided differential evolution optimization, simulation verification, and multi-dimensional fitness evaluation, it achieves high-fidelity reproduction of accident scenarios. The specific steps are as follows:

[0045] Step 1: Obtain unstructured accident text reports of real traffic accidents. and structured accident numerical data And preprocessing.

[0046] This embodiment is an unstructured accident text report. This data originates from accident reports and includes natural language descriptions of weather conditions (such as rain, snow, and fog), road topology (such as intersections and curves), and the behavioral logic of traffic participants (such as lane changes and sudden braking). It is structured numerical accident data. The data originates from event data loggers or roadside sensing devices and includes discrete time-series vehicle data, such as speed sequences, peak accelerations, and collision point coordinates.

[0047] Preprocessing includes timestamp alignment and cleaning of the data to form a standardized input dataset.

[0048] Step 2, and Input a large language model and infer scene feature vectors of traffic accidents through thought chains. It is used to characterize the key logical elements of the scene; select several parameters to be optimized from the scene feature vector, and determine the optimization space of each parameter to be optimized.

[0049] Among them, scene feature vector It is a scene semantic structure extracted from accident text and structured numerical data, used to describe the main relationships before and after the accident. The key logical elements include road topology, traffic participant types, participant driving direction, behavioral intention, traffic control status, conflict triggering relationships, environmental conditions, and accident results.

[0050] For example, given the accident text "Vehicle A is traveling straight from south to north at a traffic light-controlled intersection, while two-wheeled vehicle B runs a red light from west to east, and the front of vehicle A collides with the right side of two-wheeled vehicle B," the LLM output will be... This could include: a traffic light-controlled intersection as the road topology; vehicle A and two-wheeled vehicle B as the participants; vehicle A proceeding straight through the intersection; and vehicle B running a red light. The conflict is a cross-path conflict, with the collision points being the front of vehicle A and the right side of vehicle B. The environmental conditions are a sunny, dry road surface. It is used to provide semantic basis for subsequent decision variable selection and search space construction.

[0051] After obtaining the scene feature vector Subsequently, based on the behavior of participants in the accident, road topology, and conflict relationships, the specific scenario parameters that need to be optimized by the differential evolution algorithm are determined, and a vector of decision variables to be optimized is constructed. ,in Indicates the first One parameter to be optimized. This represents the total number of parameters to be optimized. The set of parameters to be optimized may include the vehicle's or two-wheeled vehicle's initial speed, initial position, entry time into the conflict zone, acceleration, braking trigger time, lateral offset, and trajectory control points. The specific parameters selected are not fixed or preset, but rather depend on... The accident types and key conflict processes identified in the process can be determined based on prior knowledge. Specifically, parameters in the scene feature vector that have a direct impact on the spatiotemporal intersection or collision results of key conflicts and cannot be uniquely determined by existing data can be selected as parameters to be optimized, while the remaining parameters are used as fixed values ​​or constraints.

[0052] For example, in a scenario where a vehicle traveling straight at an intersection collides with a two-wheeled vehicle, if This indicates that the core conflict of the accident was the spatial and temporal intersection of "vehicle A proceeding straight through the intersection" and "two-wheeled vehicle B crossing laterally." It can include parameters such as the initial speed of vehicle A entering the intersection, the trigger time of vehicle A entering the intersection, the initial speed of two-wheeled vehicle B entering the intersection, and the trigger time of two-wheeled vehicle B entering the conflict area.

[0053] Using LLM and Deriving each decision variable The candidate upper and lower bounds are obtained and verified through preset constraints. Construct a parameter search space. For the first The lower bound of the minimum value of each parameter. For the first The maximum value limit of each parameter.

[0054] LLM generates each decision variable upper and lower boundaries It is not simply generated freely from the model, but rather based on... and The input forms a candidate range, which is then validated against preset traffic regulations, road geometry, vehicle dynamics, accident numerical tolerances, and the simulator's executable range. Specifically, LLM first determines the candidate range based on road type, speed limit, participant behavior, and the sequence of accidents. The physical meaning is then used to estimate the candidate lower limit based on existing numerical information such as velocity, acceleration, collision angle, collision point, and trigger time. and upper limit When observations exist, a candidate range is formed using the observations and preset errors; when only qualitative descriptions exist, the range is determined based on speed limits, road geometry, participant dynamics, and simulator range; time parameters are inferred from the sequence of accidents, distance to the conflict point, and speed; position or trajectory parameters are determined based on lane boundaries, driving direction, collision point, and angle; subsequently, intersections are found with regulations, road conditions, dynamics, numerical tolerances, and simulator constraints, and the results are pruned to ensure... It retains the uncertainty of accident recurrence while satisfying feasibility and physical rationality.

[0055] Step 3: An improved differential evolution algorithm is used to optimize the parameter vector to obtain the optimal scenario parameter set for traffic accidents. The convergence scaling factor in the improved differential evolution algorithm is dynamically determined by a large language model based on the diversity convergence trend of the current population in the differential evolution algorithm.

[0056] Step 3.1: Use individuals to represent the set of parameters to be optimized, generate an initial population using Latin hypercube sampling within the optimization space of the set of parameters to be optimized, and calculate the fitness function of each individual.

[0057] In this embodiment, a fitness function is constructed that minimizes the fitness function. A smaller value for this function indicates higher scene quality. Specifically, the fitness function of an individual... The terms include numerical fitting error, text semantic consistency, and incident threshold, and are expressed as follows:

[0058]

[0059] in, , , These represent the numerical fitting error, text semantic consistency, and accident threshold of individual X, respectively. The weight coefficients for the numerical fitting error term, the text semantic consistency term, and the accident threshold term are respectively, satisfying... .

[0060] Numerical fitting error By comparing simulated trajectories with real numerical data The Euclidean distance is expressed as:

[0061]

[0062] in, , Representing simulated trajectories and actual numerical data respectively. The Middle The location coordinates of each time point This represents the total number of sampling time points.

[0063] Textual semantic consistency Calculating text reports using a multimodal encoder Representation of Simulation Scenes Semantic distance representation:

[0064]

[0065] in, This represents a multimodal feature extractor used to convert text into vectors; The representation of the simulation scene can be a bird's-eye view screenshot of the simulation process or a generated scene description text; is the cosine similarity function, used to measure the directional consistency of two vectors in the semantic space.

[0066] Accident threshold This penalty term is used to measure whether a simulated scenario presents a high-risk state approaching an accident or actual collision. It is constructed based on minimum TTC, PET, minimum relative distance, or collision markers. If a collision consistent with the original accident description occurs in the simulation, this term takes a smaller value or approaches 0; if no collision occurs, a penalty is imposed based on the deviation between the minimum TTC, PET, or minimum relative distance and a preset threshold.

[0067] Step 3.2, Mutation Operation: For any population in generation G, the mutation operation is performed on the [missing information - likely a specific generation number]. target individuals Generate mutated individuals ;

[0068]

[0069] in, Three distinct individuals are randomly selected from the current G-generation population, and all three individuals are related to the target individual. different.

[0070] To determine the convergence scaling factor, a large language model is used, and the scaling factor is determined based on the population's dispersion in the normalized parameter space, the rate of decrease in fitness values ​​over several consecutive generations, and the proportion of unexecutable or semantically breached scenarios, according to preset prompting rules. The value range is typically [range missing]. It is used to control the intensity of differential disturbances.

[0071] In generation 0 or when sufficient simulation evaluation results have not yet been accumulated, Use preset initial values; after completing at least one round of simulation evaluation, statistically analyze each individual in the current population. The distribution dispersion D in the normalized parameter space, the decrease in fitness value ΔJ over several consecutive generations, and the proportion R of unexecutable scenarios or semantic default scenarios are input into the LLM along with the convergence scaling factor from the previous iteration, using textual descriptions or structured state quantities. Subsequently, the LLM provides the following prompts according to preset rules: The candidate values ​​are then restricted by the program to the range [0,2]. The preset prompting rules can be: if R exceeds the limit, prioritize decreasing F; otherwise, if D is too low or ΔJ is too small, increase F; if D is high and ΔJ continues to improve, decrease F; otherwise, remain unchanged. After LLM outputs the candidate values ​​of the convergence scaling factor for this round, the preset control program restricts them to [0,2]; if it cannot be resolved, the effective value of the previous generation or F0 is used. This achieves the following: if the population distribution is too concentrated or the fitness value decreases slowly for several consecutive generations, increase the scaling factor. To enhance global search; if the population remains dispersed and fitness values ​​continue to improve, then reduce To improve local convergence accuracy. LLM does not directly change the local convergence accuracy during this process. The variable definitions and search boundaries are set, and only the intensity of the differential perturbation is adjusted.

[0072] Step 3.3, Crossover Operation: Generating Experimental Individuals ;

[0073]

[0074] in, For test individuals The j-th parameter to be optimized; For mutated individuals The j-th parameter to be optimized For target individuals The j-th parameter to be optimized; For the j-th parameter to be optimized in A random number that is uniformly distributed within an interval; Represents the crossover probability, with a range of values. This is used to control the proportion of genes that a new individual inherits from the mutation vector; The dimension index is randomly selected to ensure that at least one dimension of the experimental vector comes from the mutated vector, thus avoiding the generation of completely identical copies.

[0075] In this embodiment, the crossover probability in the improved differential evolution algorithm is improved. Using a large language model and based on scene feature vectors The complexity of the scenario is assessed, and then determined based on simulation feedback from the previous generation or evaluated populations. The Large Language Model (LLM) reads road topology, number of participants, triggering conditions, priority constraints, and spatiotemporal coupling relationships using fixed fields to provide candidate values ​​for scenario complexity and crossover probability (CR). Simultaneously, the fitness improvement of the previous generation, population dispersion, and the proportion of invalid or semantically defaulting factors are input. When the proportion of invalid or defaulting factors exceeds the limit, CR is preferentially reduced; otherwise, CR is increased when the scenario is complex, the population is concentrated, or fitness stagnates, and decreased or maintained when parameter boundaries are narrow or fitness continues to improve. The control program limits CR to [0,1], and in case of anomalies, the effective value or initial value of the previous generation is used. Therefore, for accident scenarios with multiple participants, multiple triggering conditions, or strong spatiotemporal coupling, Take a larger value to increase the experimental vector. From the mutation vector The proportion of inherited parameters; for scenarios with narrow parameter boundaries, strong numerical constraints, or high simulation stability requirements. Take the smaller value to preserve the target vector. The parameter combinations have been verified to be effective.

[0076] Step 3.4, the test individuals Decode the data into a standard traffic scenario description file (such as OpenSCENARIO format), input it into an autonomous driving simulation engine (such as CARLA), and set the initial states and triggering logic for traffic participants in the simulation engine. The execution time is [duration missing]. Dynamic simulation, recording simulation trajectory data Collision event information is used to fit collision results, verify semantic consistency, and calculate accident thresholds. Collision event information includes collision markers, collision time, participants, collision location, pre-collision velocity, relative velocity, collision angle, and collision point; when no collision occurs, minimum relative distance, TTC, or PET is recorded.

[0077] Step 3.5, Calculate the experimental individuals The fitness function value; the fitness function is as described in step 3.1.

[0078] Step 3.6, Select Operations and Iterations:

[0079]

[0080] in, Indicates the first The first generation Individual, and They represent the test individuals respectively. and target individuals The fitness function value.

[0081] Rule meaning: If the experimental individual If the fitness value is smaller (better), then it will replace the original target individual. Enter the next generation; otherwise, the original target individual reserve.

[0082] Step 3.7: Repeat steps 3.2 to 3.6 until the preset convergence condition is met (such as reaching the maximum number of iterations or the fitness value is lower than the threshold). The set of parameters to be optimized corresponding to the individual with the best fitness function value in the current population is the optimal scenario parameter set.

[0083] Example 2

[0084] This embodiment provides a case study of a collision between a straight-going vehicle and a two-wheeled vehicle at an urban intersection, i.e., the corresponding scene generation method, which includes the following steps:

[0085] 1. Input Data Preparation

[0086] The input data in this embodiment comes from the CIDAS traffic accident database and consists of two parts:

[0087] (1) Accident report: "On X month X day in 2023, at a two-way four-lane intersection controlled by traffic lights, a blue sedan (A) was traveling straight from south to north, and a two-wheeled vehicle (B) was traveling from west to east. Vehicle A was in a green light state at the time, but because the two-wheeled vehicle B ran a red light, the front of vehicle A collided violently with the right side of the two-wheeled vehicle B."

[0088] (2) Accident numerical data:

[0089] At the time of the collision, vehicle A's speed was approximately 45 km / h.

[0090] At the moment of collision, the speed of vehicle B was approximately 25 km / h.

[0091] Environmental information: Sunny weather, dry road surface, coefficient of friction 0.85.

[0092] Relative angle of collision: approximately 110 degrees.

[0093] 2. Semantic parsing and parameter definition based on a large language model

[0094] Input the above text and numerical values ​​into the deployed large language model. The system guides the model to output structured parameter definitions through prompt word engineering.

[0095] Scenario Analysis: LLM identifies the road topology as an intersection, with V as the key participant. A (Straight) and TW B (Going straight). The potential cause was identified as a two-wheeled vehicle running a red light.

[0096] Variable extraction and boundary setting: To reproduce collisions, LLM transforms uncertain driving behaviors into parameters to be optimized by the DE algorithm, and sets lower and upper bounds for the search:

[0097] parameter V A The start of the traffic light trigger time , range: [0s, 10s].

[0098] parameter V A Average acceleration during straight travel Range: [0.5m / s] 2 3.0m / s 2 ].

[0099] parameter V A Initial speed upon entering the intersection Range: [40km / h, 60km / h].

[0100] parameter TW B Initial speed upon entering the intersection Range: [20km / h, 30km / h].

[0101] 3. Differential Evolutionary Algorithm (DE) optimization process.

[0102] Initialize a containing Individuals (e.g.) A population of individuals, each represented by a vector. composition.

[0103] Fitness function calculation: For each individual in the population, a simulation engine is invoked to perform a simulation. After the simulation is completed, the simulation data is extracted to calculate the fitness. :

[0104]

[0105] in, and It is the velocity at the moment of collision in the simulation. It's the angle of collision. It is the minimum distance between the trajectories of the two vehicles (0 if a collision occurs, and a positive value if no collision occurs, used to guide the two vehicles to meet).

[0106] Variation: For the first From the individuals of the generation, three distinct individual vectors are randomly selected. Generate mutated individuals ,in This is the convergence scaling factor.

[0107] Crossover: This process combines mutated individuals. With target individuals Perform binomial crossover to generate experimental individuals. .

[0108] Selection: Individuals in the comparative trial With target individuals The fitness value. If the experimental individual It has better adaptability ( If the value is smaller, then it will replace the target individual in the next generation. .

[0109] Scene generation and verification: After several generations (e.g., 50 generations) of iteration, the algorithm converges.

[0110] Optimal solution output: Output the optimal individual. This means that vehicle A starts 3.2 seconds after the simulation begins, at a speed of 1.5 m / s. 2 Accelerate; the initial speed of two-wheeled vehicle B is 20.5 km / h.

[0111] Verification result: When the parameter is input into the simulator, the generated scene shows that vehicle A collides with two-wheeled vehicle B that runs a red light and goes straight.

[0112] Data verification: Simulation results show that at the time of the collision, vehicle A's speed was 45.2 km / h (error <1%), vehicle B's speed was 24.8 km / h (error <1%), and the collision angle was 108 degrees (error <2%). All indicators are highly consistent with the original accident data.

[0113] Through the above process, this invention successfully completed the semantic construction of the scene using a large language model, and solved the problem of spatiotemporal synchronization of multivariate collaboration using the differential evolution algorithm, realizing the transformation from text / numerical data to high-fidelity dynamic simulation scene.

[0114] The above embodiments are preferred embodiments of this application. Those skilled in the art can make various changes or improvements based on them. Without departing from the overall concept of this application, these changes or improvements should fall within the scope of protection claimed in this application.

Claims

1. A method for generating accident scenes based on a large language model and differential evolution algorithm, characterized in that, include: Obtain unstructured accident text reports of real traffic accidents and structured accident numerical data ; Will and Input a large language model and infer scene feature vectors of traffic accidents through thought chains. Select several parameters to be optimized from the scene feature vector and determine the optimization space for each parameter. An improved differential evolution algorithm is used to optimize the parameter vector to obtain the optimal scenario parameter set for traffic accidents. The convergence scaling factor in the improved differential evolution algorithm is dynamically determined by a large language model based on the convergence trend of the current population diversity in the differential evolution algorithm.

2. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, The unstructured accident text report Sourced from the accident report; The structured accident numerical data Data is derived from event data loggers or roadside sensing devices, including vehicle speed time series, peak acceleration, and collision point coordinates.

3. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, The scene feature vector This includes key logical parameters before and after a traffic accident: road topology, types of traffic participants, participants' driving direction, behavioral intentions, traffic control status, conflict triggering relationships, environmental conditions, and accident results.

4. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, The parameters to be optimized are selected based on the type of traffic accident and the key conflict process.

5. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, An improved differential evolution algorithm is used to optimize the parameter vector, specifically including: Step 3.1: Use individuals to represent the set of parameters to be optimized, sample and generate an initial population within the optimization space of the set of parameters to be optimized, and calculate the fitness function of each individual; Step 3.2, Mutation Operation: For any population in generation G, the mutation operation is performed on the [missing information - likely a specific generation number]. target individuals Generate mutated individuals ; ; in, Three distinct individuals are randomly selected from the current G-generation population, and all three individuals are related to the target individual. different; To converge the scaling factor, a large language model is adopted and the results are given based on the dispersion of the population distribution in the normalized parameter space, the decrease in fitness values ​​over several consecutive generations, the proportion of unexecutable scenarios or semantic default scenarios, and according to preset prompting rules. Step 3.3, Crossover Operation: Generating Experimental Individuals ; ; in, For test individuals The j-th parameter to be optimized; For mutated individuals The j-th parameter to be optimized For target individuals The j-th parameter to be optimized; For the j-th parameter to be optimized in A random number that is uniformly distributed within an interval; Indicates the crossover probability; The dimension index is randomly selected; Step 3.4, the test individuals The data is decoded into a standard traffic scenario description file, input into an autonomous driving simulation engine, and the initial states and triggering logic of traffic participants are set in the simulation engine. Dynamic simulation is then performed to generate trajectory data. and collision event information; Step 3.5, Calculate the experimental individuals The fitness function value; Step 3.6, Select Operations and Iterations: ; in, Indicates the first The first generation Individual, and Representing the test individuals and target individuals The fitness function value; Step 3.7: Repeat steps 3.2 to 3.6 until the preset convergence condition is met. The set of parameters to be optimized corresponding to the individual with the best fitness function value in the current population is the optimal scenario parameter set.

6. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, individual fitness function The terms include numerical fitting error, text semantic consistency, and incident threshold, and are expressed as follows: ; in, , , These represent the numerical fitting error, text semantic consistency, and accident threshold of individual X, respectively. The weight coefficients for the numerical fitting error term, the text semantic consistency term, and the accident threshold term are respectively, satisfying... .

7. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 6, characterized in that, Numerical fitting error By comparing simulated trajectories with real numerical data The Euclidean distance is expressed as: ; in, , Representing simulated trajectories and actual numerical data respectively. The Middle The location coordinates of each time point This represents the total number of sampling time points; Textual semantic consistency Calculating text reports using a multimodal encoder Representation of Simulation Scenes Semantic distance representation: ; in, This represents a multimodal feature extractor used to convert text into vectors; is the cosine similarity function, used to measure the directional consistency between two vectors in the semantic space; Accident threshold It is used to measure whether a simulated scenario presents a high-risk state close to an accident or actual collision, and is based on a penalty term constructed from minimum TTC, PET, minimum relative distance, or collision marker.

8. The accident scene generation method based on a large language model and differential evolution algorithm according to claim 1, characterized in that, Improve the crossover probability in the differential evolution algorithm by using a large language model and based on scene feature vectors. The complexity of the scenario is assessed, and the determination is made by combining simulation feedback from the previous generation or evaluated populations.