Data transmission delay simulation method, system and driving tool

Through the collaborative work of the simulation clock module and the delay configuration module, the timing of clock signal transmission is dynamically adjusted, which solves the problem of insufficient computing performance caused by the consistency of the simulation clock and the device system clock in the existing technology, and achieves the stability of the module operating frequency and the editability and reproducibility of the simulation results.

CN119629069BActive Publication Date: 2025-09-23GUANGDONG HUITIAN AEROSPACE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411836326.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-09-23
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

In existing vehicle network data transmission delay simulation solutions, the simulation clock is consistent with the device system clock, resulting in the module calculation speed being related to the device performance. When the computing performance is insufficient, the module operating frequency is difficult to meet the requirements, and the network delay simulation is not editable and reproducible.

Method used

The simulation clock module is used to iteratively execute simulation operations and broadcast the current frame clock signal. The target simulation function module responds and calculates data. The simulation delay configuration module generates delay information and dynamically adjusts the timing of sending the clock signal to ensure that all modules complete the current frame simulation before sending the next frame signal. The model of the simulation delay configuration module is used to simulate different delay scenarios.

Benefits of technology

The stability of the module operating frequency and the editability and reproducibility of the simulation results are achieved when the computing performance is insufficient, ensuring the accuracy of the simulation results and the efficient use of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629069B_ABST
    Figure CN119629069B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data transmission, and discloses a simulation method, system and driving tool for data transmission delay. The simulation clock module of the present invention broadcasts the current frame clock signal targeted by the simulation operation, the target simulation function module obtains function data, the simulation delay configuration module generates delay information of the current frame data, the target simulation function module outputs function data based on the delay information of the current frame data, and sends current frame processing completion information. When determining that all simulation function modules have completed the simulation of the current frame, the simulation clock module determines that the simulation operation is completed, iteratively executes the simulation operation, and adjusts the timing of sending the clock signal according to the feedback of the completion of the operation of each simulation function module to ensure that each module can complete the operation of the current frame before sending the clock signal of the next frame. The simulation delay configuration module determines the specific delay information based on the simulation function module identifier and the current frame clock signal, and can accurately reproduce the delay scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a method, system and driving tool for simulating data transmission delay. Background Art

[0002] In existing simulation schemes for in-vehicle network data transmission delay, the simulation clock uses the device system clock, that is, the clock is consistent with the real world. As a result, the calculation speed of each simulation module is strongly correlated with the device performance. Different devices will have different calculation times in different resource environments. If the computing performance is insufficient, the module's operating frequency is difficult to meet the requirements. In addition, using network delay to simulate the data transmission delay of each module in the real product is not editable and reproducible. Summary of the Invention

[0003] In view of this, the present invention provides a simulation method, system and driving tool for data transmission delay to solve the problem that when the computing performance is insufficient, the module operating frequency is difficult to meet the requirements, and the use of network delay to simulate the data transmission delay of each module in the real product is not editable and reproducible.

[0004] In the first aspect, the present invention provides a simulation method for data transmission delay, which is applied to a simulation clock module. The method includes: iteratively performing simulation operations until a simulation end condition is met. The simulation operation includes: broadcasting a current frame clock signal targeted by the simulation operation, so that a target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on corresponding upstream data to obtain functional data, and sends a current frame delay request to a simulation delay configuration module, and after receiving the delay information of the current frame data sent by the simulation delay configuration module, outputs functional data based on the delay information of the current frame data, wherein the target simulation function module is any one of a plurality of simulation function modules; the delay information of the current frame data is generated based on the target simulation function module identifier in the current frame delay request and the current frame clock signal after the simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, and sends it to the target

[0005] The simulation function module; the current frame clock signal includes at least the simulation time of the current frame, wherein the simulation time of the current frame is determined according to the preset simulation step; receiving the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, determining that the simulation operation is completed.

[0006] In an optional embodiment, the simulation end condition is satisfied at least including that the simulation time of the current frame reaches a preset simulation time, and / or the vehicle ends driving.

[0007] In an optional embodiment, the method further includes: if the simulation end condition is met, broadcasting a simulation end instruction, so that the target simulation function module responds to the simulation end instruction and ends the functional simulation.

[0008] After determining that the simulation end condition is currently met, the simulation clock module of the present invention can immediately broadcast a simulation end instruction to end the simulation of each target simulation function module, thereby avoiding waste of simulation resources.

