Interaction control method and system of virtual-real fusion traffic simulation system, computing equipment and medium

By using shared memory message queues in virtual and real fusion traffic simulation systems to control the system, the problem of low interaction control efficiency in the prior art is solved, and efficient data interaction and system scalability are achieved.

CN119883675APending Publication Date: 2025-04-25KINGFAR INTERNATIONAL INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411944173.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The interactive control efficiency of existing virtual and real fusion traffic simulation systems is not high.

Method used

By obtaining target messages generated by the traffic simulation system and writing them to a message queue in shared memory, the application client or traffic object hardware drive system can access these messages.

Benefits of technology

It improves the interactive control efficiency of virtual and real traffic simulation system, realizes efficient data access and interface unification, and has high scalability and decoupling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883675A_ABST
    Figure CN119883675A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an interaction control method, device, system and equipment for a virtual-real fusion traffic simulation system. A target message generated by the traffic simulation system is acquired; and writing the target message into a message queue of a shared memory, so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message. According to the method, data interaction is carried out through the message queue in the shared memory, the characteristics of efficient access and uniform interfaces can be realized by utilizing the shared memory, and the advantages of high expandability, high decoupling and the like can be realized by utilizing the message queue, so that the interaction control efficiency of the virtual-real fusion traffic simulation system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of traffic simulation, and specifically relates to an interactive control method, device, system and equipment for a virtual-reality fusion traffic simulation system. Background Art

[0002] Multi-terminal to multi-terminal interactive control is becoming more and more important in modern interactive control, for example: virtual-real fusion traffic simulation system. The virtual-real fusion simulation traffic system includes: traffic simulation system, traffic object hardware drive system and traffic simulation hardware equipment, etc. Traffic simulation hardware equipment includes: steering wheel and pedals, etc.

[0003] However, using the existing technology, the interactive control efficiency of the virtual-reality fusion traffic simulation system is not high. Summary of the invention

[0004] The embodiments of the present application provide an interactive control method, device, system and equipment for a virtual-reality fusion traffic simulation system.

[0005] In a first aspect, an embodiment of the present application provides an interactive control method for a virtual-reality fusion traffic simulation system, comprising:

[0006] Obtain target messages generated by the traffic simulation system;

[0007] The target message is written into a message queue of a shared memory, so that an application client or a traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message, wherein the traffic object hardware driver system is used to perform data interaction with a traffic simulation hardware device.

[0008] Optionally, the application client includes: a traffic behavior analysis system and / or a central control system;

[0009] The step of obtaining the target message generated by the traffic simulation system includes:

[0010] Obtain traffic object status information generated by the traffic simulation system;

[0011] The step of writing the target message into a message queue of a shared memory so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message includes:

[0012] The traffic object status information is written into a message queue of the first shared memory, so that the traffic behavior analysis system and / or the central control system accesses the message queue of the first shared memory to obtain the traffic object status information.

[0013] Optionally, the traffic object status information includes at least one of the following:

[0014] Real-time status information of traffic objects;

[0015] Traffic object sensor data;

[0016] Environmental data.

[0017] Optionally, obtaining the target message generated by the traffic simulation system includes:

[0018] Obtain force feedback messages generated by the traffic simulation system;

[0019] Writing the target message into a message queue of a shared memory so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message includes:

[0020] The force feedback message is written into a message queue of the second shared memory, so that the traffic object hardware driving system accesses the message queue of the second shared memory to obtain the force feedback message; the force feedback message includes at least one of the following:

[0021] Steering wheel force feedback message;

[0022] Vibration device force feedback message;

[0023] Motion platform force feedback messages.

[0024] Optionally, also include:

[0025] Acquire vehicle operation data generated by a hardware drive system of a traffic object;

[0026] The vehicle operation data is written into a message queue of the second shared memory, so that the traffic simulation system accesses the message queue of the second shared memory to obtain the vehicle operation data; the vehicle operation data includes at least one of the following:

[0027] Steering wheel angle;

[0028] Accelerator pedal angle;

[0029] Gear position;

[0030] Light status;

[0031] Braking information.

[0032] Optionally, before writing the traffic object status information into the message queue of the first shared memory, the method further includes:

[0033] It is determined that the traffic object status information topic is subscribed by an application client, and the application client includes: a traffic behavior analysis system and / or a central control system.

[0034] Optionally, before writing the traffic object status information into the message queue of the first shared memory, the method further includes:

[0035] Determining that the traffic object status information topic is subscribed by the application client; and / or,

[0036] Before writing the force feedback message into the message queue of the second shared memory, the method further includes:

[0037] Determining that the force feedback message topic is subscribed by the traffic object hardware driving system; and / or,

[0038] Before writing the vehicle operation data into the message queue of the second shared memory, the method further includes:

[0039] It is determined that the vehicle operation data topic is subscribed by the traffic simulation system.

[0040] Optionally, the message queue includes: a queue head and a message storage area, the queue head includes: the pointer information, and the message storage area is used to store the message body; the data structure of the message body includes: a subject identification part, a message header and a payload part, wherein the message header includes: length information of the subject identification and length information of the payload;

[0041] The pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0042] Writing the target message into a message queue of a shared memory comprises:

[0043] According to the size of the target message, modify the initial position of the first write end pointer to the end position, and the difference between the end position and the initial position is equal to the size of the target message;

[0044] The target message is written from the initial position of the first write start pointer until the writing of the target message is completed, and the initial position of the first write start pointer is updated to the end position of the target message.

[0045] Optionally, before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes:

[0046] Acquire the mutex lock;

[0047] The method further includes: starting to write the target message from the initial position of the first write start pointer until the writing of the target message is completed, and updating the initial position of the first write start pointer to the end position of the target message.

[0048] Release the mutex.

[0049] Optionally, before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes:

[0050] Determine that the initial position of the first write start pointer is the same as the initial position of the first write end pointer; or,

[0051] If the initial position of the first write start pointer and the initial position of the first write end pointer are different, the initial position of the first write start pointer and the initial position of the first write end pointer are set to be the same.

[0052] Optionally, setting the initial position of the first write start pointer and the initial position of the first write end pointer to be the same includes:

[0053] The initial position of the first write start pointer is updated to the initial position of the first write end pointer, or the initial position of the first write end pointer is updated to the initial position of the first write start pointer.

[0054] Optionally, before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes:

[0055] It is determined that the size of the target message is less than or equal to the size of the message storage area.

[0056] Optionally, the pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0057] The method further comprises:

[0058] The message body is read from the initial position of the second write end pointer until the initial position of the first write end pointer is read, and the initial position of the second write end pointer is the initial position of the first write end pointer read last time.

[0059] Optionally, the method further includes:

[0060] Obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer does not exceed the boundary of the read message; and / or obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer exceeds the boundary of the read message, then discard the read message.

[0061] Optionally, the step of reading the message body from the initial position of the second write end pointer until the initial position of the first write end pointer is finished reading further includes:

[0062] Determining that the initial position of the second write start pointer is inconsistent with the initial position of the first write start pointer, then determining that there is a message update; and / or,

[0063] It is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body.

[0064] Optionally, also include:

[0065] It is determined that the size of the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is less than or equal to the size of the message storage area.

[0066] In a second aspect, an embodiment of the present application provides an interactive control device for a virtual-reality fusion traffic simulation system, the device comprising:

[0067] An acquisition module, used for acquiring target messages generated by the traffic simulation system;

[0068] A processing module is used to write the target message into a message queue of a shared memory so that an application client or a traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message, wherein the traffic object hardware driver system is used to perform data interaction with a traffic simulation hardware device.

[0069] Optionally, the application client includes: a traffic behavior analysis system and / or a central control system;

[0070] The acquisition module is specifically used to acquire traffic object status information generated by the traffic simulation system;

[0071] The processing module is specifically used to write the traffic object status information into the message queue of the first shared memory, so that the traffic behavior analysis system and / or the central control system access the message queue of the first shared memory to obtain the traffic object status information.

[0072] Optionally, the traffic object status information includes at least one of the following:

[0073] Real-time status information of traffic objects;

[0074] Traffic object sensor data;

[0075] Environmental data.

[0076] Optionally, the acquisition module is specifically used to acquire a force feedback message generated by a traffic simulation system;

