Automatic driving test method and automatic driving test device

Through implicit importance sampling method and acceptance-reject sampling technology, the inefficiency of safety assessment in complex environments in autonomous driving tests is solved, and an efficient testing process and accurate accident probability estimation is achieved.

CN119442627APending Publication Date: 2025-02-14TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411479527.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Existing autonomous driving testing methods are difficult to effectively evaluate the safety of systems in complex and extreme environments, especially due to high-dimensional complexity and the scarcity of safety-critical events, resulting in low testing efficiency and high cost.

Method used

Implicit importance sampling (IIS) method is used to obtain natural driving environments and test conditions, and to obtain test scenarios related to preset events using accept-reject sampling and estimate the probability of accidents. This method does not rely on explicit traffic probability distribution, and by optimizing the sampling distribution, the sampling efficiency of risk scenarios is improved.

Benefits of technology

It improves the efficiency of autonomous driving testing, reduces time and calculation costs, and is especially suitable for high-dimensional complex natural acceleration environment models, which can effectively evaluate the performance of autonomous driving systems in hazardous environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442627A_ABST
    Figure CN119442627A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic driving test method and an automatic driving test device, which can obtain proposal distribution with relatively high risk and perform sampling without depending on explicit traffic probability distribution through an acceptance-rejection sampling method, and meanwhile, obtain a non-normalized sampling weight for estimating a test result. The limitation in the related technology is solved, the test efficiency is improved, and the method is particularly suitable for carrying out acceleration test on a high-dimensional complex natural acceleration environment model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of autonomous driving technology, and specifically to an autonomous driving test method and an autonomous driving test device. Background Art

[0002] With the rapid development of autonomous driving technology, how to effectively evaluate its safety has become a key challenge. Autonomous vehicles need to operate in complex and changing traffic environments, and the incidence of potential safety risks (such as traffic accidents) is extremely low. This makes it very difficult to test its safety in various environments through traditional methods, and it is difficult to fully evaluate the system's performance in dealing with extreme or dangerous scenarios.

[0003] At present, most of the tests of autonomous driving rely on natural driving environments (NDE) or test scenarios generated by simulation. The NDE method constructs scenarios based on real-world vehicle behavior data. Although it can simulate natural driving scenarios, it is difficult to cover rare safety-critical events. The simulation method evaluates the performance of autonomous driving systems in extreme environments by artificially designing specific driving scenarios, such as adversarial driving behaviors. However, these methods face challenges in achieving a balance between the adversarial nature and authenticity of the scenarios, and it is difficult to obtain equivalent or unbiased estimation results in the real environment.

[0004] Due to the high-dimensional complexity of autonomous driving scenarios and the scarcity of safety-critical events, traditional autonomous driving testing methods require a large amount of real road test data to cover all possible scenarios. This large-scale testing is not only time-consuming and costly, but also difficult to achieve. In addition, many extreme driving scenarios cannot be effectively covered by conventional testing methods. Therefore, how to improve testing efficiency has become one of the core issues in autonomous driving safety verification. Summary of the invention

[0005] The present application provides an autonomous driving test method and an autonomous driving test device, which can improve test efficiency.

[0006] An embodiment of the present invention provides an automatic driving test method, including:

[0007] Obtain natural driving environment and test conditions;

[0008] Obtain the probability of risky behavior based on prior knowledge and set hyperparameters;

[0009] Performing acceptance-rejection sampling on the control input to obtain at least one test scenario related to a preset event;

[0010] An autonomous driving test is performed using at least one test scenario obtained by sampling to estimate the accident probability.

[0011] In an exemplary embodiment, the method further includes: performing upper and lower bound analysis on the estimation result of the accident probability.

[0012] In an exemplary embodiment, the implicit sampling probability of the test environment is P(x); P(x) describes the state distribution of the vehicle in a real traffic environment.

[0013] In an exemplary embodiment, the test condition is obtained by setting test parameters;

[0014] The test parameters include: maximum test duration T or maximum test distance D, and number of tests n.

[0015] In an exemplary embodiment, acquiring the natural driving environment includes:

[0016] The environmental variable distribution P(x) is constructed based on the autonomous driving environment information, and the sampling distribution q(x) is obtained through the implicit importance sampling method; where P(x) is the implicit sampling probability P(x) of the test environment, which is used to describe the performance of the autonomous driving vehicle in the test scenario.

[0017] In an exemplary embodiment, the step of obtaining the sampling distribution q(x) by using an implicit importance sampling method includes:

[0018] A sampling distribution q(x) is set, and the sampling distribution q(x) is adjusted by implicit importance sampling to make it closer to the target distribution; the probability of occurrence of the event pre-set in the autonomous driving test is estimated according to the adjusted sampling distribution q(x).

[0019] In an exemplary embodiment, the risk behavior probability H1 is obtained according to the following formula:

[0020]

[0021] Among them, u c is a set of risky actions determined based on experience or analysis, indicating which control inputs belong to risky actions; P(u|s(k)) is the probability distribution of the control input u when the state s(k) is given, and the integral is the probability distribution of the control input u in the dangerous action set u c H1(s(k)) represents the sum of probabilities of all possible control inputs u in state s(k).

[0022] In an exemplary embodiment, the hyperparameters are set according to the following formula; the hyperparameters include a first hyperparameter K1 and a second hyperparameter K2:

[0023] minc ik =(K1-1)·minH1+K2;

[0024] maxc ik=(K1-1)·maxH1+K2;

[0025] Among them, the first hyperparameter K1 and the second hyperparameter K2 are used to adjust c ik Hyperparameters; H1 is the risk behavior probability, which means the probability of dangerous action under state s(k); minc ik and maxc ik c ik The upper and lower bounds of .

