Dangerous scene acceleration test method based on AI Agent

By using an AI Agent-driven automated closed-loop process and leveraging large language models and TPE algorithms to optimize parameter search, the problem of uneven scene coverage in autonomous driving testing has been solved, enabling efficient generation and verification of hazardous scenarios.

CN121859445APending Publication Date: 2026-04-14JIANGSU CAERI AUTOMOTIVE ENG RES INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing autonomous driving testing methods suffer from high scenario repetition rates and uneven risk distribution in simulation testing, making it difficult to efficiently cover extreme or rare dangerous scenarios. Furthermore, they lack an automated closed-loop process from natural language to simulation execution, resulting in low testing efficiency.

Method used

An AI Agent-driven method for accelerating testing of dangerous scenarios is adopted. By parsing natural language intent through a large language model and combining scene feature variable parsing tools and the TPE algorithm, an automated closed loop from intent to simulation execution is achieved, and parameter search is dynamically optimized to generate high-risk scenarios.

Benefits of technology

It significantly improves the testing coverage and verification efficiency of autonomous driving systems, reduces human error, enhances the efficiency and coverage of generating hazardous scenarios, and has cross-platform adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859445A_ABST
    Figure CN121859445A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent driving vehicle scene testing, and discloses an AI Agent-based dangerous scene acceleration testing method, which comprises the following steps of: inputting an original simulation scene and a natural language requirement, and analyzing through a large language model to generate a structured task instruction; the AI Agent analyzes the scene file according to the instruction, extracts key variables and standardizes the key variables; dividing a sample set based on historical risk degree scores, constructing a probability model of dangerous and non-dangerous samples by adopting a TPE algorithm, carrying out preferential sampling according to a danger model to generate a parameter combination, modifying an original scene file according to the parameter combination, and obtaining candidate dangerous scenes; executing the candidate scene through a simulation engine and collecting test data; calculating a safety index and a risk degree score, and dynamically updating a TPE sample pool and a sampling strategy by the AI Agent according to the score to form risk-oriented adaptive closed-loop optimization; and circularly executing until an iteration termination condition is met, and outputting a final dangerous scene set. According to the invention, the test coverage and verification efficiency of the automatic driving system can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent driving vehicle scenario testing technology, specifically to an accelerated testing method for dangerous scenarios based on AI Agent. Background Technology

[0002] With the rapid development of autonomous driving technology, functional safety (GB / T 34590) and expected functional safety (GB / T43267) have become important components of industry standards. In the development and verification of autonomous driving systems, the identification and coverage testing of hazardous scenarios are crucial for ensuring vehicle safety performance. Traditional hazardous scenario testing mainly relies on the following two methods: Firstly, real-vehicle road testing. By driving long distances on open roads or test tracks, some dangerous scenarios can be exposed under conditions close to real-world usage. This method is relatively safe, but the testing cost is extremely high, and it is constrained by time, location, and safety, making it difficult to cover extreme or rare dangerous scenarios within a limited mileage.

[0003] Secondly, simulation-based scenario playback. By using predefined scenario scripts and parameter combinations, typical working conditions are exhaustively or randomly searched, and batch playback tests are conducted using a simulation platform. This method has advantages such as good repeatability and relatively low cost, but it usually relies on manually setting scenario parameter grids or simple random sampling, which can easily lead to high scenario repetition rates, uneven distribution of risk levels, and a low proportion of high-risk scenarios, resulting in a significant waste of simulation resources.

[0004] To improve the efficiency of proactively discovering hazardous scenarios in simulation testing, researchers have recently attempted to introduce methods such as reinforcement learning and Bayesian optimization to accelerate testing. These methods aim to accelerate the testing process by constructing surrogate models to proactively explore high-risk regions in the parameter space. However, these methods generally have the following limitations: First, the optimization process usually only focuses on the structured parameter space and lacks the ability to understand the test engineer's natural language task description, making it difficult to achieve automatic mapping and reasoning from test intent to scenario parameters; second, existing sampling strategies are mostly based on a single distribution or a simple improved heuristic strategy, lacking differentiated modeling of "hazardous samples" and "non-hazardous samples," making it difficult to focus on high-risk regions while ensuring diversity, resulting in insufficient exploration of the hazardous scenario space and slow convergence speed.

