Test file generation method and device, electronic equipment and medium

By generating autonomous driving test scenarios based on structured description information of behavior trees, the problems of low efficiency and poor accuracy in test file generation in existing technologies are solved, and efficient and accurate test file generation is achieved.

CN120803931APending Publication Date: 2025-10-17QINGKE LINGJING (ANHUI) TECHNOLOGY CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510906197.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing description information of autonomous driving test scenarios lacks clear behavioral logic, resulting in low efficiency and poor accuracy in test file generation, making it difficult to directly convert it into executable code for the simulation platform.

Method used

By using structured description information based on behavior trees, accident reports are obtained, and multiple nodes of the behavior tree are used to describe the autonomous driving test scenario and generate test files.

Benefits of technology

The accuracy and executability of test file generation are improved, the number of modifications is reduced, and the efficiency of test file generation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803931A_ABST
    Figure CN120803931A_ABST
Patent Text Reader

Abstract

The invention provides a test file generation method and apparatus, an electronic device and a medium. The test file generation method comprises the steps of obtaining an accident report of a vehicle; wherein the accident report is a process of describing a vehicle accident by using a natural language; determining structured description information based on a behavior tree based on the accident report; wherein the structured description information is used for describing the process of the automatic driving test scene by utilizing a plurality of nodes of a behavior tree; generating a test file based on the structured description information; wherein the test file is used for simulating an automatic driving test scene. According to the technical scheme, the accuracy and the performability of test file generation can be improved, and the generation efficiency of the test file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of simulation testing of autonomous driving, in particular to a test file generation method and device, an electronic device and a medium. BACKGROUND

[0002] Autonomous driving refers to the ability of a vehicle to travel without human intervention through the use of artificial intelligence, sensors and other technologies. Vehicles can utilize autonomous driving systems to achieve autonomous driving.

[0003] In order to test the reliability and safety of the autonomous driving system in the scenario where a traffic accident may occur, an autonomous driving test scenario can be designed, which is a simulated scenario where a traffic accident may occur. In this autonomous driving test scenario, it can be evaluated whether the autonomous driving vehicle can respond safely and effectively when facing potential dangers or complex traffic conditions. If the reliability and safety of the autonomous driving system in the scenario where a traffic accident may occur are weak through testing, potential defects in the autonomous driving system can be identified and corrected to prevent dangerous situations for the vehicle on the actual road.

[0004] In the prior art, a large language model is first used to generate test scenario description information corresponding to the autonomous driving test scenario, and then the test scenario description information is converted into executable code on the simulation platform. However, the test scenario description information generated in the foregoing technology lacks clear behavior logic, making it difficult to directly convert the test scenario description information into executable code on the simulation platform. The conversion process may involve multiple modifications, resulting in low efficiency in the test preparation stage. Moreover, multiple modifications may result in low accuracy of the finally generated executable code. SUMMARY

[0005] The embodiments of the present application provide a test file generation method, device, electronic device and medium, which can improve the accuracy and executability of test file generation, and improve the generation efficiency of test files.

[0006] To achieve the above-mentioned purpose, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a test file generation method is provided, comprising: obtaining an accident report of a vehicle; wherein the accident report describes the process of a vehicle accident in natural language; determining a structured description information based on a behavior tree based on the accident report; wherein the structured description information describes the process of an autonomous driving test scenario using multiple nodes of a behavior tree; generating a test file based on the structured description information; wherein the test file is used to simulate the autonomous driving test scenario.

[0008] In this application, structured description information uses multiple nodes of a behavior tree to describe the process of an autonomous driving test scenario. Since the logic between the nodes of the behavior tree is relatively clear, the structured description information is highly logical, which can improve the accuracy and executability of test file generation. In addition, the aforementioned conversion process involves fewer or even no modifications, thereby improving the efficiency of test file generation.

[0009] In combination with the first aspect, in one possible design approach, structured description information based on a behavior tree is determined based on an accident report, including: determining test scenario description information for an autonomous driving test scenario based on the accident report; wherein the test scenario description information is a process of describing the autonomous driving test scenario in natural language; and determining structured description information based on a behavior tree based on the test scenario description information.

[0010] In this application, by first obtaining the test scenario description information, we can more clearly sort out the logical relationships and hierarchical structure between the various behaviors in the accident. During the test scenario description stage, we can classify and sort the behaviors in the accident report, clarifying which behaviors are primary and secondary, which behaviors occur in parallel and which occur sequentially, and so on. This provides a basis for the appropriate division of nodes and branches when constructing the behavior tree, making the structure of the structured description information based on the behavior tree more consistent with the actual logic of the accident behavior.

[0011] In combination with the first aspect, in a possible design method, determining structured description information based on a behavior tree based on test scenario description information includes: based on a first preset prompt word, controlling the preset model to determine structured description information based on the behavior tree based on the test scenario description information.

[0012] In this embodiment, based on the first preset prompt word, the control preset model determines the structured description information based on the behavior tree based on the test scenario description information, and can generate structured description information that is more compliant with the specification.

[0013] In combination with the first aspect, in a possible design method, generating a test file based on structured description information includes: determining a code interface of each of multiple nodes in the structured description information; and generating a test file based on the code interface.

[0014] In this embodiment, the multiple nodes in the structured description information are relatively clear. By searching for the corresponding code interface for each of the multiple nodes in the structured description information, repeated searches for the corresponding code interface for the nodes can be avoided, thereby improving the efficiency of generating the test file.

[0015] In combination with the first aspect, in a possible design method, the code interface of each of the multiple nodes in the structured description information is determined, including: dividing the node content of each of the multiple nodes according to function and obtaining a corresponding functional description; based on the functional description, querying the code interface that matches the functional description from a preset database; wherein the preset database includes a mapping relationship between the functional description and the code interface.

[0016] In this embodiment, structured description information uses multiple nodes of a behavior tree to describe the process of an autonomous driving test scenario, which is conducive to designing a serialized scenario execution process. The node content of each of the multiple nodes is divided according to function and a corresponding functional description is obtained. The corresponding code interface is queried, which can improve the accuracy of code matching and the efficiency of test file generation.

[0017] In combination with the first aspect, in a possible design method, the node content of each node in the multiple nodes is divided according to function and a corresponding functional description is obtained, including: based on the second preset prompt word, controlling the preset model to divide the node content of each node in the multiple nodes according to function and obtain a corresponding functional description.

[0018] In this embodiment, the prompt word plays a key guiding and controlling role in the language model. Based on the second preset prompt word, the preset model is controlled to divide the node content of each of the multiple nodes according to function and generate corresponding functional descriptions. This can make the generated functional descriptions more accurate and improve the matching rate between the functional descriptions and the code interface.

[0019] In combination with the first aspect, in a possible design method, a code interface that matches the functional description is queried from a preset database based on the functional description, including: determining a corresponding vector to be matched based on the functional description; matching a code interface corresponding to the vector to be matched from the preset database based on the vector to be matched; wherein the preset database includes a mapping relationship between the vector and the code interface, and the vector is used to represent the functional description of the code interface.

[0020] In this embodiment, by dividing the node content of each node in multiple nodes according to function and obtaining the corresponding function description, and then obtaining the corresponding vector, the corresponding code interface can be matched more quickly based on the vector, which can improve the efficiency and accuracy of matching from the preset database to the corresponding code interface.

[0021] In combination with the first aspect, in a possible design method, generating a test file based on a code interface includes: generating a target code based on node content and the code interface; and constructing a test file based on multiple target codes of multiple nodes.

[0022] In the present application, the target code can be generated based on the node content and the code interface, and the accuracy of the test file can be improved.

[0023] In combination with the first aspect, in a possible design, the test scene description information of the automatic driving test scene is determined based on the accident report, including: obtaining target information from the accident report; wherein the target information is information used to create the automatic driving test scene; and determining the test scene description information of the automatic driving test scene based on the target information.