[0009] In an optional embodiment, the following steps are performed to determine whether all simulation function modules have completed the simulation of the current frame: receiving the current frame processing completion information sent by the target simulation function module, marking the target simulation function module, and detecting whether all target simulation function modules have been marked; if all target simulation function modules have been marked, it is determined that all simulation function modules have completed the simulation of the current frame.

[0010] The simulation clock module of the present invention can accurately and conveniently reflect the current frame simulation status of each simulation function module by marking the simulation function module that receives the current frame processing completion information, ensuring that the next frame clock signal is sent only after all simulation function modules have completed the current frame simulation.

[0011] In a second aspect, the present invention provides a method for simulating data transmission delay, which is applied to a target simulation function module, wherein the target simulation function module is any one of a plurality of simulation function modules, and the method comprises: in response to a current frame clock signal broadcast by a simulation clock module, performing calculations based on corresponding upstream data to obtain functional data, wherein the current frame clock signal at least includes a simulation time of the current frame, wherein the simulation time of the current frame is determined according to a preset simulation step size, and the current frame clock signal is a current frame clock signal targeted by the simulation operation broadcast by the simulation clock module; sending a current frame delay request to a simulation delay configuration module, and upon receiving the current frame data sent by the simulation delay configuration module, After receiving the delay information of the current frame data, the functional data is output based on the delay information of the current frame data, where the delay information of the current frame data is the delay information of the current frame data. The simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, generates the delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends it to the target simulation function module; sends the current frame processing completion information to the simulation clock module, so that the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and determines that the simulation operation is completed when it is determined that all simulation function modules have completed the simulation of the current frame, and iteratively executes the simulation operation until the simulation end condition is met.

[0012] In an optional embodiment, the method further includes: ending the functional simulation in response to a simulation end instruction broadcast by the simulation clock module, wherein the simulation end instruction is an instruction broadcast by the simulation clock module when determining that a simulation end condition is met.

[0013] In an optional embodiment, the target simulation function module is integrated with a calculation frame time set, and the calculation frame time is calculated by preset simulation step size and the operating frequency of the target simulation function module. The calculation based on the corresponding upstream data to obtain functional data includes: judging whether the trigger condition is met. When the trigger condition is met, the calculation is based on the corresponding upstream data to obtain functional data. The trigger condition is met, including: the current frame simulation time is in the calculation frame time set; if the trigger condition is not met, the functional data is set to empty data.

[0014] After responding to the current frame clock signal, the target simulation function module of the present invention can first determine whether the current frame simulation time is in the calculation frame time set, and only output function data if it is in the calculation frame time set, thereby avoiding resource waste of the simulation function module.

[0015] In an optional embodiment, the delay information of the current frame data includes at least a delay time, and the outputting of the functional data based on the delay information of the current frame data includes: determining the target frame position for placing the functional data in the message queue based on the delay time and a preset simulation step, and filling the target frame position with the functional data; filling the frame position in the message queue that does not store data before the target frame position with preset data, and clearing the data in the frame position after the target frame position; determining the data in the first frame position in the message queue as functional data, and outputting it, and moving the functional data that is not output in the message queue forward by one frame position based on the frame position where it is stored.

[0016] The target simulation function module of the present invention places the function data at the corresponding position in the message queue based on the delay time, and outputs the first data in the message queue when outputting data, ensuring that the output data are all the latest.

[0017] In a third aspect, the present invention provides a method for simulating data transmission delay, which is applied to a simulation delay configuration module. The method comprises: in response to a current frame delay request sent by a target simulation function module, based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, generating delay information of the current frame data, and sending the information to the target simulation function module. The current frame delay request is a current frame clock signal broadcast by the target simulation function module in response to the simulation clock module, which is calculated based on the corresponding upstream data, and after obtaining the functional data, is sent to the simulation delay configuration module. The current frame clock signal at least includes the simulation time of the current frame, wherein the simulation time of the current frame is based on a preset simulation step. It is long determined that the current frame clock signal is the current frame clock signal targeted by the simulation operation broadcast by the simulation clock module, and the target simulation function module is any one of the multiple simulation function modules; after receiving the delay information of the current frame data sent by the simulation delay configuration module, the target simulation function module outputs the function data based on the delay information of the current frame data, and sends the current frame processing completion information to the simulation clock module, so that the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, it is determined that the simulation operation is completed, and the simulation operation is iteratively executed until the simulation end condition is met.

