Risk-aware automatic driving simulation test case sorting method

By constructing a discriminative feature space for risk perception and a forward-looking search strategy, the problem of insufficient risk perception in the ranking of autonomous driving simulation test cases is solved, achieving efficient and reliable fault detection and risk coverage, and improving the safety verification efficiency of autonomous driving systems.

CN121144211AActive Publication Date: 2025-12-16SOUTH CHINA UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511677715.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2025-12-16
Estimated Expiration
2045-11-17

AI Technical Summary

Technical Problem

Existing methods for ranking test cases in autonomous driving simulation lack risk perception capabilities, resulting in low ranking efficiency and limited fault detection. Short-sighted search strategies cause the testing process to converge prematurely to a certain type of fault, ignoring other potential risk areas.

Method used

A discriminative feature space for risk perception is constructed. A projection matrix is ​​generated through unsupervised learning and sparse constraints to project test cases from a high-dimensional space to a low-dimensional space. A policy scorer is constructed by combining risk-driven and forward-looking exploration components to achieve the ranking of test cases.

Benefits of technology

It improves the early detection rate of critical failures, enhances the coverage of diverse risk scenarios, avoids overtesting of a single risk area, significantly improves the ability to detect unknown and rare risks, and has good robustness and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144211A_ABST
    Figure CN121144211A_ABST
Patent Text Reader

Abstract

The invention discloses a risk-aware automatic driving simulation test case sorting method, and relates to the technical field of software testing, and the method comprises the steps: collecting a label-free automatic driving test set, and the test case comprises a plurality of driving scene features; an optimal projection matrix is obtained by adopting objective function learning embedded with double sparse constraints; projecting the test set into a low-dimensional discriminant feature space by using the projection matrix; selecting two test cases with the maximum Euclidean distance in the discriminant feature space as initial elements of a sorting sequence; constructing a strategy scoring device based on a risk-driven component and a prospective exploration component, and generating scores for the candidate cases; the candidate case with the maximum score is selected to be added to the tail of the sorting sequence; repeatedly executing until all the test cases are sorted; and outputting the sorting sequence. Through utilization of dynamic balance risk driving and prospective exploration, an optimal test execution sequence is iteratively constructed, and the capability of covering diversified risk scenes is effectively enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software testing, and particularly relates to a risk-aware automatic driving simulation test case sequencing method. BACKGROUND

[0002] Safety verification of an automatic driving system (ADS) is a core challenge for its large-scale commercialization. Virtual simulation testing, as a key verification method, faces a nearly infinite test scenario space composed of a large number of parameter combinations. In order to efficiently find system defects within limited resources and time, test case priority sequencing technology is widely studied and applied.

[0003] However, there is a fundamental defect in existing sequencing methods, that is, they usually directly operate on the original high-dimensional feature space. This space lacks a semantic structure directly related to risk, resulting in a mismatch between the numerical similarity of scenarios and their real risk levels, which we call the "semantic gap". This makes it difficult for algorithms to accurately assess and distinguish risks. In addition, most sequencing methods use short-sighted or greedy search strategies, which prefer to select test cases with the highest immediate returns. This strategy often leads to the premature convergence of the testing process to a certain type of fault, while neglecting the exploration of other potential risk areas, severely affecting the global efficiency and diversity of fault discovery.

[0004] Therefore, there is an urgent need for a new sequencing method that can first accurately perceive risk and then make efficient and long-term plans. SUMMARY

[0005] To solve the problems of low sequencing efficiency due to the lack of risk perception ability and the limitation of fault discovery due to the short-sighted search strategy in the prior art, the present application provides a risk-aware automatic driving simulation test case sequencing method. By constructing a risk-aware discriminative feature space and combining a forward-looking search strategy, the early detection rate of key faults is improved.