[0024] In the present application, the accident report includes detailed information of the accident, which provides more accurate information for generating the automatic driving test scene description information subsequently, and the actual accident data in the accident report can help generate a test scene closer to the real world, improving the effectiveness and reliability of the test.

[0025] In combination with the first aspect, in a possible design, the target information is obtained from the accident report, including: obtaining first accident information from the accident report; wherein the first accident information is obtained from the accident report; obtaining second accident information based on the accident report; wherein the second accident information is derived from the content in the accident report; and determining the first accident information and the second accident information as the target information.

[0026] In the present application, there are useful information extracted from the accident report and supplementary information derived from the accident report, which can obtain rich target information to improve the accuracy of the test scene description information and improve the accuracy of the test file.

[0027] In combination with the first aspect, in a possible design, the first accident information is obtained from the accident report, and the second accident information is obtained based on the accident report, including: controlling a preset model to obtain the first accident information from the accident report and obtain the second accident information based on the accident report based on a third preset prompt word.

[0028] In the present application, the prompt word plays a key guiding and controlling role in the model, and the third preset prompt word can control the preset model to obtain more accurate first accident information and second accident information.

[0029] The second aspect provides a test file generation apparatus, including: an obtaining module, configured to obtain an accident report of a vehicle; wherein the accident report describes a process of a vehicle accident in a natural language; a determining module, configured to determine structured description information based on a behavior tree based on the accident report; wherein the structured description information describes a process of an automatic driving test scene by using multiple nodes of the behavior tree; and a generating module, configured to generate a test file based on the structured description information; wherein the test file is used to simulate the automatic driving test scene.

[0030] In a third aspect, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions, wherein the processor is configured to execute the test file generation method according to any possible design of the first aspect.

[0031] In a fourth aspect, a computer-readable storage medium is provided, which stores instructions, when the instructions are executed on a computer, causing the computer to execute the test file generation method according to any possible design of the first aspect.

[0032] In a fifth aspect, a computer program product is provided, which comprises a computer program, when the computer program is executed by a processor of a computer device, causing the computer device to execute the test file generation method according to any possible design of the first aspect.

[0033] The technical effects brought by any design of the second aspect to the fifth aspect can refer to the technical effects brought by different designs of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 Fig. 1 shows a scenario diagram provided by an example embodiment of the present application;

[0035] Figure 2 Fig. 2 shows a flow diagram of a test file generation method provided by an example embodiment of the present application;

[0036] Figure 3 Fig. 3 shows a flow diagram of a test file generation method provided by another example embodiment of the present application;

[0037] Figure 4 Fig. 4 shows a structural diagram of a test file generation apparatus provided by an example embodiment of the present application;

[0038] Figure 5 Fig. 5 shows a structural diagram of an electronic device provided by an example embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0040] SUMMARY

[0041] As described in the background art above, in the existing technology, the efficiency of the test preparation stage is low, and the accuracy of the generated executable code is low.

[0042] In response to the above technical problems, an embodiment of the present application provides a test file generation method, which includes: obtaining an accident report that describes the process of a vehicle accident in natural language; then, determining structured description information based on a behavior tree based on the accident report, where the structured description information uses multiple nodes of the behavior tree to describe the process of an autonomous driving test scenario; then, generating a test file based on the structured description information, where the test file is used to simulate the autonomous driving test scenario.

[0043] In the embodiment of the present application, the structured description information uses multiple nodes of a behavior tree to describe the process of the autonomous driving test scenario. Since the logic between the nodes of the behavior tree is relatively clear, the structured description information is highly logical, which can improve the accuracy and executability of test file generation. In addition, the aforementioned conversion process involves fewer or even no modifications, thereby improving the efficiency of test file generation.

[0044] Example scenarios

[0045] The test file generation method provided in the embodiments of this application can be applied to any electronic device capable of generating a test file for simulating an autonomous driving test scenario. The electronic device can be a tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, or ultra-mobile personal computer (UMPC). The embodiments of this application do not impose any particular restrictions on the specific form of the electronic device.

[0046] The following description will be given by taking a computer as an example of an electronic device. Figure 1 The following is a schematic diagram of a scenario provided by an exemplary embodiment of the present application. Figure 1 As shown, the scenario includes a computer 100 and a technician. An application for generating test files can be installed on computer 100. In response to the technician opening the application, computer 100 displays the application interface, which may include a control for generating a test file. In response to a user clicking on the control, computer 100 can obtain an accident report describing the process of a vehicle accident in natural language. Based on the accident report, computer 100 determines structured description information based on a behavior tree. This structured description information describes the process of the autonomous driving test scenario using multiple nodes of the behavior tree. Based on the structured description information, a test file is generated, which is used to simulate the autonomous driving test scenario.

[0047] The computer 100 can also be installed with simulation software. After the test file is generated, the technician can input the generated test file into the simulation software. In response to the foregoing operation of the technician, the computer 100 can run the test file in the simulation software to simulate an autonomous driving test scene and test the response capability of the test vehicle in the autonomous driving test scene.

[0048] The autonomous driving test scene can involve emergencies (such as a sudden braking of a preceding vehicle, an unexpected crossing of a pedestrian, a fast approach of a vehicle from the side, etc.), complex traffic conditions (such as traffic congestion, complex intersections, multi-lane merging, etc.), extreme weather conditions (such as rain, snow, fog, etc. affecting sensor performance and driving safety), and non-standard road users (such as drunk pedestrians, illegal vehicles, etc.).

[0049] It should be understood that the foregoing application scenario examples are only shown for the purpose of facilitating understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited thereto. On the contrary, the embodiments of the present application can be applied to any scenario that can be applicable.

[0050] Exemplary method

[0051] Figure 2 A flowchart of a test file generation method provided by an exemplary embodiment of the present application is shown. Figure 2 The method can be executed by an electronic device, such as the computer 100 in Figure 1 The computer 100 in Figure 2 As shown, the test file generation method can include the following contents:

[0052] 210: Obtain an accident report of a vehicle.

[0053] The accident report is a process of describing a vehicle accident in natural language. The content of the accident report can include the time of the accident, the location of the accident, environmental information, the course of the accident, and the consequences of the accident, but is not limited thereto.

[0054] The course of the accident includes the accident content of the involved vehicle. The involved vehicle can be distinguished by vehicle identification information, which is the identity information of the vehicle. For example, the vehicle identification information can be basic information such as the model, license plate number, and color of the vehicle. For example, the accident content can include the relative position of the vehicle and other objects (such as vehicles, guardrails), the collision site, and the collision strength. The environmental information is information describing the environmental conditions around the vehicle at the time of the accident. For example, the environmental information can include weather conditions, road conditions, traffic flow, etc. The consequences of the accident can be information about injuries to personnel and damage to vehicles, etc.

[0055] For example, the accident report can be: "On April 22, 2025, at 15:30, a red car (license plate number Beijing AX XXXX) and a white car (license plate number Beijing B XXXXX) collided on Zhongguancun Street, Haidian District, Beijing. The driver of the red car was injured and sent to the hospital.

[0056] The accident report can come from the manufacturer of the vehicle, the traffic management department, the insurance company, etc. The sensors installed on the vehicle can monitor the running state of the vehicle, such as the sensors around the vehicle such as cameras, radars, etc. can monitor the traffic flow around the vehicle, and some information in the accident report can also come from the data collected by various sensors installed on the vehicle. Specifically, the data collected by the vehicle sensors will be transmitted to the control unit of the vehicle or the cloud server through the communication system of the vehicle. In some intelligent networked vehicles, the vehicle can transmit sensor data in real time to the cloud through a wireless network, so that the manufacturer of the vehicle, the insurance company or the traffic management department, etc. can obtain these data to generate the accident report.

[0057] 220: Determine the structured description information based on the behavior tree based on the accident report.

[0058] The structured description information is to describe the process of the autonomous driving test scene using multiple nodes of the behavior tree. The execution logic of the behavior tree language is clear, and the execution order and conditions of each node are clearly defined.