[0018] In an optional embodiment, the delay information includes at least the delay time, and the delay information of the current frame data is generated based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, including: determining the delay time of the current frame data based on the correspondence between different simulation time periods and delay times corresponding to the target simulation function module and the simulation time of the current frame, or inputting the simulation time of the current frame into the random delay model corresponding to the target simulation function module to obtain the delay time of the current frame data, or inputting the simulation time of the current frame into the delay time prediction model corresponding to the target simulation function module to obtain the delay time of the current frame data, and the delay time prediction model is obtained by training based on historical simulation time and delay time correspondence data.

[0019] The simulation delay configuration module of the present invention simulates different delay scenarios through different model parameters to verify the reliability of the system. As long as the model parameters are the same, the corresponding delay effects will be consistent, ensuring that the delay scenarios can be accurately reproduced.

[0020] In a third aspect, the present invention provides a simulation system for data transmission delay, the system comprising a simulation clock module, a target simulation function module and a simulation delay configuration module, the target simulation function module being any one of a plurality of simulation function modules, wherein the simulation clock module iteratively performs a simulation operation until a simulation end condition is met, the simulation operation comprising: the simulation clock module broadcasting a current frame clock signal targeted by the simulation operation, the current frame clock signal at least comprising a simulation time of the current frame, and the simulation time of the current frame being determined according to a preset step size; the target simulation function module responding to the current frame clock signal broadcast by the simulation clock module, performing calculations based on corresponding upstream data, obtaining functional data, and sending a signal to the simulation delay configuration module. The configuration module sends a current frame delay request; the simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, generates delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends it to the target simulation function module; after receiving the delay information of the current frame data sent by the simulation delay configuration module, the target simulation function module outputs the functional data based on the delay information of the current frame data, and sends current frame processing completion information to the simulation clock module; the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and determines that the simulation operation is completed when it is determined that all simulation function modules have completed the simulation of the current frame.

[0021] The present invention provides a simulation system for data transmission delay, in which a simulation clock module broadcasts a current frame clock signal targeted by a simulation operation, a target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on corresponding upstream data, obtains functional data, and sends a current frame delay request to a simulation delay configuration module. After the simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, it generates delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends the information to the target simulation function module. The target simulation function module outputs functional data based on the delay information of the current frame data, and sends the information to the simulation clock module. Send the current frame processing completion information, the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, it determines that the simulation operation is completed, and iteratively executes the simulation operation until the simulation end condition is met. Among them, the clock signal sent by the simulation clock module does not adopt the existing system clock, but dynamically adjusts the timing of sending the clock signal based on the feedback of the completion of the operation of each simulation function module to ensure that each module can complete the current frame before receiving the clock signal of the next frame, and the simulation delay configuration module determines the specific delay information based on the simulation function module identifier and the current frame clock signal to ensure that the delay scenario can be accurately reproduced.

[0022] In a fourth aspect, the present invention provides a traveling tool, which includes the simulation system for data transmission delay described in the third aspect.

[0023] In an optional embodiment, the travel vehicle is a vehicle, an aircraft or a flying car. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 is a structural block diagram of a simulation system for data transmission delay according to an embodiment of the present invention;

[0026] Figure 2 is an example diagram of interaction of a simulation system for data transmission delay according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of the interaction between modules of the data transmission delay simulation system according to an embodiment of the present invention;

[0028] Figure 4 is a structural block diagram of a traveling tool according to an embodiment of the present invention;

[0029] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0031] The present invention provides a simulation system for data transmission delay, such as Figure 1As shown, the system includes a simulation clock module 1, a target simulation function module 2 and a simulation delay configuration module 3, wherein the target simulation function module 2 is any one of a plurality of simulation function modules (simulation function nodes), wherein the simulation clock module 1 iteratively performs simulation operations until the simulation end condition is met, and the simulation operations include: the simulation clock module 1 broadcasts the current frame clock signal targeted by the simulation operation, the current frame clock signal at least includes the simulation time of the current frame, and the simulation time of the current frame is determined according to a preset step size; the target simulation function module 2 responds to the current frame clock signal broadcast by the simulation clock module 1, calculates based on the corresponding upstream data, obtains functional data, and sends the current frame to the simulation delay configuration module 3. Delay request; the simulation delay configuration module 3 responds to the current frame delay request sent by the target simulation function module 2, generates the delay information of the current frame data based on the target simulation function module 2 identifier in the current frame delay request and the current frame clock signal, and sends it to the target simulation function module 2; after receiving the delay information of the current frame data sent by the simulation delay configuration module 3, the target simulation function module 2 outputs the functional data based on the delay information of the current frame data, and sends the current frame processing completion information to the simulation clock module 1; the simulation clock module 1 receives the current frame processing completion information sent by the target simulation function module 2, and when it is determined that all simulation function modules have completed the simulation of the current frame, it determines that the simulation operation is completed.