[0005] On the other hand, with the promotion of open scene description standards such as OpenSCENARIO and OpenDRIVE, scene files contain multi-source heterogeneous fields such as road geometry, environmental conditions, and traffic participant behavior. Existing methods mostly use scripting to directly modify a small number of parameter fields, lacking a systematic scene feature variable parsing and mapping mechanism. A unified abstract representation from the original scene file to a "generalizable key parameter space" has not yet been established, making it difficult to support consistent dangerous scene generalization search across scenes and platforms.

[0006] Furthermore, current applications of Large Language Models (LLMs) in autonomous driving testing are mostly limited to text generation or document-assisted analysis, and a complete solution for "automatic scheduling simulation toolchains of AI agents driven by large language models" has not yet been formed. Existing technologies generally require testers to manually switch between multiple software programs to translate test intentions into specific scripts and parameters, and then manually submit simulation tasks and analysis results. The automation level of the process is low, making it difficult to form a closed loop from natural language prompts to simulation execution, risk assessment, and parameter optimization. This severely restricts the speed and intelligence level of test iterations and cannot meet the urgent need for autonomous driving systems to conduct efficient and automated verification of massive amounts of hazardous scenarios. Summary of the Invention

[0007] This invention aims to provide an AI Agent-based method for accelerating testing in dangerous scenarios. It can achieve a closed-loop automated scheduling and decision-making process from high-level testing intent to low-level simulation execution, hazard assessment, and parameter optimization. This helps to improve the efficiency of acquiring high-risk scenarios and significantly improves the test coverage and verification efficiency of autonomous driving systems.

[0008] The basic solution provided by this invention is: a method for accelerating testing in dangerous scenarios based on AI agents, comprising the following steps: S1. Obtain the original scene file of autonomous driving simulation and obtain the scene generalization requirements described by the user in natural language; input the original scene file and the scene generalization requirements into the large language model for semantic parsing to generate structured scene generalization task instructions; S2. In response to the scene generalization task instruction, the AI ​​Agent calls the scene feature variable parsing tool to perform structured parsing on the original scene file, extract the preset key scene variables and convert them into standardized feature variables for parameter generalization search; wherein, the key scene variables include at least road geometry, environmental conditions and the movement state of traffic participants; S3. The AI ​​Agent divides the samples into dangerous sample sets and non-dangerous sample sets based on the hazard scores in historical simulation results; based on the TPE algorithm, it constructs a first probability model for the dangerous sample set and a second probability model for the non-dangerous sample set; it performs priority sampling based on the first probability model to generate multiple sets of candidate parameter combinations; it replaces the parameters in the original scene file based on the candidate parameter combinations to generate a generalized candidate dangerous scene file. S4. By calling the tool through the simulation test platform, the candidate hazardous scenario file is input into the autonomous driving simulation engine to execute the simulation, and the vehicle motion state data, trajectory data and collision records output by the simulation are collected. S5. Based on the data output by S4, calculate the safety indicators and risk scores of the current candidate dangerous scenarios; the AIAgent dynamically updates the sample pool of the TPE algorithm, adjusts the probability model, and the distribution strategy for the next round of parameter sampling according to the risk score, so as to form a risk-oriented adaptive closed-loop optimization process. S6. Repeat steps S3 to S5 until the generated hazardous scenarios meet the preset iteration termination conditions, and output the final set of hazardous scenarios.

