Virtual Traffic Scene Simulation Method and Device
By creating controlled virtual objects and intelligent agent objects in a virtual traffic scenario and using an intelligent agent model to simulate traffic risks, the problem that existing virtual scenario simulations cannot reproduce the interactions between traffic participants is solved, and simulation results with higher accuracy are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING VOYAGER TECH CO LTD
- Filing Date
- 2024-12-02
- Publication Date
- 2026-06-02
AI Technical Summary
Existing virtual scene simulation technologies cannot reproduce behavioral patterns in real road environments when simulating the game and interaction between traffic participants, resulting in insufficient accuracy of simulation results and business reference value.
In a virtual traffic scenario, controlled virtual objects and intelligent agent objects are created. By initializing the virtual traffic scenario, the control commands of the controlled virtual objects and the pre-trained intelligent agent model are used to determine the movement trajectory of the intelligent agent objects based on the target field strength distribution data of the driving safety field, thus simulating the change of traffic risk with space.
It improves the accuracy of virtual traffic scene simulation, enhances the reliability and realism of simulation results, and can better simulate the interaction between traffic participants.
Smart Images

Figure CN122133420A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual scene simulation technology, specifically to a virtual traffic scene simulation method and apparatus. Background Technology
[0002] Virtual scene simulation technology is a technology that uses computers to simulate real-world environments and dynamic processes. It is widely used in many fields, especially in the field of autonomous driving.
[0003] The development, functional iteration, and evaluation of autonomous driving systems all rely heavily on extensive road test data. However, large-scale real-vehicle road testing is not only costly but also faces numerous limitations when collecting data on low-frequency, long-tail scenarios and extremely dangerous situations. To address these issues, simulation data generated through virtual reality simulation technology has become a low-cost and effective supplementary method.
[0004] However, existing virtual scene simulation technologies, when simulating the movement of traffic participants in a virtual scene, are usually based on preset movement trajectories or simple movement rules defined by finite state machines. They cannot reproduce the game and interaction between traffic participants, and there are significant differences from the behavior patterns of traffic participants in the real road environment. This inevitably affects the accuracy of the simulation results and their business reference value. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a virtual traffic scene simulation method and apparatus to achieve dynamic simulation of virtual traffic scenes and improve the accuracy of simulation results.
[0006] In a first aspect, embodiments of the present invention provide a virtual traffic scene simulation method, the method comprising:
[0007] Initialize the virtual traffic scene;
[0008] Create controlled virtual objects and intelligent agent objects within the virtual traffic scenario;
[0009] For the controlled virtual object in the virtual traffic scenario, the movement control of the controlled virtual object is performed according to the received control command;
[0010] For the intelligent agent object in the virtual traffic scene, the intelligent agent object is moved according to the pre-trained intelligent agent model. The intelligent agent model is used to determine the movement trajectory of the intelligent agent object in the virtual traffic scene based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. The driving safety field is used to reflect the change of traffic risk with space.
[0011] Secondly, embodiments of the present invention provide a virtual traffic scene simulation device, the device comprising:
[0012] The scene initialization unit is used to initialize the virtual traffic scene;
[0013] An object creation unit is used to create controlled virtual objects and intelligent agent objects within the virtual traffic scenario.
[0014] A controlled virtual object control unit is used to control the movement of a controlled virtual object within the virtual traffic scenario according to received control commands.
[0015] The intelligent agent object control unit is used to control the movement of an intelligent agent object in the virtual traffic scene according to a pre-trained intelligent agent model corresponding to the intelligent agent object. The intelligent agent model is used to determine the movement trajectory of the intelligent agent object in the virtual traffic scene based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. The driving safety field is used to reflect the change of traffic risk with space.
[0016] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method described in the first aspect.
[0017] Fourthly, embodiments of the present invention provide an electronic device, the device comprising:
[0018] Memory is used to store one or more computer program instructions;
[0019] A processor, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.
[0020] Fifthly, embodiments of the present invention provide a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect.
[0021] This invention, after initializing a virtual traffic scenario, creates controlled virtual objects and intelligent agent objects within the virtual traffic scenario. It then performs movement control on the controlled virtual objects based on received control commands, and performs movement control on the intelligent agent objects based on a pre-trained intelligent agent model. The intelligent agent model determines the movement trajectory of the intelligent agent object within the virtual traffic scenario based on target field strength distribution data of the driving safety field in which the intelligent agent object is located. The driving safety field reflects the spatial variation of traffic risk. Therefore, this invention can achieve dynamic simulation of virtual traffic scenarios and improve the accuracy of simulation results. Attached Figure Description
[0022] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
[0023] Figure 1 This is a flowchart of the virtual traffic scene simulation method according to an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of the initialized virtual traffic scene in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of a virtual traffic scene after the creation of virtual objects, according to an embodiment of the present invention.
[0026] Figure 4 This is a flowchart of the intelligent agent object movement control method according to an embodiment of the present invention;
[0027] Figure 5 This is a flowchart of the method for determining target field strength distribution data according to an embodiment of the present invention;
[0028] Figure 6 This is a flowchart of the method for determining target field strength distribution data according to an embodiment of the present invention;
[0029] Figure 7 This is a schematic diagram showing the comparison between a driving safety field and a traffic scenario according to an embodiment of the present invention;
[0030] Figure 8 This is a flowchart of the intelligent agent model training method according to an embodiment of the present invention;
[0031] Figure 9 This is a schematic diagram of the sample fragment determination process according to an embodiment of the present invention;
[0032] Figure 10 This is a schematic diagram of the model training process according to an embodiment of the present invention;
[0033] Figure 11This is a schematic diagram of a virtual traffic scene simulation device according to an embodiment of the present invention;
[0034] Figure 12 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0035] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0036] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0037] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0038] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0039] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only under the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.
[0040] In the following description, the solution of the present invention will be used to supplement road test data of autonomous driving system. However, it should be understood that the solution of the present invention is essentially a simulation of traffic scenarios. Therefore, the solution of the present invention is not limited to supplementing road test data of autonomous driving system. It can also be applied to other related scenarios, such as online assessment scenarios for traffic training, or traffic safety testing scenarios. This application does not specifically limit the application scenarios of the solution of the present invention.
[0041] Figure 1This is a flowchart illustrating a virtual traffic scene simulation method according to an embodiment of the present invention. It should be understood that the executing entity of the virtual traffic scene simulation method can be a data processing device with data processing capabilities. Optionally, the data processing device can be a personal computer (e.g., a desktop computer, laptop computer, or desktop PC), or a server (the server can be a single computer, a cluster of multiple computers, or a cloud server that can flexibly adjust computing resources through cloud technology), etc., and this application does not impose any limitations on this. Figure 1 As shown, the virtual traffic scene simulation method may specifically include the following steps:
[0042] Step S100: Initialize the virtual traffic scene.
[0043] Specifically, the data processing device can receive scene initialization information and initialize scene configuration according to the scene initialization information, thereby constructing a virtual traffic scene that meets the needs of subsequent simulation.
[0044] Optionally, the scene initialization information received by the data processing device can be used to characterize the configuration requirements for the virtual traffic scene. The scene initialization information may include configuration information for traffic-related content such as lanes, traffic lights, road background, weather, and time. It should be understood that, in this embodiment, the initialized virtual traffic scene can be specifically represented externally as a three-dimensional high-precision map of traffic scenes such as traffic segments or intersections. Further optionally, after initializing the virtual traffic scene, the data processing device can also render the virtual traffic scene and display the rendered virtual traffic scene externally through a corresponding display device (the display device can be a display screen integrated into the data processing device itself, an external display screen connected to the data processing device, or a terminal device with a display screen that communicates and interacts with the data processing device).
[0045] Figure 2 This is a schematic diagram of the initialized virtual traffic scene according to an embodiment of the present invention. Figure 2 As shown, the initialized virtual traffic scene can be specifically represented as an intersection 21. The intersection 21 may include road sections such as motor vehicle lanes 211, non-motor vehicle lanes 212, pedestrian walkways 213, and crosswalks 214 for different types of traffic, as well as traffic lights 215. Furthermore, the relevant road parameters (e.g., road location, shape, and permitted traffic direction) for the motor vehicle lanes 211, non-motor vehicle lanes 212, pedestrian walkways 213, and crosswalks 214, and the relevant traffic light parameters (e.g., current state, location, and state switching frequency of the traffic lights) for the traffic lights 215 can be configured and determined by the data processing device based on the scene initialization information.
[0046] What I want to clarify is that, Figure 2 The virtual traffic scene is presented from a global bird's-eye view. However, for user convenience and to facilitate subsequent simulation operations, the virtual traffic scene can also be presented from the perspective of virtual objects created subsequently within the virtual traffic scene (i.e., including controlled virtual objects and intelligent agent objects) or from a top-down perspective. This application does not impose any restrictions on this. Figure 2 The content included in the virtual traffic scene is for illustrative purposes only. In actual application, the content included in the virtual traffic scene can be configured and adjusted according to actual simulation needs. For example, the virtual traffic scene may also include streetlights, fences, billboards, trees, mountains, roadblocks, buildings, and other public facilities or road obstacles. This application does not impose any specific restrictions on this.
[0047] Step S200: Create controlled virtual objects and intelligent agent objects within the virtual traffic scenario.
[0048] Specifically, after initializing the virtual traffic scenario, the data processing device can also receive object creation information and create controlled virtual objects and intelligent agent objects within the virtual traffic scenario based on this information. Both the controlled virtual objects and the intelligent agent objects are virtual objects, but they differ in how their behaviors are implemented. The controlled virtual objects do not possess autonomous decision-making capabilities; their behavior is directly controlled by external commands or instructions. The intelligent agent objects, on the other hand, possess autonomous decision-making capabilities, and their behavior can be determined autonomously based on changes in the environment. It should be understood that, for better simulation results, the behavioral decision-making methods of the intelligent agent objects need to closely resemble those of real objects in a real road environment.
[0049] Optionally, the object creation information received by the data processing device can be used to characterize the creation requirements for controlled virtual objects or intelligent agent objects. The object creation information may include configuration information for the controlled virtual objects or intelligent agent objects. It should be understood that, in this embodiment, the created controlled virtual objects and intelligent agent objects can be specifically manifested externally as pedestrians, motor vehicles, or non-motorized vehicles within a traffic scene. Further optionally, the controlled virtual objects and intelligent agent objects created within the virtual traffic scene can also be rendered and displayed externally via a display device by the data processing device.
[0050] Figure 3 This is a schematic diagram of a virtual traffic scene after the creation of virtual objects, according to an embodiment of the present invention. Figure 3As shown, the created controlled virtual objects and intelligent agent objects can specifically be represented as motor vehicles 311, pedestrians 312, and non-motorized vehicles 313 within the intersection 31. It should be understood that in this embodiment, the number of controlled virtual objects and intelligent agent objects created by the data processing device within the virtual traffic scene can be set according to actual needs, and this application does not impose any limitations on this. Furthermore, for simulation purposes, the object type of the controlled virtual object can include motor vehicles, and the object type of the intelligent agent object can include motor vehicles, pedestrians, and / or non-motorized vehicles. It should be understood that in some embodiments, the object type of the controlled virtual object can also be pedestrians and / or non-motorized vehicles, and this application does not impose any limitations on this. Furthermore, the relevant attribute parameters (the configurable relevant attribute parameters may differ for virtual objects of different object types; for example, for motor vehicles and non-motorized vehicles, the configurable relevant attribute parameters may include vehicle type, mass, size and power data, etc., and for pedestrians, the configurable relevant attribute parameters may include height and weight, etc.) and relevant state parameters (e.g., initial position, initial direction of movement, initial acceleration and initial speed, etc.) of the data processing device can be configured and determined by the data processing device based on the object creation information.
[0051] Step S300: For the controlled virtual object in the virtual traffic scene, perform movement control on the controlled virtual object according to the received control command.
[0052] Specifically, after initializing the virtual traffic scenario and creating controlled virtual objects and intelligent agent objects within it, the data processing device can control the movement of the controlled virtual objects based on received control commands. These control commands may include control information for the controlled virtual objects, such as power control quantities, power application direction, braking control quantities, and braking direction.
[0053] It should be understood that, in this embodiment, since the purpose is to supplement the road test data of the autonomous driving system, the control commands can be generated by the autonomous driving system based on the corresponding autonomous driving algorithm. However, it is worth noting that in some embodiments, depending on the application scenario, the control commands can also be generated in other ways. For example, when the solution in this embodiment is applied to online assessments for traffic training, the control commands can also be generated based on the control operations performed by the examinee on the driving control kit, and this application does not impose any limitations on this.
[0054] Optionally, in this embodiment, the movement control of the controlled virtual object can be implemented by a data processing device based on a kinematic model and / or a dynamic model. The kinematic model is a model that uses geometric methods to study the motion laws of an object, and it can determine the object's trajectory by analyzing the object's position, velocity, and acceleration. The dynamic model is a model that studies the relationship between force and motion, and it can determine the object's trajectory by analyzing the relationship between force, mass, and acceleration. Specifically, the data processing device can input the received control commands, the current attribute parameters, and the current state parameters of the controlled virtual object into the kinematic model and / or the dynamic model to determine the movement trajectory of the controlled virtual object, and then control the controlled virtual object to move within the virtual traffic scene based on the movement trajectory. It should be understood that the above-described implementation method for controlling the movement of a controlled virtual object within a virtual traffic scene is merely illustrative. In actual applications, the specific implementation method for controlling the movement of a controlled virtual object within a virtual traffic scene can be designed and adjusted according to actual needs, and this application does not impose any limitations on this.
[0055] Step S400: For the intelligent agent object in the virtual traffic scene, perform motion control on the intelligent agent object according to the pre-trained intelligent agent model.
[0056] Specifically, for simulation purposes, the data processing equipment needs to simultaneously execute movement control of controlled virtual objects and intelligent agent objects within the virtual traffic scenario. While controlling the movement of the controlled virtual objects, the data processing equipment can also control the movement of intelligent agent objects within the virtual traffic scenario based on a pre-trained intelligent agent model. This intelligent agent model can be used to determine the movement trajectory of the intelligent agent object within the virtual traffic scenario based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. It should be understood that the driving safety field draws on electromagnetic field theories to intuitively and comprehensively characterize the impact of continuous human-vehicle-road interactions on traffic safety through field superposition. In this embodiment, the driving safety field can be used to reflect the spatial variation of traffic risk. The target field strength distribution data of the driving safety field is specifically used to characterize the specific traffic risk value corresponding to each location point within the driving safety field. It should be understood that in this embodiment, the data processing device will only implement the movement control of the intelligent agent object according to the intelligent agent model, while the specific behavioral logic of the intelligent agent object (e.g., the control of when to move and when to stop moving) can be determined by the data processing device in other ways, and this application does not impose specific restrictions on this.
[0057] Figure 4 This is a flowchart of a smart agent object movement control method according to an embodiment of the present invention. By executing... Figure 4 The illustrated intelligent agent object movement control method allows the data processing device to utilize the intelligent agent model to achieve movement control of the intelligent agent object, that is, to implement the above step S400. For example... Figure 4 As shown, the intelligent agent object movement control method may specifically include the following steps:
[0058] Step S410: Determine the target field strength distribution data of the driving safety field where the intelligent agent object is located.
[0059] Specifically, the data processing device can determine the target field strength distribution data of the driving safety field in which the intelligent agent object is located.
[0060] Optionally, the target field strength distribution data of the driving safety field can be determined by a data processing device after comprehensively evaluating relevant factors affecting the safety of intelligent objects within the road.
[0061] Figure 5 This is a flowchart of a method for determining target field strength distribution data according to an embodiment of the present invention. By executing... Figure 5 The method for determining the target field strength distribution data shown allows the data processing equipment to comprehensively evaluate relevant factors affecting the safety of intelligent agents within the road, thereby determining the target field strength distribution data of the driving safety field where the intelligent agent is located, that is, realizing the above step S410. Figure 5 As shown, the method for determining the target field strength distribution data may specifically include the following steps:
[0062] Step S411: Obtain object data of at least one obstacle object within the driving safety field where the intelligent agent object is located.
[0063] Specifically, the data processing device can acquire object data of at least one obstacle object within the driving safety field where the intelligent agent object is located. The obstacle object includes the controlled virtual object and / or other intelligent agent objects besides the current intelligent agent object. It should be understood that the controlled virtual object and each intelligent agent object can act as each other's obstacle object.
[0064] Step S412: Obtain road data of the road where the intelligent agent object is located.
[0065] Specifically, the data processing device can also acquire road data of the road where the intelligent agent object is located (the road may include multiple lanes, and the permitted driving directions of the multiple lanes may be the same, partially the same or completely different, and this application does not impose any restrictions on this).
[0066] Step S413: Determine the target field strength distribution data of the driving safety field where the intelligent agent object is located based on the object data and the road data.
[0067] Specifically, after acquiring object data of at least one obstacle object within the driving safety field where the intelligent agent object is located and road data of the road where the intelligent agent object is located, the data processing device can determine the target field strength distribution data of the driving safety field where the intelligent agent object is located based on the object data and the road data.
[0068] Optionally, in this embodiment, the obstacle object can be further subdivided into dynamic obstacle objects and static obstacle objects. Further, the driving safety field can specifically be viewed as a superposition of a dynamic obstacle field, a static obstacle field, and a road boundary field. To determine the target field strength distribution data of the driving safety field, the data processing device can first determine the field strength distribution data of the dynamic obstacle field, the static obstacle field, and the road boundary field separately, and then perform superposition processing on the field strength distribution data of the dynamic obstacle field, the static obstacle field, and the road boundary field to obtain the target field strength distribution data of the driving safety field.
[0069] Figure 6 This is a flowchart of a method for determining target field strength distribution data according to an embodiment of the present invention. By executing... Figure 6 The method for determining target field strength distribution data shown allows a data processing device to determine the target field strength distribution data of the driving safety field where the intelligent agent object is located based on the object data and the road data, thus implementing step S413 above. Figure 6 As shown, the method for determining the target field strength distribution data may specifically include the following steps:
[0070] Step S4131: Determine the first field strength distribution data of the dynamic obstacle field based on the object data of the dynamic obstacle object.
[0071] Specifically, the data processing device can determine the first field strength distribution data of the dynamic obstacle field based on the object data of the dynamic obstacle object. This dynamic obstacle field can be used to characterize the spatial variation of the traffic risk caused by the dynamic obstacle when considering the dynamic obstacle alone.
[0072] Optionally, the first field strength distribution data is determined by the following formula:
[0073]
[0074] Among them, E d (x, y) represents the field strength of the dynamic obstacle field at coordinate position (x, y), M k The mass of the k-th dynamic obstacle object is represented by R, the position enhancement factor is represented by a, a is a pre-set major axis coefficient, and b is a pre-set minor axis coefficient. k y k) represents the coordinate position of the k-th dynamic obstacle object, Ek(θ) represents the forward enhancement factor, γ is the pre-set lane line filtering coefficient (used to reflect the attenuation effect of lane lines on traffic risk values), and n k The number of lane lines between the coordinate position (x, y) and the dynamic obstacle object is represented by K, and the number of dynamic obstacle objects is represented by K.
[0075] It should be understood that, in this embodiment, the coordinate positions mentioned refer to the coordinate positions in the Frenet coordinate system established with the current agent object as the center. The Frenet coordinate system can be a two-dimensional coordinate system, where the X-axis is parallel to the direction of movement of the agent object, and the Y-axis is perpendicular to the direction of movement. Further, Ek(θ) can be used to enhance the traffic risk value in the space in front of the moving direction of the dynamic obstacle. Specifically, it can be determined based on the angle θ between the unit vector of the moving direction of the dynamic obstacle and the vector from the dynamic obstacle to the coordinate position (x, y). Illustratively, as a way of taking a value, when the angle θ is less than or equal to 30 degrees, the value of Ek(θ) can be 2; when the angle θ is greater than 30 degrees but less than or equal to 60 degrees, the value of Ek(θ) can be 1.4; and when the angle θ is greater than 60 degrees, the value of Ek(θ) can be 1. Furthermore, R, representing the position enhancement factor, can be used to specifically enhance traffic risk values at different locations within a dynamic obstacle. It can be determined based on the positional relationship between the coordinate position (x, y) and the dynamic obstacle object. Furthermore, the coordinate position (x, y) can represent any position. Therefore, by using the above formula to calculate the first field strength corresponding to each location point within the dynamic obstacle field, this embodiment can obtain the first field strength distribution data of the dynamic obstacle field.
[0076] Step S4132: Determine the second field strength distribution data of the static obstacle field based on the object data of the static obstacle object.
[0077] Specifically, the data processing device can determine the second field strength distribution data of the static obstacle field based on the object data of the static obstacle object. This static obstacle field can be used to characterize the spatial variation of traffic risk caused by static obstacles when considering them individually.
[0078] Optionally, the second field strength distribution data is determined by the following formula:
[0079]
[0080] Among them, E s (x, y) represents the field strength of the static obstacle field at coordinate position (x, y), M iLet R represent the mass of the i-th static obstacle object, R represent the position enhancement factor, a be the pre-set major axis coefficient, and b be the pre-set minor axis coefficient. i y i ) represents the coordinate position of the i-th static obstacle object, γ is the pre-set lane line filtering coefficient, and n k The number of lane lines between the coordinate position (x, y) and the static obstacle object is represented by N, and N represents the number of static obstacle objects.
[0081] It should be understood that R, representing the location enhancement factor, can be used to specifically enhance traffic risk values at different locations of static obstacles. It can be determined based on the positional relationship of the coordinate position (x, y) relative to the static obstacle object. Furthermore, the coordinate position (x, y) can represent any position. Therefore, by using the above formula to calculate the second field strength corresponding to each location point within the static obstacle field, this embodiment can obtain the second field strength distribution data of the static obstacle field.
[0082] Step S4133: Determine the third field strength distribution data of the road boundary field based on the road data.
[0083] Specifically, the data processing equipment can determine the third field strength distribution data of the road boundary field based on road data. This road boundary field can be used to characterize the spatial variation of traffic risk caused by the road boundary when considering the road alone.
[0084] Optionally, in this embodiment, the third field strength distribution data of the road boundary field can be calculated and determined by the following formula:
[0085]
[0086] Among them, E b (x, y) represents the field strength of the road boundary field at coordinate position (x, y), B is the width of the dable area of the road, and d l The shortest distance between the coordinate position (x, y) and the left boundary of the road is represented by η, which is a pre-set magnitude adjustment coefficient (the magnitude adjustment coefficient can be used to make the field strength values in the road boundary field, static obstacles and dynamic obstacles of the same magnitude, so as to facilitate subsequent field strength superposition), R represents the position enhancement factor, and d r It represents the shortest distance between the (x, y) coordinate position and the right boundary of the road.
[0087] It should be understood that R, representing the location enhancement factor, can be used to specifically enhance traffic risk values at different locations on the road boundary. It can be determined based on the positional relationship of the coordinate position (x, y) relative to the road boundary. Furthermore, the coordinate position (x, y) can represent any position. Therefore, by using the above formula to calculate the third field strength corresponding to each location point within the road boundary field, this embodiment can obtain the third field strength distribution data of the road boundary field.
[0088] Step S4134: Superimpose the first field strength distribution data, the second field strength distribution data, and the third field strength distribution data to determine the target field strength distribution data of the driving safety field where the intelligent agent object is located.
[0089] Specifically, after determining the first, second, and third field strength distribution data, the data processing device can overlay these data to determine the target field strength distribution data of the driving safety field where the intelligent agent is located. It should be understood that overlaying the first, second, and third field strength distribution data means adding the field strengths at their respective locations; the sum of these field strengths is the target field strength of the driving safety field at that location.
[0090] Figure 7 This is a schematic diagram comparing a driving safety scenario with a traffic scenario according to an embodiment of the present invention. It should be understood that this diagram is for ease of illustration of the driving safety scenario. Figure 7 The system uses the depth of shadow color to represent the magnitude of traffic risk (i.e., the field strength of the driving safety field), thus visually representing the driving safety field 74. The darker the shadow color of a region, the greater its traffic risk value; conversely, the lighter the shadow color, the lower its traffic risk value. It is important to note that... Figure 7 The driving safety field shown is for illustrative purposes only; in actual applications, the driving safety field is not limited to this. For example... Figure 7 As shown, for the intelligent agent object 71, the data processing device can determine its driving safety field 74.
[0091] Step S420: Using the target field strength distribution data as input, determine the movement trajectory of the intelligent agent object in the virtual traffic scene based on the intelligent agent model corresponding to the intelligent agent object.
[0092] Specifically, after determining the target field strength distribution data, the data processing device can use the target field strength distribution data as input to determine the movement trajectory of the intelligent agent object within the virtual traffic scene based on the intelligent agent model corresponding to the intelligent agent object. It should be understood that in this embodiment, the target field strength distribution data can be directly input into the intelligent agent model, or it can be converted into an image (such as...). Figure 7 The image (shown in driving safety field 74) is then input into the agent model in the form of an image. The specific image can be determined based on the trained agent model, and this application does not impose any restrictions on it.
[0093] Optionally, the agent model corresponding to the agent object can refer to an agent model corresponding to the object type of the agent object. Specifically, the movement logic of real traffic objects of different object types is different in a real traffic environment. To ensure that agent objects of each object type can maintain consistency with the corresponding real traffic objects in terms of movement logic, this embodiment can train and obtain agent models that match each object type separately. When using the agent model to determine the movement trajectory of the agent object in the virtual traffic scene, the data processing device can determine the object type of the agent object and determine the movement trajectory of the agent object in the virtual traffic scene based on the agent model corresponding to the object type.
[0094] Figure 8 This is a flowchart of an intelligent agent model training method according to an embodiment of the present invention. It should be understood that in this embodiment, the intelligent agent model can be trained, acquired, and used by the same data processing device or by different data processing devices; this application does not impose any limitations on this. By executing... Figure 8 The illustrated method for training an intelligent agent model allows the data processing device to train and acquire such a model. Figure 8 As shown, the intelligent agent model training method may specifically include the following steps:
[0095] Step S510: Obtain traffic sensing data of at least one real object.
[0096] Specifically, the data processing device can acquire traffic sensing data of at least one real object. This traffic sensing data can be obtained by collecting data from the real object in a real road environment, specifically including environmental data of the real object during its movement (i.e., data on surrounding dynamic obstacles, static obstacles, and road data, etc.) and movement trajectory data, etc. It should be understood that the traffic sensing data of the real object can be acquired by placing sensors on the real object and / or at other relevant locations (e.g., on traffic facilities beside the road). This application does not limit the method of acquiring traffic sensing data. It should also be understood that after acquiring the traffic sensing data, the data processing device can preprocess the traffic sensing data to remove duplicate or low-confidence traffic sensing data, and this application does not limit this process.
[0097] Step S520: Perform a time sliding window traversal on each of the traffic sensing data to obtain multiple sample segments.
[0098] Specifically, after acquiring traffic sensing data of real objects, the data processing device can perform a time-sliding window traversal on each traffic sensing data point to obtain multiple sample segments. These sample segments may include target field strength distribution data of the corresponding real object within the first time frame (e.g., the first 50 frames) and movement trajectory data within the second time frame (e.g., the last 15 frames). It should be understood that the time-sliding window can be used to select fixed-length data segments in chronological order from the traffic sensing data, and each selected data segment can be used to determine the corresponding sample segment. The window length of the time-sliding window can be set to the sum of the first and second time frames.
[0099] Figure 9 This is a schematic diagram illustrating the sample fragment determination process according to an embodiment of the present invention. It should be understood that since the process of determining the sample fragment is the same in each traversal, therefore... Figure 9 The example only shows the process of determining sample fragments during a single traversal. For example... Figure 9As shown, the data processing device can use a time sliding window 91 to select a fixed-length data segment in the traffic sensing data 92 in chronological order. Further, for the currently selected data segment, the data processing device can acquire environmental data 921 of the real object within the preceding first time frame, and determine the target field strength distribution data 923 of the driving safety field where the real object is located within the preceding first time frame based on the environmental data 921. Then, it can acquire the movement trajectory data 922 of the real object within the following second time frame from the data segment, and subsequently determine the target field strength distribution data 923 and the movement trajectory data 922 as sample segments 94. It should be understood that the target field strength distribution data of the driving safety field where the real object is located within the preceding first time frame can be obtained by performing a process such as... Figure 6 The target field strength distribution data shown is determined by a method that will not be elaborated further here.
[0100] Step S530: Train an initial model based on the multiple sample fragments to obtain the agent model.
[0101] Specifically, after determining multiple sample segments, the data processing device can train an initial model based on the multiple sample segments to obtain the agent model.
[0102] It should be understood that when training the initial model, the data processing device may use only a portion of the sample fragments (e.g., 70% of the sample fragments) as the training set to train the initial model, and use another portion of the sample fragments as the test set to test the trained initial model. This application does not impose any restrictions on this.
[0103] It should be understood that the process of training a model using sample fragments is essentially a process of adjusting the parameters in the model using sample fragments. During model training, the data processing device can use each sample fragment to adjust the parameters of the initial model. Specifically, for each sample fragment, the data processing device can use the target field strength distribution data of the driving safety field in the first time frame of the sample fragment as model input to predict the movement trajectory data of the real object in the second time frame. Then, the predicted movement trajectory data is compared with the actual movement trajectory data to calculate the loss value. It should be understood that the loss value can be a metric used to compare the model's predicted output for the sample with the actual sample value (also known as the supervision value), that is, to measure the difference between the machine learning model's predicted output for the sample and the actual sample value. The loss value can be used to determine the adjustment range of the model parameters during model training. Optionally, in this embodiment, the loss value can be specifically determined by calculating the average Euclidean distance between the predicted movement trajectory data and the actual movement trajectory data. Furthermore, after determining the loss value, the data processing device can adjust the parameters of the initial model based on the loss value.
[0104] Optionally, in this embodiment, the initial model can be built based on the TensorFlow framework. The initial model can consist of at least two parts: a Convolutional Neural Network (CNN) and a Long Short-Term Memory (LSTM) network. Further, the CNN is a deep learning model specifically designed for processing data with a grid structure (such as images and videos). In this embodiment, the CNN can be used to extract relevant features needed for trajectory prediction by the subsequent LSTM network from the target field strength distribution data in the driving safety field. The LSTM network is a time-recurrent neural network, suitable for processing and predicting important events with very long intervals and delays in time series. In this embodiment, the LSTM network can be used to perform time-series prediction based on the features extracted by the CNN to generate trajectory points.
[0105] Figure 10 This is a schematic diagram of the model training process according to an embodiment of the present invention. It should be understood that the process of training the initial model using each sample fragment is the same for the data processing device; therefore, Figure 10 Only the process of training the initial model using a single sample fragment is shown. Figure 10As shown, firstly, for sample segment 101, the data processing device can input the target field strength distribution data 1012 of the driving safety field where the real object in sample segment 101 is located in the first time frame into the initial model 102. Further, in the initial model 102, the convolutional neural network 1021 extracts features from the target field strength distribution data 1012, and the extracted features are output by the convolutional neural network 1021 to the long short-term memory network 1022. After receiving the features extracted by the convolutional neural network 1021, the long short-term memory network 1022 performs temporal prediction based on the features to generate trajectory points, thereby obtaining the predicted movement trajectory data 103. Further, after obtaining the predicted movement trajectory data 103, the data processing device can calculate the average Euclidean distance between the real movement trajectory data 1011 and the predicted movement trajectory data 103 of the real object in sample segment 101 in the second time frame, thereby obtaining the loss value 104. After obtaining the loss value 104, the data processing device can adjust the relevant parameters in the convolutional neural network 1021 and the long short-term memory network 1022 based on the loss value 104. Thus, the data processing device can complete one training of the initial model 102 using the sample fragment 101.
[0106] Optionally, the data processing device can train the initial model multiple times using repeated sample segments until the number of training iterations reaches a preset number or the initial model meets preset requirements (meeting preset requirements can mean that the initial model's accuracy or precision, or other evaluation parameters, reach preset standards). It should be understood that in each training iteration, the multiple sample segments used by the data processing device can be the same, partially the same, or completely different; this application does not impose any limitations on this. It should be understood that the initial model after training is the agent model used in the above embodiments.
[0107] Optionally, in order to train an agent model that matches each object type, when training the model, the data processing device may also train an initial model based only on the sample data set corresponding to the current object type to obtain an agent model corresponding to the current object type.
[0108] Step S430: Control the intelligent agent object to move within the virtual traffic scene according to the movement trajectory.
[0109] Specifically, after determining the movement trajectory of the intelligent agent object, the data processing device can control the intelligent agent object to move within the virtual traffic scene based on the movement trajectory. Therefore, by utilizing the intelligent agent model to determine the movement trajectory of the virtual object within the virtual traffic scene based on the target field strength distribution data of the driving safety field, and controlling the intelligent agent object to move within the virtual traffic scene based on the movement trajectory, this embodiment of the invention can make the movement trajectory of the intelligent agent object within the virtual traffic scene closely approximate the movement trajectory of a real object within a real road scene, thereby improving the accuracy of the simulation results.
[0110] Furthermore, when controlling the movement of controlled virtual objects and intelligent agents in a virtual traffic scenario, the data processing device can acquire relevant parameters generated by the virtual objects during the movement according to actual needs, and use them as supplementary data for road testing of the autonomous driving system. This application does not impose any restrictions on this.
[0111] This invention, after initializing a virtual traffic scenario, creates controlled virtual objects and intelligent agent objects within the virtual traffic scenario. It then performs movement control on the controlled virtual objects based on received control commands, and performs movement control on the intelligent agent objects based on a pre-trained intelligent agent model. The intelligent agent model determines the movement trajectory of the intelligent agent object within the virtual traffic scenario based on target field strength distribution data of the driving safety field in which the intelligent agent object is located. The driving safety field reflects the spatial variation of traffic risk. Therefore, this invention can achieve dynamic simulation of virtual traffic scenarios and improve the accuracy of simulation results.
[0112] Figure 11 This is a schematic diagram of a virtual traffic scene simulation device according to an embodiment of the present invention. Figure 11 As shown, the virtual traffic scene simulation device of this invention includes a scene initialization unit 111, an object creation unit 112, a controlled virtual object control unit 113, and an intelligent agent object control unit 114.
[0113] Specifically, the scene initialization unit 111 is used to initialize the virtual traffic scene;
[0114] The object creation unit 112 is used to create controlled virtual objects and intelligent agent objects within the virtual traffic scenario;
[0115] The controlled virtual object control unit 113 is used to control the movement of the controlled virtual object in the virtual traffic scene according to the received control command;
[0116] The intelligent agent object control unit 114 is used to control the movement of intelligent agents within the virtual traffic scene according to a pre-trained intelligent agent model corresponding to the intelligent agent object. The intelligent agent model is used to determine the movement trajectory of the intelligent agent object within the virtual traffic scene based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. The driving safety field is used to reflect the change of traffic risk with space.
[0117] This invention, after initializing a virtual traffic scenario, creates controlled virtual objects and intelligent agent objects within the virtual traffic scenario. It then performs movement control on the controlled virtual objects based on received control commands, and performs movement control on the intelligent agent objects based on a pre-trained intelligent agent model. The intelligent agent model determines the movement trajectory of the intelligent agent object within the virtual traffic scenario based on target field strength distribution data of the driving safety field in which the intelligent agent object is located. The driving safety field reflects the spatial variation of traffic risk. Therefore, this invention can achieve dynamic simulation of virtual traffic scenarios and improve the accuracy of simulation results.
[0118] Figure 12 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (For example...) Figure 12 As shown, Figure 12 The illustrated electronic device is any data processing device from the above embodiments, comprising a general computer hardware architecture, including at least a processor 121 and a memory 122. The processor 121 and memory 122 are connected via a bus 123. The memory 122 is adapted to store instructions or programs executable by the processor 121. The processor 121 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 121 executes the instructions stored in the memory 122 to perform the method flow of the embodiments of the present invention as described above, thereby realizing data processing and control of other devices. The bus 123 connects the aforementioned components together, and also connects the aforementioned components to a display controller 124, a display device, and an input / output (I / O) device 125. The input / output (I / O) device 125 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 125 is connected to the system via an input / output (I / O) controller 126.
[0119] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0120] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.
[0121] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.
[0122] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.
[0123] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0124] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0125] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A virtual traffic scene simulation method, characterized in that, The method includes: Initialize the virtual traffic scene; Create controlled virtual objects and intelligent agent objects within the virtual traffic scenario; For the controlled virtual object in the virtual traffic scenario, the movement control of the controlled virtual object is performed according to the received control command; For the intelligent agent object in the virtual traffic scene, the intelligent agent object is moved according to the pre-trained intelligent agent model. The intelligent agent model is used to determine the movement trajectory of the intelligent agent object in the virtual traffic scene based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. The driving safety field is used to reflect the change of traffic risk with space.
2. The method according to claim 1, characterized in that, The step of controlling the movement of the intelligent agent object based on a pre-trained intelligent agent model corresponding to the intelligent agent object includes: Determine the target field strength distribution data of the driving safety field where the intelligent agent object is located; Using the target field strength distribution data as input, the movement trajectory of the intelligent agent object in the virtual traffic scene is determined based on the intelligent agent model corresponding to the intelligent agent object; The intelligent agent object is controlled to move within the virtual traffic scene based on the movement trajectory.
3. The method according to claim 2, characterized in that, Before determining the movement trajectory of the agent object within the virtual traffic scene based on a pre-trained agent model corresponding to the agent object, the method further includes: Determine the object type of the intelligent agent object; The agent model corresponding to the agent object is determined based on the object type.
4. The method according to claim 2, characterized in that, The target field strength distribution data for determining the driving safety field where the intelligent agent object is located includes: Obtain object data of at least one obstacle object within the driving safety field where the intelligent agent object is located, wherein the obstacle object includes the controlled virtual object and / or other intelligent agent objects besides the current intelligent agent object; Obtain road data of the road where the intelligent agent object is located; The target field strength distribution data of the driving safety field where the intelligent agent object is located is determined based on the object data and the road data.
5. The method according to claim 4, characterized in that, The obstacle objects include dynamic obstacle objects and static obstacle objects, and the driving safety field is a superposition field of dynamic obstacle field, static obstacle field and road boundary field; The step of determining the target field strength distribution data of the driving safety field where the intelligent agent object is located based on the object data and the road data includes: The first field strength distribution data of the dynamic obstacle field is determined based on the object data of the dynamic obstacle object; The second field strength distribution data of the static obstacle field is determined based on the object data of the static obstacle object; The third field strength distribution data of the road boundary field is determined based on the road data; The first field strength distribution data, the second field strength distribution data, and the third field strength distribution data are superimposed to determine the target field strength distribution data of the driving safety field in which the intelligent agent object is located.
6. The method according to claim 3, characterized in that, The agent model is trained in the following manner: Acquire traffic sensing data for at least one real object; The traffic sensing data are traversed by a time sliding window to obtain multiple sample segments. The sample segments include the target field strength distribution data of the driving safety field in the first time frame and the movement trajectory data in the second time frame. The initial model is trained based on the multiple sample fragments to obtain the agent model.
7. The method according to claim 6, characterized in that, The step of training an initial model based on the multiple sample fragments to obtain the agent model includes: For each of the object types, an initial model is trained based on the sample fragments corresponding to the object type to obtain the agent model corresponding to the object type.
8. The method according to claim 1, characterized in that, The object types of the intelligent agent objects include motor vehicles, pedestrians and / or non-motor vehicles.
9. A virtual traffic scene simulation device, characterized in that, The device includes: The scene initialization unit is used to initialize the virtual traffic scene; An object creation unit is used to create controlled virtual objects and intelligent agent objects within the virtual traffic scenario. A controlled virtual object control unit is used to control the movement of a controlled virtual object within the virtual traffic scenario according to received control commands. The intelligent agent object control unit is used to control the movement of an intelligent agent object in the virtual traffic scene according to a pre-trained intelligent agent model corresponding to the intelligent agent object. The intelligent agent model is used to determine the movement trajectory of the intelligent agent object in the virtual traffic scene based on the target field strength distribution data of the driving safety field where the intelligent agent object is located. The driving safety field is used to reflect the change of traffic risk with space.
10. A computer-readable storage medium storing computer program instructions thereon, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-8.
11. An electronic device, characterized in that, The device includes: Memory is used to store one or more computer program instructions; A processor, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-8.
12. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-8.