[0026] In an exemplary embodiment, the c(x i ) has lower and upper bounds:

[0027]

[0028] Among them, T i ,c represents the scene x i The set of related states and moments, representing the scene x i Below, the set of all moments related to the event A.

[0029] In an exemplary embodiment, the acquiring at least one test scenario related to a preset event includes:

[0030] Generate a candidate control input through a sampling distribution q(u(k)|s(k)) of the control input u(k);

[0031] Calculate the acceptance probability P of the candidate control input acc (u(k)|s(k)) and perform acceptance-rejection sampling;

[0032] The acceptance-rejection sampling process is performed at each time point k to generate a test scenario consisting of a sequence of scenarios, and the acceptance-rejection sampling is repeated to generate multiple test scenarios.

[0033] In an exemplary embodiment, the sampling distribution q(u(k)|s(k)) is adjusted and normalized by importance sampling.

[0034] In an exemplary embodiment, the accident probability is estimated using the following formula, including:

[0035]

[0036] in,

[0037] in, is the estimated result of the accident probability; E q represents the expectation under the sampling distribution q(x); w u (xi ) is the sample weight in the acceptance-rejection sampling method; x i ~q(x) represents a sample drawn from the sampling distribution q(x); P(A|x i ) indicates a given environment variable x i The probability of event A occurring under the condition .

[0038] In an exemplary embodiment, the performing upper and lower bound analysis on the estimation result of the accident probability includes:

[0039] By analyzing the upper and lower bounds of the sampling weight c(x), adjusting the first hyperparameter K1 and the second hyperparameter K2;

[0040] The upper and lower bounds of the probability P(A) of the event A occurring are calculated by combining the confidence level λ and the standard deviation function std(·).

[0041] In an exemplary embodiment, the upper and lower bounds of the probability P(A) of the event A occurring are as follows:

[0042]

[0043] in, represents the minimum value of the estimated result of the accident probability, c max (x) and c min (x) represents the upper and lower bounds of c(x), Represents the maximum value of the estimated results of the accident probability.

[0044] An embodiment of the present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above-mentioned autonomous driving test methods.

[0045] An embodiment of the present application further provides an autonomous driving test device, including a memory and a processor, wherein the memory stores the following instructions executable by the processor: used to execute the steps of any of the autonomous driving test methods described above.

[0046] The autonomous driving test method proposed in the embodiment of the present application uses an acceptance-rejection sampling method to obtain a high-risk proposal distribution and perform sampling without relying on an explicit traffic probability distribution, and at the same time obtains an unnormalized sampling weight for estimating the test results. This solves the limitations of related technologies, improves test efficiency, and is particularly suitable for accelerated testing of high-dimensional and complex natural acceleration environment models.

[0047] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0049] Figure 1 This is a flow chart of the autonomous driving test method in an embodiment of the present application;

[0050] Figure 2 This is a schematic diagram of a comparative experiment of IIS and NDE test results in the autonomous driving test method of the present application under NDE-I in the embodiment of the present application;

[0051] Figure 3 This is a schematic diagram of an experiment on the error analysis results of IIS in the autonomous driving test method of the present application under NDE-I in the embodiment of the present application;

[0052] Figure 4 This is a schematic diagram of a comparative experiment of IIS and NDE test results in the autonomous driving test method of the present application under NDE-II in an embodiment of the present application;

[0053] Figure 5 This is a schematic diagram of an experiment on the error analysis results of IIS in the autonomous driving test method of the present application under NDE-II in the embodiment of the present application;

[0054] Figure 6 This is a schematic diagram of the composition structure of the autonomous driving test device in the embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0056] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0058] It is understood that the terms "first" and "second" used in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0059] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.

[0060] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0061] For example, x represents the test environment and A represents an event related to the performance of the autonomous vehicle. Event A can be an event of interest pre-set in the autonomous driving test, such as the occurrence of a traffic accident. In the autonomous driving test, it is hoped to estimate the probability of event A to evaluate the performance of the autonomous vehicle. The probability of event A can be expressed as P(A) = ∑ x∈X P(A|x)P(x), the test environment x is sampled based on the probability distribution P(x). Based on the Monte Carlo sampling method in the relevant technology, the estimated value of P(A) can be obtained as shown in formula (1):

[0062]

[0063] Formula (1) is used in related technologies to describe the probability of occurrence of event A pre-set in autonomous driving tests. It is an expected estimate of the probability of occurrence of event A, where x represents the state variable (such as position, speed, etc.) in the autonomous driving environment. By constructing the distribution of P(x), various states in the test scenario are described. In formula (1), x irepresents the test scenario obtained by sampling the probability distribution P(x), n represents the sampling times, i.e. the number of samples, and m represents the number of times event A occurs; E P represents the expectation under the distribution P(x), P(A|x) represents the conditional probability of event A occurring given the environmental variable x, x i ~P(x) represents a sample drawn from the distribution P(x).

[0064] Since the probability of a traffic accident is extremely low in a real autonomous driving environment, the Monte Carlo sampling-based estimation using formula (1) requires a large number of samples to obtain an accurate estimate of the accident rate, and the time and economic costs it relies on are extremely high. In other words, for scenarios such as autonomous driving, when event A is a low-probability event (such as a traffic accident), most of the states x sampled from P(x) will not have event A, resulting in a large number of samples having very low weights, and thus a large number of samples need to be generated to obtain a stable and accurate estimate, resulting in a waste of time costs and computing resources.

[0065] In order to improve test efficiency, a series of accelerated testing methods have been proposed. For example, the importance sampling-based method reduces the number of tests required by changing the probability of a scene being sampled, increasing the probability of events such as traffic accidents. However, these methods usually rely on explicit traffic probability distributions, which are often difficult to achieve in practice due to the complexity and high dimensionality of the traffic environment. In other words, current autonomous driving testing methods usually rely on explicit, often difficult to obtain, traffic behavior distributions, and cannot effectively cope with complex high-dimensional traffic environments.

