Traffic environment simulation method and device and electronic equipment

By generating traffic flow and management pools in autonomous driving tests and combining micro and macro models to manage traffic participants, the problem of existing test scenarios not conforming to the actual traffic environment is solved, thus improving the accuracy of the tests.

CN115935501BActive Publication Date: 2026-08-04INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF SOFTWARE - CHINESE ACAD OF SCI
Filing Date
2022-11-08
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing autonomous driving test scenarios do not conform to real traffic environments, resulting in low test accuracy.

Method used

By generating traffic participants in the traffic flow, and combining the traffic flow management pool with the micro and macro models of the traffic participants, the state and behavior of the traffic participants are managed to simulate real traffic scenarios.

Benefits of technology

This improved the accuracy of autonomous driving tests, making them more closely resemble real-world traffic conditions and generating richer and more comprehensive test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115935501B_ABST
    Figure CN115935501B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a traffic environment simulation method, device and electronic equipment, and belongs to the technical field of automatic driving. The method comprises: acquiring an initial position of a to-be-tested vehicle on a map; generating a traffic flow in a region within a preset threshold distance from the initial position, the traffic flow comprising a vehicle traffic flow for generating a traffic participant vehicle and a pedestrian traffic flow for generating a traffic participant pedestrian; in a case where a state of a traffic participant in the traffic flow meets a preset change condition, sending first information related to the state of the traffic participant to a pre-set traffic flow management pool by the traffic participant, the traffic participant comprising the traffic participant vehicle and the traffic participant pedestrian; and managing the traffic participant based on the first information by the traffic flow management pool. The present disclosure can make the automatic driving test more consistent with the actual traffic situation by jointly managing the driving of the traffic participant in the map by the traffic flow, the traffic flow management pool and the traffic participant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of autonomous driving technology, and in particular to traffic environment simulation methods, devices and electronic devices. Background Technology

[0002] Autonomous driving technology can not only improve traffic safety and alleviate traffic congestion, but also increase road efficiency. To ensure the safety of autonomous vehicles, extensive testing of autonomous driving algorithms under different test scenarios is necessary on autonomous driving simulation platforms to examine their performance in various conditions. Therefore, selecting test scenarios that closely resemble real-world traffic environments is crucial for the simulation testing of autonomous driving algorithms.

[0003] In related technologies, there are two main test scenarios for autonomous driving testing of vehicles on urban roads. The first scenario involves only a few vehicles, and their operation is isolated. The second scenario uses a separate traffic flow model, where vehicles are positioned along a path on a map, and the model controls their movement. However, on actual urban roads, vehicle movement is not isolated. Different vehicles make different driving choices based on the status of other vehicles, and adjacent or connected paths are interconnected. Vehicles can move from one segment of a connected path to the next and change lanes between adjacent paths.

[0004] Therefore, none of the test scenarios mentioned above reflect actual traffic conditions, resulting in low accuracy in autonomous driving tests. Summary of the Invention

[0005] To overcome the problems existing in related technologies, this disclosure provides a traffic environment simulation method, apparatus and electronic equipment.

[0006] According to a first aspect of the present disclosure, a traffic environment simulation method is provided, comprising:

[0007] Obtain the initial position of the vehicle under test on the map;

[0008] Traffic flow is generated in an area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of the vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of the pedestrian traffic flow is determined in conjunction with the pedestrian area on the map.

[0009] When the status of a traffic participant in the traffic flow meets a preset change condition, the traffic participant sends first information to a pre-set traffic flow management pool. The first information is related to the status of the traffic participant, which includes the traffic participating vehicle and the traffic participating pedestrian.

[0010] The traffic flow management pool manages the traffic participants based on the first information.

[0011] As an optional embodiment, generating traffic flow in an area within a preset threshold distance from the initial position includes: determining a test area on the map based on the initial position, wherein the test area is within the area within the preset threshold distance from the initial position; setting vehicle generation points at vehicle entry positions on the vehicle traffic flow within the test area, and setting pedestrian generation points at pedestrian entry positions on the pedestrian traffic flow within the test area; generating the traffic-participating vehicles at the vehicle generation points, and generating the traffic-participating pedestrians at the pedestrian generation points.

[0012] As an optional embodiment, the traffic flow management pool includes a traffic flow successor management pool; the step of managing the traffic participants based on the first information through the traffic flow management pool includes: when a first traffic participant is detected at the end of a first traffic flow, transferring the first traffic participant from the first traffic flow to the traffic flow successor management pool for management; wherein, the first traffic flow has at least one successor traffic flow, and the successor traffic flow is another traffic flow connected to the end of the first traffic flow; the traffic flow successor management pool determines a target successor traffic flow for managing the first traffic participant from the at least one successor traffic flow according to the first information, and transfers the first traffic participant from the traffic flow successor management pool to the target successor traffic flow for management.

[0013] As an optional embodiment, the traffic flow management pool includes a traffic flow switching management pool; the step of managing the traffic participants based on the first information through the traffic flow management pool includes: when a second traffic participant is detected in the second traffic flow that needs to switch to an adjacent traffic flow, transferring the second traffic participant from the second traffic flow to the traffic flow switching management pool for management; determining, based on the first information, whether the second traffic participant can complete the traffic flow switching through the traffic flow switching management pool; if it is determined that the second traffic participant can complete the traffic flow switching, transferring the second traffic participant from the traffic flow switching management pool to the adjacent traffic flow for management through the traffic flow switching management pool; if it is determined that the second traffic participant cannot complete the traffic flow switching, transferring the second traffic participant from the traffic flow switching management pool to the second traffic flow for management through the traffic flow switching management pool.

[0014] As an optional embodiment, the traffic flow management pool includes a traffic flow anomaly management pool and a traffic flow switching management pool; the step of managing the traffic participants based on the first information through the traffic flow management pool includes: when a third traffic participant with an abnormal state is detected in the third traffic flow, transferring the third traffic participant from the third traffic flow to the traffic flow anomaly management pool for management; and performing a target management operation on the third traffic participant based on the first information through the traffic flow anomaly management pool, the target management operation including any one of the following: a traffic flow switching operation or a destruction operation; wherein, the first information includes the anomaly type of the third traffic participant, and the step of managing the traffic participants based on the first information through the traffic flow anomaly management pool includes: a traffic flow switching operation or a destruction operation; wherein, the first information includes the anomaly type of the third traffic participant, and the step of managing the traffic participants based on the first information includes: a traffic flow switching operation or a traffic flow switching ... The traffic flow anomaly management pool performs target management operations on the third traffic participant based on the first information, including: when the anomaly type of the third traffic participant is a first anomaly type, transferring the third traffic participant from the traffic flow anomaly management pool to the traffic flow switching management pool for management, wherein the first anomaly type is a type in which traffic flow switching can resolve the anomaly status of the third traffic participant; and when the anomaly type of the third traffic participant is a second anomaly type, destroying the third traffic participant on the map through the traffic flow anomaly management pool, wherein the second anomaly type is a type in which the anomaly status of the third traffic participant cannot be resolved.