[0006] The technical solution of the present application is as follows: A risk-aware automatic driving simulation test case sequencing method, comprising the steps of: T1, collect unlabeled data based on an automatic driving system, obtain n test cases to form a test set, and preprocess the test set; each of the test cases includes d driving scene features; specifically, the driving scene features are quantifiable indexes describing the overall state of a driving scene, such as vehicle state features including vehicle speed, acceleration, yaw rate, steering wheel angle, and the like; environmental state features including weather conditions (rain, fog intensity), light intensity, road surface slipperiness, and the like; and traffic participant interaction features including the distance between a vehicle and a nearest obstacle, relative speed, time to collision (TTC), and the like. The above unlabeled original data set does not need to be manually labeled with risk levels, and embodies the unsupervised characteristics of the application.

[0007] T2, construct a projection matrix; construct and learn an unsupervised objective function based on the projection matrix and the test set, and embed a double sparse constraint in the objective function; optimize the projection matrix by using the objective function; T3, project the test set from d dimensions to r dimensions by using the projection matrix to generate a risk-aware discriminative feature space, ; in mathematics, r is much smaller than d, that is, there is a significant difference between them; the purpose of using the projection matrix is to find an optimal low-dimensional subspace without labels, in which potential risk scenarios and safe scenarios can be distinguished to the greatest extent.

[0008] T4, construct a ranking sequence; in the discriminative feature space, select two test cases with the largest Euclidean distance as two initial members of the ranking sequence; and the remaining test cases are recorded as candidate cases; T5, construct a risk-driven component for evaluating the diversity contribution of the candidate cases with respect to the ranking sequence; construct a forward-looking exploration component for evaluating the exploration level of unknown risks of the candidate cases; and construct a strategy scorer based on the risk-driven component and the forward-looking exploration component; T6, for each of the candidate cases, calculate a score by using the ranking sequence and the strategy scorer; select a candidate case with the largest score to join the end of the ranking sequence; in the application, the ranking task of the test cases is not regarded as a one-time, difficult-to-solve combinatorial optimization problem, but is accurately modeled as a deterministic sequential decision-making process. This modeling idea divides the complex problem of finding a global optimal ranking sequence into n continuous, more manageable decision steps.

[0009] Specifically, in this invention, the system uses the test cases in the already selected sorting sequence as a complete context to capture and select new candidate test cases. Therefore, each selected test case can be regarded as the state of the system at the corresponding time step (iteration round). The system selects a new state by using a policy scorer and prior states, that is, by evaluating the immediate contribution of the selected candidate test cases and their potential value for future exploration, thereby guiding the entire sorting process toward the global optimum.

[0010] To ensure that the sequential decision-making process starts from a robust and highly diverse starting point, the task is initialized non-randomly at startup, selecting the two test cases with the greatest Euclidean distance as the initial state.

[0011] T7. Repeat T6 until all test cases are sorted; output the sorted sequence, which is the optimal test execution order provided by this invention that can discover critical system faults with the highest efficiency.

[0012] Furthermore, the test set before preprocessing is represented as , Each element in the expression is a numerical representation of the driving scenario feature, and ; The preprocessing involves centering the test set, including: for For each row of elements in the array, calculate the mean, and subtract the mean of the same row from each parameter; The preprocessed test set is represented as .

[0013] Centralization eliminates the influence of different feature units and numerical ranges, providing a stable and unbiased input for subsequent statistical learning models. This step aims to reduce the interference of data bias on subsequent statistical model learning, laying the foundation for building a robust feature space.

[0014] The output of the centering process is a matrix with a mean of zero, which retains all the distribution information of the original data and is more suitable for projection and cluster analysis.

[0015] The specific centralization process can be represented as follows: ;in, Represents an n×1 column vector of all 1s. Let represent an n×n matrix, where each element of the matrix is ​​0. .

[0016] Furthermore, the dual sparsity constraint includes a structured sparsity constraint on the objective function; The structured sparsity constraint is to calculate and construct diagonal weight matrices Q and G based on the objective function, and then apply adaptive sparsity constraints to the error term and characteristic term of the objective function using the two diagonal weight matrices.