[0077] The processing module is specifically configured to write the force feedback message into a message queue of a second shared memory, so that the traffic object hardware driving system accesses the message queue of the second shared memory to obtain the force feedback message.

[0078] Optionally, the force feedback message includes at least one of the following:

[0079] Steering wheel force feedback message;

[0080] Vibration device force feedback message;

[0081] Motion platform force feedback messages.

[0082] Optionally, the acquisition module is further used to acquire the vehicle operation data generated by the hardware driving system of the traffic object;

[0083] The processing module is further used to write the vehicle operation data into a message queue of the second shared memory, so that the traffic simulation system accesses the message queue of the second shared memory to obtain the vehicle operation data.

[0084] Optionally, the vehicle operation data includes at least one of the following:

[0085] Steering wheel angle;

[0086] Accelerator pedal angle;

[0087] Gear position;

[0088] Light status;

[0089] Braking information.

[0090] Optionally, the processing module is further used to determine that the traffic object status information topic is subscribed by the application client; and / or,

[0091] Determining that the force feedback message topic is subscribed by the traffic object hardware driving system; and / or,

[0092] It is determined that the vehicle operation data topic is subscribed by the traffic simulation system.

[0093] Optionally, the message queue includes: a queue head and a message storage area, the queue head includes: the pointer information, and the message storage area is used to store the message body; the data structure of the message body includes: a subject identification part, a message header and a payload part, wherein the message header includes: length information of the subject identification and length information of the payload;

[0094] The pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0095] The processing module is specifically used to modify the initial position of the first write end pointer to the end position according to the size of the target message, and the difference between the end position and the initial position is equal to the size of the target message; write the target message from the initial position of the first write start pointer until the writing of the target message is completed, and update the initial position of the first write start pointer to the end position of the target message.

[0096] Optionally, the processing module is further used to acquire a mutex lock; and release the mutex lock.

[0097] Optionally, the processing module is also used to determine that the initial position of the first write start pointer is the same as the initial position of the first write end pointer; or, if the initial position of the first write start pointer is not the same as the initial position of the first write end pointer, the initial position of the first write start pointer and the initial position of the first write end pointer are set to be the same.

[0098] Optionally, the processing module is specifically configured to update an initial position of the first write start pointer to an initial position of the first write end pointer, or to update an initial position of the first write end pointer to an initial position of the first write start pointer.

[0099] Optionally, the processing module is further used to determine that the size of the target message is less than or equal to the size of the message storage area.

[0100] Optionally, the pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0101] The processing module is also used to read the message body from the initial position of the second write end pointer until the initial position of the first write end pointer is read, and the initial position of the second write end pointer is the initial position of the first write end pointer read last time.

[0102] Optionally, the processing module is also used to obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer does not exceed the boundary of the read message; and / or, obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer exceeds the boundary of the read message, then discard the read message.

[0103] Optionally, the processing module is further configured to determine that an initial position of the second write start pointer is inconsistent with an initial position of the first write start pointer, and then determine that there is a message update; and / or,

[0104] The processing module is further used to determine whether a difference between an initial position of the first write start pointer and an initial position of the second write start pointer is greater than or equal to a length of a message header of the message body.

[0105] Optionally, the processing module is further used to determine that the size of the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is less than or equal to the size of the message storage area.

[0106] In a third aspect, an embodiment of the present application provides an edge computing device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system as described in the first aspect are implemented.

[0107] In a fourth aspect, an embodiment of the present application provides an interactive control system for a virtual-reality integrated traffic simulation system, including an edge computing device as described in the third aspect, wherein the edge computing device is configured with a shared memory-based message queue for interactive control between the traffic simulation system and an application client or a traffic object hardware drive system.

[0108] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system as described in any one of the first aspects are implemented.

[0109] The interactive control method, device, system and equipment of the virtual-reality fusion traffic simulation system provided in the embodiment of the present application obtains the target message generated by the traffic simulation system; writes the target message into the message queue of the shared memory, so that the application client or the traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message. That is, data interaction is carried out through the message queue in the shared memory, and the shared memory can achieve the characteristics of efficient access and unified interface, and the message queue can achieve the advantages of high scalability and decoupling, thereby improving the interactive control efficiency of the virtual-reality fusion traffic simulation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] Figure 1A A structural schematic diagram of a virtual-reality fusion traffic simulation system is provided for an embodiment of the present application;

[0111] Figure 1B A schematic diagram of the structure of a traffic object hardware driving system provided in an embodiment of the present application;

[0112] Figure 2A A schematic diagram of the structure of another virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0113] Figure 2B A structural diagram of another virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0114] Figure 2C A structural schematic diagram of another virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0115] Figure 3 A flow chart of an interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0116] Figure 4A A flow chart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0117] Figure 4B A flowchart of an interactive control method for a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0118] Figure 5A A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0119] Figure 5B A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0120] Fig. 6A A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0121] Figure 6B A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0122] Figure 7 A schematic diagram of a data structure of a message queue provided in an embodiment of the present application;

[0123] Figure 8 A schematic diagram of a data structure of a message body provided in an embodiment of the present application;

[0124] Fig. 9 A schematic diagram of a message writing process provided in an embodiment of the present application;

[0125] Fig.10 A schematic diagram of another message writing process provided in an embodiment of the present application;

[0126] Fig.11 A schematic diagram of a process for writing another message provided in an embodiment of the present application;

[0127] Fig.12 A schematic diagram of another message writing process provided in an embodiment of the present application;

[0128] Fig.13 A schematic diagram of a message reading process provided in an embodiment of the present application;

[0129] Fig.14 A schematic diagram of another message reading process provided in an embodiment of the present application;

[0130] Fig.15 A schematic diagram of another message reading process provided in an embodiment of the present application;

[0131] Fig.16 A schematic diagram of another message reading process provided in an embodiment of the present application;

[0132] Fig.17 A schematic diagram of the structure of an interactive control device for a virtual-reality fusion traffic simulation system provided in an embodiment of the present application;

[0133] Fig.18 This is a schematic diagram of the structure of an edge computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0134] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

[0135] The terms "first", "second", etc. of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of one type, and the number of objects is not limited, for example, the first object can be one or more. In addition, "or" in the present application represents at least one of the connected objects. For example, "A or B" covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B. The character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0136] The term "indication" in this application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, operations to be performed, or request results in the sent indication; an indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the request result according to the judgment result.

[0137] Figure 1A A structural diagram of a virtual-real fusion traffic simulation system is provided for the embodiment of the present application. Figure 1A As shown, the virtual-reality fusion traffic simulation system of this embodiment includes: a traffic simulation system, an application client, a traffic object hardware driving system, and a traffic simulation hardware device.

[0138] The traffic simulation system simulates the movement behavior and physical characteristics of traffic objects, provides real-time feedback to the traffic simulation hardware equipment, and interacts with the driver's operation. Taking the vehicle simulation system as an example, it can include the following modules:

[0139] Physics engine module: used to simulate the real physical environment when the vehicle is running, including the vehicle's dynamics, steering, suspension system, brakes, etc., to ensure that the vehicle's movement behavior in the simulation environment is consistent with the physical laws in the real world, that is, to ensure that the vehicle's movement trajectory and response under various operations and road conditions are accurate.

[0140] Vehicle status management module: used to track and manage the vehicle status information in real time, such as position, speed, acceleration, gear, fuel status and posture, etc. This status information directly affects the vehicle's behavior and simulation results.

[0141] Scenario simulation module: used to build and simulate the external environment in which the vehicle operates, including roads, terrain, obstacles, buildings, and weather conditions. Through highly realistic scenario modeling, a close-to-reality test environment is provided for the vehicle to evaluate its performance and safety under different conditions so that the vehicle can make corresponding safety responses in reality.

[0142] Data interface module: It exchanges data with the traffic object hardware drive system through shared memory and is responsible for data input and output. The input data includes steering wheel angle, accelerator and brake, and the output data includes steering force feedback and vibration signal. It ensures that the traffic simulation system can receive external instructions and data and feed back the simulation results to the traffic object hardware drive system.

[0143] The functions of the traffic simulation system include: vehicle dynamics simulation, real-time interaction and feedback, vehicle status management, environment and scenario simulation, and data synchronization, as follows:

[0144] Vehicle dynamics simulation determines how a vehicle behaves under different driving conditions. Several aspects are considered during refinement, including but not limited to:

[0145] Vehicle model: including parameters such as mass, center of gravity and tire friction.

[0146] Steering system: Calculates the vehicle's steering response based on the steering wheel angle.

[0147] Powertrain: How inputs from the accelerator, brake, and clutch affect the vehicle's acceleration, deceleration, and gear changes.

[0148] Suspension system: simulates the vehicle's response on bumpy roads and provides appropriate vibration feedback.

[0149] Aerodynamics: Simulates air resistance at high speeds and its effect on vehicle handling.

[0150] Real-time interaction and feedback means that the traffic simulation system needs to interact with the hardware drive system in real time, output the simulation status to the hardware device, and receive the driver's input at the same time.

[0151] Vehicle status management is responsible for maintaining various vehicle statuses and providing them to external modules, including but not limited to the following statuses:

[0152] Speed ​​and acceleration: The current vehicle's instantaneous speed, acceleration, and direction change.

[0153] Gear and Throttle: Calculates the vehicle's power output based on hardware inputs.

[0154] Tire-road friction: the effect of different road conditions (such as wet, dry, muddy) on vehicle handling.

[0155] Environment and scenario simulation considers the impact of the external environment on the simulation. The contents considered during simulation also include but are not limited to:

[0156] Road conditions: Different road surfaces (asphalt, dirt, mountain) have different effects on the vehicle's steering and suspension systems.

[0157] Weather conditions: including changes in the vehicle's dynamic characteristics caused by rainy, snowy and other environments, such as longer braking distance and reduced tire grip.

[0158] Data synchronization takes into account the real-time performance of hardware and simulation systems. An efficient data synchronization mechanism is designed that includes the following two functions:

[0159] Low-latency data interaction: Optimize the reading and writing of shared memory to ensure that the interactive control between the device and the simulation system has sufficiently low latency.

[0160] Parallel processing: Use multithreading or asynchronous operations to handle complex physical calculations and device inputs to avoid affecting real-time performance.

[0161] The traffic simulation system and the traffic simulation hardware device exchange data through the traffic object hardware driver system, where the traffic object hardware driver system is as follows: Figure 1B As shown, Figure 1B A structural schematic diagram of a traffic object hardware drive system provided for an embodiment of the present application, as shown in the figure, the traffic object hardware drive system is used to abstract and integrate hardware devices such as Logitech G29, keyboards and sports platforms, and provide a universal interface for data interaction with the simulation platform. It supports the access of different types of hardware devices and synchronizes their input data to the simulation system in real time. At the same time, the traffic object hardware drive system also supports output operations on the hardware, such as force feedback through the steering wheel. The hardware accessed by the traffic object hardware drive system may specifically include but is not limited to the following:

[0162] Steering wheel device: For example, Logitech G29 is a high-performance steering wheel peripheral designed for racing games, which can provide users with a close-to-real driving experience. The input data of the steering wheel device to the traffic object hardware driver system is the steering angle of the steering wheel expressed in percentage and the status of steering wheel buttons such as shift and horn, etc. The output data of the traffic object hardware driver system to the steering wheel device is force feedback information based on the status of the traffic simulation system such as steering resistance and road vibration.

[0163] Pedal device: For example, Speed ​​Magic is a brand of racing simulation driving equipment, and its products include pedal series, such as accelerator, brake and clutch pedals. The input data of the pedal device to the traffic object hardware drive system is the pedal position of the accelerator, brake and clutch expressed in percentage. The traffic object hardware drive system usually does not need to output data for the pedal device, but it can be expanded according to specific needs. For example, the brake pedal can be vibrated according to the state and speed of the anti-lock braking system (ABS) of the simulated vehicle.

[0164] Seats and vibration devices: Provide tactile feedback through built-in vibration motors or vibrators. This feedback can be used to enhance user experience, provide safety warnings, or simulate real environments. Seats and vibration devices usually do not require input data. The output data of the traffic object hardware drive system for seats and vibration devices is the vibration intensity, frequency, etc. calculated based on the vibration data fed back by the simulation platform.

[0165] Motion platform: For example, a 6-DOF motion platform is a device that can simulate the six-DOF motion of an object in three-dimensional space. These six degrees of freedom include three translational degrees of freedom (X-axis, Y-axis, and Z-axis) and three rotational degrees of freedom (pitch around the X-axis, roll around the Y-axis, and yaw around the Z-axis), which can be used for car driving simulation. The input data of the motion platform to the traffic object hardware drive system is the motion posture data of the device, and the output data of the traffic object hardware drive system to the motion platform is the direction, angle, and speed of the platform movement calculated in real time based on the acceleration, steering angle, and other data in the vehicle simulation state.

[0166] The application client includes but is not limited to the traffic behavior analysis system and / or the central control system. The application client interacts with the traffic simulation system for data. The traffic behavior analysis system includes but is not limited to the analysis of vehicles, the analysis of driving behavior, and the analysis of driver behavior status. For example, the traffic behavior analysis system can form charts based on the real-time status data of the vehicle generated by the traffic simulation system, and identify potential problems or optimize the vehicle; it can also analyze the physiological state such as fatigue level corresponding to the driver's driving operation behavior based on the real-time status data of the vehicle generated by the traffic simulation system. The central control system can form the display information of the central control screen based on the real-time status data of the vehicle generated by the traffic simulation system, that is, the real-time status of the vehicle can be displayed on the dashboard.

[0167] The embodiment of the present application does not limit the traffic objects corresponding to the traffic object hardware driving system. The traffic objects include but are not limited to motor vehicles, non-motor vehicles, and walking simulation hardware for simulating the walking of pedestrians / passengers in a traffic simulation system.

[0168] The traffic simulation system of the embodiment of the present application and the application client or the traffic object hardware drive system are interactively controlled based on the message queue in the shared memory, such as Figure 2A As shown, Figure 2A A structural diagram of another virtual-reality fusion traffic simulation system provided in an embodiment of the present application, wherein the traffic simulation system is used to write a target message into a shared memory, the shared memory is used to establish a message queue to write the target message generated by the traffic simulation system, and the application client and the traffic object hardware driver system are used to read the target message from the message queue of the shared memory.

[0169] Combination Figure 2A The virtual-real fusion traffic simulation system shown in the figure is Figure 3 A flowchart of an interactive control method for a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method of this embodiment is as follows:

[0170] S31: Obtain the target message generated by the traffic simulation system.

[0171] Among them, when the traffic simulation system and the application client are interactively controlled, the target message is the traffic object status information, that is, the real-time simulation information of the traffic object; when the traffic simulation system and the traffic object hardware drive system are interactively controlled, the target message is a force feedback message, that is, the traffic object hardware drive system realizes the simulation information of the simulation effect of the traffic simulation hardware device.

[0172] S32: writing the target message into a message queue of a shared memory, so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message.

[0173] The traffic object hardware driving system is used for data interaction with the traffic simulation hardware device.

[0174] It can be understood that when the traffic simulation system and the application client are interactively controlled, the traffic simulation system writes the traffic object status information into the message queue of the shared memory, so that the application client accesses the message queue of the shared memory to obtain the traffic object status information; when the traffic simulation system and the traffic object hardware drive system are interactively controlled, the traffic simulation system writes the force feedback message into the message queue of the shared memory, so that the traffic object hardware drive system accesses the message queue of the shared memory to obtain the force feedback information.

[0175] In this embodiment, the target message generated by the traffic simulation system is obtained; the target message is written into the message queue of the shared memory, so that the application client or the traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message. That is, data interaction is carried out through the message queue in the shared memory, and the shared memory can achieve the characteristics of efficient access and unified interface, and the message queue can achieve the advantages of high scalability and decoupling, thereby improving the interactive control efficiency of the virtual-reality fusion traffic simulation system.

[0176] Figure 2BA structural diagram of another virtual-reality fusion traffic simulation system provided for an embodiment of the present application, wherein data is exchanged between the traffic simulation system and the application client based on a first shared memory, and the first shared memory is based on an application programming interface (API) interaction method. The traffic simulation system is used to write the generated traffic object status information into the first shared memory, and the first shared memory is used to establish a message queue to write the traffic object status information generated by the traffic simulation system, and the application client is used to read the traffic object status information from the message queue of the first shared memory.

