Test scene generalization generation method and system for automatic driving defect test

By generalizing the simulation test scenarios of autonomous driving technology and using reinforcement learning to generate test scenarios, the problem of ignoring environmental information and background vehicle interactions in the existing technology is solved, and testing of more complex scenarios and efficient testing of autonomous driving system is realized.

CN119598861APending Publication Date: 2025-03-11CHANGAN UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411674557.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the simulation test scenarios of existing autonomous driving technology, the training strategy ignores environmental information limitations and background vehicle interactions. Due to specific use cases, it cannot be effectively expanded to more complex scenarios, especially when interacting with human drivers.

Method used

A test scenario generalization generation method for autonomous driving defect testing is provided. By extracting scene elements of the scene to be tested, a defect test scenario model consisting of a state space model and an action space model is constructed, and a reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to generate a test scenario.

Benefits of technology

The independence between the test scene generation process and the vehicle of the test system is enhanced, so that the generated scene is not affected by the motion model adopted by the test system, and the objectivity and testing efficiency of the scene are improved, efficient testing can be carried out in a virtual environment, reducing the testing cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598861A_ABST
    Figure CN119598861A_ABST
Patent Text Reader

Abstract

The invention provides a test scene generalization generation method and system for automatic driving defect test, and belongs to the technical field of automatic driving test. Specifically, scene elements of a scene to be tested are extracted, and the extracted scene elements are divided into a training set and a test set; constructing a defect test scene model; training the defect test scene model based on the training set, and performing reinforcement learning by using a reward function, an attention mechanism and a DDQN algorithm to obtain a trained defect test scene model; and inputting the scene elements of the test set into the trained defect test scene model to generate a test scene. The test scene around the automatic driving vehicle is extracted and trained, and the automatic driving vehicle judges the influence degree of the surrounding environment on the predicted path, so that the training purpose is achieved, the independence between the test scene generation process and the tested system vehicle is enhanced, and the test efficiency is improved. And the generated scene is not influenced by the motion model adopted by the tested system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous driving testing, and in particular relates to a method and system for generalizing and generating test scenarios for autonomous driving defect testing. Background Art

[0002] As the level of autonomous driving and the complexity of the system continue to increase, traditional testing methods can no longer meet the needs of autonomous driving system testing. At present, scenario-based virtual simulation testing technology has become an important idea for solving the performance testing problems of autonomous driving systems due to its advantages such as flexible scenario configuration, safe testing process and low cost. Establishing a complete high-value and highly generalized test scenario acceleration generation method to maximize test efficiency while ensuring the rationality and completeness of the test is the main task of scenario testing research for autonomous driving systems.

[0003] According to statistics, 70% of rear-end collisions or scratches involving self-driving cars are caused by other motor vehicles driving improperly, such as changing lanes at will, forcing self-driving cars to change lanes and overtake, and other violations of traffic rules. Self-driving cars actively collide with other road traffic participants due to their own system defects, accounting for 18.8% of the total number of accidents. The main causes are: the front vehicle suddenly brakes or forces itself into the road where the self-driving car is driving without using the corresponding indicator lights (such as turn signals). It is difficult for self-driving cars to effectively classify and identify the social vehicle form and bad driving behavior, resulting in scratches. However, the above scenarios are difficult to reproduce in real vehicle test sites and are highly dangerous. They account for a small proportion of the simulation test scenario library and are only applied to specific conditions, which seriously hinders the testing process of the autonomous driving system.

[0004] In response to this problem, existing research on modeling methods for such scenarios has the problem of insufficient dynamic interaction. Ego vehicles only focus on achieving a single driving goal and ignore the multiple complex constraints that need to be followed during actual driving, which is quite different from the complex interactive games in the real world. Currently, most autonomous driving systems still rely on manually designed finite state machine rules for encoding. This means that these methods can only solve a small number of specific use cases and cannot be extended to more complex scenarios, especially when decisions involve interacting with other human drivers whose behaviors are uncertain and difficult to model explicitly. Summary of the invention

[0005] The purpose of the present invention is to overcome the problems in existing autonomous driving technology simulation test scenarios, such as the training strategy ignoring environmental information limitations and background vehicle interactions, and being restricted to specific use cases, and to provide a test scenario generalization generation method and system for autonomous driving defect testing.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for generalizing and generating test scenarios for autonomous driving defect testing, comprising the following steps:

