Vehicle test scene generation method and device, storage medium and equipment
Patent Information
- Application Number
- CN202310698303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-06-13
AI Technical Summary
[0005]本发明实施例提供了一种车辆测试场景生成方法、装置、存储介质及设备,以至少解决现有的车辆测试场景生成方法缺少车路协同要素,且测试要素数量庞大,测试效率较低的技术问题
[0021]在本发明实施例中,通过获取自动驾驶车辆的多个场景要素,其中,上述多个场景要素的类型包括车辆要素,路侧要素和云端要素;在上述多个场景要素中存在风险要素的情况下,将上述自动驾驶车辆的驾驶环境划分为风险环境和一般环境;确定上述风险环境对应的详测场景集,以及确定上述一般环境对应的普测场景集;基于上述详测场景集和上述普测场景集,生成上述自动驾驶车辆的目标测试场景集,达到了将众多驾驶环境分为风险环境和一般环境,并分别在两种类型环境下进行场景合并,确定详测场景集和普测场景集的目的,从而实现了在考虑路侧要素和云端要素的同时,减少冗余场景的测试,满足车路协同下高效测试智能汽车自动驾驶的需求的技术效果,进而解决了现有的车辆测试场景生成方法缺少车路协同要素,且测试要素数量庞大,测试效率较低的技术问题。
Smart Images