[0015] As an optional embodiment, the method further includes: if congestion is detected in the fourth traffic flow, determining whether the duration of the congestion is greater than a first duration threshold; if the duration of the congestion is greater than the first duration threshold, destroying the traffic participants involved in the congestion.

[0016] As an optional embodiment, the method further includes: setting vehicle destruction points and pedestrian destruction points, wherein the vehicle destruction points are set at vehicle exit positions on the vehicle traffic flow within the test area, and the pedestrian destruction points are set at pedestrian exit positions on the pedestrian traffic flow within the test area; when a target traffic-participating vehicle passes through the vehicle destruction point in the vehicle traffic flow, determining a first destruction probability of the target traffic-participating vehicle based on a first distance between the target traffic-participating vehicle and the vehicle under test, and determining the display status of the target traffic-participating vehicle on the map based on the first destruction probability; when a target traffic-participating pedestrian passes through the pedestrian destruction point in the pedestrian traffic flow, determining a second destruction probability of the target traffic-participating pedestrian based on a second distance between the target traffic-participating pedestrian and the vehicle under test, and determining the display status of the target traffic-participating pedestrian on the map based on the second destruction probability.

[0017] As an optional embodiment, the method further includes: determining the traffic flow in front of the vehicle to be tested in the target vehicle traffic flow as the front traffic flow, and the target vehicle traffic flow being the vehicle traffic flow in which the vehicle to be tested is located; determining the traffic flow behind the vehicle to be tested and the vehicle to be tested in the target vehicle traffic flow as the rear traffic flow; and initializing the front traffic flow and the rear traffic flow.

[0018] According to a second aspect of the present disclosure, a traffic environment simulation device is provided, comprising:

[0019] The first module is used to obtain the initial position of the vehicle under test on the map;

[0020] The second module is used to generate traffic flow in an area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of the vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of the pedestrian traffic flow is determined in conjunction with the pedestrian area on the map.

[0021] The third module is used to send first information to a pre-set traffic flow management pool through the traffic participants when the status of the traffic participants in the traffic flow meets the preset change conditions. The first information is related to the status of the traffic participants, and the traffic participants include the traffic participating vehicles and the traffic participating pedestrians.

[0022] The fourth module is used to manage the traffic participants based on the first information through the traffic flow management pool.

[0023] As an optional embodiment, the second module is configured to: determine a test area on the map based on the initial position, wherein the test area is within a preset threshold distance from the initial position; set vehicle generation points at vehicle entry positions on the vehicle traffic flow within the test area, and set pedestrian generation points at pedestrian entry positions on the pedestrian traffic flow within the test area; generate the traffic-participating vehicles at the vehicle generation points, and generate the traffic-participating pedestrians at the pedestrian generation points.

[0024] As an optional embodiment, the traffic flow management pool includes a traffic flow successor management pool; the fourth module is configured to: when a first traffic participant is detected at the end of a first traffic flow, transfer the first traffic participant from the first traffic flow to the traffic flow successor management pool for management; wherein, the first traffic flow has at least one successor traffic flow, and the successor traffic flow is another traffic flow connected to the end of the first traffic flow; and, based on the first information, determine a target successor traffic flow for managing the first traffic participant from the at least one successor traffic flow through the traffic flow successor management pool, and transfer the first traffic participant from the traffic flow successor management pool to the target successor traffic flow for management.

[0025] As an optional embodiment, the traffic flow management pool includes a traffic flow switching management pool; the fourth module is configured to: when a second traffic participant is detected in the second traffic flow that needs to switch to an adjacent traffic flow, transfer the second traffic participant from the second traffic flow to the traffic flow switching management pool for management; determine, based on the first information, whether the second traffic participant can complete the traffic flow switching through the traffic flow switching management pool; if it is determined that the second traffic participant can complete the traffic flow switching, transfer the second traffic participant from the traffic flow switching management pool to the adjacent traffic flow for management through the traffic flow switching management pool; if it is determined that the second traffic participant cannot complete the traffic flow switching, transfer the second traffic participant from the traffic flow switching management pool to the second traffic flow for management through the traffic flow switching management pool.

[0026] As an optional embodiment, the traffic flow management pool includes a traffic flow anomaly management pool and a traffic flow switching management pool; the fourth module is configured to: when a third traffic participant with an abnormal state is detected in the third traffic flow, transfer the third traffic participant from the third traffic flow to the traffic flow anomaly management pool for management; and, based on the first information, perform a target management operation on the third traffic participant through the traffic flow anomaly management pool, wherein the target management operation includes any one of the following: a traffic flow switching operation or a destruction operation; wherein the first information includes the anomaly type of the third traffic participant, and the traffic flow anomaly management pool performs a target management operation on the third traffic participant based on the first information, wherein the target management operation includes any one of the following: a traffic flow switching operation or a destruction operation; wherein the first information includes the anomaly type of the third traffic participant, and the traffic flow anomaly management pool performs a target management operation on the third traffic participant based on the first information. The first information involves performing target management operations on the third traffic participant, including: if the anomaly type of the third traffic participant is a first anomaly type, transferring the third traffic participant from the traffic flow anomaly management pool to the traffic flow switching management pool for management, wherein the first anomaly type is one in which traffic flow switching can resolve the anomaly status of the third traffic participant; and if the anomaly type of the third traffic participant is a second anomaly type, destroying the third traffic participant on the map through the traffic flow anomaly management pool, wherein the second anomaly type is one in which the anomaly status of the third traffic participant cannot be resolved.

[0027] As an optional embodiment, the traffic environment simulation device further includes a fifth module, used for: determining whether the duration of the congestion is greater than a first duration threshold when congestion is detected in the fourth traffic flow; and destroying the traffic participants involved in the congestion when the duration of the congestion is greater than the first duration threshold.

[0028] As an optional embodiment, the traffic environment simulation device further includes a sixth module, used for: setting vehicle destruction points and pedestrian destruction points, wherein the vehicle destruction points are set at the vehicle exit positions on the vehicle traffic flow within the test area, and the pedestrian destruction points are set at the pedestrian exit positions on the pedestrian traffic flow within the test area; when a target traffic-participating vehicle passes through the vehicle destruction point in the vehicle traffic flow, determining a first destruction probability of the target traffic-participating vehicle based on a first distance between the target traffic-participating vehicle and the vehicle under test, and determining the display status of the target traffic-participating vehicle on the map based on the first destruction probability; when a target traffic-participating pedestrian passes through the pedestrian destruction point in the pedestrian traffic flow, determining a second destruction probability of the target traffic-participating pedestrian based on a second distance between the target traffic-participating pedestrian and the vehicle under test, and determining the display status of the target traffic-participating pedestrian on the map based on the second destruction probability.

[0029] As an optional embodiment, the traffic environment simulation device further includes a seventh module, used for: determining the traffic flow in front of the vehicle under test in the target vehicle traffic flow as the front traffic flow, and the target vehicle traffic flow being the traffic flow in which the vehicle under test is located; determining the traffic flow behind the vehicle under test and the vehicle under test in the target vehicle traffic flow as the rear traffic flow; and initializing the front traffic flow and the rear traffic flow.