[0008] Extract scene elements from the scene to be tested, and divide the extracted scene elements into a training set and a test set;

[0009] Construct a defect test scenario model, which consists of a state space model and an action space model. The state space model is used to describe the state of each element in the test scenario and its change over time, and the action space model is used to describe various driving actions that the autonomous vehicle may take.

[0010] The defect test scenario model is trained based on the training set, and the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to obtain a trained defect test scenario model;

[0011] Input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

[0012] The scene element extraction for the scene to be tested includes: performing data cleaning and standardization processing on the extracted scene element features, and dividing the training set and the test set according to the processed scene element features.

[0013] The state space model for constructing the defect test scenario model adopts the following method:

[0014] The state space of the highway lane change test scenario is defined as: S = [S V_ego ,S V_back ];

[0015] Where S V_ego , S V_back Respectively represent the status information of the autonomous driving vehicle and the background vehicle;

[0016]

[0017] Among them, x ego ,y ego are the x-axis and y-axis offsets of the autonomous vehicle in the world coordinate system; v x_ego , v y_ego are the speeds of the autonomous vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the front of the autonomous driving vehicle; x back ,y back are the x-axis and y-axis offsets of the background vehicle in the world coordinate system; v x_back ,v y_backare the speeds of the background vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the background vehicle’s front.

[0018] The action space model for constructing the defect test scenario model adopts the following method:

[0019] The action space is defined as: Action = [l left ,l right ,v keep ,v faster ,v slower ];

[0020] Among them, l left ,l right Indicates the action of the autonomous driving vehicle changing lanes left or right; v keep ,v faster ,v slower They represent the actions of the autonomous vehicle to maintain the current speed, accelerate, and brake respectively.

[0021] The defect test scenario model is trained based on the training set, and the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to obtain the trained defect test scenario model. The training method is as follows:

[0022] Input scene element variable i and time variable t to calculate a dynamic state variable Expressed as Describe how the scene changes over time;

[0023] Dynamic state variables And the set scene evaluation indicators Compare and obtain the evaluation index deviation;

[0024] According to the evaluation index deviation, the reward function, attention mechanism and DDQN algorithm are combined to optimize and update the model parameters to obtain a trained defect test scenario model.

[0025] The method of combining the reward function, attention mechanism and DDQN algorithm to optimize and update model parameters is as follows:

[0026] Design reward function based on evaluation index deviation;

[0027] The DDQN algorithm uses a reward function to learn the best strategy to minimize the deviation of the evaluation index;

[0028] At the same time, the attention mechanism helps the DDQN algorithm focus on the most important scene features or adjustment points.

[0029] The reward function R includes a speed reward function r1, a lane reward function r2, a road detection reward function r3 and a collision detection reward function r4;

[0030] Based on the highway scenario, setting the autonomous vehicle to maintain high speed as a strong reward:

[0031] The autonomous vehicle is in a specified speed range [v min ,v max ] to obtain tiered rewards;

[0032] The reward function is:

[0033] Among them, k1 represents the speed reward level of the autonomous driving vehicle, k2 represents the lane reward level of the autonomous driving vehicle, k3 represents the reward level for whether the autonomous driving vehicle is driving on the road, and k4 represents the reward level for whether the autonomous driving vehicle collides.

[0034] In a second aspect, the present invention provides a test scenario generalization generation system for autonomous driving defect testing, comprising:

[0035] A scene element extraction module is used to extract scene elements from the scene to be tested and divide the extracted scene elements into a training set and a test set;

[0036] Model building module, used to build defect test scenario models;

[0037] The reinforcement learning training module is used to train the defect test scenario model based on the training set, and uses the reward function, attention mechanism and DDQN algorithm for reinforcement learning to obtain a trained defect test scenario model;

[0038] The test scenario generation module is used to input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

[0039] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a method for generalizing and generating test scenarios for autonomous driving defect testing.

