A risk-aware autonomous driving simulation test case sequencing method

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

CN121144211BActive Publication Date: 2026-03-10SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-03-10

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 short-sighted search strategies, which affect the overall efficiency and diversity of fault detection.

Method used

We construct a discriminative feature space for risk perception, generate a projection matrix through unsupervised learning and sparse constraints, and combine risk-driven and forward-looking exploration components to construct a policy scorer to rank test cases.

Benefits of technology

It improves the early detection rate of critical failures, enhances the coverage of diverse risk scenarios, ensures the comprehensiveness and efficiency of failure detection, and has good robustness and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144211B_ABST
    Figure CN121144211B_ABST
Patent Text Reader

Abstract

The application discloses a risk-aware automatic driving simulation test case sequencing method, and relates to the technical field of software testing, and comprises the following steps: collecting a no-label automatic driving test set, wherein the test cases in the test set contain a plurality of driving scene features; obtaining an optimal projection matrix by using a target function learning with embedded double sparse constraints; projecting the test set into a low-dimensional discriminative feature space by using the projection matrix; selecting two test cases with the maximum Euclidean distance in the discriminative feature space as initial elements of a sequencing sequence; constructing a strategy scorer based on a risk-driven component and a forward-looking exploration component to generate scores for candidate test cases; selecting a candidate test case with the maximum score to add to the end of the sequencing sequence; repeating the execution until all test cases are sequenced; and outputting the sequencing sequence. By dynamically balancing the utilization of risk driving and the forward-looking exploration, an optimal test execution sequence is iteratively constructed, and the coverage capability for diversified risk scenarios is effectively enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to a risk-aware method for sequencing test cases in autonomous driving simulation tests. Background Technology

[0002] Safety verification of automated driving systems (ADS) is a core challenge for their large-scale commercial application. Virtual simulation testing, as a key verification method, faces a near-infinite test scenario space comprised of massive parameter combinations. To efficiently discover system defects within limited resources and time, test case prioritization techniques have been widely researched and applied.

[0003] However, existing ranking methods generally suffer from a fundamental flaw: they typically operate directly on a raw, high-dimensional feature space. This space lacks a semantic structure directly related to risk, leading to a mismatch between the numerical similarity of scenarios and their true risk levels—a phenomenon we call the "semantic gap." This makes it difficult for algorithms to accurately assess and differentiate risks. Furthermore, most ranking methods employ short-sighted or greedy search strategies, prioritizing test cases with the highest immediate returns. This strategy often causes the testing process to prematurely converge to a particular type of fault, neglecting the exploration of other potential risk areas, severely impacting the overall efficiency and diversity of fault discovery.

[0004] Therefore, there is an urgent need for a new prioritization method that can first accurately perceive risks and then make efficient, long-term plans based on those risks. Summary of the Invention

[0005] To address the problems existing in current technologies, this invention provides a risk-aware method for ranking autonomous driving simulation test cases. This method solves the problems of low ranking efficiency due to a lack of risk perception capabilities and limited fault detection due to short-sighted search strategies. By constructing a risk-aware discriminative feature space and combining it with a forward-looking search strategy, the early detection rate of critical faults is improved.

[0006] The technical solution of this invention is implemented as follows:

[0007] A method for ranking risk-aware autonomous driving simulation test cases, comprising the following steps:

[0008] T1. Collect unlabeled data based on the autonomous driving system. The resulting n test cases constitute a test set, which is then preprocessed. Each test case contains d driving scenario features. Specifically, driving scenario features are quantifiable indicators describing the overall state of the driving scenario, such as vehicle state features (speed, acceleration, yaw rate, steering wheel angle, etc.), environmental state features (weather conditions, including rain and fog intensity, light intensity, road surface slippage, etc.), and traffic participant interaction features (distance between the vehicle and the nearest obstacle, relative speed, time to collision (TTC), etc.). The above unlabeled raw dataset does not require manual risk level labeling, reflecting the unsupervised nature of this invention.

[0009] 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; optimize the projection matrix using the objective function.

[0010] T3. Using the projection matrix, project the test set from d dimensions to r dimensions to generate a discriminative feature space with risk perception. In mathematics, This indicates that r is much smaller than d, meaning there is a significant difference between the two. 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.

[0011] 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 denoted as candidate test cases;

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

[0013] T6. For each candidate test case, calculate a score using the ranking sequence and the policy scorer; select the candidate test case with the highest score and add it to the end of the ranking sequence. In this invention, the ranking task of the test cases is not considered a one-off, difficult-to-solve combinatorial optimization problem, but is precisely modeled as a deterministic sequential decision-making process. This modeling idea seeks the globally optimal ranking sequence. The complex problem can be broken down into n consecutive, more manageable decision-making steps.