[0066] In order to solve any of the above problems, the present application embodiment proposes an autonomous driving test method. Figure 1 The flowchart of the automatic driving test method in the embodiment of the present application is as follows: Figure 1 As shown, this may include:

[0067] Step 100: Acquire natural driving environment and test conditions.

[0068] In an exemplary embodiment, a natural driving environment can be obtained from a real or simulated autonomous driving scenario. The implicit sampling probability of these environments can be expressed as P(x), which describes the state distribution of the vehicle in the real traffic environment. The implicit sampling probability of the natural driving environment is P(x), that is, the environmental variable distribution P(x).

[0069] In an exemplary embodiment, the test conditions can be obtained by setting the test parameters. The obtained test conditions may include, but are not limited to, the maximum test time T or the maximum test distance D, the number of tests n, etc. Among them, the maximum test time T or the maximum test distance D defines the upper limit of the time or distance that the vehicle can experience during the test. The number of tests n refers to the number of independent tests planned to be performed, that is, the total amount of simulation or real tests.

[0070] Through step 100, the total scale of the test is determined, and the state in the natural driving environment is described by the implicit sampling probability P(x).

[0071] In an exemplary embodiment, obtaining the natural driving environment in step 100 may include:

[0072] The environmental variable distribution P(x) is constructed based on the autonomous driving environment information, and the sampling distribution q(x) is obtained through the implicit importance sampling method.

[0073] The environmental variable distribution P(x) constructed based on the autonomous driving environment information in step 100 is constructed by collecting various environmental information in the autonomous driving test to describe the performance of the autonomous driving vehicle in a specific test scenario.

[0074] Environmental information may include, but is not limited to, speed, position, sensor data, etc. In one embodiment, x represents the test environment, and x is a multidimensional vector representing all environmental variables and vehicle status information involved in the autonomous driving process. For example, it may include, but is not limited to: position (Position) such as the specific coordinates of the vehicle in the test area, speed (Speed) that is, the current speed of the vehicle, acceleration (Acceleration) that is, the acceleration information of the vehicle, environmental factors (Environmental Factors) such as weather conditions, road types (slippery, dry, etc.), traffic density, etc., sensor data (Sensor Data) such as the surrounding environment information collected by sensors such as lidar and cameras at different time points, and so on.

[0075] Due to the high dimensionality and complexity of the traffic environment, the modeling of the natural driving environment is often based on a very complex model structure, such as a neural network. The complexity and black-box nature of the model make it difficult for us to explicitly obtain the probability distribution P(x), and we can only obtain sampling results based on implicit probability distribution, which limits the traditional testing methods based on explicit distribution. Therefore, in order to solve this problem, the embodiment of the present application proposes an implicit importance sampling method (IIS, Implicit Importance Sampling).

[0076] In an exemplary embodiment, obtaining the sampling distribution q(x) by implicit importance sampling in step 100 may include:

[0077] A sampling distribution q(x) is set, and the sampling distribution q(x) is adjusted by implicit importance sampling to make it closer to the target distribution; the probability of occurrence of an event preset in the autonomous driving test is estimated according to the adjusted sampling distribution q(x). In the embodiment of the present application, the sampling distribution q(x) is designed to be closer to the states where event A will occur, so that samples related to event A can be encountered more frequently during sampling.

[0078] In an exemplary embodiment, when importance sampling is used, the estimated value of P(A) is shown in formula (2):

[0079]

[0080] In formula (2), q(x) is the importance sampling distribution, which is used to generate samples; E q represents the expectation under the sampling distribution q(x); Represents the importance weight, which is used to adjust the sample weight. i ~q(x) represents the test scenario sampled according to the sampling distribution q(x), that is, the samples drawn from the sampling distribution q(x).

[0081] In formula (2), the weight It is used to adjust the samples generated from the sampling distribution q(x) so that they are more representative of the target distribution P(x) when the calculation is expected. By designing a more efficient sampling distribution q(x), the number of required samples is greatly reduced, thereby improving sampling efficiency and reducing time and computational costs.

[0082] In the embodiment of the present application, by selecting an appropriate sampling distribution q(x), under the sampling distribution q(x), the test environment that may cause event A to occur has a higher probability of occurrence, thereby improving the sampling efficiency of risk scenarios. The key to the importance sampling method is to weight the generated samples so that these samples are more representative of the original score P(x) when the expected calculation is performed. This reduces the risk of rare events being underestimated during actual sampling.

[0083] In the embodiment of the present application, by using importance sampling, sampling is not performed directly from the distribution P(x), but from a new sampling distribution q(x), and the sampling distribution q(x) is closer to the states where event A will occur. Therefore, samples related to the event can be encountered more frequently during sampling, which greatly improves the efficiency of estimating the probability of event A and reduces the number of samples required and the computational cost.

[0084] In an exemplary embodiment, the traffic scene changes dynamically over time. The dynamic change of the traffic scene can simplify the modeling of the environmental variable distribution P(x) and the sampling distribution q(x) by introducing the Markov property. This simplification is based on the assumption of the Markov process, that is, the future state depends only on the current state and has nothing to do with the previous state. Therefore, step 100 may also include:

[0085] First, the environmental variable distribution P(x) and sampling distribution q(x) are simplified and modeled through Markov properties, as shown in formula (3) and formula (4) respectively:

[0086]