[0017] Specifically, the objective function is expressed as: ; in, Represents the Frobenius norm constraint; Denotes the projection matrix, and ; for The cluster centroid matrix; Represents the identity matrix. Indicates in The orthogonal constraints applied on it.

[0018] ; The i-th diagonal element is represented as : ; The i-th diagonal element is represented as : ;in, for The element in the i-th column, for The element in the i-th column; This is a preset constant; After applying sparse weights, the objective function is expressed as: ; in, express The cluster centroid matrix.

[0019] Introduction - Norm regularization term, which sparsely weights the test cases (i.e., the columns of the data matrix). This constraint can identify and suppress the influence of outliers or isolated points in the test set, ensuring that the learned projection matrix is ​​highly robust to data noise and extreme scenarios.

[0020] During the iterative solution process, matrices Q and G dynamically adjust their weights based on the outlierness of each test case in the current projection space. For anomalous test cases that may interfere with model learning, the algorithm assigns them smaller weights, thereby effectively suppressing their negative impact.

[0021] Furthermore, the dual sparsity constraint includes applying a set sparsity constraint to the objective function; The set of sparsity constraints is applied to the objective function. - Norm constraint, ensuring that the total number of non-zero rows in the projection matrix does not exceed a preset value.

[0022] Specifically, apply The objective function after norm constraints is expressed as: ; in, express - Norm constraint.

[0023] - Norm constraints are a hybrid norm constraint method that combines structured sparsity with feature selection capabilities. Its purpose is to ensure that each row... - The norm should be as small as possible, and the number of zero elements in each row should be as high as possible. This constraint forces the algorithm to select only a subset of features that contribute the most to risk discrimination, thereby achieving automatic feature reduction and selection, and making the final model highly interpretable.

[0024] Apply to the projection matrix The norm constraint, applied to impose feature sparsity, aims to learn discrete feature scores, polarizing the score of each scene feature to form a clearer and more well-defined decision boundary. This makes the objective function suitable for feature selection tasks, resulting in a discrete and robust discriminative feature space. This constraint forces the algorithm to select only the k (preset) features that contribute the most to risk discrimination from d original features, while resetting the weights of the remaining irrelevant or redundant features to zero.

[0025] In step T3, the optimal projection matrix obtained from the objective function is represented as W. The process of obtaining the discriminative feature space is then represented as follows: Z represents the discriminative feature space. In this discriminative feature space, the original data structure is reshaped, test cases with similar risk levels are geometrically close to each other and form clusters, while test cases with large differences in risk levels are far apart, thus providing a clear, quantifiable "map" that is directly related to risk for subsequent ranking.

[0026] Furthermore, the numerical value generated by the risk-driven component for a candidate use case is represented as follows: ,Right now: ; in, The candidate use case is represented by D(·); D(·) represents the Euclidean distance calculation; Cost(·) is the cost required to execute the candidate use case; furthermore, the cost can be time cost, complexity cost / performance cost, etc. This represents the sorted sequence. For the present The existing test cases, where t represents the iteration round; , denotes the adaptive weight that enhances the impact of high-risk test cases; is a hyper-parameter that denotes the control of risk sensitivity; (•) denotes the normalized risk level score obtained from the pre-evaluation of the risk level of test cases.

[0027] The risk-driven component is used to quantify the immediate impact of selecting a candidate case, specifically by a risk-weighted diversity metric, i.e. the weighted distance between the current candidate case and all the selected test cases that are identified as high-risk. This drives the search algorithm to preferentially select those new scenarios that are related to known risks but in different directions, thus achieving an efficient and non-repetitive “exploitation” of known risky regions.

[0028] Further, the prospective exploration component generates a numerical representation for a candidate case as i.e. ; wherein, denotes the candidate case; denotes the set of all candidate cases; denotes the candidate case other than D(·) denotes the Euclidean distance calculation; is a constant, specifically a small constant adopted to prevent division by zero; denotes the ordering sequence, is the test case already in the current t denotes the iteration round.