[0177] Figure 4A A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is provided. Figure 4A is Figure 3 On the basis of the embodiment shown, further, based on the description of the interaction between the traffic simulation system and the application client, in this embodiment, the application client includes: a traffic behavior analysis system and / or a central control system, such as Figure 4A As shown, the method of this embodiment is as follows:

[0178] S31A: Obtain traffic object status information generated by the traffic simulation system.

[0179] Optionally, the traffic object status information includes at least one of the following:

[0180] Traffic object real-time status information; traffic object sensor data; environmental data.

[0181] Specifically, real-time status information includes position, speed, acceleration, etc. For example, the position indicates the coordinate information of the vehicle on the map, usually expressed in latitude and longitude or map coordinate system, the speed indicates the current speed of the vehicle, usually expressed in kilometers per hour (km / h) or meters per second (m / s), and the acceleration indicates the current acceleration of the vehicle, which is used to simulate acceleration or deceleration.

[0182] Traffic object sensor data: including radar and camera data, etc. For example, radar data is used to detect the distance and speed of objects around the vehicle, and camera data is used to provide visual information.

[0183] Environmental data: including weather conditions and road conditions, etc. Weather conditions include sunny, rainy, and snowy days, and road conditions include dry, slippery, and snowy days.

[0184] S32A: Write the traffic object status information into a message queue of the first shared memory, so that the traffic behavior analysis system and / or the central control system accesses the message queue of the first shared memory to obtain the traffic object status information.

[0185] The modes of interaction between the traffic simulation system and the application client include but are not limited to the following three situations:

[0186] One possible scenario is that the traffic simulation system writes traffic object status information into the message queue of the first shared memory, and the traffic behavior analysis system reads the real-time status information of the traffic object from the message queue of the first shared memory, forms a chart, and identifies potential problems or optimization points for analysis.

[0187] Another possible situation is that the traffic simulation system writes the traffic object status information into the message queue of the first shared memory, and the central control system reads the real-time status information of the traffic object from the message queue of the first shared memory to form a central control screen to monitor the real-time status of the traffic object.

[0188] Another possible situation is that the traffic simulation system writes the traffic object status information into the message queue of the first shared memory, and the traffic behavior analysis system and the central control system read the traffic object status information from the message queue of the first shared memory respectively.

[0189] In this embodiment, by acquiring the traffic object status information generated by the traffic simulation system and writing the traffic object status information into the message queue of the first shared memory, the traffic behavior analysis system and / or the central control system access the message queue of the first shared memory to acquire the traffic object status information. Thus, the interactive control efficiency between the traffic simulation system and the application client is improved.

[0190] Figure 4B A flowchart of an interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is shown below. Figure 4B is Figure 4A On the basis of the embodiment shown, further, before S32A, the method further includes: S30A:

[0191] S30A: Determine that the traffic object status information topic is subscribed by the application client.

[0192] Wherein, each target message corresponds to its own topic name, and the traffic object status information topic is the topic name corresponding to the target message of the traffic object status information, such as the traffic object sensor data topic and the environmental data topic; determine that the traffic object status information topic is subscribed by the application client, that is, the traffic simulation system provides the function of managing and viewing the subscription list, each subscription list includes all application clients that subscribe to a traffic object status information topic name, for example, the traffic behavior analysis system and the central control system both subscribe to the traffic object sensor data topic, then the subscription list corresponding to the traffic object sensor data topic includes the traffic behavior analysis system and the central control system. Determine whether the application client wants to subscribe, if subscribed, record the subscription information of the application client, that is, add the identification information of the application client to the subscription list corresponding to the traffic object status information topic name; if not subscribed, the subscription list corresponding to the traffic object status information topic name is empty, and the subscription identification information corresponding to the traffic object status information topic name is modified to be unsubscribed.

[0193] In this embodiment, by determining that the traffic object status information topic is subscribed by the application client, it is helpful for the application client to accurately obtain the target message corresponding to the traffic object status information topic that it wants to subscribe.

[0194] Figure 2C A structural diagram of another virtual-reality fusion traffic simulation system provided in an embodiment of the present application, wherein data is exchanged between the traffic simulation system and the traffic object hardware drive system based on a second shared memory, and the second shared memory is based on a software development kit (SDK) interaction method. The traffic simulation system is used to write the generated traffic object status information into the second shared memory, the second shared memory is used to establish a message queue to write the force feedback message generated by the traffic simulation system, and the traffic object hardware drive system is used to read the force feedback message from the message queue of the second shared memory.

[0195] Figure 5A A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is shown below. Figure 5A is Figure 3 On the basis of the embodiment shown, further, based on the description of the interaction between the traffic simulation system and the traffic object hardware drive system, this embodiment is mainly used to describe the process of the traffic object hardware drive system obtaining force feedback messages from the traffic simulation system. In this embodiment, Figure 5A As shown, the method of this embodiment is as follows:

[0196] S31B: Obtain force feedback messages generated by the traffic simulation system.

[0197] Optionally, the force feedback message includes at least one of the following:

[0198] Steering wheel force feedback message; vibration device force feedback message; motion platform force feedback message.

[0199] Specifically, taking a simulated vehicle as an example, steering wheel force feedback: the resistance and vibration effects of the steering wheel are calculated in real time according to the state of the simulated vehicle (such as speed, steering angle, road conditions) to enhance the driving experience.

[0200] Vibration device force feedback: Output vibration instructions according to road conditions or collision information in the simulation environment to simulate vibration feedback in real driving.

[0201] Motion Platform Force Feedback: Based on the acceleration and steering data of the simulated vehicle, the platform's movement and tilt angles are adjusted in real time to provide a more immersive driving experience.

[0202] S32B: Write the force feedback message into a message queue of the second shared memory, so that the traffic object hardware driving system accesses the message queue of the second shared memory to obtain the force feedback message.

[0203] Among them, the traffic simulation system writes the force feedback message into the message queue of the second shared memory, and the traffic object hardware driving system reads the force feedback information from the message queue of the second shared memory, and then transmits it to the connected traffic simulation hardware device for operation to simulate the real physical feeling.

[0204] In this embodiment, by acquiring the force feedback message generated by the traffic simulation system and writing the force feedback message into the message queue of the second shared memory, the traffic object hardware driving system accesses the message queue of the second shared memory to acquire the force feedback message. Thus, the interactive control efficiency between the traffic simulation system and the traffic object hardware driving system is improved.

[0205] Figure 5B A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is shown below. Figure 5B is Figure 5A On the basis of the embodiment shown, further, before S32B, it also includes: S30B:

[0206] S30B: Determine that the force feedback message topic is subscribed by the traffic object hardware driving system.

[0207] Wherein, the force feedback message topic is the topic name corresponding to the target message of the force feedback message, such as the steering wheel force feedback topic, the vibration device force feedback topic and the motion platform force feedback topic; it is determined that the force feedback message topic is subscribed by the traffic object hardware driver system, that is, each subscription list provided by the traffic simulation system also includes a traffic object hardware driver system corresponding to a force feedback message topic name, for example, the traffic object hardware driver system subscribes to the steering wheel force feedback topic, and the subscription list corresponding to the steering wheel force feedback topic includes the traffic object hardware driver system. Determine whether the traffic object hardware driver system is to subscribe, if subscribed, record the subscription information of the traffic object hardware driver system, that is, add the identification information of the traffic object hardware driver system to the subscription list corresponding to the force feedback message topic name; if not subscribed, the subscription list corresponding to the force feedback message topic name is empty, and the subscription identification information corresponding to the force feedback message topic name is modified to be unsubscribed.

[0208] In this embodiment, by determining that the force feedback message topic is subscribed by the traffic object hardware driving system, it is helpful for the traffic object hardware driving system to accurately obtain the target message corresponding to the force feedback message topic that it wants to subscribe to.

[0209] like Figure 2C As shown, the traffic object hardware drive system is also used to write the generated vehicle operation data into the second shared memory, and the second shared memory is also used to establish a message queue to write the vehicle operation data generated by the traffic object hardware drive system, and the traffic simulation system is also used to read the vehicle operation data from the message queue of the second shared memory.