[0030] According to a third aspect of the present disclosure, a computer program product is provided, which stores an instruction set that is executed by the computer program product to implement the traffic environment simulation method provided in the first aspect of the present disclosure.

[0031] According to a fourth aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the traffic environment simulation method provided in the first aspect of the present disclosure.

[0032] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the traffic environment simulation method provided in the first aspect of the present disclosure.

[0033] The technical solutions provided in this disclosure have at least the following beneficial effects:

[0034] By utilizing traffic flow, traffic flow management pool, and traffic participants to jointly manage the movement of traffic participants on the map, the simulation of the traffic environment becomes more realistic and flexible. This helps generate test scenarios with richer and more comprehensive traffic participant behaviors, enabling autonomous driving tests to more realistically simulate the traffic participant behaviors that may occur in actual traffic scenarios and to better reflect real traffic conditions, thereby improving the accuracy of autonomous driving tests.

[0035] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0037] Figure 1 This is a flowchart illustrating a traffic environment simulation method according to an exemplary embodiment.

[0038] Figure 2 This is a flowchart illustrating a traffic flow generation method according to an exemplary embodiment.

[0039] Figure 3 This is a flowchart illustrating a method for managing traffic participants according to an exemplary embodiment.

[0040] Figure 4 This is a flowchart illustrating a method for managing traffic participants according to another exemplary embodiment.

[0041] Figure 5 This is a flowchart illustrating a method for managing traffic participants according to yet another exemplary embodiment.

[0042] Figure 6 This is a block diagram illustrating a traffic environment simulation device according to an exemplary embodiment.

[0043] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0044] The exemplary embodiments will now be described in detail with reference to the accompanying drawings.

[0045] It should be noted that the relevant embodiments and accompanying drawings are only for describing and illustrating exemplary embodiments provided by this disclosure, and not all embodiments of this disclosure, nor should this disclosure be understood to be limited to the relevant exemplary embodiments.

[0046] It should be noted that the terms "first," "second," etc., used in this disclosure are only used to distinguish different steps, devices, or modules. These terms do not represent any specific technical meaning, nor do they indicate any order or interdependence between them.

[0047] It should be noted that the term "at least one" as used in this disclosure is illustrative rather than restrictive. Unless otherwise expressly indicated in the context, it should be understood as "one or more".

[0048] It should be noted that the term "and / or" used in this disclosure is used to describe the relationship between related objects, and generally indicates that there are at least three relationships. For example, A and / or B can at least indicate: the existence of A alone, the existence of both A and B, and the existence of B alone.

[0049] It should be noted that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of this disclosure is not limited by the order in which the steps are described in the relevant embodiments.

[0050] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.

[0051] Exemplary methods

[0052] Figure 1 This is a flowchart illustrating a traffic environment simulation method according to an exemplary embodiment, such as... Figure 1 As shown, the traffic environment simulation method is used in traffic environment simulation and autonomous driving testing, and includes the following steps.

[0053] In step S110, the initial position of the vehicle under test on the map is obtained.

[0054] In this embodiment, the map can be a high-precision map of urban roads, displaying lane lines, intersection connectors, and roadside parking areas. The test vehicle is the vehicle to be tested for autonomous driving, displayed on the map for the test. This test vehicle can be generated on a road on the map or in a roadside parking area. The initial position of the test vehicle on the map can be pre-set according to the testing requirements.

[0055] In step S120, traffic flow is generated in the area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of pedestrian traffic flow is determined in conjunction with the pedestrian area on the map.

[0056] In this embodiment, after determining the initial position of the vehicle under test, traffic flow can be generated at a location within a preset threshold distance from the initial position of the vehicle under test. That is, the distance between the traffic flow generation location and the initial position of the vehicle under test is less than or equal to the preset threshold, which can be set in advance by the tester. For example, the preset threshold can be 5 km, meaning that traffic flow is generated within a 5 km straight-line distance from the initial position of the vehicle under test.

[0057] Traffic flow is used to display traffic participants on a map and manage their movement within the flow. Traffic flow can be divided into vehicular traffic flow and pedestrian traffic flow. Vehicular traffic flow generates participating vehicles, while pedestrian traffic flow generates participating pedestrians. Specifically, the generation location of vehicular traffic flow is determined by the initial position of the vehicles to be tested, a preset threshold, and the vehicle travel area on the map. The generation location of pedestrian traffic flow is determined by the initial position of the vehicles to be tested, a preset threshold, and the pedestrian area on the map. The vehicle travel area includes roads and / or intersections; the pedestrian area includes crosswalks and / or sidewalks. For example, a vehicular traffic flow can be set up on each lane and roadside parking area between two adjacent intersections; and pedestrian traffic flows can be set up on crosswalks and sidewalks.

[0058] In step S130, when the status of traffic participants in the traffic flow meets the preset change conditions, the traffic participants send first information to the pre-set traffic flow management pool. The first information is related to the status of the traffic participants, which includes traffic participating vehicles and traffic participating pedestrians.

[0059] In this embodiment, not only is there a traffic flow used to manage the operation of traffic participants, but there is also a pre-set traffic flow management pool used to manage the operation of traffic participants. Furthermore, traffic participants themselves can also manage their own operation. The traffic flow and traffic flow management pool calculate the operating trajectories of batches of traffic participants using a macroscopic model, and manage, record, and track these participants. Each traffic participant also has a corresponding microscopic model, which it uses to determine its own state and driving intention. In this way, the combination of macroscopic and microscopic models can determine the driving trajectory of traffic participants, making traffic decisions more realistic and reliable.

[0060] Optionally, when a traffic participant is driving normally in a traffic flow, the traffic participant is managed by the macro model of the traffic flow and the micro model of the traffic participant; when a traffic participant experiences an anomaly or needs to switch traffic flows, the traffic participant is managed by the macro model of the traffic flow management pool and the micro model of the traffic participant.

[0061] In this embodiment, when a traffic participant determines through a microscopic model that its state meets preset change conditions, the traffic participant sends first information related to that state to a pre-set traffic flow management pool, which then further manages the traffic participant. The preset change conditions may include the traffic participant reaching the end of a traffic flow normally, the traffic participant experiencing an anomaly, or the traffic participant intending to switch to an adjacent traffic flow. The first information may include the traffic participant's driving state or driving intention.

[0062] In step S140, traffic participants are managed based on the first information through the traffic flow management pool.

[0063] In this embodiment, after the traffic flow management pool receives the first information related to the status of a certain traffic participant, it can manage the traffic participant based on the situation on the map and the status of the traffic participant.

[0064] Optionally, the first information includes the travel intention of a traffic participant to switch to an adjacent traffic flow. In this case, the traffic flow management pool can determine whether the traffic participant can switch traffic flows based on the status of the adjacent traffic flows on the map. If the adjacent traffic flow is relatively wide (e.g., there are fewer traffic participants in the adjacent traffic flow), the traffic flow management pool can manage the traffic participant corresponding to the first information to change lanes; if the adjacent traffic flow is relatively congested (e.g., there are more traffic participants in the adjacent traffic flow), the traffic flow management pool can manage the traffic participant corresponding to the first information to maintain its original traffic flow.