[0087] In formula (3), P(s(0)) represents the probability distribution of the initial state s(0); u(k) is the control input at the kth moment, which represents the operation (such as acceleration, braking or steering) applied by the automatic driving system or the driver at that moment; s(k) is the state at the kth moment, which represents the state of the vehicle at that moment (such as speed, position, direction, etc.); represents the state transition probability from state s(k) to s(k+1) under a given control input u(k), the state transition probability Describes the dynamic behavior of the autonomous driving system, such as how the vehicle's state at the current speed and acceleration will transfer to the next moment.

[0088] In formula (4), q(s(0)) is the sampling distribution of the initial state s(0), which represents the initial state in the Markov chain; q(u(k)|s(k)) is the sampling distribution of the control input u(k) at the kth moment when the state s(k) is given. This is the sampling design for the control input. According to the specific optimization goal, q(u(k)|s(k)) is designed so that the sampling process is more concentrated in the important area. It represents the state transition probability from state s(k) to s(k+1) under a given control input u(k).

[0089] Then, the probability of the occurrence of the pre-set event in the autonomous driving test is estimated based on the simplified environmental variable distribution P(x) and the sampling distribution q(x), which can be shown in formula (5):

[0090]

[0091] In the embodiment of the present application, on the one hand, through the Markov assumption, the future state depends only on the current state, not on the previous historical state. This makes the calculation of the environmental variable distribution P(x) and the sampling distribution q(x) more concise. There is no need to track the complete state history, and the computational complexity of the system is significantly reduced. On the other hand, since traffic accidents are low-probability events, importance sampling focuses on sampling in state areas that are more likely to be related to the event by constructing an optimized sampling distribution q(x). The Markov model captures these important dynamic changes through time evolution, making the process of generating samples more reasonable and reducing the demand for the number of samples. On the other hand, the traffic scene is dynamically changing and the state changes over time. Through formulas (3) and (4), this dynamic change is captured, and the change of the state s(k) in the time dimension is modeled by control input and state transition probability. This model more realistically simulates the actual operating environment of the autonomous driving system.

[0092] Step 101: Obtain the risk behavior probability H1 based on prior knowledge and set hyperparameters.

[0093] In an exemplary embodiment, the risk behavior probability H1 can be obtained according to formula (6):

[0094]

[0095] In formula (6), u c It is a set of risky actions determined based on experience or analysis, indicating which control inputs u belong to risky actions. P(u|s(k)) is the probability distribution of control input u given the state s(k). The integral is the probability distribution of control input u in the risky action set u. c H1(s(k)) represents the sum of probabilities of all possible control inputs u in state s(k). The function of H1 is to calculate the weighted sum of all possible control inputs for each state s(k), providing a basis for the calculation of hyperparameters. Formula (2) shows that for each state s(k), H1(s(k)) is obtained by integrating P(u|s(k)).

[0096] In an exemplary embodiment, P(A|x) can be calculated based on prior knowledge. Prior knowledge is based on historical data or simulation results and is used to estimate the conditional probability P(A|x) of event A occurring under different states. Event A here usually represents a specific event in the autonomous driving system (such as collision, loss of control, etc.).

[0097] In one embodiment, the prior knowledge for calculating P(u|s(k)) may include, for example, what control inputs u (such as steering angle, acceleration, braking force, etc.) are usually taken by the autonomous driving vehicle in a specific state s(k) (such as a specific speed, position, or environmental condition). The probability distribution P(u|s(k)) of these control inputs u may come from historical data, simulation models, or statistical results of previous tests. Prior knowledge can also define the risk action set u c , risk action set u c is a set of control inputs u that are considered to increase the risk of accidents or loss of control. For example, behaviors such as oversteering, emergency braking, or excessive acceleration may be classified as risky actions u in certain states s(k). c ,Prior knowledge may come from expert judgment, accident analysis reports, or safety standards to identify which ,control inputs increase risk.

[0098] In one embodiment, a large amount of autonomous driving data can be used to understand the typical distribution of control inputs u under different states s(k) (such as specific speeds, positions, or environmental conditions), and P(u|s(k)) can be generated through data analysis. Alternatively, safety experts or system designers can define which control inputs will increase risks under specific states based on their understanding of the system, thereby determining the risk action set u c Alternatively, simulation tools can be used to simulate autonomous driving scenarios, provide a reference for the distribution of control inputs under different states s(k), and determine the set of control inputs that may cause accidents.

[0099] In an exemplary embodiment, the hyperparameters can be set based on formula (7a) and formula (7b) so that c ik The upper and lower bounds of are as close to 1 as possible. The first hyperparameter K1 and the second hyperparameter K2 involved in formula (7a) and formula (7b) are used to optimize the sampling process, ensure that the sampling distribution is more concentrated in important areas, and reduce the generation of irrelevant samples. ik is linearly related to H1, so c ik The minimum value of minc ik and the maximum value maxc ik The relationship with the first hyperparameter K1 and the second hyperparameter K2 is shown in formula (7a) and formula (7b) respectively:

[0100] minc ik =(K1-1)·minH1+K2(7a)

[0101] maxc ik =(K1-1)·maxH1+K2(7b)

[0102] In formula (7a) and formula (7b), the first hyperparameter K1 and the second hyperparameter K2 are used to adjust the hyperparameters of the sampling weight. H1 is H1(s(k)), which represents the probability of a dangerous action in state s(k).

[0103] Formula (7a) and Formula (7b) calculate c by combining the minimum value (corresponding to the most dangerous state) and the maximum value (corresponding to the safest state) of H1 with the first hyperparameter K1 and the second hyperparameter K2. ik The upper and lower bounds of .

[0104] In one embodiment, c(x i ) has lower and upper bounds:

[0105]

[0106] Formula (8a) and Formula (8b) are used to calculate c(x i ), describing how to use the minimum c for each state k ik and maximum c ik To calculate the entire test scenario x i c(x i ).