[0210] Fig. 6A A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is provided. This embodiment is mainly used to describe the process of the traffic simulation system obtaining the vehicle operation data of the traffic object hardware drive system. The scheme of this embodiment can be executed independently or in combination with the above-mentioned embodiment. The method of this embodiment is as follows:

[0211] S61: Acquire the vehicle operation data generated by the hardware driving system of the traffic object.

[0212] Optionally, the vehicle operation data includes at least one of the following:

[0213] Steering wheel angle; accelerator pedal angle; gear position; light status; brake information.

[0214] Specifically, steering wheel angle: used to determine the turning situation of traffic objects.

[0215] Accelerator pedal angle: reflects the degree to which the driver presses the accelerator.

[0216] Gear position: The gear position of the traffic object's speed.

[0217] Lighting status: including the status of headlights, turn signals, etc.

[0218] Braking information: including the position of the brake pedal and the braking force, etc.

[0219] The traffic operation data generated by the traffic object hardware driving system is the operation data of the traffic simulation hardware device.

[0220] S62: Write the vehicle operation data into a message queue of the second shared memory, so that the traffic simulation system accesses the message queue of the second shared memory to obtain the vehicle operation data.

[0221] The traffic object hardware driving system writes the traffic tool operation data into the message queue of the second shared memory, and the traffic simulation system reads the traffic tool operation data from the message queue of the second shared memory to calculate the corresponding force feedback.

[0222] In this embodiment, by acquiring the vehicle operation data generated by the traffic object hardware driving system and writing the vehicle operation data into the message queue of the second shared memory, the traffic simulation system accesses the message queue of the second shared memory to acquire the vehicle operation data. Thus, the interactive control efficiency between the traffic simulation system and the traffic object hardware driving system is improved.

[0223] Figure 6B A flowchart of another interactive control method of a virtual-reality fusion traffic simulation system provided in an embodiment of the present application is shown below. Figure 6B is Fig. 6A On the basis of the embodiment shown, further, before S62, the process further includes: S60:

[0224] S60: Determine whether the vehicle operation data topic is subscribed by the traffic simulation system.

[0225] Wherein, the vehicle operation data topic is the topic name corresponding to the target message of the vehicle operation data, such as the steering wheel angle topic and the accelerator pedal angle topic, etc.; determine that the vehicle operation data topic is subscribed by the traffic simulation system, that is, the traffic object hardware drive system also provides the function of managing and viewing the subscription list, each subscription list includes a subscription to a traffic simulation system corresponding to the vehicle operation data topic name, for example, the traffic simulation system subscribes to the steering wheel angle topic, then the subscription list corresponding to the steering wheel angle topic includes the traffic simulation system. Determine whether the traffic simulation system is to be subscribed, if subscribed, record the subscription information of the traffic simulation system, that is, add the identification information of the traffic simulation system to the subscription list corresponding to the vehicle operation data topic name; if not subscribed, the subscription list corresponding to the vehicle operation data topic name is empty, and the subscription identification information corresponding to the vehicle operation data topic name is modified to be unsubscribed.

[0226] In this embodiment, by determining that the vehicle operation data topic is subscribed by the traffic simulation system, it is helpful for the traffic simulation system to accurately obtain the target message corresponding to the vehicle operation data topic that it wants to subscribe.

[0227] In the above embodiment, the application client can access the traffic object status information generated by the traffic simulation system by subscribing to the traffic object status information topic, and the traffic object hardware drive system can access the force feedback message generated by the traffic simulation system by subscribing to the force feedback message topic; the traffic simulation system can access the vehicle operation data generated by the traffic object hardware drive system by subscribing to the vehicle operation data topic.

[0228] The implementation methods of establishing a message queue in a shared memory in the embodiment of the present application include but are not limited to the following possible implementation methods:

[0229] like Figure 7 As shown, Figure 7 A schematic diagram of the data structure of a message queue provided in an embodiment of the present application, wherein a queue head 71 is defined in a shared memory, wherein the queue head 71 is used to store pointer information, and the pointer information may specifically be: a write start pointer (also referred to as a head pointer) and a write end pointer (also referred to as a tail pointer); a message storage area 72 is defined, and the message storage area is used to store a message body, thereby realizing the establishment of a message queue in the shared memory.

[0230] The embodiment of the present application also defines a data structure of the message body, such as Figure 8 As shown, Figure 8This is a schematic diagram of a data structure of a message body provided by an embodiment of the present application. The message body includes: a message header 81, a payload part 82, and a subject identification part 83. The message header includes the length information of the subject identification and the length information of the payload. The subject identification part is used to carry the subject identification information, and the payload part is used to carry the message content. The data structure of the message body can be applied to some scenarios of inter-process interactive control based on themes. Inter-process interactive control based on themes can improve system flexibility, scalability, and decoupling.

[0231] The interactive control process of the embodiment of the present application generally involves the writing process and the reading process of the message. The writing process and the reading process of the message queue established in the shared memory are introduced below.

[0232] During the writing process and the reading process, it may involve obtaining the write start pointer and / or the write end pointer from the queue head, and the process itself will also record the write start pointer and / or the write end pointer locally. For the convenience of description, in the following embodiments of the present application, the write start pointer stored in the queue head is described as the first write start pointer, and the write end pointer is described as the first write end pointer; the write start pointer recorded locally by the process is described as the second write start pointer, and the write end pointer is described as the second write end pointer.

[0233] During the writing process, the positions indicated by the first write start pointer and the first write end pointer are updated. For the convenience of description, before the writing process starts, the position indicated by the first write start pointer is described as the initial position of the first write start pointer, and the position indicated by the first write end pointer is described as the initial position of the first write end pointer. During the writing process, the end position of the writing is determined based on the size of the target message. The initial position of the first write end pointer and the initial position of the first write start pointer are updated based on the end position of the writing.

[0234] under Figures 9 to 12 The description provides different embodiments of the message writing process provided by the embodiments of the present application.

[0235] Fig. 9 A schematic diagram of a message writing process provided in an embodiment of the present application, Fig. 9 is Figure 3 Based on the embodiment shown, a possible implementation method of writing the target message into the message queue of the shared memory in S32 is described as follows: Fig. 9 As shown, the process of this embodiment is as follows:

[0236] S91: According to the size of the target message, modify the initial position of the first write end pointer to the end position, and the difference between the end position and the initial position is equal to the size of the target message.

[0237] The difference between the end position and the initial position is equal to the size of the target message.

[0238] When a process wants to write a message, it determines how much memory space is required based on the size of the target message, and then determines the end position of writing based on the size of the required memory space, and modifies the initial position of the first write end pointer to the end position.

[0239] For example, the initial position of the first write end pointer is 0x1000, and the size of the target message is 200 bytes. Based on the initial position of the first write pointer and the size of the target message, it can be determined that the end position is 0x1000 plus 200 bytes, that is, 0x1140. Then the initial position of the first write end pointer is offset backward by 200 bytes, that is, updated from 0x1000 to 0x1140.

[0240] S92: Start writing the target message from the initial position of the first write start pointer until the writing of the target message is completed, and update the initial position of the first write start pointer to the end position of the target message.

[0241] In combination with the previous example, assume that: the initial position of the first write start pointer is 0x1000, and the size of the target message is 200 bytes. Then, the process will start writing the message from the shared memory address 0x1000 until all 200 bytes of data to be written are written. The end position of the target message is 0x1140, and the initial position of the first write start pointer is updated to the end position of the target message, that is, 0x1140. That is, the initial position of the first write start pointer is updated from 0x1000 to 0x1140.

[0242] In this embodiment, the initial position of the first write end pointer is modified to the end position according to the size of the target message, the target message is written from the initial position of the first write pointer until the writing of the target message is completed, and the initial position of the first write start pointer is updated to the end position of the target message, thereby completing the writing process of the message queue based on the shared memory and improving the efficiency of message writing.