[0014] 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.

[0015] 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.

[0016] 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.

[0017] Furthermore, the test set before preprocessing is represented as , Each element in the expression is a numerical representation of the driving scenario feature, and ;

[0018] 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;

[0019] The preprocessed test set is represented as .

[0020] 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.

[0021] 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.

[0022] 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. .

[0023] Furthermore, the dual sparsity constraint includes a structured sparsity constraint on the objective function;

[0024] 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.

[0025] Specifically, the objective function is expressed as:

[0026] ;

[0027] 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.

[0028] ; 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;

[0029] After applying sparse weights, the objective function is expressed as:

[0030] ;

[0031] in, express The cluster centroid matrix.

[0032] 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.

[0033] 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.

[0034] Furthermore, the dual sparsity constraint includes applying a set sparsity constraint to the objective function;

[0035] 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.

[0036] Specifically, apply The objective function after norm constraints is expressed as:

[0037] ;

[0038] in, express - Norm constraint.

[0039] - 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.

[0040] 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.

[0041] 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.

[0042] Furthermore, the numerical value generated by the risk-driven component for a candidate use case is represented as follows: ,Right now:

[0043] ;

[0044] 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;

[0045] , 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 cases.

[0046] 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.

[0047] Furthermore, the numerical representation generated by the prospective exploration component for a candidate use case is as follows: ,Right now:

[0048] ;

[0049] 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, specifically a small constant used to prevent division by zero; t represents the iteration round.

[0050] 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.

[0051] Furthermore, the policy scorer is represented as:

[0052] ;

[0053] Indicates rating, This represents the value generated by the risk-driven component. This represents the numerical value generated by the prospective 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 cause the strategy to shift towards more exploratory behavior; Norm(·) indicates that the numerical value is Z-score normalized.

[0054] 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.

[0055] Compared with the prior art, the present invention achieves the following beneficial effects:

[0056] (1) This invention provides a risk-aware method for ranking test cases in autonomous driving simulation. By constructing a risk-aware discriminative feature space, the risk similarity of test cases can be directly quantified using Euclidean distance. This quantifiable metric provides a clear and non-blind decision-making basis for subsequent forward-looking search strategies, thereby fundamentally solving the semantic gap problem and significantly improving the efficiency of early detection of critical faults. By dynamically balancing risk-driven utilization and forward-looking exploration, the optimal test execution sequence is iteratively constructed. The resulting test case set enhances the coverage of diverse risk scenarios and significantly accelerates the safety verification process of autonomous driving systems without the need for manual annotation.

[0057] (2) The forward-looking search strategy ensures broad coverage of diverse failure modes, avoids over-testing in a single risk area, and significantly improves the ability to discover unknown and rare risks.

[0058] (3) The process of constructing the risk perception space can automatically identify key risk characteristics and has good robustness to data noise, making the ranking results both reliable and easy to understand. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of the overall process of a risk perception-based autonomous driving simulation test case sorting method provided in an embodiment of the present invention;

[0060] Figure 2 This is a schematic diagram of the forward-looking search and sorting process provided in the embodiments of the present invention;

[0061] Figure 3 This is a t-SNE projection visualization of the test cases provided in the embodiments of the present invention in the original feature space;

[0062] Figure 4 This is a visualization of the t-SNE projection of the test cases in the discriminative feature space provided in the embodiments of the present invention;

[0063] Figure 5 This is a box plot showing the distribution of APFDc scores from different algorithm comparison tests provided in this embodiment of the invention.

[0064] Figure 6 This is a cost-benefit curve diagram comparing different algorithms provided in the embodiments of the present invention. Detailed Implementation

[0065] 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.

[0066] 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:

[0067] Phase 1: Construction of the risk perception and discrimination feature space.

[0068] 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... .

[0069] 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... .

[0070] 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. .

[0071] The output of the centering process is a matrix with a mean of zero, which preserves all the distribution information of the original data and is more suitable for projection and cluster 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.

[0072] T2. Unsupervised Projection Model Learning: Constructing a projection matrix; The purpose of using a 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.

[0073] An unsupervised objective function is constructed and learned based on the projection matrix and the test set, and a dual sparse constraint is embedded in the objective function. The projection matrix is ​​then optimized using the objective function based on the unsupervised trace ratio linear discriminant analysis framework.

[0074] Specifically, the objective function is expressed as:

[0075] ;

[0076] 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.

[0077] Dual sparsity constraints include structured sparsity constraints and group sparsity constraints on the objective function.

[0078] In this embodiment, 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.

[0079] Specifically, ; 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;

