Automatic driving test case generation method, device, electronic device and storage medium

By obtaining a set of logical scenario parameters from natural driving data and using the target proxy model to determine the importance sampling distribution parameters, efficient test cases are generated, which solves the problem of low efficiency of existing autonomous driving simulation tests and achieves efficient simulation and safety assessment of high-risk driving scenarios.

CN114815605BActive Publication Date: 2025-09-09SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210361086.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-09-09
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

Existing autonomous driving simulation testing methods are inefficient and require the execution of massive test cases to complete high-risk driving scenario testing, resulting in high costs and low efficiency.

Method used

By obtaining a set of logical scenario parameters from a natural driving dataset, the target proxy model is used to determine the importance sampling distribution parameters of high-risk driving scenarios and generate efficient test cases.

Benefits of technology

It achieves efficient and accurate simulation of high-risk driving scenarios with a small number of test cases, improving the efficiency of autonomous driving testing and the accuracy of safety assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114815605B_ABST
    Figure CN114815605B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of intelligent testing of autonomous driving and provides a test case generation method, apparatus, electronic device, and storage medium, including: obtaining a set of logical scenario parameters corresponding to the autonomous driving function to be tested based on a natural driving dataset; determining importance sampling distribution parameters corresponding to high-risk driving scenarios based on a pre-constructed target proxy model and the set of logical scenario parameters; the target proxy model is a proxy model of the autonomous driving system to be tested; and generating target test cases based on the importance sampling distribution parameters corresponding to the high-risk driving scenarios. Embodiments of this application can efficiently and accurately generate test cases that can represent high-risk driving scenarios, thereby improving the testing efficiency of autonomous vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of autonomous driving intelligent testing technology, and in particular relates to an autonomous driving test case generation method, device, electronic device and storage medium. Background Art

[0002] Self-driving cars, also known as driverless cars, are intelligent vehicles that rely on computer systems to operate without human intervention. The emergence of self-driving cars has significant implications for improving traffic safety, traffic efficiency, and low-carbon mobility.

[0003] Simulation testing of autonomous vehicles is a key technology in achieving large-scale commercialization of self-driving cars. However, due to the low probability of collisions or other conflicts, current autonomous driving simulation testing methods often require the execution of a large number of test cases to complete an effective high-risk driving scenario test, resulting in low efficiency. Summary of the Invention

[0004] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for generating autonomous driving test cases to solve the problem in the prior art of how to efficiently and accurately generate test cases that can represent high-risk driving scenarios in order to improve the testing efficiency of autonomous driving vehicles.

[0005] A first aspect of an embodiment of the present application provides a method for generating an autonomous driving test case, comprising:

[0006] Based on the natural driving data set, obtain the logical scenario parameter set corresponding to the autonomous driving function to be tested;

[0007] Determining importance sampling distribution parameters corresponding to high-risk driving scenarios based on a pre-built target proxy model and the set of logical scenario parameters; the target proxy model is a proxy model of the autonomous driving system to be tested;

[0008] Generate target test cases based on the importance sampling distribution parameters corresponding to the high-risk driving scenarios.

[0009] Optionally, obtaining a set of logical scenario parameters corresponding to the autonomous driving function to be tested based on the natural driving data set includes:

[0010] Filtering a first driving behavior dataset related to the autonomous driving function to be tested from the natural driving dataset;

[0011] Determining a dangerous driving behavior dataset from the first driving behavior dataset according to a preset dangerous driving behavior indicator, wherein the dangerous driving behavior indicator includes any one or more of collision time, following distance, distance safety factor, and collision avoidance deceleration;

[0012] Logical scenario parameters are obtained from the dangerous driving behavior data set to obtain a logical scenario parameter set.

[0013] Optionally, determining the dangerous driving behavior dataset from the first driving behavior dataset according to a preset dangerous driving behavior indicator includes:

[0014] For each driving behavior data in the first driving behavior dataset, mapping each driving behavior data in the first driving behavior dataset into a dangerous driving behavior spectrum representing driving risk according to the dangerous driving behavior indicator; wherein the dangerous driving behavior spectrum is an n×m matrix, where n represents the number of time series samples of the driving behavior data; and m represents the number of the dangerous driving behavior indicators;

[0015] Performing dimensionality reduction processing on the dangerous driving behavior spectrum corresponding to each of the driving behavior data to obtain dangerous feature information of each of the driving behavior data;

[0016] The driving behavior data in the first driving behavior dataset are clustered according to the dangerous feature information, and a cluster with the lowest safety score is determined as the dangerous driving behavior dataset.

[0017] Optionally, before determining the importance sampling distribution parameter corresponding to the high-risk driving scenario based on the pre-built target proxy model and the logical scenario parameter set, the method further includes:

[0018] The target proxy model is constructed according to the logical scene parameter set.

[0019] Optionally, constructing the target proxy model according to the logical scene parameter set includes:

[0020] Obtaining a first test case from the logical scenario parameter set;

[0021] Determining a first test result corresponding to the first test case based on the first test case and the autonomous driving system to be tested;

[0022] The target agent model is constructed according to the first test case and the first test result corresponding thereto.

[0023] Optionally, constructing the target proxy model according to the first test case and its corresponding first test result includes:

[0024] Constructing an initial proxy model according to the first test case and the first test result corresponding thereto;

[0025] Obtaining a second test case from the logical scenario parameter set according to an expectation maximization algorithm based on the initial proxy model;

[0026] Determining a second test result corresponding to the second test case based on the second test case and the autonomous driving system to be tested;

[0027] updating the proxy model according to the second test case and the second test result corresponding thereto;

[0028] If the accuracy of the updated proxy model converges, the updated proxy model is used as the target proxy model; otherwise, the step of returning to execute the expectation maximization algorithm based on the initial proxy model to obtain a second test case from the logical scenario parameter set.

[0029] Optionally, determining the importance sampling distribution parameters corresponding to the high-risk driving scenario based on the pre-built target proxy model and the logical scenario parameter set includes:

[0030] Determining a parameter search range according to the logical scenario parameter set;

[0031] Within the parameter search range, obtaining a minimum value of an objective function using the target proxy model; wherein the objective function is used to calculate an estimated error of a probability of occurrence of a dangerous event of the autonomous driving system to be tested;

[0032] The distribution parameter corresponding to the minimum value of the objective function is used as the importance sampling distribution parameter corresponding to the high-risk driving scenario.

[0033] A second aspect of an embodiment of the present application provides an autonomous driving test case generation device, comprising:

[0034] A logic scenario parameter set acquisition unit, configured to acquire a logic scenario parameter set corresponding to the autonomous driving function to be tested based on a natural driving data set;

[0035] an importance sampling distribution parameter determination unit, configured to determine importance sampling distribution parameters corresponding to a high-risk driving scenario based on a pre-built target proxy model and the set of logical scenario parameters; the target proxy model being a proxy model of the autonomous driving system to be tested;

[0036] The test case generation unit is used to generate a target test case according to the importance sampling distribution parameters corresponding to the high-risk driving scenario.

[0037] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the steps of the autonomous driving test case generation method.

[0038] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the electronic device implements the steps of the autonomous driving test case generation method.

[0039] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the autonomous driving test case generation method described in any one of the first aspects above.