[0009] The working principle and advantages of this invention are as follows: This invention presents an accelerated testing method for hazardous scenarios based on AI agents. It achieves fully automated scheduling and decision-making closed-loop processes from high-level testing intent to low-level simulation execution, hazard assessment, and parameter optimization. This helps improve the efficiency of acquiring high-risk scenarios and significantly enhances the test coverage and verification efficiency of autonomous driving systems. The key points are: First, this solution achieves a highly intelligent and automated closed-loop testing process, fundamentally changing the traditional reliance on extensive manual intervention and fragmented tool operations in hazardous scenario testing. Specifically, by introducing a large language model as a natural language interface, this solution enables test engineers to directly define test intentions using intuitive semantic descriptions. The system can automatically parse these intentions and transform them into executable task instructions. More importantly, the independently running AIAgent in this solution acts as the core scheduler, autonomously driving the sequential operation and information flow of tool modules such as scenario parsing, parameter generalization, simulation execution, and risk assessment based on task instructions and real-time feedback. This constructs an automated closed loop of intent input, scenario generation, simulation evaluation, and optimization feedback, completely eliminating repetitive work such as manually writing scripts, configuring parameters, submitting jobs, and summarizing results. This significantly reduces errors and inconsistencies caused by manual operation, greatly improving the reliability and iteration speed of the testing process.

[0010] Secondly, this scheme achieves a qualitative improvement in the efficiency of active search and generation of hazardous scenarios. Instead of employing traditional uniform sampling or single-model optimization methods, this scheme creatively applies the TPE algorithm to distinguish and model the conditional probabilities of hazardous and non-hazardous samples. It prioritizes sampling based on the distribution of hazardous samples. This risk-oriented adaptive sampling strategy guides search resources to quickly focus on potentially high-risk areas in the parameter space, significantly improving the efficiency and coverage of hazardous scenario generation and greatly saving simulation computational resources.

[0011] Third, this solution possesses strong versatility, scalability, and engineering practicality. By designing standardized scene feature variable parsing tools and key variable mapping tables, it can perform structured parsing of complex scene files conforming to open standards such as OpenSCENARIO, abstracting a unified, platform-independent key parameter space, ensuring broad adaptability to different initial scenarios and different simulation engines (such as Carla, VTD, etc.). Simultaneously, the modular architecture centered on the AI ​​Agent allows various functional components (such as parsing tools and invocation tools) to work collaboratively in a loosely coupled manner. It can be deployed on single-machine, cluster, or cloud simulation platforms and supports the expansion of more external tool modules, making it suitable for various application scenarios such as intelligent driving testing, risk verification, and scene library construction. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of the architecture of an embodiment of the AI ​​Agent-based method for accelerating testing in dangerous scenarios according to the present invention; Figure 2 This is a schematic diagram of the hazard parameter generalization process based on the TPE algorithm in an embodiment of the hazard scenario accelerated testing method based on AI Agent of the present invention; Figure 3 This is a schematic diagram of the closed-loop optimization process of scenario risk assessment and simulation feedback in an embodiment of the AI ​​Agent-based accelerated testing method for dangerous scenarios according to the present invention. Figure 4 This is an example diagram of the typical hazardous scenario generation result of an embodiment of the hazardous scenario acceleration testing method based on AI Agent of the present invention. Detailed Implementation

[0013] The following detailed explanation illustrates the specific implementation methods: The basic implementation examples are as follows: Figure 1 , Figure 2 , Figure 3 As shown: A method for accelerating testing in dangerous scenarios based on AI agents, including the following steps: S1. Obtain the original scene file for autonomous driving simulation and obtain the scene generalization requirements described by the user in natural language; input the original scene file and the scene generalization requirements into a large language model for semantic parsing to generate structured scene generalization task instructions.

[0014] The original scenario files for autonomous driving simulation include scenario description files conforming to the OpenSCENARIO standard and road description files conforming to the OpenDRIVE standard; the scenario generalization requirements describe the hazardous conditions, parameter variation ranges, or risk types to be tested using natural language.

[0015] Specifically, users provide two inputs through a graphical interface or command-line interface: 1) the original scene file for autonomous driving simulation, which is usually a .xosc file conforming to the OpenSCENARIO format standard and its associated OpenDRIVE.xodr road file; 2) a piece of natural language text describing the test intent, such as: "Based on the current following scenario, generalize to generate a dangerous scenario in which the target vehicle decelerates at 5-15 m / s² within 50-100 meters in front of the vehicle, until a rear-end collision may occur", "For this straight-ahead intersection scenario, generalize to generate a dangerous situation in which an oncoming vehicle turning left suddenly accelerates and cuts in front of the vehicle when it is approaching", etc.