[0032] The simulation function module of the embodiment of the present invention may include but is not limited to a navigation algorithm module, a flight control algorithm module and a dynamics module for realizing vehicle driving functions, for example, Figure 2 As shown, when the simulation starts, all simulation function modules are initialized, and after the initialization is completed, the initialization completion information is fed back to the simulation clock module 1. The simulation clock module 1 detects that all simulation function modules have been initialized, and can send the current frame clock signal for the current simulation operation in the form of broadcast, wherein the clock signal includes the simulation time and the simulation step length that are gradually accumulated from zero. Generally, the current frame simulation time sent for the first time by the simulation clock module 1 after the initialization is completed is 0s, which is only used as an example.

[0033] like Figure 2As shown, the target simulation function module 2 of the embodiment of the present invention can maintain a state of waiting for message data after initialization is completed, that is, waiting for the current frame clock signal and upstream dependent data, wherein the upstream dependent data is generally various sensor data. When responding to the current frame clock signal broadcast by the simulation clock module 1 and receiving the upstream data, it can perform corresponding calculations based on the upstream data to obtain the functional data corresponding to the current frame; before outputting the functional data corresponding to the current frame, the target simulation function module 2 can first send a current frame delay request to the simulation delay configuration module 3, wherein the current frame delay request includes the target simulation function module 2 identifier, such as the node name.

[0034] The simulation delay configuration module 3 of the embodiment of the present invention responds to the current frame delay request sent by the target simulation function module 2, and can determine the delay information of the current frame data of the target simulation function module 2 based on the target simulation function module 2 identifier and the current frame simulation time, and send the delay information of the current frame data to the target simulation function module 2, wherein the delay information at least includes the delay time (the delay time is generally n milliseconds, n≥0, and can be divided by the preset simulation step (milliseconds), representing that the current frame data is delayed by n milliseconds to be sent), and the way in which the simulation delay configuration module 3 can obtain the current frame simulation time can be that the target simulation function module 2 sends the current frame delay request, or it can be that the simulation delay configuration module 3 responds to the current frame clock signal broadcast by the simulation clock module 1, just as an example; there is no limitation on how to determine the delay information of the current frame data, and the simulation delay configuration module 3 can be pre-integrated with a relational database of simulation times and delay times corresponding to all simulation function modules, such as a relational curve, and the delay information of the current frame data is determined by searching the relational database, just as an example.

[0035] After the target simulation function module 2 of the embodiment of the present invention receives the delay information of the current frame data sent by the simulation delay configuration module 3, it can delay the output of the calculated function data based on the delay time in the delay information. The data output corresponding to the current frame can be a preset default value, or the function data calculated by the historical frame can be output. For example, Figure 2As shown, after outputting data, the target simulation function module 2 can send current frame processing completion information to the simulation clock module 1, wherein the output of functional data or current frame processing completion information and other data can be transmitted through the message middleware, including but not limited to inter-process communications such as TCP, UDP and shared memory, just as an example; after the simulation clock module 1 receives the current frame processing completion information sent by the target simulation function module 2, it can record the simulation function module that has completed the current frame simulation, and when it is determined that all simulation function modules have completed the simulation of the current frame, it can determine whether the current frame meets the simulation end condition, wherein the simulation end condition may include that the vehicle completes the specified route or route, just as an example, if it is determined that the current frame does not meet the simulation end condition, the simulation time can be increased based on the preset simulation step size to obtain the next frame clock signal, and the next frame clock signal is broadcast, and then the above-mentioned simulation operation is repeated until the simulation end condition is met.

[0036] The present invention provides a simulation system for data transmission delay, in which a simulation clock module broadcasts a current frame clock signal targeted by a simulation operation, a target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on corresponding upstream data, obtains functional data, and sends a current frame delay request to a simulation delay configuration module. After the simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, it generates delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends the information to the target simulation function module. The target simulation function module outputs functional data based on the delay information of the current frame data, and sends the information to the simulation clock module. Send the current frame processing completion information, the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, it determines that the simulation operation is completed, and iteratively executes the simulation operation until the simulation end condition is met. Among them, the clock signal sent by the simulation clock module does not adopt the existing system clock, but dynamically adjusts the timing of sending the clock signal based on the feedback of the completion of the operation of each simulation function module to ensure that each module can complete the current frame before receiving the clock signal of the next frame, and the simulation delay configuration module determines the specific delay information based on the simulation function module identifier and the current frame clock signal to ensure that the delay scenario can be accurately reproduced.