[0059] Some concepts of the behavior tree are introduced below:

[0060] Node (Node): The basic unit of the behavior tree, representing a specific behavior or task.

[0061] Root node (Root Node): The starting node of the behavior tree, from which execution begins.

[0062] Parent node (Parent Node): A node that contains child nodes, used to control the execution of child nodes.

[0063] Child node (Child Node): A node contained by a parent node, which executes a specific behavior.

[0064] Decorator node (Decorator Node): A node used to modify the behavior of a child node, such as repeating execution, conditional judgment, etc.

[0065] Selector node (Selector Node): A node used to select one of multiple child nodes to execute until one of them succeeds.

[0066] Sequence node (Sequence Node): Execute all child nodes in order until one of them fails.

[0067] Parallel Node: Executes all child nodes simultaneously, determining success or failure based on conditions.

[0068] An example of a structured description of information is as follows:

[0069] Root Node: Start

[0070] Sequence Node:

[0071] Child Nodes:

[0072] Set environment (urban main road, peak hours, sunny day, daytime).

[0073] Set vehicle initial state (position, speed, driving direction, autonomous driving mode).

[0074] Set event (pedestrian crossing the road).

[0075] Selector Node:

[0076] Child Nodes:

[0077] Detect pedestrian.

[0078] Perform emergency braking.

[0079] Verify safety distance and braking performance.

[0080] Decorator Node:

[0081] Child Nodes:

[0082] Repeat test scenario until success.

[0083] Parallel Node:

[0084] Child Nodes:

[0085] Monitor vehicle state (speed, position, etc.).

[0086] Monitor environment state (traffic flow, weather conditions, etc.).

[0087] The execution logic of the above structured description of information is as follows:

[0088] Initialization Phase: Through the sequence node, the environment, vehicle initial state, and event are set in sequence.

[0089] Execution Phase: Through the selector node, the detection of pedestrians, the performance of emergency braking, and the verification of safety distance and braking performance are attempted in sequence. If any one of the child nodes fails, the selector node will attempt the next child node.

[0090] Repeat execution: Through the decorator node, the test scenario is repeatedly executed until all child nodes are successful.

[0091] Monitoring phase: Through the parallel node, the vehicle state and the environment state are monitored simultaneously to ensure that the execution of the test scenario meets the expected conditions.

[0092] The accident report is a process of describing a vehicle accident in natural language, and the accident report contains information for constructing structured description information. In an example, the accident report can be input into model 1 to convert the accident report into structured description information based on a behavior tree. The model 1 can be a pre-trained large language model.

[0093] 230: Generate a test file based on the structured description information.

[0094] In an example, the structured description information can be converted into a test file using model 2. The model 2 can be a pre-trained large language model.

[0095] In another example, model 3 has both the ability to convert the accident report into structured description information based on a behavior tree and the ability to convert the structured description information into a test file. In this way, model 3 can be used to first convert the accident report into structured description information based on a behavior tree, and then convert the structured description information into a test file.

[0096] In the embodiments of the present application, the structured description information describes the process of the autonomous driving test scenario using multiple nodes of the behavior tree. Since the logic between the nodes of the behavior tree is clear, the structured description information has high logic, which can improve the accuracy and executability of the test file generation, and the number of modifications involved in the foregoing conversion process is less or even none, improving the generation efficiency of the test file.

[0097] According to an embodiment of the present application, the structured description information based on the behavior tree is determined based on the accident report, including: determining test scenario description information of the autonomous driving test scenario based on the accident report; wherein the test scenario description information describes the process of the autonomous driving test scenario in natural language; and determining the structured description information based on the behavior tree based on the test scenario description information.

[0098] The test scenario description information describes the process of the autonomous driving test scenario in natural language. The test scenario description information can include test scenario background, vehicle state, event description, etc.

[0099] 1. Test scenario background

[0100] Running Environment: Describe the running environment of the test scenario, including road type (such as urban road, highway, rural road, etc.), traffic condition (such as peak hour, off-peak hour, congestion, smooth, etc.), weather condition (such as sunny, rainy, snowy, foggy, etc.), time (such as daytime, night, dawn, dusk, etc.).

[0101] Running Range: Clearly define the geographical range of the test scenario, such as a specific urban area, a specific road section, etc.

[0102] Other Conditions: Such as speed limit, traffic signs, traffic signals, etc.

[0103] 2. Vehicle State

[0104] Vehicle Information: Basic information of the vehicle, such as vehicle type, vehicle color, etc.

[0105] Initial State: The state of the vehicle at the beginning of the test, including the position, speed, driving direction of the vehicle, the initial configuration of the vehicle (such as automatic driving mode, manual mode, etc.).

[0106] Vehicle Function State: The functional state of the vehicle's sensors, control systems, communication equipment, etc.

[0107] 3. Event Description

[0108] Event Type: Describe the main event type in the test scenario, such as pedestrian crossing the road, vehicle changing lanes, obstacle in front, emergency braking, etc.

[0109] Event Process: Detailed description of the event process, including the cause, process and result of the event.

[0110] Event Timeline: Record the key nodes of the event in chronological order, such as event start time, event end time, etc.

[0111] Related Objects: Other objects involved in the event, such as pedestrians, other vehicles, obstacles, etc.

[0112] The following is an exemplary introduction to a test scenario description information.

[0113] Test Scenario Background:

[0114] Running Environment: Urban trunk road, traffic condition is peak hour, weather condition is sunny, time is daytime.

[0115] Running Range: Zhongguancun Street, Haidian District, Beijing.

[0116] Other Conditions: Speed limit 60 kilometers per hour, complete traffic signs.

[0117] Vehicle State:

[0118] Vehicle information: Vehicle type: Sedan, Vehicle color: White.

[0119] Initial state: The vehicle is in the middle lane of the road, the initial speed is 60 km / h, the driving direction is from north to south, and the vehicle is in autonomous driving mode.

[0120] Vehicle function status: All sensors and control systems are working normally.

[0121] Event description:

[0122] Event type: Pedestrian crossing the road.

[0123] Event process: During normal driving, a pedestrian suddenly appears in front of the vehicle crossing the road.

[0124] Event timeline: The event started at 14:00, and the pedestrian crossed from the left side of the road to the right side of the road.

[0125] Related objects: The pedestrian is about 30 years old, and the crossing speed is 5 km / h.

[0126] In an example, model 4 can be used to convert the accident report into test scenario description information for the autonomous driving test scenario; model 5 can be used to convert the test scenario description information into structured description information based on the behavior tree. The preset model 4 and the preset model 5 can be pre-trained large language models.

[0127] In another example, converting the accident report into test scenario description information for the autonomous driving test scenario and converting the test scenario description information into structured description information based on the behavior tree can be completed by one model. Specifically, model 6 can have the ability to convert the accident report into test scenario description information for the autonomous driving test scenario and the ability to convert the test scenario description information into structured description information based on the behavior tree. In this way, model 6 can be used to first convert the accident report into test scenario description information for the autonomous driving test scenario, and then convert the test scenario description information into structured description information based on the behavior tree.

[0128] The test file is used to simulate the autonomous driving test scenario. Specifically, the test file is used to simulate the autonomous driving test scenario on the simulation platform. Carla Simulator is an open-source autonomous driving simulation platform, and ScenarioRunner is a scenario simulator on Carla Simulator. The electronic device can run the test file on Carla Simulator using ScenarioRunner to achieve the purpose of simulating the autonomous driving test scenario.

[0129] In this embodiment, by obtaining the test scene description information first, the logical relationship and hierarchical structure between various behaviors in the accident can be more clearly sorted. In the test scene description stage, the behaviors in the accident report can be classified and sorted to determine which are the main behaviors, which are the secondary behaviors, which behaviors occur in parallel, which are sequential, etc. This provides a basis for reasonably dividing nodes and branches when constructing the behavior tree, making the structure of the structured description information based on the behavior tree more consistent with the actual logic of the accident behavior.