[0016] The AI ​​Agent packages the original scene file and natural language text, and calls a pre-configured large language model service (e.g., accessing models such as GPT-4 and ChatGLM deployed in the cloud or locally via API). Specifically, the AI ​​Agent formats the original natural language description according to a predefined prompt word template and submits it to the large language model. In this embodiment, the set prompt word template can be: "You are an autonomous driving test expert. Please convert the following test requirements into structured task instructions. The original scene description is: [Natural Language Text]. Please extract the key intents, including: the main vehicle / target vehicle identifier to be generalized, the names of parameters to be adjusted (such as speed, acceleration, distance), the expected range of parameter changes, and the expected hazard type (such as rear-end collision, side collision). Output in JSON format."

[0017] After analyzing the text, the large language model outputs a structured task instruction. The AI ​​Agent receives this instruction and uses it as a structured scene generalization task instruction. This instruction transforms ambiguous natural language into explicit, machine-readable guidance. For example, it explicitly specifies that the "initial lateral distance" of "oncoming left-turning vehicles" should be generalized within the range of [10, 30] meters, and its "acceleration" within the range of [2, 5]. Internal changes.

[0018] S2. In response to the scene generalization task instruction, the AI ​​Agent calls the scene feature variable parsing tool to perform structured parsing on the original scene file, extract the preset key scene variables and convert them into standardized feature variables for parameter generalization search; wherein, the key scene variables include at least road geometry, environmental conditions and the movement state of traffic participants.

[0019] The scene feature variable parsing tool is pre-set with a key variable mapping table, which is used to establish the mapping relationship between the original fields in the original scene file and the standardized feature variables, and supports the parsing and transformation of fields with hierarchical structure and condition triggering logic; the AI ​​Agent automatically constructs a parameter space for TPE algorithm search based on the mapping relationship.

[0020] In practical applications, the scene feature variable parsing tool first performs syntax and structure checks on the input .xosc and .xodr files to ensure their integrity and validity. Then, it performs in-depth parsing based on a predefined key variable mapping table stored in the configuration file.

[0021] The key variable mapping table clearly defines the correspondence between complex XML node paths and standardized feature variable names in the OpenSCENARIO / OpenDRIVE file in an entry-based format, as shown in Table 1. For example, a specific XML node path describing the initial speed of the target vehicle in the file is mapped to a continuous variable, and its default unit and reasonable range are recorded. The scene feature variable parsing tool traverses this key variable mapping table, uses XML parsing technology to locate each target node in the original file, extracts its value or attribute, and thus generates a set containing all key feature variables.

[0022] Table 1 Example of mapping relationship

[0023] Preferably, the scene feature variable parsing tool can incorporate the constraints of the scene generalization task instruction in S1. If the instruction requires generalizing the "target vehicle speed" within the range of [25, 35], the scene feature variable parsing tool will override the original default range of that variable in the key variable mapping table.

[0024] Ultimately, the scene feature variable parsing tool outputs two key pieces of information to the AI ​​Agent: first, the baseline feature variable set for the current scene (containing all extracted values), and second, the definition of the generalizable parameter space for this test (clearly defining the type, boundaries, and constraints of each parameter to be optimized). Based on this, the AI ​​Agent constructs a formalized parameter space for the optimization algorithm to search.

[0025] S3. The AI ​​Agent divides the samples into dangerous sample sets and non-dangerous sample sets based on the hazard score H in the historical simulation results (for example, based on a preset threshold (such as 0.75), samples with a hazard score greater than or equal to the threshold are assigned to the dangerous sample set, and the rest are assigned to the non-dangerous sample set); based on the TPE algorithm, it constructs a first probability model for the dangerous sample set and a second probability model for the non-dangerous sample set respectively; it performs priority sampling based on the first probability model to generate multiple sets of candidate parameter combinations; and it replaces the parameters of the original scene file based on the candidate parameter combinations to generate a generalized candidate dangerous scene file.