[0107] In formula (8a) and formula (8b), T i ,c represents the scene x i The set of related states and moments, representing the scene x i The set of all moments associated with event A (such as an accident or other relevant event). In other words, T i , c is the scene x i A collection in the time dimension is used to accumulate the minimum or maximum sampling weights at multiple moments in the scene. i ,c is multiplied at each moment k to represent the cumulative impact of different time points on the sampling weight in the time dimension of the scene. By multiplying the minimum or maximum weight, the probability weight of the accident in the worst or best case in the entire test scenario can be estimated, thereby calculating the probability weight of the entire test scenario x i The upper and lower bounds of the sampling weights.

[0108] In the embodiment of the present application, the control input and state distribution are optimized by introducing the first hyperparameter K1 and the second hyperparameter K2, thereby ensuring that the sampling process is more effective. In other words, by introducing the first hyperparameter K1 and the second hyperparameter K2, the sampling distribution is adjusted for different risk states, ensuring that the validity of the sample can be maintained even in abnormal situations or low-probability events, thereby avoiding the low weight problem of rare events in sampling, thereby obtaining a more stable probability estimate.

[0109] Step 102: Perform acceptance-rejection sampling on the control input u(k) to obtain at least one test scenario related to a preset event.

[0110] In one exemplary embodiment, step 102 may include:

[0111] Generate candidate control inputs through the sampling distribution q(u(k)|s(k)) of the control input u(k);

[0112] Calculate the acceptance probability P of the candidate control input acc (u(k)|s(k)) and perform acceptance-rejection sampling;

[0113] The above sampling process is performed at each time point k to generate a test scene consisting of a scene sequence, and the sampling is repeated to generate multiple test scenes.

[0114] In an exemplary embodiment, generating candidate control inputs by sampling distribution q(u(k)|s(k)) of control input u(k) may include:

[0115] At each time instant k, a candidate control input u(k) is generated based on the state s(k) using the sampling distribution q(u(k)|s(k)), which is adjusted and normalized by importance sampling.

[0116] Here, the sampling distribution q(u(k)|s(k)) is optimized to focus on those control inputs that are more likely to cause accidents (i.e., adjusted by importance sampling as described in step 100). For example, if the system detects that the current state s(k) is dangerous, the sampling distribution may generate more aggressive control inputs, such as sharp turns, sudden braking, etc.

[0117] In an exemplary embodiment, the acceptance probability P of the candidate control input can be calculated according to formula (9): acc (u(k)|s(k)):

[0118]

[0119] In formula (9), q u (u|s) represents the unnormalized sampling distribution, C(s) represents the risk of the scenario under state s, and C(s)≠0 means the possibility of an accident. In order to sample from q(u|s) when C(s)≠0, the acceptance-rejection sampling method is used to sample the probability P(u|s), and the acceptance or rejection samples are selected with the acceptance probability of formula (9), so as to ensure that the sampling results conform to the probability distribution.

[0120] In one embodiment, the sampling process may include: if according to P acc The calculation result of determines the accepted control input u(k), which will be used to generate the test scenario; if according to P acc The calculation result of decides to reject the control input u(k), discard the input and resample until a suitable control input is found.

[0121] In an exemplary embodiment, performing the above sampling process at each time step k to generate a test scene consisting of a scene sequence may include:

[0122] By performing the above sampling process at each time step k, a complete sequence of scenarios can be gradually generated: x = {(s(0), u(0)), (s(1), u(1)), ..., (s(T), u(T))}, where each pair (s(k), u(k)) represents the state of the vehicle at time k and the corresponding control input. Each test scenario consists of the state and control input of multiple time steps. These test scenarios are generated according to the acceptance-rejection sampling process, ensuring that each test scenario has high accident relevance.