[0065] This disclosure utilizes traffic flow, a traffic flow management pool, and traffic participants to jointly manage the movement of traffic participants on a map, making the simulation of the traffic environment more realistic and flexible. This helps generate test scenarios with richer and more comprehensive traffic participant behaviors, enabling autonomous driving tests to more realistically simulate the traffic participant behaviors that may occur in actual traffic scenarios and to better reflect real traffic conditions, thereby improving the accuracy of autonomous driving tests.

[0066] As an optional embodiment, such as Figure 2 As shown, generating traffic flow in an area within a preset threshold distance from the initial position can include the following steps.

[0067] In step S210, the test area is determined on the map based on the initial location.

[0068] In this embodiment, the test area refers to the area managed by the traffic flow and traffic flow management pool through model calculation. The test area is determined based on the initial position of the vehicle under test. For example, the area whose straight-line distance from the initial position of the vehicle under test is less than or equal to a certain constant (such as 1 km) can be used as the test area. This constant can be less than or equal to the aforementioned preset threshold, that is, the test area is within the area within the preset threshold distance from the initial position.

[0069] In step S220, a vehicle generation point is set at the vehicle entry position on the vehicle traffic flow within the test area, and a pedestrian generation point is set at the pedestrian entry position on the pedestrian traffic flow within the test area.

[0070] After determining the test area, pedestrian and vehicle generation points are set within the test area.

[0071] Vehicle generation points can be set at the entry points of vehicles in the traffic flow within the test area. For example, the middle position on the road after a vehicle enters from a service area, park, or parking lot can be set as the vehicle generation point. Vehicle generation points can generate traffic-participating vehicles with a defined direction of travel. These traffic-participating vehicles enter the road and can form the traffic-participating vehicles in the traffic flow.

[0072] Similarly, pedestrian generation points can be set at pedestrian entry points in the pedestrian traffic flow within the test area. For example, the middle position on the sidewalk after entering from the park or service area can be set as a pedestrian generation point. Pedestrian generation points can generate traffic-participating pedestrians, who, upon entering the sidewalk, can form the traffic-participating pedestrians in the pedestrian traffic flow.

[0073] In step S230, traffic-participating vehicles are generated at the vehicle generation point, and traffic-participating pedestrians are generated at the pedestrian generation point.

[0074] Traffic participants and vehicles are generated at pedestrian and vehicle generation points respectively to simulate real-world scenarios where pedestrians and vehicles enter the road from service areas, parks, or parking lots outside the road.

[0075] This disclosure generates vehicle and pedestrian generation points only within the test area surrounding the vehicle under test. This minimizes computational load and reduces testing costs without affecting the accuracy of autonomous driving testing. Furthermore, unlike related technologies where one vehicle or pedestrian generation point is bound to one traffic flow, this embodiment allows for multiple vehicle and pedestrian generation points, which are placed in the middle of the traffic flow and not bound to any specific traffic flow. This makes the vehicle and pedestrian generation process more realistic and flexible.

[0076] As an optional embodiment, such as Figure 3 As shown, the traffic flow management pool includes a traffic flow follow-up management pool; the above-mentioned management of traffic participants based on the first information through the traffic flow management pool may include the following steps.

[0077] In step S310, if a first traffic participant is detected at the end of the first traffic flow, the first traffic participant is transferred from the first traffic flow to the traffic flow successor management pool for management.

[0078] In this embodiment, the first traffic flow has at least one subsequent traffic flow, which is another traffic flow connected to the end of the first traffic flow. When a first traffic participant in the first traffic flow reaches the end of the first traffic flow, the first traffic participant cannot continue in the first traffic flow and needs to be transferred to a subsequent traffic flow connected to the end of the first traffic flow. The process of transferring the first traffic participant is managed by the traffic flow successor management pool. Therefore, when the first traffic flow detects that there is a first traffic participant at its end, the first traffic participant is first transferred to the traffic flow successor management pool for management.

[0079] In step S320, the traffic flow successor management pool determines the target successor traffic flow for managing the first traffic participant from at least one successor traffic flow based on the first information, and transfers the first traffic participant from the traffic flow successor management pool to the target successor traffic flow for management.

[0080] In this embodiment, the first traffic flow has at least one subsequent traffic flow. If the first traffic flow has only one subsequent traffic flow, the traffic flow succession management pool can directly identify that subsequent traffic flow as the target succession traffic flow and record it. If the first traffic flow has at least two subsequent traffic flows, the traffic flow succession management pool can determine and record the target succession traffic flow for managing the first traffic participant from the at least two subsequent traffic flows based on the driving status and driving intention of the first traffic participant in the first information, as well as the road environment of each subsequent traffic flow. Then, the traffic flow succession management pool determines the time when the first traffic participant enters the target succession traffic flow based on the driving status of the first traffic participant in the received first information and the road environment of the target succession traffic flow. After the first traffic participant enters the target succession traffic flow, the first traffic participant is transferred from the traffic flow succession management pool to the target succession traffic flow for management. Optionally, if the first traffic flow does not have a subsequent traffic flow, the traffic flow succession management pool can destroy the first traffic participant.

[0081] In this embodiment, the traffic flow successor management pool manages the driving of traffic participants at the connection points of the traffic flow based on the first information generated by the traffic participants. The traffic flow successor management pool is a macro model, and the traffic participants are micro models. By combining the macro model and the micro model to control the driving of traffic participants at the connection points, the road selection of traffic participants can be made more in line with the real environment, thereby ensuring the accuracy of autonomous driving tests.

[0082] As an optional embodiment, such as Figure 4 As shown, the traffic flow management pool includes a traffic flow switching management pool; the above-mentioned management of traffic participants based on the first information through the traffic flow management pool may include the following steps.

[0083] In step S410, if it is detected that there is a second traffic participant in the second traffic flow that needs to be switched to an adjacent traffic flow, the second traffic participant is transferred from the second traffic flow to the traffic flow switching management pool for management.

[0084] In this embodiment, the traffic flow switching management pool is used to manage the traffic flow switching of traffic participants. When a second traffic participant is traveling in the second traffic flow, it can determine whether there is an intention to switch to an adjacent traffic flow based on its surrounding environment and obstacles. If there is an intention to switch to an adjacent traffic flow, the second traffic participant can send first information including this intention to the traffic flow switching management pool, and the second traffic flow first transfers the second traffic participant from the second traffic flow to the traffic flow switching management pool for management.

[0085] In step S420, the traffic flow switching management pool determines whether the second traffic participant can complete the traffic flow switching based on the first information.

[0086] The traffic flow switching management pool will determine whether the second traffic participant can complete the traffic flow switching based on the driving intention of the second traffic participant in the first information, as well as the road conditions of the second traffic flow and adjacent traffic flows.

[0087] In step S430, if it is determined that the second traffic participant can complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the adjacent traffic flow for management through the traffic flow switch management pool; if it is determined that the second traffic participant cannot complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the second traffic flow for management through the traffic flow switch management pool.