[0130] According to an embodiment of the present application, the structured description information based on the behavior tree is determined based on the test scene description information, comprising: based on the first preset prompt word, controlling the preset model to determine the structured description information based on the behavior tree based on the test scene description information.

[0131] The prompt word plays a key guiding and controlling role in the model (such as the preset model in the embodiments of the present application). It can make the model generate output that meets the requirements of the prompt word.

[0132] The first preset prompt word can include any one or more of a prompt word for decomposing and recombining the test scene description information, a prompt word for indicating that the structured description information meets the context association, a prompt word for enhancing the coherent thinking of the preset model, and a prompt word for indicating that the preset model uses the skill of role setting and task clarification.

[0133] The prompt word for decomposing and recombining the test scene description information requires the preset model to first disassemble a complex natural language scene into key components and interactions, similar to requirement analysis in system engineering, to ensure the comprehensiveness and logic of the behavior tree structure, which can improve the effect and accuracy of large language models in performing complex tasks.

[0134] For example, the content of the prompt word can be: "First, identify and outline the key components and interactions in the scene. Break down the scenario into hierarchical actions, decision points, and conditional branches". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduction is the same as the content of the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Begin by identifying and outlining the key components and interactions within the scenario. Break down the scenario into hierarchical actions, decision points, and conditional branches".

[0135] The prompt word for indicating that the structured description information is contextually related can ensure that the structured description information based on the behavior tree is logically coherent to some extent, suitable for the design of serialized scene execution, similar to the overall planning in project management, ensuring the relevance and coordination between parts.

[0136] For example, the content of the prompt word can be: "Ensure that the resulting behavior tree is comprehensive, logically coherent, and optimized for designing a serialized scene execution process". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word is expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Ensure that the resulting behavior tree is comprehensive, logically coherent, and optimized for designing a serialized scene execution process".

[0137] The prompt word for enhancing the coherent thinking of the preset model can guide the preset model to complete the task step by step and in an orderly manner, ensuring the coherence and logic of the thinking process, and avoiding missing key steps or logical loopholes. Among them, the coherent thinking can also be called chain-of-thought.

[0138] For example, the content of the prompt word can be: "First identify... then systematically search...". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word is expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Begin by identifying... then systematically search...".

[0139] The prompt words for indicating the preset model to use role setting and task-specific skills can ensure that the model understands its professional background and task requirements, thereby generating more expected output. This method is similar to role-playing in education and training, helping the model to perform best in a specific situation. For example, the content of the prompt words can be: "You are a seasoned expert..." and / or "You are an experienced software engineer...". In addition to the above Chinese expressions, the content of the prompt words can also be expressed in English, and the following exemplary introduces a prompt word which is the same as the content of the above two prompts, the difference is that the prompt word is expressed in English, for example, the English prompt words corresponding to the above two Chinese prompt words can be: "You are a seasoned expert...", "You are an experienced software engineer...",

[0140] In an example, a plurality of prompt words can be combined together to input a preset model, for example, the content of the combined prompt words can be: "You are a seasoned expert in autonomous vehicle simulations and behavior tree architecture. Your objective is to transform the following natural language description of a traffic accident scenario into a detailed and structured behavior tree. Begin by identifying and outlining the key components and interactions within the scenario. Break down the scenario into hierarchical actions, decision points, and conditional branches that accurately reflect the sequence of events and the roles of all traffic participants. Ensure that the resulting behavior tree is comprehensive, logically coherent, and optimized for designing a serialized scene execution process in a simulation environment." The content of the combined prompt words can also be expressed in English in addition to the above-mentioned Chinese expression. The following exemplary introduces a combined prompt word which has the same content as the above-mentioned prompt, the difference is that the combined prompt word is expressed in English, for example, the English combined prompt word corresponding to the aforementioned Chinese combined prompt word can be: "You are a seasoned expert in autonomous vehicle simulations and behavior tree architecture. Your objective is to transform the following natural language description of a traffic accident scenario into a detailed and structured behavior tree. Begin by identifying and outlining the key components and interactions within the scenario. Break down the scenario into hierarchical actions, decision points, and conditional branches that accurately reflect the sequence of events and the roles of all traffic participants. Ensure that the resulting behavior tree is comprehensive, logically coherent, and optimized for designing a serialized scene execution process in a simulation environment."

[0141] In this embodiment, based on the first preset prompt word (Prompt), the preset model determines the structured description information based on the behavior tree based on the test scene description information, and more standardized structured description information can be generated.

[0142] According to an embodiment of the present application, the test file is generated based on the structured description information, including: determining the code interface of each node in the plurality of nodes in the structured description information; and generating the test file based on the code interface.

[0143] In an example, one node can correspond to one code interface, and one node can also correspond to multiple code interfaces.

[0144] The code interface is used to call a code with a preset function. For example, the code with the preset function can be a code for generating environment information, a code for generating vehicle state, or a code for generating events.

[0145] For example, the subnode 1 includes:

[0146] Set the environment (urban trunk road, peak period, sunny day, daytime).

[0147] Set the initial state of the vehicle (position, speed, driving direction, automatic driving mode).

[0148] Set the event (pedestrian crossing the road).

[0149] The node content of the three functions of setting the environment, setting the initial state of the vehicle, and setting the event in the subnode 1 is described, and three code interfaces corresponding to the three functions are obtained.

[0150] The environment information can include weather, road network structure, etc. For example, if a code has the function of generating weather code, the electronic device can call the code with the function to generate weather scene code related to the automatic driving test scene. For another example, if a code has the function of generating road network structure code, the electronic device can call the code with the function to generate road network structure code related to the automatic driving test scene. The event sequence can include the behavior of the traffic participant. For example, if a code has the function of generating the behavior of the traffic participant, the electronic device can call the code with the function to generate the code of the behavior of the traffic participant related to the automatic driving test scene.

[0151] In this embodiment, the plurality of nodes in the structured description information are clear, and the corresponding code interface can be found according to each node in the plurality of nodes in the structured description information, which can avoid repeated searching for the corresponding code interface of the node and improve the generation efficiency of the test file.

[0152] According to an embodiment of the present application, the code interface of each node in the plurality of nodes in the structured description information is determined, including: dividing the node content of each node in the plurality of nodes according to functions and obtaining corresponding function descriptions; querying a code interface matching the function description from a preset database based on the function description; wherein the preset database includes a mapping relationship between the function description and the code interface.

[0153] If the node content of each node in the plurality of nodes is divided according to functions to obtain node content of one function, the function is described, and a code interface matching the function description is queried from the database based on the function description. If the node content of each node in the plurality of nodes is divided according to functions to obtain node content of a plurality of functions, the plurality of functions are respectively described, and a code interface matching each function description is queried from the database based on each function description to obtain a plurality of code interfaces corresponding to the plurality of functions.

[0154] In the embodiment, the structured description information is used to describe the process of the automatic driving test scene by the plurality of nodes of the behavior tree, which is beneficial to design the serialized scene execution process, and the node content of each node in the plurality of nodes is divided according to functions and corresponding function descriptions are obtained, and a corresponding code interface is queried, which can improve the accuracy of code matching and improve the generation efficiency of the test file.

[0155] According to an embodiment of the present application, the node content of each node in the plurality of nodes is divided according to functions and corresponding function descriptions are obtained, including: based on a second preset prompt word, controlling a preset model to divide the node content of each node in the plurality of nodes according to functions and obtain corresponding function descriptions.

[0156] The second preset prompt word can include any one or more of a prompt word for identifying a key element and a prompt word for indicating that the preset model obtains a code interface meeting a preset specification.

[0157] The prompt word for identifying the key element can require the preset model to systematically analyze the structured description information based on the behavior tree to identify the key element, i.e., the element divided according to the function, which is similar to the function module division in software engineering, which to some extent ensures that each element can query a corresponding code segment or code interface.

