Automatic driving safety key scene generation method based on key scene graph

Through the method based on the key scene graph, an autonomous driving scenario containing emergencies is generated, which solves the problem of insufficient generation of emergencies and unexpected driving scenarios in the prior art, and improves the response ability and safety of the autonomous driving system in complex traffic environments.

CN119888655APending Publication Date: 2025-04-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411884649.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing autonomous driving scenario generation methods fail to fully consider the generation of emergencies and unexpected driving scenarios, resulting in insufficient rapid response capabilities of autonomous driving systems in complex traffic environments.

Method used

Using a method based on key scene graphs, we analyze the simulation simulator map, cluster generate points, build key scene graphs, and extract neighborhood-induced sub-graphs from them, generate initial scenes, and set potential dangerous behaviors for background traffic participants, and finally generate specific scenes containing emergencies.

Benefits of technology

It has achieved efficient generation of diversified autonomous driving scenarios, including emergencies, and can effectively evaluate the response capabilities of autonomous driving systems in complex traffic environments, improving safety and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888655A_ABST
    Figure CN119888655A_ABST
Patent Text Reader

Abstract

The invention provides an automatic driving safety key scene generation method based on a key scene graph, aiming at solving the problem that an automatic driving scene generation method in an existing simulation environment is difficult to cover sudden high-risk situations. The method comprises the following steps: firstly, analyzing a map in a simulator, and classifying all generation points in the map by using a clustering algorithm; analyzing the position and distance relationship between the generation points in each cluster, and constructing a key scene graph; and extracting a neighborhood induction sub-graph from the key scene graph, generating an initial scene set, sampling a specific value for each scene factor in the initial scene, adding potential dangerous behaviors to background traffic participants, and completing generation of a specific automatic driving scene. According to the method provided by the invention, the automatic driving scene containing the emergency can be effectively generated, and whether the automatic driving system has the capability of efficiently coping with the emergency scene or not is tested.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of autonomous driving safety-critical scenario generation, and aims to efficiently generate diverse autonomous driving safety-critical scenarios that include sudden unexpected situations. Specifically, it relates to an autonomous driving safety-critical scenario generation method based on a key scenario graph. Background Art

[0002] In recent years, autonomous driving technology has become a new hot spot in the development of the automotive industry. Its application range is wide, covering transportation, logistics, agriculture and other fields, showing great development potential and broad market prospects. Safety is a key factor in the real-world deployment of autonomous vehicles, so a comprehensive performance and safety assessment is required before deployment. Compared with testing in a real environment, scenario simulation testing has the advantages of low cost and low risk, and can safely and efficiently perform complex and dangerous test scenarios. Safety-critical scenarios refer to scenarios that may cause safety accidents for autonomous vehicles. Generating these scenarios in a simulation environment is of great significance for evaluating the safety performance of autonomous driving systems.

[0003] Although the existing safety-critical scenario generation methods are able to provide a variety of driving scenarios for autonomous driving systems for verification, they are still insufficient in generating driving scenarios for emergencies and accidents. In complex traffic environments, emergencies often occur, such as pedestrians suddenly crossing the road or vehicles suddenly cutting in, which requires the autonomous driving system to have a fast and effective response capability. In order to verify the performance of the system in these situations, efficiently generating a variety of autonomous driving scenarios containing emergencies is crucial for testing the performance and safety of the autonomous driving system. Summary of the invention

[0004] In view of the fact that the existing autonomous driving scenario generation methods in simulation environments do not fully consider the generation of emergencies and unexpected driving scenarios, the present invention aims to provide an autonomous driving safety-critical scenario generation method based on a key scenario graph, which is used to efficiently generate diversified autonomous driving scenarios covering a variety of emergencies.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] The present invention provides a method for generating a key scene for autonomous driving safety based on a key scene graph, comprising the following steps:

[0007] 1) Analyze the simulator map, collect the generation points of all vehicles, pedestrians and non-motor vehicles in the map, cluster all the generation points according to the road type, and classify them into intersections, T-junctions, straight roads, turning roads, etc.;

[0008] 2) All the generated points of each cluster are regarded as nodes in the graph, and edges are constructed according to the positional relationship and distance between the generated points, ensuring that the nodes connected by the edges can influence each other within a certain distance range and there may be potential conflict risks, thereby completing the construction of the key scene graph;