[0026] In this embodiment, the construction of the first probability model and the second probability model based on the TPE algorithm is specifically as follows: The first probability density function is formed by estimating the parameter space region corresponding to the dangerous sample set using the TPE algorithm. The second probability density function is formed by estimating the parameter space region corresponding to the non-dangerous sample set. ; The priority sampling is based on the acquisition ratio. To proceed, so as to tend to be in the first probability density function High value (high probability of danger) Parameters are collected from areas with low values ​​(low safety probability). Typical generalized parameters include: vehicle speed. Relative distance Environmental parameters (weather, light), etc.

[0027] Finally, select the N parameter combinations (e.g., N=5) that maximize this ratio as candidate parameter combinations for this iteration.

[0028] Finally, the AI ​​Agent invokes the scene file generator. The scene file generator receives each set of candidate parameters and the original .xosc file template. Based on the key variable mapping table used in S2, it performs a reverse operation to precisely locate the parameter pairs and write them into the corresponding XML nodes of the .xosc file, replacing the original values. This process generates a new scene file conforming to the OpenSCENARIO standard for each set of candidate parameters; these files are the candidate hazardous scene files to be simulated.

[0029] S4. Using a simulation testing platform, the candidate hazardous scenario file is input into the autonomous driving simulation engine to execute the simulation, and the vehicle motion state data, trajectory data, and collision records output by the simulation are collected. The autonomous driving simulation engine includes at least one of esmini, Carla, and VTD.

[0030] Specifically, the AI ​​Agent uses a simulation testing platform to call tools and submits the generated candidate hazardous scenario files to the autonomous driving simulation engine for batch simulation. The simulation testing platform calls tools to construct the correct engine start command, pass the scenario file path, and set the necessary simulation parameters (such as simulation step size and output frequency).

[0031] The autonomous driving simulation engine runs each scenario independently, simulating vehicle dynamics, sensor perception, and traffic behavior. During the simulation, the engine records and outputs detailed time-series log data at a preset frequency (e.g., 100Hz). The simulation calling tool monitors the engine process and automatically collects the output files after the simulation ends. The simulation output data to be collected mainly includes three categories: 1) Vehicle motion state time series: Parsing the logs to obtain the lateral and longitudinal coordinates, velocity, acceleration, heading angle, etc. of the driver, target vehicle, and other participants at each simulation moment; 2) Trajectory data: The above state sequences essentially constitute the motion trajectories of each participant; 3) Collision records: Judging and recording whether a collision occurred, the time of occurrence, and the objects involved from the simulation engine's special event logs or by analyzing the distance between vehicles.

[0032] All raw simulation data are organized and associated with specific parameter combinations that generated the scenario, forming a structured data package, which is output in CSV or JSON format.

[0033] S5. Based on the data output by S4, calculate the safety indicators and risk scores of the current candidate dangerous scenarios; the AIAgent dynamically updates the sample pool of the TPE algorithm, adjusts the probability model, and the distribution strategy for the next round of parameter sampling according to the risk score, so as to form a risk-oriented adaptive closed-loop optimization process.

[0034] Specifically, the security indicators include at least the minimum time interval. Minimum collision time and collision tags The risk score is obtained by normalizing the safety indicators and then performing a weighted fusion calculation based on preset weights.

[0035] The risk rating is defined as follows: ; in, The weights are adjustable.

[0036] The AI ​​Agent dynamically adjusts the distribution strategy for the next round of parameter sampling based on the risk score, including: When the risk score remains above a preset threshold When the value is 0.75, the parameter sampling range is narrowed and the sampling density is increased to perform a local fine search; when the risk score is not obtained above the preset threshold for multiple consecutive rounds (e.g., 3 consecutive rounds), the parameter sampling range is expanded (e.g., the speed range is expanded by 20%) or random perturbation is introduced to perform a global exploration.