[0029] The prospective exploration component is used to quantify the future potential of selecting a candidate case, specifically by evaluating the regional centrality of a candidate case in the population of all candidate cases, i.e. the inverse of the average distance to all other candidate cases. A high future potential score implies being at the center of a dense, yet unexplored test region. Selecting this candidate case is like establishing an outpost in this unknown region, which can efficiently represent the risk situation of this entire region, i.e. embody the systematic exploration capability of the algorithm for unknown risky regions, thus avoiding the limitations of short-sighted strategies.

[0030] Further, the strategy scorer is denoted as: ; denotes the score, denotes the numerical value generated by the risk-driven component, denotes the numerical value generated by the prospective exploration component; is a preset trade-off value, indicating the trade-off between risk-driven development and forward-looking exploration, higher will make the strategy turn to a more exploratory behavior; Norm(·) represents the Z-score normalization of numerical values.

[0031] Z-score is used to convert numerical values into a standard normal distribution with a mean of 0 and a standard deviation of 1. Through Z-score processing, a robust scaling is provided that is less sensitive to the magnitude or outliers in the two score distributions.

[0032] Compared with the prior art, the present application has the following beneficial effects: (1) The present application provides a risk-aware automatic driving simulation test case sorting method, which constructs a risk-aware discriminant feature space, in which the risk similarity of test cases can be quantified directly by the Euclidean distance. This quantifiable measure provides a clear and non-blind decision basis for subsequent forward-looking search strategies, thereby fundamentally solving the semantic gap problem and significantly improving the early detection efficiency of critical failures. By dynamically balancing risk-driven utilization and forward-looking exploration, the optimal test execution sequence is iteratively constructed. The final test case set enhances the coverage ability of diversified risk scenarios and significantly accelerates the safety verification process of the automatic driving system without manual annotation.

[0033] (2) The forward-looking search strategy ensures extensive coverage of diversified failure modes and avoids excessive testing in a single risk area, significantly improving the ability to discover unknown and rare risks.

[0034] (3) The construction process of the risk-aware space can automatically identify key risk features and has good robustness to data noise, making the sorting result reliable and easy to understand. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 is a general flowchart of a risk-aware automatic driving simulation test case sorting method provided by an embodiment of the present application; Figure 2 is a flowchart of forward-looking search and sorting provided by an embodiment of the present application; Figure 3 is a t-SNE projection visualization display diagram of test cases in the original feature space provided by an embodiment of the present application; Figure 4 is a t-SNE projection visualization display diagram of test cases in the discriminant feature space provided by an embodiment of the present application; Figure 5 is an APFDc score distribution box plot of different algorithm comparison tests provided by an embodiment of the present application; Figure 6 This is a cost-benefit curve diagram comparing different algorithms provided in the embodiments of the present invention. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0037] like Figure 1 , Figure 2 As shown, this embodiment provides a method for ranking risk-aware autonomous driving simulation test cases, comprising two core stages working in tandem: the first stage is the construction of a risk-aware discrimination feature space (steps T1-T3), and the second stage is the prospective search and ranking within this space (steps T4-T7). The specific steps are as follows: Phase 1: Construction of the risk perception and discrimination feature space.

[0038] T1. Data Preprocessing: Collect an unlabeled test set containing n test cases from the autonomous driving simulation platform or road logs. Each test case is described by a d-dimensional raw feature vector (i.e., driving scenario features). These features cover the vehicle's kinematic state (e.g., speed, acceleration), environmental parameters (e.g., weather, lighting), and interaction information with traffic participants (e.g., other vehicles, pedestrians). The test set is denoted as... .

[0039] To eliminate the influence of different feature units and numerical ranges, and to provide a stable and unbiased input for subsequent statistical learning models, the test set X undergoes centering preprocessing. In this embodiment, the centering process includes: for For each row of elements in the dataset, calculate the mean, and subtract the mean of the same row from each parameter; the preprocessed test set is represented as... .

