Method and system for generating confrontation scene with self-defined difficulty in automatic driving
By building diverse adversarial scenarios and scenario difficulty representations in the autonomous driving system, using adversarial agents and learning models to generate traffic flow scenarios of different difficulty levels in the simulation environment, the diversity and robustness of the testing and evaluation of the autonomous driving system in the existing technology are solved, and the comprehensive testing and optimization of the system are achieved.
Patent Information
- Application Number
- CN202411987154.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
There is a difficulty in collecting enough safety scenarios and lack of diversity in existing autonomous driving systems in testing and evaluation, which leads to the inability to comprehensively evaluate the safety and robustness of the system.
By constructing a quantifiable representation of scene difficulty and diversified adversarial scenarios, using the optimization training of adversarial agent design and learning models, traffic flow scenarios of different difficulty levels are generated in the simulation environment, target scenarios for specific autonomous driving systems are generated, and algorithms are optimized through simulation tests.
It improves the robustness and adaptability of the autonomous driving system, and through comprehensive testing and optimization of the autonomous driving algorithm in diverse confrontation scenarios, the system's performance in complex environments is improved.
Smart Images

Figure CN119783386A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of autonomous driving simulation and testing, and in particular, to a method and system for generating a confrontation scenario with customized difficulty for autonomous driving. Background Art
[0002] Autonomous driving is the embodiment of the cross-integration of the automotive industry with new-generation information technologies such as artificial intelligence, automated control, and big data in the transportation field. With the advent of the wave of automotive intelligence, more and more products are equipped with autonomous driving, and more and more consumers favor autonomous driving. High-performance autonomous driving systems can achieve autonomous perception, autonomous decision-making, and autonomous regulation and control, cope with complex road conditions, and complete scheduled driving tasks safely and efficiently.
[0003] With the implementation and widespread popularization of autonomous driving technology, how to test and evaluate the performance of autonomous driving systems has always been an important issue in the industry. Traditional road testing has many drawbacks such as long cycle, low efficiency and high cost, which has become a constraint on the rapid improvement and iteration of autonomous driving systems.
[0004] In recent years, scenario-based simulation testing has become a key part of the test and evaluation technology of autonomous driving systems. Scenarios provide specific test cases for autonomous driving system testing, thereby effectively testing its performance.
[0005] Existing autonomous driving systems are mainly trained and evaluated based on natural scenes or artificially designed scenes collected in daily life, such as sudden braking of the vehicle in front, lane change, and other dangerous scenes. However, the collision rate of vehicles on actual roads is very low, and it is very difficult to collect enough relevant safety scenes, which requires a lot of manpower and material resources for collection, cleaning, and classification.
[0006] In addition, in order to fully evaluate the safety and robustness of the autonomous driving system, the autonomous driving system must be tested in extremely dangerous scenarios, which are very rare in the real data collected, so human intervention is often required. Artificially designed scenarios often lack diversity and are difficult to generalize, which is not conducive to discovering the weaknesses of the autonomous driving system and improving its performance in complex environments. Summary of the invention
[0007] In view of this, an embodiment of the present invention provides a method and system for generating adversarial scenarios of customized difficulty for autonomous driving, aiming to improve the robustness and adaptability of the autonomous driving system by constructing a quantifiable representation of the scene difficulty and a variety of adversarial scenarios. The method utilizes adversarial agent design and optimized training of learning models to generate traffic flow scenarios of different difficulties in a simulation environment, and promotes comprehensive testing and optimization of autonomous driving algorithms through the generation and verification of target scenarios.
[0008] According to a first aspect of an embodiment of the present invention, a method for generating a confrontation scene of customized difficulty for autonomous driving is provided, comprising: step S1, traffic flow option configuration: configuring traffic flow parameters according to user needs to construct a basic traffic flow; edge scene parameter design: selecting a number of suitable scene parameters to describe the edge scene according to the test edge scene required by the user; step S2, instruction classification and analysis: parsing the traffic flow parameters configured by the user to obtain the analysis results, and dividing the instructions into two categories according to the analysis results: other related customized instructions: used to generate general traffic flow scenes, and the instruction words are obtained after analysis and coordination; scene-related customized instructions: used to generate scenes with specific confrontation difficulty requirements, and the difficulty instruction words are obtained after analysis and coordination; step S3, scene data extraction: extracting scene data from the scene database according to the difficulty instruction words Searching for specific scene data in the simulation engine includes: collecting a series of scene parameters of specific difficulty according to the command words and the sampling step time set in the simulation environment, and outputting them to the simulation scene engine; step S4, scene generation: the simulation scene will load the traffic flow parameters according to the command words, and load the adversarial interaction behaviors according to the input adversarial scene parameters, so as to generate a target scene for a specific autonomous driving system; step S5, test operation and result analysis: the autonomous driving system to be tested starts the test after loading the target scene in the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and the performance data is recorded according to the scene configuration and the behavior strategy of the autonomous driving system. After the simulation scene is completed, the recorded performance data is analyzed to obtain the test results, and the test results are used to further optimize the control strategy of the autonomous driving system.
[0009] In one implementation, the traffic flow parameters include traffic density, vehicle speed range, road structure, and vehicle distance.
[0010] In another implementation, the scene parameters in step S1 include the vehicle status, the type and status of traffic participants, traffic rules, map and positioning information, climate conditions and road composition.
[0011] In another implementation, the general traffic flow scenario in step S2 includes standard road conditions and non-confrontational scenarios.
[0012] In another implementation, the performance data recorded in step S5 includes vehicle speed, vehicle acceleration, path planning trajectory, and collision event rate.
[0013] In another implementation, the scene database in step S3 is constructed in the following manner:
[0014] Step S31, designing adversarial agents: according to different adversarial degrees, the adversarial agents in the adversarial scenario are divided into different difficulty gradient levels;
[0015] Step S32, initializing the learning adversarial algorithm: applying the deep reinforcement learning algorithm to the adversarial agent in the simulation environment;
[0016] Step S33, adversarial agent training: deploying a vehicle with a basic autonomous driving system into a simulation environment, designing a reward function for the adversarial agent in different adversarial scenarios, and training the adversarial agent to fight against the autonomous driving vehicle, wherein the adversarial agent in each adversarial scenario is trained independently, and finally obtaining an adversarial agent model corresponding to each adversarial scenario;
[0017] Step S34, collecting data of different confrontation difficulty scenarios, including:
[0018] First, in each adversarial scenario, according to the rewards obtained by the adversarial agent during the training process, the linear rising segment of the reward curve is selected. At different stages of the linear rising of the reward, a series of adversarial agent models are extracted as single adversarial agent models of different adversarial difficulties.
[0019] Secondly, we deploy adversarial agent models of different adversarial difficulties into a simulation environment with self-driving cars, and let the trained adversarial agents compete with self-driving cars.
[0020] Finally, collect the action information generated by each adversarial difficulty agent under various observations in each scenario;
[0021] Step S35, learning the distribution of scene data of different confrontation levels: using the scene data of different confrontation levels in each scene collected in step S34, the confrontation agents of the same confrontation difficulty and different scenes are generalized and unified by supervised learning, and a series of confrontation agents with difficulty gradients covering various scenes are obtained;
[0022] Step S36, constructing a scenario database: deploying the adversarial agents with different difficulty gradients obtained in step S35 into a simulation environment to obtain a scenario database with different driving difficulties. The scenario database is used to provide driving environments with different adversarial difficulties for the training of autonomous driving vehicles.
[0023] In another implementation, the deep reinforcement learning algorithm used in step S32 includes at least one of the SAC algorithm, the A2C algorithm, and the DQN algorithm.
[0024] According to a second aspect of an embodiment of the present invention, a system for generating confrontation scenarios of customized difficulty for autonomous driving is provided, including: a traffic flow option configuration and edge scenario parameter design module, which configures traffic flow parameters according to user needs to construct basic traffic flow, and selects several suitable scenario parameters to describe edge scenarios according to test edge scenarios required by users; an instruction classification and parsing module, which parses the traffic flow parameters configured by the user to obtain parsing results, and divides the instructions into two categories according to the parsing results: other related customized instructions: used to generate general traffic flow scenarios, and obtain instruction words after parsing and coordination; scenario-related customized instructions: used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after parsing and coordination; a scenario data extraction module, which extracts data from a scenario database according to the difficulty instruction words Searching for specific scenario data includes: collecting a series of scenario parameters of specific difficulty according to the command words and the sampling step time set in the simulation environment, and outputting them to the simulation scenario engine; scenario generation module, the simulation scenario will load the traffic flow parameters according to the command words, and load the adversarial interaction behavior according to the input adversarial scenario parameters, so as to generate a target scenario for a specific autonomous driving system; test operation and result analysis module: the autonomous driving system to be tested starts testing after loading the target scenario in the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and the performance data is recorded according to the scenario configuration and the behavior strategy of the autonomous driving system. After the simulation scenario is completed, the recorded performance data is analyzed to obtain the test results, which are used to further optimize the control strategy of the autonomous driving system.
[0025] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a processor and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes the steps executed by the method of the first aspect.
[0026] According to a fourth aspect of an embodiment of the present invention, there is provided a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method of the first aspect described above is implemented.
[0027] In summary, the solution of the present invention improves the robustness and adaptability of the autonomous driving system by constructing a quantifiable representation of scene difficulty and a variety of adversarial scenarios. By using adversarial agent design and optimized training of learning models, traffic flow scenarios of different difficulties are generated in a simulation environment, and through the generation and verification of target scenarios, comprehensive testing and optimization of autonomous driving algorithms are promoted. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0029] Figure 1 A flowchart of the steps of a method for generating a confrontation scenario with customized difficulty for autonomous driving according to the present invention;
[0030] Figure 2 For Figure 1 A schematic diagram of the architecture flow of a method for generating a confrontation scenario of a customized difficulty for autonomous driving according to the present invention;
[0031] Figure 3 A schematic diagram of the process of generating a scenario database for a method of generating an adversarial scenario with customized difficulty for autonomous driving according to the present invention. DETAILED DESCRIPTION
[0032] In order to have a clearer understanding of the technical features, purposes and effects of the embodiments of the present invention, the specific implementation of the embodiments of the present invention is now described with reference to the accompanying drawings.
[0033] In this document, “exemplary” means “serving as an example, instance or illustration”, and any illustration or implementation described in this document as “exemplary” should not be construed as a more preferred or more advantageous technical solution.
[0034] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0035] The present invention discloses a method and system for generating adversarial scenarios with customized difficulty for autonomous driving, aiming to improve the robustness and adaptability of the autonomous driving system by constructing a quantifiable representation of the scene difficulty and a variety of adversarial scenarios. The method uses adversarial agent design and optimized training of learning models to generate traffic flow scenarios of different difficulty levels in a simulation environment, and promotes comprehensive testing and optimization of autonomous driving algorithms through the generation and verification of target scenarios. Its features include:
[0036] 1. Multiple difficulty scenarios generation
[0037] By designing adversarial agents and optimizing algorithms based on reinforcement learning strategies, driving scenario data with different adversarial intensities are generated. A diverse scenario database is constructed by randomizing parameters and sampling agent models.
[0038] 2. Scenario Difficulty Grading and Quantification
[0039] A deep learning model is used to grade and quantitatively describe the difficulty of the scenes, ensuring that the generated scenes have clear difficulty labels and distinctiveness.
[0040] 3. Target scenario generation and testing
[0041] By combining the scenario database with the simulation scenario engine, target scenarios for specific autonomous driving algorithms are generated. The target scenarios are verified in a real simulation environment and the corresponding test results are output to optimize the algorithm performance.
[0042] The present invention provides a reliable testing and optimization basis for autonomous driving technology by realizing an automated scene generation method with adjustable difficulty.
[0043] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.
[0044] See also Figure 1 The embodiment of the present invention provides a method for generating a confrontation scenario of a customized difficulty for autonomous driving, which mainly includes the following steps:
[0045] Step S1, traffic flow option configuration: configure traffic flow parameters according to user needs to build a basic traffic flow;
[0046] Edge scenario parameter design: According to the test edge scenario required by the user, select several appropriate scenario parameters to describe the edge scenario;
[0047] Step S2, instruction classification and analysis: Analyze the traffic flow parameters configured by the user to obtain analysis results, which are divided into two categories of instructions:
[0048] Other related custom instructions: used to generate general traffic flow scenarios, and obtain instruction words after parsing and coordination;
[0049] Scenario-related custom instructions: used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after analysis and coordination;
[0050] Step S3, scene data extraction: searching for specific scene data from the scene database according to the difficulty instruction word, including: collecting a series of scene parameters of specific difficulty according to the instruction word and the sampling step time set in the simulation environment, and outputting them to the simulation scene engine;
[0051] Step S4, scenario generation: the simulation scenario will load traffic flow parameters according to the instruction words, and load adversarial interaction behaviors according to the input adversarial scenario parameters, thereby generating a target scenario for a specific autonomous driving system;
[0052] Step S5, test operation and result analysis: The autonomous driving system to be tested starts testing after the target scenario is loaded in the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and the performance data is recorded according to the scenario configuration and the behavior strategy of the autonomous driving system. After the simulation scenario is completed, the recorded performance data is analyzed to obtain the test results, which are used to further optimize the control strategy of the autonomous driving system.
[0053] Specifically, according to Figure 2 The scheme of the present invention is further described:
[0054] Step S1, traffic flow option configuration, traffic flow refers to the distribution and dynamic interaction of vehicles on the road. Users can select relevant parameters of traffic flow according to their needs, including but not limited to: flow density, speed range, road structure, vehicle distance, etc., to build basic traffic flow.
[0055] Edge scenario parameter design is to select a number of appropriate parameters to describe the edge scenario according to the required test edge scenario. The composition of the scenario parameters includes but is not limited to: vehicle status, type and status of traffic participants, traffic rules, map and positioning information, climate conditions, road composition, etc.
[0056] Step S2, instruction classification and analysis, the generation method analyzes the traffic flow parameters configured by the user and divides them into two categories according to the analysis results:
[0057] Other related custom instructions: used for the generation of general traffic flow scenarios, including but not limited to standard road conditions, non-confrontational scenarios, etc., and the instruction words are obtained after analysis and coordination.
[0058] Scenario-related custom instructions: Scenario refers to the overall dynamic description of the components of the autonomous vehicle and its driving environment over a period of time. The composition of these components is determined by the functions of the autonomous vehicle to be tested. It is used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after parsing and coordination.
[0059] Step S3, scene data extraction, searches for specific scene data from the adversarial scene database according to the difficulty instruction words. Specifically, it collects a series of scene parameters of specific difficulty according to the instruction words and the sampling step time set in the simulation environment, and outputs them to the simulation scene engine.
[0060] Step S4, scenario generation, the simulation scenario will load traffic flow parameters according to the instruction words, and load adversarial interaction behaviors according to the input adversarial scenario parameters, so as to generate a target scenario for a specific autonomous driving system.
[0061] Step S5, test operation and result analysis, the autonomous driving system to be tested starts testing after loading the target scenario in the simulation engine. During the test, according to the scenario configuration and the behavior strategy of the autonomous driving system, its performance is monitored and relevant performance data is recorded, including but not limited to vehicle speed, vehicle acceleration, path planning trajectory, collision event rate, etc.
[0062] After the simulation scenario is completed, the recorded performance data is analyzed and the test results can be further used to optimize the control strategy of the autonomous driving system.
[0063] Furthermore, the scene database construction process is as follows Figure 3 As shown, specifically:
[0064] Step S31, design of adversarial agents. The adversarial agents exist in adversarial scenarios and attack the autonomous driving vehicle. According to the degree of adversarial forces, the adversarial agents are divided into different difficulty gradient levels.
[0065] It should be understood that the confrontation agent of the present invention should have a certain degree of longitudinal control and lateral control capabilities, and be able to perform confrontation behaviors such as autonomous overtaking, lane changing, and cutting in.
[0066] Step S32, initializing the learning adversarial algorithm. In the simulation environment, the deep reinforcement learning algorithm is applied to the adversarial agent.
[0067] It should be understood that the deep reinforcement learning algorithms used include but are not limited to: SAC (Soft Actor-Critic), A2C (Advantage Actor-Critic), DQN (Deep Q Network), etc. During the algorithm initialization process at this stage, the reward function design for different adversarial scenarios is different.
[0068] Step S33, adversarial agent training. Deploy a vehicle with a basic autonomous driving system into a simulation environment, design a reward function for the adversarial agent in different adversarial scenarios, and train the adversarial agent to compete with the autonomous driving vehicle.
[0069] It should be understood that the adversarial agents in each adversarial scenario are trained independently without interfering with each other. Thus, in each adversarial scenario, an adversarial agent model corresponding to the scenario will eventually be obtained.
[0070] Step S34, data collection for scenarios with different difficulty levels. First, in each confrontation scenario, the linear rising segment of the reward curve is selected according to the rewards obtained by the confrontation agent during the training process. At different stages of the linear rise of the reward, a series of confrontation agent models are extracted as single confrontation agent models with different confrontation difficulties. Secondly, the confrontation agent models with different confrontation difficulties are deployed in a simulation environment with an autonomous driving car, and the trained confrontation agent is allowed to confront the autonomous driving car. Finally, the action information generated by the confrontation agent of each difficulty under various observations in each scenario is collected.
[0071] Step S35, learning the distribution of scene data of different confrontation levels. Using the scene data of different confrontation levels in each scene collected in step S34, the confrontation agents of the same confrontation difficulty and different scenes are generalized and unified by using supervised learning to obtain a series of confrontation agents with difficulty gradients covering various scenes.
[0072] Step S36, constructing a scenario database. Deploy the adversarial agents with different difficulty gradients obtained in step S35 into the simulation environment, and obtain a scenario database with different driving difficulties. The scenario database will provide driving environments with different adversarial difficulties for the training of autonomous driving vehicles.
[0073] The present invention is a method for generating adversarial scenarios with customizable difficulty. It can effectively discover the weaknesses of the autonomous driving system under the background of rapid iteration of the autonomous driving system, provide relevant scenarios for the robustness training of the system, and provide support for the testing and evaluation of the autonomous driving system.
[0074] An embodiment of the present invention further provides a system for generating an autonomous driving confrontation scenario, including:
[0075] Traffic flow option configuration and edge scenario parameter design module, configure traffic flow parameters according to user needs to build basic traffic flow, and select several appropriate scenario parameters to describe edge scenarios according to the test edge scenarios required by users;
[0076] The instruction classification and analysis module analyzes the traffic flow parameters configured by the user and obtains the analysis results, which are divided into two categories of instructions:
[0077] Other related custom instructions: used to generate general traffic flow scenarios, and obtain instruction words after parsing and coordination;
[0078] Scenario-related custom instructions: used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after analysis and coordination;
[0079] The scene data extraction module searches for specific scene data from the scene database according to the difficulty instruction word, including: collecting a series of scene parameters of specific difficulty according to the instruction word and the sampling step time set in the simulation environment, and outputting them to the simulation scene engine;
[0080] The scenario generation module, in which the simulation scenario will load traffic flow parameters according to the instruction words and load adversarial interaction behaviors according to the input adversarial scenario parameters, thereby generating a target scenario for a specific autonomous driving system;
[0081] Test operation and result analysis module: The autonomous driving system to be tested starts testing after the target scenario is loaded into the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and performance data is recorded based on the scenario configuration and the behavioral strategy of the autonomous driving system. After the simulation scenario is completed, the recorded performance data is analyzed to obtain the test results, which are used to further optimize the control strategy of the autonomous driving system.
[0082] The system of this embodiment is used to implement the corresponding methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the system of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0083] As another example, the present invention also provides an electronic device, and now will describe an electronic device that can be used as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present invention described and / or required herein.
[0084] The electronic device may include: a processor (processor), a communication interface (CommunicationsInterface), a memory (memory) and a communication bus.
[0085] The processor, the communication interface and the memory communicate with each other through the communication bus. The communication interface is used to communicate with other electronic devices or servers.
[0086] The processor is used to execute the program, and specifically can execute the relevant steps in the above method embodiment.
[0087] Specifically, the program may include program codes including computer operation instructions.
[0088] The processor may be a CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0089] The memory is used to store programs and may include a high-speed RAM memory and may also include a non-volatile memory, such as at least one disk memory.
[0090] When the program is executed by a processor, it is used to enable the electronic device to execute the method for generating an autonomous driving confrontation scenario of the present invention.
[0091] In addition, the specific implementation of each step in the program can refer to the corresponding description of the corresponding steps and units in the above method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.
[0092] The exemplary embodiments of the present invention further provide a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the methods of the various embodiments of the present invention. The corresponding process descriptions in the aforementioned method embodiments may be referred to and will not be repeated here.
[0093] The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, processor, or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0094] Thus far, specific embodiments of the present invention have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing may be advantageous.
[0095] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0096] Finally, it should be noted that the above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A method for generating an autonomous driving confrontation scenario, characterized in that: include: Step S1, traffic flow option configuration: configure traffic flow parameters according to user needs to build a basic traffic flow; Edge scenario parameter design: According to the test edge scenario required by the user, select several appropriate scenario parameters to describe the edge scenario; Step S2, instruction classification and analysis: Analyze the traffic flow parameters configured by the user to obtain analysis results, which are divided into two categories of instructions: Other related custom instructions: used to generate general traffic flow scenarios, and obtain instruction words after parsing and coordination; Scenario-related custom instructions: used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after analysis and coordination; Step S3, scene data extraction: searching for specific scene data from the scene database according to the difficulty instruction word, including: collecting a series of scene parameters of specific difficulty according to the instruction word and the sampling step time set in the simulation environment, and outputting them to the simulation scene engine; Step S4, scenario generation: the simulation scenario will load traffic flow parameters according to the instruction words, and load adversarial interaction behaviors according to the input adversarial scenario parameters, thereby generating a target scenario for a specific autonomous driving system; Step S5, test operation and result analysis: The autonomous driving system to be tested starts testing after the target scenario is loaded in the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and the performance data is recorded according to the scenario configuration and the behavior strategy of the autonomous driving system. After the simulation scenario is completed, the recorded performance data is analyzed to obtain the test results, which are used to further optimize the control strategy of the autonomous driving system.
2. The method according to claim 1, characterized in that The traffic flow parameters in step S1 include flow density, vehicle speed range, road structure and vehicle distance.
3. The method according to claim 1, characterized in that The scene parameters in step S1 include the vehicle status, the type and status of traffic participants, traffic rules, map and positioning information, climate conditions and road composition.
4. The method according to claim 1, characterized in that: The general traffic flow scenarios in step S2 include standard road conditions and non-confrontational scenarios.
5. The method according to claim 1, characterized in that The performance data recorded in step S5 includes vehicle speed, vehicle acceleration, path planning trajectory, and collision event rate.
6. The method according to claim 1, characterized in that The scene database in step S3 is constructed in the following way: Step S31, designing adversarial agents: according to different adversarial degrees, the adversarial agents in the adversarial scenario are divided into different difficulty gradient levels; Step S32, initializing the learning adversarial algorithm: applying the deep reinforcement learning algorithm to the adversarial agent in the simulation environment; Step S33, adversarial agent training: deploying a vehicle with a basic autonomous driving system into a simulation environment, designing a reward function for the adversarial agent in different adversarial scenarios, and training the adversarial agent to fight against the autonomous driving vehicle, wherein the adversarial agent in each adversarial scenario is trained independently, and finally obtaining an adversarial agent model corresponding to each adversarial scenario; Step S34, collecting data of different confrontation difficulty scenarios, including: First, in each adversarial scenario, according to the rewards obtained by the adversarial agent during the training process, the linear rising segment of the reward curve is selected. At different stages of the linear rising of the reward, a series of adversarial agent models are extracted as single adversarial agent models of different adversarial difficulties. Secondly, we deploy adversarial agent models of different adversarial difficulties into a simulation environment with self-driving cars, and let the trained adversarial agents compete with self-driving cars. Finally, collect the action information generated by each adversarial difficulty agent under various observations in each scenario; Step S35, learning the distribution of scene data of different confrontation levels: using the scene data of different confrontation levels in each scene collected in step S34, the confrontation agents of the same confrontation difficulty and different scenes are generalized and unified by supervised learning, and a series of confrontation agents with difficulty gradients covering various scenes are obtained; Step S36, constructing a scenario database: deploying the adversarial agents with different difficulty gradients obtained in step S35 into a simulation environment to obtain a scenario database with different driving difficulties. The scenario database is used to provide driving environments with different adversarial difficulties for the training of autonomous driving vehicles.
7. The method according to claim 6, characterized in that The deep reinforcement learning algorithm used in step S32 includes at least one of the SAC algorithm, the A2C algorithm, and the DQN algorithm.
8. A system for generating autonomous driving confrontation scenarios, characterized in that: include: Traffic flow option configuration and edge scenario parameter design module, configure traffic flow parameters according to user needs to build basic traffic flow, and select several appropriate scenario parameters to describe edge scenarios according to the test edge scenarios required by users; The instruction classification and analysis module analyzes the traffic flow parameters configured by the user and obtains the analysis results, which are divided into two categories of instructions: Other related custom instructions: used to generate general traffic flow scenarios, and obtain instruction words after parsing and coordination; Scenario-related custom instructions: used to generate scenarios with specific confrontation difficulty requirements, and obtain difficulty instruction words after analysis and coordination; The scene data extraction module searches for specific scene data from the scene database according to the difficulty instruction word, including: collecting a series of scene parameters of specific difficulty according to the instruction word and the sampling step time set in the simulation environment, and outputting them to the simulation scene engine; The scenario generation module, in which the simulation scenario will load traffic flow parameters according to the instruction words and load adversarial interaction behaviors according to the input adversarial scenario parameters, thereby generating a target scenario for a specific autonomous driving system; Test operation and result analysis module: The autonomous driving system to be tested starts testing after the target scenario is loaded into the simulation engine. During the test, the performance of the autonomous driving system to be tested is monitored and performance data is recorded based on the scenario configuration and the behavioral strategy of the autonomous driving system. After the simulation scenario is completed, the recorded performance data is analyzed to obtain the test results, which are used to further optimize the control strategy of the autonomous driving system.
9. An electronic device, characterized in that: include: processor; Memory for storing programs; The program includes instructions, which, when executed by the processor, cause the processor to perform the steps of the method as claimed in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Vehicle scene model construction method, equipment and device and storage medium
CN112363947A
Traffic flow simulation system and method for automatic driving planning control test
CN115344503A
Generation method and generation device for generalization intelligent driving scene
CN115658966A
Automatic driving scene difficulty quantification method and system based on confrontation-training
CN117556694A
Congested road section simulation test site for automatic driving test and construction method thereof
CN118332801A
Cited By
End-to-end automatic driving system closed-loop confrontation test method based on world model
CN120927321A