[0158] For example, the content of the prompt word can be: "First, identify key elements by analyzing the behavior tree, such as road network configuration, traffic participant behavior, and environmental settings". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word is expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Start by analyzing the behavior tree to identify essential elements such as road network configurations, traffic participant behaviors, and environmental settings".

[0159] The prompt word for indicating that the preset model obtains a code interface conforming to the preset specification draws on the code review and optimization process in software development, ensuring that the matching code not only fits functionally, but also meets high standards in coding specifications and integration.

[0160] For example, the content of the prompt word can be: "Ensure that the selected code snippets are compatible, follow best coding practices, and can be seamlessly integrated into the simulation environment". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word is expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Ensure that the selected code snippets are compatible, follow best coding practices, and can be seamlessly integrated into the simulation environment".

[0161] In this embodiment, the prompt word plays a key guiding and controlling role in the language model. Based on the second preset prompt word, the control preset model divides the node content of each node in the plurality of nodes according to the function and obtains the corresponding function description, which can make the generated function description more accurate and improve the matching rate of the function description and the code interface.

[0162] According to an embodiment of the present application, the code interface matched with the function description is queried from the preset database based on the function description, including: determining the corresponding vector to be matched based on the function description; and matching the corresponding code interface of the vector to be matched from the preset database based on the vector to be matched; wherein the preset database includes a mapping relationship between the vector and the code interface, and the vector is used to represent the function description of the code interface.

[0163] In the embodiment, the node content of each node in the plurality of nodes is divided according to functions to obtain corresponding function descriptions, and then corresponding vectors are obtained. The corresponding code interface can be matched based on the vectors, and the efficiency and accuracy of matching the corresponding code interface from the preset database can be improved.

[0164] According to an embodiment of the present application, the test file is generated based on the code interface, including: generating a target code based on the node content and the code interface; and constructing the test file based on the plurality of target codes of the plurality of nodes.

[0165] In an example, the code interface can be called to obtain the code of the corresponding function, and the corresponding target code is generated using the code of the corresponding function. The plurality of targets are constructed into a test file. Further, in an example, the preset model can be controlled to construct the plurality of targets into a test file based on a preset prompt word. The preset prompt word can include any one or more of a prompt word for implementing role allocation and plot construction in a simulation scenario, a prompt word for constructing a behavior process of a traffic participant and clearly reproducing the process of an accident, a prompt word for constructing a hypothetical scenario, and a prompt word for constructing decision information for responding to an accident in a hypothetical scenario.

[0166] The prompt word for implementing role allocation and plot construction in a simulation scenario draws on narrative analysis and system modeling methods, explicitly assigns an autonomous vehicle a role that needs to respond, and constructs a plot of cause and effect chain to describe how the behavior of one or more traffic participants directly leads to an accident, thereby enhancing the logic and coherence of the scene.

[0167] For example, the content of the prompt can be: "Assign the ego to the individual who must react, make a story of someone or some others did something on the road, then one must react to the action". In addition to the above Chinese expression, the content of the prompt can also be expressed in English, and the following exemplary introduces a prompt with the same content as the above prompt, the difference is that the prompt is expressed in English, for example, the English prompt corresponding to the aforementioned Chinese prompt can be: "assign the role of ego to the one that must react, make a story of someone or some others did something on the road, then one must react to the action".

[0168] The prompt for constructing the behavior process of traffic participants and clearly reproducing the process of the accident occurrence adopts the behavior tree and serialization modeling technology, which requires the system to list all major actions and maneuvers in order and identify each action using a short name. This ordered description helps to clearly reproduce the process of the accident occurrence, and combined with the behavior tree structure, it effectively designs and manages the complex scene execution flow, ensuring the systematicness and controllability of the test scene.

[0169] For example, the content of the prompt can be: "List all major actions, maneuvers especially, of all traffic participants in a sequential order using a short name for each action". In addition to the above Chinese expression, the content of the prompt can also be expressed in English, and the following exemplary introduces a prompt with the same content as the above prompt, the difference is that the prompt is expressed in English, for example, the English prompt corresponding to the aforementioned Chinese prompt can be: "list all major actions, maneuvers especially, of all traffic participants in a sequential order using a short name for each action".

[0170] The prompt for constructing the hypothetical scenario is used to test the reaction ability and decision accuracy of the autonomous driving system in emergency situations through the constructed hypothetical scenario, and to test the algorithm robustness of the vehicle.

[0171] For example, the content of the prompt word can be: "construct a hypothetical scenario, whether the accident can be avoided if the ego vehicle takes certain actions". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "formulate a what-if scenario that if the ego vehicle would done so, the crash would be avoided".

[0172] The content of the prompt word for constructing decision information to deal with the accident in the hypothetical scenario can be "imagine you are the ego vehicle that is travelling on the road. You are telling the story of all the environment and critical actions happens in the scene until exactly that an urgent crash may happen to you and let you make the critical decision what to do next." In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduces a prompt word with the same content as the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "imagine you are the ego vehicle that is travelling on the road. You are telling the story of all the environment and critical actions happens in the scene until exactly that an urgent crash may happen to you and let you make the critical decision what to do next".

[0173] In an example, the second preset prompt and the prompt in this embodiment can be combined and input into a preset model, for example, the content of the combined prompt can be: "review the accident report involving multiple road users. Your task is to transform this accident report into a safety-critical scenario that can be used to test an autonomous vehicle (self-vehicle). First, you perform a proximate cause analysis of the report. Then, you describe the role of the proximate cause road user and tell a story of someone or some people doing something on the road that must be reacted to. Your story ends at the time of the accident, and what happens after the accident is not relevant to this story. The failure to react to the behavior ultimately led to the accident. Second, you assign an autonomous vehicle to the individual who must react. Third, you list all significant behaviors of the road users in order, especially various operational actions, and use a short name for each behavior. Even if key factors such as vehicle speed and environmental conditions are not explicitly mentioned in the report, they should be inferred. Exclude any unnecessary details to ensure that the scenario is concise and operable. After the above analysis, you will construct a hypothetical scenario, i.e., if the self-vehicle takes a certain action, the accident will be avoided. Now, based on the hypothetical scenario analysis, imagine you are the self-vehicle driving on the road. You are telling all the environmental conditions and key behaviors that occur in the scenario until an emergency situation occurs, which may cause you to have an accident. Then you need to make a key decision on what to do next."

[0174] The content of the combination prompt words can also be expressed in English in addition to the Chinese expression described above. The following exemplary introduces a combination prompt word expressed in English which is the same as the content of the above prompt, the difference is that the combination prompt word is expressed in English. For example, the English combination prompt word corresponding to the aforementioned Chinese combination prompt word can be: "Review the crash report involving multiple traffic participants. Your task is to transcript this crash report into a safety-critical scenario that can be used to test an autonomous driving vehicle (the ego vehicle). First, you conduct a proximate cause analysis of the report. After that, you describe the role of proximate cause traffic participant, and making a story of someone or some others did something on the road, then one must react to the action. Your story ends at the crash, and anything happened after the crash is irrelevant. A failing of reacting to the action then end up with the crash. Second, you assign the role of ego to the one that must react. Third, you list all major actions, maneuvers especially, of all traffic participants in a sequential order using a short name for each action. Infer critical factors like vehicle speed and environmental conditions, even if these are not explicitly mentioned in the report."Exclude any unnecessary details to ensure the scenario is straightforward and actionable. After the above analysis, you will formulate a what-if scenario that if the ego vehicle would done so, the crash would be avoided. Now, based on the what-if scenario analysis, imagine you are the ego vehicle that is travelling on the road. You are telling the story of all the environment and critical actions happens in the scene until exactly that an urgent crash may happen to you and let you make the critical decision what to do next.

[0175] In this embodiment, the target code can be generated based on the node content and the code interface, and thus the accuracy of the test file can be improved.