[0040] The above process can also be represented as: ;in, Represents an n×1 column vector of all 1s. Let represent an n×n matrix, where each element of the matrix is ​​0. .

[0041] The output of the centralized processing is a matrix with zero mean, which retains all the distribution information of the original data and is more suitable for projection and clustering analysis. This step aims to reduce the interference of data bias on subsequent statistical model learning and lay the foundation for building a robust feature space.

[0042] T2, unsupervised projection model learning: constructing a projection matrix; the purpose of using the projection matrix is to find an optimal low-dimensional subspace in which the potential risk scenarios and safe scenarios can be maximally distinguished without labels.

[0043] Based on the projection matrix and the test set, an unsupervised objective function is constructed and embedded with double sparse constraints; the projection matrix is optimized by using the objective function based on the unsupervised trace ratio linear discriminant analysis framework.

[0044] Specifically, the objective function is represented as: ; Wherein, represents the Frobenius norm constraint; represents the projection matrix, and ; is the clustering centroid matrix of ; represents the unit matrix, represents the orthogonal constraint imposed on .

[0045] The double sparse constraint includes structural sparsity constraint and group sparsity constraint on the objective function.

[0046] In this embodiment, the structural sparsity constraint is that, based on the objective function, a diagonal weight matrix Q and G are calculated and constructed, and adaptive sparse constraints are imposed on the error term and feature term of the objective function by using the two diagonal weight matrices.

[0047] Specifically, ; The i-th diagonal element of is represented as : ; The i-th diagonal element of is represented as : ; wherein, is the i-th column element of , is the i-th column element of ; is a preset constant; After imposing the sparse weight, the objective function is represented as: ; Wherein, express The cluster centroid matrix.

[0048] By introducing - Norm regularization term, which sparsely weights the test cases (i.e., the columns of the data matrix). This constraint can identify and suppress the influence of outliers or isolated points in the test set, ensuring that the learned projection matrix is ​​highly robust to data noise and extreme scenarios.

[0049] During the iterative solution process, matrices Q and G dynamically adjust their weights based on the outlierness of each test case in the current projection space. For anomalous test cases that may interfere with model learning, the algorithm assigns them smaller weights, thereby effectively suppressing their negative impact.

[0050] In this embodiment, the group sparsity constraint is applied to the objective function. - Norm constraint ensures that the total number of non-zero rows in the projection matrix does not exceed a preset value.

[0051] Specifically, apply The objective function after norm constraints is expressed as: ; in, express - Norm constraint.

[0052] - Norm constraints are a hybrid norm constraint method that combines structured sparsity with feature selection capabilities. Its purpose is to ensure that each row... - The norm should be as small as possible, and the number of zero elements in each row should be as high as possible. This constraint forces the algorithm to select only a subset of features that contribute the most to risk discrimination, thereby achieving automatic feature reduction and selection, and making the final model highly interpretable.

[0053] Apply to the projection matrix The norm constraint, applied to impose feature sparsity, aims to learn discrete feature scores, polarizing the score of each scene feature to form a clearer and more well-defined decision boundary. This makes the objective function suitable for feature selection tasks, resulting in a discrete and robust discriminative feature space. This constraint forces the algorithm to select only the k (preset) features that contribute the most to risk discrimination from d original features, while resetting the weights of the remaining irrelevant or redundant features to zero. This not only achieves automatic feature reduction and selection but, more importantly, makes the decision basis of the final model (i.e., the selected key features) transparent, thus possessing high interpretability.

[0054] T3. Projection to generate a low-dimensional risk space: The test set is projected from d dimensions to r dimensions using a projection matrix to generate a discriminative feature space with risk perception. Specifically, it means Z represents the discriminative feature space. In this discriminative feature space, the original data structure is reshaped, test cases with similar risk levels are geometrically close to each other and form clusters, while test cases with large differences in risk levels are far apart, thus providing a clear, quantifiable "map" that is directly related to risk for subsequent ranking.