[0037] Specifically, satisfying the simulation end condition at least includes that the simulation time of the current frame reaches a preset simulation time, and / or the vehicle ends driving.

[0038] In an optional implementation, if the simulation end condition is met, a simulation end instruction is broadcasted, so that the target simulation function module 2 responds to the simulation end instruction and ends the function simulation.

[0039] The simulation end conditions of the embodiment of the present invention may include but are not limited to the simulation time reaching the set simulation time, the aircraft or car completing the specified route or path, or the car colliding and ending driving. As long as one of the above simulation end conditions is met, the simulation clock module 1 determines that the simulation is over and can send a simulation end instruction in the form of a broadcast. After the target simulation function module 2 responds to the simulation end instruction, the functional simulation can be ended.

[0040] After determining that the simulation end condition is currently met, the simulation clock module of the present invention can immediately broadcast a simulation end instruction to end the simulation of each target simulation function module, thereby avoiding waste of simulation resources.

[0041] Specifically, the simulation clock module 1 determines that all simulation function modules have completed the simulation of the current frame through the following steps: receiving the current frame processing completion information sent by the target simulation function module 2, marking the target simulation function module 2, and detecting whether all target simulation function modules 2 have been marked; if all target simulation function modules 2 have been marked, it is determined that all simulation function modules have completed the simulation of the current frame.

[0042] After receiving the current frame processing completion information sent by the target simulation function module 2, the simulation clock module 1 of the embodiment of the present invention can mark the received flag of the simulation function module and detect whether the flags of all simulation function modules have been marked. If the flags of all simulation function modules have been marked, it is determined that all simulation function modules have completed the simulation of the current frame, as an example only.

[0043] The simulation clock module of the present invention can accurately and conveniently reflect the current frame simulation status of each simulation function module by marking the simulation function module that receives the current frame processing completion information, ensuring that the next frame clock signal is sent only after all simulation function modules have completed the current frame simulation.

[0044] Specifically, the target simulation function module 2 is integrated with a calculation frame time set, wherein the calculation frame time is calculated by the preset simulation step and the operating frequency of the target simulation function module 2 to determine whether the trigger condition is met. When the trigger condition is met, the calculation is performed based on the corresponding upstream data to obtain the function data. Meeting the trigger condition includes: the current frame simulation time is in the calculation frame time set; if the trigger condition is not met, the function data is set to empty data.

[0045] The target simulation function module 2 of the embodiment of the present invention can predetermine the calculation frame time set for data calculation based on its own operating frequency and the simulation step size of the system. For example, if the operating frequency of the navigation algorithm module is 200 Hz and the simulation step size of the system is 0.001s, the calculation frame time set is determined to be 0s, 0.005s, 0.01s, 0.015s... For example only, Figure 2 As shown, after responding to the current frame clock signal sent by the simulation clock module 1, it can be determined whether the current frame simulation time in the current frame clock signal is in the calculation frame time set. For example, if the current frame simulation time is 0.005s, it is determined to be in the calculation frame time set, and the functional data is calculated based on the corresponding upstream data; if the current frame simulation time is 0.002s, it is determined that it is not in the calculation frame time set, then the algorithm calculation can be omitted and the functional data can be directly set to empty data.

[0046] After responding to the current frame clock signal, the target simulation function module of the present invention can first determine whether the current frame simulation time is in the calculation frame time set, and only output function data if it is in the calculation frame time set, thereby avoiding resource waste of the simulation function module.

[0047] Specifically, the delay information of the current frame data includes at least the delay time. The target simulation function module 2 outputs the function data based on the delay information of the current frame data, including: determining the target frame position for placing the function data in the message queue based on the delay time and the preset simulation step, and filling the function data into the target frame position; filling the frame position in the message queue that does not store data before the target frame position with preset data, and clearing the data in the frame position after the target frame position; determining the data in the first frame position in the message queue as function data, and outputting it, and moving the function data that is not output in the message queue forward one frame position based on its storage frame position.