[0009] 3) Each car node in the key scene graph can be used as a spawning point for the autonomous vehicle. By extracting the neighborhood induced subgraph associated with the node, other nodes in the subgraph are used as spawning points for background vehicles, pedestrians, or non-motor vehicles, and a combination selection is made based on the required number of background traffic participants, thereby generating a large number of initial scenes;

[0010] 4) Sample the specific attribute values ​​of each initial scene, and set potential dangerous behaviors for background traffic participants to make them make sudden confrontational actions against the autonomous vehicle, and finally generate a specific scene containing emergencies.

[0011] Furthermore, the step 1) specifically includes:

[0012] 11) Parse the map data in the simulator and extract all the generated points in the map, including those that can be used to generate vehicles, pedestrians, and non-motor vehicles, and obtain the geographical location, road attributes, and detailed information of the adjacent areas of each generated point to ensure data integrity and accuracy;

[0013] 12) Based on the map analysis results, the road types are divided into categories such as intersections, T-junctions, turning roads, and straight roads; a density clustering algorithm is used to classify all generated points, and the generated points located on the same road type and with similar geographical locations are grouped together. At the same time, the clustering results are optimized based on the road traffic flow characteristics and road priority to enhance the rationality of the classification and the applicability of the scenario.

[0014] Furthermore, step 2) specifically includes:

[0015] 21) Key scene graph G =<N,E> , where N represents the node set, and the nodes in the figure represent entities such as weather, time, vehicles, pedestrians, non-motor vehicles, and self-driving cars. E represents the edge set, and the edge represents the relative position relationship between the self-driving car and the background traffic participants, which are follow-up relationship, opposite relationship, adjacent relationship, and intersection relationship.

[0016] The following relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in the same lane with the same driving direction; the opposite relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in opposite directions. For cars and non-motor vehicles, they are in adjacent lanes in the opposite direction of the self-driving car, and for pedestrians, they are in the adjacent sidewalks in the opposite direction of the self-driving car; the adjacent relationship means that cars, pedestrians or non-motor vehicles are traveling in the same direction as the self-driving car. For cars, the adjacent relationship indicates that they are in adjacent lanes in the same direction as the self-driving car, for pedestrians, it means that they are in the adjacent sidewalks in the direction of the self-driving car, and for non-motor vehicles, it means that they are traveling in the adjacent non-motor lanes in the same direction as the self-driving car; the intersection relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are at an intersection, and their future driving trajectories have an intersection;

[0017] 22) Based on all the generated points extracted and classified in step 1), a key scene graph is constructed. The graph in the NetworkX library is used to construct the graph. The edges between nodes are added to the graph through the graph.add_edge method. In the process of adding edges, related nodes will be automatically added to the graph, and the system will automatically avoid repeated addition of nodes.

[0018] The specific process of graph construction is to traverse all node pairs in each cluster to determine whether there is a valid edge connection between them; the validity of the edge is determined based on the four relationships defined in step 21) and the set distance threshold;

[0019] The specific judgment rules include: if a node pair satisfies any relationship, and the distance between the two nodes is within the corresponding threshold range, within which background traffic participants may cause sudden and potentially dangerous behaviors to the autonomous vehicle, then an edge is added to the graph for them;

[0020] During the construction process, the distance threshold is dynamically adjusted to adapt to the needs of different scenarios, and the calculation process of node relationships is optimized. Each edge in the graph can be attached with a weight attribute, and the weight value is calculated based on the potential risk level of the relationship between nodes to support the priority judgment of subsequent scenario analysis and simulation.

[0021] Furthermore, the step 3) specifically includes:

[0022] 31) Based on the key scene graph generated in step 2), each car node in the graph is used as a generation point of the autonomous driving car; for each autonomous driving car node, its neighborhood induced subgraph is extracted, and the subgraph includes the node and its directly connected background traffic participant nodes, as well as the edge relationships between these nodes; the neighborhood induced subgraph set is used as input for generating the initial scene set;