[0176] According to an embodiment of the present application, the test scene description information of the automatic driving test scene is determined based on the accident report, including: obtaining target information from the accident report; wherein the target information is information used to create an automatic driving test scene; and determining the test scene description information of the automatic driving test scene based on the target information.

[0177] The target information is information used to create an automatic driving test scene. The target information can be extracted and / or derived from the accident report. The target information can include the time of the accident, the location of the accident, environmental information, the course of the accident, the speed before the vehicle collision, etc.

[0178] In this embodiment, the accident report includes detailed information of the accident, which provides more accurate information for subsequent generation of automatic driving test scene description information, and the actual accident data in the accident report can help to generate a test scene closer to the real world, improving the effectiveness and reliability of the test.

[0179] According to an embodiment of the present application, the target information is obtained from the accident report, including: obtaining first accident information from the accident report; wherein the first accident information is obtained from the accident report; obtaining second accident information based on the accident report; wherein the second accident information is derived from the content of the accident report; and determining the first accident information and the second accident information as the target information.

[0180] The first accident information is data useful for constructing the test file extracted from the accident report, and the useful data includes the time, location, vehicle type involved, collision angle and position, road type of the traffic accident, number of lanes of the road of the traffic accident, type and number of participants of the traffic accident, relative position of each participant before the traffic accident, movement direction of each participant before the traffic accident, movement speed of each participant before the traffic accident, movement trend of each participant, time of the traffic accident, weather condition at the time of the traffic accident, collision angle and position after the traffic accident, etc.

[0181] The second accident information can be data not in the accident report, which is supplementary data, including key data such as the speed of the vehicle before the collision.

[0182] In the embodiment, both useful information extracted from the accident report and supplementary information derived from the accident report are obtained, so that rich target information can be obtained to improve the accuracy of the test scene description information and further improve the accuracy of the test file.

[0183] According to an embodiment of the present application, the first accident information is obtained from the accident report, and the second accident information is obtained based on the accident report, including: based on a third preset prompt word, controlling a preset model to obtain the first accident information from the accident report, and obtaining the second accident information based on the accident report.

[0184] The third preset prompt word can include a prompt word for instructing the preset model to obtain the first accident information, a prompt word for instructing the preset model to obtain the second accident information, and a prompt word for instructing the preset model to remove information irrelevant to the construction of the test file.

[0185] The prompt word for indicating that the preset model obtains the first accident information is designed to identify the direct cause of the accident by comprehensively reviewing the accident report involving multiple traffic participants. Through this design, the core factors affecting the accident can be accurately extracted, avoiding the interference of secondary details, thereby improving the authenticity and pertinence of the simulation scene. For example, the two instructions of "Review the crash report involving multiple traffic participants" and "conduct a proximate cause analysis of the report",

[0186] For example, the content of the prompt word can be: "Review the crash report involving multiple traffic participants, conduct a proximate cause analysis of the report". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduction is one that is the same as the content of the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Review the crash report involving multiple traffic participants, conduct a proximate cause analysis of the report".

[0187] The prompt information for indicating that the preset model obtains the second accident information can guide the preset model to infer and complete key factors such as vehicle speed and environmental conditions even if they are not explicitly mentioned in the accident report, which can ensure the completeness and authenticity of the scene to a certain extent. For example, the content of the prompt word can be: "Infer critical factors like vehicle speed and environmental conditions, even if these are not explicitly mentioned in the report". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduction is one that is the same as the content of the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Infer critical factors like vehicle speed and environmental conditions, even if these are not explicitly mentioned in the report".

[0188] The prompt information for indicating that the preset model removes information irrelevant to the construction of the test file can remove details irrelevant to the automatic test scene reconstruction, such as personnel injury and vehicle damage, keep the scene focused and intuitive, ensure that the generated test scene is simple, facilitate subsequent implementation and analysis, and improve the efficiency and effectiveness of the test.

[0189] For example, the content of the prompt word can be: "Exclude any unnecessary details to ensure the scenario is straightforward and actionable". In addition to the above Chinese expression, the content of the prompt word can also be expressed in English, and the following exemplary introduction is one of the same content as the above prompt, the difference is that the prompt word expressed in English, for example, the English prompt word corresponding to the aforementioned Chinese prompt word can be: "Exclude any unnecessary details to ensure the scenario is straightforward and actionable".

[0190] In this embodiment, the prompt word plays a key guiding and controlling role in the model, and the third preset prompt word and the fourth preset prompt word can control the preset model to obtain more accurate first accident information and second accident information.

[0191] The above-mentioned preset database can be generated based on the fourth preset prompt word. Specifically, the fourth preset prompt word is input into the model 7, and based on the second prompt word, the model 7 is controlled to generate the functional description of the code interface and the corresponding vector, and then generate the mapping relationship between the vector and the code interface in the database. The code interface

[0192] The fourth preset prompt word includes a prompt word for instructing the model 7 to adopt the skill of role setting and task definition, a prompt word for instructing the model 7 to generate the functional description and the corresponding vector, a prompt word for instructing the model 7 to provide different functional descriptions for different types of codes, a prompt word for instructing the model 7 to adopt the standard in the process of converting the functional description into the vector, and a prompt word for enhancing the coherent thinking of the model 7.

[0193] The prompt word for instructing the model 7 to adopt the skill of role setting and task definition can ensure that the model 7 understands its professional background and specific task to some extent, and this setting helps the model to use the professional knowledge in the relevant field in the process of generating the description and vectorization, thereby improving the accuracy and relevance of the output.

[0194] For example, the content of the prompt can be: "You are a senior software engineer with extensive experience in autonomous vehicle simulations and advanced code analysis." In addition to the above Chinese expression, the content of the prompt can also be expressed in English, and the following exemplary introduces a prompt with the same content as the above prompt, the difference is that the prompt is expressed in English, for example, the English prompt corresponding to the aforementioned Chinese prompt can be: "You are a senior software engineer with extensive experience in autonomous vehicle simulations and advanced code analysis."

[0195] The prompt for indicating that the model 7 generates the function description and the corresponding vector divides the overall task into two main parts: "Supplementary Description" and "Vectorization". The supplementary description is the function description.

[0196] The prompt for indicating that the model 7 provides different function descriptions for different types of code. In the supplementary description part, the context association technique is adopted, which requires the model 7 to provide unique and detailed function descriptions for different types of code interfaces (based on expert experience, deterministic model and non-deterministic model based on learning algorithm). Ensure the comprehensiveness of the description, and improve the pertinence and depth of the description by emphasizing the specific characteristics of each type of code interface. For example, for "learning algorithm", the prompt focuses on "adaptive behaviors" and "interactions", which are directly related to the core characteristics of this type of code, ensuring that the description accurately reflects its function and purpose.

[0197] The prompt words for indicating the standards adopted by the model 7 in the process of converting the function description into vectors, in the vectorization part, adopt systematic analysis and best practice following techniques to guide the model to convert the detailed description into a vectorized representation suitable for efficient code matching and storage. By explicitly stating that "the vector length is adjustable based on specific scene application requirements", it ensures the flexibility and adaptability of the vectorization process, similar to feature engineering in data science, ensuring that the vector can effectively represent key features for subsequent code matching. In addition, it emphasizes "the vector should effectively capture the essence of the code's functionality", ensuring that the vector not only meets technical requirements, but also has practical application feasibility and efficiency, similar to unit testing and integration testing in software development, ensuring the quality and reliability of the output results.

[0198] The prompt words for enhancing the coherent thinking of the model 7 guide the model to complete the task in a logical order. For example, through distributed instructions, it ensures that the model 7 smoothly transitions to the vectorization process after the supplementary description, avoiding information omission or logical breaks.

[0199] In an example, the above-mentioned various prompt words can be combined and input into a pre-set model. For example, the content of the combined prompt words can be: "You are a senior software engineer with rich experience in autonomous driving simulation and advanced code analysis. Your task is to enhance and vectorize the following code snippets in our code base.

[0200] For each code snippet, please perform the following tasks:

[0201] 1. Supplementary description:

[0202] Road network structure: used to describe the road layout, including intersections, traffic signals, road types, and any unique infrastructure elements.

[0203] Traffic participant behavior: used to describe the actions, decision-making processes, and interactions of all traffic participants such as vehicles, pedestrians, and cyclists.

[0204] Environmental information: used to describe the simulated environmental conditions, including weather, lighting, road surface conditions, and other related factors.

[0205] Code type-specific features:

[0206] Expertise-based code: Highlighting rule-based behavior, predefined scenarios, and scenarios derived from expert knowledge.

[0207] Deterministic model-based code: Emphasizing predictable and repeatable behavior controlled by mathematical and statistical models.

[0208] Learning algorithm-based non-deterministic model code: Focus on adaptive behavior influenced by machine learning algorithms, allowing for changes and learning from interactions.

[0209] 2. Vectorization:

[0210] - Convert the supplementary description into a numerical vector representation, which can encompass key features related to road networks, traffic behavior, and environmental context.

[0211] Ensure that the vector length can be adjusted according to the application requirements of specific scenarios, maintaining flexibility for various matching scenarios.

[0212] The vector should effectively capture the essence of the code's functionality to enable accurate and efficient code matching in our vectorized code library.

[0213] Please follow the format below:

[0214] Code type: [Expertise-based code / Deterministic model-based code / Learning algorithm-based non-deterministic model code]

[0215] Supplementary description: [A comprehensive natural language description focusing on road network structure, traffic participant behavior, and environmental information, tailored according to the specific code type.]

[0216] Vectorized representation: [Encapsulating numerical vectors that describe key features, with adjustable length as needed.]

[0217] This set of combination prompts can be expressed in English in addition to the Chinese expressions mentioned above. For example, the English version of the aforementioned combination prompts can be: "You are a senior software engineer with extensive experience in autonomous vehicle simulations and advanced code analysis. Your mission is to enhance and vectorize the following code snippets from our repository.

[0218] For each code snippet, perform the following tasks:

[0219] 1. Supplementary Description:

[0220] - Road Network Structure: Provide a detailed description of the road layout, including intersections, traffic signals, road types, and any unique infrastructure elements.

[0221] - Traffic Participant Behaviors: Elaborate on the actions, decision-making processes, and interactions of all traffic participants such as vehicles, pedestrians, and cyclists.

[0222] - Environmental Information: Describe the simulated environmental conditions, including weather, lighting, road surface conditions, and any other relevant factors.

[0223] - Code Type-Specific Characteristics:

[0224] - Expert Experience-Based Code: Highlight rule-based behaviors, predefined scenarios, and scenarios derived from expert knowledge.

[0225] -Deterministic Model-Based Code:Emphasize predictable and repeatablebehaviors governed by mathematical and statistical models.

[0226] -Learning Algorithm-Based Non-Deterministic Model Code:Focus onadaptive behaviors influenced by machine learning algorithms,allowingvariability and learning from interactions.

[0227] 2.Vectorization:

[0228] -Convert the comprehensive description into a numerical vectorrepresentation that encapsulates the key features related to road networks,traffic behaviors,and environmental contexts.

[0229] -Ensure that the vector length is adjustable based on specific sceneapplication requirements,maintaining flexibility for various matchingscenarios.

[0230] -The vector should effectively capture the essence of the code’sfunctionality to facilitate precise and efficient code matching within ourvectorized code library.

[0231] Please format your output as follows:

[0232] Code Type: [Expert Experience-Based Code / Deterministic Model-Based Code / Learning Algorithm-Based Non-Deterministic Model Code]

[0233] Description: [Comprehensive natural language description focusing on road network structure, traffic participant behaviors, and environmental information, tailored to the specific code type.]

[0234] Vectorized Representation: [Numerical vector encapsulating the key features of the description, with adjustable length as required.]

[0235] Figure 3 The flowchart of the test file generation method provided by another exemplary embodiment of the application is shown. Figure 3 The embodiments are Figure 2 Examples of the embodiments, to avoid repetition, the same can refer to the description in the above embodiments, here will not be repeated. For example Figure 3 As shown, the test file generation method can include the following steps.

[0236] 310: Obtain an accident report of a vehicle; wherein the accident report is a natural language description of the process of the vehicle accident;

[0237] 320: Obtain target information from the accident report; wherein the target information is information used to create an autonomous driving test scene;

[0238] 330: Determine test scene description information of the autonomous driving test scene based on the target information; wherein the test scene description information is a natural language description of the process of the autonomous driving test scene;

[0239] 340: Determine behavior tree-based structured description information based on the test scene description information; wherein the structured description information is a description of the process of the autonomous driving test scene using multiple nodes of the behavior tree.

[0240] 350: Determine a code interface for each of the multiple nodes in the structured description information;

[0241] 360: Generates test files based on the code interface; the test files are used to simulate autonomous driving test scenarios.

[0242] Exemplary devices

[0243] Figure 4 The figure shows a schematic diagram of the structure of a test file generating device provided by an exemplary embodiment of the present application. Figure 4 As shown, the test file generating device 400 includes: an acquisition module 410 , a determination module 420 and a generation module 430 .

[0244] An acquisition module 410 is configured to obtain a vehicle accident report, wherein the accident report is a natural language description of the process of the vehicle accident. A determination module 420 is configured to determine, based on the accident report, structured description information based on a behavior tree, wherein the structured description information describes the process of an autonomous driving test scenario using multiple nodes of the behavior tree. A generation module 430 is configured to generate a test file based on the structured description information, wherein the test file is used to simulate an autonomous driving test scenario.

[0245] An embodiment of the present application provides a test file generation device. Structured description information uses multiple nodes of a behavior tree to describe the process of an autonomous driving test scenario. Since the logic between the nodes of the behavior tree is relatively clear, the structured description information is highly logical, which can improve the accuracy and executability of test file generation. In addition, the aforementioned conversion process involves few or no modifications, thereby improving the efficiency of test file generation.

[0246] According to one embodiment of the present application, a determination module 420 is configured to determine test scenario description information for an autonomous driving test scenario based on an accident report; wherein the test scenario description information is a process of describing the autonomous driving test scenario in natural language; and determine structured description information based on a behavior tree based on the test scenario description information.

[0247] According to an embodiment of the present application, the determination module 420 is configured to control the preset model to determine structured description information based on the behavior tree based on the test scenario description information based on the first preset prompt word.

[0248] According to an embodiment of the present application, the generation module 430 is used to determine the code interface of each node in the multiple nodes in the structured description information; generate a test file based on the code interface

[0249] According to an embodiment of the present application, the code interface of each node in the plurality of nodes in the structured description information is determined, comprising: dividing the node content of each node in the plurality of nodes according to functions and obtaining corresponding function descriptions; querying the code interface matching the function description from a preset database based on the function description; wherein the preset database comprises a mapping relationship between the function description and the code interface.

[0250] According to an embodiment of the present application, the node content of each node in the plurality of nodes is divided according to functions and corresponding function descriptions are obtained, comprising: based on the second preset prompt word, controlling the preset model to divide the node content of each node in the plurality of nodes according to functions and obtain corresponding function descriptions.

[0251] According to an embodiment of the present application, the code interface matching the function description is queried from the preset database based on the function description, comprising: determining the corresponding to-be-matched vector based on the function description; matching the corresponding code interface of the to-be-matched vector from the preset database based on the to-be-matched vector; wherein the preset database comprises a mapping relationship between the vector and the code interface, and the vector is used to represent the function description of the code interface.

[0252] According to an embodiment of the present application, the generation module 430 is configured to generate a target code based on the node content and the code interface; and construct a test file based on the plurality of target codes of the plurality of nodes.

[0253] According to an embodiment of the present application, the test scene description information of the automatic driving test scene is determined based on the accident report, comprising: obtaining target information from the accident report; wherein the target information is information used to create the automatic driving test scene; and determining the test scene description information of the automatic driving test scene based on the target information.