[0040] The beneficial effects of the embodiments of the present application compared to the prior art are as follows: In the embodiments of the present application, since the logical scenario parameter set is obtained from the natural driving data set, the actual logical scenario parameter distribution corresponding to the autonomous driving function to be tested is actually determined. Therefore, based on the logical scenario parameter set and the proxy model of the autonomous driving system to be tested, the importance sampling distribution parameters corresponding to the high-risk driving scenario are determined. With the actual logical scenario parameter distribution as a reference, reasonable importance sampling distribution parameters can be efficiently and accurately determined through the proxy model. Afterwards, through the importance sampling distribution parameters, target test cases that effectively simulate high-risk driving scenarios can be quickly generalized and generated. That is, through the autonomous driving test case generation method of the embodiments of the present application, test cases under high-risk driving scenarios can be generated efficiently and accurately, so that during the autonomous driving simulation test process, effective high-risk driving scenario testing can be completed without executing a large number of test cases, thereby improving the efficiency of autonomous driving testing.

[0041] In some embodiments, the autonomous driving test case generation method of the embodiments of the present application can also quantitatively achieve an unbiased estimate of the probability of occurrence of dangerous events in the autonomous driving system to be tested based on fewer autonomous driving test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art.

[0043] Figure 1 This is a schematic diagram of an implementation flow of a method for generating an autonomous driving test case provided in an embodiment of the present application;

[0044] Figure 2is a schematic diagram of a car-following behavior scenario of an autonomous vehicle provided in an embodiment of the present application;

[0045] Figure 3 This is a box plot showing a comprehensive safety score of a driving behavior dataset provided by an embodiment of the present application;

[0046] Figure 4 This is a schematic diagram of an autonomous driving test case generation device provided in an embodiment of the present application;

[0047] Figure 5 Schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0049] In order to illustrate the technical solution described in this application, specific embodiments are provided below.

[0050] In recent years, frequent autonomous vehicle accidents have become a significant obstacle to the commercialization of autonomous vehicle technology. Furthermore, the industrialization of third-party regulatory certification, insurance, and other aspects of autonomous vehicle development compels the industry to rapidly and accurately provide quantitative safety performance assessments before large-scale deployment. Therefore, accelerating autonomous vehicle testing has become a key approach to addressing this challenge and improving the safety and design of autonomous vehicles.

[0051] Currently, autonomous driving testing can be divided into two categories: real-world testing and simulation testing. Real-world testing primarily involves closed-loop testing and open-road testing. Both methods suffer from long testing cycles, a high proportion of "risk-free" testing scenarios, and high costs. Simulation testing, on the other hand, utilizes digital modeling to partially or fully mathematically model the real physical world. This allows algorithmic strategies to be validated without the need for real-world testing, offering advantages such as high efficiency, low cost, and a high degree of flexibility.

[0052] Generally speaking, simulation test methods for autonomous driving can be roughly divided into "rule-based", "learning-based", "optimization search" and other methods. Among them, the "rule-based" simulation test method has problems such as scenario homogeneity and unreasonable combination, and is only applicable to the verification of low-level assisted driving functions with relatively simple functional boundary definitions. The "learning-based" simulation test method can generate uncovered novel scenarios from the evolutionary inference of existing time-series traffic trajectory data, greatly enriching the diversity of simulation test cases. However, whether the characteristics of the derived scenarios are consistent with real traffic data is still lacking in detailed research. The "optimization search" simulation test method has difficulty finding the key logical scenario parameter set in the high-dimensional parameter space, and when the objective function changes, the search algorithm must be re-executed, which is inefficient.

[0053] To accurately assess the safety of autonomous vehicles in real-world continuous traffic environments, some literature has proposed using the Monte Carlo method to generate test cases for autonomous driving tests, given known parameter distributions of natural driving scenarios. However, the test cases generated by the Monte Carlo method are positively correlated with the probability distribution density of the scenario parameters: test scenarios with higher probability densities have more test cases, while test scenarios with lower probability densities have fewer test cases. However, high-risk driving scenarios that truly challenge the safety of autonomous driving systems often have low probability of occurrence and are rare events. This characteristic necessitates a massive amount of direct Monte Carlo testing to generate a single dangerous scenario for evaluating the safety of an autonomous driving system, significantly increasing testing costs. Consequently, current autonomous driving simulation testing methods often require executing a vast number of test cases to effectively test a high-risk driving scenario, resulting in low efficiency.

[0054] To address the aforementioned technical issues, embodiments of the present application provide a method, apparatus, electronic device, and storage medium for generating autonomous driving test cases. The autonomous driving test case method accurately acquires a set of logical scenario parameters based on a natural driving dataset, and determines the importance sampling distribution parameters corresponding to high-risk driving scenarios based on the set of logical scenario parameters and a proxy model of the autonomous driving system under test. Subsequently, target test cases are generated in batches based on the determined importance sampling distribution parameters corresponding to the high-risk driving scenarios.

[0055] The autonomous driving test case method is actually based on the Importance Sampling (IS) method. When generating test cases, the original probability density of the natural driving scene parameters is skewed to increase the exposure rate of rare dangerous driving events, so that the generated target test cases can accelerate the completion of the autonomous driving test. It should be noted that not all importance sampling distributions will produce ideal accelerated test results. In particular, when the variance of the importance sampling distribution differs greatly from the original probability distribution, inaccurate estimation may occur. That is, the key to the importance sampling method is to find reasonable importance sampling distribution parameters. In the embodiment of the present application, on the one hand, the importance sampling distribution parameters can be constrained by the actual logical scene parameter set obtained from the natural driving data so that they fall within a reasonable parameter range. On the other hand, the proxy model can obtain a high-precision optimal unbiased estimate of the test results without performing time-consuming simulation calculations. Searching for appropriate importance sampling distribution parameters based on the target proxy model can greatly improve the search efficiency while taking into account the parameter search accuracy. Therefore, compared with the method of manually selecting importance sampling distribution parameters or iteratively searching for importance sampling distribution parameters based on the cross-entropy method, the importance sampling distribution parameters can be determined more efficiently and accurately. Subsequently, based on the importance sampling distribution parameters, target test cases that effectively simulate high-risk driving scenarios can be generalized and generated.

[0056] Specifically, the autonomous driving test case generation method of the present invention efficiently and accurately implements importance sampling distribution parameter search based on a set of actual logical scenario parameters obtained from natural driving data and a simple target proxy model. This allows for the generalized generation of target test cases for high-risk driving scenarios in batches. These target test cases enable unbiased estimation of the probability of dangerous events occurring in autonomous driving systems at a minimal testing cost, without requiring extensive testing, significantly improving the efficiency of autonomous driving testing.

[0057] Example 1:

[0058] Figure 1 The following is a flow chart of a first method for generating an autonomous driving test case provided by an embodiment of the present application, which is described in detail as follows:

[0059] In S101, a logical scenario parameter set corresponding to the autonomous driving function to be tested is obtained based on a natural driving data set.

[0060] In the embodiment of the present application, the natural driving dataset is a collection of real natural driving data collected in a real traffic environment. The natural driving dataset may include driving data in different scenarios such as free driving, lane changing, and car-following.