[0023] 32) According to the neighborhood induced subgraph obtained in step 31), an initial scene is generated by specifying the number of different background traffic participant nodes in the scene; for each neighborhood induced subgraph, within the set range of the number of background traffic participants, each possible combination of the number of nodes is traversed one by one, and a node combination that meets the quantity requirement is selected from the neighborhood induced subgraph to generate a corresponding initial scene;

[0024] In order to avoid generating too many redundant scenes and affecting performance, the present invention introduces Euclidean diversity as a metric; by measuring the spatial distance between the autonomous driving car and other background traffic participants at the initial position and the difference in their movement direction angles, repeated or similar scenes can be effectively filtered out;

[0025] The generated scenarios are prioritized based on the edge weights. The weight values ​​are calculated using the minimum estimated collision time (METTC), which reflects the degree of danger or potential conflict risk between nodes. By sorting the weight values, higher priority scenarios can be more effectively used to simulate possible emergencies, ultimately generating a screened and sorted initial scenario set.

[0026] Furthermore, step 4) specifically includes:

[0027] 41) Sample specific values ​​for each scenario factor in the initial scenario, configure the autonomous driving system for the autonomous vehicle in the scenario, and set the destination coordinates to ensure that the scenario conditions are consistent and repeatable each time;

[0028] Configure the attributes of the background traffic participants in the scene. Specifically, set the initial dynamic parameters for each background traffic participant, such as initial speed, acceleration, and maximum speed, to truly simulate the behavioral characteristics of different types of traffic participants and enhance the authenticity and diversity of the scene.

[0029] 42) Process each background traffic participant node set one by one, construct a relationship set between it and the autonomous vehicle and a potential dangerous behavior set; calculate the spatial position relationship between each background node and the autonomous vehicle through the relationship function, and select the potential dangerous behaviors that may occur based on these relationships, and add them to the corresponding set one by one;

[0030] Specifically, under different spatial position relationships, background traffic participants may have a variety of potentially dangerous behaviors to the self-driving car; in the adjacent relationship, this may include suddenly cutting into the lane or crossing the road; in the following relationship, sudden braking, sudden cutting out when following the car, accelerating to overtake or sudden U-turn may occur; in the crossing relationship, there may be non-compliance with traffic lights or potential collisions due to trajectory intersections; in the opposite relationship, there may be situations of borrowing lanes and driving in the opposite direction; these dangerous behaviors provide an important basis for the dynamics and complexity of the scene;

[0031] 43) In order to simulate the real scene, weather, time and scene running time are further added to each specific scene; weather and time are randomly selected by predefined functions, and select_weather and select_time functions are called respectively to select from the optional conditions; running time is dynamically determined by select_runtime; finally, all elements, including the autonomous driving car node, background traffic participant node set, relationship set, behavior set, weather, time and running time, are integrated into a complete specific scene object Scene and added to the specific test scene set.

[0032] Beneficial effects of the present invention: The automatic driving scene is represented in the form of a graph. Considering the common unexpected situations in the driving process, which are usually the main causes of traffic accidents, a method for efficiently generating such scenes is proposed, which has the following advantages:

[0033] 1. The key scene graph proposed in the present invention can fully describe the autonomous driving scene, including key elements such as time, weather, road type, background traffic participants, and autonomous driving vehicles. The nodes in the graph represent various entities and environmental factors, and the edges are used to describe the spatial position relationship between background traffic participants and autonomous driving vehicles. In the process of constructing edges, it is necessary not only to determine whether the two nodes conform to the predefined spatial position relationship, but also to comprehensively consider whether the distance between the nodes is within the influence range, so as to dynamically infer the potential impact that background traffic participants may have on autonomous driving vehicles.

[0034] 2. Generate an initial scene set by extracting neighborhood induced subgraphs from the key scene graph and making combination selections in the subgraphs according to the required number of background traffic participants. Then, add potential dangerous behaviors that may affect the autonomous driving car to the background traffic participants in each initial scene, and generate a variety of autonomous driving scenes containing emergencies. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flow chart of the present invention;

[0036] Figure 2 It is the key scene diagram of the present invention;

[0037] Figure 3 The potentially dangerous behaviors that may be performed in different position relationships in the present invention are demonstrated; DETAILED DESCRIPTION