[0088] For example, the second traffic participant is a vehicle. When this vehicle detects that the vehicle in front is moving slowly and there is space in the right lane, it generates a lane change intention to the right lane and sends this intention to the traffic flow switching management pool via the first information. At this time, the vehicle is transferred from the second traffic flow to the traffic flow switching management pool for management. After receiving the first information, the traffic flow switching management pool can determine whether the vehicle can complete the lane change based on the overall operation of the second traffic flow and the adjacent traffic flow to its right. If the second traffic flow is congested while the adjacent traffic flow is moving normally, then the vehicle can change lanes, and the traffic flow switching management pool can transfer the vehicle from the traffic flow switching management pool to the adjacent traffic flow for management. If the second traffic flow is moving normally, only the vehicle in front of the vehicle is moving slowly, but the adjacent traffic flow is congested, then the vehicle cannot change lanes, and the traffic flow switching management pool can transfer the vehicle from the traffic flow switching management pool back to the original second traffic flow for management.

[0089] In this embodiment, the traffic flow switching management pool manages traffic participants with lane-changing intentions based on the first information generated by the traffic participants. The traffic flow switching management pool is a macro model, and the traffic participants are micro models. By combining the macro model and the micro model to control the traffic flow switching of traffic participants, the road selection of traffic participants can be made more in line with the real environment, thereby ensuring the accuracy of autonomous driving tests.

[0090] As an optional embodiment, such as Figure 5 As shown, the traffic flow management pool includes a traffic flow anomaly management pool and a traffic flow switching management pool; the above-mentioned management of traffic participants based on the first information through the traffic flow management pool may include the following steps.

[0091] In step S510, if a third traffic participant with an abnormal state is detected in the third traffic flow, the third traffic participant is transferred from the third traffic flow to the traffic flow abnormality management pool for management.

[0092] In step S520, the traffic flow anomaly management pool performs target management operations on the third traffic participant based on the first information. The target management operations include any one of the following: traffic flow switching operation or destruction operation.

[0093] In this embodiment, the traffic flow anomaly management pool is used to manage traffic participants with abnormal states. Abnormal states of traffic participants include at least one of the following: collision, sudden acceleration, sudden deceleration, abrupt stop, S-shaped driving, and running a red light; abnormal states of traffic participants include at least one of the following: collision, running a red light, and crossing the road at a non-pedestrian crossing. By managing traffic participants through the traffic flow anomaly management pool, anomalies can be addressed promptly, ensuring that traffic flow does not stop due to abnormal states of traffic participants.

[0094] When an abnormal status is detected in a third traffic participant in the third traffic flow, the third traffic participant can be directly transferred to the traffic flow anomaly management pool for management. The traffic flow anomaly management pool then determines the target management operation for the third traffic participant based on the status of the third traffic participant in the first information.

[0095] Optionally, the first information includes the anomaly type of the third traffic participant. Step S520 includes: if the anomaly type of the third traffic participant is the first anomaly type, transferring the third traffic participant from the traffic flow anomaly management pool to the traffic flow switching management pool for management; if the anomaly type of the third traffic participant is the second anomaly type, destroying the third traffic participant on the map through the traffic flow anomaly management pool. The first anomaly type is one where traffic flow switching can resolve the anomaly state of the third traffic participant, such as a sudden stop or deceleration due to road congestion or a traffic accident; the second anomaly type is one where the anomaly state of the third traffic participant cannot be resolved, such as a collision or vehicle malfunction causing inability to operate normally.

[0096] For example, if the third traffic participant is a traffic-participating vehicle, and the traffic flow anomaly management pool detects that the traffic-participating vehicle suddenly decelerates or stops due to a collision in the lane in front of it, the anomaly type of the third traffic participant can be determined as the first anomaly type. The abnormal state of the traffic-participating vehicle can be resolved by traffic flow switching, that is, the traffic-participating vehicle can be transferred to the traffic flow switching management pool for management. If the traffic flow anomaly management pool detects that the abnormal state of the traffic-participating vehicle is caused by a collision, and the traffic-participating vehicle that was involved in the collision cannot operate normally, the anomaly type of the third traffic participant can be determined as the second anomaly type, and the traffic-participating vehicle can be destroyed.

[0097] In this embodiment, the traffic flow anomaly management pool manages traffic participants with abnormal states based on the first information generated by the traffic participants. The traffic flow anomaly management pool is a macro model, and the traffic participants are micro models. By combining the macro model and the micro model to control traffic participants with abnormal states, the road environment can be made more realistic, thereby ensuring the accuracy of autonomous driving tests.

[0098] In addition, as an optional embodiment, in order to make the autonomous driving test environment more closely resemble the real environment, traffic lights on the map can be controlled, and the rotation mechanism and lighting cycle of red, green and yellow lights in the traffic lights can be designed. By controlling the traffic lights, the operation of traffic participants in the traffic flow can be controlled, so that the road environment is more closely resembles the real environment.

[0099] Furthermore, the traffic light anomaly management pool can include traffic lights that are malfunctioning, control them to return to normal, and manage their restoration. Traffic light anomalies can include flashing, inability to switch between red, yellow, and blue lights, or lights not illuminating. The traffic light anomaly management pool can also determine whether to set abnormal traffic light states based on user testing needs. For example, if testing autonomous driving under abnormal traffic light conditions is required, the traffic lights around the vehicle under test can be included in the pool, which then controls the type and duration of the anomaly, thus making the road environment more realistic.

[0100] As an optional embodiment, the method further includes: if congestion is detected in the fourth traffic flow, determining whether the duration of the congestion is greater than a first duration threshold; if the duration of the congestion is greater than the first duration threshold, destroying the traffic participants involved in the congestion.

[0101] In this embodiment, besides road congestion caused by abnormal traffic participants, traffic light malfunctions or an excessive number of traffic participants in a particular traffic flow can also cause congestion. To address the issue of tests being unable to proceed normally due to traffic congestion, real-time monitoring of traffic congestion is necessary. If the duration of congestion exceeds a first duration threshold, all traffic participants in the congestion are destroyed to ensure the normal operation of the traffic flow. Optionally, if the number of traffic participants in a certain section of the traffic flow exceeds a preset threshold, it can be determined that congestion exists in that traffic flow.

[0102] For example, the first duration threshold is 10 minutes, and the fourth traffic flow is vehicle traffic flow. If more than 50 vehicles participate in a certain segment of the fourth traffic flow, it can be determined that the fourth traffic flow is congested. If the duration of the congestion in the fourth traffic flow exceeds 10 minutes, it can be determined that the 50 vehicles participating in the congestion are affecting the normal operation of the test, and these 50 vehicles need to be destroyed.

[0103] Optionally, in this embodiment, congestion monitoring and destruction operations can be performed through a traffic flow management pool. For example, the traffic flow management pool can monitor the congestion status of all traffic flows, and destroy all traffic participants involved in the congestion if the duration of a certain congestion exceeds a first duration threshold. Alternatively, each traffic flow can monitor its own congestion and perform destruction operations. For example, each traffic flow can monitor its own congestion status, and destroy all traffic participants involved in the congestion within its own traffic flow if the duration of its own congestion exceeds a first duration threshold.