[0061] The autonomous driving function to be tested is the autonomous driving function that currently needs to be tested. The logical scenario parameter set is a set of logical scenario parameters corresponding to driving events related to the autonomous driving function to be tested, obtained from a natural driving data set based on the current autonomous driving function to be tested. Logical scenario parameters refer to variables used to describe logical scenarios in the development and testing of autonomous driving vehicles; a logical scenario is a test scenario that describes a functional scenario in detail based on state space variables. The logical scenario parameter set of the embodiment of the present application may also be referred to as a logical scenario parameter space.

[0062] In one embodiment, it is assumed that the current autonomous driving function to be tested is the autonomous driving car following control function, and its corresponding scenario is the autonomous driving car following behavior scenario. The schematic diagram of the scenario is as follows: Figure 2 In this embodiment, the following behavior driving data related to the following behavior scenario of the autonomous vehicle can be screened out from the natural driving data set (for example, it can include Figure 2 Then, a set of logical scenario parameters that can be used to test the following control function of the autonomous vehicle is obtained from the following behavior driving data. The logical scenario parameters may include the speed v of the preceding vehicle, the acceleration v of the preceding vehicle, the position v of the preceding vehicle, the speed v of the preceding vehicle, the acceleration v of the preceding vehicle, the speed change time of the preceding vehicle, and the relative distance between the two vehicles. f , acceleration of the preceding vehicle a f , front vehicle speed change time t f wait.

[0063] In S102, the importance sampling distribution parameters corresponding to the high-risk driving scenario are determined based on a pre-built target proxy model and the set of logical scenario parameters; the target proxy model is a proxy model of the autonomous driving system to be tested.

[0064] In an embodiment of the present application, the autonomous driving system to be tested is a system that currently requires autonomous driving testing using test cases. In one embodiment, the autonomous driving system to be tested can be an actual autonomous driving vehicle. In another embodiment, the autonomous driving system to be tested can be a virtual simulation model used to accurately simulate autonomous driving functions, referred to as an autonomous driving simulation test model. This autonomous driving simulation test model can include complex simulation test code and mathematical models. The target proxy model is a proxy model of the autonomous driving vehicle or autonomous driving simulation test model. A proxy model is a simple numerical model obtained by modeling the high-dimensional approximate relationship between test inputs and outputs. It can approximately replace the complex and time-consuming original test process, and test results can be obtained efficiently and cost-effectively through this proxy model. In other words, the target proxy model in an embodiment of the present application is a simple model that can approximately replace the autonomous driving simulation test model. Exemplarily, the proxy model in an embodiment of the present application can include radial basis functions, support vector machines, neural networks, and Kriging models. Kriging, also known as the Kriging algorithm, is a regression algorithm that spatially models and predicts random processes based on covariance functions.

[0065] In this step, after obtaining the logical scenario parameter set, the original probability distribution g(x) of the scenario parameters can be determined. With this original probability distribution as a reference, the search range of the importance sampling distribution parameters can be determined. Afterwards, the importance sampling distribution parameters are searched through the pre-built target proxy model to determine the importance sampling distribution parameters corresponding to the high-risk driving scenario. The importance sampling distribution parameters are used to generate target test cases that can represent high-risk driving scenarios. The importance sampling distribution parameters are recorded as the parameters of the distribution h(x). The importance sampling distribution h(x) is the parameter that can skew the test parameters based on the original probability distribution g(x) to increase the probability of occurrence of high-risk driving scenarios.

[0066] In S103 , a target test case is generated according to the importance sampling distribution parameters corresponding to the high-risk driving scenario.

[0067] In one embodiment, according to the parameters μ and σ of the importance sampling distribution h(x) corresponding to the searched high-risk driving scene, a high-risk driving scene can be generalized. The parameters of the high-risk driving scene are: the speed of the preceding vehicle v f , acceleration of the preceding vehicle a f , front vehicle speed change time t f ; According to the speed of the preceding vehicle v f, , determine the initial speed v of the current self-driving car to be tested h =vf ; Then, according to the initial speed v of the self-driving car to be tested h , calculate the expected initial relative distance between the autonomous vehicle and the vehicle in front:

[0068] R L =τ ADS ·v h +d0

[0069] Where: τ ADS is the following distance; d0 is the relative distance between the two vehicles at rest, which is generally a constant.

[0070] The preceding vehicle speed v generated by the above method f , acceleration of the preceding vehicle a f , front vehicle speed change time t f , the initial speed v of the autonomous vehicle to be tested h , the expected initial relative distance R from the preceding vehicle L These scenario parameters can constitute a target test case in a high-risk driving scenario.

[0071] After generating the target test case, high-risk driving scenarios can be simulated based on the target test case to test the autonomous driving system to be tested.

[0072] Through the autonomous driving test case generation method of the embodiment of the present application, test cases for high-risk driving scenarios can be generated efficiently and accurately, so that during the autonomous driving simulation test, effective high-risk driving scenario testing can be completed without executing a large number of test cases, thereby improving the efficiency of autonomous driving testing and efficiently and accurately realizing the safety assessment of autonomous driving vehicles.

[0073] Optionally, obtaining a set of logical scenario parameters corresponding to the autonomous driving function to be tested based on the natural driving data set includes:

[0074] Filtering a first driving behavior dataset related to the autonomous driving function to be tested from the natural driving dataset;

[0075] Determining a dangerous driving behavior dataset from the first driving behavior dataset according to a preset dangerous driving behavior indicator, wherein the dangerous driving behavior indicator includes any one or more of collision time, following distance, distance safety factor, and collision avoidance deceleration;

[0076] Logical scenario parameters are obtained from the dangerous driving behavior data set to obtain a logical scenario parameter set.

[0077] In the embodiment of the present application, after determining the autonomous driving function to be tested, the first driving behavior data set related to the autonomous driving function to be tested can be filtered out from the natural driving data set according to the preset screening conditions corresponding to the autonomous driving function to be tested. For example, assuming that the autonomous driving function to be tested is the autonomous driving car following control function, the preset screening conditions include: screening the effective following distance (i.e., the relative distance between the autonomous driving car to be tested and the preceding car) R L Driving behavior data within a range of 0 to 150 meters (m) is excluded, and conditions such as no preceding vehicle, time to collision (TTC) less than 0 (i.e., the vehicle's speed is less than the preceding vehicle's speed), or a vehicle in the side lane cutting in during the following driving are excluded. The expression for this preset filtering condition can be as follows:

[0078] R L ∈(0.1m,150m)

[0079] numLaneChange==0

[0080] TTC∈(0.1s,10s)

[0081] numFollowing≥10

[0082] Where: R L is the relative distance between the vehicle and the preceding vehicle, in meters (m); numlanechange is the number of lane changes; TTC is the time to collision, in seconds (s); and numFollowing is the number of continuously recorded following data points.

[0083] In some embodiments, based on the above-mentioned preset screening conditions, after the preliminary screening driving behavior data related to the autonomous driving function to be tested is screened out from the natural driving dataset, further outlier elimination processing and missing value prediction and filling processing are performed, so as to accurately obtain a first driving behavior dataset with high data quality, where each unit in the first driving behavior dataset is a valid data segment, which contains continuous record values ​​of a preset length.

[0084] Among them, outlier removal is a data processing method performed to improve data quality, considering that autonomous driving simulation tests require multiple test parameters that continuously change. Abnormal parameter values ​​that suddenly change cannot effectively reflect the vehicle's traffic environment information. The outlier removal method includes: using the Isolation Forest (IForest) algorithm to detect outliers on the initially screened data, retaining only continuously changing data segments, thereby eliminating isolated outliers. IForest uses a random hyperplane to cut the data space composed of continuous values ​​until only one data point remains in each space. Missing value prediction filling is a data processing method performed to facilitate unified data processing, considering that after the initial screening and outlier removal based on the preset screening conditions, the sequence length of some data segments formed by selecting continuous recorded values ​​may be less than the preset length. Exemplarily, missing value prediction filling can be implemented using the Bayesian Vector Auto Regression Model (BVAR), which is suitable for multidimensional time series data prediction.

[0085] After the above processing, the first driving behavior data set related to the driving function to be tested contains a large number of low-risk driving events (i.e., driving events other than dangerous driving events). The autonomous driving simulation test based on low-risk driving events cannot efficiently evaluate the safety performance of the autonomous driving system. Therefore, in an embodiment of the present application, after determining the first driving behavior data set, data related to dangerous driving events is further mined from the first driving behavior data set to obtain a dangerous driving behavior data set. Specifically, the embodiment of the present application obtains driving behavior data with a higher risk metric from the first driving behavior data set based on preset dangerous driving behavior indicators to obtain a dangerous driving behavior data set. Among them, the dangerous driving behavior indicators may include collision time TTC, time distance to vehicle THW, distance safety factor ξ, and collision avoidance deceleration DRAC. -1 Any one or more of the indicators. The definition of each indicator is as follows:

[0086]

[0087] In the above formula, R L is the following distance, in meters (m); v h ,v f are the speed of the vehicle itself and the speed of the preceding vehicle, in meters per second (m / s); R brake is the braking distance. The physical meaning of ξ is the ratio of the actual vehicle distance to the “safety margin”. The larger ξ is, the more collision avoidance distance is left for braking, and the higher the safety. RSS,safe For the desired safety distance:

[0088]

[0089] Among them, ρ is a preset constant value, a max,accel represents the maximum acceleration, a min,brake Indicates the minimum braking acceleration, a max,brake In one embodiment, according to the actual vehicle calibration results, the parameters in the above formula are respectively taken as ρ = 0.496, a max,accel =3.084, a min,brake =3.482, a max,brake =5.688.

[0090] Among the above-mentioned dangerous driving behavior indicators, the smaller the indicator value is, the higher the driving risk at the corresponding moment and the higher the danger level is.

[0091] After determining the dangerous driving behavior data set, the logical scenario parameters related to the autonomous driving function to be tested can be obtained from each driving behavior data in the dangerous driving behavior data set to obtain a logical scenario parameter set. For example, assuming that the autonomous driving function to be tested in the embodiment of the present application is the following control function of an autonomous driving car, the variables such as the front vehicle speed, acceleration, and speed change time are obtained from each driving behavior data in the dangerous driving behavior data set as logical scenario parameters to obtain a logical scenario parameter set. In one embodiment, a non-parametric kernel density estimation method (KDE) can be used to respectively obtain the probability density distribution function of each individual test parameter in the logical scenario parameter set, and the logical scenario parameter set is represented by the probability density distribution function.

[0092] In an embodiment of the present application, since the first driving behavior data related to the autonomous driving function to be tested can be screened out from the natural driving data set, and the dangerous driving behavior data set can be determined from the first driving behavior data set, it is possible to effectively screen out dangerous driving events that are more relevant to the autonomous driving safety assessment from the original driving data set, so that the logical scenario parameter set obtained based on the dangerous driving behavior data set includes the scenario parameters corresponding to the dangerous driving events, thereby improving the efficiency and accuracy of the subsequent importance sampling distribution parameter search based on the logical scenario parameter set, and improving the efficiency of autonomous driving test case generation.

[0093] Optionally, determining the dangerous driving behavior dataset from the first driving behavior dataset according to a preset dangerous driving behavior indicator includes:

[0094] For each driving behavior data in the first driving behavior dataset, mapping each driving behavior data in the first driving behavior dataset into a dangerous driving behavior spectrum representing driving risk according to the dangerous driving behavior indicator; wherein the dangerous driving behavior spectrum is an n×m matrix, where n represents the number of time series samples of the driving behavior data; and m represents the number of the dangerous driving behavior indicators;

[0095] Performing dimensionality reduction processing on the dangerous driving behavior spectrum corresponding to each of the driving behavior data to obtain dangerous feature information of each of the driving behavior data;

[0096] The driving behavior data in the first driving behavior dataset are clustered according to the dangerous feature information, and a cluster with the lowest safety score is determined as the dangerous driving behavior dataset.

[0097] In the embodiment of the present application, the dangerous driving behavior indicators include the collision time TTC, the following distance THW, the distance safety factor ξ and the collision avoidance deceleration DRAC. -1 These indicators. For each driving behavior data in the first driving behavior data set, calculate the various dangerous driving behavior indicators of the driving behavior data, and combine the dangerous driving behavior indicators of these four dimensions to obtain a driving risk multidimensional information matrix, which is called the dangerous driving behavior spectrum of the driving behavior data. The dangerous driving behavior spectrum is an n×m matrix that can characterize driving risks, where n and m are both positive integers, n represents the number of time series samples of driving behavior data; m represents the number of dangerous driving behavior indicators. The calculation of the dangerous driving behavior spectrum is a dangerous driving behavior quantification method based on the measurement of risk (MOR) proposed based on the basic driving dynamics theory. The original driving data is processed into a multidimensional dangerous driving behavior spectrum, which can reflect the continuous risk changes during driving. Compared with the traditional method of defining statistical quantities such as mean, standard layer, maximum and ratio from dimensions such as time, distance, acceleration, etc. to characterize driving risks, it can more comprehensively capture dynamic driving behaviors in time series changes and accurately estimate the risks of each driving behavior data.

[0098] To spatially compress the range of test parameters for autonomous driving simulation tests and improve test efficiency, it is necessary to cluster risky driving behavior profiles with similar characteristics and identify a set of higher-risk driving behaviors as a risky driving behavior dataset. To facilitate clustering, after determining the risky driving behavior profile for each driving behavior data set, dimensionality reduction can be performed on the profile to obtain the risky characteristic information corresponding to the driving behavior data.

[0099] In one embodiment, considering that the spectrum of dangerous driving behavior is high-dimensional time series data, and the traditional linear discriminant dimensionality reduction algorithm LDA and principal component analysis dimensionality reduction algorithm PCA are not suitable for non-Gaussian sample data, the embodiment of the present application can use a variational autoencoder VAE to achieve dimensionality reduction of the high-dimensional time series data of the dangerous driving behavior spectrum. The variational autoencoder is a neural network comprising a symmetrical encoding layer and a decoding layer. In one embodiment, the feature vector output by the first layer of the decoding layer of the variational autoencoder can be used as the dangerous feature information after dimension compression and as the input for subsequent clustering processing. For example, the encoding layer of the variational autoencoder can include a 4-layer network structure, and the number of neurons in each layer of the network structure can be 100, 64, 32, and 16, respectively. That is, the dangerous driving behavior spectrum with an original size of 100 is processed by the encoding layer and the final output size is 16, which greatly reduces the data dimension; the learning rate of the variational autoencoder network can be 0.0001, the optimization function can be the Adam function (a gradient optimization function), the activation function can be the inverse tangent function Tanh, and the loss function can be the mean square error loss MSE. In one embodiment, after 100 epochs of training, the learning error of the variational autoencoder converges to 0.11; wherein one epoch means that all training samples undergo one forward propagation and one backpropagation training process in the variational autoencoder.

[0100] After obtaining the hazard characteristic information of each driving behavior data in each first driving behavior data set through dimensionality reduction processing, clustering processing is performed on the hazard characteristic information, and driving behavior data with similar hazard characteristics are clustered into a cluster, ultimately obtaining multiple clusters. In one embodiment, clustering processing of the hazard characteristic information can be implemented using a K-means clustering algorithm.

[0101] After obtaining several clusters, a preset safety scoring formula can be used to calculate the safety score corresponding to each cluster. The cluster with the lowest safety score is then determined as the dangerous driving behavior dataset.

[0102] For example, the safety score formula is as follows:

[0103]

[0104] Among them, s TTC 、s THW 、s ξ 、 They are collision time TTC, following distance THW, distance safety factor ξ, and collision avoidance deceleration DRAC. -1The individual indicator scores of these four individual dangerous driving behavior indicators; w1, w2, w3, and w4 are the score weights corresponding to each individual indicator determined according to the entropy weight method.

[0105] For example, suppose a natural driving data is processed through the above screening, dimensionality reduction and clustering, and four clusters can be obtained: Cluster 1, Cluster 2, Cluster 3 and Cluster 4. The overall safety scores of these four clusters are as follows: Figure 3 As shown in the figure, we can see that Cluser2 has the lowest safety score, so Cluster2 is determined as a dangerous driving behavior dataset.

[0106] In the embodiment of the present application, by determining a multi-dimensional dangerous driving behavior spectrum, dimensionality reduction processing, clustering processing and safety score calculation, the dangerous driving behavior data with the lowest safety score can be accurately found from the space. Therefore, it is possible to compress the data range spatially and accurately locate the data set that is more relevant to dangerous driving events, thereby improving the subsequent importance sampling parameter determination efficiency and autonomous driving test efficiency.

[0107] Optionally, before determining the importance sampling distribution parameter corresponding to the high-risk driving scenario based on the pre-built target proxy model and the logical scenario parameter set, the method further includes:

[0108] A target proxy model is constructed according to the logical scene parameter set.

[0109] In an embodiment of the present application, a target proxy model can be constructed before determining the parameters of the importance sampling distribution. First, the type of the target proxy model can be determined. For example, considering that the safety performance evaluation of autonomous driving vehicles requires large-scale complex computer simulation tests, especially the number of tests will increase exponentially with the increase in the dimension of the test space, making the corresponding simulation and analysis very difficult, and the above-mentioned advantages of the Kriging model are very suitable for constructing a global approximate replacement model for autonomous driving simulation testing, therefore, the type of the target proxy model is determined to be a Kriging model. After determining the type of the target proxy model, several specific test scenarios can be randomly combined to generate test case samples based on the set of logical scenario parameters for the current autonomous driving function to be tested determined in step S101, which are referred to as the first test case. Afterwards, the training of the target proxy model is completed according to the first test case, and the construction of the target proxy model is completed.

[0110] In the embodiment of the present application, since the target proxy model can be constructed based on the current logical scenario parameter set, it can be ensured that the constructed target proxy model can be more accurately applied to the search for the importance sampling distribution parameters of the current autonomous driving test function to be tested, thereby improving the accuracy of the generated test cases and further improving the accuracy of subsequent autonomous driving tests.

[0111] Optionally, constructing a target proxy model according to the logical scene parameter set includes:

[0112] Obtaining a first test case from the logical scenario parameter set;

[0113] Determining a first test result corresponding to the first test case based on the first test case and the autonomous driving system to be tested;

[0114] A target agent model is constructed according to the first test case and the first test result corresponding thereto.

[0115] When constructing the target proxy model, a preset number of logical scenario parameters can be obtained from the logical scenario parameter set and randomly combined to generate a certain number of first test cases. In one embodiment, Latin Hypercube sampling can be used to obtain initial logical scenario parameters from the logical scenario parameter set. Subsequently, the autonomous driving system under test is invoked to obtain a response value corresponding to each first test case. This response value is the first test result corresponding to the first test case.

[0116] Afterwards, the known first test case and its corresponding first test result values ​​can be substituted into the preset proxy model expression to obtain the corresponding proxy model:

[0117]

[0118] Among them, x is the logical scene parameter, is the predicted response value of the target agent model for the input logical scenario parameter x. In one embodiment, the predicted response value may include the maximum time to collision inverse ITTC. max and the minimum vehicle distance R L,min f(x)=(f1(x),...f m (x)) T is the basis vector, f i (x), i=1,2,...m are pre-designed low-order basis functions. F=(f T (x1),...,f T (x n )) Tis the basis function matrix of known test data, R(θ) is the correlation coefficient matrix of known test data; r(x * )=[r(x * ,x1),...r(x * ,x n )] T is the correlation vector between unknown test cases and known test data; u=F T R -1 rf.s 2 (x) is the predicted response value variance of the target surrogate model, and the hyperparameter σ in the formula 2 By solving the following formula 1, we can get the maximum likelihood estimation:

[0119] Formula 1:

[0120] Among them, the hyperparameter σ 2 The maximum likelihood estimation formula for the estimated value of is:

[0121]

[0122] The hyperparameter σ 2 Substitute the maximum likelihood estimation formula of the estimated value into formula 1 to obtain the solution that maximizes the log-likelihood function:

[0123]

[0124] Among them, θ is the hyperparameter of the target surrogate model.

[0125] Substitute the known first test case and its corresponding first test result into the above proxy model expression to train the proxy model, thereby completing the construction of the target proxy model.

[0126] To better illustrate the embodiments of the present application, the following describes the derivation process of the proxy model expression of the Kriging model:

[0127] Given the input of the autonomous driving simulation test model: X = [x1, x2, ..., x n ] T , the test result output Y=[y1,y2,...,y n ] T ,y i =sim(x i ) is the i-th test case x i The test results; sim() represents the code and model of the autonomous driving simulation test; any test case x i(1≤i≤n) are all m-dimensional test parameter combinations, and n is the number of test cases. The Kriging model models the simulation results of any test case in the logical scenario parameter set as:

[0128]

[0129] Where: f i (x),i=1,2,...m are pre-designed low-order basis functions; f(x)=(f1(x),...f m (x)) T is the basis vector; β=(β1,...β m ) T is the vector of undetermined regression coefficients; z(x) is the deviation of a random process with a mathematical expectation of 0, and the covariance matrix of z(x) is:

[0130] cov(z(x i ),z(x j ))=σ 2 r(θ;x i ,x j ),i,j=1,2,...n

[0131] Where r(θ) is the correlation coefficient of the known test case:

[0132]

[0133] Define F = (f T (x1),...,f T (x n )) T is the basis function matrix of known test data, R(θ) is the correlation coefficient matrix of known test data; r(x * )=[r(x * ,x1),...r(x * ,x n )] T is the correlation vector between the unknown test case and the known test data. The basic idea of ​​Kriging is to use the weighted sum of the known test results to represent the results of the unknown test case (let c be the weight coefficient vector), that is:

[0134]

[0135] In order to satisfy the unbiasedness constraint of the Kriging model estimate, let:

[0136] F T c=f(x)

[0137] At this time, the error between the Kriging estimate and the true value and the mean square error MSE are:

[0138]

[0139] Where: Z=[z1,z2,...z n ] T is the deviation of the known test data; F T c is the basis function obtained by weighted summation of known test data. In order to minimize the mean square error of Kriging estimation under the condition of satisfying the unbiased constraint, the unbiased constraint formula of the Kriging model estimation value, the above estimation value calculation formula, and the mean square error MSE formula are combined to construct the Lagrange equation:

[0140] L(c,λ)=σ 2 (1+c T Rc-2c T r)-λ T (F T cf)

[0141] Starting from the first-order necessary conditions for optimality and solving the gradient of the Lagrange equation with respect to the coefficient c, we obtain the following equation:

[0142]

[0143] Solving the above equation and substituting it into the formula corresponding to the unbiased constraint of the Kriging model estimate, we can obtain the optimal unbiased estimate of the Kriging result for any test case in the test space:

[0144]

[0145] This formula is the proxy model expression of the Kriging proxy model.

[0146] In an embodiment of the present application, since the first test case can be obtained from the logical scenario parameter set, the corresponding first test result can be determined by the autonomous driving system to be tested, thereby accurately constructing the target proxy model based on the known logical scenario parameters and their corresponding known real test results, so that the importance sampling distribution parameters can be quickly searched based on the simple and accurate target proxy model.

[0147] Optionally, constructing a target proxy model according to the first test case and its corresponding first test result includes:

[0148] A1: Constructing an initial proxy model based on the first test case and its corresponding first test result;

[0149] A2: Obtaining a second test case from the logical scenario parameter set according to an expectation maximization algorithm based on the initial proxy model;

[0150] A3: Determine a second test result corresponding to the second test case based on the second test case and the autonomous driving system to be tested;

[0151] A4: Update the proxy model according to the second test case and its corresponding second test result;

[0152] A5: If the accuracy of the updated proxy model converges, the updated proxy model is used as the target proxy model; otherwise, return to the step of executing the expectation maximization algorithm based on the initial proxy model to obtain the second test case from the logical scenario parameter set.

[0153] In the embodiment of the present application, the proxy model constructed based on the initially acquired first test case and its corresponding first test result is the initial proxy model.

[0154] Afterwards, the proxy model is iteratively optimized based on the initial proxy model. During the iterative construction of the proxy model, the error values ​​of the specific test scenarios corresponding to the remaining logical scenario parameters in the logical scenario parameter set are calculated according to the Expected Improvement (EI) principle, and the specific test scenario with the largest corresponding error value is determined as the newly added second test case. The expression of the expectation maximization algorithm is:

[0155]

[0156] Where y min is the minimum response value in the training data; Φ and φ are the standard normal cumulative distribution function and probability density function, respectively. As can be seen from the above formula, whether the local estimation error is large or the global prediction accuracy of the model is low, it will lead to an increase. From the remaining logical parameters in the logical scenario parameter set, the logical scenario parameter x that maximizes the value of EI(x) is selected as the newly obtained logical scenario parameter. Based on the newly obtained logical scenario parameter, a new second test case is generated, so that the proxy model can be further iteratively updated by obtaining test parameters with large local estimation errors or low global prediction accuracy of the model, thereby optimizing the prediction value and prediction accuracy.

[0157] After determining the newly added second test case, the second test case is input into the automatic driving system to be tested to obtain a second test result corresponding to the second test case.

[0158] Afterwards, the second test case and its corresponding second test result are substituted into the above proxy model expression for iterative updating to obtain an updated proxy model.

[0159] If the accuracy of the updated proxy model converges, the updated proxy model is directly used as the target proxy model. Exemplarily, the value of EI(x) obtained by performing the expectation maximization algorithm on the updated proxy model is consistent with the value of EI(x) obtained by the last calculation and no longer increases, which means that the current proxy model can obtain the optimal prediction value and prediction accuracy, and the accuracy of the proxy model has converged. If the accuracy of the updated proxy model has not converged, that is, the maximum value of EI(x) calculated after the update is different from the maximum value of EI(x) obtained by the last calculation, then return to step A2, continue to obtain new logical scenario parameters, and generate a new second test case to optimize the proxy model. In one embodiment, through 1288 sampling calculations, the global Kriging model corresponding to the autonomous driving simulation test model can be constructed as the final target proxy model, and the output response of the target proxy model is the inverse of the maximum collision time ITTC max and the minimum vehicle distance R L,min .

[0160] In the embodiment of the present application, since the point adding strategy (strategy of increasing test parameter sampling points) in the proxy model construction process can be implemented through the expectation maximization algorithm with global convergence and high search efficiency, an approximate replacement model of the high-precision autonomous driving simulation test model can be obtained with as few logical scenario parameters as possible, and the proxy model can be optimized. Therefore, the accuracy of the subsequent importance sampling distribution parameter search based on the target proxy model can be guaranteed, thereby improving the quality of the generated autonomous driving test cases and improving the efficiency of autonomous driving testing.

[0161] Optionally, determining the importance sampling distribution parameters corresponding to the high-risk driving scenario based on the pre-built target proxy model and the logical scenario parameter set includes:

[0162] Determining a parameter search range according to the logical scenario parameter set;

[0163] Within the parameter search range, the minimum value of the objective function is obtained through the target proxy model; wherein the objective function is the estimated error of the probability of occurrence of a dangerous event of the autonomous driving system to be tested.

[0164] The distribution parameter corresponding to the minimum value of the objective function is used as the importance sampling distribution parameter corresponding to the high-risk driving scenario.

[0165] In the embodiment of the present application, let Ω be the set of logical scenario parameters of the autonomous driving test scenario determined in step S101, and x be a test case in Ω. Then, the following indicator function can be used to indicate whether a dangerous driving event (which may include rare events such as collisions and conflicts) occurs in the simulation test with x as input:

[0166]

[0167] Where: ε is the set of dangerous driving events that represent collisions, conflicts, etc.

[0168] In one embodiment, the minimum vehicle distance R during the test is used. L,min and maximum collision time ITTC max The inverse is used to determine whether the test result is dangerous. For example, 0.33 is used as the ITTC conflict event threshold, and the specific definition of ε is:

[0169]

[0170] Among them, crash means collision and conflict means conflict.

[0171] The embodiment of the present application designs a target importance sampling distribution h(x) to replace the original probability density g(x) of the original logical scenario parameter set to amplify the probability of occurrence of dangerous driving events, significantly reduce the number of simulation tests, and thus improve test efficiency.

[0172] For example, the importance sampling technique can quantitatively calculate the probability of dangerous events occurring in an autonomous driving system:

[0173]

[0174] Where L(x) = f(x) / h(x) is the likelihood ratio, and the estimation error of the target importance sampling distribution function for the probability of a dangerous event occurring in the autonomous driving system is:

[0175]

[0176] In one embodiment, in order to obtain the optimal parameters of the importance sampling distribution, the present application selects a multivariate Gaussian distribution that is easy to sample and calculate probability density as the target importance sampling distribution function:

[0177] x~N(μ,∑)

[0178] Where μ and ∑ are the mean vector and covariance matrix of the multivariate Gaussian distribution, respectively. These two parameters are the importance sampling distribution parameters to be searched. Based on the target proxy model constructed above, we find the value that makes the estimation error e ISThe smallest parameter μ,∑. The search problem can be expressed as:

[0179]

[0180] This formula is the objective function for accurately searching the importance sampling distribution parameter, where x represents the speed v of the preceding vehicle. f , acceleration a f and the speed change time t f The three-dimensional test parameters are composed of Ns, the number of sampling times, G×H, the test parameter search range determined by the logical scenario parameter set, and the argmin function represents the test parameter search range that satisfies the search range. Parameters for obtaining the minimum value

[0181] Exemplarily, the search range can be expressed as follows:

[0182]

[0183] Where: v fmax ,v fmin are the maximum and minimum speeds of the preceding vehicle, respectively, in meters per second (m / s); a fmax ,a fmin They are the maximum and minimum acceleration of the preceding vehicle, in m / s 2 ;t fmax ,t fmin are the maximum and minimum speed change times of the preceding vehicle, respectively, in seconds. Within this search range, the target proxy model is used to test the dangerous driving event I(x), and the results are substituted into the objective function above. The optimization problem is solved using an intelligent optimization algorithm to find the minimum value of the objective function.

[0184] Afterwards, when the objective function is minimized, the parameter of the objective importance sampling distribution function h(x) is As the optimal importance sampling distribution parameter searched.

[0185] In one embodiment, after 60 iterations, the objective function reaches a minimum value, and the importance sampling distribution parameter for generating high-risk test scenarios is: μ * =[29-6.5759 5.5246] and ∑ * =diag(5.99780.6446 1.4494).

[0186] In the embodiment of the present application, there is no need to perform time-consuming computer simulation experiments when searching for the optimal parameters of IS based on the target proxy model. Therefore, the optimal parameters of IS distribution can be searched in the logical scenario parameter space at an extremely fast speed, while allowing a large-scale increase in the test scale required for each iteration, which to a certain extent compensates for the loss of search accuracy caused by the iteration based on the target proxy model.

[0187] By adopting the autonomous driving test case generation method of the embodiment of the present application, it is possible to generate target test cases that can characterize high-risk driving scenarios in batches and in a generalized manner, greatly improving the efficiency of test case generation in high-risk driving scenarios. Based on the target test cases generated by batch generalization, it is possible to achieve a quantitative estimate of the probability of dangerous events occurring in the autonomous driving system to be tested through fewer target test cases. Therefore, through the method of the embodiment of the present application, it is possible to improve the accuracy of the test results while significantly reducing the number of test cases required and the number of tests. Taking the following control function of an autonomous driving car as an example, after a large number of experimental verifications, the method of the present application improves the test efficiency by 26.8% to 51% compared with the existing test acceleration method, and achieves an acceleration effect of about 3000 times compared with the existing Monte Carlo method.

[0188] Example 2:

[0189] Figure 4 A schematic diagram of the structure of an autonomous driving test case generation device provided by an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown:

[0190] The autonomous driving test case generation device includes: a logic scenario parameter set acquisition unit 41, an importance sampling distribution parameter determination unit 42 and a test case generation unit 43.

[0191] The logic scenario parameter set acquisition unit 41 is used to obtain the logic scenario parameter set corresponding to the automatic driving function to be tested based on the natural driving data set.

[0192] The importance sampling distribution parameter determination unit 42 is used to determine the importance sampling distribution parameters corresponding to the high-risk driving scenario based on a pre-built target proxy model and the logical scenario parameter set; the target proxy model is the proxy model of the autonomous driving system to be tested.

[0193] The test case generating unit 43 is configured to generate a target test case according to the importance sampling distribution parameters corresponding to the high-risk driving scenario.

[0194] Optionally, the logical scenario parameter set acquiring unit 41 includes:

[0195] a screening module, configured to screen out a first driving behavior data set related to the autonomous driving function to be tested from the natural driving data set;

[0196] a dangerous driving behavior data set determining module, configured to determine a dangerous driving behavior data set from the first driving behavior data set based on preset dangerous driving behavior indicators, wherein the dangerous driving behavior indicators include any one or more of collision time, following distance, distance safety factor, and collision avoidance deceleration;

[0197] The parameter acquisition module is used to obtain logical scenario parameters from the dangerous driving behavior data set to obtain a logical scenario parameter set.

[0198] Optionally, the dangerous driving behavior data set determination module is specifically used to map each driving behavior data in the first driving behavior data set into a dangerous driving behavior spectrum that characterizes driving risks according to the dangerous driving behavior indicators; wherein the dangerous driving behavior spectrum is an n×m matrix, n represents the number of time series samples of the driving behavior data; m represents the number of dangerous driving behavior indicators; dimensionality reduction processing is performed on the dangerous driving behavior spectrum corresponding to each driving behavior data to obtain dangerous feature information of each driving behavior data; according to the dangerous feature information, the driving behavior data in the first driving behavior data set are clustered, and the cluster with the lowest safety score is determined as the dangerous driving behavior data set.

[0199] Optionally, the autonomous driving test case generating device further includes:

[0200] The construction unit is used to construct a target proxy model according to the logical scene parameter set.

[0201] Optionally, the construction unit includes:

[0202] A first test case acquisition module, configured to acquire a first test case from the logic scenario parameter set;

[0203] a first test result determination module, configured to determine a first test result corresponding to the first test case based on the first test case and the autonomous driving system to be tested;

[0204] A construction module is used to construct the target agent model according to the first test case and the first test result corresponding thereto.

[0205] Optionally, the construction module is specifically configured to construct an initial proxy model according to the first test case and the first test result corresponding thereto;

[0206] Obtaining a second test case from the logical scenario parameter set according to an expectation maximization algorithm based on the initial proxy model;

[0207] Determining a second test result corresponding to the second test case based on the second test case and the autonomous driving system to be tested;

[0208] updating the proxy model according to the second test case and the second test result corresponding thereto;

[0209] If the accuracy of the updated proxy model converges, the updated proxy model is used as the target proxy model; otherwise, the step of returning to execute the expectation maximization algorithm based on the initial proxy model to obtain a second test case from the logical scenario parameter set.

[0210] Optionally, the importance sampling distribution parameter determination unit is specifically used to determine a parameter search range based on the logical scenario parameter set; within the parameter search range, the minimum value of the objective function is obtained through the target proxy model; wherein the objective function is used to calculate the estimated error of the probability of occurrence of a dangerous event of the autonomous driving system to be tested; and the distribution parameter corresponding to the minimum value of the objective function is used as the importance sampling distribution parameter corresponding to the high-risk driving scenario.

[0211] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0212] Example 3:

[0213] Figure 5 Schematic diagram of an electronic device provided by an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as an autonomous driving test case generation program. When the processor 50 executes the computer program 52, the steps in the above-mentioned embodiments of the autonomous driving test case generation method are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 4 The functions of the logical scenario parameter set acquisition unit 41 to the test case generation unit 43 are shown.

[0214] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the electronic device 5.

[0215] The electronic device 5 can be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The electronic device can include, but is not limited to, a processor 50 and a memory 51. It can be understood by those skilled in the art that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0217] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for generating autonomous driving test cases, characterized in that: include: Based on the natural driving data set, obtain the logical scenario parameter set corresponding to the autonomous driving function to be tested; Filtering a first driving behavior dataset related to the autonomous driving function to be tested from the natural driving dataset according to a preset screening condition corresponding to the autonomous driving function to be tested; According to the dangerous driving behavior index, each driving behavior data in the first driving behavior data set is mapped to a dangerous driving behavior spectrum representing driving risk, where the dangerous driving behavior spectrum is , n represents the number of time series samples of the driving behavior data; m represents the number of dangerous driving behavior indicators; then, the driving behavior data in the first driving behavior dataset are screened, dimensionally reduced, and clustered to obtain four clusters, and the cluster with the lowest comprehensive safety score is extracted to form a dangerous driving behavior dataset; Obtaining logical scenario parameters from the dangerous driving behavior dataset to obtain a parameter set of the logical scenario; Based on the logical scenario parameter set, a target proxy model is constructed through iterative updating; the target proxy model is a proxy model of the autonomous driving system to be tested; based on the pre-constructed target proxy model and the logical scenario parameter set, importance sampling distribution parameters corresponding to high-risk driving scenarios are determined, including: Determining a parameter search range based on the logical scenario parameter set; obtaining a minimum value of an objective function within the parameter search range using the target proxy model; wherein the objective function is used to calculate an estimated error in the probability of occurrence of a dangerous event of the autonomous driving system to be tested; The distribution parameters corresponding to when the objective function achieves the minimum value are used as the importance sampling distribution parameters corresponding to the high-risk driving scenario, including: Select multivariate Gaussian distribution as the target importance sampling distribution function: ; Where, , are the mean vector and covariance matrix of the multivariate Gaussian distribution, respectively. These two parameters are the importance sampling distribution parameters to be searched; It is a test case in the set of logical scenario parameters of the autonomous driving test scenario; Based on the target proxy model constructed above, find the Minimum parameters , ; Generate target test cases based on the importance sampling distribution parameters corresponding to the high-risk driving scenario, including: According to the importance sampling distribution of the high-risk driving scenes found Parameters , , generalize a high-risk driving scenario, the parameters of which are: the speed of the vehicle ahead , acceleration of the vehicle ahead , Speed ​​change time of the preceding vehicle ; According to the speed of the vehicle in front , determine the initial speed of the self-driving car to be tested ; Afterwards, based on the initial speed of the autonomous vehicle , calculate the expected initial relative distance between the autonomous vehicle and the vehicle in front: Where: is the following distance; is the relative distance between the two vehicles at rest, which is taken as a constant; The speed of the preceding vehicle generated by , acceleration of the vehicle ahead , Speed ​​change time of the preceding vehicle , the initial speed of the autonomous vehicle to be tested , the expected initial relative distance to the preceding vehicle These scenario parameters constitute a target test case in a high-risk driving scenario.