[0243] In the embodiment of the present application, there is a concurrency problem in the interactive control between multiple processes based on the message queue of the shared memory. In order to ensure the validity of the written and read data, the embodiment of the present application can perform concurrency control through but not limited to the following possible implementation methods, for example, through read-write locks, sequential locks, spin locks or mutex locks, etc. to perform concurrency control to ensure the validity of the written and read data. The following takes the use of mutex locks for concurrency control during the writing process as an example to describe the technical solution of the embodiment of the present application. Fig.10 As shown, Fig.10 is Fig. 9On the basis of the illustrated embodiment, further, before S91, it may also include: S1001, and after S92, it may also include: S1002.

[0244] S1001: Acquire a mutex lock.

[0245] When a process wants to write a message, it first acquires the mutex lock. After the process acquires the mutex lock, it means that no other process can write before the process releases the mutex lock, thus ensuring the consistency of data during the writing process. After the process acquires the mutex lock, other processes will be blocked or suspended if they try to acquire the same mutex lock until the process completes the writing and releases the mutex lock.

[0246] After the process successfully acquires the mutex lock, the process starts writing the data to be written. After the data is written, S1002 is executed.

[0247] S1002: Release the mutex lock.

[0248] When the process finishes writing data, the mutex lock is released, which means that other processes waiting to acquire the mutex lock or processes that subsequently request to acquire the mutex lock will have the opportunity to acquire the mutex lock and start writing operations.

[0249] In this embodiment, the process acquires a mutex lock before starting to write data, and releases the mutex lock after writing data is completed, thereby ensuring the consistency of data during the writing process.

[0250] In some cases, a write exception may occur, which may cause the initial position of the first write start pointer to be inconsistent with the initial position of the first write end pointer. The write exception indicates that the last write data is invalid, so it is necessary to ignore the last write data, or overwrite the last write data. Before writing starts, it is necessary to make the initial position of the first write start pointer and the initial position of the first write end pointer the same. Fig.11 As shown, Fig.11 is Fig.10 On the basis of the embodiment shown, further, before S91, the method further includes:

[0251] S1101: Determine whether the initial position of the first write start pointer and the initial position of the first write end pointer are the same. If it is determined that the initial position of the first write start pointer and the initial position of the first write end pointer are the same, execute S1101; if it is determined that the initial position of the first write start pointer and the initial position of the first write end pointer are not the same, execute S1102.

[0252] S1102: setting an initial position of the first write start pointer and an initial position of the first write end pointer to be the same.

[0253] Optionally, an implementation manner is: updating the initial position of the first write start pointer to the initial position of the first write end pointer.

[0254] For example, if the initial position of the first write start pointer is 0x1000 and the initial position of the first write end pointer is 0x1100, then the initial position of the first write start pointer is updated from 0x1000 to 0x1100.

[0255] Another implementation manner is: updating the initial position of the first write end pointer to the initial position of the first write start pointer.

[0256] In combination with the above example, the initial position of the first write end pointer is updated from 0x1100 to 0x1000.

[0257] In this embodiment, before writing starts, the initial position of the first write start pointer and the initial position of the first write end pointer are set to be the same, thereby avoiding that the abnormality of the data written last time causes the abnormality of the data written this time.

[0258] In some cases, the size of some process target messages may be too large and exceed the size of the message storage area, resulting in incomplete message writing, that is, the first message written is overwritten by the message written later. In order to avoid this situation, the embodiment of the present application further executes S1103 before writing the message. Fig.12 As shown:

[0259] S1103: Determine whether the size of the target message is less than or equal to the size of the message storage area.

[0260] If it is determined that the size of the target message is less than or equal to the size of the message storage area, S1101 is executed; if it is determined that the size of the target message is greater than the size of the storage area, S1104 is executed.

[0261] S1104: Output abnormal information.

[0262] In this embodiment, before writing the message, it is determined whether the size of the target message is less than or equal to the size of the message storage area to determine whether to perform the write operation, thereby avoiding the situation where the message is incompletely written due to the message being too large and determining the validity of the message writing.

[0263] under Figures 13 to 17 The described embodiments of the present application provide different embodiments of the message reading process.

[0264] Fig.13 A schematic diagram of a message reading process provided in an embodiment of the present application, Fig.13 is Figure 3 Based on the embodiment shown, a possible implementation method of the application client or the traffic object hardware driving system reading the target message from the message queue of the shared memory is described, such as Fig.13 As shown, the process of this embodiment is as follows:

[0265] S1301: Start reading the message body from the initial position of the second write end pointer until the initial position of the first write end pointer is finished.

[0266] The initial position of the second write end pointer is the initial position of the first write end pointer read last time.

[0267] After each message reading, the process will locally record the initial position of the first write end pointer and the initial position of the first write start pointer. From the initial position of the second write end pointer, parse the message header of the message body to obtain the length information of the payload in the message header; read the payload based on the length information of the payload until the initial position of the first write end pointer is read.

[0268] For example, suppose a process recorded the initial position of the first write end pointer as memory address 0x1000 in the previous read operation, and this is the end position of the previous message read. The process will use this address as the initial position of the second write end pointer when reading the message next time. The process starts parsing the message body from address 0x1000, first reading the message header to obtain the length information of the payload. Once the length of the payload is obtained, the process starts from the current position and reads data according to the length of the payload until it reaches the initial position of the first write end pointer in this read operation, which is assumed to be memory address 0x1500. In this way, the process has completed the reading of the entire message body from the end position of the previous message to the end position of this message.

[0269] In this embodiment, through the initial position of the second write end pointer and the initial position of the first write end pointer, it is determined to start reading the message body from the initial position of the second write end pointer until the reading of the initial position of the first write end pointer is completed, thereby realizing the reading operation of the message queue based on the shared memory.

[0270] The technical solution provided by the embodiment of the present application supports parallel reading and writing operations. Therefore, it may happen that during the reading process, other processes are performing writing operations. The writing operation may cause the data content being read by the current reading operation to be overwritten. Therefore, in order to ensure the validity of the read message, the embodiment of the present application Fig.13 Based on the embodiment shown, further, after the reading is completed, it also includes: executing S1302, such as Fig.14 As shown:

[0271] S1302: Obtain the initial position of the first write end pointer from the queue head, and determine whether the initial position of the first write end pointer exceeds the boundary of the read message. If it is determined that the initial position of the first write end pointer exceeds the boundary of the read message, execute S1304; if it is determined that the initial position of the first write end pointer does not exceed the boundary of the read message, the process ends.

[0272] For example: Assume that the size of the message storage area is 4,000 bytes. At a certain moment, the process records the initial position of the second write start pointer as memory address 0x3000. Later, due to high-frequency write operations, the initial position of the first write start pointer is updated to 0x5000. At this time, the difference between the two pointers is 2,000 bytes, which is less than the size of the message storage area. Therefore, the process can safely read messages from the initial position of the second write start pointer 0x3000 until the current position of the first write start pointer 0x5000.

[0273] However, if during this process, an additional write operation occurs, causing the initial position of the first write start pointer to be further updated to 0x8000. At this time, the difference between the two pointers becomes 5,000 bytes, which exceeds the size of the message storage area. In this case, since the message storage area is designed as a circular buffer, some of the earliest messages may have been overwritten by the newly written messages. Therefore, the message data starting from the initial position 0x3000 of the second write start pointer will no longer be valid. Therefore, the initial position of the first write end pointer obtained from the queue head is 0x8000, which exceeds the boundary of the read message, that is, the read message has become invalid data.

[0274] S1304: Discard the read data.

[0275] If it is determined that the initial position of the first write end pointer exceeds the boundary of the read message, the data content read by the current read operation may have been overwritten by the write operation, and therefore the read data content is invalid data.

[0276] In this embodiment, the validity of the read message is ensured by obtaining the initial position of the first write end pointer from the queue head and determining that the initial position of the first write end pointer does not exceed the boundary of the read message.

[0277] Fig.15 A schematic diagram of another message reading process provided in an embodiment of the present application, Fig.15 is Fig.14 Based on the embodiment shown, further, before reading the message, it also includes: determining whether there is a message update in the message queue, wherein a possible implementation is as follows Fig.15 As shown, before executing S1301, the process further includes: executing S1300:

[0278] S1300: Determine that the initial position of the second write start pointer is inconsistent with the initial position of the first write start pointer, and then determine that there is a message update.