[0104] This embodiment avoids disrupting traffic flow due to congestion by destroying traffic participants that have been in congestion for a long time.

[0105] As an optional embodiment, the method further includes: setting vehicle destruction points and pedestrian destruction points, wherein the vehicle destruction points are set at the vehicle exit positions on the vehicle traffic flow within the test area, and the pedestrian destruction points are set at the pedestrian exit positions on the pedestrian traffic flow within the test area; when a target traffic-participating vehicle passes through a vehicle destruction point in the vehicle traffic flow, a first destruction probability of the target traffic-participating vehicle is determined based on a first distance between the target traffic-participating vehicle and the vehicle to be tested, and the display status of the target traffic-participating vehicle on the map is determined based on the first destruction probability; when a target traffic-participating pedestrian passes through a pedestrian destruction point in the pedestrian traffic flow, a second destruction probability of the target traffic-participating pedestrian is determined based on a second distance between the target traffic-participating pedestrian and the vehicle to be tested, and the display status of the target traffic-participating pedestrian on the map is determined based on the second destruction probability.

[0106] In this embodiment, vehicle disposal points and pedestrian disposal points can be set up along the roadside. Vehicle disposal points can be located at vehicle exit points on the vehicle traffic flow within the test area, and pedestrian disposal points can be located at pedestrian exit points on the pedestrian traffic flow within the test area. Optionally, the middle position on the road when a vehicle leaves the service area, park, or parking lot can be set as a vehicle disposal point. This point can dispose of vehicles that have passed through it, reducing the number of vehicles in the vehicle traffic flow. Similarly, pedestrian disposal points can be set up at the connection points between the roadside area and the pedestrian traffic flow within the test area. For example, the middle position on the sidewalk when pedestrians leave the park or service area can be set as a pedestrian disposal point. This point can dispose of pedestrians, reducing the number of pedestrians in the pedestrian traffic flow. This embodiment, by disposing of both pedestrians and vehicles at the pedestrian disposal points and vehicle disposal points respectively, can simulate real-world scenarios where pedestrians and vehicles enter service areas, parks, or parking lots outside the road.

[0107] Furthermore, in this embodiment, whenever a traffic participant vehicle passes through a vehicle destruction point (the traffic participant vehicle being the target traffic participant vehicle), a first destruction probability of the target traffic participant vehicle is calculated based on a first distance between the target traffic participant vehicle and the vehicle to be tested, and the target traffic participant vehicle is destroyed according to the first destruction probability. Optionally, if the first distance between the target traffic participant vehicle and the vehicle to be tested is greater than 10km, the first destruction probability is set to 1; if the first distance is greater than 7.5km and less than or equal to 10km, the first destruction probability is set to 0.75; if the first distance is greater than 5km and less than or equal to 7.5km, the first destruction probability is set to 0.5; if the first distance is greater than 2.5km and less than or equal to 5km, the first destruction probability is set to 0.25; if the first distance is less than or equal to 2.5km, the first destruction probability is set to 0. Optionally, target traffic participant vehicles with a first destruction probability greater than 0.7 can be destroyed, while target traffic participant vehicles with a first destruction probability less than or equal to 0.7 can be retained.

[0108] Similarly, in this embodiment, whenever a pedestrian (the target pedestrian) passes through a pedestrian destruction point, a second destruction probability of the target pedestrian is calculated based on the second distance between the target pedestrian and the vehicle under test, and the target pedestrian is destroyed according to the second destruction probability. Optionally, if the second distance between the target pedestrian and the vehicle under test is greater than 5km, the second destruction probability is set to 1; if the second distance is greater than 2.5km and less than or equal to 5km, the second destruction probability is set to 0.5; if the second distance is less than or equal to 2.5km, the second destruction probability is set to 0. Optionally, target pedestrians with a second destruction probability of 1 can be destroyed, and half of the target pedestrians with a second destruction probability of 0.5 can be randomly destroyed, while all target pedestrians with a second destruction probability of 0 can be retained.

[0109] As an optional embodiment, the method further includes: determining the traffic flow in front of the vehicle to be tested in the target vehicle traffic flow as the front traffic flow, and the target vehicle traffic flow as the vehicle traffic flow in which the vehicle to be tested is located; determining the traffic flow behind the vehicle to be tested and the vehicle to be tested in the target vehicle traffic flow as the rear traffic flow; and initializing the front traffic flow and the rear traffic flow.

[0110] In this embodiment, before conducting autonomous driving tests using a simulated traffic environment, the initial position of the vehicle to be tested can be determined on a map first. Then, the vehicle driving area on the map is determined as the vehicle traffic flow. The vehicle driving area includes at least the lane lines of the road, the lane lines of the intersection, and the roadside parking area. The pedestrian area on the map is determined as the pedestrian traffic flow. The pedestrian area includes at least the sidewalk and the crosswalk.

[0111] After determining the vehicle traffic flow and pedestrian traffic flow, vehicles and pedestrians on the map are placed into the vehicle traffic flow and pedestrian traffic flow, respectively. The target vehicle traffic flow containing the vehicle to be tested is then determined. The traffic flow in front of the vehicle in the target vehicle traffic flow is defined as the front traffic flow, and the traffic flow behind the vehicle and the vehicle itself are defined as the rear traffic flow. The front and rear traffic flows are then initialized.

[0112] Optionally, the method for initializing the traffic flow in front of and behind vehicles includes setting the initial speeds of vehicles participating in the traffic flow in front of and behind vehicles, as well as the initial speed of the vehicle to be tested. Additionally, the initial speeds of other vehicles and pedestrians participating in the traffic flow can be set, and the initial state of the traffic lights can be set, including the current state of the traffic lights and the remaining time. Simultaneously, the traffic flow management pool can also be initialized.

[0113] Exemplary device

[0114] Figure 6 This is a block diagram illustrating a traffic environment simulation device 600 according to an exemplary embodiment. (Refer to...) Figure 6 The device 600 includes a first module 610, a second module 620, a third module 630, and a fourth module 640.

[0115] The first module 610 is used to obtain the initial position of the vehicle under test on the map.

[0116] The second module 620 is used to generate traffic flow in an area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of the vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of the pedestrian traffic flow is determined in conjunction with the pedestrian area on the map.

[0117] The third module 630 is used to send first information to a pre-set traffic flow management pool through the traffic participants when the status of the traffic participants in the traffic flow meets the preset change conditions. The first information is related to the status of the traffic participants, and the traffic participants include the traffic participating vehicles and the traffic participating pedestrians.

[0118] The fourth module 640 is used to manage the traffic participants based on the first information through the traffic flow management pool.

[0119] As an optional embodiment, the second module 620 is configured to: determine a test area on the map based on the initial position, wherein the test area is within a preset threshold distance from the initial position; set vehicle generation points at vehicle entry positions on the vehicle traffic flow within the test area, and set pedestrian generation points at pedestrian entry positions on the pedestrian traffic flow within the test area; generate the traffic-participating vehicles at the vehicle generation points, and generate the traffic-participating pedestrians at the pedestrian generation points.