[0038] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. The contents mentioned in the implementation modes are not intended to limit the present invention.

[0039] Reference Figure 1 As shown, an embodiment of the present invention relates to a method for generating a safety-critical scene for autonomous driving based on a key scene graph, comprising the following steps:

[0040] 1) Analyze the simulator map, collect the generation points of all vehicles, pedestrians and non-motor vehicles in the map, cluster all the generation points according to the road type, and classify them into intersections, T-junctions, straight roads, turning roads, etc.; specifically include:

[0041] 11) Parse the map data in the simulator and extract all the generated points in the map, including those that can be used to generate vehicles, pedestrians, and non-motor vehicles, and obtain the geographical location, road attributes, and detailed information of the adjacent areas of each generated point to ensure data integrity and accuracy;

[0042] 12) Based on the map analysis results, the road types are divided into categories such as intersections, T-junctions, turning roads, and straight roads; a density clustering algorithm is used to classify all generated points, and the generated points located on the same road type and with similar geographical locations are grouped together. At the same time, the clustering results are optimized based on the road traffic flow characteristics and road priority to enhance the rationality of the classification and the applicability of the scenario.

[0043] 2) All the generated points of each cluster are regarded as nodes in the graph, and edges are constructed according to the positional relationship and distance between the generated points, so as to ensure that the nodes connected by the edges can influence each other within a certain distance range and there may be potential conflict risks, thereby completing the construction of the key scene graph; the step 2) specifically includes:

[0044] 21) Key scene graph G =<N,E> , where N represents the node set, and the nodes in the figure represent entities such as weather, time, vehicles, pedestrians, non-motor vehicles, and self-driving cars. E represents the edge set, and the edge represents the relative position relationship between the self-driving car and the background traffic participants, which are follow-up relationship, opposite relationship, adjacent relationship, and intersection relationship.

[0045] The following relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in the same lane with the same driving direction; the opposite relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in opposite directions. For cars and non-motor vehicles, they are in adjacent lanes in the opposite direction of the self-driving car, and for pedestrians, they are in the adjacent sidewalks in the opposite direction of the self-driving car; the adjacent relationship means that cars, pedestrians or non-motor vehicles are traveling in the same direction as the self-driving car. For cars, the adjacent relationship indicates that they are in adjacent lanes in the same direction as the self-driving car, for pedestrians, it means that they are in the adjacent sidewalks in the direction of the self-driving car, and for non-motor vehicles, it means that they are traveling in the adjacent non-motor lanes in the same direction as the self-driving car; the intersection relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are at an intersection, and their future driving trajectories have an intersection;

[0046] 22) Based on all the generated points extracted and classified in step 1), a key scene graph is constructed, such as Figure 2 As shown, the figure shows the key scene diagrams in the straight road and the intersection. In the figure, nodes 1, 2, 3, 4, 5, 6, 7, and 8 are the eight car generation points parsed in the map;

[0047] The specific process of graph construction is to traverse all node pairs in each cluster to determine whether there is a valid edge connection between them; the validity of the edge is determined based on the four relationships defined in step 21) and the set distance threshold;

[0048] Figure 2 In the example, node 1 and node 2 are located in adjacent lanes in the same driving direction, satisfying the proximity relationship, and the distance between them is within the influence range, so an edge is constructed between node 1 and node 2. Similarly, node 1 and node 3 are located in the same lane in the same driving direction, satisfying the follow-up relationship, and the distance between them may lead to sudden potential interaction, so an edge is connected between node 1 and node 3. Node 1 and node 4 are located in opposite driving directions, but in adjacent lanes, satisfying the opposite relationship, and the distance between them may cause dangerous interaction, so an edge is also connected between node 1 and node 4.

[0049] For nodes 5, 6, 7, and 8 at the intersection, since their future driving trajectories have intersections and satisfy the intersection relationship, there is a possible interaction risk between all nodes, so an edge is connected between each pair of nodes.

[0050] During the construction process, the distance threshold is dynamically adjusted to adapt to the needs of different scenarios, and the calculation process of node relationships is optimized. Each edge in the graph can be attached with a weight attribute, and the weight value is calculated based on the potential risk level of the relationship between nodes to support the priority judgment of subsequent scenario analysis and simulation.