[0055] like Figure 3 As shown, the effect of this step is significant. In the original feature space on the left, safe (blue) and unsafe (green) test cases are mixed together and difficult to distinguish. For example... Figure 4 As shown, in the risk perception space (discrimination feature space) constructed by this invention, insecure use cases are effectively clustered and clearly separated from the clusters of secure use cases. This indicates that in this space, the Euclidean distance between test cases has become an effective measure of their risk similarity, providing a clear, quantifiable "map" directly related to risk for subsequent ranking.

[0056] Phase Two: Proactive Search and Ranking.

[0057] In this invention, the test case sorting task is not treated as a one-off, difficult-to-solve combinatorial optimization problem, but rather precisely modeled as a deterministic sequential decision-making process. This modeling approach seeks the globally optimal sorting sequence. The complex problem can be broken down into n consecutive, more manageable decision-making steps.

[0058] Specifically, in this invention, the system uses the test cases in the already selected sorting sequence as a complete context to capture and select new candidate test cases. Therefore, each selected test case can be regarded as the state of the system at the corresponding time step (iteration round). The system selects a new state by using a policy scorer and prior states, that is, by evaluating the immediate contribution of the selected candidate test cases and their potential value for future exploration, thereby guiding the entire sorting process toward the global optimum.

[0059] To ensure that the sequential decision-making process starts from a robust and highly diverse starting point, the task is initialized non-randomly at startup, selecting the two test cases with the greatest Euclidean distance as the initial state.

[0060] Therefore, execute T4 to construct the sorted sequence; in the discriminant feature space, select the two test cases with the largest Euclidean distance as the two initial members of the sorted sequence; the remaining test cases are denoted as candidate test cases; at this point... , These represent the two selected test cases. The filtering process is represented as follows: Z represents the set of test cases within the discriminant feature space.

[0061] T5. Risk-driven utilization and forward-looking exploration: Construct a risk-driven component to evaluate the diversity contribution of candidate use cases relative to the ranking sequence; construct a forward-looking exploration component to evaluate the exploration level of candidate use cases to unknown risks; construct a policy scorer based on the risk-driven component and the forward-looking exploration component.

[0062] T6. Calculate the strategy score: For each candidate use case, calculate the score using the sorting sequence and the strategy scorer; at this point... .

[0063] In this embodiment, the numerical value generated by the risk-driven component for a candidate use case is represented as follows: ,Right now: ; in, The candidate use case is represented by D(·); D(·) represents the Euclidean distance calculation; Cost(·) is the cost required to execute the candidate use case; in this embodiment, the cost can be the time cost.

[0064] , representing an adaptive weight that enhances the impact of high-risk test cases; is a hyperparameter representing the sensitivity to control risk; (•) represents the normalized risk level score obtained by pre-assessing the risk level of the test case.

[0065] The risk-driven component quantifies the immediate impact of selecting a candidate use case. This is achieved through a risk-weighted diversity metric, which calculates the weighted distance between the current candidate use case and all previously selected test cases identified as high-risk. This drives the search algorithm to prioritize new scenarios that are related to known risks but in different directions, thus achieving efficient and non-repetitive "utilization" of known risk areas.

[0066] In this embodiment, the numerical value generated by the prospective exploration component for a candidate use case is represented as follows: ,Right now: ; in, This represents the set of all candidate use cases; Indicates except Other candidate use cases; D(·) represents Euclidean distance calculation; It is a constant, specifically a small constant used to prevent division by zero.

[0067] The forward-looking exploration component quantifies the future potential of a selected candidate use case. This is achieved by evaluating the regional centrality of a candidate use case within the entire group of candidate use cases, specifically by calculating the reciprocal of the average distance to all other candidate use cases. A high future potential score indicates that the candidate is located at the center of a dense, unexplored test region. Selecting this candidate use case is akin to establishing an outpost in this unknown region, efficiently representing the risk status of the entire area. This demonstrates the algorithm's systematic exploration capability of unknown risk regions, thus avoiding the limitations of short-sighted strategies.