[0120] As an optional embodiment, the traffic flow management pool includes a traffic flow successor management pool; the fourth module 640 is configured to: when a first traffic participant is detected at the end of a first traffic flow, transfer the first traffic participant from the first traffic flow to the traffic flow successor management pool for management; wherein, the first traffic flow has at least one successor traffic flow, and the successor traffic flow is another traffic flow connected to the end of the first traffic flow; and, based on the first information, determine a target successor traffic flow for managing the first traffic participant from the at least one successor traffic flow through the traffic flow successor management pool, and transfer the first traffic participant from the traffic flow successor management pool to the target successor traffic flow for management.

[0121] As an optional embodiment, the traffic flow management pool includes a traffic flow switching management pool; the fourth module 640 is configured to: when a second traffic participant is detected in the second traffic flow that needs to switch to an adjacent traffic flow, transfer the second traffic participant from the second traffic flow to the traffic flow switching management pool for management; determine, based on the first information, whether the second traffic participant can complete the traffic flow switching through the traffic flow switching management pool; if it is determined that the second traffic participant can complete the traffic flow switching, transfer the second traffic participant from the traffic flow switching management pool to the adjacent traffic flow for management through the traffic flow switching management pool; if it is determined that the second traffic participant cannot complete the traffic flow switching, transfer the second traffic participant from the traffic flow switching management pool to the second traffic flow for management through the traffic flow switching management pool.

[0122] As an optional embodiment, the traffic flow management pool includes a traffic flow anomaly management pool and a traffic flow switching management pool; the fourth module 640 is configured to: when a third traffic participant with an abnormal state is detected in the third traffic flow, transfer the third traffic participant from the third traffic flow to the traffic flow anomaly management pool for management; and, based on the first information, perform a target management operation on the third traffic participant through the traffic flow anomaly management pool, wherein the target management operation includes any one of the following: a traffic flow switching operation or a destruction operation; wherein the first information includes the anomaly type of the third traffic participant, and the traffic flow anomaly management pool... Based on the first information, a target management operation is performed on the third traffic participant, including: if the anomaly type of the third traffic participant is a first anomaly type, transferring the third traffic participant from the traffic flow anomaly management pool to the traffic flow switching management pool for management, wherein the first anomaly type is one in which traffic flow switching can resolve the anomaly state of the third traffic participant; if the anomaly type of the third traffic participant is a second anomaly type, destroying the third traffic participant on the map through the traffic flow anomaly management pool, wherein the second anomaly type is one in which the anomaly state of the third traffic participant cannot be resolved.

[0123] As an optional embodiment, the traffic environment simulation device further includes a fifth module, used for: determining whether the duration of the congestion is greater than a first duration threshold when congestion is detected in the fourth traffic flow; and destroying the traffic participants involved in the congestion when the duration of the congestion is greater than the first duration threshold.

[0124] As an optional embodiment, the traffic environment simulation device further includes a sixth module, used for: setting vehicle destruction points and pedestrian destruction points, wherein the vehicle destruction points are set at the vehicle exit positions on the vehicle traffic flow within the test area, and the pedestrian destruction points are set at the pedestrian exit positions on the pedestrian traffic flow within the test area; when a target traffic-participating vehicle passes through the vehicle destruction point in the vehicle traffic flow, determining a first destruction probability of the target traffic-participating vehicle based on a first distance between the target traffic-participating vehicle and the vehicle under test, and determining the display status of the target traffic-participating vehicle on the map based on the first destruction probability; when a target traffic-participating pedestrian passes through the pedestrian destruction point in the pedestrian traffic flow, determining a second destruction probability of the target traffic-participating pedestrian based on a second distance between the target traffic-participating pedestrian and the vehicle under test, and determining the display status of the target traffic-participating pedestrian on the map based on the second destruction probability.

[0125] As an optional embodiment, the traffic environment simulation device further includes a seventh module, used for: determining the traffic flow in front of the vehicle under test in the target vehicle traffic flow as the front traffic flow, and the target vehicle traffic flow being the traffic flow in which the vehicle under test is located; determining the traffic flow behind the vehicle under test and the vehicle under test in the target vehicle traffic flow as the rear traffic flow; and initializing the front traffic flow and the rear traffic flow.

[0126] The traffic environment simulation device provided in this embodiment of the invention can implement the steps in the above method embodiments, and will not be repeated here to avoid repetition.

[0127] Exemplary electronic devices

[0128] Figure 7 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. The electronic device 700 may be a computer device, a laptop computer, a server, a vehicle controller, an in-vehicle terminal, an in-vehicle computer, or other types of electronic devices.

[0129] Reference Figure 7 The electronic device 700 may include at least one processor 710 and a memory 720. The processor 710 can execute instructions stored in the memory 720. The processor 710 is communicatively connected to the memory 720 via a data bus. In addition to the memory 720, the processor 710 can also be communicatively connected to an input device 730, an output device 740, and a communication device 350 via the data bus.

[0130] Processor 710 can be any conventional processor. Processors may include central processing units (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems on chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.

[0131] The memory 720 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0132] In this embodiment of the present disclosure, the memory 720 stores executable instructions, and the processor 710 can read the executable instructions from the memory 720 and execute the instructions to implement all or part of the steps of the traffic environment simulation method in the above exemplary embodiment.

[0133] Exemplary computer-readable storage media

[0134] In addition to the methods and apparatus described above, exemplary embodiments of this disclosure also include a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to perform all or part of the steps described in the exemplary embodiments above.

[0135] Computer program products can be written in any combination of one or more programming languages ​​to perform operations of embodiments of this disclosure. These programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages, and scripting languages ​​(e.g., Python). The program code can be executed entirely on a user's computing device, partially on a user's device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0136] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media include: static random access memory (SRAM) having one or more electrically connected wires, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, or any suitable combination thereof.