Figure CN116753938B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving safety testing technology, and more specifically, to a method, apparatus, storage medium, and device for generating vehicle test scenarios. Background Technology
[0002] With the in-depth development of autonomous driving technology, some autonomous driving products have been put into commercial use in specific scenarios and conditions. The construction of vehicle test scenarios is an important foundation for conducting autonomous driving tests and a key factor in determining whether autonomous driving tests are sufficient. However, due to constraints such as computing power, spatial location, sensor level, and weather conditions, the "long tail effect" problem encountered by high-level autonomous driving continues to emerge, and autonomous driving in many edge scenarios remains very difficult.
[0003] Current autonomous driving test scenarios still focus on vehicles under "isolated intelligence" conditions, and the factors considered are limited to the vehicle's sensors, actuators, and road environment. The impact of external scenario factors such as cloud status and roadside status is not fully taken into account. However, as the number of scenario factors increases, the number of scenarios to be tested grows exponentially. Even with simulation testing methods, the workload and time consumption of testing are incalculable, which cannot meet the needs of efficient testing of intelligent autonomous driving vehicles under vehicle-road cooperation.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, storage medium, and device for generating vehicle test scenarios, which at least solves the technical problems of existing vehicle test scenario generation methods lacking vehicle-road cooperative elements, having a large number of test elements, and low test efficiency.
[0006] According to one aspect of the present invention, a method for generating vehicle test scenarios is provided, comprising: acquiring multiple scene elements of an autonomous vehicle, wherein the types of the multiple scene elements include vehicle elements, roadside elements, and cloud elements; when risk elements exist among the multiple scene elements, dividing the driving environment of the autonomous vehicle into a risk environment and a general environment; determining a detailed test scenario set corresponding to the risk environment and determining a general test scenario set corresponding to the general environment; and generating a target test scenario set for the autonomous vehicle based on the detailed test scenario set and the general test scenario set.
[0007] Optionally, the above-mentioned acquisition of multiple scene elements of autonomous vehicles includes: determining multiple scene element levels of vehicle test scenarios; performing two-level or multi-level layering refinement on the multiple scene element levels respectively to obtain refined scene elements corresponding to the multiple scene element levels respectively, and using the refined scene elements corresponding to the multiple scene element levels respectively as the multiple scene elements of the autonomous vehicle.
[0008] Optionally, based on the aforementioned risk factors, the driving environment of the autonomous vehicle is divided into a risky environment and a general environment, including: enumerating similar risk factors that are similar to the aforementioned risk factors; determining the driving environment that includes the aforementioned risk factors or the aforementioned similar risk factors as the aforementioned risky environment, and the driving environment that does not include the aforementioned risk factors and the aforementioned similar risk factors as the aforementioned general environment.
[0009] Optionally, determining the detailed test scenario set corresponding to the aforementioned risk environment and the general test scenario set corresponding to the aforementioned general environment includes: determining the detailed test scenario set corresponding to the aforementioned risk environment based on a first granularity and determining the general test scenario set corresponding to the aforementioned general environment based on a second granularity, wherein the first granularity is smaller than the second granularity.
[0010] Optionally, determining the general test scenario set corresponding to the general environment includes: identifying dangerous background vehicles for the autonomous vehicle at the current moment, wherein the background vehicles for the autonomous vehicle include ordinary background vehicles and dangerous background vehicles, and the dangerous background vehicles are those with the highest probability of collision; obtaining the initial state of the dangerous background vehicles at the current moment; performing maneuver sampling on the dangerous background vehicles based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicles at the current moment to obtain the maneuver state of the dangerous background vehicles at the next moment, wherein the probability of collision when maneuvering based on the natural-risk adversarial hybrid distribution is greater than the probability of collision when maneuvering based on the maneuver distribution under the natural state; performing maneuver sampling on the ordinary background vehicles based on the maneuver distribution under the natural state to obtain the maneuver state of the ordinary background vehicles at the next moment; and determining the general test scenario set corresponding to the general environment based on the maneuver state of the dangerous background vehicles at the next moment and the maneuver state of the ordinary background vehicles at the next moment.
[0011] Optionally, determining the general test scenario set corresponding to the general environment based on the maneuvering state of the dangerous background vehicle at the next moment after the current moment and the maneuvering state of the ordinary background vehicle at the next moment after the current moment includes: repeatedly obtaining the maneuvering states of the dangerous background vehicle and the ordinary background vehicle at multiple moments within a predetermined time period, determining the general test scenario corresponding to the general environment based on the maneuvering states at multiple moments within the predetermined time period; repeating the predetermined time period multiple times to obtain the general test scenario set corresponding to the general environment.
[0012] Optionally, before performing maneuver sampling on the dangerous background vehicle based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment to obtain the maneuver state of the dangerous background vehicle at the next moment, the method further includes: obtaining the collision probability distribution of the dangerous background vehicle in its natural state at the initial state at the current moment; obtaining the maneuver distribution of the vehicle in its natural state; and determining the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment based on the collision probability distribution and the maneuver distribution in its natural state.
[0013] Optionally, obtaining the collision probability distribution of the aforementioned hazardous background vehicle in its initial state at the current time in its natural state includes: obtaining the maneuver-collision probability distribution of the aforementioned hazardous background vehicle in its initial state at the current time; and determining the collision probability distribution in its natural state based on the maneuver-collision probability distribution and the maneuver distribution in its natural state.
[0014] Optionally, obtaining the maneuver-collision probability distribution of the dangerous background vehicle in its initial state at the current moment includes: inputting the initial state of the dangerous background vehicle in its initial state at the current moment into an adversarial driving agent model to obtain the maneuver-collision probability distribution of the dangerous background vehicle in its initial state at the current moment, wherein the adversarial driving agent model is trained based on collisions between the sample test vehicle and the sample background vehicle.
[0015] Optionally, determining the natural-risk confrontation hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment based on the collision probability distribution and the maneuver distribution under the natural state includes: mixing the collision probability distribution and the maneuver distribution under the natural state in a predetermined ratio to obtain the natural-risk confrontation hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment.
[0016] Optionally, determining the dangerous background vehicle of the autonomous vehicle at the current moment includes: when there are multiple background vehicles of the autonomous vehicle, obtaining the collision probability distribution of each background vehicle in its natural state at the current moment; summing the probabilities of each background vehicle in various maneuvering states in its collision probability distribution in its natural state at the current moment to obtain a summed probability; and determining the background vehicle with the highest summed probability among the multiple background vehicles as the dangerous background vehicle.
[0017] Optionally, generating the target test scenario set for the autonomous vehicle based on the detailed test scenario set and the general test scenario set includes: performing a first deredundancy processing on multiple detailed test scenarios in the detailed test scenario set to obtain a detailed test scenario set after the first deredundancy processing; performing a second deredundancy processing on multiple general test scenarios in the general test scenario set to obtain a general test scenario set after the second deredundancy processing; and obtaining the target test scenario set for the autonomous vehicle based on the detailed test scenario set after the first deredundancy processing and the general test scenario set after the second deredundancy processing.
[0018] Optionally, the first and second redundancy removal processes mentioned above include: determining equivalent scenarios among multiple scenarios and removing redundant scenarios by merging the equivalent scenarios; determining sub-scenarios among subordinate scenarios that have a hierarchical relationship among multiple scenarios and removing redundant scenarios by removing the sub-scenarios.
[0019] According to another aspect of the present invention, a non-volatile storage medium is also provided, wherein the non-volatile storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor and executed any one of the above-described vehicle test scenario generation methods.
[0020] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform any of the above-described vehicle test scenario generation methods.
[0021] In this embodiment of the invention, multiple scene elements of an autonomous vehicle are acquired, including vehicle elements, roadside elements, and cloud elements. When risk elements exist among these scene elements, the driving environment of the autonomous vehicle is divided into a risk environment and a general environment. A detailed test scenario set corresponding to the risk environment and a general test scenario set corresponding to the general environment are determined. Based on the detailed test scenario set and the general test scenario set, a target test scenario set for the autonomous vehicle is generated. This achieves the goal of dividing numerous driving environments into risk environments and general environments, merging scenarios in both types of environments, and determining the detailed test scenario set and the general test scenario set. This reduces redundant scenario testing while considering roadside and cloud elements, meeting the technical requirement for efficient testing of autonomous driving intelligent vehicles under vehicle-road cooperation. Furthermore, it solves the technical problems of existing vehicle test scenario generation methods lacking vehicle-road cooperation elements, having a large number of test elements, and low testing efficiency. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0023] Figure 1 This is a flowchart of a vehicle test scenario generation method according to an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of an optional detailed measurement scenario generation process based on security cognition under a risk environment according to an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram illustrating an optional classification of autonomous vehicle driving conditions according to an embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of an optional longitudinal maneuver state interval division according to an embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of an optional general survey scenario generation process according to an embodiment of the present invention;
[0028] Figure 6 This is a schematic diagram of an optional natural-risk adversarial hybrid distribution generation according to an embodiment of the present invention;
[0029] Figure 7 This is a schematic diagram illustrating an optional collision probability distribution under natural conditions according to an embodiment of the present invention;
[0030] Figure 8This is a schematic diagram of an optional equivalent scenario according to an embodiment of the present invention;
[0031] Figure 9 This is a schematic diagram of an optional subordinate scene according to an embodiment of the present invention;
[0032] Figure 10 This is a schematic diagram of a vehicle test scenario generation device according to an embodiment of the present invention. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] Example 1
[0036] According to an embodiment of the present invention, an embodiment of a vehicle test scenario generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] Figure 1 This is a flowchart of a vehicle test scenario generation method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0038] Step S102: Obtain multiple scene elements of the autonomous vehicle, wherein the types of the multiple scene elements include vehicle elements, roadside elements and cloud elements.
[0039] Step S104: If there are risk factors among the above-mentioned multiple scenario elements, the driving environment of the above-mentioned autonomous vehicle is divided into risk environment and general environment.
[0040] Step S106: Determine the detailed test scenario set corresponding to the above-mentioned risk environment, and determine the general test scenario set corresponding to the above-mentioned general environment.
[0041] Step S108: Based on the above detailed test scenario set and the above general test scenario set, generate the above target test scenario set for the autonomous vehicle.
[0042] In this embodiment of the invention, the vehicle test scenario generation method provided in steps S102 to S108 is executed by a vehicle test scenario generation system. The system acquires multiple scenario elements of the autonomous vehicle, wherein the types of the multiple scenario elements include vehicle elements, roadside elements, and cloud elements. If there are risk elements among the multiple scenario elements, the driving environment of the autonomous vehicle is divided into a risk environment and a general environment. The system determines the detailed test scenario set corresponding to the risk environment and the general test scenario set corresponding to the general environment. Based on the detailed test scenario set and the general test scenario set, the target test scenario set of the autonomous vehicle is generated.
[0043] As an optional implementation, vehicle-road cooperative data generated or collected by autonomous vehicles during driving can be obtained through various means. This vehicle-road cooperative data can be broadly categorized into vehicle-specific elements, static environmental elements, dynamic environmental elements, traffic participant elements, meteorological elements, roadside elements, cloud-based elements, and intelligent connected elements. These elements are then further refined into secondary hierarchical levels to determine scenario elements. After processing through research, extraction, classification, and summarization, scenario elements within various actual driving environment characteristics corresponding to the vehicle-road cooperative data are identified. These scenario elements are then arranged and combined to generate driving scenarios. The generated driving scenarios can cover all safety scenarios that autonomous vehicles may encounter, i.e., a driving scenario set. Risk data obtained through Safety of the Intended Functionality (SOTIF) cognitive technology is analyzed. By determining whether risk data exists in the driving scenarios, the driving scenario set is further divided into risk environments and general environments. The scenario elements in the risk environments and general environments are then expanded or trained to determine detailed test scenario sets and general test scenario sets. Finally, the detailed test scenario sets and general test scenario sets are merged to generate the aforementioned target test scenario set.
[0044] This application's embodiments supplement the missing roadside and cloud-based elements in existing intelligent connected vehicle testing scenarios. However, due to the addition of roadside and cloud-based elements, the number of testing scenarios becomes enormous. Therefore, to address the issue that the testing volume increases exponentially with the element dimension, an efficient scenario generation method combining general testing scenario sets and detailed testing scenario sets is proposed. This method can significantly improve testing efficiency while ensuring testing accuracy.
[0045] In one optional embodiment, the above-mentioned acquisition of multiple scene elements of an autonomous vehicle includes: determining multiple scene element levels of a vehicle test scenario; performing two-level or multi-level layering refinement on the multiple scene element levels respectively to obtain refined scene elements corresponding to the multiple scene element levels respectively, and using the refined scene elements corresponding to the multiple scene element levels respectively as the multiple scene elements of the autonomous vehicle.
[0046] As an optional embodiment, the vehicle-road cooperative data is analyzed and processed based on the Safety of the Intended Functionality (SOTIF) cognitive technology to determine the data categories corresponding to multiple vehicle-road cooperative data. Specifically, the vehicle-road cooperative data, including test vehicle features, static environment features, dynamic environment features, traffic participant features, meteorological features, and intelligent network features, is refined into a two-level hierarchy to determine multiple scenario elements. These may include: Layer 1: Road elements, such as road grade, number of lanes, road type, road material, road shape, etc.; Layer 2: Traffic facility elements, such as streetlights, traffic lights, speed limit signs, signs, lane markings, etc.; Layer 3: Road condition change elements, such as... Layer 1: Road damage, water accumulation, snow accumulation, etc.; Layer 2: Traffic participant elements, pedestrians, livestock, passenger cars, freight cars, military vehicles, police cars, electric vehicles, motorcycles, etc.; Layer 3: Meteorological environment elements, weather, temperature, pollution, lighting conditions, etc.; Layer 4: Vehicle status elements, tire pressure, vehicle speed, passenger load, cargo load, sensor status, navigation and positioning status, vehicle-to-everything (V2X) status, etc.; Layer 5: Roadside status elements, roadside computing device status, roadside sensing device status, roadside communication device status, vehicle-to-infrastructure (V2X) communication status, etc.; Layer 6: Cloud status elements, cloud-edge communication status, cloud-vehicle communication status, cloud operation status, etc.
[0047] In one optional embodiment, the above-mentioned division of the driving environment of the autonomous vehicle into a risk environment and a general environment based on the risk factors includes: enumerating similar risk factors that are similar to the risk factors; determining the driving environment that includes the risk factors or the similar risk factors as the risk environment, and the driving environment that does not include the risk factors and the similar risk factors as the general environment.
[0048] As an optional implementation, the eight layers of scene elements can be exhaustively enumerated layer by layer. For example, road layer sub-elements include road grade, number of lanes, road type, road material, etc. The results of sub-elements can also be represented by digital exhaustive enumeration. For example, highway grades include expressways (represented by "0"), first-class highways (represented by "1"), second-class highways (represented by "2"), etc. The exhaustive results are then permuted and combined. For example, expressway (0), rainy day (01), and one traffic participant (001) constitute driving scenario A; expressway (0), sunny day (02), and two traffic participants (002) constitute driving scenario B, etc. Multiple initial driving environments can be obtained through multiple exhaustive enumerations and combinations. Based on the aforementioned automotive expected functional safety cognitive technology, the risk factors that lead to driving risks for autonomous vehicles in the initial driving scenarios are analyzed, such as snowfall, server attacks, and sensor performance degradation. The driving scenario set is divided into risk scenario set and general scenario set by judging whether risk data exists in the initial driving scenarios.
[0049] Optionally, after determining the risk factors, the risk factors can be enumerated to identify similar risk factors, and the driving environment that includes the risk factors or similar risk factors can be identified as the risk environment, while the driving environment that does not include the risk factors or similar risk factors can be identified as the general environment.
[0050] As an optional embodiment, such as Figure 2 The diagram illustrates the process of generating detailed testing scenarios based on safety awareness under risk environments. Taking snowfall as an example, risk data can be used to adjust factors related to snowfall, such as road grade, road shape, temperature, and lighting conditions, to obtain a large number of testing scenarios for snowfall environments through enumeration. Similarly, taking server attack as an example, factors related to vehicle sensor status, roadside equipment operation status, communication status, and server information transmission status can be adjusted, and a large number of testing scenarios for server attacks can be obtained through enumeration. Likewise, taking sensor performance degradation as an example, factors related to lighting, rainfall, snowfall, vehicle computing status, roadside equipment status, communication status, and server status can be adjusted, and a large number of testing scenarios for sensor performance degradation can be obtained through enumeration. After identifying multiple risk environments, equivalent and subordinate scenarios are removed to obtain a detailed testing scenario set.
[0051] Optionally, enumeration can be used to obtain similar vehicle-road cooperative data. For example, enumerating the risk data "snowfall" in a risk scenario can yield similar risk data such as "rainfall" and "hailfall," while keeping other vehicle-road cooperative data in the scenario unchanged. Then, "snowfall" can be replaced with "rainfall" or "hailfall" to obtain a new risk scenario. Another example is to keep the risk data "snowfall" unchanged in a risk scenario, enumerate other vehicle-road cooperative data "ordinary roads" in the scenario, and then replace "ordinary roads" with the enumerated data "expressways" to obtain a new risk scenario.
[0052] It should be noted that when arranging and combining the exhaustive results, at least one of the above vehicle-road cooperative data can be selected from each of the above scenario elements, and the selected vehicle-road cooperative data can be combined to obtain an initial driving scenario.
[0053] It should also be noted that, based on the first granularity, the detailed test scenario set corresponding to the above-mentioned risk environment is determined, and based on the second granularity, the general test scenario set corresponding to the above-mentioned general environment is determined. The first granularity is smaller than the second granularity because risk factors are relatively more important to pay attention to, so there are more scenarios generated for risk factors than for non-risk factors.
[0054] In an optional embodiment, determining the general test scenario set corresponding to the general environment includes: determining the dangerous background vehicles of the autonomous vehicle at the current moment, wherein the background vehicles of the autonomous vehicle include ordinary background vehicles and the dangerous background vehicles, and the dangerous background vehicles are the background vehicles with the highest probability of collision; obtaining the initial state of the dangerous background vehicles at the current moment; performing maneuver sampling on the dangerous background vehicles based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicles at the current moment to obtain the maneuver state of the dangerous background vehicles at the next moment, wherein the probability of collision when maneuvering based on the natural-risk adversarial hybrid distribution is greater than the probability of collision when maneuvering based on the maneuver distribution under the natural state; performing maneuver sampling on the ordinary background vehicles based on the maneuver distribution under the natural state to obtain the maneuver state of the ordinary background vehicles at the next moment; and determining the general test scenario set corresponding to the general environment based on the maneuver state of the dangerous background vehicles at the next moment and the maneuver state of the ordinary background vehicles at the next moment.
[0055] As an optional embodiment, such as Figure 3The diagram illustrating the classification of autonomous vehicle driving conditions can be based on a natural driving database or acquired scene elements. The driving environment information is divided into seven categories according to the autonomous vehicle's driving conditions: free driving (no vehicles several meters ahead), following driving, lane changing, lane changing with one adjacent vehicle, and lane changing with two adjacent vehicles. Furthermore, the driving data is determined based on the autonomous vehicle's maneuverability; for example, the range of driving acceleration is approximately [-11, 7] m / s². 2 The lower limit of acceleration can be calculated based on a 100 km / h braking distance of 35 meters, and the upper limit of acceleration can be calculated based on a 100 km / h acceleration time of 4 seconds. The above-mentioned maneuver distribution under natural conditions is determined. The values here are only for illustrative purposes and can be adjusted according to the actual situation.
[0056] It should be noted that in actual driving, situations such as rapid acceleration and deceleration are generally rare. Therefore, a gradual approach is used to discretize the values of motor acceleration, that is, the acceleration range that occurs frequently in natural driving is densely divided, and the acceleration range that occurs infrequently is coarsely divided.
[0057] In one optional embodiment, obtaining the vehicle's maneuver distribution under its natural state includes: discretizing the maneuver state values using a gradual method to obtain the vehicle's maneuver distribution under its natural state.
[0058] As an optional embodiment, such as Figure 4 The diagram showing the longitudinal maneuver state interval division uses a preset discrete acceleration value a0 to represent the acceleration distributed in the range [a0-ε, a0+ε), that is:
[0059]
[0060] ε determines the coarseness of the interval division, and its value can include 1, 0.5, and 0.2, resulting in 25 longitudinal maneuver states. It also includes two lateral maneuver states: left lane change and right lane change, for a total of 27 maneuver states under natural conditions. For example, cases with accelerations of -10, -8, 6, and 8 are less common and can be coarsely divided; cases with accelerations between -6.5 and -3.5, and between 3.5 and 4.5 are slightly more common and can be medium-divided; and cases with accelerations between -2.8 and 2.8 can be finely divided. The above values are for illustrative purposes only and can be changed according to actual conditions.
[0061] As an optional embodiment, based on the seven categories of driving environment information, and based on information such as vehicle status and maneuver data in the scene elements, the maneuver states under different natural states are calculated based on different levels of coarseness in the interval division. This can be called the natural distribution. That is, the maneuver states under the above natural states can be used to characterize the probability of various maneuver states of autonomous vehicles occurring under natural driving conditions.
[0062] As an optional embodiment, such as Figure 5 The schematic diagram of the general test scenario generation process shows that after calculating the natural distribution, a reinforcement learning training model is used to train the risk-adversarial driving agent to obtain agents that can serve as ordinary background vehicles (BV) and dangerous background vehicles (DBV). In the general test scenario generation process, one or more agents are first randomly generated, along with their initial states at the corresponding initial time. The initial state of the dangerous background vehicle at the current time is then obtained. Based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current time, maneuver sampling is performed on the dangerous background vehicle to obtain its maneuver state at the next time step. Similarly, based on the maneuver distribution under the natural state, maneuver sampling is performed on the ordinary background vehicle to obtain its maneuver state at the next time step. Based on the maneuver states of the dangerous background vehicle and the ordinary background vehicle at the next time step, a numerical integration method is used to determine the continuous risk-adversarial scenario corresponding to the general environment, i.e., the general test scenario. This general test scenario generation process is repeated multiple times to obtain a general test scenario set.
[0063] In one optional embodiment, determining the general test scenario set corresponding to the general environment based on the maneuvering state of the dangerous background vehicle at the next moment of the current moment and the maneuvering state of the ordinary background vehicle at the next moment of the current moment includes: repeatedly obtaining the maneuvering states of the dangerous background vehicle and the ordinary background vehicle at multiple moments within a predetermined time period, determining the general test scenario corresponding to the general environment based on the maneuvering states at multiple moments within the predetermined time period; repeating the predetermined time period multiple times to obtain the general test scenario set corresponding to the general environment.
[0064] As an optional embodiment, the maneuvering states of the aforementioned dangerous background vehicle and the aforementioned ordinary background vehicle are repeatedly obtained at multiple consecutive moments within a predetermined time period. Based on the maneuvering state at each moment within the predetermined time period, a continuous scene is determined. The operation within the predetermined time period is repeated multiple times to obtain multiple scenes, and a general test scene set is constructed based on the multiple scenes. It is determined whether the number of scenes in the general test scene set is sufficient. If the predetermined number is not reached, the operation within the predetermined time period is repeated multiple times until the number of scenes in the general test scene set is sufficient. In addition, after ensuring that the number of scenes in the general test scene set is sufficient, it is also necessary to remove equivalent scenes and subordinate scenes from the scene set to obtain a redundancy-free general test scene set.
[0065] In an optional embodiment, before performing maneuver sampling on the dangerous background vehicle based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment to obtain the maneuver state of the dangerous background vehicle at the next moment, the method further includes: obtaining the collision probability distribution of the dangerous background vehicle in its natural state at the initial state at the current moment; obtaining the maneuver distribution of the vehicle in its natural state; and determining the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment based on the collision probability distribution and the maneuver distribution in its natural state.
[0066] Optionally, the collision probability distribution and the maneuver distribution under the natural state are mixed in a predetermined ratio to obtain the natural-risk adversarial hybrid distribution corresponding to the initial state of the vehicle in the dangerous background at the current moment, such as... Figure 6 The diagram shown illustrates the generation of the natural-risk confrontation hybrid distribution. Based on the normalized collision probability distribution of the vehicle in the initial state at the current moment under the aforementioned dangerous background, and the maneuver distribution in the natural state, the hybrid probability distribution of natural-risk confrontation is obtained by mixing them in a certain proportion.
[0067] In an optional embodiment, obtaining the collision probability distribution of the dangerous background vehicle in its initial state at the current moment under natural conditions includes: inputting the initial state of the dangerous background vehicle at the current moment into an adversarial driving agent model to obtain the maneuver-collision probability distribution of the dangerous background vehicle in its initial state at the current moment, and determining the collision probability distribution under natural conditions based on the maneuver-collision probability distribution and the maneuver distribution under natural conditions.
[0068] As an optional implementation, the training process of the risk-adversarial driving agent using a reinforcement learning training model is as follows: the aforementioned adversarial driving agent model is trained based on collisions between the sample test vehicle and the sample background vehicle. The background vehicle is defined as the agent, and training is performed using an intelligent driving model (IDM). The duration of each training session is half a minute. The speed v of the background vehicle is defined as... b The relative position r and relative velocity v between the vehicle being tested and the vehicle being tested. r Define the motion u of the background vehicle as the state. b For the purpose of action, the tested vehicle u a The maneuvers were simulated by sampling according to their natural distribution.
[0069] It should be noted that r takes values in the range [0, 150], and v r The value range of v is [-35, 35] m / s. b The value range of u is [-2, 35] m / s. b The value range is [-11, 7] m / s 2 The values here are for illustrative purposes only and can be adjusted according to the actual situation.
[0070] Optionally, the reward is determined based on the collision determination result between the tested vehicle and the background vehicle. A reward of 1 is given for decision tree branches indicating a collision, and no reward is given for decision tree branches indicating no collision. The adversarial background vehicle (driving agent) is trained using reinforcement learning until the number of training iterations reaches a preset threshold (e.g., 1*10). 7 The training of the adversarial driving agent model is completed by repeating the steps until the collision probability no longer changes.
[0071] As an optional embodiment, such as Figure 7 The diagram showing the generation of the collision probability distribution under natural conditions illustrates that the position and speed of the first vehicle in each lane can be randomly sampled based on the natural distribution. Similarly, based on the natural distribution, the inter-vehicle distance and relative speed are determined, and the position and speed of the next vehicle are randomly generated. A group of vehicles is generated in each lane, and the position, speed, relative distance, and relative speed data of the above vehicles are input into the trained adversarial driving agent model to obtain the maneuver-collision probability. The above maneuver-collision probability is then multiplied by the maneuver distribution under natural conditions to obtain the collision probability distribution under natural conditions.
[0072] It should be noted that the above-mentioned maneuver-collision probability is used to characterize the probability of a collision occurring after the adversarial driving agent model has been trained and given data such as vehicle position, speed, relative distance, and relative velocity. However, since the agent is trained with the scenario of collision occurring in mind, the above-mentioned maneuver-collision probability is quite extreme and needs to be neutralized by the maneuver distribution under natural conditions to obtain the above-mentioned collision probability distribution under natural conditions. That is, the above-mentioned maneuver-collision probability can represent the probability of a collision occurring when the background vehicle (agent) adopts a certain maneuver, and the above-mentioned collision probability distribution under natural conditions can represent the possible maneuver scenarios under natural driving conditions and the collision probability corresponding to each maneuver scenario.
[0073] In an optional embodiment, determining the dangerous background vehicle of the autonomous vehicle at the current moment includes: when there are multiple background vehicles of the autonomous vehicle, obtaining the collision probability distribution of each of the multiple background vehicles in the natural state corresponding to the current moment; summing the probabilities of the multiple background vehicles in various maneuvering states in the collision probability distribution of each of the multiple background vehicles in the natural state corresponding to the current moment to obtain a summed probability; and determining the background vehicle with the highest summed probability among the multiple background vehicles as the dangerous background vehicle.
[0074] As an optional embodiment, based on the collision probability distribution under the above-mentioned natural state, the collision probability distribution of multiple background vehicles under the above-mentioned natural state at the above-mentioned current time is determined. The probabilities of the multiple background vehicles under various maneuvering states in the collision probability distribution under the above-mentioned natural state at the above-mentioned current time are summed to determine the background vehicle with the highest probability of collision among all background vehicles, i.e., the dangerous background vehicle.
[0075] Optional, as before Figure 6 As shown, the collision probability of vehicles under natural conditions in a dangerous background is normalized to obtain the normalized collision probability under natural conditions. This normalized probability is then mixed with the maneuver distribution under natural conditions at a certain ratio to obtain a mixed probability distribution of natural-risk confrontation. The mixing formula is: P mix = (1-e)*P accodent +e*P nature P mix For the mixed probability distribution of nature-risk confrontation, P accodent Let P be the normalized collision probability distribution under natural conditions. natureFor the natural motion distribution, the value of e can typically be 0.5, but can also be adjusted according to actual needs. Motion sampling is performed on vehicles in the hazardous background according to a mixed probability distribution, and on other background vehicles according to their motion probability distribution. The position, speed, and other states of each vehicle at the next moment are obtained through kinematic model integration. This yields the motion states of the hazardous background vehicles and the ordinary background vehicles at multiple consecutive moments within a predetermined time period. A continuous scene is determined based on the motion state at each moment within the predetermined time period, thus defining the aforementioned general testing scene. This process is repeated multiple times within the predetermined time period to obtain multiple scenes, and a general testing scene set is constructed based on these multiple scenes.
[0076] In one optional embodiment, generating the target test scenario set for the autonomous vehicle based on the detailed test scenario set and the general test scenario set includes: performing a first deredundancy processing on multiple detailed test scenarios in the detailed test scenario set to obtain a detailed test scenario set after the first deredundancy processing; performing a second deredundancy processing on multiple general test scenarios in the general test scenario set to obtain a general test scenario set after the second deredundancy processing; and obtaining the target test scenario set for the autonomous vehicle based on the detailed test scenario set after the first deredundancy processing and the general test scenario set after the second deredundancy processing.
[0077] As an optional embodiment, the first redundancy removal process and the second redundancy removal process described above include: determining equivalent scenarios among multiple scenarios, and removing redundant scenarios by merging the equivalent scenarios; determining sub-scenarios among subordinate scenarios that have a hierarchical relationship among multiple scenarios, and removing redundant scenarios by removing the sub-scenarios.
[0078] Optionally, redundant and duplicate scenarios can be removed from a risk scenario set consisting of multiple risk assessment scenarios using scenario equivalence relations, such as... Figure 8 The diagram illustrates equivalent scenarios. Scenario A and B show different background vehicle positions. The vehicle on the left is far from the test vehicle's lane, but the test vehicle is largely unaffected by the vehicle's lane. The background vehicles in the middle lane have a certain horizontal positional difference, and the background vehicles in the right lane have a certain vertical positional difference. However, the horizontal distance difference ε1 is less than the preset threshold γ1, and the vertical distance difference ε2 is less than the preset threshold γ2. In this case, the equivalent similarity value of scenario B can be considered less than the first equivalent similarity threshold with scenario A. Scenario B can be considered an equivalent scenario to scenario A and is therefore merged.
[0079] Optionally, redundant and repetitive scenes can be removed by utilizing the sub-scene membership relationship, such as... Figure 9The diagram illustrates the subordinate scenarios. In scenario A, there is a background vehicle in the middle lane. Scenario B is identical to scenario A except for the absence of a vehicle in the middle lane. Therefore, the traffic participant information in scenario B is a subset of that in scenario A. When testing a vehicle for lane changing and other actions, if it passes the test in scenario A, it will also pass the test in scenario B. In this case, scenario B is considered a sub-scenario of scenario A and can be removed.
[0080] It should be noted that redundant and duplicate scenarios can be removed by repeatedly using scenario equivalence relations and sub-scenario membership relations to determine the target test scenario set mentioned above.
[0081] As an optional implementation, based on the detailed test scenario set after the first redundancy removal process and the general test scenario set after the second redundancy removal process, the detailed test scenario set and the general test scenario set are merged to complete the construction of the target test scenario. Different granularity scenario generation methods are used for risk scenarios and general scenarios respectively to reduce the number of unnecessary test scenarios and alleviate the "curse of dimensionality" problem. Finally, the detailed test scenario set obtained from the risk scenarios and the general test scenario set obtained from the general scenarios are merged to obtain the target test scenario set.
[0082] Example 2
[0083] According to an embodiment of the present invention, an apparatus embodiment for implementing the above-described vehicle test scenario generation method is also provided. Figure 10 This is a schematic diagram of a vehicle test scenario generation device according to an embodiment of the present invention, such as... Figure 10 As shown, the above-mentioned device includes: an acquisition module 100, a division module 102, a determination module 104, and a generation module 106, wherein:
[0084] The acquisition module 100 is used to acquire multiple scene elements of autonomous vehicles, wherein the types of the multiple scene elements include vehicle elements, roadside elements and cloud elements.
[0085] The segmentation module 102 is used to divide the driving environment of the above-mentioned autonomous vehicle into a risk environment and a general environment when there are risk factors among the above-mentioned multiple scenario elements.
[0086] The determination module 104 is used to determine the detailed test scenario set corresponding to the above-mentioned risk environment, and to determine the general test scenario set corresponding to the above-mentioned general environment.
[0087] The generation module 106 is used to generate the target test scenario set for the above-mentioned autonomous vehicle based on the above-mentioned detailed test scenario set and the above-mentioned general test scenario set.
[0088] It should be noted that the above-mentioned acquisition module 100, division module 102, determination module 104 and generation module 106 correspond to steps S102 to S108 in Embodiment 1. The four modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1.
[0089] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Embodiment 1, and will not be repeated here.
[0090] According to embodiments of the present invention, an embodiment of a computer-readable storage medium is also provided. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the vehicle test scenario generation method provided in Embodiment 1.
[0091] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0092] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: acquiring multiple scene elements of the autonomous vehicle, wherein the types of the multiple scene elements include vehicle elements, roadside elements, and cloud elements; if risk elements exist among the multiple scene elements, dividing the driving environment of the autonomous vehicle into a risk environment and a general environment; determining a detailed test scene set corresponding to the risk environment and determining a general test scene set corresponding to the general environment; and generating a target test scene set for the autonomous vehicle based on the detailed test scene set and the general test scene set.
[0093] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: determining multiple scene element levels of a vehicle test scenario; performing two-level or multi-level layered refinement on the multiple scene element levels respectively to obtain refined scene elements corresponding to the multiple scene element levels respectively, and using the refined scene elements corresponding to the multiple scene element levels respectively as multiple scene elements of the aforementioned autonomous vehicle.
[0094] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: determining initial risk data corresponding to each of the aforementioned risk scenarios in the aforementioned risk scenario set; performing enumeration processing based on the aforementioned initial risk data to determine a target risk dataset, wherein the aforementioned enumeration processing is used to determine multiple target risk data; traversing the target risk data in the aforementioned target risk dataset, and replacing the aforementioned initial risk data with the aforementioned target risk data to generate the aforementioned detailed test scenario set.
[0095] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: enumerating similar risk elements that are similar to the aforementioned risk elements; determining a driving environment that includes the aforementioned risk elements or the aforementioned similar risk elements as the aforementioned risk environment, and a driving environment that does not include the aforementioned risk elements and the aforementioned similar risk elements as the aforementioned general environment.
[0096] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: determining a set of detailed testing scenarios corresponding to the aforementioned risk environment based on a first granularity, and determining a set of general testing scenarios corresponding to the aforementioned general environment based on a second granularity, wherein the aforementioned first granularity is smaller than the aforementioned second granularity.
[0097] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: determining dangerous background vehicles for the autonomous vehicle at the current moment, wherein the background vehicles for the autonomous vehicle include ordinary background vehicles and the dangerous background vehicles, and the dangerous background vehicles are the background vehicles with the highest probability of collision; obtaining the initial state of the dangerous background vehicles at the current moment; performing maneuver sampling on the dangerous background vehicles based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicles at the current moment, to obtain the maneuver state of the dangerous background vehicles at the next moment, wherein the probability of collision when maneuvering based on the natural-risk adversarial hybrid distribution is greater than the probability of collision when maneuvering based on the maneuver distribution under the natural state; performing maneuver sampling on the ordinary background vehicles based on the maneuver distribution under the natural state, to obtain the maneuver state of the ordinary background vehicles at the next moment; and determining the general test scenario set corresponding to the general environment based on the maneuver state of the dangerous background vehicles at the next moment and the maneuver state of the ordinary background vehicles at the next moment.
[0098] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: repeatedly obtaining the maneuvering states of the aforementioned dangerous background vehicle and the aforementioned ordinary background vehicle at multiple times within a predetermined time period; determining the general test scenario corresponding to the aforementioned general environment based on the maneuvering states at multiple times within the predetermined time period; repeating the aforementioned predetermined time period multiple times to obtain the general test scenario set corresponding to the aforementioned general environment.
[0099] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: obtaining the collision probability distribution of the aforementioned hazardous background vehicle in its initial state at the aforementioned current time; obtaining the maneuver distribution of the vehicle in its natural state; and determining the natural-risk confrontation hybrid distribution corresponding to the aforementioned hazardous background vehicle in its initial state at the aforementioned current time based on the aforementioned collision probability distribution and the aforementioned maneuver distribution in its natural state.
[0100] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: obtaining the maneuver-collision probability distribution of the aforementioned hazardous background vehicle in its initial state at the aforementioned current moment; and determining the collision probability distribution in the aforementioned natural state based on the aforementioned maneuver-collision probability distribution and the aforementioned maneuver distribution in the natural state.
[0101] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: inputting the initial state of the aforementioned dangerous background vehicle at the aforementioned current moment into the adversarial driving agent model to obtain the maneuver-collision probability distribution of the aforementioned dangerous background vehicle at the aforementioned current moment in the initial state, wherein the aforementioned adversarial driving agent model is trained based on the collision between the sample test vehicle and the sample background vehicle.
[0102] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: mixing the aforementioned collision probability distribution under natural conditions and the aforementioned maneuver distribution under natural conditions in a predetermined ratio to obtain the natural-risk confrontation mixed distribution corresponding to the initial state of the aforementioned dangerous background vehicle at the aforementioned current moment.
[0103] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: when there are multiple background vehicles for the aforementioned autonomous vehicle, obtain the collision probability distribution of each of the multiple background vehicles in their respective natural states at the aforementioned current time; sum the probabilities of each of the multiple background vehicles in their respective collision probability distributions in their respective natural states at the aforementioned current time for various maneuvering states to obtain a summed probability; and determine the background vehicle with the highest summed probability among the multiple background vehicles as the aforementioned dangerous background vehicle.
[0104] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: performing a first deredundancy process on multiple detailed test scenarios in the aforementioned detailed test scenario set to obtain a detailed test scenario set after the first deredundancy process; performing a second deredundancy process on multiple general test scenarios in the aforementioned general test scenario set to obtain a general test scenario set after the second deredundancy process; and obtaining the aforementioned target test scenario set for the aforementioned autonomous vehicle based on the aforementioned detailed test scenario set after the first deredundancy process and the aforementioned general test scenario set after the second deredundancy process.
[0105] Optionally, the aforementioned computer-readable storage medium is configured to store program code for performing the following steps: determining equivalent scenarios among multiple scenarios, and removing redundant scenarios by merging the equivalent scenarios; determining sub-scenarios among subordinate scenarios that have a hierarchical relationship among multiple scenarios, and removing redundant scenarios by removing the sub-scenarios.
[0106] According to an embodiment of the present invention, an embodiment of a processor is also provided. Optionally, in this embodiment, the computer-readable storage medium described above can be used to store the program code executed by the vehicle test scenario generation method provided in Embodiment 1 above.
[0107] This application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring multiple scene elements of an autonomous vehicle, wherein the types of the multiple scene elements include vehicle elements, roadside elements, and cloud elements; when risk elements exist among the multiple scene elements, dividing the driving environment of the autonomous vehicle into a risk environment and a general environment; determining a detailed test scene set corresponding to the risk environment and a general test scene set corresponding to the general environment; and generating a target test scene set for the autonomous vehicle based on the detailed test scene set and the general test scene set.
[0108] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: acquiring multiple scene elements of an autonomous vehicle, wherein the types of the multiple scene elements include vehicle elements, roadside elements, and cloud elements; if risk elements exist among the multiple scene elements, dividing the driving environment of the autonomous vehicle into a risk environment and a general environment; determining a detailed test scene set corresponding to the risk environment, and determining a general test scene set corresponding to the general environment; and generating a target test scene set for the autonomous vehicle based on the detailed test scene set and the general test scene set.
[0109] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0110] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0115] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating vehicle test scenarios, characterized in that, include: Acquire multiple scene elements for autonomous vehicles, wherein the types of the multiple scene elements include vehicle elements, roadside elements, and cloud elements; If risk factors exist among the multiple scenario elements, the driving environment of the autonomous vehicle is divided into a risk environment and a general environment. A detailed test scenario set corresponding to the risk environment and a general test scenario set corresponding to the general environment are determined. The granularity of the general test scenario set is smaller than that of the detailed test scenario set. The detailed test scenario set is obtained by: enumerating similar risk elements that are similar to the risk element; exhaustively enumerating and arranging the scenario elements in the risk environment based on the granularity of the detailed test scenario set to obtain an initial driving scenario; generating a new risk scenario by replacing the risk element in the initial driving scenario with the similar risk element, or by replacing other vehicle-road cooperative data related to the risk element, thus obtaining the detailed test scenario set. Based on the detailed test scenario set and the general test scenario set, a target test scenario set for the autonomous vehicle is generated; The determination of the general test scenario set corresponding to the general environment includes: identifying dangerous background vehicles for the autonomous vehicle at the current moment, wherein the background vehicles of the autonomous vehicle include ordinary background vehicles and dangerous background vehicles, and the dangerous background vehicles are those with the highest probability of collision; obtaining the initial state of the dangerous background vehicles at the current moment; performing maneuver sampling on the dangerous background vehicles based on the natural-risk adversarial hybrid distribution corresponding to the initial state of the dangerous background vehicles at the current moment to obtain the maneuver state of the dangerous background vehicles at the next moment, wherein the probability of collision when maneuvering based on the natural-risk adversarial hybrid distribution is greater than the probability of collision when maneuvering based on the maneuver distribution under the natural state; performing maneuver sampling on the ordinary background vehicles based on the maneuver distribution under the natural state to obtain the maneuver state of the ordinary background vehicles at the next moment; and determining the general test scenario set corresponding to the general environment based on the maneuver state of the dangerous background vehicles at the next moment and the maneuver state of the ordinary background vehicles at the next moment. The step of generating the target test scenario set for the autonomous vehicle based on the detailed test scenario set and the general test scenario set includes: performing a first deredundancy processing on multiple detailed test scenarios in the detailed test scenario set to obtain a detailed test scenario set after the first deredundancy processing; performing a second deredundancy processing on multiple general test scenarios in the general test scenario set to obtain a general test scenario set after the second deredundancy processing; and obtaining the target test scenario set for the autonomous vehicle based on the detailed test scenario set after the first deredundancy processing and the general test scenario set after the second deredundancy processing, wherein the first deredundancy processing and the second deredundancy processing include: determining equivalent scenarios among multiple scenarios and removing redundant scenarios by merging the equivalent scenarios; and determining sub-scenarios among subordinate scenarios with hierarchical relationships among multiple scenarios and removing redundant scenarios by removing the sub-scenarios.
2. The method according to claim 1, characterized in that, The acquisition of multiple scene elements for autonomous vehicles includes: Determine the hierarchical levels of multiple scenario elements in the vehicle testing scenario; The multiple scene element levels are refined into two-level or multi-level layers to obtain the refined scene elements corresponding to each of the multiple scene element levels, and the refined scene elements corresponding to each of the multiple scene element levels are used as the multiple scene elements of the autonomous vehicle.
3. The method according to claim 1, characterized in that, Based on the aforementioned risk factors, the driving environment of the autonomous vehicle is divided into a risky environment and a general environment, including: Enumerate similar risk factors that are similar to the aforementioned risk factors; The driving environment that includes the risk element or the similar risk element is defined as the risk environment, and the driving environment that does not include the risk element or the similar risk element is defined as the general environment.
4. The method according to claim 1, characterized in that, The determination of the detailed testing scenario set corresponding to the risk environment and the general testing scenario set corresponding to the general environment include: Based on a first granularity, a set of detailed testing scenarios corresponding to the risk environment is determined, and based on a second granularity, a set of general testing scenarios corresponding to the general environment is determined, wherein the first granularity is smaller than the second granularity.
5. The method according to claim 1, characterized in that, The determination of the general test scenario set corresponding to the general environment based on the maneuvering state of the dangerous background vehicle at the next moment and the maneuvering state of the ordinary background vehicle at the next moment includes: The maneuvering states of the dangerous background vehicle and the ordinary background vehicle are repeatedly obtained at multiple times within a predetermined time period, and the general test scenario corresponding to the general environment is determined based on the maneuvering states at multiple times within the predetermined time period. Repeat the predetermined duration multiple times to obtain the general test scenario set corresponding to the general environment.
6. The method according to claim 1, characterized in that, Before performing maneuver sampling on the dangerous background vehicle based on the natural-risk adversarial mixed distribution corresponding to the initial state of the dangerous background vehicle at the current time, and obtaining the maneuver state of the dangerous background vehicle at the next time step, the method further includes: Obtain the collision probability distribution of the vehicle in the dangerous background under its initial state at the current moment under its natural state. Obtain the natural maneuverability distribution of the vehicles in the hazardous background; Based on the collision probability distribution and the maneuver distribution under the natural state, the natural-risk confrontation hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment is determined.
7. The method according to claim 6, characterized in that, The step of obtaining the natural collision probability distribution of the hazardous background vehicle in its initial state at the current moment includes: Obtain the maneuver-collision probability distribution of the vehicle in the dangerous background under its initial state at the current moment; Based on the maneuver-collision probability distribution and the maneuver distribution under the natural state, the collision probability distribution under the natural state is determined.
8. The method according to claim 7, characterized in that, The step of obtaining the maneuver-collision probability distribution of the hazardous background vehicle in its initial state at the current moment includes: The initial state of the dangerous background vehicle at the current moment is input into the adversarial driving agent model to obtain the maneuver-collision probability distribution of the dangerous background vehicle at the current moment in the initial state. The adversarial driving agent model is trained based on the collision between the sample test vehicle and the sample background vehicle.
9. The method according to claim 6, characterized in that, The determination of the natural-risk adversarial hybrid distribution corresponding to the initial state of the hazardous background vehicle at the current moment, based on the collision probability distribution and the maneuver distribution under the natural state, includes: By mixing the collision probability distribution under the natural state and the maneuver distribution under the natural state in a predetermined ratio, the natural-risk confrontation hybrid distribution corresponding to the initial state of the dangerous background vehicle at the current moment is obtained.
10. The method according to claim 1, characterized in that, The determination of dangerous background vehicles for the autonomous vehicle at the current moment includes: When there are multiple background vehicles for the autonomous vehicle, the collision probability distribution of each background vehicle in its natural state at the current time is obtained. The probabilities of the multiple background vehicles under various maneuvering states in the collision probability distribution under the natural state corresponding to the current time are summed to obtain the summed probability. The background vehicle with the highest summation probability among the multiple background vehicles is identified as the dangerous background vehicle.
11. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores multiple instructions, which are adapted to be loaded by a processor and executed by the vehicle test scenario generation method according to any one of claims 1 to 10.
12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the vehicle test scenario generation method according to any one of claims 1 to 10.