[0068] In this embodiment, the policy scorer is represented as: ; This represents the score, specifically the score for the forward-looking strategy. This represents the value generated by the risk-driven component. This represents the numerical value generated by the forward-looking exploration component; This is a preset tradeoff value, representing the tradeoff between risk-driven development and forward-looking exploration; a higher value indicates a greater tradeoff. This will shift the strategy towards more exploratory behavior; Norm(·) indicates Z-score normalization of the numerical value.

[0069] Z-score is used to convert numerical values ​​to a standard normal distribution with a mean of 0 and a standard deviation of 1. Z-score processing provides robust scaling that is less sensitive to magnitudes or outliers in the two score distributions.

[0070] Select the candidate test case with the highest score and add it to the end of the sorting sequence; at this point... .

[0071] T7. Repeat T6 until all test cases are sorted; output the sorted sequence, which is the optimal test execution order provided by this invention, capable of discovering critical system faults with the highest efficiency.

[0072] In this embodiment, the technical effects of the present invention are further illustrated by combining comparative and visualization experiments, as follows: 1. Experimental conditions and setup The test suite is based on the Baidu Apollo 5.0 autonomous driving platform and generated using a high-fidelity LGSVL simulator. It contains 10,000 independent test scenarios, each described by 63 features. Of these scenarios, 2,849 were deemed unsafe (i.e., collisions or violations of safe distances occurred), while the remainder were considered safe. This dataset covers complex driving behaviors on urban roads, such as turning, lane changing, and traffic light interactions.

[0073] To objectively evaluate the performance of this invention (denoted as NmS-TCP), three representative test case sorting methods were selected as benchmarks: (1) Random sorting: The test cases are sorted completely randomly as a lower bound reference for performance. (2) Greedy algorithm (Greedy-TCP): A deterministic heuristic algorithm that always selects the test case with the highest diversity-cost ratio in each iteration. This method represents a typical short-sighted search strategy. (3) Genetic algorithm (GA-TCP): A state-of-the-art heuristic search method based on genetic algorithms that finds the optimal sorting through population evolution. This method represents a state-of-the-art random heuristic search strategy.

[0074] This embodiment uses the internationally recognized Cost-cognizant Average Percentage of Faults Detection (APFDc) as the core evaluation metric. This metric not only measures the speed of fault detection but also considers the execution cost of each test case. Its value range is [value range missing], and the higher the value, the more efficient the ranking method.

[0075] 2. Comparative Experiment and Analysis Based on the comprehensive comparison of experimental results, the technical solution (NmS-TCP) of this invention has achieved a comprehensive and significant improvement in performance, efficiency and stability compared to the prior art.

[0076] like Figure 5 The quantitative evaluation results show that the method of this invention exhibits excellent and highly stable ranking performance, with an average APFDc score of 0.8651. Compared with the GA-TCP and Greedy-TCP benchmarks, it achieves significant relative performance gains of 7.87% and 20.27%, respectively. Crucially, as a deterministic algorithm, the performance of this invention follows a stable linear trend, ensuring complete reproducibility of the results. This contrasts sharply with the inherently large performance fluctuations of GA-TCP, a random algorithm, which exhibits across multiple runs, highlighting the application value of this invention in industrial testing processes with extremely high requirements for reliability and consistency.

[0077] This superior and stable performance stems from its highly efficient fault detection capability, which is evident in... Figure 6The cost-benefit curves shown provide a clear confirmation of this. The curve for the method of this invention exhibits the steepest rate of ascent in the initial testing phase, indicating that it achieves a significantly faster fault detection speed than the benchmark method in the critical early stages of testing. Quantitative analysis further confirms this advantage: the method of this invention successfully detected 2,659 out of 2,849 faults (a remarkable 93.3%) with only 30% of the total test execution cost, while Greedy-TCP detected only about 77.2% of the faults under the same cost budget. This fully demonstrates that the present invention, through the synergy of risk perception and forward-looking search, can accurately pinpoint critical risk scenarios with extremely high efficiency.