[0123] By repeating the above sampling process, N test scenarios are generated, each of which is an independent sequence x i :{x1,x2,…,x N These test scenarios are sampled and distributed and accepted-rejected, with a focus on states and control inputs that may cause accidents or abnormal behaviors. The test scenarios generated in the embodiments of the present application effectively improve the test efficiency of the autonomous driving system.

[0124] In the embodiment of the present application, the probability distribution P(x) is adjusted to construct the sampling distribution q(x) to increase the probability of generating adversarial test scenarios. Since P(u|s) is an implicit distribution whose probability cannot be calculated, the probability distribution q(u|s) is designed and sampled by the acceptance-rejection sampling method in the embodiment of the present application. The distribution q(u|s) is designed as shown in formula (10):

[0125]

[0126] Based on formula (10), in formula (9), when C(s)≠0, that is, when an accident may occur in the current state, K1>1 will act on the action u with P(A|u,s)>0, increasing the probability of this part of the action being sampled, thereby increasing the probability of an accident occurring.

[0127] Based on the acceptance-rejection sampling method, the unnormalized sample weight w can be obtained u (x i ) is shown in formula (11):

[0128]

[0129] in,

[0130] In formula (11), T i represents the time step of the i-th test, w ik represents the i-th test x i The weight of the kth time step in . When the risk level C(s) is 0, P(u|s) = q(u|s), and the corresponding weight is 1. Therefore, when calculating the weight, only some critical states with risks need to be considered. Using T i , c represents the set of critical time steps in the i-th test, then,

[0131]

[0132] Then the estimated result of the probability of event A can be expressed as shown in formula (13):

[0133]

[0134] in,

[0135] Through step 102, test scenarios that focus on possible accidents are generated. These test scenarios are more focused on riskier driving behaviors, so that the performance of the autonomous driving system in dangerous environments can be effectively evaluated, thereby improving the efficiency of the autonomous driving system test and providing a guarantee for more accurate estimation of the probability of accidents.

[0136] Step 103: Perform an autonomous driving test using at least one test scenario obtained by sampling to estimate the accident probability.

[0137] In an exemplary embodiment, the estimated result of the accident rate can be calculated according to formula (13).

[0138] Different from the acceleration test method based on importance sampling in the related art, the autonomous driving test method proposed in the embodiment of the present application uses the acceptance-rejection sampling method to obtain the riskier proposal distribution and perform sampling without relying on the explicit traffic probability distribution, and obtains the unnormalized sampling weights for estimating the test results. This solves the limitations of the related art, improves the test efficiency, and is particularly suitable for accelerated testing of high-dimensional and complex natural acceleration environment models.

[0139] In an exemplary embodiment, in order to ensure the test results The automatic driving test method provided in the embodiment of the present application may further include step 104, which is approximately unbiased with the target value P(A).

[0140] Step 104: Perform upper and lower bound analysis on the estimated results of the accident probability.

[0141] In one exemplary embodiment, step 104 may include:

[0142] By analyzing the upper and lower bounds of the normalization coefficient c(x), the first hyperparameter K1 and the second hyperparameter K2 are adjusted to ensure that the final estimation result is as close as possible to the actual accident probability P(A);

[0143] By combining the confidence level λ and the standard deviation function std(·), the upper and lower bounds of the probability P(A) of event A can be calculated to effectively estimate the range of accident probability and ensure the reliability of the test results.

[0144] Through the processing of step 103, the sampling and testing efficiency can be higher than that in the natural driving environment. However, due to the influence of non-normalization, the test results is not equal to P(A). In this regard, the inventors of the present application have found that by selecting appropriate first hyperparameter K1 and second hyperparameter K2, the test results It is approximately unbiased with respect to the target value P(A).

[0145] Therefore, in the embodiment of the present application, the estimated results A method for upper and lower bound analysis is provided. P(A) and The deviation between u (x) is not normalized. Therefore, first, the coefficient c(x) can be normalized as shown in formula (14), and the coefficient c(x) is defined as q u Normalization coefficient of (x):

[0146]

[0147] By processing the normalization coefficient of formula (14), the sampling distribution q can be adjusted u The difference between (x) and P(x) is such that Closer to P(A). Combining formula (2), we can get formula (15):

[0148]

[0149] In formula (15), Provides In order to minimize the target result P(A) = E q (The deviation of P(A|x), the coefficient c(x) should be as close to 1 as possible to ensure Provides an estimate that is closer to P(A).

[0150] Therefore, in the embodiment of the present application, by approximate analysis of the upper and lower bounds of c(x), guidance is provided for the selection of the first hyperparameter K1 and the second hyperparameter K2 to ensure that the obtained estimation result is as accurate as possible, and at the same time, an approximate analysis of the upper and lower bounds of P(A) is achieved. i , using c ik represents the distribution q at the kth time step u (u k |s k ) is shown in formula (16):

[0151] c ik =∫q u (u k |s k ) k (16)

[0152] For the entire sequence, i.e. a complete test scenario x i ,c(x i ) can be expressed as the product That is, its normalized coefficient c(x i ) can be expressed as the product of the normalized coefficients of all time steps, that is, Then, calculate c ik It can be shown as formula (17):

[0153] c ik =K1·H1(s(k))+K2·H2(s(k))

[0154] =(K1-1)·H1(s(k))+K2 (17)

[0155] H1(s(k)) in formula (17) is as shown in formula (6), H2(s(k)) = 1-H1(s(k)), and H2(s(k)) is the complementary probability of H1(s(k)). ik is linearly related to H1, so c ik The minimum and maximum values ​​of T are shown in formula (7a) and formula (7b) respectively. i , c represents the number of elements in the set. The minimum and maximum values ​​of c(x) can be expressed as formula (18a) and formula (18b) respectively:

[0156]

[0157] Furthermore, after adjusting the normalization coefficient, an upper and lower bound estimation method for the accident probability P(A) is obtained as follows:

[0158]

[0159] In actual calculations, the above upper and lower bounds can be estimated by sampling methods, as shown in formula (20a) and formula (20b) respectively:

[0160]

[0161] Introducing the confidence level λ and the standard deviation function std(·), the upper and lower bounds of P(A) are calculated as shown in formula (21a) and formula (21b):

[0162]

[0163] Formula (21a) and Formula (21b) give the minimum and maximum values ​​of the accident probability respectively. The normalization coefficient c(x) is adjusted to ensure that the estimate is as accurate as possible. infP(A) refers to the infimum of P(A), that is, the smallest limit among all possible P(A) values; sup P(A) refers to the supremum of P(A), that is, the largest limit among all possible P(A) values.

[0164] In one embodiment, on the one hand, the embodiment of the present application uses the Markov assumption that the future state depends only on the current state, not on the previous historical state. This makes the calculation of the environmental variable distribution P(x) and the sampling distribution q(x) more concise. There is no need to track the complete state history, and the computational complexity of the system is significantly reduced. On the other hand, since traffic accidents are low-probability events, importance sampling focuses on sampling in state areas that are more likely to be related to the event by constructing an optimized sampling distribution q(x). The Markov model captures these important dynamic changes through time evolution, making the process of generating samples more reasonable and reducing the demand for the number of samples. On the other hand, the traffic scene is dynamically changing, and the state changes over time. Through formulas (3) and (4), this dynamic change is captured, and the change of the state s(k) in the time dimension is modeled by control input and state transition probability. This model more realistically simulates the actual operating environment of the autonomous driving system.

[0165] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above-mentioned autonomous driving test methods.

[0166] An embodiment of the present disclosure further provides a computer device, including a memory; and a processor connected to the memory, wherein the processor executes the steps of the autonomous driving test method as described in any of the preceding items based on instructions stored in the memory.

[0167] In order to verify the effectiveness of the autonomous driving test method proposed in the embodiment of the present application, two different types of natural driving environment models are selected for testing: (1) The first natural driving environment model is denoted as NDE-I, which is the natural driving environment model constructed in the literature (Feng S, Sun H, Yan X, et al. Dense reinforcement learning for safety validation of autonomous vehicles [J]. Nature, 2023, 615 (7953): 620-627.); (2) The second natural driving environment model is denoted as NDE-II, which is the natural driving environment model constructed in the literature (Yan X, Zou Z, Feng S, et al. Learning naturalistic driving environment with statistical realism [J]. Nature communications, 2023, 14 (1): 2037.).

[0168] NDE-I is modeled based on explicit discrete probability distribution. Therefore, based on the probability distribution obtained during the test, data analysis is performed to determine the range of risk behavior probability H1 as (1×10 -7 ,5×10 -5 ). Set the first hyperparameter K1 = 100, the second hyperparameter K2 = 0.99 and the first hyperparameter K1 = 500, the second hyperparameter K2 = 0.99 respectively to ensure that c ik Close to 1. Taking the two-lane straight highway driving scenario as an example, the test environment is generated based on the proposed implicit importance sampling IIS method, and the accident rate estimation results are obtained, which are compared with the accident rate estimation results obtained in the natural driving environment. Figure 2 The results of accident rate estimation under two sets of parameters and the comparison of direct estimation (NDE, Naive Direct Estimation) and importance sampling (IIS, Importance Sampling) technology in estimating accident rate in autonomous driving tests are shown. The IIS technology in the figure uses two different settings, K1 = 100 and K1 = 500. The purpose of these charts is to compare the performance of the two methods in accident rate estimation, relative half-width of confidence intervals, and the number of required tests under NDE-I modeling based on explicit discrete probability distributions. Figure 2 (a) and (d) show the variation of accident rate with the number of tests. Figure 2 (b) and (e) show how the relative half-width (a measure of the confidence of the estimate) changes with the number of tests. Figure 2(c) and (f) in the figure show the distribution of the number of tests required under the confidence interval. The first column of pictures shows the change of the accident rate estimation results as the number of tests increases, and the shaded part represents the confidence interval of the estimation results when the confidence level λ = 0.95; the second column of pictures shows the relative half-width (RHW) indicator and calculates the minimum number of tests required to reach the accuracy threshold (RHW = 0.3); the third column of pictures shows the frequency of the minimum number of tests required under multiple repeated experiments.

[0169] The experimental results show that in the natural driving environment, about 2.03×10 8 When K1=100, the number of tests required in the IIS generated environment is reduced to 2.34×10 6 , which accelerated the test process by 87 times, and the experimental results were approximately unbiased with the results in the natural driving environment; when K1 = 500, only 4.32 × 10 5 The test was performed 470 times faster, but the deviation of the accident rate estimation results was slightly increased. Furthermore, the error analysis of the estimation results obtained by the IIS method was performed, and the upper and lower bounds of P(A) were obtained at the confidence level λ = 0.95, as shown in the figure. Figure 3 As shown, Figure 3 The shaded area in the middle represents the upper and lower bounds estimated using the autonomous driving test method proposed in the embodiment of the present application. Based on the above experimental results, it can be seen that for NDE-I, the autonomous driving test method proposed in the embodiment of the present application controls the deviation caused by non-normalization within a smaller range, obtains reliable test results with smaller deviations, and greatly improves the test efficiency.

[0170] from Figure 2 , Figure 3 Compared with NDE, IIS significantly reduces the number of tests required to obtain reliable accident rate estimates. As the first hyperparameter K1 in IIS increases, the performance is further improved. Although the number of tests required will increase slightly, IIS is still better than NDE in terms of stability, confidence, and efficiency.

[0171] NDE-II is modeled based on neural networks. The driving behavior probability distribution P(u|s) is an implicit distribution. It is impossible to obtain an accurate distribution value, and only sampling results can be obtained. Based on the existing work in the literature (2), the analysis results of the driving behavior risk are obtained, and the range of the risk behavior probability H1 is estimated to be (4.5×10 -5 ,3×10 -3. Set the first hyperparameter K1 = 50, the second hyperparameter K2 = 0.99 and the first hyperparameter K1 = 100, the second hyperparameter K2 = 0.99 to ensure that c ik Close to 1. In this embodiment, taking the roundabout driving scenario as an example, the test environment is generated based on the IIS method proposed in the embodiment of the present application, and the accident rate estimation result is obtained, and compared with the accident rate estimation result obtained in the natural driving environment. Similar to the result of NDE-I, the following is obtained: Figure 4 The accident rate estimates shown, and Figure 5 The error estimation results are shown.

[0172] The experimental results show that in the natural driving environment, about 5.87×10 6 When the first hyperparameter K1=50, the number of tests required in the IIS generated environment is reduced to 1.24×10 5 , which accelerated the test process by 47 times, and the experimental results were approximately unbiased with the results in the natural driving environment; when the first hyperparameter K1 = 100, only 8.05×10 4 The test was performed 73 times faster, but the deviation of the accident rate estimation result was slightly increased. Based on the experimental results, it can be seen that the automatic driving test method proposed in the embodiment of the present application is still effective for NDE-II, and the test process is also accelerated.

[0173] Figure 6 FIG. 1 is a schematic diagram of the structure of the automatic driving test device in the embodiment of the present application. Figure 6 As shown, it may include: a preprocessing module, an acquisition module, and an estimation module; wherein,

[0174] The preprocessing module is used to obtain the natural driving environment and test conditions; obtain the probability of risky behavior based on prior knowledge and set hyperparameters;

[0175] An acquisition module, used for performing acceptance-rejection sampling on the control input to acquire at least one test scenario related to a preset event;

[0176] An estimation module is used to perform an autonomous driving test using at least one test scenario obtained by sampling to estimate the accident probability.

[0177] In an exemplary embodiment, an analysis module is also included, which is used to perform upper and lower bound analysis on the estimation result of the accident probability.

[0178] The automatic driving test device proposed in the embodiment of the present application can obtain the riskier proposal distribution and perform sampling without relying on the explicit traffic probability distribution through the acceptance-rejection sampling method, and obtain the unnormalized sampling weights for estimating the test results. This solves the limitations of the related technology, improves the test efficiency, and is particularly suitable for accelerated testing of high-dimensional and complex natural acceleration environment models.

[0179] Although the embodiments disclosed in this application are as above, the contents described are only embodiments adopted to facilitate understanding of this application and are not intended to limit this application. Any technician in the field to which this application belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be based on the scope defined in the attached claims.

Claims

1. An automatic driving test method, characterized in that: include: Obtain natural driving environment and test conditions; Obtain the probability of risky behavior based on prior knowledge and set hyperparameters; Performing acceptance-rejection sampling on the control input to obtain at least one test scenario related to a preset event; An autonomous driving test is performed using at least one test scenario obtained by sampling to estimate the accident probability.

2. The autonomous driving test method according to claim 1, further comprising: An upper and lower bound analysis is performed on the estimated results of the accident probability.

3. The automatic driving test method according to claim 1 or 2, wherein: The implicit sampling probability of the test environment is P(x); P(x) describes the state distribution of the vehicle in the real traffic environment.

4. The automatic driving test method according to claim 1 or 2, wherein: Acquire the test conditions by setting test parameters; The test parameters include: maximum test duration T or maximum test distance D, and number of tests n.

5. The automatic driving test method according to claim 1 or 2, wherein: The obtaining of the natural driving environment comprises: The environmental variable distribution P(x) is constructed based on the autonomous driving environment information, and the sampling distribution q(x) is obtained through the implicit importance sampling method; where P(x) is the implicit sampling probability P(x) of the test environment, which is used to describe the performance of the autonomous driving vehicle in the test scenario.

6. The automatic driving test method according to claim 5, wherein: The method of obtaining the sampling distribution q(x) by implicit importance sampling includes: A sampling distribution q(x) is set, and the sampling distribution q(x) is adjusted by implicit importance sampling to make it closer to the target distribution; the probability of occurrence of the event pre-set in the autonomous driving test is estimated according to the adjusted sampling distribution q(x).

7. The automatic driving test method according to claim 1 or 2, wherein: The risk behavior probability H1 is obtained according to the following formula: Among them, u c is a set of risky actions determined based on experience or analysis, indicating which control inputs belong to risky actions; P(u|s(k)) is the probability distribution of the control input u when the state s(k) is given, and the integral is the probability distribution of the control input u in the dangerous action set u c H1(s(k)) represents the sum of probabilities of all possible control inputs u in state s(k).

8. The automatic driving test method according to claim 1 or 2, wherein: The hyperparameters are set according to the following formula; the hyperparameters include a first hyperparameter K1 and a second hyperparameter K2: minc ik =(K1-1) minH1+K2; maxc ik =(K1-1)·maxH1+K2; Among them, the first hyperparameter K1 and the second hyperparameter K2 are used to adjust c ik Hyperparameters; H1 is the risk behavior probability, which means the probability of dangerous action under state s(k); minc ik and maxc ik c ik The upper and lower bounds of .

9. The automatic driving test method according to claim 8, wherein: The c(x) is calculated according to the following formula i ) has lower and upper bounds: Among them, T i ,c represents the scene x i The set of related states and moments, representing the scene x i Below, the set of all moments related to the event A.

10. The automatic driving test method according to claim 1 or 2, wherein: The obtaining of at least one test scenario related to a preset event includes: Generate a candidate control input through a sampling distribution q(u(k)|s(k)) of the control input u(k); Calculate the acceptance probability P of the candidate control input acc (u(k)|s(k)) and perform acceptance-rejection sampling; The acceptance-rejection sampling process is performed at each time point k to generate a test scenario consisting of a sequence of scenarios, and the acceptance-rejection sampling is repeated to generate multiple test scenarios.

11. The automatic driving test method according to claim 10, wherein: The sampling distribution q(u(k)|s(k)) is adjusted and normalized by importance sampling.

12. The automatic driving test method according to claim 1 or 2, wherein: The following formula is used to estimate the probability of the accident, including: in, in, is the estimated result of the accident probability; E q represents the expectation under the sampling distribution q(x); w u (x i ) is the sample weight in the acceptance-rejection sampling method; x i ~q(x) represents a sample drawn from the sampling distribution q(x); P(A|x i ) indicates a given environment variable x i The probability of event A occurring under the condition .

13. The automatic driving test method according to claim 9, wherein: The upper and lower bounds analysis of the estimated results of the accident probability includes: By analyzing the upper and lower bounds of the sampling weight c(x), adjusting the first hyperparameter K1 and the second hyperparameter K2; The upper and lower bounds of the probability P(A) of the event A occurring are calculated by combining the confidence level λ and the standard deviation function std(·).

14. The automatic driving test method according to claim 13, wherein: The upper and lower bounds of the probability P(A) of the event A occurring are as follows: in, represents the minimum value of the estimated result of the accident probability, c max (x) and c min (x) represents the upper and lower bounds of c(x), Represents the maximum value of the estimated results of the accident probability.

15. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the autonomous driving test method according to any one of claims 1 to 14.

16. An autonomous driving test device, comprising a memory and a processor, wherein: The memory stores the following instructions executable by the processor: used to execute the steps of the autonomous driving test method described in any one of claims 1-14.