[0051] 3) Each car node in the key scene graph can be used as a spawning point for the autonomous vehicle. By extracting the neighborhood induced subgraph associated with the node, other nodes in the subgraph are used as spawning points for background vehicles, pedestrians or non-motor vehicles, and a combination selection is made according to the required number of background traffic participants, thereby generating a large number of initial scenes; specifically, including:

[0052] 31) Based on the key scene graph generated in step 2), each car node in the graph is used as a generation point of the autonomous driving car; for each autonomous driving car node, its neighborhood induced subgraph is extracted, and the subgraph includes the node and its directly connected background traffic participant nodes, as well as the edge relationships between these nodes; the neighborhood induced subgraph set is used as input for generating the initial scene set;

[0053] 32) According to the neighborhood induced subgraph obtained in step 31), an initial scene is generated by specifying the number of different background traffic participant nodes in the scene; for each neighborhood induced subgraph, within the set range of the number of background traffic participants, each possible combination of the number of nodes is traversed one by one, and a node combination that meets the quantity requirement is selected from the neighborhood induced subgraph to generate a corresponding initial scene;

[0054] like Figure 2 The neighborhood induced subgraph of node 1 is the entire graph. When the number of background traffic participants is set to 1, the initial scene has S1 =<V1,V2> , S2=<V1,V3> , S3=<V1,V4> ; The neighborhood induced subgraph of node 5 is also the entire graph. When the number of background traffic participants is set to 1, the initial scene has S4=<V5,V6> , S5=<V5,V7> ;

[0055] In order to avoid generating too many redundant scenes and affecting performance, the present invention introduces Euclidean diversity as a metric; by measuring the spatial distance between the autonomous driving car and other background traffic participants at the initial position and the difference in their movement direction angles, repeated or similar scenes can be effectively filtered out;

[0056] like Figure 2 When the middle node 5 is an autonomous vehicle, the initial scene S4 is generated.<V5,V6> and S6=<V5,V8> In the above scenario, since the spatial distance between the two cars in the initial position and their moving direction angles in scenario S6 are slightly different from those in scenario S4, scenario S6 is considered as a redundant scenario and is not retained;

[0057] The generated scenarios are prioritized based on the edge weights. The weight values ​​are calculated using the minimum estimated collision time (METTC), which reflects the degree of danger or potential conflict risk between nodes. By sorting the weight values, higher priority scenarios can be more effectively used to simulate possible emergencies, ultimately generating a screened and sorted initial scenario set.

[0058] 4) Sample the specific attribute values ​​of each initial scene, and set potential dangerous behaviors for background traffic participants to make them make sudden confrontational actions against the autonomous vehicle, and finally generate a specific scene containing sudden situations; specifically including:

[0059] 41) Sample specific values ​​for each scenario factor in the initial scenario, configure the autonomous driving system for the autonomous vehicle in the scenario, and set the destination coordinates to ensure that the scenario conditions are consistent and repeatable each time;

[0060] Configure the attributes of the background traffic participants in the scene. Specifically, set the initial dynamic parameters for each background traffic participant, such as initial speed, acceleration, and maximum speed, to truly simulate the behavioral characteristics of different types of traffic participants and enhance the authenticity and diversity of the scene.

[0061] 42) Process each background traffic participant node set one by one, construct a relationship set between it and the autonomous vehicle and a potential dangerous behavior set; calculate the spatial position relationship between each background node and the autonomous vehicle through the relationship function, and select the potential dangerous behaviors that may occur based on these relationships, and add them to the corresponding set one by one;

[0062] Specifically, under different spatial position relationships, background traffic participants may produce a variety of potentially dangerous behaviors to the autonomous vehicle; Figure 3 As shown in the figure, in the adjacent relationship, it may include suddenly cutting into the lane or crossing the road; in the following relationship, it may include sudden braking, suddenly cutting out when following the car, accelerating to overtake or suddenly turning around; in the crossing relationship, it may include not obeying traffic lights or potential collisions due to track intersections; in the opposite relationship, it may include driving in the opposite direction; these dangerous behaviors provide an important basis for the dynamics and complexity of the scene;