[0040] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the computer program implements the steps of a method for generalizing and generating test scenarios for autonomous driving defect testing.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] The present invention provides a method and system for generalizing and generating test scenarios for autonomous driving defect testing. Specifically, scene elements are extracted from the scene to be tested, and the extracted scene elements are divided into a training set and a test set; a defect test scenario model is constructed, which consists of a state space model and an action space model, the state space model is used to describe the state of each element in the test scenario and its change law over time, and the action space model is used to describe various driving actions that may be taken by the autonomous driving vehicle; the defect test scenario model is trained based on the training set, and a reward function, an attention mechanism and a DDQN algorithm are used for reinforcement learning to obtain a trained defect test scenario model; the scene elements of the test set are input into the trained defect test scenario model to generate a test scenario. By extracting and training the test scene around the autonomous driving vehicle, the autonomous driving vehicle judges the degree of influence of the surrounding environment on the predicted path, and thereby achieves the training purpose, the independence between the test scenario generation process and the vehicle of the system under test is enhanced, so that the generated scene is not affected by the motion model adopted by the system under test, and the scene objectivity is higher for subsequent testing.

[0043] Furthermore, the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning, so that the model can continuously optimize its driving strategy during the training process. The reward function can guide the model to learn how to improve driving efficiency while ensuring safety; the attention mechanism enables the model to focus on the key elements in the scene and improve the accuracy and reliability of decision-making; and the DDQN algorithm improves the stability and accuracy of the model by reducing the over-estimation problem.

[0044] Furthermore, by building a defect test scenario model and generating test scenarios, efficient testing can be performed in a virtual environment, greatly reducing the testing cost. At the same time, since the model can learn the driving rules of autonomous vehicles in different scenarios, it can also reduce repetitive work in field testing and further improve testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flow chart of the present invention;

[0046] Figure 2 This is a schematic diagram of model training;

[0047] Figure 3 The attention mechanism architecture of the present invention;

[0048] Figure 4 The working process of the DDQN algorithm used in the present invention;

[0049] Figure 5 It is a system diagram of the present invention;

[0050] Figure 6This is a system diagram of Example 3 of the present invention. DETAILED DESCRIPTION

[0051] In order to further understand the content of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.

[0052] Embodiment 1:

[0053] like Figure 1 As shown, a test scenario generalization generation method for autonomous driving defect testing includes the following steps:

[0054] S1: Extract scene elements from the scene to be tested, and divide the extracted scene elements into a training set and a test set;

[0055] S2: Construct a defect test scenario model, which consists of a state space model and an action space model. The state space model is used to describe the state of each element in the test scenario and its change over time, and the action space model is used to describe various driving actions that the autonomous driving vehicle may take.

[0056] S3: Train the defect test scenario model based on the training set, use the reward function, attention mechanism and DDQN algorithm for reinforcement learning, and obtain the trained defect test scenario model;

[0057] S4: Input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

[0058] Specifically, the scenarios to be tested in S1 include micro lane change and cut-in scenarios and macro multi-vehicle interaction scenarios:

[0059] The scene elements of the micro lane change cut-in scene include scene elements, vehicle speed, vehicle position and vehicle heading angle;

[0060] The scenario elements of the macro multi-vehicle interaction scenario include the number of lanes, traffic rules, traffic density and expected speed range.

[0061] Specifically, the state space of the highway lane change test scenario is defined in S2 as: S = [S V_ego ,S V_back ];

[0062] Where S V_ego , S V_back They represent the status information of the ego vehicle and the background vehicle respectively. The specific contents are as follows:

[0063] where x ego ,y egoare the x-axis and y-axis offsets of the autonomous vehicle in the world coordinate system; v x_ego , v y_ego are the speeds of the autonomous vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the front of the autonomous driving vehicle; x back ,y back are the x-axis and y-axis offsets of the background vehicle in the world coordinate system; v x_back ,v y_back are the speeds of the background vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the background vehicle’s front.

[0064] Specifically, when establishing the test scene action space model in S2, the discrete action space is used as the operation selection space of the reinforcement learning model, and the action space of the highway lane change test scene is defined as: Action = [l left ,l right ,v keep ,v faster ,v slower ].

[0065] Among them, l left ,l right Indicates the action of the autonomous driving vehicle changing lanes left or right; v keep ,v faster ,v slower They represent the actions of the autonomous vehicle to maintain the current speed, accelerate, and brake respectively.

[0066] Specifically, Figure 2 As shown, the specific steps in S3 are as follows:

[0067] S31: Input scene element variable i and time variable t to calculate a dynamic state variable Expressed as Describe how the scene changes over time;

[0068] S32: Dynamic state variables And the set scene evaluation indicators Compare and obtain the evaluation index deviation;

[0069] S33: According to the evaluation index deviation, the reward function, attention mechanism and DDQN algorithm are combined to optimize and update the model parameters to obtain a trained defect test scenario model.