2. The method for generating an autonomous driving test case according to claim 1, wherein: The step of constructing the target proxy model according to the logical scene parameter set includes: Obtaining a first test case from the logical scenario parameter set; Determining a first test result corresponding to the first test case based on the first test case and the autonomous driving system to be tested; The target agent model is constructed according to the first test case and the first test result corresponding thereto.

3. The method for generating an autonomous driving test case according to claim 2, wherein: The step of constructing the target proxy model according to the first test case and the first test result corresponding thereto includes: Constructing an initial proxy model according to the first test case and the first test result corresponding thereto; Obtaining a second test case from the logical scenario parameter set according to an expectation maximization algorithm based on the initial proxy model; Determining a second test result corresponding to the second test case based on the second test case and the autonomous driving system to be tested; updating the proxy model according to the second test case and the second test result corresponding thereto; If the accuracy of the updated proxy model converges, the updated proxy model is used as the target proxy model; otherwise, the step of returning to execute the expectation maximization algorithm based on the initial proxy model to obtain a second test case from the logical scenario parameter set.

4. An autonomous driving test case generation device, characterized in that: include: A logic scenario parameter set acquisition unit, configured to acquire a logic scenario parameter set corresponding to the autonomous driving function to be tested based on a natural driving data set; Filtering a first driving behavior dataset related to the autonomous driving function to be tested from the natural driving dataset according to a preset screening condition corresponding to the autonomous driving function to be tested; According to the dangerous driving behavior index, each driving behavior data in the first driving behavior data set is mapped to a dangerous driving behavior spectrum representing driving risk, where the dangerous driving behavior spectrum is , n represents the number of time series samples of the driving behavior data; m represents the number of dangerous driving behavior indicators; then, the driving behavior data in the first driving behavior dataset are screened, dimensionally reduced, and clustered to obtain four clusters, and the cluster with the lowest comprehensive safety score is extracted to form a dangerous driving behavior dataset; Obtaining logical scenario parameters from the dangerous driving behavior dataset to obtain a parameter set of the logical scenario; According to the set of logical scene parameters, a target proxy model is constructed through iterative updating; An importance sampling distribution parameter determination unit is configured to determine importance sampling distribution parameters corresponding to a high-risk driving scenario based on a pre-built target proxy model and the set of logical scenario parameters; the target proxy model is a proxy model of the autonomous driving system to be tested; and the importance sampling distribution parameter determination unit is specifically configured to: Determining a parameter search range based on the logical scenario parameter set; obtaining a minimum value of an objective function within the parameter search range using the target proxy model; wherein the objective function is used to calculate an estimated error in the probability of occurrence of a dangerous event of the autonomous driving system to be tested; The distribution parameters corresponding to when the objective function achieves the minimum value are used as the importance sampling distribution parameters corresponding to the high-risk driving scenario, including: Select multivariate Gaussian distribution as the target importance sampling distribution function: ; Where, , are the mean vector and covariance matrix of the multivariate Gaussian distribution, respectively. These two parameters are the importance sampling distribution parameters to be searched; It is a test case in the set of logical scenario parameters of the autonomous driving test scenario; Based on the target proxy model constructed above, find the Minimum parameters , ; A test case generation unit is configured to generate a target test case based on the importance sampling distribution parameters corresponding to the high-risk driving scenario, including: According to the importance sampling distribution of the high-risk driving scenes found Parameters , , generalize a high-risk driving scenario, the parameters of which are: the speed of the vehicle ahead , acceleration of the vehicle ahead , Speed ​​change time of the preceding vehicle ; According to the speed of the vehicle in front , determine the initial speed of the self-driving car to be tested ; Afterwards, based on the initial speed of the autonomous vehicle , calculate the expected initial relative distance between the autonomous vehicle and the vehicle in front: Where: is the following distance; is the relative distance between the two vehicles at rest, which is taken as a constant; The speed of the preceding vehicle generated by , acceleration of the vehicle ahead , Speed ​​change time of the preceding vehicle , the initial speed of the autonomous vehicle to be tested , the expected initial relative distance to the preceding vehicle These scenario parameters constitute a target test case in a high-risk driving scenario.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the electronic device implements the steps of the method according to any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the electronic device implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Automatic driving test scene construction method, device and equipment and readable storage medium

    CN112036001A

  • Key test case generation method for passage scene of unmanned vehicle at crossroad based on importance sampling

    CN113642108A