[0063] For the initial scene S1 generated in scene 32),<V1,V2> , the self-driving car is V1, and the background traffic participant is V2. The two are in a neighboring relationship. At this time, a sudden dangerous action can be added to V2 to make the scene contain emergencies;

[0064] 43) In order to simulate the real scene, weather, time and scene running time are further added to each specific scene; weather and time are randomly selected by predefined functions, and select_weather and select_time functions are called respectively to select from the optional conditions; running time is dynamically determined by select_runtime; finally, all elements, including the autonomous driving car node, background traffic participant node set, relationship set, behavior set, weather, time and running time, are integrated into a complete specific scene object Scene and added to the specific test scene set.

[0065] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principle of the present invention. These improvements should also be regarded as the protection scope of the present invention.

Claims

1. A method for generating safety-critical scenarios for autonomous driving based on a critical scenario graph, characterized in that: Here are the steps: 1) Analyze the simulator map, collect the generation points of all vehicles, pedestrians and non-motor vehicles in the map, cluster all the generation points according to the road type, and classify them into intersections, T-junctions, straight roads, turning roads, etc.; 2) All the generated points of each cluster are regarded as nodes in the graph, and edges are constructed according to the positional relationship and distance between the generated points, ensuring that the nodes connected by the edges can influence each other within a certain distance range and there may be potential conflict risks, thereby completing the construction of the key scene graph; 3) Each car node in the key scene graph can be used as a spawning point for the autonomous vehicle. By extracting the neighborhood induced subgraph associated with the node, other nodes in the subgraph are used as spawning points for background vehicles, pedestrians, or non-motor vehicles, and a combination selection is made based on the required number of background traffic participants, thereby generating a large number of initial scenes; 4) Sample the specific attribute values ​​of each initial scene, and set potential dangerous behaviors for background traffic participants to make them make sudden confrontational actions against the autonomous vehicle, and finally generate a specific scene containing emergencies.

2. The method for generating key safety scenarios for autonomous driving based on key scenario graphs according to claim 1, characterized in that: The step 1) specifically includes: 11) Parse the map data in the simulator and extract all the generated points in the map, including those that can be used to generate vehicles, pedestrians, and non-motor vehicles, and obtain the geographical location, road attributes, and detailed information of the adjacent areas of each generated point to ensure data integrity and accuracy; 12) Based on the map analysis results, the road types are divided into categories such as intersections, T-junctions, turning roads, and straight roads; a density clustering algorithm is used to classify all generated points, and the generated points located on the same road type and with similar geographical locations are grouped together. At the same time, the clustering results are optimized based on the road traffic flow characteristics and road priority to enhance the rationality of the classification and the applicability of the scenario.

3. The method for generating key safety scenarios for autonomous driving based on key scenario graphs according to claim 2, characterized in that: The step 2) specifically includes: 21) Key scene graph G =<N,E> , where N represents the node set, and the nodes in the figure represent entities such as weather, time, vehicles, pedestrians, non-motor vehicles, and self-driving cars. E represents the edge set, and the edge represents the relative position relationship between the self-driving car and the background traffic participants, which are follow-up relationship, opposite relationship, adjacent relationship, and intersection relationship. The following relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in the same lane with the same driving direction; the opposite relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are in opposite directions. For cars and non-motor vehicles, they are in adjacent lanes in the opposite direction of the self-driving car, and for pedestrians, they are in the adjacent sidewalks in the opposite direction of the self-driving car; the adjacent relationship means that cars, pedestrians or non-motor vehicles are traveling in the same direction as the self-driving car. For cars, the adjacent relationship indicates that they are in adjacent lanes in the same direction as the self-driving car, for pedestrians, it means that they are in the adjacent sidewalks in the direction of the self-driving car, and for non-motor vehicles, it means that they are traveling in the adjacent non-motor lanes in the same direction as the self-driving car; the intersection relationship indicates that cars, pedestrians or non-motor vehicles and self-driving cars are at an intersection, and their future driving trajectories have an intersection; 22) Based on all the generated points extracted and classified in step 1), a key scene graph is constructed. The graph in the NetworkX library is used to construct the graph. The edges between nodes are added to the graph through the graph.add_edge method. In the process of adding edges, related nodes will be automatically added to the graph, and the system will automatically avoid repeated addition of nodes. The specific process of graph construction is to traverse all node pairs in each cluster to determine whether there is a valid edge connection between them; the validity of the edge is determined based on the four relationships defined in step 21) and the set distance threshold; The specific judgment rules include: if a node pair satisfies any relationship, and the distance between the two nodes is within the corresponding threshold range, within which background traffic participants may cause sudden and potentially dangerous behaviors to the autonomous vehicle, then an edge is added to the graph for them; During the construction process, the distance threshold is dynamically adjusted to adapt to the needs of different scenarios, and the calculation process of node relationships is optimized. Each edge in the graph can be attached with a weight attribute, and the weight value is calculated based on the potential risk level of the relationship between nodes to support the priority judgment of subsequent scenario analysis and simulation.