[0078] In summary, the technical solution of this invention, through the organic combination of its unique risk perception space construction capability and forward-looking search strategy, achieves comprehensive and significant technical progress in performance, efficiency, and stability in the test case ranking task.

[0079] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the present invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.

Claims

1. A method for ranking risk-aware autonomous driving simulation test cases, characterized in that, Including the following steps: T1. Collect unlabeled data based on the autonomous driving system, and obtain n test cases to form a test set. Preprocess the test set; each test case contains d driving scenario features. T2. Construct a projection matrix; construct and learn an unsupervised objective function based on the projection matrix and the test set, and embed dual sparse constraints in the objective function; The projection matrix is ​​optimized using the objective function. T3. Using the projection matrix, project the test set from d dimensions to r dimensions to generate a discriminative feature space with risk perception. ; T4. Construct a sorting sequence; In the discriminative feature space, select the two test cases with the largest Euclidean distance as the two initial members of the sorting sequence; The remaining test cases are referred to as candidate test cases; T5. Construct a risk-driven component to evaluate the diversity contribution of the candidate use cases relative to the ranking sequence; Construct a forward-looking exploration component to evaluate the level of exploration of unknown risks by the candidate use cases; Construct a strategy scorer based on the risk-driven component and the forward-looking exploration component; T6. For each candidate use case, calculate a score using the sorting sequence and the policy scorer; select the candidate use case with the highest score and add it to the end of the sorting sequence; T7. Repeat T6 until all test cases are sorted; output the sorted sequence.

2. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The test set before preprocessing is represented as , Each element in the expression is a numerical representation of the driving scenario feature, and ; The preprocessing involves centering the test set, including: for For each row of elements in the array, calculate the mean, and subtract the mean of the same row from each parameter; The preprocessed test set is represented as .

3. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The dual sparsity constraint includes a structured sparsity constraint on the objective function; The structured sparsity constraint is to calculate and construct diagonal weight matrices Q and G based on the objective function, and then apply adaptive sparsity constraints to the error term and characteristic term of the objective function using the two diagonal weight matrices.

4. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The dual sparsity constraint includes applying a set sparsity constraint to the objective function; The set of sparsity constraints is applied to the objective function. - Norm constraint, ensuring that the total number of non-zero rows in the projection matrix does not exceed a preset value.

5. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The numerical value generated by the risk-driven component for a candidate use case is represented as follows: ,Right now: ; in, D represents the candidate use case; D(·) represents the Euclidean distance calculation; Cost(·) is the cost required to execute the candidate use case; This represents the sorted sequence. For the present The existing test cases, where t represents the iteration round; , representing an adaptive weight that enhances the impact of high-risk test cases; is a hyperparameter representing the sensitivity to control risk; (•) represents the normalized risk level score obtained by pre-assessing the risk level of the test case.

6. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The numerical representation generated by the prospective exploration component for a candidate use case is: ,Right now: ; in, Indicates the candidate use case; This represents the set of all candidate use cases; Indicates except Other candidate use cases; D(·) represents Euclidean distance calculation; It is a constant; This represents the sorted sequence. For the present The existing test cases are described above, where t represents the iteration round.

7. The method for ranking risk-aware autonomous driving simulation test cases according to claim 1, characterized in that, The strategy scorer is represented as follows: ; Indicates rating, This represents the value generated by the risk-driven component. This represents the numerical value generated by the prospective exploration component; The default tradeoff value is used; Norm(·) indicates that the value is Z-score normalized.

Citation Information

Patent Citations

  • Method and device of generating automatic drive test cases automatically

    CN110716529A

  • Virtual automatic driving test optimization method based on improved DQN algorithm

    CN111625457A

  • Automatic driving simulation test feature selection method

    CN120030315A