[0137] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A traffic environment simulation method, characterized in that, include: Obtain the initial position of the vehicle under test on the map; Traffic flow is generated in an area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of the vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of the pedestrian traffic flow is determined in conjunction with the pedestrian area on the map. When the status of a traffic participant in the traffic flow meets a preset change condition, the traffic participant sends first information to a pre-set traffic flow management pool. The first information is related to the status of the traffic participant, which includes the traffic participating vehicle and the traffic participating pedestrian. The traffic flow management pool manages the traffic participants based on the first information; The traffic flow management pool includes a traffic flow successor management pool, a traffic flow switching management pool, and a traffic flow anomaly management pool. The process of managing traffic participants based on the first information through the traffic flow follow-up management pool includes: If a first traffic participant is detected at the end of a first traffic flow, the first traffic participant is transferred from the first traffic flow to the traffic flow successor management pool for management; wherein, the first traffic flow has at least one successor traffic flow, and the successor traffic flow is another traffic flow connected to the end of the first traffic flow; Based on the first information, the traffic flow succession management pool determines the target succession traffic flow for managing the first traffic participant from the at least one succession traffic flow, and transfers the first traffic participant from the traffic flow succession management pool to the target succession traffic flow for management. The process of managing the traffic participants based on the first information through the traffic flow switching management pool includes: If a second traffic participant is detected in the second traffic flow that needs to switch to an adjacent traffic flow, the second traffic participant is transferred from the second traffic flow to the traffic flow switching management pool for management. The traffic flow switching management pool determines, based on the first information, whether the second traffic participant can complete the traffic flow switching; If it is determined that the second traffic participant is able to complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the adjacent traffic flow for management through the traffic flow switch management pool; If it is determined that the second traffic participant cannot complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the second traffic flow for management through the traffic flow switch management pool; The management of traffic participants based on the first information through the traffic flow anomaly management pool and the traffic flow switching management pool includes: If an abnormal third traffic participant is detected in the third traffic flow, the third traffic participant is transferred from the third traffic flow to the traffic flow anomaly management pool for management. Based on the first information, the traffic flow anomaly management pool performs target management operations on the third traffic participant. The target management operations include any one of the following: traffic flow switching operation and destruction operation. The first information includes the anomaly type of the third traffic participant, and the step of performing target management operations on the third traffic participant based on the first information through the traffic flow anomaly management pool includes: When the anomaly type of the third traffic participant is the first anomaly type, the third traffic participant is transferred from the traffic flow anomaly management pool to the traffic flow switching management pool for management through the traffic flow anomaly management pool. The first anomaly type is the type in which traffic flow switching can resolve the anomaly status of the third traffic participant. If the anomaly type of the third traffic participant is the second anomaly type, the third traffic participant is destroyed on the map through the traffic flow anomaly management pool. The second anomaly type is the type of anomaly state of the third traffic participant that cannot be resolved.

2. The traffic environment simulation method according to claim 1, characterized in that, The generation of traffic flow in the area within a preset threshold distance from the initial position includes: A test area is determined on the map based on the initial position, and the test area is within the area that is within the distance of the initial position from the preset threshold. Vehicle generation points are set at vehicle entry locations on the vehicle traffic flow within the test area, and pedestrian generation points are set at pedestrian entry locations on the pedestrian traffic flow within the test area. The traffic-participating vehicle is generated at the vehicle generation point, and the traffic-participating pedestrian is generated at the pedestrian generation point.

3. The traffic environment simulation method according to claim 1, characterized in that, The method further includes: If congestion is detected in the fourth traffic flow, determine whether the duration of the congestion is greater than a first duration threshold. If the duration of the congestion exceeds the first duration threshold, the traffic participants involved in the congestion are destroyed.

4. The traffic environment simulation method according to claim 1, characterized in that, The method further includes: Vehicle disposal points and pedestrian disposal points are set up. The vehicle disposal points are set up at the vehicle exit positions on the vehicle traffic flow within the test area, and the pedestrian disposal points are set up at the pedestrian departure positions on the pedestrian traffic flow within the test area. If a target traffic participating vehicle passes through the vehicle destruction point in the vehicle traffic flow, a first destruction probability of the target traffic participating vehicle is determined based on a first distance between the target traffic participating vehicle and the vehicle to be tested, and the display status of the target traffic participating vehicle on the map is determined based on the first destruction probability. If a target pedestrian is present in the pedestrian traffic flow and passes through the pedestrian destruction point, a second destruction probability of the target pedestrian is determined based on a second distance between the target pedestrian and the vehicle to be tested, and the display status of the target pedestrian on the map is determined based on the second destruction probability.

5. The traffic environment simulation method according to claim 1, characterized in that, The method further includes: The traffic flow in front of the vehicle to be tested in the target vehicle traffic flow is defined as the traffic flow in front of the vehicle, and the target vehicle traffic flow is the vehicle traffic flow in which the vehicle to be tested is located. The traffic flow behind the vehicle to be tested and the vehicle to be tested in the target vehicle traffic flow are identified as the rear traffic flow. Initialize the traffic flow in front of the vehicle and the traffic flow behind the vehicle.

6. A traffic environment simulation device, characterized in that, include: The first module is used to obtain the initial position of the vehicle under test on the map; The second module is used to generate traffic flow in an area within a preset threshold distance from the initial position. The traffic flow includes vehicle traffic flow for generating vehicles participating in traffic and pedestrian traffic flow for generating pedestrians participating in traffic. The generation location of the vehicle traffic flow is determined in conjunction with the vehicle driving area on the map, and the generation location of the pedestrian traffic flow is determined in conjunction with the pedestrian area on the map. The third module is used to send first information to a pre-set traffic flow management pool through the traffic participants when the status of the traffic participants in the traffic flow meets the preset change conditions. The first information is related to the status of the traffic participants, and the traffic participants include the traffic participating vehicles and the traffic participating pedestrians. The fourth module is used to manage the traffic participants based on the first information through the traffic flow management pool; The traffic flow management pool includes a traffic flow successor management pool, a traffic flow switching management pool, and a traffic flow anomaly management pool. The process of managing traffic participants based on the first information through the traffic flow follow-up management pool includes: If a first traffic participant is detected at the end of a first traffic flow, the first traffic participant is transferred from the first traffic flow to the traffic flow successor management pool for management; wherein, the first traffic flow has at least one successor traffic flow, and the successor traffic flow is another traffic flow connected to the end of the first traffic flow; Based on the first information, the traffic flow succession management pool determines the target succession traffic flow for managing the first traffic participant from the at least one succession traffic flow, and transfers the first traffic participant from the traffic flow succession management pool to the target succession traffic flow for management. The process of managing the traffic participants based on the first information through the traffic flow switching management pool includes: If a second traffic participant is detected in the second traffic flow that needs to switch to an adjacent traffic flow, the second traffic participant is transferred from the second traffic flow to the traffic flow switching management pool for management. The traffic flow switching management pool determines, based on the first information, whether the second traffic participant can complete the traffic flow switching; If it is determined that the second traffic participant is able to complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the adjacent traffic flow for management through the traffic flow switch management pool; If it is determined that the second traffic participant cannot complete the traffic flow switch, the second traffic participant is transferred from the traffic flow switch management pool to the second traffic flow for management through the traffic flow switch management pool; The management of traffic participants based on the first information through the traffic flow anomaly management pool and the traffic flow switching management pool includes: If an abnormal third traffic participant is detected in the third traffic flow, the third traffic participant is transferred from the third traffic flow to the traffic flow anomaly management pool for management. Based on the first information, the traffic flow anomaly management pool performs target management operations on the third traffic participant. The target management operations include any one of the following: traffic flow switching operation and destruction operation. The first information includes the anomaly type of the third traffic participant, and the step of performing target management operations on the third traffic participant based on the first information through the traffic flow anomaly management pool includes: When the anomaly type of the third traffic participant is the first anomaly type, the third traffic participant is transferred from the traffic flow anomaly management pool to the traffic flow switching management pool for management through the traffic flow anomaly management pool. The first anomaly type is the type in which traffic flow switching can resolve the anomaly status of the third traffic participant. If the anomaly type of the third traffic participant is the second anomaly type, the third traffic participant is destroyed on the map through the traffic flow anomaly management pool. The second anomaly type is the type of anomaly state of the third traffic participant that cannot be resolved.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the traffic environment simulation method according to any one of claims 1 to 5.