Vehicle processing method, device, equipment and storage medium
By randomly triggering target vehicles to enter the intersection illegally in autonomous driving simulation, the problems of low efficiency and poor effectiveness of manual setting of background traffic vehicles in the prior art are solved, and efficient and random testing of decision planning algorithms are achieved, improving the coverage and testing effect of simulation scenarios.
Patent Information
- Application Number
- CN202210820333.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-07-13
AI Technical Summary
In the prior art, the illegal entry of background traffic vehicles in autonomous driving simulation scenarios requires manual settings, resulting in low setting efficiency and poor effectiveness, making it difficult to fully cover extreme scenarios, affecting the testing effect of decision planning algorithms.
By randomly triggering the target vehicle to enter the intersection illegally during the simulation process, the collision vehicle is determined using the driving information of the main vehicle and the alternative vehicle, and the violation is controlled based on the preset probability, automatic testing of the decision planning algorithm is realized.
It improves the efficiency and effectiveness of illegal driving behaviors, ensures comprehensive testing of decision-making and planning algorithms, avoids resource waste, and realizes the randomness and coverage of illegal driving behaviors.
Smart Images

Figure CN115056790B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, specifically to the field of autonomous driving, and particularly to a vehicle processing method, apparatus, device, and storage medium. Background Art
[0002] In simulation scenarios such as autonomous driving simulation, it is usually necessary to set background traffic vehicles (i.e., other vehicles used to affect the driving decision-making behavior of the host vehicle in the simulation scenario) in front of the host vehicle (i.e., the vehicle equipped with a decision-making and planning algorithm), and control the background traffic vehicles to illegally enter the intersection (such as running a red light and entering the intersection) to test the performance of the decision-making and planning algorithm carried by the host vehicle in the face of such illegal driving behavior. Currently, usually, before the simulation, the user manually adds several background traffic vehicles in front of the host vehicle in sequence, and defines the behaviors such as the speed trajectories of each background traffic vehicle respectively, so that during the simulation, each background traffic vehicle travels on the road according to the pre-defined speed trajectory, and performs the behavior of illegally entering the intersection at the pre-defined time and place, so as to achieve the purpose of verifying the decision-making and planning algorithm of the host vehicle.
[0003] It can be seen that this setting method requires the user to manually set the time and place for the vehicle to illegally enter the intersection, which depends on the user's experience and awareness. This not only makes the setting efficiency low, but also may lead to the situation that the illegal driving behavior of the background traffic vehicle entering the intersection cannot verify the decision-making and planning algorithm of the host vehicle due to unreasonable setting of the time and place, thus resulting in low effectiveness of the illegal driving behavior of the background traffic vehicle. Summary of the Invention
[0004] Embodiments of this application provide a vehicle processing method, apparatus, computer device, and storage medium, which can automatically generate illegal driving behaviors randomly, improving the setting efficiency and effectiveness of illegal driving behaviors.
[0005] On the one hand, embodiments of this application provide a vehicle processing method, and the method includes:
[0006] During the simulation process, control the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are all prohibited from entering the target intersection;
[0007] During the process of the host vehicle driving towards the target intersection, select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road, where N is a positive integer;
[0008] Determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle; the target vehicle refers to: if it illegally enters the target intersection, the alternative vehicle that will collide with the host vehicle at the target intersection;
[0009] Randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0010] On the other hand, an embodiment of the present application provides a vehicle processing device, and the device includes:
[0011] A control unit, configured to control the host vehicle on the first road to drive towards the target intersection during the simulation process; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, the vehicles on each second road are all prohibited from entering the target intersection;
[0012] A processing unit, configured to select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road during the process of the host vehicle driving towards the target intersection, where N is a positive integer;
[0013] The processing unit is further configured to determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle; the target vehicle refers to: if it illegally enters the target intersection, the alternative vehicle that will collide with the host vehicle at the target intersection;
[0014] The processing unit is further configured to randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0015] On yet another aspect, an embodiment of the present application provides a computer device, the computer device includes an input interface and an output interface, and the computer device further includes:
[0016] A processor, adapted to implement one or more instructions; and,
[0017] A computer storage medium, the computer storage medium stores one or more instructions, and the one or more instructions are adapted to be loaded and executed by the processor to perform the following steps:
[0018] During the simulation process, control the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are stipulated to be prohibited from entering the target intersection;
[0019] During the process of the host vehicle driving towards the target intersection, select N alternative vehicles from the vehicles driving on the at least one second road for illegally entering the target intersection, where N is a positive integer;
[0020] According to the driving information of the host vehicle and the driving information of each alternative vehicle, determine the target vehicle from the N alternative vehicles; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection;
[0021] Based on a preset triggering probability, randomly trigger the target vehicle to illegally enter the target intersection; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0022] On the other hand, an embodiment of the present application provides a computer storage medium, which stores one or more instructions, and the one or more instructions are suitable for being loaded and executed by a processor to perform the following steps:
[0023] During the simulation process, control the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are stipulated to be prohibited from entering the target intersection;
[0024] During the process of the host vehicle driving towards the target intersection, select N alternative vehicles from the vehicles driving on the at least one second road for illegally entering the target intersection, where N is a positive integer;
[0025] According to the driving information of the host vehicle and the driving information of each alternative vehicle, determine the target vehicle from the N alternative vehicles; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection;
[0026] Based on a preset triggering probability, randomly trigger the target vehicle to illegally enter the target intersection; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0027] In another aspect, an embodiment of the present application provides a computer program product, which includes a computer program; when the computer program is executed by a processor, the vehicle processing method mentioned above is implemented.
[0028] In the process of the host vehicle driving towards the target intersection, the embodiment of the present application can select N alternative vehicles for illegally driving into the target intersection from the vehicles driving on at least one second road, and determine the target vehicle from the N alternative vehicles by considering the driving information of the host vehicle and the driving information of each alternative vehicle, and then randomly trigger the target vehicle to illegally drive into the target intersection based on a preset triggering probability. Since the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally drives into the target intersection; therefore, controlling the target vehicle to illegally drive into the target intersection can surely verify the performance of the decision-making and planning algorithm of the host vehicle, which can not only improve the effectiveness of the illegal driving behavior of the target vehicle, but also avoid wasting processing resources to control the target vehicle to illegally drive into the target intersection. Moreover, the embodiment of the present application can support the user to simply set some parameters (such as the preset triggering probability) before the simulation, and then can randomly trigger the target vehicle to illegally drive into the target intersection based on a certain probability, which can not only effectively improve the setting efficiency of the illegal driving behavior, but also ensure the randomness of the illegal driving behavior, so that the performance of the decision-making and planning algorithm can be tested more comprehensively. Description of the Drawings
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0030] Figure 1a is a schematic diagram of an intersection provided by an embodiment of the present application;
[0031] Figure 1b is a schematic diagram of a background traffic vehicle illegally driving into an intersection provided by an embodiment of the present application;
[0032] Figure 2 is a schematic flowchart of a vehicle processing method provided by an embodiment of the present application;
[0033] Figure 3a is a schematic diagram of a target intersection provided by an embodiment of the present application;
[0034] Figure 3b is a schematic diagram of controlling a target vehicle to perform different driving behaviors according to the magnitude relationship between a randomly generated triggering probability and a preset triggering probability provided by an embodiment of the present application;
[0035] Figure 3c It is a schematic diagram provided by an embodiment of the present application for controlling a target vehicle to perform different driving behaviors according to the magnitude relationship between a predicted probability and a preset triggering probability;
[0036] Figure 4 It is a schematic flowchart of a vehicle processing method provided by another embodiment of the present application;
[0037] Figure 5a It is a schematic flowchart of another vehicle processing method provided by another embodiment of the present application;
[0038] Figure 5b It is a schematic diagram of the processing logic of a red-light running vehicle provided by an embodiment of the present application;
[0039] Figure 6 It is a schematic structural diagram of a vehicle processing device provided by an embodiment of the present application;
[0040] Figure 7 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.
[0042] The embodiments of the present application relate to Artificial Intelligence (AI) technology. The so-called artificial intelligence technology refers to the theory, method, technology, and application system that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject, involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics.
[0043] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in multiple fields, such as: autonomous driving, driverless, common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, drones, robots, smart healthcare, smart customer service, smart video services, and so on. Among them, autonomous driving technology usually includes autonomous driving simulation and real vehicle testing (i.e., controlling the vehicle to drive on the actual lane), and autonomous driving simulation, as a zero-risk, fast iteration, and reproducible testing method, has laid a solid foundation for autonomous driving technology to go on the road. The so-called autonomous driving simulation can also be called road traffic simulation, which is an important tool for studying complex traffic problems; especially when a system is too complex to be described by a simple abstract mathematical model, the role of traffic simulation is more prominent. Autonomous driving simulation can clearly assist in analyzing and predicting the sections and causes of traffic jams, comparing and evaluating the relevant plans for urban planning, traffic engineering, and traffic management, and avoiding or being prepared as much as possible before the problem becomes a reality. Generally speaking, traffic simulation technology is a simulation model technology that reflects the behavior or process of the system through simulation experiments using simulation hardware and simulation software, with the help of certain numerical calculations and problem-solving.
[0044] Considering that in the test through simulation, a certain number of traffic participants (background traffic vehicles, pedestrians, etc.) need to be set around the host vehicle (or called the test vehicle) to test the decision-making and planning algorithm carried by the host vehicle, that is, some traffic scenarios need to be set to test the decision-making and planning algorithm carried by the host vehicle. In this case, the traffic participants are like actors moving in the simulation system according to the script (scenario). However, this kind of simulation is limited by the manual setting of the scenario creator and it is difficult to exhaust all the traffic scenarios that need to be faced in actual road testing, and it is also difficult to cover extreme scenarios (corner cases). Therefore, the embodiment of this application introduces a virtual city-type autonomous driving simulation. In this kind of simulation, the traffic participants and the host vehicle can move freely for 24 hours a day for 7 days in a complex road network covering a large area. The behavior of the traffic participants may trigger some traffic scenarios, which will thus affect the driving decision-making behavior of the host vehicle, so as to actively discover some extreme scenarios to help enrich the scenario library, and thus achieve the purpose of testing and verifying the decision-making and planning algorithm carried by the host vehicle.
[0045] Among them, when the host vehicle normally enters an intersection, the scenario where a vehicle in the front horizontal direction illegally enters the intersection is a common scenario that an autonomous driving vehicle needs to test. The so-called intersection can also be called a plane intersection, which specifically refers to the part where two or more roads intersect on the same plane. For example, as shown in the black part in Figure 1a , this intersection can be a T-junction, a crossroads, etc.; taking the intersection as a crossroads as an example, the schematic diagram of the scenario where a vehicle in the front horizontal direction illegally enters the intersection can be seen in Figure 1bAs shown in the figure. The so-called forward lateral vehicle refers to a vehicle located downstream of the driving direction of the host vehicle and on a road that intersects with the road where the host vehicle is located, and the driving direction of the vehicle is the direction of entering the target intersection, such as Figure 1b the vehicles identified by 11 and 12 in ; among them, the vehicle identified by 12 is a forward lateral vehicle that illegally enters the intersection. Considering that the forward lateral vehicle may illegally enter the intersection from different times, different locations, and at different speeds in front of the host vehicle, thus conflicting with the driving route of the host vehicle, and at the same time considering the behaviors of other surrounding traffic participants, it is difficult to exhaust these test scenarios by manually editing scenarios, and some extreme scenarios that are difficult to cover may be missed. Based on this, the embodiment of the present application proposes a vehicle processing method. This vehicle setting method supports users to randomly generate the behavior (or event) of the forward lateral vehicle in front of the vehicle (i.e., the forward lateral vehicle) illegally entering the intersection through some simple parameter settings.
[0046] In a specific implementation, the vehicle processing method proposed in the embodiment of the present application can be executed by a computer device, and this computer device can be a terminal or a server; alternatively, this vehicle processing method can also be jointly executed by a terminal and a server, and no limitation is made thereto. For the convenience of description, hereinafter, the vehicle processing method executed by the computer device will be taken as an example for explanation. Among them, the terminal mentioned here can include but is not limited to: smart phones, tablet computers, laptop computers, desktop computers, smart watches, smart TVs, in-vehicle intelligent terminals, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms, and so on.
[0047] Furthermore, the computer device may include simulation software, and the logical algorithm involved in this vehicle processing method can be embedded in this simulation software to be used to randomly generate the behavior of the forward lateral vehicle in front of the host vehicle illegally entering the intersection during the simulation process of a virtual urban type. Among them, the simulation software mentioned here can be a microscopic traffic simulation software (TAD Sim), and this microscopic traffic simulation software can include but is not limited to a simulation software that requires networking or a simulation software that does not require networking; it can be understood that traffic simulation is divided into macroscopic simulation, mesoscopic simulation, and microscopic simulation according to the accuracy and scope of the simulation. Microscopic traffic simulation takes the behavior of individual vehicles as the research object and describes the simulation of the state of each vehicle in the traffic system.
[0048] The following combines Figure 2The following flow diagram is used to elaborate on the specific process of the vehicle processing method proposed in the embodiments of this application. Please refer to Figure 2 , and the vehicle processing method may include the following steps S201 - S204:
[0049] S201, during the simulation process, control the host vehicle on the first road to drive towards the target intersection.
[0050] Among them, the host vehicle is a vehicle equipped with a decision-making and planning algorithm. The target intersection is formed by the intersection of the first road and at least one second road, and specifically, it can refer to the intersection part of the first road and at least one second road on a plane. The embodiments of this application do not limit the number of second roads, and the number can be 1, 2, 3, 5, etc.; moreover, the embodiments of this application do not limit the intersection method between each second road and the first road. For example, each second road can be parallel to each other and perpendicularly intersect with the first road, or each second road can intersect obliquely with the first road, etc. Taking the number of second roads as 2 as an example, the schematic diagram of the target intersection formed by the perpendicular intersection of each second road and the first road can be seen in Figure 3a shown. Further, the target intersection mentioned in the embodiments of this application can be an intersection controlled by traffic lights or an intersection without traffic light control, and this is not limited.
[0051] When the target intersection is an intersection controlled by traffic lights, there may be multiple traffic lights at the target intersection, and one traffic light is used to control the traffic state corresponding to one road. Specifically, when any traffic light shows the target light color, the traffic state corresponding to the corresponding road is the allowed traffic state, that is, the vehicles on the corresponding road are allowed to drive into the target intersection. Among them, the target light color can be set according to the traffic rules in each region; for example, if the traffic rules indicate that when the traffic light shows red or yellow, vehicles are prohibited from continuing to drive, and when the traffic light shows green, vehicles are allowed to continue to drive, then the target light color can be green. For the convenience of elaboration, the subsequent description will be based on the target light color being green as an example. To avoid collisions between vehicles on different roads at the intersection, it can be set that the traffic lights corresponding to the first road and the traffic lights corresponding to each second road show different light colors at the same time; based on this, when the traffic light corresponding to the first road shows green, the traffic lights corresponding to each second road must show red or yellow. Then, it can be known that when the host vehicle drives into the target intersection, the vehicles on each second road are all stipulated to be prohibited from driving into the target intersection.
[0052] When the target intersection is an intersection without traffic signal control, to avoid collisions between vehicles on different roads at the intersection, the first road can be set to have the right of way, while each second road does not have the right of way; or, the traffic priority of the first road is higher than that of each second road. For example, the target intersection can be a small-scale intersection, the first road can be the main road (or arterial road), and the second road can be a branch road (or feeder road) with stop or yield signs. Vehicles on the main road have the right of way, while vehicles on the branch road need to yield or stop to give way to vehicles on the main road. In this case, since the main vehicle has the right of way, or the traffic priority of the main vehicle is higher than that of the vehicles on each second road, when the main vehicle enters the target intersection, vehicles on each second road are prohibited from entering the target intersection.
[0053] It should be noted that, whether it is the first road or each second road, any road can include the upstream road of the intersection and the downstream road of the intersection; the so-called upstream road of the intersection refers to the road that supports vehicles to enter the target intersection, and the downstream road of the intersection refers to the road that vehicles enter after leaving the target intersection, as mentioned above. Figure 3a As shown. And, there may be a stop line corresponding to each road at the target intersection. The so-called stop line is a solid line marking used to indicate the stop position for vehicles waiting for release. Vehicles traveling towards the target intersection on any road are located in the upstream road of the intersection in that road; and when any vehicle enters the target intersection, it can be understood that the reference point of the vehicle (such as the centroid or center point of the vehicle, etc.) crosses the stop line corresponding to the road where the vehicle is located. It should also be noted that a road can include one or more lanes. In the embodiments of the present application, it can be defaulted that vehicles on any road travel on the center line of the corresponding lane, and during subsequent judgment, the vehicle can keep the lane unchanged; the so-called lane center line is a line used to mark the center of the lane, that is, the distances from the lane center line to the left and right sides of the lane are equal.
[0054] S202, during the process of the main vehicle traveling towards the target intersection, select N alternative vehicles used for illegally entering the target intersection from the vehicles traveling on at least one second road, where N is a positive integer.
[0055] In the embodiments of the present application, in order to prevent a vehicle from suddenly appearing on the lateral road (i.e., the second road) in front of the host vehicle and illegally entering the target intersection, it can be set that the behavior of illegally entering the target intersection (which can be simply referred to as the illegal driving behavior) only takes effect on the background traffic vehicles (referred to as vehicles) already existing on the lateral road in front of the host vehicle. Among them, when the target intersection is an intersection controlled by traffic lights, if the target color is red, the illegal driving behavior mentioned here can also be called the red-light running behavior. The so-called red-light running behavior refers to the behavior that when the host vehicle is driving normally and passes through the intersection controlled by traffic lights, the vehicles on other roads intersecting with the road where the host vehicle is located pass through the stop line and enter the intersection when the traffic light is red. When the target intersection is an intersection without traffic lights, the illegal driving behavior mentioned here can also be called the non-stop yielding behavior. The so-called non-stop yielding behavior refers to the behavior that when the host vehicle passes through the intersection controlled by traffic lights, the vehicles on other roads intersecting with the road where the host vehicle is located continue to pass through the stop line and enter the intersection.
[0056] Furthermore, the above-mentioned illegal driving behavior can be performed by the vehicles on the left road or the right road, and there is no limitation in this regard; the so-called left road refers to: the second road located on the left side of the first road in the road direction towards the first road (or from the perspective of the driver of the host vehicle); the right road refers to: the second road located on the right side of the first road in the road direction towards the first road (or from the perspective of the driver of the host vehicle); that is, in this case, the computer device can select N alternative vehicles for illegally entering the target intersection from the vehicles driving on each second road. Or, parameters can also be preset to make the illegal driving behavior only be performed by the vehicles on the left road or the right road; that is, in this case, the computer device can select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the second road located on the left or right side of the first road according to the instructions of the preset parameters.
[0057] Alternatively, a probability can be preset to randomly assign the illegal driving behavior to the vehicles on the left or right road. For example, the probability of illegally entering the target intersection from the left road can be preset to 30%, and the probability of illegally entering the target intersection from the right road can be 70%, or the probabilities of illegally entering the target intersection from the left road and from the right road can both be 50%. That is, in this case, the computer device can select N alternative vehicles for illegally entering the target intersection from the vehicles driving on at least one second road based on the preset vehicle selection probability. Or, the type of vehicle can be preset in advance (i.e., the type of vehicle that triggers the illegal driving behavior is defined), and the illegal driving behavior is executed by the vehicles of the specified type. For example, the type of vehicle is preset as a truck type or a car type. That is, in this case, the computer device can select the vehicles of the preset vehicle type from the vehicles driving on at least one second road as the alternative vehicles for illegally entering the target intersection.
[0058] It should be noted that during the process of the host vehicle driving towards the target intersection, the computer device can, at any time, execute the step of selecting N alternative vehicles for illegally entering the target intersection from the vehicles driving on at least one second road. Or, in the embodiments of the present application, it can be defined that when a vehicle illegal driving behavior (such as a red light running behavior) is triggered, the host vehicle needs to be the vehicle closest to the stop line (under the st coordinate (map coordinate)) in the corresponding lane on the road where it is driving. Because if the host vehicle is not the closest vehicle, the decision-making and planning algorithm carried by the host vehicle will first react to its preceding vehicle (the vehicle closer to the stop line than the host vehicle), which will lose the significance of testing the reaction ability of the decision-making and planning algorithm to the illegal driving behavior (such as a red light running behavior). Based on this, during the process of the host vehicle driving towards the target intersection, the computer device can perform a position feasibility detection on the host vehicle, and after determining that the host vehicle passes the position feasibility detection, execute the step of selecting N alternative vehicles for illegally entering the target intersection from the vehicles driving on at least one second road. Among them, the position feasibility detection refers to the process of detecting whether the position of the host vehicle is feasible. The position of the host vehicle is feasible means that there are no other vehicles between the position of the host vehicle and the corresponding stop line. The embodiments of the present application do not limit the detection time point of the position feasibility detection. For example, the computer device can perform the position feasibility detection on the host vehicle at any time, or can perform the position feasibility detection on the host vehicle when the host vehicle reaches a certain position, and so on.
[0059] S203. Determine the target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle.
[0060] Among them, the target vehicle refers to an alternative vehicle that will collide with the host vehicle at the target intersection if it illegally enters the target intersection. The driving information of any vehicle may include: the driving trajectory and driving state parameters of the corresponding vehicle; the driving state parameters here may include but are not limited to: the current driving speed, the current position, and the maximum acceleration allowed to be used, etc. The so-called current driving speed may refer to: the driving speed used by the vehicle when selecting N alternative vehicles; correspondingly, the current position may refer to: the position where the vehicle is located when selecting N alternative vehicles.
[0061] In the specific implementation process, the computer device determines the intersection point of the driving trajectory of the host vehicle and the driving trajectory of the nth alternative vehicle in the target intersection as the potential conflict point between the host vehicle and the nth alternative vehicle, n ∈ [1, N]; for example, see Figure 3a As shown, assuming that the nth alternative vehicle is the vehicle marked with 31, then the potential conflict point between the host vehicle and the nth alternative vehicle is the point marked with 33. After determining the potential conflict point, the computer device can estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle; and, construct a collision time interval according to the time required for the host vehicle to travel from the current position to the first stop line or the potential conflict point. If the time obtained by estimating the nth alternative vehicle is within the collision time interval, the nth alternative vehicle can be determined as the target vehicle.
[0062] Or, after determining the potential conflict point, the computer device can estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle; and, estimate the time required for the host vehicle to reach the potential conflict point according to the driving state parameters of the host vehicle. If the two estimated times match, it can be considered that the nth alternative vehicle will collide with the host vehicle at the target intersection if it illegally enters the target intersection. At this time, the nth alternative vehicle can be determined as the target vehicle. Among them, the meaning of the two times matching may refer to: the two times are the same, or the difference between the two times is less than the difference threshold, etc.
[0063] S204, randomly trigger the target vehicle to illegally enter the target intersection based on a preset trigger probability; where, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0064] In a specific embodiment, the computer device may randomly generate a triggering probability for the target vehicle; specifically, a random floating-point number within a preset range may be generated by using a random number generation method, and the generated random floating-point number is used as the randomly generated triggering probability. The lower limit value of the preset range here is zero, and the upper limit value is 1, that is, the preset range can be expressed as [0, 1] or (0, 1); correspondingly, the random floating-point number within the preset range can essentially be understood as a decimal. After randomly generating the triggering probability, the computer device may compare the size relationship between the randomly generated triggering probability and the preset triggering probability; if the randomly generated triggering probability is less than the preset triggering probability, it can be considered that the randomly generated triggering probability is feasible, and at this time, the target vehicle can be triggered to illegally enter the target intersection; if the randomly generated triggering probability is greater than or equal to the preset triggering probability, it can be considered that the randomly generated triggering probability is not feasible, and at this time, the target vehicle can be prohibited from entering the target intersection, that is, the target vehicle can be controlled to perform a parking behavior after reaching the stop line, such as Figure 3b shown.
[0065] In another embodiment, the computer device may obtain the historical driving behavior data of the target vehicle, and the historical driving behavior data can be used to indicate whether there is an illegal driving behavior during the historical driving of the target vehicle, as well as information such as the number of illegal driving times. Then, the computer device may call a prediction model pre-trained based on machine learning, and predict the probability of the target vehicle illegally entering the target intersection according to the historical driving behavior data of the target vehicle to obtain a prediction probability; and compare the size relationship between the prediction probability and the predicted triggering probability. If the prediction probability is less than the preset triggering probability, it can be considered that the prediction probability is feasible, and at this time, the target vehicle can be triggered to illegally enter the target intersection; if the prediction probability is greater than or equal to the preset triggering probability, it can be considered that the prediction probability is feasible, and at this time, the target vehicle can be prohibited from entering the target intersection, that is, the target vehicle can be controlled to perform a parking behavior after reaching the stop line, such as Figure 3c shown.
[0066] Among them, the above-mentioned machine learning is the core of AI and is the basis for making computer devices intelligent; the so-called machine learning is an interdisciplinary subject involving multiple fields, including probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc.; it specifically studies how computer devices simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Deep learning is a technology that uses a deep neural network system for machine learning; machine learning / deep learning usually includes various technologies such as artificial neural networks, reinforcement learning, supervised learning, unsupervised learning, semi-supervised learning, and federated learning. The above-mentioned prediction model can be trained based on supervised learning, or can be trained based on unsupervised learning or semi-supervised learning, and this is not limited.
[0067] In the embodiment of the present application, during the process of the host vehicle driving towards the target intersection, N alternative vehicles for illegally driving into the target intersection can be selected from the vehicles driving on at least one second road. By considering the driving information of the host vehicle and the driving information of each alternative vehicle, the target vehicle can be determined from the N alternative vehicles, and then based on a preset triggering probability, the target vehicle is randomly triggered to illegally drive into the target intersection. Since the target vehicle refers to an alternative vehicle that will collide with the host vehicle at the target intersection if it illegally drives into the target intersection, controlling the target vehicle to illegally drive into the target intersection can surely verify the performance of the decision-making and planning algorithm of the host vehicle. In this way, not only can the effectiveness of the illegal driving behavior of the target vehicle be improved, but also the situation of wasting processing resources to control the target vehicle to illegally drive into the target intersection can be avoided. Moreover, in the embodiment of the present application, by supporting the user to simply set some parameters (such as the preset triggering probability) before the simulation, the target vehicle can be randomly triggered to illegally drive into the target intersection based on a certain probability. In this way, not only can the setting efficiency of the illegal driving behavior be effectively improved, but also the randomness of the illegal driving behavior can be ensured, so that the performance of the decision-making and planning algorithm can be tested more comprehensively.
[0068] Based on the above Figure 2 shown method embodiment, the embodiment of the present application further proposes another vehicle processing method; please refer to Figure 4 , and this vehicle processing method may include the following steps S401-S407:
[0069] S401, during the simulation process, control the host vehicle on the first road to drive towards the target intersection; wherein, the target intersection is formed by the intersection of the first road and at least one second road, and there is a first stop line corresponding to the first road at the target intersection.
[0070] S402, during the process of the host vehicle driving towards the target intersection, along the driving direction of the host vehicle, determine the position on the first road that is at a first distance from the first stop line as the first position.
[0071] In a specific implementation, the computer device can obtain a time threshold for crossing the line (denoted by T), and this time threshold for crossing the line can be a duration generated by a random algorithm or a preset duration, which is not limited herein. In addition, the computer device can determine the maximum driving speed of the host vehicle on the first road (denoted by V emax ), and this maximum driving speed may be related to factors such as the road type of the first road, the weather, and the dynamics of the host vehicle. Then, the computer device can calculate the first distance according to the time threshold for crossing the line and the maximum driving speed of the host vehicle on the first road; specifically, the product of the time threshold for crossing the line and the maximum driving speed of the host vehicle on the first road can be used as the first distance (denoted by D T ), that is, DT = T * V emax 。After determining the first distance, the computer device can determine the first position according to the first distance through step S402.
[0072] S403. When it is detected that the host vehicle travels to the first position, perform a position feasibility detection on the host vehicle according to the positions of the vehicles traveling towards the target intersection on the first road.
[0073] In a specific implementation, the computer device can determine the vehicle closest to the first stop line from each vehicle according to the positions of the vehicles traveling towards the target intersection on the first road; specifically, the computer device can calculate the distance between each vehicle and the first stop line according to the positions of the vehicles traveling towards the target intersection on the first road and the position of the first stop line, and determine the vehicle corresponding to the minimum distance as the vehicle closest to the first stop line. After determining the vehicle closest to the first stop line, the computer device can determine whether the determined vehicle is the host vehicle; if the determined vehicle is the host vehicle, it is determined that the host vehicle passes the position feasibility detection; if the determined vehicle is not the host vehicle, it is determined that the host vehicle fails the position feasibility detection.
[0074] If the host vehicle fails the position feasibility detection, the computer device can end this process. If the host vehicle passes the position feasibility detection, step S404 can be triggered for execution. Optionally, if the target intersection is an intersection controlled by traffic lights, that is, there is a target traffic light corresponding to the first road at the target intersection, since the embodiment of the present application needs to test the reaction ability of the decision-making and planning algorithm carried by the host vehicle after a lateral vehicle illegally enters the target intersection, it is necessary to ensure that the light color displayed by the target traffic light in the traveling direction of the host vehicle when the host vehicle passes the first stop line is the target light color (such as green), and at this time, the light color of the traffic light corresponding to the second road in the lateral direction must be red. Based on this, if the host vehicle passes the position feasibility detection, the computer device can also perform a time feasibility detection on the host vehicle; the so-called time feasibility detection refers to: detecting whether the light color of the target traffic light is the target light color when the host vehicle travels to the first stop line. If the host vehicle fails the time feasibility detection, end this process; if the host vehicle passes the time feasibility detection, trigger the execution of step S404.
[0075] It should be noted that the computer device can perform the time feasibility detection on the host vehicle at any moment after the host vehicle passes the position feasibility detection, or can perform the time feasibility detection on the host vehicle when the host vehicle reaches a certain position, and so on. For example, the computer device can obtain a target time interval (represented by t ego ), and according to the target time interval and the target traveling speed used by the host vehicle on the first road (represented by V ego ), Vego ≤V emax ) Calculate the second distance; specifically, the product of the target time interval and the target driving speed used by the host vehicle on the first road can be used as the second distance (denoted by D t ), that is, D t =t ego *V ego . Among them, the value range of the target time interval is [0, T], and T represents the time threshold for crossing the line; the present application embodiment does not limit the distribution function corresponding to the target time interval. For example, the target time interval can follow a uniform distribution of [0, T], or the target time interval can be a fixed value (such as t ego =T, that is, time feasibility detection is performed at a fixed time interval), or the target time interval can be a default value set by the user in advance, so that the user can set it with one key in the most convenient and fast way.
[0076] Then, the computer device can determine the second position along the driving direction of the host vehicle, which is the position on the first road that is at a distance of the second distance from the first stop line; when it is detected that the host vehicle travels to the second position, time feasibility detection is performed on the host vehicle according to the current signal information of the target traffic signal and the target time interval. Since the distance between the second position and the first stop line is the second distance, and the second distance is determined according to the target time interval and the target driving speed used by the host vehicle, the target time interval essentially refers to: the time required for the host vehicle to travel from the second position to the first stop line; that is, the host vehicle still needs t ego seconds to reach the first stop line at the reference point (such as the centroid) of the host vehicle.
[0077] Among them, the current signal information of the target traffic signal may include: the currently displayed light color and the remaining display duration of the corresponding light color. Since when the target traffic signal displays the target light color, the vehicles on the first road are allowed to enter the target intersection; therefore, the method of performing time feasibility detection on the host vehicle according to the current signal information of the target traffic signal and the target time interval may include: if the light color in the current signal information of the target traffic signal is not the target light color, it is determined that the host vehicle fails the time feasibility detection; if the light color in the current signal information of the target traffic signal is the target light color, then determine the size relationship between the remaining display duration (denoted by T G ) in the current signal information and the target time interval (denoted by t ego ).
[0078] If t ego >T G, since when the host vehicle goes straight to the first stop line in this case, the light color of the target traffic signal is no longer the target light color, when the remaining display duration is less than the target time interval, it can be determined that the host vehicle fails the time feasibility detection. If the remaining display duration is greater than or equal to the target time interval (i.e., t ego ≤T G ), then when the host vehicle in this case travels at a constant speed to the first stop line, the light color of the target traffic signal is still the target light color, and after the moment of t ego , in the case where the host vehicle is the first vehicle in front of the first stop line (the position of the host vehicle is feasible), even if the host vehicle accelerates from V t to V ego at a distance D emax from the first stop line, it can also ensure that the time t ego ' required for it to reach the first stop line is less than or equal to T G (because at the same distance, V ego ≤V emax , so there exists t ego '≤t ego ), so when the remaining display duration is greater than or equal to the target time interval, it can be determined that the host vehicle passes the time feasibility detection.
[0079] S404. Select N alternative vehicles for illegally entering the target intersection from the vehicles traveling on at least one second road.
[0080] In one implementation, the computer device can use each vehicle traveling on the i-th second road towards the target intersection as an alternative vehicle for illegally entering the target intersection, where the value of i is greater than 0 and less than or equal to the total number of second roads.
[0081] In another implementation, considering that the success rate of a vehicle illegally entering the target intersection may be negatively correlated with the distance between the vehicle and the target intersection, that is, the shorter the distance between the vehicle and the target intersection, the higher the success rate of the vehicle illegally entering the target intersection; based on this, the computer device can select the vehicle closest to the target intersection from the vehicles traveling on the i-th second road towards the target intersection as an alternative vehicle for illegally entering the target intersection. Among them, the distance between the vehicle and the target intersection can be measured by the distance between the vehicle and the stop line corresponding to the road; that is to say, selecting the vehicle closest to the target intersection can be understood as: selecting the vehicle closest to the stop line corresponding to the i-th second road. For example, as shown in Figure 3a , assuming that the vehicles traveling on the i-th second road towards the target intersection include vehicle 31 and vehicle 32, since vehicle 32 is not the vehicle closest to the stop line (there is still vehicle 31 in front of it), vehicle 31 can be selected as an alternative vehicle, and vehicle 32 is not selected as an alternative vehicle.
[0082] In another implementation, the computer device may select the vehicle closest to the target intersection from the vehicles traveling on the i-th second road towards the target intersection as the candidate vehicle. Then, the computer device may randomly generate a selection probability for the candidate vehicle and determine the vehicle selection probability corresponding to the i-th second road. If the randomly generated selection probability is less than the vehicle selection probability, the candidate vehicle is used as an alternative vehicle for illegally entering the target intersection. The vehicle selection probability corresponding to the i-th road may be pre-set by the user according to their own needs. The specific implementation of the computer device randomly generating a selection probability for the candidate vehicle may be: generating a pure decimal (i.e., a decimal with an integer part of zero) using a random number generation method, and using the generated pure decimal as the selection probability generated for the candidate vehicle. It can be seen that this implementation selects alternative vehicles by comprehensively considering the distance between the vehicle and the target intersection and the vehicle selection probability. In other embodiments, the distance between the vehicle and the target intersection may not be considered, and only the vehicle selection probability is considered to select alternative vehicles, that is, corresponding selection probabilities may be randomly generated for each vehicle traveling on the i-th second road towards the target intersection, and the vehicle with a randomly generated selection probability less than the vehicle selection probability is used as the alternative vehicle.
[0083] In another implementation, the computer device may select the vehicle closest to the target intersection from the vehicles traveling on the i-th second road towards the target intersection as the candidate vehicle. Then, the computer device may determine the vehicle type of the candidate vehicle. If the vehicle type of the candidate vehicle is a preset vehicle type, the candidate vehicle is used as an alternative vehicle for illegally entering the target intersection. It can be seen that this implementation selects alternative vehicles by comprehensively considering the distance between the vehicle and the target intersection and the vehicle type. In other embodiments, the distance between the vehicle and the target intersection may not be considered, and only the vehicle type is considered to select alternative vehicles, that is, the vehicle types of each vehicle traveling on the i-th second road towards the target intersection may be determined, and the vehicle with the vehicle type being the preset vehicle type is used as the alternative vehicle. Optionally, the distance between the vehicle and the target intersection, the vehicle selection probability, and the vehicle type and other three parameters may also be comprehensively considered to select alternative vehicles, and this is not limited herein.
[0084] S405. Determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle.
[0085] Among them, the driving information of any vehicle includes the driving trajectory and driving state parameters of the corresponding vehicle; the driving state parameters include: the current driving speed, the current position, and the maximum acceleration allowed to be used. In a specific implementation, the implementation of step S405 may include the following steps s11 - s13:
[0086] s11. Determine the intersection point of the driving trajectory of the host vehicle and the driving trajectory of the nth alternative vehicle at the target intersection as the potential conflict point between the host vehicle and the nth alternative vehicle, where n ∈ [1, N].
[0087] s12. Estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle.
[0088] In a specific implementation, the computer device can obtain a time estimation model pre-trained based on machine learning, and call the time estimation model to estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle.
[0089] In another specific implementation, the time required for the nth alternative vehicle to reach the potential conflict point can be referred to as the pre-collision time. For the estimation of the pre-collision time of the nth alternative vehicle in the embodiments of the present application, different cases can be considered in combination with state parameters such as the current driving speed, position, and maximum acceleration of the nth alternative vehicle. Specifically, the computer device can determine the target distance (denoted by D n ) between the current position in the driving state parameters of the nth alternative vehicle and the potential conflict point; it should be noted that in the embodiments of the present application, it can be defined that the nth alternative vehicle will not change lanes and will drive along the center line of the lane during driving. Therefore, the position of the potential conflict point only depends on the map settings. Then, when the nth alternative vehicle drives along the center line of the lane on the map, the distance between the position of the potential conflict point and the current position of the nth alternative vehicle in the st coordinate (map coordinate) is the target distance for the nth alternative vehicle to reach the potential conflict point along the center line of the lane.
[0090] In addition, according to the current driving speed (denoted by V n0 ) and the maximum acceleration (denoted by a nmax ) in the driving state parameters of the nth alternative vehicle, estimate the distance (denoted by D nmax ) traveled by the nth alternative vehicle during the acceleration phase when accelerating to the maximum driving speed (denoted by V n1 ); where a nmax and V nmax are related to the vehicle type performance, road grade, and weather conditions of the nth alternative vehicle, and are not limited here. Since the current driving speed of the nth alternative vehicle is V n when the distance to the potential conflict point is D n0 ; therefore, the time t nmax required for the nth alternative vehicle to accelerate from a nmax to V n1 = (V nmax - V n0) / a nmax , the distance D traveled by the nth candidate vehicle during the acceleration phase n1 =(V nmax 2 -V n0 2 ) / (2*a nmax ).
[0091] By calculating the distance traveled by the nth candidate vehicle during the acceleration phase (D n1 ) and target distance (D n ), there are two situations:
[0092] (1)D n1 ≥D n , indicating that the nth candidate vehicle in this case is a nmax Even if you accelerate at full speed, you will not be able to increase your speed to V when you reach the potential conflict point. nmax At this time, the time required for the nth candidate vehicle to reach the potential conflict point (using t nR It can be expressed as follows:
[0093] D n =V n0 *t nR +(a nmax *t nR 2 ) / 2 Formula 1.1
[0094] It can be seen that if the estimated distance (D n1 ) is greater than or equal to the target distance (D n ), the computer device can determine the time required for the nth alternative vehicle to reach the potential conflict point based on the target distance, current driving speed and maximum acceleration.
[0095] (2)D n1 <D n , indicating that the nth candidate vehicle in this case is a nmax Full acceleration can increase the driving speed to V before reaching the potential conflict point. nmax Therefore, t nR It can be composed of the following two parts: t n1 and at the maximum travel speed V nmax t in the uniform speed stage n2 ; Among them, the distance traveled during the acceleration phase is D n1 =(V nmax 2 -V n0 2 ) / (2*a nmax ), the distance traveled during the uniform speed driving phase Dn2 = D n -D n1 Since t n2 = D n2 / V nmax , the time t required for the nth alternative vehicle to reach the potential conflict point can be calculated by the following formula 1.2: nR
[0096] t nR = (V nmax - V n0 ) / a nmax + (D n - (V nmax 2 - V n0 2 ) / (2 * a nmax )) / V nmax Formula 1.2
[0097] It can be seen that if the estimated distance (D n1 ) is less than the target distance (D n ), the computer device can determine the time required for the nth alternative vehicle to reach the potential conflict point based on the target distance, the current driving speed, the maximum acceleration, and the maximum driving speed reached by the nth alternative vehicle through acceleration.
[0098] s13. If the estimated time is within the collision time interval, the nth alternative vehicle is determined as the target vehicle.
[0099] In a specific implementation, the computer device can determine a reference duration. Among them, the reference duration refers to: the duration required for the host vehicle to travel from the current position to the first stop line, or the duration required for the host vehicle to travel from the current position to the potential conflict point. It should be noted that the calculation method of the duration required for the host vehicle to travel from the current position to the potential conflict point is similar to the specific implementation manner of step s12 and will not be elaborated here. And as can be seen from the foregoing, the current position of the host vehicle is the second position. Therefore, when the reference duration refers to the duration required for the host vehicle to travel from the current position to the first stop line, the reference duration is the target time interval mentioned above.
[0100] In addition, the computer device can also obtain the time window width corresponding to the nth alternative vehicle. The number of the time window widths can be 1 or 2, which is not limited herein; and each time window width can be preset by the user or randomly generated by a random algorithm, which is not limited herein; in addition, the time window widths corresponding to different alternative vehicles can be the same or different, which is also not limited herein.
[0101] Then, the computer device can generate a collision time interval according to the time window width and the reference duration. When the number of time window widths is 1, the computer device can perform a difference operation on the reference duration and the time window width to obtain a first value; and perform a summation operation on the reference duration and the time window width to obtain a second value. If the first value is greater than or equal to the reference value, the interval formed by the first value and the second value is used as the collision time interval; if the first value is less than the reference value, the interval formed by the reference value and the second value is used as the collision time interval. Among them, the reference value can be set according to an empirical value. For example, the reference value can be the value 0. Then, using Δt to represent this 1 time window width, and setting the reference duration as the target time interval t ego , the collision time interval can be expressed as [t ego -Δt, t ego +Δt] (when t ego -Δt < 0, the lower limit value of the collision time interval takes 0). Similarly, when the number of time window widths is 2, using Δt1 to represent the first time window width and Δt2 to represent the second time window width, and Δt1 and Δt2 are different, the collision time interval can be expressed as [t ego -Δt1, t ego +Δt2] (when t ego -Δt1 < 0, the lower limit value of the collision time interval takes 0); It can be seen that in this case, the left and right time windows involved in the collision time interval do not have to be of equal length, but different intervals are used for measurement.
[0102] After obtaining the collision time interval through the above method, the computer device can then determine whether the estimated time (t nR ) is within the collision time interval. If the estimated time is within the collision time interval, it can be considered that the pre-collision time corresponding to the nth alternative vehicle is feasible. At this time, the nth alternative vehicle can be determined as the target vehicle; if the estimated time is not within the collision time interval, it can be considered that the pre-collision time corresponding to the nth alternative vehicle is not feasible. At this time, the nth alternative vehicle can be ignored.
[0103] It should be noted that in the specific implementation process of the above step S405, the process of the vehicle illegally entering the target intersection is described by accelerating the vehicle at the maximum acceleration, such as the way of the vehicle accelerating to the potential conflict point, or the way of the vehicle accelerating to the maximum driving speed at the maximum acceleration and then driving at a constant speed at the maximum driving speed; however, in other embodiments, other speed curves (i.e., curves indicating the correspondence between speed and time) or trajectory curves (i.e., curves indicating the correspondence between displacement and time) may also be used to describe the process of the vehicle illegally entering the target intersection, which is not limited herein. When using a speed curve or a trajectory curve to describe the process of the vehicle illegally entering the target intersection, the time required for the nth alternative vehicle to reach the potential conflict point can be calculated as needed, and then it can be determined whether to determine the nth alternative vehicle as the target vehicle by judging whether the calculated time is within the collision time interval.
[0104] S406, randomly generate a triggering probability for the target vehicle.
[0105] S407, if the randomly generated triggering probability is less than the preset triggering probability, trigger the target vehicle to illegally enter the target intersection.
[0106] In a specific implementation, any second road includes an upstream road of the intersection and a downstream road of the intersection; and before the target vehicle illegally enters the target intersection, the driving behavior of the target vehicle is controlled by a traffic flow model (such as a car-following model or other AI models). Then, in the embodiment of the present application, after triggering the target vehicle to illegally enter the target intersection, the target vehicle will be disengaged from the control of the original traffic flow model algorithm and be dominated by the illegal driving behavior; in this behavior, the target vehicle will drive through the corresponding stop line at the maximum driving speed it can reach, that is, start to uniformly accelerate to its maximum driving speed at its maximum acceleration to enter the target intersection. After the target vehicle enters the target intersection, if the target vehicle does not collide with other vehicles (including the host vehicle), after passing through the target intersection and entering the corresponding downstream road of the intersection, it will resume being controlled by the traffic flow model.
[0107] Based on this, after the target vehicle illegally enters the target intersection, the computer device can also adopt corresponding driving strategies to control the driving of the target vehicle in real time according to the driving state of the target vehicle. Specifically, if it is detected that the target vehicle has reached the corresponding downstream road of the intersection, the traffic flow model can be used to control the target vehicle to continue driving; if it is detected that the target vehicle has not reached the corresponding downstream road of the intersection and the driving speed of the target vehicle has reached the maximum driving speed, the target vehicle can be controlled to drive at a constant speed according to the corresponding maximum driving speed; if it is detected that the target vehicle has not reached the corresponding downstream road of the intersection and the driving speed of the target vehicle has not reached the maximum driving speed, the target vehicle is controlled to accelerate.
[0108] Based on the relevant descriptions of the above steps S401 - S407, it should be noted that: The embodiments of the present application do not limit the random generation method of any parameter mentioned in the above description (such as selection probability, trigger probability, target time interval, crossing time threshold, etc.). Moreover, considering that the random numbers generated by the simulator through computer programs are all pseudo - random numbers, users can pre - select to add a random number generation method and a random seed, so that any parameter generated by different simulators used by the user is consistent, thereby enabling the simulation to reproduce the time and location of the behavior of illegally driving into the target intersection, which can be used as a basis for improving and verifying the decision - making and planning algorithm.
[0109] In the embodiments of the present application, during the process of the host vehicle driving towards the target intersection, N alternative vehicles for illegally driving into the target intersection can be selected from the vehicles driving on at least one second road. By considering the driving information of the host vehicle and the driving information of each alternative vehicle, a target vehicle can be determined from the N alternative vehicles, and then based on a preset trigger probability, the target vehicle is randomly triggered to illegally drive into the target intersection. Since the target vehicle refers to: an alternative vehicle that will collide with the host vehicle at the target intersection if it illegally drives into the target intersection; therefore, controlling the target vehicle to illegally drive into the target intersection can surely verify the performance of the decision - making and planning algorithm of the host vehicle. This not only improves the effectiveness of the illegal driving behavior of the target vehicle but also avoids wasting processing resources to control the target vehicle to illegally drive into the target intersection. Moreover, in the embodiments of the present application, by supporting the user to simply set some parameters (such as the preset trigger probability) before the simulation, it can be realized to randomly trigger the target vehicle to illegally drive into the target intersection based on a certain probability. This not only effectively improves the setting efficiency of the illegal driving behavior but also ensures the randomness of the illegal driving behavior, so that the performance of the decision - making and planning algorithm can be tested more comprehensively.
[0110] Based on the above Figure 2 and Figure 4Regarding the related description of the method embodiments shown, in the embodiments of the present application in virtual city - type simulation, a vehicle processing method for setting random red - light running behavior is proposed. Through some simple settings, this vehicle processing method can make the vehicles horizontally in front of the host vehicle randomly have red - light running events (i.e., red - light running behavior). Considering that the red - light running behavior is highly related to the location and the vehicles that need to cooperate in red - light running (highly correlated), that is, specific conditions need to be fully met to trigger; therefore, this vehicle processing method does not adopt the way of triggering at a fixed time frequency, but adopts the way of triggering with a certain probability when the preset conditions are met to generate red - light running behavior; that is to say, when the host vehicle approaches a signal - controlled intersection (the target intersection controlled by traffic lights), within a certain distance in front of the stop line, when the vehicle horizontally in front meets the preset time / distance and other conditions, the vehicle horizontally in front is triggered to execute the red - light running behavior with a certain preset probability P.
[0111] Before elaborating on the specific implementation process of the vehicle processing method proposed in the embodiments of the present application, the following instructions are required:
[0112] ① The position of the vehicles (such as the host vehicle or other background traffic vehicles) mentioned subsequently, and whether the vehicle crosses the stop line, etc., can all be measured by the centroid of the vehicle; that is, the position where the centroid of the vehicle is located can be used as the position of the vehicle. If the centroid of the vehicle crosses the stop line, it is considered that the vehicle crosses the stop line.
[0113] ② The vehicle horizontally in front mentioned subsequently refers to: the vehicle located downstream of the driving direction of the host vehicle, at the intersection controlled by traffic lights, on the road that intersects horizontally with the road where the vehicle is located, and the driving direction is the direction of driving into the intersection. It should be understood that if the intersection is not a regular cross - road intersection, such as having 5 or 6 road entrances, as long as there is an intersection with the driving trajectory of the host vehicle, the oncoming vehicle on the diagonal road can also be considered similarly, that is, the oncoming vehicle on the diagonal road can also be regarded as the vehicle horizontally in front.
[0114] ③ In a random red - light running event, there may be a vehicle running a red light in front of the host vehicle. This vehicle is named the red - light running vehicle. And, the embodiments of the present application mainly consider the situation where the host vehicle needs to go straight through the target intersection and the red - light running vehicle goes straight (not turning left or right).
[0115] ④ Before the red - light running vehicle triggers the red - light running event, its driving behavior can be controlled by the traffic flow model. After triggering the red - light running event, it will break away from the control of the original model and go straight along the predetermined trajectory or speed, and will not avoid the host vehicle or other traffic participants. If a collision occurs with the host vehicle or other traffic participants, the event can be recorded. Here, there is no limitation on how to determine a collision and how to record it.
[0116] ⑤ If there are multiple master vehicles in the simulation system, the vehicle running a red light events are calculated independently respectively.
[0117] Based on the above explanations, the following combines Figure 5a the flowchart shown in
[0118] Step a: The simulation starts running and is ready to randomly generate red light running events.
[0119] Step b: Determine whether all master vehicles in the simulation system have been traversed at the current simulation time; if so, the simulation clock can be advanced; if not, step c can be triggered for execution.
[0120] Step c: Select an untraversed master vehicle and trigger the execution of step d.
[0121] Step d: For the selected master vehicle, determine whether the master vehicle has traveled to the first position which is D T (the first distance) away from the stop line at the next intersection (such as the target intersection). If the master vehicle reaches the first position, step e can be triggered for execution; if the master vehicle does not reach the first position, jump to step b.
[0122] Step e: Determine whether the first position is feasible (i.e., perform position feasibility detection on the master vehicle). If the first position is feasible, step f can be triggered for execution; if the first position is not feasible, jump to step b.
[0123] Step f: Generate a target time interval t ego and determine whether the master vehicle time is feasible (i.e., perform time feasibility detection on the master vehicle). If the time is feasible, step g can be triggered for execution; if the time is not feasible, jump to step b. Among them, the logic for determining whether the master vehicle time is feasible can be: determine the current light color of the target traffic signal at the intersection ahead. If the current light color is yellow or red, it is considered that the master vehicle time is not feasible and skipped. If the current light color is green, the remaining display duration T G (i.e., within this signal cycle, the light color of the target traffic signal will change from green to non - green, such as yellow or red after T G seconds) can be checked. If t ego >T G , it is considered that the master vehicle time is not feasible and skipped. On the contrary, if t ego ≤T G , it is considered that the master vehicle time is feasible.
[0124] Step g: Select alternative vehicles for running a red light from the transverse road (i.e., at least one second road), and use the selected alternative vehicles to construct an alternative vehicle pool, and trigger the execution of step h. Among them, the embodiment of the present application can define the vehicle closest to its stop line on the transverse road as an alternative vehicle for running a red light (i.e., an alternative vehicle for running a red light). All alternative vehicles will first be placed in the alternative vehicle pool for further judgment and selection (if it is set to only consider the red light running vehicles on the left side, then only the alternative vehicles on the left side will be placed in this pool, and so on). It should be understood that when there is no vehicle on the transverse road, there is no alternative vehicle and the alternative vehicle pool is empty.
[0125] Step h: Determine whether there is an unselected candidate vehicle in the candidate vehicle pool. If so, trigger the execution of step i; if not, jump to step b.
[0126] Step i: Select an alternative vehicle from the alternative vehicle pool, and estimate whether the pre-collision time corresponding to the alternative vehicle is feasible. Specifically, a random selection or a specific selection method can be used to select an alternative vehicle from the alternative vehicle pool; and the pre-collision time of the selected alternative vehicle is calculated; if the pre-collision time is within the collision time interval, it can be considered that the pre-collision time is feasible, and step j can be triggered at this time; if the pre-collision time is not within the collision time interval, it can be considered that the pre-collision time is not feasible, and the alternative vehicle can be removed from the alternative vehicle pool and jump to step h.
[0127] Step j: Randomly generate a trigger probability and determine whether the randomly generated trigger probability is feasible. Specifically, if the randomly generated trigger probability is less than the preset trigger probability, it can be considered that the randomly generated trigger probability is feasible, and step k can be triggered at this time; if the randomly generated trigger probability is greater than or equal to the preset trigger probability, it can be considered that the randomly generated trigger probability is not feasible, and the candidate vehicle can be removed from the candidate vehicle pool at this time, and jump to step h to select another vehicle from the candidate vehicle pool (the selection method is not limited here) to perform the above judgment. If both are not feasible, the trigger fails, and wait for the main vehicle to drive to the next intersection before making another judgment.
[0128] Step k: trigger a red light running event. Specifically, the candidate vehicle can be used as the target vehicle (i.e., the red light running vehicle), and the target vehicle is triggered to run a red light and enter the target intersection. After executing step k, step l can be executed. The processing logic of the red light running vehicle can be found in Figure 5bAs shown: When a red-light running event is triggered, it can be determined whether this vehicle has reached the downstream road of the intersection; if so, the control of this vehicle is restored by a traffic flow model (such as a car-following model); if not, it can be determined whether the driving speed of this vehicle reaches the maximum speed. If the maximum driving speed is reached, control this vehicle to travel at a constant speed according to the maximum speed, and trigger the simulation clock to continue to advance; if the maximum driving speed is not reached, control this vehicle to accelerate at the maximum acceleration, and trigger the simulation clock to continue to advance.
[0129] Step l: Determine whether the elapsed simulation time is equal to the total simulation time. If it is equal, the simulation ends; if it is not equal, run other simulation modules of the simulation, and jump to step b to continue traversing other host vehicles. After the traversal is completed, advance the simulation clock, and other modules of the simulation can continue to run.
[0130] It should be noted that for other modules of the simulation, there is no limitation here. For example, the simulation traversal of other events is completed, etc. It is listed separately here to show the difference from the random red-light running event generation module. And when the simulation running time ends, the entire module can be terminated. There is no limitation here, and only the generation process of the random red-light running event is emphasized.
[0131] Based on the above description, it can be seen that the embodiments of the present application support users to control the random red-light running behavior of the vehicle in front of the host vehicle in large-scale simulations such as virtual cities by simply setting some parameters (such as the threshold of the time to cross the line, the width of the time window, the triggering probability, etc.) of the red-light running behavior appearing in the simulation system in the virtual city-type simulation. In this way, while ensuring that the red-light running behavior appears randomly in front of the host vehicle, the purpose of testing the reaction of the decision-making and planning algorithm carried by the host vehicle to the red-light running of the vehicle in front, verifying the decision-making and planning algorithm, and actively discovering the red-light running scenario can be achieved.
[0132] Based on the description of the above vehicle processing method embodiments, the embodiments of the present application also disclose a vehicle processing device, and the vehicle processing device can be a computer program (including program code) running in a computer device. This vehicle processing device can execute Figure 2 or Figure 4 each step in the method flow shown. Please refer to Figure 6 , and the vehicle processing device can run the following units:
[0133] The control unit 601 is used to control the host vehicle on the first road to travel towards the target intersection during the simulation; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, the vehicles on each second road are all prohibited from entering the target intersection;
[0134] A processing unit 602, configured to select, from vehicles traveling on the at least one second road, N alternative vehicles for illegally entering the target intersection during the process of the host vehicle traveling towards the target intersection, where N is a positive integer;
[0135] The processing unit 602 is further configured to determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle; the target vehicle refers to an alternative vehicle that, if illegally enters the target intersection, will collide with the host vehicle at the target intersection;
[0136] The processing unit 602 is further configured to randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0137] In one implementation, when the processing unit 602 is configured to randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability, it may specifically be configured to:
[0138] Randomly generate a triggering probability for the target vehicle;
[0139] If the randomly generated triggering probability is less than the preset triggering probability, trigger the target vehicle to illegally enter the target intersection.
[0140] In another implementation, there is a first stop line corresponding to the first road at the target intersection; correspondingly, the processing unit 602 may further be configured to:
[0141] During the process of the host vehicle traveling towards the target intersection, determine, along the traveling direction of the host vehicle, a position on the first road that is at a first distance from the first stop line as the first position;
[0142] When it is detected that the host vehicle travels to the first position, perform a position feasibility detection on the host vehicle according to the positions of the vehicles traveling towards the target intersection on the first road;
[0143] If the host vehicle passes the position feasibility detection, trigger the execution of the step of selecting N alternative vehicles for illegally entering the target intersection from the vehicles traveling on the at least one second road.
[0144] In another implementation, the processing unit 602 may further be configured to:
[0145] Obtain a time threshold for crossing the line, where the time threshold for crossing the line is a duration generated by a random algorithm or a preset duration;
[0146] Calculate a first distance according to the passing time threshold and the maximum driving speed of the host vehicle on the first road.
[0147] In another implementation, when the processing unit 602 is used to perform a position feasibility detection on the host vehicle according to the positions of the vehicles traveling towards the target intersection on the first road, it may specifically be used for:
[0148] Determine the vehicle closest to the first stop line from the vehicles traveling towards the target intersection on the first road according to the positions of the vehicles;
[0149] If the determined vehicle is the host vehicle, determine that the host vehicle passes the position feasibility detection; if the determined vehicle is not the host vehicle, determine that the host vehicle fails the position feasibility detection.
[0150] In another implementation, there is a target traffic signal corresponding to the first road at the target intersection; if the host vehicle passes the position feasibility detection, the processing unit 602 may further be used for:
[0151] Along the driving direction of the host vehicle, determine a second position at a second distance from the first stop line on the first road;
[0152] When it is detected that the host vehicle travels to the second position, perform a time feasibility detection on the host vehicle according to the current signal information and the target time interval of the target traffic signal; wherein, the target time interval refers to the duration required for the host vehicle to travel from the second position to the first stop line;
[0153] If the host vehicle passes the time feasibility detection, trigger the step of selecting N alternative vehicles used for illegally entering the target intersection from the vehicles traveling on the at least one second road.
[0154] In another implementation, the processing unit 602 may further be used for:
[0155] Obtain a target time interval, the value range of the target time interval is [0, T], T represents the passing time threshold; and the target time interval follows a uniform distribution on [0, T], or the target time interval is a fixed value;
[0156] Calculate a second distance according to the target time interval and the target driving speed used by the host vehicle on the first road.
[0157] In another embodiment, the current signal information of the target traffic signal includes: the currently displayed light color and the remaining display duration of the corresponding light color; wherein, when the target traffic signal displays the target light color, the vehicles on the first road are allowed to enter the target intersection;
[0158] Correspondingly, when the processing unit 602 is used to perform a time feasibility detection on the host vehicle according to the current signal information of the target traffic signal and the target time interval, it can be specifically used for:
[0159] If the light color in the current signal information of the target traffic signal is the target light color, determine the magnitude relationship between the remaining display duration in the current signal information and the target time interval;
[0160] When the remaining display duration is greater than or equal to the target time interval, determine that the host vehicle passes the time feasibility detection; when the remaining display duration is less than the target time interval, determine that the host vehicle fails the time feasibility detection.
[0161] In another embodiment, when the processing unit 602 is used to select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road, it can be specifically used for:
[0162] Select the vehicle closest to the target intersection from the vehicles driving towards the target intersection on the i-th second road as an alternative vehicle for illegally entering the target intersection, where the value of i is greater than 0 and less than or equal to the total number of second roads;
[0163] Alternatively, select the vehicle closest to the target intersection from the vehicles driving towards the target intersection on the i-th second road as a candidate vehicle; randomly generate a selection probability for the candidate vehicle, and determine the vehicle selection probability corresponding to the i-th second road; if the randomly generated selection probability is less than the vehicle selection probability, use the candidate vehicle as an alternative vehicle for illegally entering the target intersection.
[0164] In another embodiment, the driving information of any vehicle includes the driving trajectory and driving state parameters of the corresponding vehicle; correspondingly, when the processing unit 602 is used to determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle, it can be specifically used for:
[0165] Determine the intersection point of the driving trajectory of the host vehicle and the driving trajectory of the n-th alternative vehicle in the target intersection as the potential conflict point between the host vehicle and the n-th alternative vehicle, where n ∈ [1, N];
[0166] Estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle;
[0167] If the estimated time is within the collision time interval, determine the nth alternative vehicle as the target vehicle.
[0168] In another implementation manner, the driving state parameters include: the current driving speed, the current position, and the maximum acceleration allowed to be used; correspondingly, when the processing unit 602 is used to estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle, it can be specifically used for:
[0169] Determine the target distance between the current position in the driving state parameters of the nth alternative vehicle and the potential conflict point;
[0170] According to the current driving speed and the maximum acceleration in the driving state parameters of the nth alternative vehicle, estimate the distance traveled by the nth alternative vehicle during the acceleration phase when the nth alternative vehicle accelerates to the maximum driving speed;
[0171] If the estimated distance is greater than or equal to the target distance, determine the time required for the nth alternative vehicle to reach the potential conflict point according to the target distance, the current driving speed, and the maximum acceleration;
[0172] If the estimated distance is less than the target distance, determine the time required for the nth alternative vehicle to reach the potential conflict point according to the target distance, the current driving speed, the maximum acceleration, and the maximum driving speed reached by the nth alternative vehicle through acceleration.
[0173] In another implementation manner, there is a first stop line corresponding to the first road at the target intersection; correspondingly, the processing unit 602 can also be used for:
[0174] Determine the reference duration, where the reference duration refers to: the duration required for the host vehicle to travel from the current position to the first stop line, or the duration required for the host vehicle to travel from the current position to the potential conflict point;
[0175] Obtain the time window width corresponding to the nth alternative vehicle, and generate a collision time interval according to the time window width and the reference duration.
[0176] In another implementation manner, the number of the time window widths is 1; correspondingly, when the processing unit 602 is used to generate a collision time interval according to the time window width and the reference duration, it can be specifically used for:
[0177] Perform a difference operation on the reference duration and the time window width to obtain a first value; and perform a summation operation on the reference duration and the time window width to obtain a second value;
[0178] If the first value is greater than or equal to the reference value, use the interval formed by the first value and the second value as the collision time interval;
[0179] If the first value is less than the reference value, use the interval formed by the reference value and the second value as the collision time interval.
[0180] In another embodiment, any one of the second roads includes a road upstream of the intersection and a road downstream of the intersection. The road upstream of the intersection refers to the road that supports vehicles to enter the target intersection, and the road downstream of the intersection refers to the road that vehicles enter after exiting the target intersection; wherein, before the target vehicle illegally enters the target intersection, the driving behavior of the target vehicle is controlled by a traffic flow model;
[0181] Correspondingly, after the target vehicle illegally enters the target intersection, the processing unit 602 can also be used for:
[0182] If it is detected that the target vehicle has reached the corresponding road downstream of the intersection, use the traffic flow model to control the target vehicle to continue driving;
[0183] If it is detected that the target vehicle has not reached the corresponding road downstream of the intersection and the driving speed of the target vehicle has reached the maximum driving speed, control the target vehicle to drive at a constant speed according to the corresponding maximum driving speed;
[0184] If it is detected that the target vehicle has not reached the corresponding road downstream of the intersection and the driving speed of the target vehicle has not reached the maximum driving speed, control the target vehicle to accelerate.
[0185] According to another embodiment of the present application, Figure 6 Each unit in the vehicle processing device shown can be separately or all combined into one or several other units to form, or some of the units can be further split into multiple smaller units in terms of function to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, based on the vehicle processing device, other units can also be included. In practical applications, these functions can also be assisted by other units and can be realized by the cooperation of multiple units.
[0186] According to another embodiment of the present application, it can be achieved by running a computer program (including program code) capable of executing the respective steps involved in the corresponding method shown in Figure 2 or Figure 4 on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), etc., to construct a vehicle processing device as shown in Figure 6 and to implement the vehicle processing method of the embodiment of the present application. The computer program can be recorded on, for example, a computer-readable recording medium, loaded into the above computing device through the computer-readable recording medium, and run therein.
[0187] In the process of the host vehicle driving towards the target intersection in the embodiment of the present application, N alternative vehicles for illegally driving into the target intersection can be selected from the vehicles driving on at least one second road, and by considering the driving information of the host vehicle and the driving information of each alternative vehicle, a target vehicle can be determined from the N alternative vehicles, and then based on a preset triggering probability, randomly trigger the target vehicle to illegally drive into the target intersection. Since the target vehicle refers to an alternative vehicle that will collide with the host vehicle at the target intersection if it illegally drives into the target intersection; therefore, controlling the target vehicle to illegally drive into the target intersection can surely verify the performance of the decision-making and planning algorithm of the host vehicle, which not only can improve the effectiveness of the illegal driving behavior of the target vehicle, but also can avoid wasting processing resources to control the target vehicle to illegally drive into the target intersection. Moreover, in the embodiment of the present application, by supporting the user to simply set some parameters (such as the preset triggering probability) before the simulation, it can be achieved to randomly trigger the target vehicle to illegally drive into the target intersection based on a certain probability, which not only can effectively improve the setting efficiency of the illegal driving behavior, but also can ensure the randomness of the illegal driving behavior, so that the performance of the decision-making and planning algorithm can be tested more comprehensively.
[0188] Based on the description of the above method embodiment and device embodiment, the embodiment of the present application also provides a computer device. Please refer to Figure 7, the computer device at least includes a processor 701, an input interface 702, an output interface 703, and a computer storage medium 704. Among them, the processor 701, the input interface 702, the output interface 703, and the computer storage medium 704 in the computer device can be connected through a bus or other means. The computer storage medium 704 can be stored in the memory of the computer device. The computer storage medium 704 is used to store a computer program, and the computer program includes program instructions. The processor 701 is used to execute the program instructions stored in the computer storage medium 704. The processor 701 (or CPU (Central Processing Unit, central processor)) is the computing core and control core of the computer device, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function.
[0189] In one embodiment, the processor 701 described in the embodiments of the present application can be used for a series of vehicle processing, specifically including: during the simulation process, controlling the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are specified to be prohibited from entering the target intersection; during the process of the host vehicle driving towards the target intersection, select N alternative vehicles used for illegally entering the target intersection from the vehicles driving on the at least one second road, where N is a positive integer; determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection; randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability, and so on. It should be noted that when the processor 701 executes the above steps, the specific implementation manners of each step can be further referred to the relevant descriptions of the method embodiments shown in the foregoing Figure 2 or Figure 4 and will not be elaborated here.
[0190] The embodiments of the present application also provide a computer storage medium (Memory). The computer storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the computer storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer storage medium provides a storage space, and this storage space stores the operating system of the computer device. And, one or more instructions suitable for being loaded and executed by the processor 701 are also stored in this storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer storage medium located far from the aforementioned processor.
[0191] In one embodiment, one or more instructions stored in the computer storage medium can be loaded and executed by the processor to implement the corresponding steps in the above-mentioned method embodiments related to Figure 2 or Figure 4 shown; specifically, one or more instructions in the computer storage medium can be loaded and executed by the processor to perform the following steps:
[0192] During the simulation process, control the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are stipulated to be prohibited from entering the target intersection;
[0193] During the process of the host vehicle driving towards the target intersection, select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road, where N is a positive integer;
[0194] According to the driving information of the host vehicle and the driving information of each alternative vehicle, determine the target vehicle from the N alternative vehicles; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection;
[0195] Based on a preset triggering probability, randomly trigger the target vehicle to illegally enter the target intersection; wherein, when the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
[0196] In one embodiment, when randomly triggering the target vehicle to illegally drive into the target intersection based on a preset triggering probability, the one or more instructions can be loaded and specifically executed by a processor:
[0197] Randomly generate a triggering probability for the target vehicle;
[0198] If the randomly generated triggering probability is less than the preset triggering probability, trigger the target vehicle to illegally drive into the target intersection.
[0199] In another embodiment, there is a first stop line corresponding to the first road at the target intersection; correspondingly, the one or more instructions can also be loaded and specifically executed by a processor:
[0200] During the process of the host vehicle driving towards the target intersection, along the driving direction of the host vehicle, determine a first position at a first distance from the first stop line on the first road;
[0201] When it is detected that the host vehicle travels to the first position, perform a position feasibility detection on the host vehicle according to the positions of the vehicles driving towards the target intersection on the first road;
[0202] If the host vehicle passes the position feasibility detection, trigger the step of selecting N alternative vehicles for illegally driving into the target intersection from the vehicles driving on the at least one second road.
[0203] In another embodiment, the one or more instructions can also be loaded and specifically executed by a processor:
[0204] Obtain a time threshold for crossing the line, where the time threshold for crossing the line is a duration generated by a random algorithm or a preset duration;
[0205] Calculate a first distance based on the time threshold for crossing the line and the maximum driving speed of the host vehicle on the first road.
[0206] In another embodiment, when performing a position feasibility detection on the host vehicle according to the positions of the vehicles driving towards the target intersection on the first road, the one or more instructions can be loaded and specifically executed by a processor:
[0207] Determine the vehicle closest to the first stop line from the vehicles according to the positions of the vehicles driving towards the target intersection on the first road;
[0208] If the determined vehicle is the host vehicle, determine that the host vehicle passes the position feasibility detection; if the determined vehicle is not the host vehicle, determine that the host vehicle fails the position feasibility detection.
[0209] In another embodiment, there is a target traffic signal corresponding to the first road at the target intersection; if the host vehicle passes the position feasibility detection, the one or more instructions can also be loaded and specifically executed by a processor:
[0210] Along the driving direction of the host vehicle, a position on the first road that is at a second distance from the first stop line is determined as the second position;
[0211] When it is detected that the host vehicle travels to the second position, time feasibility detection is performed on the host vehicle according to the current signal information of the target traffic signal and the target time interval; wherein, the target time interval refers to: the time required for the host vehicle to travel from the second position to the first stop line;
[0212] If the host vehicle passes the time feasibility detection, the step of selecting N alternative vehicles used for illegally entering the target intersection from the vehicles traveling on the at least one second road is triggered to be executed.
[0213] In another embodiment, the one or more instructions can also be loaded and specifically executed by a processor:
[0214] Obtain a target time interval, the value range of the target time interval is [0, T], T represents a time threshold for crossing the line; and the target time interval follows a uniform distribution on [0, T], or the target time interval is a fixed value;
[0215] According to the target time interval and the target driving speed used by the host vehicle on the first road, a second distance is calculated.
[0216] In another embodiment, the current signal information of the target traffic signal includes: the currently displayed light color and the remaining display duration of the corresponding light color; wherein, when the target traffic signal displays the target light color, the vehicles on the first road are allowed to enter the target intersection;
[0217] Correspondingly, when performing time feasibility detection on the host vehicle according to the current signal information of the target traffic signal and the target time interval, the one or more instructions can be loaded and specifically executed by a processor:
[0218] If the light color in the current signal information of the target traffic signal is the target light color, determine the magnitude relationship between the remaining display duration in the current signal information and the target time interval;
[0219] When the remaining display duration is greater than or equal to the target time interval, determine that the host vehicle passes the time feasibility detection; when the remaining display duration is less than the target time interval, determine that the host vehicle fails the time feasibility detection.
[0220] In another implementation, when selecting N alternative vehicles used for illegally driving into the target intersection from the vehicles driving on the at least one second road, the one or more instructions can be loaded and specifically executed by a processor:
[0221] Select the vehicle closest to the target intersection from the vehicles driving towards the target intersection on the i-th second road as an alternative vehicle used for illegally driving into the target intersection, where the value of i is greater than 0 and less than or equal to the total number of second roads;
[0222] Alternatively, select the vehicle closest to the target intersection from the vehicles driving towards the target intersection on the i-th second road as a candidate vehicle; randomly generate a selection probability for the candidate vehicle, and determine the vehicle selection probability corresponding to the i-th second road; if the randomly generated selection probability is less than the vehicle selection probability, then use the candidate vehicle as an alternative vehicle for illegally driving into the target intersection.
[0223] In another implementation, the driving information of any vehicle includes the driving trajectory and driving state parameters of the corresponding vehicle; correspondingly, when determining a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle, the one or more instructions can be loaded and specifically executed by a processor:
[0224] Determine the intersection point of the driving trajectory of the host vehicle and the driving trajectory of the n-th alternative vehicle in the target intersection as the potential conflict point between the host vehicle and the n-th alternative vehicle, where n ∈ [1, N];
[0225] Estimate the time required for the n-th alternative vehicle to reach the potential conflict point according to the driving state parameters of the n-th alternative vehicle;
[0226] If the estimated time is within the collision time interval, then determine the n-th alternative vehicle as the target vehicle.
[0227] In another implementation, the driving state parameters include: current driving speed, current position, and the maximum acceleration allowed to be used; correspondingly, when estimating the time required for the n-th alternative vehicle to reach the potential conflict point according to the driving state parameters of the n-th alternative vehicle, the one or more instructions can be loaded and specifically executed by a processor:
[0228] Determine the target distance between the current position in the driving state parameters of the n-th alternative vehicle and the potential conflict point;
[0229] Based on the current driving speed and maximum acceleration in the driving state parameters of the nth alternative vehicle, estimate the distance traveled by the nth alternative vehicle during the acceleration phase when accelerating to the maximum driving speed.
[0230] If the estimated distance is greater than or equal to the target distance, then determine the time required for the nth alternative vehicle to reach the potential conflict point based on the target distance, the current driving speed, and the maximum acceleration.
[0231] If the estimated distance is less than the target distance, then determine the time required for the nth alternative vehicle to reach the potential conflict point based on the target distance, the current driving speed, the maximum acceleration, and the maximum driving speed reached by the nth alternative vehicle through acceleration.
[0232] In another implementation, there is a first stop line corresponding to the first road at the target intersection; correspondingly, the one or more instructions can also be loaded and specifically executed by a processor:
[0233] Determine a reference duration, where the reference duration refers to the duration required for the host vehicle to travel from the current position to the first stop line, or the duration required for the host vehicle to travel from the current position to the potential conflict point.
[0234] Obtain the time window width corresponding to the nth alternative vehicle, and generate a collision time interval based on the time window width and the reference duration.
[0235] In another implementation, the number of time window widths is 1; correspondingly, when generating a collision time interval based on the time window width and the reference duration, the one or more instructions can be loaded and specifically executed by a processor:
[0236] Perform a difference operation on the reference duration and the time window width to obtain a first value; and perform a summation operation on the reference duration and the time window width to obtain a second value.
[0237] If the first value is greater than or equal to a reference value, then use the interval formed by the first value and the second value as the collision time interval.
[0238] If the first value is less than the reference value, then use the interval formed by the reference value and the second value as the collision time interval.
[0239] In another embodiment, any one of the second roads includes a road upstream of the intersection and a road downstream of the intersection. The road upstream of the intersection refers to the road that supports vehicles to enter the target intersection, and the road downstream of the intersection refers to the road that vehicles enter after driving out of the target intersection. Among them, before the target vehicle illegally enters the target intersection, the driving behavior of the target vehicle is controlled by a traffic flow model.
[0240] Correspondingly, after the target vehicle illegally enters the target intersection, the one or more instructions can also be loaded and specifically executed by a processor:
[0241] If it is detected that the target vehicle has reached the corresponding road downstream of the intersection, the traffic flow model is used to control the target vehicle to continue driving.
[0242] If it is detected that the target vehicle has not reached the corresponding road downstream of the intersection and the driving speed of the target vehicle has reached the maximum driving speed, the target vehicle is controlled to drive at a constant speed according to the corresponding maximum driving speed.
[0243] If it is detected that the target vehicle has not reached the corresponding road downstream of the intersection and the driving speed of the target vehicle has not reached the maximum driving speed, the target vehicle is controlled to accelerate.
[0244] In the embodiment of the present application, during the process of the host vehicle driving towards the target intersection, N alternative vehicles for illegally entering the target intersection are selected from the vehicles driving on at least one second road, and the target vehicle is determined from the N alternative vehicles by considering the driving information of the host vehicle and the driving information of each alternative vehicle. Furthermore, based on a preset triggering probability, the target vehicle is randomly triggered to illegally enter the target intersection. Since the target vehicle refers to an alternative vehicle that will collide with the host vehicle at the target intersection if it illegally enters the target intersection, controlling the target vehicle to illegally enter the target intersection can surely verify the performance of the decision-making and planning algorithm of the host vehicle. In this way, not only can the effectiveness of the illegal driving behavior of the target vehicle be improved, but also the situation of wasting processing resources to control the target vehicle to illegally enter the target intersection can be avoided. Moreover, in the embodiment of the present application, by supporting the user to simply set some parameters (such as the preset triggering probability) before simulation, the target vehicle can be randomly triggered to illegally enter the target intersection based on a certain probability. In this way, not only can the setting efficiency of the illegal driving behavior be effectively improved, but also the randomness of the illegal driving behavior can be ensured, so that the performance of the decision-making and planning algorithm can be tested more comprehensively.
[0245] It should be noted that, according to one aspect of the present application, a computer program product or a computer program is further provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above Figure 2 or Figure 4 method provided in various alternative manners of the method embodiment shown.
[0246] For example, the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the following steps: during the simulation process, control the host vehicle on the first road to drive towards the target intersection; the host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are prohibited from entering the target intersection; during the process of the host vehicle driving towards the target intersection, select N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road, where N is a positive integer; according to the driving information of the host vehicle and the driving information of each alternative vehicle, determine the target vehicle from the N alternative vehicles; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection; randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability, and so on.
[0247] In addition, it should be understood that the above-disclosed are only the preferred embodiments of the present application. Of course, the scope of the rights of the present application cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A vehicle processing method, characterized in that, Including: During the simulation process, control the host vehicle on the first road to drive towards the target intersection; The host vehicle is a vehicle equipped with a decision-making and planning algorithm. The target intersection is formed by the intersection of the first road and at least one second road. When the host vehicle enters the target intersection, vehicles on each second road are stipulated to be prohibited from entering the target intersection; During the process of the host vehicle driving towards the target intersection, select N alternative vehicles from the vehicles driving on the at least one second road for illegally entering the target intersection, where N is a positive integer; According to the driving information of the host vehicle and the driving information of each alternative vehicle, determine the target vehicle from the N alternative vehicles. The target vehicle refers to: if it illegally enters the target intersection, the alternative vehicle that will collide with the host vehicle in the target intersection; Based on a preset triggering probability, randomly trigger the target vehicle to illegally enter the target intersection. Among them, when the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
2. The method according to claim 1, wherein, The randomly triggering the target vehicle to illegally enter the target intersection based on a preset triggering probability includes: Randomly generate a triggering probability for the target vehicle; If the randomly generated triggering probability is less than the preset triggering probability, trigger the target vehicle to illegally enter the target intersection.
3. The method according to claim 1 or 2, characterized in that There is a first stop line corresponding to the first road at the target intersection. The method further includes: During the process of the host vehicle driving towards the target intersection, along the driving direction of the host vehicle, determine a first position at a first distance from the first stop line on the first road; When it is detected that the host vehicle travels to the first position, perform a position feasibility detection on the host vehicle according to the positions of the vehicles driving towards the target intersection on the first road; If the host vehicle passes the position feasibility detection, trigger the execution of the step of selecting N alternative vehicles from the vehicles driving on the at least one second road for illegally entering the target intersection.
4. The method according to claim 3, wherein The method further includes: Obtain a time threshold for crossing the line, where the time threshold for crossing the line is a duration generated by a random algorithm or a preset duration; Calculate the first distance according to the time threshold for crossing the line and the maximum driving speed of the host vehicle on the first road.
5. The method according to claim 3, wherein The performing a position feasibility detection on the host vehicle according to the positions of the vehicles driving towards the target intersection on the first road includes: According to the positions of the vehicles driving towards the target intersection on the first road, determine the vehicle closest to the first stop line from the vehicles; If the determined vehicle is the host vehicle, determine that the host vehicle passes the position feasibility detection; if the determined vehicle is not the host vehicle, determine that the host vehicle fails the position feasibility detection.
6. The method according to claim 3, wherein There is a target traffic signal corresponding to the first road at the target intersection; If the host vehicle passes the position feasibility detection, the method further includes: Along the driving direction of the host vehicle, a position on the first road that is at a second distance from the first stop line is determined as the second position; When it is detected that the host vehicle travels to the second position, time feasibility detection is performed on the host vehicle according to the current signal information of the target traffic signal and the target time interval; wherein, the target time interval refers to the time required for the host vehicle to travel from the second position to the first stop line; If the host vehicle passes the time feasibility detection, then the step of selecting N alternative vehicles for illegally entering the target intersection from the vehicles traveling on the at least one second road is triggered to be executed.
7. The method according to claim 6, wherein The method further includes: Obtaining a target time interval, the value range of the target time interval is [0, T], T represents a time threshold for crossing the line; and the target time interval follows a uniform distribution on [0, T], or the target time interval is a fixed value; According to the target time interval and the target driving speed used by the host vehicle on the first road, the second distance is calculated.
8. The method according to claim 6, wherein The current signal information of the target traffic signal includes: the currently displayed light color and the remaining display duration of the corresponding light color; wherein, when the target traffic signal displays the target light color, the vehicles on the first road are allowed to enter the target intersection; The performing time feasibility detection on the host vehicle according to the current signal information of the target traffic signal and the target time interval includes: If the light color in the current signal information of the target traffic signal is the target light color, then the magnitude relationship between the remaining display duration in the current signal information and the target time interval is determined; When the remaining display duration is greater than or equal to the target time interval, it is determined that the host vehicle passes the time feasibility detection; when the remaining display duration is less than the target time interval, it is determined that the host vehicle fails to pass the time feasibility detection.
9. The method according to claim 1 or 2, characterized in that, The selecting N alternative vehicles for illegally entering the target intersection from the vehicles traveling on the at least one second road includes: Selecting the vehicle closest to the target intersection from the vehicles traveling towards the target intersection on the i-th second road as an alternative vehicle for illegally entering the target intersection, where the value of i is greater than 0 and less than or equal to the total number of second roads; Alternatively, selecting the vehicle closest to the target intersection from the vehicles traveling towards the target intersection on the i-th second road as a candidate vehicle; randomly generating a selection probability for the candidate vehicle, and determining the vehicle selection probability corresponding to the i-th second road; if the randomly generated selection probability is less than the vehicle selection probability, then using the candidate vehicle as an alternative vehicle for illegally entering the target intersection.
10. The method according to claim 1 or 2, characterized in that, The driving information of any vehicle includes the driving trajectory and driving state parameters of the corresponding vehicle; the determining a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle includes: Determining the intersection point of the driving trajectory of the host vehicle and the driving trajectory of the n-th alternative vehicle in the target intersection as the potential conflict point between the host vehicle and the n-th alternative vehicle, where n ∈ [1, N]; Estimate the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle; If the estimated time is within the collision time interval, determine the nth alternative vehicle as the target vehicle.
11. The method according to claim 10, wherein The driving state parameters include: the current driving speed, the current position, and the maximum acceleration allowed to be used; The estimating the time required for the nth alternative vehicle to reach the potential conflict point according to the driving state parameters of the nth alternative vehicle includes: Determine the target distance between the current position in the driving state parameters of the nth alternative vehicle and the potential conflict point; According to the current driving speed and the maximum acceleration in the driving state parameters of the nth alternative vehicle, estimate the distance traveled by the nth alternative vehicle during the acceleration phase when the nth alternative vehicle accelerates to the maximum driving speed; If the estimated distance is greater than or equal to the target distance, determine the time required for the nth alternative vehicle to reach the potential conflict point according to the target distance, the current driving speed, and the maximum acceleration; If the estimated distance is less than the target distance, determine the time required for the nth alternative vehicle to reach the potential conflict point according to the target distance, the current driving speed, the maximum acceleration, and the maximum driving speed reached by the nth alternative vehicle through acceleration.
12. The method according to claim 10, wherein There is a first stop line corresponding to the first road at the target intersection; the method further includes: Determine the reference duration, where the reference duration refers to the duration required for the host vehicle to travel from the current position to the first stop line, or the duration required for the host vehicle to travel from the current position to the potential conflict point; Obtain the time window width corresponding to the nth alternative vehicle, and generate a collision time interval according to the time window width and the reference duration.
13. The method according to claim 12, characterized in that, The number of the time window widths is 1, and the generating the collision time interval according to the time window width and the reference duration includes: Perform a difference operation on the reference duration and the time window width to obtain a first value; and perform a summation operation on the reference duration and the time window width to obtain a second value; If the first value is greater than or equal to the reference value, use the interval composed of the first value and the second value as the collision time interval; If the first value is less than the reference value, use the interval composed of the reference value and the second value as the collision time interval.
14. The method according to claim 1 or 2, characterized in that, Any second road includes an upstream road of the intersection and a downstream road of the intersection. The upstream road of the intersection refers to the road that supports vehicles to enter the target intersection, and the downstream road of the intersection refers to the road that the vehicle enters after driving out of the target intersection; Among them, before the target vehicle illegally enters the target intersection, the driving behavior of the target vehicle is controlled by a traffic flow model; after the target vehicle illegally enters the target intersection, the method includes: If it is detected that the target vehicle has reached the downstream road of the corresponding intersection, the traffic flow model is used to control the target vehicle to continue driving; If it is detected that the target vehicle has not reached the downstream road of the corresponding intersection and the driving speed of the target vehicle has reached the maximum driving speed, the target vehicle is controlled to drive at a constant speed according to the corresponding maximum driving speed; If it is detected that the target vehicle has not reached the downstream road of the corresponding intersection and the driving speed of the target vehicle has not reached the maximum driving speed, the target vehicle is controlled to accelerate.
15. A vehicle processing device, characterized in that, It includes: A control unit for controlling the host vehicle on the first road to drive towards the target intersection during the simulation process; The host vehicle is a vehicle equipped with a decision-making and planning algorithm, and the target intersection is formed by the intersection of the first road and at least one second road; when the host vehicle enters the target intersection, vehicles on each second road are specified to be prohibited from entering the target intersection; A processing unit for selecting N alternative vehicles for illegally entering the target intersection from the vehicles driving on the at least one second road during the process of the host vehicle driving towards the target intersection, where N is a positive integer; The processing unit is further configured to determine a target vehicle from the N alternative vehicles according to the driving information of the host vehicle and the driving information of each alternative vehicle; the target vehicle refers to an alternative vehicle that will collide with the host vehicle in the target intersection if it illegally enters the target intersection; The processing unit is further configured to randomly trigger the target vehicle to illegally enter the target intersection based on a preset triggering probability; wherein, after the host vehicle enters the target intersection, the behavior of the target vehicle illegally entering the target intersection is used to test the performance of the decision-making and planning algorithm.
16. A computer device, comprising an input interface and an output interface, characterized in that, It further includes: A processor suitable for implementing one or more instructions; And, A computer storage medium storing one or more instructions, the one or more instructions being suitable for being loaded and executed by the processor to perform the vehicle processing method according to any one of claims 1-14.
17. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions, the one or more instructions being suitable for being loaded and executed by the processor to perform the vehicle processing method according to any one of claims 1-14.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the vehicle processing method according to any one of claims 1-14.
Citation Information
Patent Citations
Vehicle testing method and device, computer equipment and storage medium
CN110864913A
Processing method and device of test scene, and computer program product
CN113867367A