[0279] Since the initial position of the first write start pointer is updated each time a write operation is performed, it can be determined whether there is a message update based on whether the initial position of the first write start pointer is consistent with the initial position of the second write start pointer.

[0280] For example, in a specific implementation scenario, the process first checks the initial position of the current second write start pointer, which is recorded by the process after the last read operation. If this position is inconsistent with the initial position of the current first write start pointer, it means that a new message has been written to the message queue since the last read. This method allows the process to quickly determine whether a new message has arrived between two read operations without additional polling or waiting. If the two pointer positions are consistent, it can be considered that there are no new messages since the last check, and the process can choose not to perform a read operation, thereby saving resources and improving efficiency.

[0281] For example, at a certain point in time, after the process completes a read operation, it records the initial position of the second write start pointer as memory address 0x2000. Before the next read operation, the process checks the initial position of the first write start pointer at this time and finds that it has moved to the new memory address 0x2500. This change indicates that a new message has been written between these two addresses. Therefore, the process will start from the initial position 0x2000 of the second write start pointer and read to the new position 0x2500 to obtain all messages that arrived during this period.

[0282] In this embodiment, by determining that the initial position of the second write start pointer is inconsistent with the initial position of the first write start pointer, it is determined that there is a message update, thereby determining whether there is a message update, thereby ensuring the efficiency and timeliness of the message reading operation, so that the process can be aware of the arrival of a new message and process it in a timely manner.

[0283] Since each message includes a message header, the size of the message header is fixed, for example, 12 bytes. Therefore, if the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is smaller than the length of the message header of the message body, it means that the written message is an invalid message. In order to avoid reading such invalid data, after executing S1300, S1601 is further executed. Fig.16 As shown:

[0284] S1601: Determine whether the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body.

[0285] If it is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body, S1301 is executed; if it is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is equal to the length of the message header of the message body, it means that there is no valid message update in the message queue, and the process returns to S1300.

[0286] In this embodiment, whether the updated data is valid is determined by determining whether the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body, so as to avoid unnecessary reading process and waste of resources.

[0287] In some cases, the difference between the initial position of the first write start pointer and the initial position of the second write start pointer may be greater than the size of the message storage area. This may occur when the message is not read in time, for example, two or more write operations have occurred after the last read, and the total size of the written data has exceeded the size of the message storage area. Therefore, before reading the data, it also includes: S1602:

[0288] S1602: Determine whether the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is smaller than or equal to the size of the message storage area.

[0289] If it is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is less than or equal to the size of the message storage area, the data can be read; if it is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is not less than or equal to the size of the message storage area, it means that the total size of the written data has exceeded the size of the message storage area, and therefore the message is invalid.

[0290] For example: Assume that the size of the message storage area is 4,000 bytes. At a certain moment, the process records the initial position of the second write start pointer as memory address 0x3000. Later, due to high-frequency write operations, the initial position of the first write start pointer is updated to 0x5000. At this time, the difference between the two pointers is 2,000 bytes, which is less than the size of the message storage area; however, before the message reading process performs this reading, an additional write operation occurs, causing the initial position of the first write start pointer to be further updated to 0x8000. At this time, the difference between the two pointers becomes 5,000 bytes, which exceeds the size of the message storage area. In this case, since the message storage area is designed as a circular buffer, some of the earliest messages may have been overwritten by the newly written messages, so the message data starting from the initial position 0x3000 of the second write start pointer will no longer be valid.

[0291] This embodiment determines whether data can be read from the position of the second write start pointer by comparing the difference between the first write start pointer and the second write start pointer with the size of the message storage area. If the difference is within the allowed range, it means that the message from this position to the position of the first write start pointer is complete and valid. If the difference exceeds the size of the message storage area, it means that data overwriting has occurred and the data is invalid.

[0292] Optionally, in order to ensure that the read message is valid, before reading the message, it is determined whether the message header is correct based on the checksum in the message header.

[0293] Fig.17 A structural schematic diagram of an interactive control device for a virtual-reality fusion traffic simulation system is provided for an embodiment of the present application, such as Fig.17 As shown, the device of this embodiment includes: an acquisition module 1701 and a processing module 1702, wherein:

[0294] An acquisition module 1701 is used to acquire a target message generated by a traffic simulation system;

[0295] Processing module 1702 is used to write the target message into the message queue of the shared memory so that the application client or the traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message, wherein the traffic object hardware driver system is used to interact with the traffic simulation hardware device for data.

[0296] Optionally, the application client includes: a traffic behavior analysis system and / or a central control system;

[0297] The acquisition module 1701 is specifically used to acquire the traffic object status information generated by the traffic simulation system;

[0298] The processing module 1702 is specifically used to write the traffic object status information into the message queue of the first shared memory, so that the traffic behavior analysis system and / or the central control system access the message queue of the first shared memory to obtain the traffic object status information.

[0299] Optionally, the traffic object status information includes at least one of the following:

[0300] Real-time status information of traffic objects;

[0301] Traffic object sensor data;

[0302] Environmental data.

[0303] Optionally, the acquisition module 1701 is specifically used to acquire a force feedback message generated by a traffic simulation system;

[0304] The processing module 1702 is specifically configured to write the force feedback message into a message queue of the second shared memory, so that the traffic object hardware driving system accesses the message queue of the second shared memory to obtain the force feedback message.

[0305] Optionally, the force feedback message includes at least one of the following:

[0306] Steering wheel force feedback message;

[0307] Vibration device force feedback message;

[0308] Motion platform force feedback messages.

[0309] Optionally, the acquisition module 1701 is further used to acquire the vehicle operation data generated by the hardware driving system of the traffic object;

[0310] The processing module 1702 is further configured to write the vehicle operation data into a message queue of the second shared memory, so that the traffic simulation system accesses the message queue of the second shared memory to obtain the vehicle operation data.

[0311] Optionally, the vehicle operation data includes at least one of the following:

[0312] Steering wheel angle;

[0313] Accelerator pedal angle;

[0314] Gear position;

[0315] Light status;

[0316] Braking information.

[0317] Optionally, the processing module 1702 is further configured to determine that the traffic object status information topic is subscribed by an application client; and / or,

[0318] Determining that the force feedback message topic is subscribed by the traffic object hardware driving system; and / or,

[0319] It is determined that the vehicle operation data topic is subscribed by the traffic simulation system.

[0320] Optionally, the message queue includes: a queue head and a message storage area, the queue head includes: the pointer information, and the message storage area is used to store the message body; the data structure of the message body includes: a subject identification part, a message header and a payload part, wherein the message header includes: length information of the subject identification and length information of the payload;

[0321] The pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0322] The processing module 1702 is specifically used to modify the initial position of the first write end pointer to the end position according to the size of the target message, and the difference between the end position and the initial position is equal to the size of the target message; write the target message from the initial position of the first write start pointer until the writing of the target message is completed, and update the initial position of the first write start pointer to the end position of the target message.

[0323] Optionally, the processing module 1702 is further configured to acquire a mutex lock; and release the mutex lock.

[0324] Optionally, the processing module 1702 is further configured to determine that an initial position of the first write start pointer is the same as an initial position of the first write end pointer; or,

[0325] If the initial position of the first write start pointer and the initial position of the first write end pointer are different, the initial position of the first write start pointer and the initial position of the first write end pointer are set to be the same.

[0326] Optionally, the processing module 1702 is specifically configured to update the initial position of the first write start pointer to the initial position of the first write end pointer, or to update the initial position of the first write end pointer to the initial position of the first write start pointer.

[0327] Optionally, the processing module 1702 is further used to determine that the size of the target message is less than or equal to the size of the message storage area.

[0328] Optionally, the pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer;

[0329] The processing module 1702 is also used to read the message body from the initial position of the second write end pointer until the initial position of the first write end pointer is read, and the initial position of the second write end pointer is the initial position of the first write end pointer read last time.

[0330] Optionally, the processing module 1702 is also used to obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer does not exceed the boundary of the read message; and / or, obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer exceeds the boundary of the read message, then discard the read message.

[0331] Optionally, the processing module 1702 is also used to determine that if the initial position of the second write start pointer is inconsistent with the initial position of the first write start pointer, then determine that there is a message update; and / or determine that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body.