[0070] Specifically, the method described in S33 for optimizing and updating model parameters by combining the reward function, the attention mechanism, and the DDQN algorithm is as follows:

[0071] Design reward function based on evaluation index deviation;

[0072] The DDQN algorithm uses a reward function to learn the best strategy to minimize the deviation of the evaluation index;

[0073] The attention mechanism helps the DDQN algorithm focus on the most important scene features or adjustment points.

[0074] Specifically, we set the reward function. Based on the highway scenario, we set the action logic of the ego vehicle to maintain high speed as a strong reward: the ego vehicle only drives at a specified speed range [v min ,v max ] to obtain the tiered rewards.

[0075] 1) In order to accelerate convergence, the original velocity data is linearly scaled to the interval [a, b] and normalized mapping is performed in the interval [a, b]. The formula is as follows:

[0076] Among them, r1 represents the driving speed function of the autonomous vehicle, v x_ego Represents the raw speed data of the ego vehicle.

[0077] 2) The left lane of the highway is the fast lane, so in order to generate high coverage of the scene and encourage the ego vehicle to make risky behaviors such as changing lanes and overtaking, the vehicle driving to the left is set as a weak reward: the lane attributes are described using the lane coordinate system, and the id of the leftmost lane is set to 0, and it increases in sequence to the right. The more the ego vehicle drives to the left, the higher the reward it gets. The formula is as follows:

[0078]

[0079] Where r2 represents the lane function of the autonomous vehicle, i l refers to the number of all lanes; target_lane refers to the target lane in the ego vehicle decision module. Not using the current lane as a parameter is to encourage the ego vehicle to actively explore the environment and generate a large number of lane changing behaviors.

[0080] 3) The road detection function will monitor in real time whether the ego vehicle is still on the road and return r3. If r3 is False, the current round ends:

[0081]

[0082] 4) The collision detection function will monitor the ego vehicle in real time to see if there is a collision and return r4. If r4 is False, the current round ends:

[0083]

[0084] The final reward function is:

[0085]

[0086] Among them, k1 represents the speed reward level of the autonomous driving vehicle, k2 represents the lane reward level of the autonomous driving vehicle, k3 represents the reward level for whether the autonomous driving vehicle is driving on the road, and k4 represents the reward level for whether the autonomous driving vehicle collides.

[0087] Specifically, the design of the attention mechanism architecture in S33 is as follows Figure 3 As shown: It includes three parts: encoding layer, ego-attention mechanism, and decoding layer;

[0088] This phase works as follows: the ego vehicle first passes through the embedded linear encoder Compute and emit a single query vector where d k represents the dimension of the key. Next, the query vector is associated with a set of keys containing descriptive features of each vehicle. For comparison, feature k i By embedded linear encoder Calculate the generation by performing a dot product q0k on them i T To evaluate query q0 with each key k i Then these similarities are divided by 1 / Scaling and normalizing between vehicles using the softmax function results in a random matrix called the attention matrix. The generated attention matrix is ​​finally aggregated into a set of output values ​​V = [v0, ..., v N ], where v i All through a shared linear encoder The generated features are then passed to the ego-attention stacked by multiple heads.

[0089] The above process can be expressed mathematically as follows:

[0090] The outputs of all attention heads are finally merged through a linear layer to generate an output related to the ego vehicle, generating the driving trajectory, control signals, etc. of the ego vehicle.

[0091] Specifically, Figure 4 As shown, the working process of the DDQN algorithm in S33 is:

[0092] The test scene state is input into the deep neural network, and the neural network outputs the Q value corresponding to each possible action. DDQN selects the action with the maximum Q value to determine the optimal behavior in the current state, controls the autonomous vehicle to perform the corresponding action A, generates new scene elements, and rewards according to the reward function R. The new test scene state is input into the neural network for training. In the deep neural network, the action strategy with the maximum Q value is executed, and according to the current agent state of the autonomous vehicle, the Q value strategy of the maximum Q value action target of the next state is calculated, and the current action strategy is updated.

[0093] Furthermore, in this embodiment, the intelligent driving strategy of the automatic driving system uses the IDM model, and the model expression of the intelligent driving is:

[0094]