[0037] In the adaptive closed-loop optimization process, the AI ​​Agent constructs a balanced strategy for parameter space exploration and utilization based on the historical risk score sequence from multiple iterations; specifically including: Calculate the variance or gradient of the risk score in recent iterations (e.g., the last 10 rounds). When the variance is consistently below the first threshold, it is determined to be in a convergence state, triggering a regional expansion of the current parameter sampling distribution (e.g., symmetrically expanding its search boundary by a certain proportion on the original basis) or introducing a new random sampling dimension (e.g., based on the scene feature analysis results, randomly select one parameter from those currently not included in generalization but potentially affecting risk, such as lighting angle, road friction coefficient fine-tuning, etc., and add it to the optimization space, setting a reasonable initial range for it, thereby changing the structure of the search space and escaping the original local optimum). When the variance is higher than the second threshold, it is determined to be in an exploration state, maintaining or increasing the sampling ratio based on the first probability model.

[0038] The first and second thresholds are set by the testers based on actual testing needs.

[0039] S6. Repeat steps S3 to S5 until the generated hazardous scenarios meet the preset iteration termination condition, and output the final set of hazardous scenarios, such as... Figure 4 As shown.

[0040] The preset iteration termination condition includes at least one of the following: The number of dangerous scenarios generated reaches a preset value (e.g., 100).

[0041] When the coverage of a hazardous scenario in a preset parameter space reaches a threshold, for example, based on the grid coverage of the parameter space, the coverage ratio of the current set of hazardous scenarios in the preset parameter space is calculated, and the process terminates when the ratio exceeds a preset threshold C (e.g., 80%).

[0042] After a set number of iterations, the risk score no longer increases significantly. That is, in the most recent K iterations (e.g., 15 iterations), the number of newly discovered scenarios with risk scores significantly higher than historical records (e.g., a 20% increase in score) is zero, indicating that the search has converged.

[0043] The AI ​​Agent runs in an agent framework independent of the large language model. It maintains a task state machine to manage the entire task state from intent parsing to result output. Based on the feedback from S5, it adaptively schedules the execution logic and calling order of each tool module in S2 to S5.

[0044] This embodiment provides an AI Agent-based method for accelerating testing of hazardous scenarios, which can realize a closed-loop automated scheduling and decision-making process from high-level testing intent to low-level simulation execution, hazard assessment and parameter optimization. This helps to improve the efficiency of acquiring high-risk scenarios and significantly improve the test coverage and verification efficiency of autonomous driving systems.

[0045] The above descriptions are merely embodiments of the present invention. Commonly known structures and characteristics of the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent.

Claims

1. A method for accelerating testing in dangerous scenarios based on AI agents, characterized in that, Includes the following steps: S1. Obtain the original scene file for autonomous driving simulation and obtain the scene generalization requirements described by the user in natural language; input the original scene file and the scene generalization requirements into a large language model for semantic parsing to generate structured scene generalization task instructions; S2. In response to the scene generalization task instruction, the AI ​​Agent calls the scene feature variable parsing tool to perform structured parsing on the original scene file, extract the preset key scene variables, and convert them into standardized feature variables for parameter generalization search; wherein, the key scene variables include at least road geometry, environmental conditions, and the movement state of traffic participants; S3. The AI ​​Agent divides the samples into dangerous sample sets and non-dangerous sample sets based on the hazard scores in historical simulation results; based on the TPE algorithm, it constructs a first probability model for the dangerous sample set and a second probability model for the non-dangerous sample set; it performs priority sampling based on the first probability model to generate multiple sets of candidate parameter combinations; it replaces the parameters in the original scene file based on the candidate parameter combinations to generate a generalized candidate dangerous scene file. S4. By calling the tool through the simulation test platform, the candidate hazardous scenario file is input into the autonomous driving simulation engine to execute the simulation, and the vehicle motion state data, trajectory data and collision records output by the simulation are collected. S5. Based on the data output by S4, calculate the safety indicators and risk scores of the current candidate dangerous scenarios; the AIAgent dynamically updates the sample pool of the TPE algorithm, adjusts the probability model, and the distribution strategy for the next round of parameter sampling according to the risk score, so as to form a risk-oriented adaptive closed-loop optimization process. S6. Repeat steps S3 to S5 until the generated hazardous scenarios meet the preset iteration termination conditions, and output the final set of hazardous scenarios.