[0048] After the target simulation function module 2 of the embodiment of the present invention obtains the delay time, it divides the delay time by the simulation step size to determine the target frame position for placing the function data in the message queue. For example, if the delay time is 0.005s and the simulation step size is 0.001s, the corresponding target frame position is the 5th frame position, then the function data is filled into the 5th frame position, and it is determined whether there is data in the 0-5 frame positions in the message queue. If some frame positions do not store data, preset data can be used to fill them. For example, data is stored in the 0th, 1st and 2nd frame positions in the message queue, but no data is stored in the 3rd and 4th frames. In this case, the data in the previous 0th, 1st and 2nd frames can be kept unchanged, and the data in the 3rd and 4th frame positions can be filled in the 2nd frame position. The data or set data (based on the functional data requirement setting) is filled in, and the data in the position after the 5th frame of the message queue can be directly cleared; when the current frame outputs data, the data in the position representing the first frame can be read from the message queue, and the data can be taken out of the message queue, and the taken data can be sent out. After the data in the position representing the first frame is sent out, the data in the corresponding subsequent frame position can be moved forward one frame position. For example, in the next frame simulation, if the target frame position corresponding to the calculated data is the 3rd frame position, the data is placed at the 3rd frame position, and all data after the 3rd frame position are cleared, including the data placed at the 5th frame position of the current frame mentioned above, to ensure that the output data are the latest.

[0049] The target simulation function module of the present invention places the function data at the corresponding position in the message queue based on the delay time, and outputs the first data in the message queue when outputting data, ensuring that the output data are all the latest.

[0050] Specifically, the delay information at least includes the delay time. The simulation delay configuration module 3 generates the delay information of the current frame data based on the target simulation function module 2 identifier in the current frame delay request and the current frame clock signal, including: determining the delay time of the current frame data based on the correspondence between different simulation time periods and delay times corresponding to the target simulation function module 2 and the simulation time of the current frame, or inputting the simulation time of the current frame into the random delay model corresponding to the target simulation function module 2 to obtain the delay time of the current frame data, or inputting the simulation time of the current frame into the delay time prediction model corresponding to the target simulation function module 2 to obtain the delay time of the current frame data, and the delay time prediction model is obtained by training based on the correspondence data between historical simulation time and delay time.

[0051] like Figure 2As shown, the simulation delay configuration module 3 of the embodiment of the present invention integrates a fixed delay model, a random delay model and a delay time prediction model corresponding to each simulation function module, wherein the fixed delay model integrates the correspondence between different simulation time periods and delay times, that is, within any simulation time period, the corresponding delay time is the same; the random delay model simulates random changes based on a certain probability distribution (such as uniform distribution, normal distribution or Poisson distribution), so that the delay time output each time is different; the delay time prediction model can collect the correspondence data of historical simulation time and delay time in actual products to establish an empirical model, that is, predict future delay time based on historical data, and can also include discrete event simulation to determine the delay time, just as an example; after receiving the current frame delay request sent by the target simulation function module 2, the simulation delay configuration module 3 can first obtain the corresponding model based on the target simulation function module 2 identifier (any of the above three models can be used), and then input the simulation time of the current frame into the model to obtain the delay time of the current frame data, just as an example.

[0052] The simulation delay configuration module of the present invention simulates different delay scenarios through different model parameters to verify the reliability of the system. As long as the model parameters are the same, the corresponding delay effects will be consistent, ensuring that the delay scenarios can be accurately reproduced.

[0053] The embodiment of the present invention also provides a method for simulating data transmission delay, which is applied to Figure 1 The simulation clock module 1, the target simulation function module 2 and the simulation delay configuration module 3 are shown, wherein Figure 3 As shown, the simulation clock module 1 is used to execute steps S101 to S105, the target simulation function module 2 is used to execute steps S201 to S203, and the simulation delay configuration module 3 is used to execute steps S301 to S303.

[0054] Step S101, iteratively perform simulation operations until simulation conditions are met, the simulation operations including: broadcasting the current frame clock signal targeted by the simulation operation, the current frame clock signal including at least the simulation time of the current frame, and the simulation time of the current frame determined according to a preset step size.

[0055] Step S102 : receiving the current frame processing completion information sent by the target simulation function module, and determining that the simulation operation is completed when it is determined that all simulation function modules have completed the simulation of the current frame.

[0056] Step S201 : In response to the current frame clock signal broadcast by the simulation clock module, calculation is performed based on corresponding upstream data to obtain functional data, and a current frame delay request is sent to the simulation delay configuration module.

[0057] Step S202: After receiving the delay information of the current frame data sent by the simulation delay configuration module, output the functional data based on the delay information of the current frame data.

