A control method for visual display in distributed simulation
By using active or passive control to adjust the data transmission speed between the visual display subsystem and the simulation subsystem in distributed simulation, the problem of data transmission delay and display indiscontinuousness in distributed simulation is solved, and smooth visual display and user experience are improved.
Patent Information
- Application Number
- CN202411873272.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-08
AI Technical Summary
The prior art is difficult to effectively ensure that the data of the simulation subsystem is smoothly displayed on the visual display subsystem in distributed simulation.
Through active control or passive control, the data transmission speed between the view display subsystem and the simulation subsystem is adjusted to ensure that the view display subsystem is displayed at an appropriate speed. Specific methods include dynamically adjusting the physical sending time of data, or displaying the speed by calculating the cache and timestamp difference.
It realizes smooth visual display of distributed simulation, improves user experience, and effectively solves the problems of data transmission delay and display incoherence.
Smart Images

Figure CN119781718A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of display control, and in particular relates to a control method for visual display in distributed simulation. Background Art
[0002] In distributed simulation, visual display can show the simulation process and facilitate users to analyze problems. It needs to receive simulation process data from the network. Because a large amount of data will be generated during the simulation process, and various renderings of entity behaviors are required, it brings great challenges to network transmission and visual display control. Therefore, how to achieve smooth display of data transmission between the simulation subsystem and the visual display subsystem has become a problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a control method for visual display in distributed simulation to solve the problem in the prior art that the data of the simulation subsystem cannot be effectively guaranteed to be displayed smoothly on the visual display subsystem.
[0004] The first aspect of the present invention provides a method for obtaining light radiation transmission attenuation in haze weather. The method comprises:
[0005] Step S1, establishing a connection between the simulation subsystem and the visual display subsystem;
[0006] Step S2, controlling the display of the visual display subsystem by active control or passive control;
[0007] Wherein, in the step S2, the visual display subsystem is actively controlled to display the data of the simulation subsystem; specifically, the simulation subsystem is configured to display the data of the simulation subsystem; 1 The data completed in seconds is represented by t 2 seconds, and the visual display subsystem and the simulation subsystem are controlled by the time compensation algorithm to have a simulation time delay t d , the visual display subsystem is based on t 1 / t 2 Visual display at a speed of
[0008] Wherein, in the step S2, the visual display subsystem is made to display the data of the simulation subsystem through passive control; specifically, the step S3 includes: controlling the visual display subsystem to display the data of the simulation subsystem at a speed of Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
[0009] According to the method of the first aspect of the present invention, in step S2, the active control includes:
[0010] The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in:
[0011]
[0012] The simulation time delay t is maintained between the visual display and the simulation subsystem d ;
[0013] Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
[0014] According to the method of the first aspect of the present invention, in the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
[0015] According to the method of the first aspect of the present invention, in step S2, the passive control includes:
[0016] The simulation subsystem sends data at speed s;
[0017] When the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ;
[0018] When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step
[0019] The control visual display subsystem uses the calculated speed to display the simulation process.
[0020] A second aspect of the present invention provides a control system for visual display in distributed simulation. The system includes a processor, and the processor is configured to execute:
[0021] In response to establishing that the simulation subsystem has established a connection with the visual display subsystem, controlling the display of the visual display subsystem through active control or passive control;
[0022] Among them, through active control, the visual display subsystem displays the data of the simulation subsystem; specifically, it includes: configuring the simulation subsystem t 1 The data completed in seconds is represented by t 2 seconds, and the visual display subsystem and the simulation subsystem are controlled by the time compensation algorithm to have a simulation time delay t d , the visual display subsystem is based on t 1 / t 2 Visual display at a speed of
[0023] Among them, through passive control, the visual display subsystem displays the data of the simulation subsystem; specifically, by controlling the visual display subsystem to display the data of the simulation subsystem at a speed Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
[0024] According to the system of the second aspect of the present invention, the active control comprises:
[0025] The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in:
[0026]
[0027] The simulation time delay t is maintained between the visual display and the simulation subsystem d ;
[0028] Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
[0029] According to the system of the second aspect of the present invention, in the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
[0030] According to the system of the second aspect of the present invention, the passive control comprises:
[0031] The simulation subsystem sends data at speed s;
[0032] When the visual display subsystem starts to receive data, the cache simulation time length is t ddata, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ;
[0033] When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step
[0034] The control visual display subsystem uses the calculated speed to display the simulation process.
[0035] The third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling visual display in a distributed simulation described in the first aspect is implemented.
[0036] In summary, the present invention actively controls the speed at which the simulation subsystem sends messages to the visual display subsystem, or controls the visual display subsystem according to the speed. To display the simulation process, so that the visual display subsystem can use t 1 / t 2 The visual display is performed at a speed of , thereby ensuring smooth display of the visual of the distributed simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 is a flow chart of a method for controlling visual display in distributed simulation according to an embodiment of the present invention;
[0039] Figure 2 FIG. 4 is a schematic diagram of actively controlling visual display according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0041] The first aspect of the present invention provides a method for obtaining light radiation transmission attenuation in haze weather. The method comprises:
[0042] Step S1, establishing a connection between the simulation subsystem and the visual display subsystem;
[0043] Step S2, controlling the display of the visual display subsystem by active control or passive control;
[0044] Wherein, in the step S2, the visual display subsystem is actively controlled to display the data of the simulation subsystem; specifically, the simulation subsystem is configured to display the data of the simulation subsystem; 1 The data completed in seconds is represented by t 2 seconds, and the visual display subsystem and the simulation subsystem are controlled by the time compensation algorithm to have a simulation time delay t d , the visual display subsystem is based on t 1 / t 2 Visual display at a speed of
[0045] Wherein, in the step S2, the visual display subsystem is made to display the data of the simulation subsystem through passive control; specifically, the step S3 includes: controlling the visual display subsystem to display the data of the simulation subsystem at a speed of Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
[0046] According to the method of the first aspect of the present invention, in step S2, the active control includes:
[0047] The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in:
[0048]
[0049] The simulation time delay t is maintained between the visual display and the simulation subsystem d ;
[0050] Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
[0051] According to the method of the first aspect of the present invention, in the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
[0052] According to the method of the first aspect of the present invention, in step S2, the passive control includes:
[0053] The simulation subsystem sends data at speed s;
[0054] When the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ;
[0055] When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step
[0056] The control visual display subsystem uses the calculated speed to display the simulation process.
[0057] First embodiment
[0058] like Figure 1 As shown, the control method of visual display in distributed simulation includes:
[0059] S101, establishing a connection between the simulation subsystem and the visual display subsystem;
[0060] S102: Control the display of the visual display subsystem through active control or passive control, so that the visual display subsystem can smoothly display the data of the simulation subsystem.
[0061] Setting up the simulation subsystem 1 The data completed in seconds is represented by t 2 The simulation time delay t is maintained between the visual display subsystem and the simulation subsystem through the time compensation algorithm. d , or by controlling the visual display subsystem according to the speed To display the simulation process, so that the visual display subsystem can use t 1 / t 2 The visual display is performed at a speed of It is the physical timestamp difference between two adjacent data arriving at the visual display subsystem. is the simulation time difference.
[0062] The active control specifically includes: the visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n , So that the simulation time delay t is maintained between the visual display and the simulation subsystem d ; Where: T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
[0063] Among them, control t n The range of data fluctuation within the theoretical sending time is less than the preset time threshold. This control can better ensure smooth display.
[0064] The passive control specifically includes: the simulation subsystem sends data at a speed s, and when the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p When the visual display subsystem reads data for display, the physical timestamp difference between two adjacent data is used. Time difference with simulation Calculate the speed of each step And control the visual display subsystem to use the calculated speed to display the simulation process.
[0065] Second embodiment
[0066] like Figure 2 As shown, in the actual execution process, the simulation subsystem t 1 Actions completed in seconds are indicated by t in the visual display subsystem. 2 seconds to complete, therefore, the visual display system is set to use t 1 / t 2 If t 1 =t 2 , the visual display is running at a constant speed, if t 1 >t 2 , it means accelerating, otherwise it means decelerating.
[0067] According to the definition of visual display speed, in the simulation subsystem, if we want to achieve t 1 / t 2 To display the speed, two conditions must be met at the same time: First, the entities in the simulation subsystem must be displayed at a speed not less than t 1 / t2 The visual display subsystem must send data at a speed of t 1 / t 2 The behavior of the simulated entity is displayed at the speed.
[0068] Since the simulation subsystem and the visual display subsystem are independent processes on different computers in distributed simulation, if the above two conditions are to be met at the same time and the simulation subsystem controls the change of the overall speed, a connection between the processes must be established. Based on this, the embodiment of the present invention proposes two control schemes: active and passive.
[0069] Among them, the active control scheme is to establish a communication mechanism between the simulation subsystem and the visual display subsystem, and the simulation subsystem sends messages to the visual display subsystem to control the speed change.
[0070] In order to enable interpolation calculations for the visual display, the visual display subsystem delays the physical time t at the beginning of operation. d , used to cache data, and then according to the speed s 1 When the simulation time of the simulation subsystem reaches the acceleration time t s2 When the simulation subsystem notifies the visual display that it needs to be in s 2 It runs at a speed of s 2 Because the visual display has its own time axis, and its simulation time is delayed by t compared with the simulation time of the simulation subsystem. d , so when the simulation time of the visual display subsystem reaches t s2 When it starts to 2 Run at double speed.
[0071] In the experiment, since modern computers are multi-threaded systems, when both are running at speed s at time t, the speeds of the two are actually inconsistent, and there will be some errors. This is determined by the computer's operating environment and thread switching time. When the actual speed of the visual display is greater than the actual speed of the simulation subsystem, and the error value is the physical time t e When the error is accumulated, after n steps of transmission, if n×t e >t d , the visual display will consume the delayed physical time t d The length of data is too long, and thus no interpolated data is available, which will cause the visual display to pause.
[0072] The time compensation algorithm is used to solve the problem of error accumulation. The idea of this algorithm is to dynamically adjust the physical sending time t of the nth data according to the physical sending time of the previous n-1 data of the simulation subsystem. n , Where: T—the theoretical physical sending time of the nth data, t i —The actual physical sending time interval of the i-th data, T sk —When sending data at speed sk, the physical time of each step interval, n k —The number of data sent at speed sk.
[0073] In the actual experiment, t n The data fluctuates around the theoretical sending time, and the error generally does not exceed 30ms. In actual use, this effectively solves the problem of accumulated sending time errors.
[0074] The main difference between passive control and active control is that the passive control scheme does not need to strictly control the data sending time in the simulation subsystem.
[0075] The simulation subsystem sends data at a speed of s. When the visual display subsystem starts to receive data, in order for the visual display to obtain enough data for interpolation, the cache simulation time length is t. d And add the arrival physical timestamp t to each simulation data that arrives at the visual display p When the visual display subsystem starts to read data for display, the physical timestamp difference between two adjacent data is used. Time difference with simulation Calculate the speed of each step The visual display subsystem uses this speed to display the simulation process.
[0076] When the simulation is paused, the simulation subsystem stops sending data, and the visual display subsystem continues to run using the cached data. When the data in the cache is used up, the visual display subsystem stops running. When the simulation continues, the visual display subsystem caches the simulation for a time length of t d data and then continue running.
[0077] The active control scheme and the passive control scheme respectively control the speed mainly based on the data sending end and receiving end. During the specific implementation, those skilled in the art can choose to implement according to actual needs.
[0078] In summary, the visual display based on distributed simulation plays an increasingly important role in modern simulation, and the problem of coordinated operation between the simulation process subsystem and the visual display subsystem has attracted more and more attention. Through experimental verification, both the active control scheme and the passive control scheme in the embodiment of the present invention can achieve complete and smooth display of the visual scene, thereby effectively improving the user experience.
[0079] A second aspect of the present invention provides a control system for visual display in distributed simulation. The system includes a processor, and the processor is configured to execute:
[0080] In response to establishing that the simulation subsystem has established a connection with the visual display subsystem, controlling the display of the visual display subsystem through active control or passive control;
[0081] Among them, through active control, the visual display subsystem displays the data of the simulation subsystem; specifically, it includes: configuring the simulation subsystem t 1 The data completed in seconds is represented by t 2 seconds, and the visual display subsystem and the simulation subsystem are controlled by the time compensation algorithm to have a simulation time delay t d , the visual display subsystem is based on t 1 / t 2 Visual display at a speed of
[0082] Among them, through passive control, the visual display subsystem displays the data of the simulation subsystem; specifically, by controlling the visual display subsystem to display the data of the simulation subsystem at a speed Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
[0083] According to the system of the second aspect of the present invention, the active control comprises:
[0084] The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in:
[0085]
[0086] The simulation time delay t is maintained between the visual display and the simulation subsystem d ;
[0087] Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
[0088] According to the system of the second aspect of the present invention, in the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
[0089] According to the system of the second aspect of the present invention, the passive control comprises:
[0090] The simulation subsystem sends data at speed s;
[0091] When the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ;
[0092] When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step
[0093] The control visual display subsystem uses the calculated speed to display the simulation process.
[0094] The third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling visual display in a distributed simulation described in the first aspect is implemented.
[0095] In summary, the present invention actively controls the speed at which the simulation subsystem sends messages to the visual display subsystem, or controls the visual display subsystem according to the speed. To display the simulation process, so that the visual display subsystem can use t 1 / t 2 The visual display is performed at a speed of , thereby ensuring smooth display of the visual of the distributed simulation.
[0096] Please note that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above-mentioned embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several variations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the patent in this application shall be based on the attached claims.
Claims
1. A method for controlling visual display in distributed simulation, characterized in that: The method comprises: Step S1, establishing a connection between the simulation subsystem and the visual display subsystem; Step S2, controlling the display of the visual display subsystem by active control or passive control; Among them, in the step S2, the visual display subsystem is actively controlled to display the data of the simulation subsystem; specifically, the data completed in t1 seconds by the simulation subsystem is configured to be completed in t2 seconds by the visual display subsystem, and a simulation time delay t is controlled between the visual display subsystem and the simulation subsystem through a time compensation algorithm. d , the visual display subsystem performs visual display at a speed of t1 / t2; Wherein, in the step S2, the visual display subsystem is made to display the data of the simulation subsystem through passive control; specifically, the step S3 includes: controlling the visual display subsystem to display the data of the simulation subsystem at a speed of Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
2. The method for controlling visual display in distributed simulation according to claim 1, characterized in that: In the step S2, the active control includes: The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in: The simulation time delay t is maintained between the visual display and the simulation subsystem d ; Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
3. The method for controlling visual display in distributed simulation according to claim 2, characterized in that: In the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
4. The method for controlling visual display in distributed simulation according to claim 1, characterized in that: In the step S2, the passive control includes: The simulation subsystem sends data at speed s; When the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ; When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step The control visual display subsystem uses the calculated speed to display the simulation process.
5. A control system for visual display in distributed simulation, characterized in that: The system includes a processor configured to execute: In response to establishing that the simulation subsystem has established a connection with the visual display subsystem, controlling the display of the visual display subsystem through active control or passive control; Among them, through active control, the visual display subsystem displays the data of the simulation subsystem; specifically, it includes: configuring the data completed in t1 seconds by the simulation subsystem to be completed in t2 seconds by the visual display subsystem, and controlling the visual display subsystem and the simulation subsystem to have a simulation time delay t through the time compensation algorithm. d , the visual display subsystem performs visual display at a speed of t1 / t2; Among them, through passive control, the visual display subsystem displays the data of the simulation subsystem; specifically, by controlling the visual display subsystem to display the data of the simulation subsystem at a speed Display the simulation process. Indicates the physical timestamp difference of adjacent data arriving at the visual display subsystem. Represents the simulation time difference.
6. A control system for visual display in distributed simulation according to claim 5, characterized in that: The active control includes: The visual display subsystem dynamically adjusts the physical sending time t of the nth data according to the physical sending time of n-1 data before the current time point of the simulation system. n ;in: The simulation time delay t is maintained between the visual display and the simulation subsystem d ; Where T is the theoretical physical sending time of the nth data, t i is the actual physical sending time interval of the i-th data, T sk is the physical time of each step interval when sending data at speed sk, n k is the number of data sent at speed sk.
7. A control system for visual display in distributed simulation according to claim 6, characterized in that: In the active control, control t n The range of data fluctuation above and below the theoretical sending time is less than the preset time threshold.
8. A control system for visual display in distributed simulation according to claim 5, characterized in that: The passive control includes: The simulation subsystem sends data at speed s; When the visual display subsystem starts to receive data, the cache simulation time length is t d data, and set the physical timestamp t of each simulation data arriving at the visual display subsystem p ; When the visual display subsystem reads data for display, the physical timestamp difference of adjacent data is used to Time difference with simulation Calculate the speed of each step The control visual display subsystem uses the calculated speed to display the simulation process.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for controlling visual display in a distributed simulation according to any one of claims 1 to 4 is implemented.