[0095] Where: represents the vehicle acceleration; v is the current speed of the vehicle; v0 is the expected speed of the vehicle; Δv is the speed difference between the vehicle and the front vehicle; d is the distance to the front vehicle; d0 is the minimum following distance; d * is the ideal following distance that the vehicle wants to maintain with the vehicle in front. If the distance between the vehicle and the vehicle in front is less than this value, the vehicle may take actions to slow down or avoid collision. This simulates the behavior of drivers on real roads, ensuring safe and smooth traffic by maintaining a certain following distance; α, b are the maximum acceleration and maximum deceleration; δ is the acceleration influence index; T is the safe time interval that the driving model expects to maintain between the vehicle in front.

[0096] In this embodiment, the basic parameter settings of the attention mechanism training are shown in Tables 1 and 2, where d x is the size of the individual features contained in the embedding layer. Since the linear encoder is shared, the input and output sizes are symmetric.

[0097] Table 1 DDQN network training parameters

[0098] parameter Training Values Reward value discount factor 0.99 Learning Rate 0.0005 Greedy value initial value 0.9 Greed value round reduction 0.0001 Experience Buffer 15000 Sampling sample size 64 Update step 512

[0099] Table 2 Attention structure parameters

[0100]

[0101] Embodiment 2:

[0102] A test scenario generalization generation system for autonomous driving defect testing, whose composition structure is as follows:

[0103] like Figure 5 As shown, a test scenario generalization generation system for autonomous driving defect testing includes:

[0104] A scene element extraction module is used to extract scene elements from the scene to be tested and divide the extracted scene elements into a training set and a test set;

[0105] Model building module, used to build defect test scenario models;

[0106] The reinforcement learning training module is used to train the defect test scenario model based on the training set, and uses the reward function, attention mechanism and DDQN algorithm for reinforcement learning to obtain a trained defect test scenario model;

[0107] The test scenario generation module is used to input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

[0108] The reinforcement learning training module includes a scene dynamics system, a scene evaluation target system and a defect scene controller;

[0109] The scene dynamics system continuously evolves the scene state, the scene evaluation target system provides the ideal target value, and the defect scene controller continuously adjusts and optimizes the scene, trying to make the state of the actual scene gradually approach the target state, forming a feedback loop.

[0110] 1) Scenario dynamics system: focuses on the interaction and dynamic changes between elements in the scene, and is used to simulate, analyze and optimize behavior patterns, trends and possible results in specific scenarios. The system calculates a dynamic state variable x through input variables i and time variables t, which is expressed as a differential equation Describe how a scene changes over time.

[0111] 2) Scenario evaluation target system:

[0112] Scenario evaluation target system: A system used to evaluate the value, effect and feasibility of scenarios. It defines the evaluation targets that the scenarios should ideally achieve, including evaluation criteria for the completeness and complexity of the scenarios. These targets are preset ideal values, and the system will continuously adjust towards these targets.

[0113] 3) Defect scene controller:

[0114] By analyzing, predicting and intervening in defect scenarios, the failure rate of software or systems can be reduced and their stability and reliability can be improved. The controller compares the output of the scenario dynamics system by evaluating the index The difference between the scenario target value in the scenario evaluation target system is used to calculate the evaluation index deviation.

[0115] This deviation drives the defective scenario controller to take action by generating a reinforcement model, adjusting certain parameters of the scenario, and then feeding back to the scenario dynamics system to correct or optimize the performance of the scenario.

[0116] The adjustment of the defective scene controller is based on the reinforcement learning module, which gradually reduces the deviation of the evaluation index through continuous iterative learning. The reinforcement learning module includes the DDQN algorithm, reward function and attention mechanism, which work together on the defective scene controller. The DDQN algorithm learns the best strategy through the reward function to minimize the deviation of the scene evaluation, and the attention mechanism can help the algorithm focus on the most important scene features or adjustment points.

[0117] Embodiment 3:

[0118] like Figure 6 As shown, the present invention also provides an electronic device 100 for a method for generalizing test scenarios for autonomous driving defect testing; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0119] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the test scenario generalization generation method for autonomous driving defect testing described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0120] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.

[0121] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for generalizing and generating test scenarios for autonomous driving defect testing, and the processor 102 may execute the plurality of instructions to implement:

[0122] Extract scene elements from the scene to be tested, and divide the extracted scene elements into a training set and a test set;

[0123] Construct a defect test scenario model, which consists of a state space model and an action space model. The state space model is used to describe the state of each element in the test scenario and its change over time, and the action space model is used to describe various driving actions that the autonomous vehicle may take.