[0058] Step S301 : generating delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sending the delay information to the target simulation function module.

[0059] Please refer to the above embodiments for detailed description, which will not be repeated here.

[0060] The present invention provides a method for simulating data transmission delay, in which a simulation clock module broadcasts a current frame clock signal targeted by a simulation operation, a target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on corresponding upstream data, obtains functional data, and sends a current frame delay request to a simulation delay configuration module. After the simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, it generates delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends the information to the target simulation function module. The target simulation function module outputs functional data based on the delay information of the current frame data, and sends the information to the simulation clock module. Send the current frame processing completion information, the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, it determines that the simulation operation is completed, and iteratively executes the simulation operation until the simulation end condition is met. Among them, the clock signal sent by the simulation clock module does not adopt the existing system clock, but dynamically adjusts the timing of sending the clock signal based on the feedback of the completion of the operation of each simulation function module to ensure that each module can complete the current frame before receiving the clock signal of the next frame, and the simulation delay configuration module determines the specific delay information based on the simulation function module identifier and the current frame clock signal to ensure that the delay scenario can be accurately reproduced.

[0061] The embodiment of the present invention provides a travel tool, such as Figure 4 As shown, the travel tool includes a simulation system for data transmission delay. Specifically, the travel tool may include but is not limited to a vehicle, an aircraft or a flying car, just as an example.

[0062] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0063] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0064] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0065] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0066] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0067] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The bus connection is taken as an example.

[0068] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0069] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0070] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for simulating data transmission delay, characterized in that: Applied to a simulation clock module, the method includes: Iteratively performing simulation operations until a simulation end condition is met, the simulation operations comprising: Broadcast the current frame clock signal targeted by the simulation operation, so that the target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on corresponding upstream data, obtains function data, and sends a current frame delay request to the simulation delay configuration module, and after receiving the delay information of the current frame data sent by the simulation delay configuration module, outputs the function data based on the delay information of the current frame data, wherein the target simulation function module is any one of the multiple simulation function modules; the delay information of the current frame data is generated by the simulation delay configuration module based on the target simulation function module identifier in the current frame delay request and the current frame clock signal in response to the current frame delay request sent by the target simulation function module, and sent to the target simulation function module; the current frame clock signal at least includes the simulation time of the current frame, wherein the simulation time of the current frame is determined according to the preset simulation step size; The current frame processing completion information sent by the target simulation function module is received, and when it is determined that all simulation function modules have completed the simulation of the current frame, the simulation operation is determined to be completed.

2. The method according to claim 1, characterized in that The simulation end condition is satisfied at least including that the simulation time of the current frame reaches a preset simulation time, and / or the vehicle ends driving.

3. The method according to claim 2, characterized in that The method further comprises: If the simulation end condition is met, a simulation end instruction is broadcasted, so that the target simulation function module responds to the simulation end instruction and ends the function simulation.

4. The method according to claim 1, wherein Use the following steps to ensure that all simulation function modules have completed the simulation of the current frame: receiving current frame processing completion information sent by a target simulation function module, marking the target simulation function module, and detecting whether all target simulation function modules have been marked; If all target simulation function modules are marked, it is determined that all simulation function modules have completed the simulation of the current frame.

5. A method for simulating data transmission delay, characterized in that: Applied to a target simulation function module, the target simulation function module being any one of a plurality of simulation function modules, the method comprises: In response to a current frame clock signal broadcast by the simulation clock module, performing calculations based on corresponding upstream data to obtain functional data, wherein the current frame clock signal includes at least a simulation time of the current frame, wherein the simulation time of the current frame is determined according to a preset simulation step size, and the current frame clock signal is the current frame clock signal for which the simulation operation broadcast by the simulation clock module is targeted; Sending a current frame delay request to the simulation delay configuration module, and after receiving the delay information of the current frame data sent by the simulation delay configuration module, outputting the functional data based on the delay information of the current frame data, wherein the delay information of the current frame data is generated by the simulation delay configuration module in response to the current frame delay request sent by the target simulation function module, based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sent to the target simulation function module; Send the current frame processing completion information to the simulation clock module so that the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, determine that the simulation operation is completed, and iteratively execute the simulation operation until the simulation end condition is met.

6. The method according to claim 5, characterized in that The method further comprises: The functional simulation is ended in response to a simulation end instruction broadcast by the simulation clock module, wherein the simulation end instruction is an instruction broadcast by the simulation clock module when it determines that a simulation end condition is met.

