A method and system for generating and constructing traffic scenes based on an improved PICT
By improving the traffic scene generation method of PICT, and using the analytic hierarchy process and K-means clustering to optimize the static and dynamic parameter sets and construct logical constraint relationships, the shortcomings of scene generation in autonomous driving simulation testing are solved, and efficient, comprehensive and high-risk scene generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-26
AI Technical Summary
Existing traffic scene generation methods suffer from insufficient scene rationality, low combination coverage, strong subjectivity in the selection of static scene elements, and inaccurate classification of dynamic scenes in autonomous driving simulation testing, resulting in a high-risk scene generation rate that is difficult to meet testing requirements.
We used the hierarchical analysis method based on the NHTSA accident dataset to screen high-risk sub-elements in static scenarios. We combined K-means clustering from the HighD dataset and TTC hazard level classification to construct logical constraint relationships between parameters and an integer weight parameter table, and optimized the pairwise combination coverage test strategy of PICT.
It enables quantitative screening of high-risk elements in static scenarios and accurate classification of dynamic scenarios, improving the generation rate of high-risk scenarios, reducing the number of test cases, and increasing testing efficiency and coverage.
Smart Images

Figure CN122086767A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving simulation testing technology, specifically to a traffic scene generation and construction method and system based on an improved PICT. Background Technology
[0002] As autonomous driving technology evolves towards Level 4 and above, the core prerequisite for its safe deployment is to verify system reliability through comprehensive and rigorous scenario testing. Traditional real-vehicle testing has inherent drawbacks such as high cost, long cycle, and high risk. Research by the RAND Corporation in the United States shows that proving the safety of high-level autonomous driving requires completing billions of kilometers of real-vehicle testing, which is difficult to achieve in engineering practice. Therefore, virtual simulation testing has become the mainstream testing method due to its advantages of safety, efficiency, and repeatability. The key to simulation testing lies in generating traffic scenarios that are reasonable, comprehensive, and targeted at high-risk scenarios, especially edge-hazard scenarios that are rare on open roads.
[0003] Current traffic scene generation methods have many shortcomings: mechanism-based modeling methods have limited adaptability to scene diversity, while data-driven methods rely on expert experience and lack objective expression; although the Paired Combination Test Tool (PICT) can reduce the number of test cases, the traditional uniform combination strategy does not consider the risk differences of scene elements, resulting in insufficient generation density of high-risk scenes; at the same time, static scene element selection lacks quantitative basis, dynamic scene element classification is not accurate enough, and the generation rate of dangerous scenes is difficult to meet testing needs.
[0004] In summary, how to quantify the risk weights of scene elements, improve the generation rate of high-risk scenes, and optimize testing efficiency while ensuring the rationality and comprehensive coverage of scene combinations are pressing technical problems to be solved in the field of traffic scene generation in current autonomous driving simulation testing. To address these issues, this paper proposes a traffic scene generation and construction method and system based on an improved PICT to solve these problems. Summary of the Invention
[0005] The purpose of this invention is to provide a traffic scene generation and construction method and system based on an improved PICT, so as to solve the problems mentioned in the background art.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A traffic scene generation and construction method based on an improved PICT includes the following steps; S1. Extract sub-elements corresponding to each static scene element based on the NHTSA accident dataset, and use the analytic hierarchy process to calculate the risk weight of each sub-element. Based on this, select high-risk sub-elements corresponding to each static scene element to form a static parameter set. S2. Based on the HighD highway dataset, extract the set of lane change interaction trajectories, divide the set of lane change interaction trajectories into several lane change scenarios using the K-means clustering algorithm, and construct TTC hazard level scenarios to form a dynamic parameter set; S3. Integrate the static parameter set and the dynamic parameter set to form the PICT input parameter set, and at the same time construct the logical constraint relationship between parameters and the integer weight parameter table to generate a PICT configuration file containing the PICT input parameter set, the logical constraint relationship between parameters and the integer weight parameter table; S4. Import the PICT configuration file into PICT and execute the pairwise combination coverage test strategy to output a set of test cases for traffic scenarios.
[0007] Preferably, the static scene elements include weather, time period, lighting conditions, road type, and road surface.
[0008] Preferably, the method for constructing the static parameter set is as follows: S11. Construct a three-layer hierarchical judgment matrix including the target layer, the criterion layer, and the solution layer. The target layer is to quantify the impact weight of sub-elements on traffic scenario risks, the criterion layer is to classify static scenario elements, and the solution layer is to clarify the corresponding sub-elements under each static scenario element. S12. Using the 1-9 scale method, organize 3-5 experts in traffic engineering and autonomous driving testing to conduct pairwise scoring of the relative importance of sub-elements at the same level based on the correlation analysis results between each sub-element in the NHTSA accident dataset and the traffic accident incidence rate, forming a judgment matrix for the sub-elements at each criterion level. ,in Let represent the importance scale of the i-th sub-element relative to the j-th sub-element, and satisfy the reciprocity property. When i=j ; Importance scales follow the analytic hierarchy process (AHP) guidelines, specifically: 1 indicates that the two sub-elements are of equal importance; 2 indicates that the importance of the two sub-elements is between equal and slightly more important; 3 indicates that the i-th sub-element is slightly more important than the j-th sub-element; 4 indicates that the importance of the two sub-elements lies between slightly important and significantly important; 5 indicates that the i-th sub-element is significantly more important than the j-th sub-element; 6 indicates that the importance of the two sub-elements lies between obvious importance and strong importance; 7 indicates that the i-th sub-element is significantly more important than the j-th sub-element; 8 indicates that the importance of the two sub-elements lies between strong importance and extreme importance; 9 indicates that the i-th sub-element is extremely more important than the j-th sub-element; The NHTSA accident dataset is an official road traffic accident statistics set publicly released by the National Highway Traffic Safety Administration of the United States. It covers a massive amount of road traffic accident records across the United States from 2010 to 2023 and is one of the most authoritative and widely used accident analysis datasets in the global transportation field. S13. Take the nth root of the product of each row element of the judgment matrix A to obtain the initial row vector. The nth power, n, represents the order of the judgment matrix A, i.e., the number of sub-elements under the corresponding criterion layer. Then, the initial row vector... The weight vector is obtained by normalization. ; The initial row vector The calculation formula is: ; in, For the initial row vector The i-th element, To determine the element in the i-th row and j-th column of matrix A; The formula for calculating the weight vector w is: ; in, Let be the i-th element of the weight vector w, i.e., the risk weight of the i-th sub-element, and satisfy . .
[0009] S14. Based on the weight vector w, calculate the largest eigenvalue of the judgment matrix A. And determine the largest eigenvalue of matrix A. Substitute the values into the consistency index formula to calculate the consistency index CI. Simultaneously, consult the random consistency index RI value table and obtain the random consistency index RI corresponding to the consistency index CI based on the order of the judgment matrix A. Calculate the consistency ratio accordingly. ; The maximum eigenvalue The calculation formula is: ; in, To determine the i-th element of the product of matrix A and weight vector w; The formula for the consistency index is: ; Where n is the order of the judgment matrix A; S15. When At that time, the sub-elements in the weight vector w are sorted in descending order of their weight values. The top-N sub-elements with the highest weight values are selected as the high-risk sub-elements of the corresponding static scene elements, and their corresponding weight values are associated as risk weights. Based on this, a static parameter set is formed. Otherwise, adjust the judgment matrix A and repeat S12-S14; when When the judgment matrix A satisfies the consistency requirement, the weight vector w is valid. Then, the weight values of each sub-element in the weight vector w are used as the basis for judgment. Sort the elements in descending order and select the top-N sub-elements by weight value as high-risk sub-elements of the corresponding static scene elements. Associate these with their corresponding weight values as risk weights, thus constructing a static parameter set. The value of TOP-N is set according to the actual traffic scenario testing requirements; the TOP-N setting differs for different static scene elements. If the consistency of judgment matrix A is not met, it indicates that experts need to be organized to readjust the importance scores among the sub-elements, correct judgment matrix A, and repeat steps S12-S14 until the consistency test is passed.
[0010] Preferably, the method for extracting the set of lane change interaction trajectories is as follows: S21. Read the tracksMeta.csv and tracks.csv files from the HighD highway dataset. The tracksMeta.csv file stores the trajectory summary information of each vehicle, including but not limited to fields such as vehicle trajectory ID, number of lane changes (numLaneChanges), vehicle type, and trajectory start and end times. The tracks.csv file stores the refined trajectory data of each vehicle for each frame, including fields such as vehicle trajectory ID, frame number, timestamp, x-coordinate (vertical position), y-coordinate (lateral position), x-direction velocity, y-direction velocity, x-direction acceleration, y-direction acceleration, and lane ID. Filter and extract the vehicle trajectory IDs in the tracksMeta.csv file where the numLaneChanges field is 1. Selecting vehicle trajectory IDs with numLaneChanges of 1 is to avoid trajectory interference caused by multiple lane change events, ensuring that each trajectory corresponds to only a single, complete lane change behavior. The HighD highway dataset is a high-resolution highway natural driving dataset publicly released by RWTH Aachen University in Germany in conjunction with related research institutions. It is specifically adapted to the needs of highway vehicle behavior analysis, trajectory extraction and scene modeling. S22. Using vehicle trajectory ID as the key field, the lane change trajectory corresponding to the vehicle trajectory ID is extracted from the tracks.csv file by field matching, and lane change trajectories with less than 250 trajectory frames and the corresponding vehicle trajectory IDs are removed. S23. For each filtered lane change trajectory, iterate through all trajectory frames in ascending order of timestamp. Identify lane change trajectory frames by monitoring changes in lane IDs. When the lane ID of two consecutive trajectory frames changes from the original lane identifier to the target lane identifier, the preceding trajectory frame is defined as the lane change start frame, denoted as... The next trajectory frame is defined as the lane change termination frame, denoted as... to The time period is the actual lane change execution phase; To fully capture vehicle interaction behavior during the lane change execution phase, a time window was set to 2 seconds before the start frame of the lane change. 2 seconds after the lane change termination frame Within this time window, with the real-time position of the lane-changing vehicle corresponding to the lane-changing trajectory as the center, nearby interactive vehicles are retrieved. Nearby interactive vehicles are those that are in the original lane, target lane, or adjacent lane of the lane-changing vehicle within the same time period, and whose longitudinal distance is ≤50 meters and lateral distance is ≤2 meters. The trajectory data of the nearby interactive vehicles within the same time window are extracted by associating them with the vehicle trajectory ID. Here, in order to correspond with the lane-changing trajectory of the lane-changing vehicle, the trajectory data of the nearby interactive vehicles are also used as the lane-changing trajectory. At the same time, the trajectory data of the nearby interactive vehicles must also meet the requirement of ≥250 trajectory frames. S25 extracts the lane-changing trajectories of the lane-changing vehicle and the adjacent vehicle into frames of the same length, preferably 250 frames. The trajectory frames are aligned with the starting frame of the lane change as the time zero point, so that each set of corresponding trajectory frames of the lane-changing vehicle and the adjacent vehicle are at the same time node, accurately reflecting the position, speed and acceleration relationship between the two at the same moment. Each set of lane-changing trajectory of the lane-changing vehicle and the lane-changing trajectory of the adjacent vehicle constitutes a lane-changing interaction trajectory pair with that vehicle trajectory ID. Based on this, a set of lane-changing interaction trajectories consisting of several lane-changing interaction trajectory pairs corresponding to different vehicle trajectory IDs is obtained.
[0011] Preferably, the number of clusters K in the K-means clustering algorithm is obtained by calculating and analyzing the sum of squared clustering errors of the lane change interaction trajectory set using the elbow method. This is used to determine the optimal number of lane change scenario divisions by quantifying the clustering effect, ensuring that the divided lane change scenarios have significant differences and are representative of actual traffic scenarios. Specifically: From each pair of lane-change interaction trajectories in the set of lane-change interaction trajectories, the lane-change trajectory of the lane-changing vehicle is extracted. Based on the lane-change trajectory of the lane-change vehicle, several core feature parameters of the lane-change trajectory are obtained: x-coordinate, y-coordinate, x-direction velocity, y-direction velocity, x-direction acceleration, and y-direction acceleration. Based on these core feature parameters, a clustering feature matrix is constructed. And the constructed clustering feature matrix The Z-score normalization method is used to perform normalization, resulting in the normalized cluster feature matrix. Where m is the total number of lane change interaction trajectory pairs in the lane change interaction trajectory set, and 6 is the number of core feature parameters; Set the cluster number K to traverse a range of 2-8, and perform the following steps for each candidate value K: (1) Randomly initialize K cluster centers Each cluster center ; (2) Calculate the feature vector of each trajectory With each cluster center Euclidean distance The trajectory feature vector is assigned to the nearest cluster, that is, the trajectory feature vector i belongs to cluster k if and only if The formula for calculating the Euclidean distance is: ( (For illustrative purposes only); (3) Update the cluster center of each cluster to the mean of all trajectory feature vectors within that cluster, i.e. ,in, For the k-th cluster, This represents the number of trajectory feature vectors within a cluster. (4) Repeat (2)-(3) until the cluster centers no longer change or the preset number of iterations is reached, then stop the iteration; (5) Calculate the sum of squared clustering errors (SSE) corresponding to the current candidate value K, which serves as the core indicator for measuring the clustering effect. The formula for calculating the sum of squared clustering errors (SSE) is as follows: ; in, This represents the sum of squared errors when the number of clusters is K. After traversing all candidate values K, plot the cluster number K on the x-axis and the corresponding value on the y-axis. The curve will The number of clusters K corresponding to the inflection point where the curve changes from steep to gentle is determined as the optimal number of clusters for the K-means clustering algorithm.
[0012] Preferably, the TTC hazard level scenarios include extremely high hazard scenario TTC1, high hazard scenario TTC2, medium hazard scenario TTC3, low hazard scenario TTC4, and safe scenario TTC5.
[0013] Preferably, the dynamic parameter set includes TTC hazard level scenarios and lane change scenarios.
[0014] Preferably, the integer weight parameter table consists of a static parameter weight lookup table formed by mapping the risk weights of high-risk sub-elements corresponding to each static scene element in the static parameter set to positive integer weights, and a preset dynamic parameter weight lookup table. The function of the integer weight parameter table is to allocate combination priority according to the size of the positive integer weight when PICT executes the combination coverage test strategy. The higher the positive integer weight of the parameter, the earlier its combination with other parameters will be generated as test cases. The formula for mapping the risk weights of the high-risk sub-elements to positive integer weights is as follows: ; in, Let be the positive integer weight of the i-th static high-risk sub-element. Let i be the risk weight of the i-th static high-risk sub-element. This is the rounding function.
[0015] Preferably, the paired combination coverage test strategy is as follows: traverse and cover all value combinations of any two different parameters in the PICT input parameter set to ensure that each value combination of any two parameters appears in at least one traffic scenario test case. Here, the parameters refer to weather, time period, lighting conditions, road surface, lane change scenario and TTC hazard level scenario, and the parameter values refer to the filtered sub-elements corresponding to weather, time period, lighting conditions, and road surface, as well as the different categories of lane change scenario and TTC hazard level scenario.
[0016] By adopting the above technical solution, this invention achieves significant technological progress compared to existing technologies, effectively solving the problems of high real-vehicle testing costs, incomplete scenario coverage, low proportion of high-risk scenarios, and unreasonable parameter combinations in autonomous driving scenario generation: By using the NHTSA accident dataset and the analytic hierarchy process (AHP), quantitative screening of static high-risk sub-elements is achieved, overcoming the subjectivity of traditional element screening. Lane change interaction trajectories are extracted based on the HighD dataset, and K-means clustering optimized by the elbow method and TTC hazard level classification are combined to achieve accurate classification and hazard quantification of dynamic scenarios. By integrating static and dynamic parameter sets, logical constraint relationships between parameters and an integer weight parameter table are constructed to improve PICT, avoiding unreasonable scenarios and increasing the generation rate of high-risk element interaction scenarios. Simultaneously, a paired combination coverage strategy reduces the number of test cases while ensuring comprehensive coverage, balancing testing efficiency and relevance, providing efficient and reasonable scenario support for autonomous driving simulation testing. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0018] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0019] Figure 2 This is a schematic diagram of the format of a set of lane change interaction trajectories.
[0020] Figure 3 This is a visualization of the set of lane change interaction trajectories.
[0021] Figure 4 K-SSE curve for determining the K value using the elbow method.
[0022] Figure 5 This is a schematic diagram of the cluster centers of the HighD lane change trajectory dataset.
[0023] Figure 6 A comparison chart showing the number of core element scenarios generated with and without parameters, based on the logical constraints between them.
[0024] Figure 7 A comparison chart showing the number of test cases generated for different combinations of testing tools and the proportion of high-risk scenarios. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1, as Figure 1 The aforementioned method for generating and constructing traffic scenes based on an improved PICT includes the following steps: S1. Extract sub-elements corresponding to each static scene element based on the NHTSA accident dataset, and use the analytic hierarchy process to calculate the risk weight of each sub-element. Based on this, select high-risk sub-elements corresponding to each static scene element to form a static parameter set. S2. Based on the HighD highway dataset, extract the set of lane change interaction trajectories, divide the set of lane change interaction trajectories into several lane change scenarios using the K-means clustering algorithm, and construct TTC hazard level scenarios to form a dynamic parameter set; S3. Integrate the static parameter set and the dynamic parameter set to form the PICT input parameter set, and at the same time construct the logical constraint relationship between parameters and the integer weight parameter table to generate a PICT configuration file containing the PICT input parameter set, the logical constraint relationship between parameters and the integer weight parameter table; S4. Import the PICT configuration file into PICT and execute the pairwise combination coverage test strategy to output a set of test cases for traffic scenarios.
[0027] Furthermore, the working principle of the present invention will be illustrated below through embodiments: This embodiment uses the generation of a highway autonomous driving simulation test scenario as the application scenario. The NHTSA accident dataset used is the 2010-2023 accident statistics dataset publicly released by the National Highway Traffic Safety Administration (NHTSA) of the United States, covering a massive amount of road traffic accident records across the United States, providing authoritative data support for calculating the risk weights of static scene elements. The HighD highway dataset is a high-resolution natural driving dataset released by RWTH Aachen University in Germany in conjunction with related research institutions. It includes tracksMeta.csv and tracks.csv files, covering core fields such as vehicle x-coordinate, y-coordinate, speed, acceleration, and lane ID, adapting to the needs of highway vehicle trajectory extraction and scene modeling. The hardware environment uses Intel Core i series processors, and the software tools include Python 3.8 and the PICT 4.0 paired testing tool.
[0028] First, a three-layer hierarchical judgment matrix is constructed, comprising a target layer, a criterion layer, and a scheme layer. The static scene elements under the criterion layer include weather, time period, lighting conditions, road type, and road surface. Weather sub-elements include sunny, rainy, snowy, and foggy; time period sub-elements include early morning, morning, and afternoon; lighting conditions sub-elements include daytime, darkness with lighting, and darkness without lighting; road type sub-elements include streets, intersections, highways, parking lots, roundabouts, and rural roads; and road surface sub-elements include dry. Since this embodiment is a highway autonomous driving simulation test scenario, road type sub-elements are not included in the construction of the static parameter set. Four senior experts in traffic engineering and autonomous driving testing were organized to conduct pairwise importance scoring of sub-elements at the same level, based on the correlation between sub-elements and accident rates in the NHTSA accident dataset, using a 1-9 scale. A judgment matrix is formed under each criterion layer. Taking the weather criterion layer as an example, the judgment matrix contains the importance scale of snow relative to clear weather as 8, snow relative to rain as 5, fog relative to rain as 4, etc. Based on this, the weight vector is obtained by calculating the initial row vector and normalizing it. Then, the maximum eigenvalue of the judgment matrix is calculated and substituted into the consistency index formula. Combined with the random consistency index RI table, the consistency ratio CR is calculated. When CR < 0.1, the weight vector is judged. The top-N high-risk sub-elements are screened by sorting the weight vectors in descending order. Finally, the static parameter set is determined as weather (sunny, cloudy, rain, snow, fog and strong wind), time period (early morning, morning, noon, afternoon and evening), lighting conditions (daytime, dark with lighting, dark without lighting and dawn / dusk), road surface (dry, wet and snow / mud / ice), and the corresponding weight values are associated for subsequent PICT configuration.
[0029] Read the tracksMeta.csv and tracks.csv files from the HighD dataset, filter for vehicle trajectory IDs with numLaneChanges=1, extract the corresponding lane change trajectories, and remove invalid lane change trajectories with less than 250 frames. Trajectory frames are traversed in ascending order of timestamp, and lane change start frames are identified by lane ID mutations. and lane change termination frame ,exist to Within a time window, nearby interacting vehicles with a longitudinal distance ≤ 50m and a lateral distance ≤ 2m are retrieved. The lane-changing trajectories of the lane-changing vehicle and its neighboring interacting vehicles are captured as 250 frames and... To align with the zero point of time, a set of lane change interaction trajectories in the format [12821,2,250,6] is formed. A schematic diagram of the format of the lane change interaction trajectory set is shown below. Figure 2As shown, 12821 represents the number of extracted lane change interaction trajectory pairs, 2 represents the lane-changing vehicle and its neighboring vehicles, 250 represents the number of trajectory frames, and 6 represents the data in six dimensions: x-coordinate, y-coordinate, x-direction velocity, y-direction velocity, x-direction acceleration, and y-direction acceleration. The light-colored part represents the lane-changing trajectory of the lane-changing vehicle in the lane-changing interaction trajectory pair, and the dark-colored part represents the lane-changing trajectory of the neighboring vehicles corresponding to the lane-changing vehicle in the lane-changing interaction trajectory pair. The visualization result of the lane change interaction trajectory set is as follows. Figure 3 As shown, the light-colored lines represent the lane-changing trajectories of vehicles changing lanes, while the dark-colored lines represent the lane-changing trajectories of adjacent vehicles interacting with each other.
[0030] K-means clustering algorithm was used to segment lane-change scenarios. Six-dimensional core features (x-coordinate, y-coordinate, x-direction velocity, y-direction velocity, x-direction acceleration, y-direction acceleration) of lane-change vehicles were extracted from the set of lane-change interaction trajectories. A clustering feature matrix was constructed and normalized using Z-score. The number of clusters K was set to 2-8. The sum of squared clustering errors (SSE) for each K value was calculated using the elbow method, and a K-SSE curve was plotted. The K-SSE curve is shown below. Figure 4 As shown, K=4 was determined to be the optimal number of clusters. Based on this, the K-means clustering algorithm with 4 clusters was used to obtain four typical lane-change scenarios through 100 iterations. The visualization results of the cluster centers of the lane-change interaction trajectory set clustered by the K-means clustering algorithm are shown below. Figure 5 As shown, Figure 5 Class 0 indicates that the lane-changing vehicle and the adjacent interacting vehicle are initially in the same lane, and the lane-changing vehicle changes lanes to the left; Class 1 indicates that the lane-changing vehicles are initially in different lanes, and the lane-changing vehicle changes lanes to the right; Class 2 indicates that the lane-changing vehicles are initially in the same lane, and the lane-changing vehicle changes lanes to the right; Class 3 indicates that the lane-changing vehicles are initially in different lanes, and the lane-changing vehicle changes lanes to the left. At the same time, TTC hazard level scenarios are constructed, which include extremely high hazard scenario TTC1, high hazard scenario TTC2, medium hazard scenario TTC3, low hazard scenario TTC4, and safe scenario TTC5. The final dynamic parameter set includes 4 types of lane-changing scenarios and 5 types of TTC hazard level scenarios.
[0031] The static and dynamic parameter sets are integrated to form the PICT input parameter set. The tabular form of the PICT input parameter set is shown in Table 1 below. Subsequently, logical constraints between parameters are constructed to avoid generating unreasonable scenarios. The logical constraints between parameters are set as follows: ①If the time period is early morning and night, then the lighting conditions cannot be during the day; ② The lighting conditions are daytime if the time period is noon, midday, or afternoon; ③If the lighting conditions are dawn / dusk, then the time period cannot be noon; ④ If the weather is sunny, cloudy, foggy, and windy, then the road surface is dry; ⑤ If the weather conditions are rainy, the road surface will be wet; ⑥ If the weather conditions are snowy, the road surface will be covered with snow / mud / ice.
[0032] Next, construct an integer weight parameter table, convert the risk weights of static high-risk sub-elements into positive integer weights, and combine them with a preset dynamic parameter weight lookup table to form an integer weight parameter table, as shown in Table 2 below. Finally, write the PICT configuration file according to the PICT tool format requirements, including the PICT input parameter set, defining the logical constraint relationships between parameters, and the integer weight parameter table to ensure that the PICT tool can parse it correctly.
[0033] Table 1
[0034] Table 2
[0035] Import the generated PICT configuration file into the PICT 4.0 tool, execute the pairwise combination coverage test strategy, and finally output 39 traffic scenario test cases to form a traffic scenario test case set. Some of the traffic scenario test cases are shown in Table 3 below.
[0036] Table 3:
[0037] The scenario coverage verification results of the traffic scenario test cases in this embodiment show that 39 traffic scenario test cases achieved 100% coverage of any combination of two parameter values, ensuring the comprehensiveness of the scenario combinations. The verification of the high-risk scenario generation effect shows that, after introducing weights with logical constraints between parameters, the number of scenarios containing "snow," "snow / mud / ice," and "TTC1" increased from 6, 6, and 6 without weights to 8, 8, and 9 respectively. Without logical constraints between parameters, the number of scenarios containing "night," "darkness without lighting," and "TTC1" increased from 9, 8, and 9 without weights to 15, 14, and 16 respectively. The proportion of high-risk scenarios reached 72.73%, an improvement of 9.09% compared to the unweighted PICT algorithm. Specific results are as follows... Figure 7 As shown, Figure 6 Medium-risk weights refer to positive integer weights.
[0038] To further verify the effectiveness of the proposed method, it is compared with common pairwise combination testing methods such as PairwiseTesting, ACTS, and the unweighted PICT method. To avoid incomparability in the number of generated samples due to the inability to introduce constraints in some tools, this paper uniformly does not set logical constraints between parameters during the comparative experiments. The test results are as follows: Figure 7 As shown, Figure 7 The method of this invention generates 33 test cases when there are no logical constraints between parameters, which is 32.7% less than PairwiseTesting (49 cases) and 2.9% less than ACTS (34 cases). It significantly reduces the number of test cases while ensuring coverage, and the high-risk scenarios account for the highest proportion.
[0039] In summary, this embodiment, by fully implementing the technical solution of the present invention, achieves high coverage, high risk ratio, and high efficiency in traffic scene generation, effectively solving the shortcomings of traditional methods and providing reliable scene support for autonomous driving simulation testing.
[0040] The above description describes specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A traffic scene generation and construction method based on an improved PICT, characterized in that, Includes the following steps: S1. Extract sub-elements corresponding to each static scene element based on the NHTSA accident dataset, and use the analytic hierarchy process to calculate the risk weight of each sub-element. Based on this, select high-risk sub-elements corresponding to each static scene element to form a static parameter set. S2. Based on the HighD highway dataset, extract the set of lane change interaction trajectories, divide the set of lane change interaction trajectories into several lane change scenarios using the K-means clustering algorithm, and construct TTC hazard level scenarios to form a dynamic parameter set; S3. Integrate the static parameter set and the dynamic parameter set to form the PICT input parameter set, and at the same time construct the logical constraint relationship between parameters and the integer weight parameter table to generate a PICT configuration file containing the PICT input parameter set, the logical constraint relationship between parameters and the integer weight parameter table; S4. Import the PICT configuration file into PICT and execute the pairwise combination coverage test strategy to output a set of test cases for traffic scenarios.
2. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The static scene elements include weather, time period, lighting conditions, road type, and road surface.
3. The traffic scene generation and construction method based on the improved PICT according to claim 2, characterized in that, The method for constructing the static parameter set: S11. Construct a three-layer hierarchical judgment matrix including the target layer, the criterion layer, and the solution layer. The target layer is to quantify the impact weight of sub-elements on traffic scenario risks, the criterion layer is to classify static scenario elements, and the solution layer is to clarify the corresponding sub-elements under each static scenario element. S12. Using the 1-9 scaling method, experts were organized to conduct pairwise scoring of the relative importance of sub-elements at the same level based on the NHTSA accident dataset, forming a judgment matrix for sub-elements at each criterion level. ,in This represents the importance scale of the i-th sub-element relative to the j-th sub-element; S13. Take the nth root of the product of each row element of the judgment matrix A to obtain the initial row vector. Then, for the initial row vector The normalization process yields the weight vector w. S14. Based on the weight vector w, calculate the largest eigenvalue of the judgment matrix A, and substitute the largest eigenvalue of the judgment matrix A into the consistency index formula to calculate the consistency index CI. At the same time, according to the random consistency index RI value table, obtain the random consistency index RI corresponding to the consistency index CI, and calculate the consistency ratio CR accordingly. S15. When At that time, the sub-elements in the weight vector w are sorted in descending order of their weight values. The top-N sub-elements with the highest weight values are selected as the high-risk sub-elements of the corresponding static scene elements, and their corresponding weight values are associated as risk weights. Based on this, a static parameter set is formed. Otherwise, adjust the judgment matrix A and repeat S12-S14.
4. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The method for extracting the set of lane change interaction trajectories is as follows: S21. Read the tracksMeta.csv and tracks.csv files from the HighD highway dataset, filter and extract the vehicle trajectory IDs in the tracksMeta.csv file where the numLaneChanges field is 1; S22. Extract the lane change trajectories corresponding to the vehicle trajectory IDs in the tracks.csv file, and remove lane change trajectories with a trajectory frame count <250 and the corresponding vehicle trajectory IDs. S23. Traverse each lane change trajectory in chronological order, find two consecutive trajectory frames where the vehicle lane changes abruptly as the lane change start frame and lane change end frame, and search for the neighboring interactive vehicles around the lane change vehicle corresponding to the lane change trajectory within the time window of 2 seconds before the lane change start frame and 2 seconds after the lane change end frame, and obtain the lane change trajectory corresponding to the neighboring interactive vehicles. S25 extracts the lane-changing trajectories of the lane-changing vehicle and the adjacent vehicle into frames of the same length, and aligns the trajectory frames with the starting frame of the lane change as the time zero point to form a lane-changing interaction trajectory pair corresponding to the vehicle's trajectory ID. Based on this, a set of lane-changing interaction trajectories consisting of several lane-changing interaction trajectory pairs is obtained.
5. The traffic scene generation and construction method based on the improved PICT according to claim 4, characterized in that, The number of clusters K in the K-means clustering algorithm is obtained by calculating and analyzing the sum of squared clustering errors of the lane change interaction trajectory set using the elbow method.
6. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The TTC hazard level scenarios include extremely high hazard scenario TTC1, high hazard scenario TTC2, medium hazard scenario TTC3, low hazard scenario TTC4, and safe scenario TTC5.
7. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The dynamic parameter set includes TTC hazard level scenarios and lane change scenarios.
8. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The integer weight parameter table consists of a static parameter weight lookup table formed by mapping the risk weights of high-risk sub-elements corresponding to each static scene element in the static parameter set to positive integer weights, and a preset dynamic parameter weight lookup table.
9. The traffic scene generation and construction method based on the improved PICT according to claim 1, characterized in that, The paired combination coverage test strategy is as follows: traverse and cover all possible combinations of values for any two different parameters in the PICT input parameter set to ensure that each possible combination of values for any two parameters appears in at least one traffic scenario test case.
10. A traffic scene generation and construction system based on an improved PICT, the system being used to implement the traffic scene generation and construction method based on an improved PICT as described in claim 1, comprising: The static parameter set construction module, the dynamic parameter set construction module, the PICT configuration file generation module, and the traffic scenario test case generation module are characterized in that the static parameter set construction module and the dynamic parameter set construction module are respectively connected to the PICT configuration file generation module through a data transmission link, and the PICT configuration file generation module is connected to the traffic scenario test case generation module through a data interface. The static parameter set construction module extracts sub-elements corresponding to each static scene element based on the NHTSA accident dataset, and uses the analytic hierarchy process to calculate the risk weight of each sub-element, and selects high-risk sub-elements to construct the static parameter set. The dynamic parameter set construction module extracts a set of lane change interaction trajectories based on the HighD highway dataset, and divides lane change scenarios into K-means clustering algorithms accordingly. At the same time, it constructs TTC hazard level scenarios to form a dynamic parameter set. The PICT configuration file generation module integrates static and dynamic parameter sets to form a PICT input parameter set, and simultaneously constructs logical constraint relationships between parameters and an integer weight parameter table to generate a PICT configuration file containing the PICT input parameter set, logical constraint relationships between parameters, and an integer weight parameter table. The traffic scenario test case generation module is used to import the PICT configuration file, execute the pairwise combination coverage test strategy, and output a traffic scenario test case set.