Automatic driving test method, device, equipment and storage medium
By parsing scenario configuration files and constructing scenario behavior trees, and filtering target parameter spaces, the problems of single test scenarios and low efficiency in autonomous driving simulation testing are solved, achieving efficient and compatible autonomous driving testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-04-07
AI Technical Summary
Current autonomous driving simulation testing suffers from limited and incomplete testing scenarios, low testing efficiency, and high requirements for the simulation platform's capabilities, making it difficult to adapt to compatibility with different platforms.
By parsing the scenario configuration file, a scenario behavior tree and target parameter space are constructed, and the parameter space that matches the test task is selected, thereby reducing the depth of the behavior tree and improving test efficiency and platform compatibility.
It enables comprehensive logical testing of the simulation test parameter space, improves the efficiency of autonomous driving testing, reduces the capability requirements of the simulation platform, and enhances the applicability and compatibility of the test.
Smart Images

Figure CN115292816B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, and specifically to an autonomous driving testing method, apparatus, equipment, and storage medium. Background Technology
[0002] With the rapid development of artificial intelligence (AI) technology, AI-based autonomous driving systems have attracted widespread attention from governments, academia, and industry. Autonomous driving systems are highly complex, encompassing a range of intelligent algorithms including environmental perception, perception fusion, path planning, and vehicle control. Ensuring the safety, reliability, and stability of autonomous driving systems has become a pressing issue that needs to be addressed.
[0003] Autonomous driving simulation testing is the application of computer simulation technology in the automotive field. Its principle is to digitally recreate autonomous driving application scenarios through mathematical modeling, establishing a system model that closely approximates the real world. Algorithms replace real controllers, and sensor simulation and other technologies are then used to complete the autonomous driving simulation test. Through analysis and research using simulation testing, the purpose of testing and verifying autonomous driving systems and algorithms can be achieved.
[0004] Autonomous driving simulation testing boasts advantages such as high testing efficiency, strong repeatability, low cost, and process safety, enabling R&D personnel and automotive certification bodies to optimize and validate autonomous driving algorithms. For autonomous driving simulation testing, the first step is to construct test scenarios with high coverage and high complexity.
[0005] However, the parameters in the current simulation test scenarios are all fixed values, and the test scenarios are all discrete, that is, they are tested using specific test scenarios one by one. The test scenarios are singular, not comprehensive enough, and the test efficiency is low. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, this invention proposes an autonomous driving testing method, apparatus, equipment, and storage medium, which realizes comprehensive logical testing of the entire simulation test parameter space and improves the efficiency of autonomous driving testing.
[0007] The technical solution of the present invention includes:
[0008] An autonomous driving testing method, the method comprising:
[0009] Obtain a scenario configuration file for autonomous driving testing, wherein the scenario configuration file describes the test object and test scenario of the autonomous driving test;
[0010] The behavior execution information is parsed from the scenario configuration file, and the behavior execution information is used to describe the behavior of scenario elements in the test scenario;
[0011] The behavior execution information is transformed to obtain target behavior execution information, wherein the depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information.
[0012] Construct a scenario behavior tree for the test scenario based on the target behavior execution information;
[0013] The candidate parameter space of the test object and the test scenario is parsed from the scenario configuration file. The candidate parameter space includes all parameters used to implement the autonomous driving test.
[0014] Based on the test task of the autonomous driving test, the candidate parameter space is filtered to obtain the target parameter space;
[0015] The autonomous driving test is performed according to the scene behavior tree and the target parameter space; wherein, the initial state of the test object in the autonomous driving test is determined according to the target parameter space, and the state of the scene elements in the test scene in the autonomous driving test is controlled by the computer device according to the scene behavior tree and the target parameter space.
[0016] Optionally, the step of transforming the behavior execution information to obtain target behavior execution information includes: extracting all atomic actions of scene elements in the test scenario and the temporal logical relationships between the atomic actions from the behavior execution information; determining the action execution conditions of each atomic action according to the temporal logical relationships between the atomic actions; adding the corresponding action execution conditions before each atomic action to obtain the corresponding updated atomic action; and combining all the updated atomic actions in parallel to obtain the target behavior execution information.
[0017] Optionally, determining the execution conditions of each atomic action according to the temporal logical relationship between the atomic actions includes: combining the atomic actions of scene elements in the test scene into a behavior tree structure according to the temporal logical relationship between the atomic actions; performing a breadth-first traversal of the behavior tree structure to obtain the deepest node; performing a reverse traversal of the behavior tree structure starting from the deepest node to obtain the deepest node and the termination condition of the parent node of the deepest node; and performing a bottom-up traversal of each level of the behavior tree structure, obtaining the corresponding... The termination condition of a node and its parent node is determined until all nodes obtained during traversal have no parent nodes; the behavior tree structure is traversed in ascending order starting from the top-level node to obtain the start conditions of the top-level node and its child nodes; each level of the behavior tree structure is traversed in top-down order, and the start conditions of the corresponding node and its child nodes are obtained in the traversal of each level until all nodes obtained during traversal have no child nodes; wherein, the acquisition of the start conditions is based on the termination condition; the start conditions of each node are used as the action execution conditions of the atomic actions corresponding to the corresponding nodes.
[0018] Optionally, the termination condition includes: for a node without a termination condition, the termination condition is completing the atomic action corresponding to the node; for a node with a termination condition, the termination condition is satisfying the termination condition of the node; for a serial parent node, the termination condition is the termination condition of the last child node under the serial parent node; for a parallel parent node, the termination condition is the union of the termination conditions of all child nodes under the parallel parent node.
[0019] Optionally, the start condition includes: for the top-level node, the start condition is empty; for the child nodes under the parallel parent node, the start condition is the start condition of the parallel parent node; for the first child node under the serial parent node, the start condition is the start condition of the serial parent node; for the non-first child node under the serial parent node, the start condition is the end condition of the previous child node of the non-first child node.
[0020] Optionally, the test task based on the autonomous driving test, which filters parameters in the candidate parameter space to obtain a target parameter space, includes: parsing the task description information of the test task from the scenario configuration file; determining parameter constraints based on the constraints of the test object and scenario elements in the test scenario based on the task description information; verifying the rationality of the parameter constraints; and, if the parameter constraints pass the rationality verification, selecting parameters that satisfy the parameter constraints from the candidate parameter space and combining them into the target parameter space.
[0021] Optionally, the step of verifying the reasonableness of the parameter constraints includes: dividing the parameter constraints into direct constraints and indirect constraints; wherein, the direct constraints refer to parameter constraints directly affecting the tested object and scene elements in the test scenario, and the indirect constraints refer to parameter constraints indirectly affecting the tested object and scene elements in the test scenario due to parameter association with the constraint objects of the direct constraints; obtaining reference direct constraints corresponding to the direct constraints and reference indirect constraints associated with the reference direct constraints from a condition database, wherein the condition database includes at least one set of reference direct constraints and reference indirect constraints that are associated; determining whether the range of the indirect constraints belongs to or is equal to the range of the reference indirect constraints; if the range of the indirect constraints is completely within or completely equal to the range of the reference indirect constraints, determining that the parameter constraints pass the reasonableness verification; if the range of the indirect constraints does not belong to and is not equal to the range of the reference indirect constraints, determining that the parameter constraints fail the reasonableness verification.
[0022] An autonomous driving testing device, the device comprising:
[0023] The configuration file acquisition module is used to acquire the scenario configuration file for autonomous driving testing. The scenario configuration file describes the test object and test scenario of the autonomous driving test.
[0024] The configuration file parsing module is used to parse behavior execution information from the scenario configuration file, wherein the behavior execution information is used to describe the behavior of scenario elements in the test scenario;
[0025] An execution information conversion module is used to convert the behavior execution information into content to obtain target behavior execution information, wherein the depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information.
[0026] The scenario behavior tree construction module is used to construct the scenario behavior tree of the test scenario according to the target behavior execution information;
[0027] The configuration file parsing module is also used to parse the candidate parameter space of the test object and the test scenario from the scenario configuration file, wherein the candidate parameter space includes all parameters used to implement the autonomous driving test;
[0028] The parameter space filtering module is used to filter the candidate parameter space based on the test task of the autonomous driving test to obtain the target parameter space;
[0029] An autonomous driving test module is used to execute the autonomous driving test according to the scene behavior tree and the target parameter space; wherein, the initial state of the test object in the autonomous driving test is determined according to the target parameter space, and the state of the scene elements in the test scene in the autonomous driving test is controlled by a computer device according to the scene behavior tree and the target parameter space.
[0030] A computer device includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the autonomous driving test method described above.
[0031] A storage medium storing a computer program, wherein the computer program is configured to execute the above-described autonomous driving test method at runtime.
[0032] A computer program product, when run on a computer device, causes the computer device to perform the autonomous driving test method described above.
[0033] Compared with the prior art, the method proposed in this invention has the following advantages and effects:
[0034] This invention first parses the scenario configuration file for autonomous driving testing, and then, based on the test task, filters the candidate parameter spaces of the parsed test object and test scenario to obtain a target parameter space that matches the test task. During subsequent autonomous driving testing, the target parameter space is used to determine the initial state of the test object and the real-time state of scene elements in the test scenario. On one hand, compared to using specific test scenarios, this invention constructs a massive number of specific test scenarios through parameter spaces, achieving comprehensive logical testing of the entire simulation test parameter space. On the other hand, compared to directly configuring the parameter space matching the test task in the scenario configuration file, this invention uses all parameters used to implement autonomous driving testing as candidate parameter spaces and configures them in the scenario configuration file. After parsing the scenario configuration file, parameter filtering is performed to obtain the target parameter space that matches the test task. Thus, when the test task changes, the computer only needs to change the constraints on which the candidate parameter space was based, without needing to reconfigure and parse the scenario configuration file. This avoids wasting processing resources and achieves rapid matching of test tasks, improving the efficiency of autonomous driving testing.
[0035] Furthermore, this invention obtains behavior execution information describing the actions of scene elements in the test scene by parsing the scene configuration file. This behavior execution information is then transformed to reduce the depth of the behavior tree structure it indicates. Subsequently, a scene behavior tree for the test scene is constructed based on the transformed target behavior execution information. Running the scene behavior tree enables autonomous driving testing. Since a deeper behavior tree structure places higher demands on the simulation platform's ability to process scene configuration files during autonomous driving testing, this invention reduces the depth of the behavior tree structure by transforming the behavior execution information, effectively improving the applicability and compatibility of the scene configuration file across different simulation platforms and lowering the capability requirements of the simulation platform. Attached Figure Description
[0036] Figure 1 A flowchart of an autonomous driving testing method provided in one embodiment of the present invention.
[0037] Figure 2 A schematic diagram of the content of a scenario configuration file provided in one embodiment of the present invention.
[0038] Figure 3 An embodiment of the present invention provides a behavior tree structure indicated by behavior execution information.
[0039] Figure 4 An embodiment of the present invention provides a behavior tree structure indicated by target behavior execution information.
[0040] Figure 5 A block diagram of an autonomous driving test device provided in one embodiment of the present invention. Detailed Implementation
[0041] The technical solutions in the embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely specific embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] like Figure 1 As shown, the autonomous driving test method of the present invention includes the following steps (steps 1 to 7).
[0043] Step 1: Obtain the scenario configuration file for autonomous driving testing. The scenario configuration file describes the test object and test scenario for autonomous driving testing.
[0044] In this invention, the scenario configuration file is mainly used to describe the object under test and the test scenario. For example... Figure 2As shown, the scenario configuration file includes a Dut (under test) file and a Scenarios (scenario) file. The Dut file describes the object under test, mainly including its task information and optional parameters. Task information includes, but is not limited to, starting position, target speed, and destination. Destination includes the locations of one or more sub-target points and the endpoint of the object under test within the test task. The Scenarios file describes the test scenario, mainly including scenario information and execution information. Scenario information includes, but is not limited to, scenario name, scenario parameters, static map, and scenario elements (non-tested vehicles, pedestrians, obstacles, etc.). Execution information includes, but is not limited to, atomic actions and their temporal logical relationships (behavior_defn). Optionally, such as... Figure 2 As shown, the scenario configuration file also includes an Oracles (assertion) file. The Oracles file is mainly used to determine whether the autonomous driving test should continue. If the assertion in this part is not true, the scenario will be terminated.
[0045] Step 2: Parse the behavior execution information from the scene configuration file. The behavior execution information is used to describe the behavior of scene elements in the test scene.
[0046] After obtaining the scene configuration file, the computer device can parse it to perform subsequent processing based on the parsed file. During parsing, the computer device can either parse only the file content required for the current processing step, or it can parse and save the entire scene configuration file at once.
[0047] For example, taking the complete parsing of a scene configuration file by a computer device as an example, the parsing of the scene configuration file includes the following steps: verifying the rationality of the scene configuration file, such as whether it has a scene name and whether it contains the object under test; extracting the version of the scene configuration file; extracting the scene name and static map; extracting scene elements, including: information on non-tested vehicles, pedestrians, obstacles, weather, etc. (such as position, speed, color, model, etc.); extracting task description information, including: the starting position, target speed, target point position, etc. of the object under test, as well as all atomic actions of scene elements and the temporal logical relationship between atomic actions, etc.; extracting the candidate parameter space, such as the optional parameters of the object under test and scene parameters, etc.
[0048] By parsing the scenario configuration file, the computer device can obtain behavior execution information, which describes the behavior of scenario elements in the test scenario. Based on this, the behavior execution information includes, but is not limited to: scenario elements, atomic actions of scenario files, and the temporal logical relationship between atomic actions of scenario elements.
[0049] Step 3: Transform the behavior execution information to obtain the target behavior execution information. The depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information.
[0050] Based on behavior execution information, a behavior tree structure describing the actions of scene elements can be constructed. Generally, the depth of the behavior tree structure is directly proportional to the complexity of the behavior execution information. That is, the more atomic actions a scene element has, and / or the more complex the temporal logic relationships between atomic actions, the deeper the behavior tree structure. This, in turn, means higher requirements for the simulation platform's ability to process scene configuration files in autonomous driving testing. In this invention, to improve the applicability and compatibility of scene configuration files across different simulation platforms and reduce the capability requirements of the simulation platform, the computer device performs content transformation on the behavior execution information to obtain target behavior execution information. The depth of the behavior tree structure indicated by this target behavior execution information is less than the depth of the behavior tree structure indicated by the initial behavior execution information, thereby reducing the depth of the behavior tree structure.
[0051] In one example, step 3 above includes the following sub-steps (steps 3.1 to 3.4).
[0052] Step 3.1: Extract all atomic actions of scene elements in the test scene from the behavior execution information, as well as the temporal logical relationships between atomic actions.
[0053] The temporal logical relationships between atomic actions include: sequential execution of atomic actions, parallel execution of atomic actions, and repetition of atomic actions. Sequential execution of atomic actions refers to two atomic actions being executed sequentially in time; parallel execution of atomic actions refers to two atomic actions having overlapping execution times; and repetition of atomic actions refers to atomic actions being executed repeatedly.
[0054] Step 3.2: Determine the execution conditions of each atomic action according to the temporal logic relationship between atomic actions.
[0055] By transforming the behaviors of scene elements into a behavior tree structure, the execution conditions of each atomic action can be obtained more clearly and conveniently. Based on this, step 3.2 above includes the following sub-steps (steps 3.2.1 to 3.2.4).
[0056] Step 3.2.1: According to the temporal logic relationship between atomic actions, combine the atomic actions of scene elements in the test scene into a behavior tree structure.
[0057] For example, suppose the atomic actions of scene elements in the test scenario include: car A travels straight along the lane (atomic action 1), car B travels straight along the lane until it reaches the target distance in front of car A (atomic action 2), car B changes lanes (atomic action 3), and car B decelerates to the target speed (atomic action 4). Atomic actions 1 and 2 are parallel, while atomic actions 2, 3, and 4 are sequential. Based on these atomic actions and their temporal logic relationships, a computer device can construct... Figure 3 The behavior tree structure shown includes 6 nodes, where node 0 is the parallel parent node (root node), node 1 corresponds to atomic action 1, node 2 is the serial parent node of nodes 3 to 5, node 3 corresponds to atomic action 2, node 4 corresponds to atomic action 3, and node 5 corresponds to atomic action 4.
[0058] Step 3.2.2: Breadth-first traversal of the tree structure to obtain the deepest node.
[0059] For example, for such Figure 3 The behavior tree structure shown shows that the deepest nodes that the computer device can access include nodes 3, 4, and 5.
[0060] Step 3.2.3: Starting from the deepest node, traverse the tree structure in reverse order to obtain the deepest node and its parent node's termination condition; traverse each level of the tree structure from bottom to top, obtaining the corresponding node and its parent node's termination condition in each level's traversal, until all nodes obtained during traversal have no parent node.
[0061] The termination conditions for each node include: for nodes without termination conditions, the termination condition is completing the atomic action corresponding to the node; for nodes with termination conditions, the termination condition is satisfying the termination condition of the node; for serial parent nodes, the termination condition is the termination condition of the last child node under the serial parent node (the child node at the last position); for parallel parent nodes, the termination condition is the union of the termination conditions of all child nodes under the parallel parent node.
[0062] For example, for such Figure 3The behavior tree structure shown indicates that the computer device first traverses from the deepest level, starting with nodes 3 to 5, to obtain the termination conditions for nodes 3 to 5 and node 2 (the parent node of nodes 3 to 5). Node 3 has a termination condition, so its termination condition is that car B reaches the target distance in front of car A. Node 4 has no termination condition, so its termination condition is that car B completes the lane change. Node 5 has a termination condition, so its termination condition is that car B decelerates to the target speed. Node 2 is the sequential parent node of nodes 3 to 5, and its last child node is node 5, so its termination condition is the same as its termination condition (car B decelerates to the target speed). Next, the computer device continues traversing upwards to obtain the termination conditions for nodes 1 and 0 (the parent nodes of nodes 1 and 2) (the termination condition for node 2 has already been obtained and will not be repeated here). In this scenario, node 1 has no termination condition, so its termination condition is that car A completes its straight-line journey along the lane. Node 0 is the parallel parent node of nodes 1 and 2, so its termination condition is the union of the termination conditions of nodes 1 and 2 (car A completes its straight-line journey along the lane and car B decelerates to the target speed). When the computer then traverses upwards, it can only access node 0, which has no parent node. Therefore, the computer completes a reverse traversal of the behavioral tree structure and obtains the termination conditions for all nodes.
[0063] Step 3.2.4: Starting from the top-level node, traverse the behavioral tree structure in ascending order to obtain the starting conditions of the top-level node and its child nodes; traverse each level of the behavioral tree structure in top-down order, obtaining the starting conditions of the corresponding node and its child nodes in each level of traversal, until all nodes obtained during traversal have no child nodes.
[0064] In this invention, the execution conditions of each atomic action are related to the start conditions of the corresponding node. The acquisition of the start conditions is based on the end conditions. Therefore, the computer device first executes step 3.2.3 to obtain the end conditions of all nodes, and then executes step 3.2.4 to obtain the start conditions of each node.
[0065] The start conditions for each node include: for the top-level node, the start condition is empty; for the child node under the parallel parent node, the start condition is the start condition of the parallel parent node; for the first child node under the serial parent node, the start condition is the start condition of the serial parent node; for the non-first child node under the serial parent node, the start condition is the end condition of the previous child node of the non-first child node.
[0066] For example, for such Figure 3The behavior tree structure shown begins with the computer traversing from the top-level node 0, obtaining the start conditions for node 0 and nodes 1 and 2 (child nodes of node 0). Since node 0 is the top-level node, its start condition is null. Node 0 is the parallel parent node of nodes 1 and 2, so the start conditions for nodes 1 and 2 are the same as the start conditions for node 0 (both null). Next, the computer continues traversing downwards, obtaining the start conditions for nodes 3 to 5 (child nodes of node 2) (since the start conditions for nodes 1 and 2 have already been obtained, they are not repeated here). Node 2 is the sequential parent node of nodes 3 to 5, and node 3 is the first child node of node 2, so its start condition is the same as the start condition for node 2 (null). Node 4 is a non-first child node of node 2, so its start condition is the same as the end condition for node 3 (the distance B travels to the target distance in front of car A). Node 5 is a non-first child node of node 2, so its start condition is the same as the end condition for node 4 (car B completes the lane change). Then, when the computer device traverses downwards, it can only obtain nodes 3 to 5, and nodes 3 to 5 have no child nodes. Therefore, the computer device completes the forward traversal of the behavioral tree structure and obtains the starting conditions of all nodes.
[0067] Step 3.2.5: Use the start conditions of each node as the execution conditions of the corresponding atomic actions of the node.
[0068] For nodes that correspond to atomic actions of actual scene elements, the start condition of that node is used as the execution condition of its corresponding atomic action.
[0069] For example, for such Figure 3 The behavior tree structure shown has node 1 corresponding to atomic action 1, and the execution condition of atomic action 1 is empty; node 3 corresponding to atomic action 2, and the execution condition of atomic action 2 is empty; node 4 corresponding to atomic action 3, and the execution condition of atomic action 3 is that car B travels to the target distance in front of car A; node 5 corresponding to atomic action 4, and the execution condition of atomic action 4 is that car B completes the lane change.
[0070] Step 3.3: Before each atomic action, add the corresponding action execution condition to obtain the updated atomic action.
[0071] Computer devices also write the execution conditions of atomic actions into the atomic actions to enable the updating of atomic actions.
[0072] For example, for such Figure 3The behavior tree structure shown corresponds to each atomic action. The updated atomic action 1 is that car A travels straight along the lane. The updated atomic action 2 is that car B travels straight along the lane until it reaches the target distance in front of car A. The updated atomic action 3 is that car B changes lanes when it reaches the target distance in front of car A. The updated atomic action 4 is that car B decelerates to the target speed when it completes the lane change.
[0073] Step 3.4: Combine all updated atomic actions in parallel to obtain the target behavior execution information.
[0074] By writing the execution conditions of an action into an atomic action, a parallel temporal logical relationship can be achieved between all updated atomic actions. The computer device combines all updated atomic actions in parallel to obtain the target behavior execution information.
[0075] For example, based on the Figure 3 The update of each atomic action corresponding to the behavior tree structure shown, and the behavior tree structure indicated by the obtained target behavior execution information are as follows: Figure 4 As shown, Figure 4 The depth of the behavioral tree structure shown is less than Figure 3 The depth of the behavioral tree structure shown.
[0076] Step 4: Construct the scenario behavior tree for the test scenario based on the target behavior execution information.
[0077] The target behavior execution information is a text file. If it is necessary to control the behavior of scene elements in the test scene, the computer device also needs to build a scene behavior tree of the test scene based on the target behavior execution information.
[0078] It should be understood that the scene behavior tree of a test scenario includes not only atomic actions of scene elements (such as non-tested vehicles, pedestrians, obstacles, weather, etc.), but also atomic actions such as setting up the test scenario. Setting up the test scenario includes importing the test map and generating the tested object and scene elements within the test map. Elements such as traffic lights and weather are introduced during the atomic action of setting up the test scenario; the timing of red, yellow, and green lights for traffic lights and weather conditions (sunny, rainy, snowy, daytime, nighttime) can be set. Elements such as vehicles and pedestrians can be rendered either during test scenario setup or at the corresponding test time.
[0079] Optionally, the scene behavior tree may include behavior subtrees and decision subtrees. The decision subtree is used to determine and evaluate the execution results of the behavior subtree. Typically, the decision subtree is run after traversing all nodes of the behavior subtree to determine and evaluate its execution results. Specifically, after the behavior subtree is initialized, the computer device starts a timer and a listener for the behavior subtree. The timer records the execution time of the entire scene behavior tree. The listener monitors for abnormal situations occurring during the execution of the entire scene behavior tree, such as simulation engine connection failure, damage or loss of control of the tested object causing the test task to fail, memory leaks, or other system service anomalies.
[0080] Step 5: Parse the candidate parameter space of the test object and test scenario from the scenario configuration file. The candidate parameter space includes all parameters used to implement autonomous driving testing.
[0081] The computer device can parse the scenario configuration file again to obtain the candidate parameter space for the object under test and the test scenario during step 5; alternatively, it can fully parse and store the scenario configuration file during step 2, and then directly extract the candidate parameter space for the object under test and the test scenario from the stored data during step 5. The candidate parameter space includes all parameters used to implement autonomous driving testing.
[0082] For example, as shown in Table 1 below, the candidate parameter space of the tested object includes, but is not limited to, the range of parameters such as initial position, target point position, and initial speed; the test scenario includes, but is not limited to, scene elements such as roads, weather, non-tested vehicles, pedestrians, and obstacles; roads include, but are not limited to, the range of parameters such as road type, road structure, number of lanes, lane width, lane curvature, and traffic signs; weather includes, but is not limited to, the range of parameters such as time, cloud cover, fog, snowfall, elevation angle, and sunlight; non-tested vehicles include, but are not limited to, the range of parameters such as initial position, real-time speed, and target position; pedestrians include, but are not limited to, the range of parameters such as pedestrian type, initial position, and real-time speed; obstacles include, but are not limited to, the range of parameters such as obstacle type, obstacle volume, and obstacle position.
[0083] Table 1. Examples of candidate parameter spaces for the tested object and test scenario.
[0084]
[0085] Step 6: Based on the test task of autonomous driving testing, filter the candidate parameter space to obtain the target parameter space.
[0086] The target parameter space refers to the parameter space that matches the test task of autonomous driving testing. Based on the test task, the computer equipment filters parameters in the candidate parameter space to ensure that the initial state of the tested object (e.g., initial position, initial speed), weather changes in the test scenario (e.g., rain, snow, fog), time changes (e.g., changes in light intensity at different times), traffic participants (e.g., motor vehicle behavior, non-motor vehicle behavior, pedestrian behavior, obstacle positions), dynamic signage facilities, and communication environment information all meet the requirements of the test task. For example, assuming the test scenario for autonomous driving testing includes urban expressways, the road types in the candidate parameter space for road elements include straight lanes, U-turn lanes, left-turn lanes, right-turn lanes, multi-lane merging lanes, and ramps. Further assuming the test task for autonomous driving testing is to evaluate the steering performance of the tested object, the computer equipment filters the candidate parameter space to obtain a target parameter space for road elements where the road types include left-turn lanes and right-turn lanes.
[0087] In one example, step 6 above includes the following sub-steps (steps 6.1 to 6.4).
[0088] Step 6.1: Parse the task description information of the test task from the scenario configuration file.
[0089] The computer device can parse the scenario configuration file again to obtain the task description information of the test task during step 6.1; alternatively, it can fully parse and store the scenario configuration file during step 2, and then directly extract the task description information of the test task from the stored data during step 6.1. In this invention, the task description information of the test task may not have a directly corresponding file in the scenario configuration file, but may be scattered in various files, such as the Dut (Test Subject) file and the Scenarios (Scenario) file. The computer device needs to integrate the parsed files to obtain the task description information of the test task.
[0090] Optionally, the task description information of the test task includes, but is not limited to: the test scenario type, scenario description, scenario diagram, road type (such as straight lane, left turn lane, U-turn lane, ramp, etc.), road structure (such as road width, number of lanes, etc.), environmental conditions (such as weather, lighting, etc.); task initialization (such as the initial position, initial speed, target point position, etc. of the test object and scene elements in the test scenario); atomic actions of scene elements in the test scenario (such as following, intelligent obstacle avoidance, parking, straight at intersection, left turn at intersection, right turn at intersection, U-turn at intersection, U-turn on straight road, lane change, starting, deceleration and yielding, parking, etc.) and their temporal logic relationships; and the conditions for determining whether the test task is terminated or ended (such as collision, test timeout, etc.).
[0091] Step 6.2: Determine the parameter constraints based on the constraints on the tested object and scene elements in the test scenario according to the task description information.
[0092] Computer devices can extract parameter constraints for the tested object and scene elements in the test scenario from the task description information, such as parameter constraints for the initial position of the tested object, parameter constraints for the weather conditions in the test scenario, and parameter constraints for the initial positional relationship between the tested object and non-tested vehicles.
[0093] Step 6.3: Verify the rationality of the parameter constraints.
[0094] Parameter constraints are used to filter the candidate parameter space to obtain a target parameter space that matches the test task. Because the target parameter space is filtered based on the candidate parameter space, the initial state of the tested object and the actions and effects of scene elements in the test scenario strictly follow the physical laws and behavioral logic of the real world. Therefore, the parameter constraints used to obtain the target parameter space should also conform to physical laws. Thus, in this invention, after extracting the parameter constraints, the computer device first verifies their rationality.
[0095] Accordingly, step 6.3 may optionally include the following sub-steps (steps 6.3.1 to 6.3.3).
[0096] Step 6.3.1: Divide the parameter constraints into direct constraints and indirect constraints.
[0097] Direct constraints are parameter constraints that directly apply to the object under test and the scene elements in the test scenario; indirect constraints are parameter constraints that indirectly apply to the object under test and the scene elements in the test scenario because they are related to the constraints of the direct constraints. Optionally, parameter constraints on the object under test and the scene elements in the test scenario include: parameter constraints on the object under test, parameter constraints on the scene elements in the test scenario, and parameter constraints on the relative relationships between the object under test and the scene elements in the test scenario.
[0098] For example, the parameter constraints extracted by the computer device include two conditions: condition one is daytime, and condition two is that the lane-changing distance between the tested object and the non-test vehicle is greater than three times the speed difference between the tested object and the non-test vehicle. Because the visibility range of vehicles differs between day and night, to avoid collisions and ensure driving safety, vehicles need to maintain a certain distance from other vehicles when changing lanes (referred to as lane-changing distance in this invention). Typically, the lane-changing distance at night is greater than the lane-changing distance during the day. Therefore, in this example, condition one can be classified as a direct constraint, and condition two can be classified as an indirect constraint that is parameter-related to condition one.
[0099] Step 6.3.2: Retrieve the reference direct constraints corresponding to the direct constraints from the condition database, as well as the reference indirect constraints associated with the reference direct constraints.
[0100] The condition database includes at least one set of related direct and indirect reference constraints. The data in the condition database can be pre-set based on historical data and expert experience. Optionally, the computer device first retrieves the direct reference constraint corresponding to the direct constraint obtained in step 6.3.1 from the condition database, and then retrieves the related indirect reference constraint from the condition database. Wherein, the "direct reference constraint corresponding to the direct constraint" mentioned in this invention needs to satisfy the following condition: the range of the direct reference constraint is greater than or equal to the range of the direct constraint.
[0101] For example, the condition database includes reference direct constraint 1 (rainfall greater than or equal to 20% and less than 40%) and reference direct constraint 2 (rainfall greater than or equal to 40% and less than 60%). The direct constraint obtained through step 6.3.1 is rainfall greater than or equal to 45% and less than 55%. Therefore, the direct constraint corresponds to reference direct constraint 2 in the condition database.
[0102] Step 6.3.3: Determine whether the range of the indirect constraint is within or equal to the range of the reference indirect constraint.
[0103] The computer device compares the ranges of all indirect constraints obtained in step 6.3.1 with the ranges of all reference indirect constraints obtained in step 6.3.2 to determine whether the parametric constraints (including all direct and indirect constraints) pass the rationality verification. Specifically, if the range of an indirect constraint is completely within or equal to the range of a reference indirect constraint, the parametric constraint passes the rationality verification; if the range of an indirect constraint is neither within nor equal to the range of a reference indirect constraint, the parametric constraint fails the rationality verification.
[0104] For example, the direct constraint obtained through step 6.3.1 is daytime, and the indirect constraint is that the lane change distance between the tested object and the non-test vehicle is greater than three times the speed difference between the tested object and the non-test vehicle; the reference direct constraint obtained through step 6.3.2 is daytime, and the reference indirect constraint is that the lane change distance between the tested object and the non-test vehicle is greater than twice the speed difference between the tested object and the non-test vehicle; since the range of the indirect constraint is within the range of the reference indirect constraint, the determination of the parameter constraint passes the rationality verification.
[0105] Step 6.4: If the parameter constraints pass the rationality verification, select parameters that satisfy the parameter constraints from the candidate parameter space and combine them into the target parameter space.
[0106] If the parameter constraints pass the rationality verification, the computer device filters the candidate parameter space based on the parameter constraints to obtain the target parameter space. For example, if the number of lanes in the candidate parameter space includes 2, 4, 6, and 8, and the parameter constraints stipulate that the number of lanes is greater than 4, then the computer device selects lanes 6 and 8 from the candidate parameter space to combine with other filtered parameters to form the target parameter space.
[0107] Step 7: Perform autonomous driving tests according to the scenario behavior tree and target parameter space.
[0108] In autonomous driving testing, the state of scene elements in the test scenario is controlled by computer equipment according to the scene behavior tree and the target parameter space. The initial state of the tested object is determined by the computer equipment according to the target parameter space. However, since the purpose of autonomous driving testing is to test the system performance of the tested object, the subsequent behavior state of the tested object is decided by the tested object itself. Specifically, when the computer equipment controls the scene elements in the test scenario by running the scene behavior tree, it retrieves parameters from the target parameter space when it reaches a node in the scene behavior tree that requires parameter retrieval to complete the operation of the corresponding node. For example, if the scene behavior tree includes node 1 (non-tested vehicle A travels straight along the lane at a target speed), and the target parameter space includes a speed parameter range of 8 to 20 meters per second for non-tested vehicle A, then when the computer equipment traverses to node 1 in the scene behavior tree, it can randomly retrieve a parameter of 10 meters per second from the target parameter space as the real-time speed of non-tested vehicle A to complete the operation of node 1.
[0109] In summary, this invention first parses the scenario configuration file for autonomous driving testing, and then, based on the test task, filters the candidate parameter spaces of the parsed test object and test scenario to obtain a target parameter space matching the test task. During subsequent autonomous driving testing, the target parameter space is used to determine the initial state of the test object and the real-time state of scene elements in the test scenario. On one hand, compared to using specific test scenarios, this invention constructs a massive number of specific test scenarios through parameter spaces, achieving comprehensive logical testing of the entire simulation test parameter space. On the other hand, compared to directly configuring the parameter space matching the test task in the scenario configuration file, this invention uses all parameters used to implement autonomous driving testing as candidate parameter spaces and configures them in the scenario configuration file. After parsing the scenario configuration file, parameter filtering is performed to obtain the target parameter space matching the test task. Thus, when the test task changes, the computer only needs to change the constraints on which the candidate parameter space was based, without reconfiguring and parsing the scenario configuration file. This avoids wasting processing resources and achieves rapid matching of test tasks, improving the efficiency of autonomous driving testing.
[0110] Furthermore, this invention obtains behavior execution information describing the actions of scene elements in the test scene by parsing the scene configuration file. This behavior execution information is then transformed to reduce the depth of the behavior tree structure it indicates. Subsequently, a scene behavior tree for the test scene is constructed based on the transformed target behavior execution information. Running the scene behavior tree enables autonomous driving testing. Since a deeper behavior tree structure places higher demands on the simulation platform's ability to process scene configuration files during autonomous driving testing, this invention reduces the depth of the behavior tree structure by transforming the behavior execution information, effectively improving the applicability and compatibility of the scene configuration file across different simulation platforms and lowering the capability requirements of the simulation platform.
[0111] Please refer to Figure 5 This diagram illustrates a block diagram of an autonomous driving testing apparatus according to an embodiment of the present invention. The apparatus can be a computer device or can be installed within a computer device. Figure 5 As shown, the device includes the following modules: configuration file acquisition module 510, configuration file parsing module 520, execution information conversion module 530, scene behavior tree construction module 540, parameter space filtering module 550, and autonomous driving testing module 560.
[0112] The configuration file acquisition module 510 is used to acquire a scenario configuration file for autonomous driving testing. The scenario configuration file describes the test object and test scenario of the autonomous driving test.
[0113] The configuration file parsing module 520 is used to parse behavior execution information from the scenario configuration file, wherein the behavior execution information is used to describe the behavior of scenario elements in the test scenario.
[0114] The execution information conversion module 530 is used to convert the behavior execution information into content to obtain target behavior execution information, wherein the depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information.
[0115] The scenario behavior tree construction module 540 is used to construct the scenario behavior tree of the test scenario according to the target behavior execution information.
[0116] The configuration file parsing module 520 is further configured to parse the candidate parameter space of the test object and the test scenario from the scenario configuration file, wherein the candidate parameter space includes all parameters used to implement the autonomous driving test.
[0117] The parameter space filtering module 550 is used to filter the candidate parameter space based on the test task of the autonomous driving test to obtain the target parameter space.
[0118] The autonomous driving test module 560 is used to execute the autonomous driving test according to the scene behavior tree and the target parameter space; wherein, the initial state of the test object in the autonomous driving test is determined according to the target parameter space, and the state of the scene elements in the test scene in the autonomous driving test is controlled by the computer device according to the scene behavior tree and the target parameter space.
[0119] Optionally, the execution information conversion module 530 is configured to: extract all atomic actions of scene elements in the test scenario and the temporal logical relationships between the atomic actions from the behavior execution information; determine the action execution conditions of each atomic action according to the temporal logical relationships between the atomic actions; add the corresponding action execution conditions before each atomic action to obtain the corresponding updated atomic action; and combine all the updated atomic actions in parallel to obtain the target behavior execution information.
[0120] Optionally, the execution information conversion module 530 is configured to: combine the atomic actions of scene elements in the test scenario into a behavior tree structure according to the temporal logical relationship between the atomic actions; traverse the behavior tree structure in breadth-first order to obtain the deepest node; traverse the behavior tree structure in reverse order starting from the deepest node to obtain the end condition of the deepest node and its parent node; traverse each level of the behavior tree structure in bottom-up order, obtaining the end condition of the corresponding node and its parent node in each level of traversal, until all nodes obtained during traversal have no parent node; traverse the behavior tree structure in ascending order starting from the top node to obtain the start condition of the top node and its child nodes; traverse each level of the behavior tree structure in top-down order, obtaining the start condition of the corresponding node and its child nodes in each level of traversal, until all nodes obtained during traversal have no child nodes; wherein the acquisition of the start condition is based on the end condition; and use the start condition of each node as the action execution condition of the corresponding atomic action.
[0121] Optionally, the termination condition includes: for a node without a termination condition, the termination condition is completing the atomic action corresponding to the node; for a node with a termination condition, the termination condition is satisfying the termination condition of the node; for a serial parent node, the termination condition is the termination condition of the last child node under the serial parent node; for a parallel parent node, the termination condition is the union of the termination conditions of all child nodes under the parallel parent node.
[0122] Optionally, the start condition includes: for the top-level node, the start condition is empty; for the child nodes under the parallel parent node, the start condition is the start condition of the parallel parent node; for the first child node under the serial parent node, the start condition is the start condition of the serial parent node; for the non-first child node under the serial parent node, the start condition is the end condition of the previous child node of the non-first child node.
[0123] Optionally, the parameter space filtering module 550 is configured to: parse the task description information of the test task from the scenario configuration file; determine parameter constraints based on the constraints of the test object and the scenario elements in the test scenario according to the task description information; verify the rationality of the parameter constraints; and, if the parameter constraints pass the rationality verification, select parameters that satisfy the parameter constraints from the candidate parameter space and combine them into the target parameter space.
[0124] Optionally, the parameter space filtering module 550 is configured to: divide the parameter constraints into direct constraints and indirect constraints; wherein, the direct constraints refer to parameter constraints directly affecting the tested object and scene elements in the test scenario, and the indirect constraints refer to parameter constraints indirectly affecting the tested object and scene elements in the test scenario due to parameter association with the constraint objects of the direct constraints; obtain reference direct constraints corresponding to the direct constraints and reference indirect constraints associated with the reference direct constraints from a condition database, wherein the condition database includes at least one set of reference direct constraints and reference indirect constraints that are associated; determine whether the range of the indirect constraints belongs to or is equal to the range of the reference indirect constraints; if the range of the indirect constraints is completely within or completely equal to the range of the reference indirect constraints, determine that the parameter constraints pass the rationality verification; if the range of the indirect constraints does not belong to and is not equal to the range of the reference indirect constraints, determine that the parameter constraints fail the rationality verification.
[0125] For details regarding the specific execution process and beneficial effects of the device module, please refer to the description of the above method embodiments; further details will not be provided here.
[0126] In an exemplary embodiment, a computer device is also provided, the computer device including a memory and a processor, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described autonomous driving test method.
[0127] In an exemplary embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the autonomous driving test method described above.
[0128] In an exemplary embodiment, a computer program product is also provided, which, when run on a computer device, causes the computer device to perform the autonomous driving test method described above.
[0129] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Those skilled in the art can modify or make equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention. The scope of protection of the present invention should be determined by the claims.
Claims
1. An autonomous driving testing method, characterized in that, The method includes: Obtain a scenario configuration file for autonomous driving testing, wherein the scenario configuration file describes the test object and test scenario of the autonomous driving test; The behavior execution information is parsed from the scenario configuration file, and the behavior execution information is used to describe the behavior of scenario elements in the test scenario; The behavior execution information is transformed to obtain target behavior execution information, wherein the depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information. Construct a scenario behavior tree for the test scenario based on the target behavior execution information; The candidate parameter space of the test object and the test scenario is parsed from the scenario configuration file. The candidate parameter space includes all parameters used to implement the autonomous driving test. Based on the test task of the autonomous driving test, the candidate parameter space is filtered to obtain the target parameter space; The autonomous driving test is performed according to the scene behavior tree and the target parameter space; wherein, the initial state of the test object in the autonomous driving test is determined according to the target parameter space, and the state of the scene elements in the test scene in the autonomous driving test is controlled by the computer device according to the scene behavior tree and the target parameter space; The step of transforming the behavior execution information to obtain the target behavior execution information includes: Extract all atomic actions of scene elements in the test scenario from the behavior execution information, as well as the temporal logic relationships between the atomic actions; Based on the temporal logic relationship between the atomic actions, determine the execution conditions of each atomic action; Before each atomic action, add the corresponding action execution condition to obtain the updated atomic action; All updated atomic actions are combined in parallel to obtain the target behavior execution information.
2. The method as described in claim 1, characterized in that, The step of determining the execution conditions of each atomic action according to the temporal logical relationship between the atomic actions includes: Based on the temporal logical relationship between the atomic actions, the atomic actions of the scene elements in the test scene are combined into a behavior tree structure; The tree structure of the behavior is traversed in breadth-first search to obtain the deepest node; Starting from the deepest node, traverse the behavior tree structure in reverse order to obtain the deepest node and the termination condition of its parent node; traverse each level of the behavior tree structure in bottom-up order, and obtain the corresponding node and its parent node's termination condition in each level's traversal, until all nodes obtained during traversal have no parent node. Starting from the top-level node, traverse the behavior tree structure in ascending order to obtain the starting conditions of the top-level node and its child nodes; traverse each level of the behavior tree structure in top-down order, obtaining the starting conditions of the corresponding node and its child nodes in the traversal of each level, until all nodes obtained during the traversal have no child nodes; wherein, the acquisition of the starting conditions is based on the ending conditions. The start conditions of each node are used as the execution conditions for the atomic actions corresponding to that node.
3. The method as described in claim 2, characterized in that, The termination conditions include: For nodes without termination conditions, the termination condition is the completion of the atomic action corresponding to the node; For a node with an end determination condition, the end condition is that the end determination condition of the node is met. For a serial parent node, the termination condition is the termination condition of the last child node under the serial parent node. For a parallel parent node, the termination condition is the union of the termination conditions of all child nodes under that parallel parent node.
4. The method as described in claim 2, characterized in that, The starting conditions include: For the top-level node, the starting condition is empty; For child nodes under a parallel parent node, the start condition is the same as the start condition of the parallel parent node. For the first child node under a serial parent node, the start condition is the start condition of the serial parent node; For a non-first child node under a serial parent node, the start condition is the end condition of the previous child node of the non-first child node.
5. The method as described in claim 1, characterized in that, The test task based on the autonomous driving test filters the candidate parameter space to obtain the target parameter space, including: Parse the task description information of the test task from the scenario configuration file; Based on the constraints on the tested object and the scene elements in the test scenario according to the task description information, the parameter constraint conditions are determined. The rationality of the parameter constraints is verified. If the parameter constraints pass the rationality verification, parameters that satisfy the parameter constraints are selected from the candidate parameter space and combined to form the target parameter space.
6. The method as described in claim 5, characterized in that, The rationality verification of the parameter constraints includes: The parameter constraints are divided into direct constraints and indirect constraints. Direct constraints are parameter constraints that are directly applied to the object under test and the scene elements in the test scenario. Indirect constraints are parameter constraints that are indirectly applied to the object under test and the scene elements in the test scenario because they are related to the constraints of the direct constraints. The reference direct constraint corresponding to the direct constraint and the reference indirect constraint associated with the reference direct constraint are obtained from the condition database. The condition database includes at least one set of reference direct constraints and reference indirect constraints that are associated with each other. Determine whether the range of the indirect constraint condition belongs to or is equal to the range of the reference indirect constraint condition; If the range of the indirect constraint condition is completely within or completely equal to the range of the reference indirect constraint condition, the parameter constraint condition is determined to pass the rationality verification. If the range of the indirect constraint is not within and is not equal to the range of the reference indirect constraint, the parameter constraint is determined to fail the rationality verification.
7. An autonomous driving testing device, characterized in that, The device includes: The configuration file acquisition module is used to acquire the scenario configuration file for autonomous driving testing. The scenario configuration file describes the test object and test scenario of the autonomous driving test. The configuration file parsing module is used to parse behavior execution information from the scenario configuration file, wherein the behavior execution information is used to describe the behavior of scenario elements in the test scenario; An execution information conversion module is used to convert the behavior execution information into content to obtain target behavior execution information, wherein the depth of the behavior tree structure indicated by the target behavior execution information is less than the depth of the behavior tree structure indicated by the behavior execution information. The scenario behavior tree construction module is used to construct the scenario behavior tree of the test scenario according to the target behavior execution information; The configuration file parsing module is also used to parse the candidate parameter space of the test object and the test scenario from the scenario configuration file, wherein the candidate parameter space includes all parameters used to implement the autonomous driving test; The parameter space filtering module is used to filter the candidate parameter space based on the test task of the autonomous driving test to obtain the target parameter space; An autonomous driving test module is used to execute the autonomous driving test according to the scene behavior tree and the target parameter space; wherein, the initial state of the test object in the autonomous driving test is determined according to the target parameter space, and the state of the scene elements in the test scene in the autonomous driving test is controlled by a computer device according to the scene behavior tree and the target parameter space; The step of transforming the behavior execution information to obtain the target behavior execution information includes: Extract all atomic actions of scene elements in the test scenario from the behavior execution information, as well as the temporal logic relationships between the atomic actions; Based on the temporal logic relationship between the atomic actions, determine the execution conditions of each atomic action; Before each atomic action, add the corresponding action execution condition to obtain the updated atomic action; All updated atomic actions are combined in parallel to obtain the target behavior execution information.
8. A computer device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method as described in any one of claims 1-6.
9. A storage medium storing a computer program, wherein, The computer program is configured to execute the method of any one of claims 1-6 at runtime.