7. The method according to claim 5, characterized in that The target simulation function module is integrated with a calculation frame time set, and the calculation frame time is calculated by a preset simulation step size and an operating frequency of the target simulation function module. The calculation based on the corresponding upstream data to obtain the functional data includes: Determine whether a trigger condition is met, and when the trigger condition is met, perform calculation based on the corresponding upstream data to obtain function data, wherein the trigger condition includes: the current frame simulation time is within the calculation frame time set; If the trigger condition is not met, the function data is set to empty data.

8. The method according to claim 5, characterized in that The delay information of the current frame data includes at least a delay time, and outputting the functional data based on the delay information of the current frame data includes: Based on the delay time and the preset simulation step size, determining the target frame position for placing the function data in the message queue, and filling the function data into the target frame position; Fill the frame positions in the message queue that do not store data before the target frame position with preset data, and clear the data in the frame positions after the target frame position; The data in the first frame position in the message queue is determined as functional data and outputted, and the functional data not outputted in the message queue is moved forward by one frame position based on the frame position where the functional data is stored.

9. A method for simulating data transmission delay, characterized in that: Applied to the simulation delay configuration module, the method includes: In response to a current frame delay request sent by a target simulation function module, based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, delay information of the current frame data is generated and sent to the target simulation function module, the current frame delay request is a calculation performed by the target simulation function module based on corresponding upstream data in response to the current frame clock signal broadcast by the simulation clock module, and after obtaining functional data, the calculation is sent to the simulation delay configuration module, the current frame clock signal at least includes the simulation time of the current frame, wherein the simulation time of the current frame is determined according to a preset simulation step size, the current frame clock signal is the current frame clock signal targeted by the simulation operation broadcast by the simulation clock module, and the target simulation function module is any one of the multiple simulation function modules; After receiving the delay information of the current frame data sent by the simulation delay configuration module, the target simulation function module outputs the function data based on the delay information of the current frame data, and sends the current frame processing completion information to the simulation clock module, so that the simulation clock module receives the current frame processing completion information sent by the target simulation function module, and when it is determined that all simulation function modules have completed the simulation of the current frame, it is determined that the simulation operation is completed, and the simulation operation is iteratively executed until the simulation end condition is met.

10. The method according to claim 9, characterized in that The delay information includes at least a delay time, and the generating of the delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal includes: Based on the corresponding relationship between different simulation time periods and delay times corresponding to the target simulation function module and the simulation time of the current frame, the delay time of the current frame data is determined, or, Input the simulation time of the current frame into the random delay model corresponding to the target simulation function module to obtain the delay time of the current frame data, or, The simulation time of the current frame is input into the delay time prediction model corresponding to the target simulation function module to obtain the delay time of the current frame data. The delay time prediction model is obtained by training based on the corresponding relationship data of the historical simulation time and the delay time.

11. A data transmission delay simulation system, characterized in that: The system includes a simulation clock module, a target simulation function module and a simulation delay configuration module, wherein the target simulation function module is any one of a plurality of simulation function modules, wherein: The simulation clock module iteratively performs a simulation operation until a simulation end condition is satisfied, wherein the simulation operation includes: the simulation clock module broadcasting a current frame clock signal targeted by the simulation operation, wherein the current frame clock signal includes at least a simulation time of the current frame, and the simulation time of the current frame is determined according to a preset step size; The target simulation function module responds to the current frame clock signal broadcast by the simulation clock module, performs calculations based on the corresponding upstream data, obtains function data, and sends a current frame delay request to the simulation delay configuration module; The simulation delay configuration module responds to the current frame delay request sent by the target simulation function module, generates delay information of the current frame data based on the target simulation function module identifier in the current frame delay request and the current frame clock signal, and sends the delay information to the target simulation function module; After receiving the delay information of the current frame data sent by the simulation delay configuration module, the target simulation function module outputs the function data based on the delay information of the current frame data and sends the current frame processing completion information to the simulation clock module; The simulation clock module receives the current frame processing completion information sent by the target simulation function module, and determines that the simulation operation is completed when it is determined that all simulation function modules have completed the simulation of the current frame.

12. A traveling tool, characterized in that: The traveling tool includes the data transmission delay simulation system according to claim 11.

13. The traveling tool according to claim 12, characterized in that: The traveling tool is a vehicle, an aircraft or a flying car.

Citation Information

Patent Citations

  • Magnetic-levitation train operation simulation system

    CN114578726A

  • Routing spacecraft channel time division multiplexing telemetering framing simulation method, device and system

    CN118249887A