4. The method for generating key safety scenarios for autonomous driving based on key scenario graphs according to claim 3, characterized in that: The step 3) specifically includes: 31) Based on the key scene graph generated in step 2), each car node in the graph is used as a generation point of the autonomous driving car; for each autonomous driving car node, its neighborhood induced subgraph is extracted, and the subgraph includes the node and its directly connected background traffic participant nodes, as well as the edge relationships between these nodes; the neighborhood induced subgraph set is used as input for generating the initial scene set; 32) According to the neighborhood induced subgraph obtained in step 31), an initial scene is generated by specifying the number of different background traffic participant nodes in the scene; for each neighborhood induced subgraph, within the set range of the number of background traffic participants, each possible combination of the number of nodes is traversed one by one, and a node combination that meets the quantity requirement is selected from the neighborhood induced subgraph to generate a corresponding initial scene; In order to avoid generating too many redundant scenes and affecting performance, the present invention introduces Euclidean diversity as a metric; by measuring the spatial distance between the autonomous driving car and other background traffic participants at the initial position and the difference in their movement direction angles, repeated or similar scenes can be effectively filtered out; The generated scenarios are prioritized based on the edge weights. The weight values ​​are calculated using the minimum estimated collision time (METTC), which reflects the degree of danger or potential conflict risk between nodes. By sorting the weight values, higher priority scenarios can be more effectively used to simulate possible emergencies, ultimately generating a screened and sorted initial scenario set.

5. The method for generating key safety scenarios for autonomous driving based on key scenario graphs according to claim 4, characterized in that: The step 4) specifically includes: 41) Sample specific values ​​for each scenario factor in the initial scenario, configure the autonomous driving system for the autonomous vehicle in the scenario, and set the destination coordinates to ensure that the scenario conditions are consistent and repeatable each time; Configure the attributes of the background traffic participants in the scene. Specifically, set the initial dynamic parameters for each background traffic participant, such as initial speed, acceleration, and maximum speed, to truly simulate the behavioral characteristics of different types of traffic participants and enhance the authenticity and diversity of the scene. 42) Process each background traffic participant node set one by one, construct a relationship set between it and the autonomous vehicle and a potential dangerous behavior set; calculate the spatial position relationship between each background node and the autonomous vehicle through the relationship function, and select the potential dangerous behaviors that may occur based on these relationships, and add them to the corresponding set one by one; Specifically, under different spatial position relationships, background traffic participants may have a variety of potentially dangerous behaviors to the self-driving car; in the adjacent relationship, this may include suddenly cutting into the lane or crossing the road; in the following relationship, sudden braking, sudden cutting out when following the car, accelerating to overtake or sudden U-turn may occur; in the crossing relationship, there may be non-compliance with traffic lights or potential collisions due to trajectory intersections; in the opposite relationship, there may be situations of borrowing lanes and driving in the opposite direction; these dangerous behaviors provide an important basis for the dynamics and complexity of the scene; 43) In order to simulate the real scene, weather, time and scene running time are further added to each specific scene; weather and time are randomly selected by predefined functions, and select_weather and select_time functions are called respectively to select from the optional conditions; running time is dynamically determined by select_runtime; finally, all elements, including the autonomous driving car node, background traffic participant node set, relationship set, behavior set, weather, time and running time, are integrated into a complete specific scene object Scene and added to the specific test scene set.

Citation Information

Cited By

  • Collision scene generation method for automatic driving test

    CN122389566A