2. The method for accelerating testing in dangerous scenarios based on AI Agents according to claim 1, characterized in that, In S1, the original scene file for autonomous driving simulation includes a scene description file conforming to the OpenSCENARIO standard and a road description file conforming to the OpenDRIVE standard; The scenario generalization requirement describes the hazardous conditions, parameter variation range, or risk type to be tested using natural language.

3. The method for accelerating testing in dangerous scenarios based on AI Agents according to claim 1, characterized in that, In S2, the scene feature variable parsing tool has a pre-set key variable mapping table, which is used to establish the mapping relationship between the original fields in the original scene file and the standardized feature variables, and supports the parsing and transformation of fields with hierarchical structure and condition triggering logic; the AI ​​Agent automatically constructs a parameter space for TPE algorithm search based on the mapping relationship.

4. The method for accelerating testing in dangerous scenarios based on AI Agents according to claim 1, characterized in that, In S3, the construction of the first probability model and the second probability model based on the TPE algorithm is specifically as follows: The first probability density function is formed by estimating the parameter space region corresponding to the dangerous sample set using the TPE algorithm. The second probability density function is formed by estimating the parameter space region corresponding to the non-dangerous sample set. ; The priority sampling is based on the acquisition ratio. Perform, so as to tend to be in the first probability density function Collect parameters from areas with high values.

5. The method for accelerating testing in dangerous scenarios based on AI Agent according to claim 1, characterized in that, In S4, the autonomous driving simulation engine includes at least one of esmini, Carla, and VTD.

6. The method for accelerating testing in dangerous scenarios based on AI Agents according to claim 1, characterized in that, In S5, the safety indicators include at least the minimum time distance, the minimum collision time, and the collision label; the hazard score is obtained by normalizing the safety indicators and then performing a weighted fusion calculation based on preset weights.

7. The method for accelerating testing in dangerous scenarios based on AI Agent according to claim 1, characterized in that, In S5, the AI ​​Agent dynamically adjusts the distribution strategy for the next round of parameter sampling based on the risk score, including: When the risk score is consistently higher than a preset threshold, the parameter sampling range is narrowed and the sampling density is increased to perform a local fine search; when a risk score higher than the preset threshold is not obtained in several consecutive rounds, the parameter sampling range is expanded or random perturbations are introduced to perform a global exploration.

8. The method for accelerating testing in dangerous scenarios based on AI Agents according to claim 1, characterized in that, In the S5 adaptive closed-loop optimization process, the AI ​​Agent constructs a balanced strategy for parameter space exploration and utilization based on the historical risk score sequence from multiple iterations; specifically including: Calculate the variance or gradient of the recent iteration risk score. When the variance is consistently below the first threshold, it is determined to be in a convergence state, triggering a regional expansion of the current parameter sampling distribution or introducing a new random sampling dimension. When the variance is above the second threshold, it is determined to be in an exploration state, maintaining or increasing the sampling ratio based on the first probability model.

9. The method for accelerating testing in dangerous scenarios based on AI Agent according to claim 1, characterized in that, The AI ​​Agent runs in an agent framework independent of the large language model. It maintains a task state machine to manage the entire task state from intent parsing to result output. Based on the feedback from S5, it adaptively schedules the execution logic and calling order of each tool module in S2 to S5.

10. The method for accelerating testing in dangerous scenarios based on AI Agent according to claim 1, characterized in that, In S6, the preset iteration termination condition includes at least one of the following: The number of generated hazardous scenarios reaches the preset value; the coverage of hazardous scenarios in the preset parameter space reaches the threshold; and the hazard score no longer increases after a set number of iterations.