[0124] The defect test scenario model is trained based on the training set, and the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to obtain a trained defect test scenario model;

[0125] Input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for generalizing test scenarios for autonomous driving defect testing, characterized in that: The steps include: Extract scene elements from the scene to be tested, and divide the extracted scene elements into a training set and a test set; Construct a defect test scenario model, which consists of a state space model and an action space model. The state space model is used to describe the state of each element in the test scenario and its change over time, and the action space model is used to describe various driving actions that the autonomous vehicle may take. The defect test scenario model is trained based on the training set, and the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to obtain a trained defect test scenario model; Input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

2. The method for generalizing test scenarios for autonomous driving defect testing according to claim 1, characterized in that: The scene element extraction for the scene to be tested includes: performing data cleaning and standardization processing on the extracted scene element features, and dividing the training set and the test set according to the processed scene element features.

3. The method for generalizing test scenarios for autonomous driving defect testing according to claim 1, characterized in that: The state space model for constructing the defect test scenario model adopts the following method: The state space of the highway lane change test scenario is defined as: ; In the formula , Respectively represent the status information of the autonomous driving vehicle and the background vehicle; , ; in, , They are the x-axis and y-axis offsets of the autonomous vehicle in the world coordinate system; , are the speeds of the autonomous vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the front of the autonomous driving vehicle; , They are the x-axis and y-axis offsets of the background vehicle in the world coordinate system; are the speeds of the background vehicle on the x-axis and y-axis respectively; Indicates the heading deviation angle of the front of the background vehicle.

4. The method for generalizing test scenarios for autonomous driving defect testing according to claim 1, characterized in that: The action space model for constructing the defect test scenario model adopts the following method: The action space is defined as: ; in, Indicates that the autonomous vehicle is changing lanes left or right; They represent the actions of the autonomous vehicle to maintain the current speed, accelerate, and brake respectively.

5. The method for generalizing test scenarios for autonomous driving defect testing according to claim 1, characterized in that: The defect test scenario model is trained based on the training set, and the reward function, attention mechanism and DDQN algorithm are used for reinforcement learning to obtain the trained defect test scenario model. The training method is as follows: Input scene feature variables and time variables , calculate a dynamic state variable , expressed as , describing how the scene changes over time; Dynamic state variables And the set scene evaluation indicators Compare and obtain the evaluation index deviation; According to the evaluation index deviation, the reward function, attention mechanism and DDQN algorithm are combined to optimize and update the model parameters to obtain a trained defect test scenario model.

6. The method for generalizing test scenarios for autonomous driving defect testing according to claim 5, characterized in that: The method of combining the reward function, attention mechanism and DDQN algorithm to optimize and update model parameters is as follows: Design reward function based on evaluation index deviation; The DDQN algorithm uses a reward function to learn the best strategy to minimize the deviation of the evaluation index; The attention mechanism helps the DDQN algorithm focus on the most important scene features or adjustment points.

7. The method for generalizing and generating test scenarios for autonomous driving defect testing according to claim 6, characterized in that: The reward function Including speed function r 1. Lane function r 2. Road detection function r 3 and collision detection function r 4; Based on the highway scenario, setting the autonomous vehicle to maintain high speed as a strong reward: The autonomous vehicle is in a specified speed range Get tiered rewards by driving within the speed limit; The reward function is: ; in, k 1 represents the speed bonus level of the autonomous vehicle, k 2 represents the lane reward level of the autonomous vehicle, k 3 represents the reward level for whether the autonomous vehicle is driving on the road, k 4 represents the reward level for whether the autonomous vehicle crashes.

8. A test scenario generalization generation system for autonomous driving defect testing, characterized in that: include: A scene element extraction module is used to extract scene elements from the scene to be tested and divide the extracted scene elements into a training set and a test set; Model building module, used to build defect test scenario models; The reinforcement learning training module is used to train the defect test scenario model based on the training set, and uses the reward function, attention mechanism and DDQN algorithm for reinforcement learning to obtain a trained defect test scenario model; The test scenario generation module is used to input the scenario elements of the test set into the trained defect test scenario model to generate a test scenario.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of a test scenario generalization generation method for autonomous driving defect testing according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a test scenario generalization generation method for autonomous driving defect testing described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Automatic driving acceleration test scene extraction method and evaluation method

    CN120994568A

  • An automatic driving acceleration test scene extraction method and evaluation method

    CN120994568B