[0080] After applying sparse weights, the objective function is expressed as:

[0081] ;

[0082] in, express The cluster centroid matrix.

[0083] 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.

[0084] 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.

[0085] 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.

[0086] Specifically, apply The objective function after norm constraints is expressed as:

[0087] ;

[0088] in, express - Norm constraint.

[0089] - 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.

[0090] 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.

[0091] 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.

[0092] 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.

[0093] Phase Two: Proactive Search and Ranking.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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.

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

[0100] In this embodiment, the numerical value generated by the risk-driven component for a candidate use case is represented as follows: ,Right now:

[0101] ;

[0102] in, D represents the candidate use case; 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.

[0103] , 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 cases.

[0104] 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.

[0105] In this embodiment, the numerical value generated by the prospective exploration component for a candidate use case is represented as follows: ,Right now:

[0106] ;

[0107] 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.

[0108] 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.

[0109] In this embodiment, the policy scorer is represented as:

[0110] ;

[0111] 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 cause the strategy to shift towards more exploratory behavior; Norm(·) indicates that the numerical value is Z-score normalized.

[0112] 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.

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

[0114] 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.

[0115] In this embodiment, the technical effects of the present invention are further illustrated by combining comparative and visualization experiments, as detailed below:

[0116] 1. Experimental conditions and setup

[0117] 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.

[0118] 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.

[0119] 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.

[0120] 2. Comparative Experiment and Analysis

[0121] 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.

[0122] 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.

[0123] This superior and stable performance stems from its highly efficient fault detection capability, which is evident in... Figure 6 The 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.

[0124] 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.

[0125] 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 risk-aware automated driving simulation test case sequencing method, characterized in that, The method comprises the steps of: T1, collecting unlabeled data based on an automatic driving system, obtaining n test cases to form a test set, and preprocessing the test set; each test case includes d driving scene features; T2, constructing a projection matrix; based on the projection matrix and the test set, constructing and learning an unsupervised objective function, and embedding a double sparse constraint in the objective function; The double sparse constraint includes a structured sparse constraint and a group sparse constraint on the objective function; The structured sparse constraint is that, based on the objective function, a diagonal weight matrix Q and a diagonal weight matrix G are calculated and constructed, and adaptive sparse constraints are applied to error terms and feature terms of the objective function by using the two diagonal weight matrices; The group sparsity constraint is to impose a norm constraint that the total number of non-zero rows in the projection matrix does not exceed a preset value. The objective function is used to optimize the projection matrix; T3, projecting the test set from d dimensions to r dimensions using the projection matrix to generate a discriminative feature space with risk awareness, ; T4, constructing a ranking sequence; in the discriminant feature space, selecting two test cases with the largest Euclidean distance as two initial members of the ranking sequence; The remaining test cases are denoted as candidate test cases; T5, constructing a risk-driven component for evaluating the diversity contribution of the candidate test cases to the ranking sequence; Constructing a forward exploration component for evaluating the exploration level of the candidate test cases to unknown risks; Based on the risk-driven component and the forward exploration component, a strategy scorer is constructed; The risk driven component generates a numerical representation for a candidate use case as i.e. ; wherein, represents the candidate use case; D(·) represents the Euclidean distance calculation; Cost(·) is the cost required to execute the candidate use case; represents the ranking sequence, is the current test case in the existing test suite, t represents the iteration round. , denotes an adaptive weight that enhances the impact of high-risk test cases; is a hyper-parameter that denotes the control of risk sensitivity; (•) denotes a normalized risk level score resulting from a pre-evaluation of the risk level of the test case; The prospective exploration component generates a numerical representation of the value of a candidate use case as i.e.: ; wherein, represents the candidate use case; represents a set of all candidate use cases; represents a candidate use case other than D(·) represents a Euclidean distance calculation; is a constant; T6, for each candidate test case, calculating a score by using the ranking sequence and the strategy scorer; selecting a candidate test case with the largest score to join the end of the ranking sequence; T7, repeating T6 until all test cases are ranked; and outputting the ranking sequence.

2. The risk-aware automated driving simulation test case sequencing method of claim 1, wherein, 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 is centering the test set, comprising: for each row element in the test set, respectively calculating a mean value, and each parameter is subtracted by the mean value of the same row; and respectively calculating a mean value for each row element in the test set, and each parameter is subtracted by the mean value of the same row. The pre-processed test set is denoted as .

3. The risk-aware automated driving simulation test case sequencing method of claim 1, wherein, The strategy scorer is represented as: ; represents a score, represents a value generated by the risk driving component, represents a value generated by the forward looking exploration component; is a pre-set trade-off value; Norm(·) represents Z-score normalization on the value.

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