[0332] Optionally, the processing module 1702 is further configured to determine whether a difference between an initial position of the first write start pointer and an initial position of the second write start pointer is smaller than or equal to a size of the message storage area.

[0333] The device of this embodiment can be used to execute the technical solutions of the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0334] An embodiment of the present application also provides an edge computing device, including a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system described in the above method embodiments are implemented.

[0335] An embodiment of the present application also provides an interactive control system for a virtual-reality fusion traffic simulation system, including an edge computing device as described above, wherein the edge computing device is configured with a message queue based on a shared memory to enable interactive control between the traffic simulation system and an application client or a traffic object hardware drive system.

[0336] An embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system as described in the above-mentioned method embodiments are implemented.

[0337] The following specific reference Fig.18, which shows a schematic diagram of the structure of an edge computing device 700 suitable for implementing the embodiment of the present application. The edge computing device 700 in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The edge computing device shown is only an example and should not bring any limitations to the functions and occupancy range of the embodiments of the present application.

[0338] like Fig.18 As shown, the edge computing device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. In RAM 703, various programs and data required for the operation of the edge computing device 600 are also stored. The processing device 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0339] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a tape, a hard disk, etc.; and interactive control devices 709. The interactive control device 709 may allow the edge computing device 700 to perform wireless or wired interactive control with other devices to exchange data. Although an edge computing device 700 having various devices is shown, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.

[0340] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the interactive control device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the MES management method of the embodiment of the present application are executed.

[0341] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0342] In some embodiments, the user end and the management end can use any currently known or future developed network protocol such as HTTP (HyperText TransferProtocol) for interactive control, and can be interconnected with any form or medium of digital data interactive control (e.g., interactive control network). Examples of interactive control networks include local area networks ("LAN"), wide area networks ("WAN"), internets (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.

[0343] The above-mentioned computer-readable medium may be included in the above-mentioned edge computing device; or it may exist independently without being assembled into the edge computing device.

[0344] The computer-readable medium carries one or more programs. When the one or more programs are executed by the edge computing device, the edge computing device:

[0345] Obtain target messages generated by the traffic simulation system;

[0346] The target message is written into a message queue of a shared memory, so that an application client or a traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message, wherein the traffic object hardware driver system is used to perform data interaction with a traffic simulation hardware device.

[0347] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0348] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0349] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.

[0350] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0351] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0352] According to one or more embodiments of the present application, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to execute any MES management method as provided in the embodiments of the present application.

[0353] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

[0354] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or to be performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the application. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0355] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An interactive control method for a virtual-reality fusion traffic simulation system, characterized in that: include: Obtain target messages generated by the traffic simulation system; The target message is written into a message queue of a shared memory, so that an application client or a traffic object hardware driver system accesses the message queue of the shared memory to obtain the target message, wherein the traffic object hardware driver system is used to perform data interaction with a traffic simulation hardware device.

2. The method according to claim 1, characterized in that The application client includes: a traffic behavior analysis system and / or a central control system; The step of obtaining the target message generated by the traffic simulation system includes: Obtain traffic object status information generated by the traffic simulation system; The step of writing the target message into a message queue of a shared memory so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message includes: The traffic object status information is written into a message queue of the first shared memory, so that the traffic behavior analysis system and / or the central control system accesses the message queue of the first shared memory to obtain the traffic object status information; the traffic object status information includes at least one of the following: Real-time status information of traffic objects; Traffic object sensor data; Environmental data.

3. The method according to claim 1, characterized in that The step of obtaining the target message generated by the traffic simulation system includes: Obtain force feedback messages generated by the traffic simulation system; The step of writing the target message into a message queue of a shared memory so that an application client or a traffic object hardware driving system accesses the message queue of the shared memory to obtain the target message includes: The force feedback message is written into a message queue of the second shared memory, so that the traffic object hardware driving system accesses the message queue of the second shared memory to obtain the force feedback message; the force feedback message includes at least one of the following: Steering wheel force feedback message; Vibration device force feedback message; Motion platform force feedback messages.

4. The method according to claim 3, characterized in that Also includes: Acquire vehicle operation data generated by a hardware drive system of a traffic object; The vehicle operation data is written into a message queue of the second shared memory, so that the traffic simulation system accesses the message queue of the second shared memory to obtain the vehicle operation data; the vehicle operation data includes at least one of the following: Steering wheel angle; Accelerator pedal angle; Gear position; Light status; Braking information.

5. The method according to claim 4, characterized in that: Before writing the traffic object status information into the message queue of the first shared memory, the method further includes: Determining that the traffic object status information topic is subscribed by the application client; and / or, Before writing the force feedback message into the message queue of the second shared memory, the method further includes: Determining that the force feedback message topic is subscribed by the traffic object hardware driving system; and / or, Before writing the vehicle operation data into the message queue of the second shared memory, the method further includes: It is determined that the vehicle operation data topic is subscribed by the traffic simulation system.

6. The method according to any one of claims 1 to 5, characterized in that: The message queue includes: a queue head and a message storage area, wherein the queue head includes: pointer information, and the message storage area is used to store a message body; the data structure of the message body includes: a subject identification part, a message header and a payload part, wherein the message header includes: length information of the subject identification and length information of the payload; The pointer information includes: an initial position of a first write start pointer and an initial position of a first write end pointer; Writing the target message into a message queue of a shared memory comprises: According to the size of the target message, modify the initial position of the first write end pointer to the end position, and the difference between the end position and the initial position is equal to the size of the target message; The target message is written from the initial position of the first write start pointer until the writing of the target message is completed, and the initial position of the first write start pointer is updated to the end position of the target message.

7. The method according to claim 6, characterized in that Before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes: Acquire the mutex lock; The method further includes: starting to write the target message from the initial position of the first write start pointer until the writing of the target message is completed, and updating the initial position of the first write start pointer to the end position of the target message. Release the mutex.

8. The method according to claim 7, characterized in that Before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes: Determine that the initial position of the first write start pointer is the same as the initial position of the first write end pointer; or, If the initial position of the first write start pointer and the initial position of the first write end pointer are different, the initial position of the first write start pointer and the initial position of the first write end pointer are set to be the same.

9. The method according to claim 8, characterized in that The step of setting the initial position of the first write start pointer and the initial position of the first write end pointer to be the same includes: The initial position of the first write start pointer is updated to the initial position of the first write end pointer, or the initial position of the first write end pointer is updated to the initial position of the first write start pointer.

10. The method according to claim 6, characterized in that Before modifying the initial position of the first write end pointer to the end position according to the size of the target message, the method further includes: It is determined that the size of the target message is less than or equal to the size of the message storage area.

11. The method according to claim 6, characterized in that The pointer information includes: an initial position of a first write start pointer and an initial position of the first write end pointer; The method further comprises: The message body is read from the initial position of the second write end pointer until the initial position of the first write end pointer is read, and the initial position of the second write end pointer is the initial position of the first write end pointer read last time.

12. The method according to claim 11, characterized in that After the reading of the initial position of the first write end pointer is completed, the method further includes: Obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer does not exceed the boundary of the read message; and / or obtain the initial position of the first write end pointer from the queue head, and determine that the initial position of the first write end pointer exceeds the boundary of the read message, then discard the read message.

13. The method according to claim 11, characterized in that: The method of reading the message body from the initial position of the second write end pointer until the initial position of the first write end pointer is finished reading further includes: Determining that the initial position of the second write start pointer is inconsistent with the initial position of the first write start pointer, then determining that there is a message update; and / or, It is determined that the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is greater than or equal to the length of the message header of the message body.

14. The method according to claim 13, characterized in that Also includes: It is determined that the size of the difference between the initial position of the first write start pointer and the initial position of the second write start pointer is less than or equal to the size of the message storage area.

15. A computing device, characterized in that: It includes a processor and a memory, the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system as described in any one of claims 1 to 14 are implemented.

16. An interactive control system for a virtual-reality fusion traffic simulation system, characterized in that: It includes a computing device as described in claim 15, wherein the computing device is configured with a message queue based on a shared memory to provide interactive control between the traffic simulation system and the application client or the traffic object hardware driving system.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the interactive control method of the virtual-reality fusion traffic simulation system as described in any one of claims 1 to 14 are implemented.