[0254] According to an embodiment of the present application, the target information is obtained from the accident report, comprising: obtaining first accident information from the accident report; wherein the first accident information is obtained from the accident report; obtaining second accident information based on the accident report; wherein the second accident information is derived from the content in the accident report; and determining the first accident information and the second accident information as the target information.

[0255] According to an embodiment of the present application, the first accident information is obtained from the accident report, and the second accident information is obtained based on the accident report, comprising: based on a third preset prompt word, controlling a preset model to obtain the first accident information from the accident report and obtain the second accident information based on the accident report.

[0256] It should be understood that the operations and functions of the acquisition module 410, the determination module 420, and the generation module 430 in the above embodiments can refer to the above Figure 2 or Figure 3The description in the image processing method provided in the embodiments will not be repeated here to avoid repetition.

[0257] Figure 5 Fig. 1 shows a structural schematic diagram of an electronic device according to an example embodiment of the present application. As shown in the example, the electronic device 100 includes a processor 101 and a memory 102, wherein the memory 102 stores executable program code 103, and the processor 101 is configured to invoke and execute the executable program code 103 to perform the test file generation method provided by the embodiments of the present application. Figure 5 As shown in the example, the electronic device 500 includes a processor 501 and a memory 502, wherein the memory 502 stores executable program code 503, and the processor 501 is configured to invoke and execute the executable program code 503 to perform the test file generation method provided by the embodiments of the present application.

[0258] The embodiments can divide the functional modules of the electronic device according to the above method examples, for example, each functional module can be provided, or two or more functions can be integrated in one processing module, and the integrated module can be implemented in the form of hardware. It should be noted that the division of the modules in the embodiments is illustrative, and is only a logical functional division, and another division mode can be used in actual implementation.

[0259] The embodiments of the present application also provide a non-transitory computer readable storage medium, when the instructions in the storage medium are executed by the processor of the above-mentioned electronic device 500, the electronic device 500 can execute the test file generation method provided by any of the above-mentioned embodiments.

[0260] The embodiments of the present application also provide a computer program product, the computer program product includes a computer program, when the computer program is executed by the processor of the computer device, the computer device can execute the test file generation method provided by any of the above-mentioned embodiments.

[0261] All the optional technical solutions described above can be combined to form optional embodiments of the present application, and will not be repeated here.

[0262] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0264] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0265] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0266] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0267] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program check codes.

[0268] It should be noted that, in the description of this application, the terms "first," "second," "third," etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0269] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0270] The above only shows the preferred embodiments of the present application and is not used to limit the present application. Any modification, equivalent replacement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A test file generation method, characterized in that: include: Obtaining a vehicle accident report; wherein the accident report is a description of the vehicle accident process in natural language; Determining, based on the accident report, structured description information based on a behavior tree; wherein the structured description information describes a process of an autonomous driving test scenario using multiple nodes of the behavior tree; A test file is generated based on the structured description information; wherein the test file is used to simulate an autonomous driving test scenario.

2. The test file generation method according to claim 1, characterized in that: Determining the structured description information based on the behavior tree based on the accident report includes: Determining test scenario description information for the autonomous driving test scenario based on the accident report; wherein the test scenario description information is a process of describing the autonomous driving test scenario in natural language; Determine behavior tree-based structured description information based on the test scenario description information.

3. The test file generation method according to claim 2, characterized in that: The determining, based on the test scenario description information, structured description information based on the behavior tree includes: Based on the first preset prompt word, the control preset model determines structured description information based on the behavior tree based on the test scenario description information.

4. The test file generation method according to claim 1, characterized in that: Generating a test file based on the structured description information includes: Determining a code interface of each of the plurality of nodes in the structured description information; A test file is generated based on the code interface.

5. The test file generation method according to claim 4, characterized in that: The determining of a code interface for each of the plurality of nodes in the structured description information includes: Dividing the node content of each node in the plurality of nodes according to function and obtaining a corresponding functional description; Based on the functional description, a code interface matching the functional description is searched from a preset database; wherein the preset database includes a mapping relationship between the functional description and the code interface.

6. The test file generation method according to claim 5, characterized in that: The node content of each of the multiple nodes is divided according to function and a corresponding functional description is obtained, including: Based on the second preset prompt word, the preset model is controlled to divide the node content of each node in the multiple nodes according to function and obtain a corresponding functional description.

7. The test file generation method according to claim 5, characterized in that: The step of querying a code interface matching the functional description from a preset database based on the functional description includes: Determining a corresponding vector to be matched based on the functional description; Based on the vector to be matched, a code interface corresponding to the vector to be matched is matched from the preset database; wherein the preset database includes a mapping relationship between the vector and the code interface, and the vector is used to represent a functional description of the code interface.

8. The test file generation method according to claim 4, characterized in that: Generating a test file based on the code interface includes: generating a target code based on the node content and the code interface; A test file is constructed based on the plurality of target codes of the plurality of nodes.

9. The test file generation method according to claim 1, characterized in that: Determining test scenario description information for the autonomous driving test scenario based on the accident report, including: Obtaining target information from the accident report; wherein the target information is information used to create an autonomous driving test scenario; Determine test scenario description information for the autonomous driving test scenario based on the target information.

10. The test file generation method according to claim 9, characterized in that: Obtain target information from the incident report, including: Obtaining first accident information from the accident report; wherein the first accident information is obtained from the accident report; Obtaining second accident information based on the accident report; wherein the second accident information is derived from the content of the accident report; The first accident information and the second accident information are determined as target information.

11. The test file generation method according to claim 10, characterized in that: The obtaining of first accident information from the accident report and obtaining second accident information based on the accident report includes: Based on the third preset prompt word, controlling the preset model to obtain first accident information from the accident report; Based on the fourth preset prompt word, the preset model is controlled to derive the second accident information from the content of the accident report.

12. A test file generating device, characterized in that: include: An acquisition module is used to acquire a vehicle accident report; wherein the accident report is a description of the vehicle accident process in natural language; a determination module, configured to determine, based on the accident report, structured description information based on a behavior tree; wherein the structured description information describes a process of an autonomous driving test scenario using multiple nodes of the behavior tree; A generation module is used to generate a test file based on the structured description information; wherein the test file is used to simulate an autonomous driving test scenario.

13. The test file generating device according to claim 12, wherein the determining module is configured to determine the test scenario description information of the autonomous driving test scenario based on the accident report; The test scenario description information is a process of describing the autonomous driving test scenario in natural language; Determine behavior tree-based structured description information based on the test scenario description information.

14. The test file generating device according to claim 13, characterized in that: The determining, based on the test scenario description information, structured description information based on the behavior tree includes: Based on the first preset prompt word, the control preset model determines structured description information based on the behavior tree based on the test scenario description information.

15. The test file generating device according to claim 12, characterized in that: Generating a test file based on the structured description information includes: Determining a code interface of each of the plurality of nodes in the structured description information; A test file is generated based on the code interface.

16. The test file generating device according to claim 15, characterized in that: The determining of a code interface for each of the plurality of nodes in the structured description information includes: Dividing the node content of each node in the plurality of nodes according to function and obtaining a corresponding functional description; Based on the functional description, a code interface matching the functional description is searched from a preset database; wherein the preset database includes a mapping relationship between the functional description and the code interface.

17. The test file generating device according to claim 16, characterized in that: The node content of each of the multiple nodes is divided according to function and a corresponding functional description is obtained, including: Based on the second preset prompt word, the preset model is controlled to divide the node content of each node in the multiple nodes according to function and obtain a corresponding functional description.

18. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor, The processor is configured to execute the test file generation method according to any one of claims 1 to 11.

19. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the test file generation method according to any one of claims 1 to 11.

20. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor of a computer device, the computer device is enabled to execute the test file generating method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Automated system for inspecting multi unmanned aerial vehicle and method of the same

    KR102960400B1