Simulation display method and system, computer equipment and storage medium
By introducing an independent simulation and solution module and rendering display module in the simulation display system, and using the method of rendering level division and label transmission, it solves the problem of poor reuse and delay of the simulation display system in the existing technologies. , Accurate simulation display.
Patent Information
- Application Number
- CN202411856171.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Due to the tight coupling of simulation computing and graphics rendering, existing simulation display systems have poor reusability and are difficult to maintain. The decoupled system may still lead to rendering errors or delays, affecting user experience and system reliability.
Put forward a simulation display method. By introducing an independent simulation solution module and rendering display module in the simulation display system, the simulation data is divided into leveling levels according to the type of simulation event, and data transmission and simulation time label through rendering level labels and simulation time tags Rendering processing, optimizing the efficiency and accuracy of rendering display.
Through the collaboration between modules, the transmission of the simulation data and its rendering information is significantly simplified, the data processing difficulty of the rendering display module is reduced, the processing efficiency of the simulation display system is optimized, and the accuracy of the simulation display is ensured.
Smart Images

Figure CN119378265A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation, and in particular to a simulation display method, system, computer equipment and storage medium. Background Art
[0002] Simulation is a technology that uses models to simulate the behavior of actual systems or processes. It is widely used in many fields such as engineering, science, medicine, and economics. In order to enable users to understand and analyze the behavior of the system more effectively, complex simulation results are presented in an intuitive visual form through simulation display. Simulation display provides rich drawing and animation functions, supporting various display methods from static images to dynamic interactive scenes.
[0003] Generally speaking, a simulation display system consists of two coupled parts: simulation calculation and graphics rendering. This coupling can be reflected in many aspects, including code structure, data flow, and update mechanism. When simulation logic and rendering logic are closely intertwined, the simulation display system will have poor reusability and be difficult to understand and maintain. In order to ensure the real-time and accuracy of the rendering results, rendering must wait for the latest simulation data, otherwise it may cause rendering delays or data inconsistency, which seriously reduces the performance of the simulation display system.
[0004] Therefore, the above problems can be avoided by decoupling the two parts of simulation calculation and graphics rendering. For example, the Chinese invention patent with application publication number CN117634369A discloses a simulation method including: obtaining instructions in the firmware code, executing the obtained instructions, and generating a register access task when the obtained instructions are related to the access of the register model; executing the register access task, and generating a rendering task when the type of the register access task is a trigger type; when the rendering task is a heavy task type, the rendering task is transmitted to the graphics rendering pipeline model, and after receiving the information indicating that the rendering task has been cached to the graphics rendering pipeline model, the next instruction is continued to be obtained. For another example, the Chinese invention patent with application publication number CN116010037A discloses a GPU simulation method based on a virtual simulation platform including: the encoding subsystem participates in the compilation and operation of the target machine program, and encodes its API and corresponding parameters by replacing the original OpenGL / OpenCL and other graphics standard specification libraries, and writes them into the corresponding memory space. The pipeline subsystem captures the encoded API data and sends it to the decoding subsystem through the corresponding IPC communication technology. The decoding subsystem decodes and executes the received data. If the API needs to return a value, the result of the API execution will be returned to the encoding subsystem through the pipeline subsystem.
[0005] However, the decoupled simulation calculation and graphics rendering parts run independently, which may still cause rendering errors or delays, seriously affecting user experience and system reliability. Summary of the invention
[0006] The main purpose of the present invention is to provide a simulation display method, system, computer equipment and storage medium. The simulation display system includes an independent simulation solution module and a rendering display module. The simulation data generated by the simulation solution module is divided into rendering levels according to the simulation event type, and at least one sub-simulation data with a rendering level label and a simulation time label is generated, and the sub-simulation data is transmitted to the rendering display module in real time; the sub-simulation data is assigned to the first rendering level list or the second rendering level list according to the label; the reading interval of the rendering display module is determined according to the transmission frequency; the rendering display module renders the earliest target sub-simulation data with the simulation time label based on the reading interval, and under the same simulation time label, the first rendering level list takes precedence over the second rendering level list for rendering processing. While ensuring the accuracy of the simulation display, the data processing difficulty of the simulation display is greatly reduced, and the processing efficiency of the simulation display system is optimized.
[0007] The present invention specifically adopts the following technical solutions: A first aspect of the present invention is to provide a simulation display method, which is applied to a simulation display system, wherein the simulation display system includes an independent simulation solution module and a rendering display module, and the method includes: S101 calls the simulation solution module to perform simulation calculations to generate simulation data corresponding to a number of specific simulation events; S102: dividing the simulation data into rendering levels according to the event type of the specific simulation event, and generating at least one sub-simulation data with a rendering level label and a simulation time label; S103 monitors simulation events in the simulation process in real time, and when the specific simulation event is detected, transmits the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; S104, assigning the at least one sub-simulation data to a first rendering level list or a second rendering level list according to the rendering level label; S105: acquiring the transmission frequency of the sub-simulation data, and determining the reading interval of the rendering and display module according to the transmission frequency; S106 calls the rendering and display module to read at least one target sub-simulation data with the earliest simulation time tag from the first rendering level list and the second rendering level list based on the reading interval, and completes the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
[0008] In some embodiments, S105 includes: based on a preset mapping relationship, determining the expected reading interval of the rendering display module according to the transmission frequency; when the expected reading interval is greater than a first limiting threshold, setting the expected reading interval to a reading interval, wherein the first limiting threshold is a reading interval corresponding to a preset rendering rate of the rendering display module; when the expected reading interval is less than the first limiting threshold, setting the reading interval to the first limiting threshold.
[0009] In some embodiments, at least one of the sub-simulation data also carries an event type label, and the second rendering level list includes several event type sub-lists; after setting the reading interval to the first limiting threshold, it also includes: allocating the sub-simulation data in the second rendering level list to the corresponding event type sub-list according to the event type label; defining a time window for the event type sub-list; analyzing several sub-simulation data in the time window, and merging the sub-simulation data whose data fluctuations under the same entity are within a preset range into a merged sub-simulation data; and performing curve fitting operations when calling the rendering display module to process the merged sub-simulation data.
[0010] In some embodiments, completing the rendering and display of the target sub-simulation data includes: rendering the target sub-simulation data in the first rendering level list to obtain first rendering data; grouping the target sub-simulation data of the same event type sub-list into a group to obtain at least one target sub-simulation data group; rendering each of the target sub-simulation data groups separately to obtain second rendering data; and displaying the first rendering data and the second rendering data.
[0011] In some embodiments, when the expected reading interval is less than a second limiting threshold, the rendering and display module sends a simulation deceleration signal to the simulation solution module, and the second limiting threshold is less than the first limiting threshold; the simulation solution module performs simulation operations based on the expected rate in the simulation deceleration signal.
[0012] In some embodiments, when the expected reading interval is continuously greater than a third limiting threshold within a preset time length, the rendering and display module sends a simulation acceleration signal to the simulation solution module, and the third limiting threshold is greater than the first limiting threshold; the simulation solution module performs simulation operations based on the expected rate of the simulation acceleration signal.
[0013] In some embodiments, the S106 further includes: analyzing the entity type corresponding to the target sub-simulation data, calling the corresponding simulation entity rendering model according to the entity type; and completing the rendering process of the target sub-simulation data based on the simulation entity rendering model.
[0014] A second aspect of the present invention is to provide a simulation display system, the system comprising: A simulation solution module, used for calling the simulation solution module to perform simulation calculations, generating simulation data corresponding to a number of specific simulation events; dividing the simulation data into rendering levels according to the event type of the specific simulation event, generating at least one sub-simulation data with a rendering level label and a simulation time label; An event monitoring module is used to monitor simulation events in the simulation process in real time, and trigger the data transmission module when the specific simulation event is detected; The data transmission module is used to transmit the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; The rendering and display module is used to allocate the at least one sub-simulation data to the first rendering level list or the second rendering level list according to the rendering level label; obtain the transmission frequency of the sub-simulation data, and determine the reading interval of the rendering and display module according to the transmission frequency; based on the reading interval, call the rendering and display module to read at least one target sub-simulation data with the earliest simulation time label from the first rendering level list and the second rendering level list to complete the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
[0015] A third aspect of the present invention is to provide a computer device, the computer device comprising a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the steps of the simulation display method provided in any embodiment of the present invention when executing the computer program.
[0016] A fourth aspect of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor performs the steps of the simulation display method provided in any embodiment of the present invention.
[0017] Beneficial technical effects: The present invention proposes a simulation display method in which a simulation solution module and a rendering display module in a limited relatively independent state collaboratively process simulation data. The simulation solution module preprocesses the rendering order of simulation data from the perspective of rendering processing according to its simulation logic, and generates three key tags corresponding to the simulation rendering level, simulation timing information and simulation event type, which significantly simplifies the transmission of simulation data and its rendering information between the simulation solution module and the rendering display module. The rendering display module can quickly and accurately determine the rendering display strategy that closely fits the characteristics of the simulation data from multiple dimensions according to the three tags. The data processing difficulty of the rendering display module is greatly reduced through collaborative processing between modules, thereby optimizing the processing efficiency of the simulation display system while ensuring the accuracy of the simulation display.
[0018] Specifically, the modular design realizes the decoupling of simulation solution and rendering display. After the simulation solution module obtains the simulation data through calculation, it quickly and accurately pre-marks the rendering level of the sub-simulation data according to the dependency relationship between the simulation event types according to its calculation logic, and sets the rendering level label for the sub-simulation data accordingly, and then sets the event type label and simulation time label accordingly. The three labels are transmitted to the rendering display module together with the sub-simulation data, which simplifies the data synchronization and communication process between the two modules. The rendering display module can quickly determine the rendering order of the simulation data through the rendering level label and the simulation time label, and then perform unified rendering processing on the same type of simulation data at a certain moment according to the event type label, without considering the complex dependency relationship between the sub-simulation data, which simplifies the rendering processing process in all aspects and improves the rendering efficiency. In addition, in addition to reducing the data processing difficulty of the rendering display module, the rendering level list can also effectively smooth the peak traffic and adapt to the high-concurrency rendering scene of large amounts of simulation data.
[0019] On the other hand, high-reliability simulation data preprocessing can be performed in the event type sublist. The event type label provides feasibility support for the accelerated fusion processing of similar simulation data, which can reduce the accumulation of simulation data to be rendered and displayed, reduce the rendering burden of the rendering and display modules, and improve the efficiency of rendering and display. At the same time, it reduces the errors in simulation data merging processing, the freezes and frame skips in rendering and display, and avoids logical disorders in rendering data.
[0020] Furthermore, through the associative feedback mechanism between the rendering and display module and the simulation and solution module, the operation strategy and resource allocation of the simulation and display system are optimized, so that the two loosely coupled modules are in a restricted relatively independent state. While ensuring the accuracy of the simulation display, efficient collaboration between the simulation and solution module and the rendering and display module in asynchronous processing is achieved, thereby improving the efficiency and performance of the simulation and display system.
[0021] First, the simulation operation rate is reflected according to the data transmission frequency, and the reading interval is adaptively adjusted, thereby adjusting the rendering and display rate, so as to achieve efficient collaboration between the loosely coupled simulation solution module and the rendering and display module, thereby improving the efficiency and performance of the simulation display system.
[0022] Secondly, the working strategies of the simulation solution module and the rendering display module are optimized according to the expected reading interval, and the simulation speed is adaptively adjusted when the working efficiency of the two modules is not compatible. For example, when a large amount of simulation data appears in a high-concurrency area, the expected reading interval exceeds the reading interval corresponding to the preset rendering rate (such as the maximum rendering rate) of the rendering display module, and the accelerated rendering strategy of the rendering display module is enabled to ensure the real-time rendering; for another example, when the expected reading interval is too large or too small, the running rate of the simulation operation is adjusted accordingly to balance the load according to the processing capacity of the system, and the system resource configuration of the two modules is adaptively optimized to avoid system overload caused by excessive data volume, which effectively improves the working efficiency and reliability of the simulation display system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without paying creative labor.
[0024] Figure 1 is a schematic flow chart of a simulation display method provided by an embodiment of the present invention; Figure 2 is a schematic flow chart of another simulation display method provided by an embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] 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 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.
[0026] Herein, suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "module", "component" or "unit" can be used mixedly.
[0027] In this document, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0028] In this document, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0029] Herein "and / or" includes any and all combinations of one or more of the associated listed items.
[0030] Herein, "plurality" means two or more than two, ie, it includes two, three, four, five, etc.
[0031] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0032] As an important tool for simulating the behavior of actual systems or processes, simulation technology plays an indispensable role in many fields. It reproduces the dynamic behavior of the system by building an accurate model, and transforms these complex simulation results into intuitive visual information through simulation display technology, thereby helping users to understand and analyze system behavior more effectively. Simulation display systems usually include two core parts: simulation calculation and graphics rendering, which can be tightly coupled or independently decoupled.
[0033] In the coupled simulation display system, simulation calculation and graphics rendering are integrated together. This design shows a high degree of integration in terms of code structure, data flow and update mechanism. However, this tight coupling leads to poor system availability. If the update frequency of simulation and rendering is inconsistent, it will cause rendering lag or data inconsistency, which will seriously affect the performance of the simulation display system.
[0034] To solve these problems, simulation logic and rendering logic can be decoupled so that simulation calculation and graphics rendering can run independently. This decoupling method can improve the maintainability and scalability of the system in theory, but it still faces challenges in practice. Because the data synchronization and communication between simulation calculation and rendering may become complicated, which may cause rendering errors or delays. Whether it is a coupled or decoupled simulation display system, there are difficult to overcome problems, such as synchronization problems, performance bottlenecks, and complexity management.
[0035] The present invention proposes a simulation display method in which a simulation solution module and a rendering display module in a limited relatively independent state collaboratively process simulation data. The simulation solution module preprocesses the rendering order of simulation data from the perspective of rendering processing according to its simulation logic, and generates three key tags corresponding to the simulation rendering level, simulation timing information and simulation event type, which significantly simplifies the transmission of simulation data and its rendering information between the simulation solution module and the rendering display module. The rendering display module can quickly and accurately determine the rendering display strategy that closely fits the characteristics of the simulation data from multiple dimensions according to the three tags. The data processing difficulty of the rendering display module is greatly reduced through collaborative processing between modules, thereby optimizing the processing efficiency of the simulation display system while ensuring the accuracy of the simulation display.
[0036] Specifically, the modular design realizes the decoupling of simulation solution and rendering display. After the simulation solution module obtains the simulation data through calculation, it quickly and accurately pre-marks the rendering level of the sub-simulation data according to the dependency relationship between the simulation event types according to its calculation logic, and sets the rendering level label for the sub-simulation data accordingly, and then sets the event type label and simulation time label accordingly. The three labels are transmitted to the rendering display module together with the sub-simulation data, which simplifies the data synchronization and communication process between the two modules. The rendering display module can quickly determine the rendering order of the simulation data through the rendering level label and the simulation time label, and then perform unified rendering processing on the same type of simulation data at a certain moment according to the event type label, without considering the complex dependency relationship between the sub-simulation data, which simplifies the rendering processing process in all aspects and improves the rendering efficiency. In addition, in addition to reducing the data processing difficulty of the rendering display module, the rendering level list can also effectively smooth the peak traffic and adapt to the high-concurrency rendering scene of large amounts of simulation data.
[0037] On the other hand, high-reliability simulation data preprocessing can be performed in the event type sublist. The event type label provides feasibility support for the accelerated fusion processing of similar simulation data, which can reduce the accumulation of simulation data to be rendered and displayed, reduce the rendering burden of the rendering and display modules, and improve the efficiency of rendering and display. At the same time, it reduces the errors in simulation data merging processing, the freezes and frame skips in rendering and display, and avoids logical disorders in rendering data.
[0038] See also Figure 1 , Figure 1 is a schematic flow chart of a simulation display method provided by an embodiment of the present invention, wherein the method is applied to a simulation display system, wherein the simulation display system includes an independent simulation solution module and a rendering display module, such as Figure 1 As shown, the method includes steps S101 to S106.
[0039] S101 calls the simulation solution module to perform simulation calculations to generate simulation data corresponding to a number of specific simulation events.
[0040] Among them, the simulation solution module is used to perform complex computing tasks to simulate events or phenomena in the real world. These tasks may include physical simulation, environmental interaction, object behavior prediction, and other situations that require the use of mathematical models to predict behavior. Specifically, they can be adversarial simulation tasks and real-life deduction tasks of electrical objects (such as cars, airplanes, and ships).
[0041] Among them, a specific simulation event is an event that occurs in the simulation environment and needs to be rendered and displayed. The simulation data corresponding to a specific simulation event is a sub-simulation data, which records the specific information of the specific simulation event. It should be understood that a variety of simulation events will occur in the simulation operation and generate a large amount of simulation data. According to different simulation display requirements, some simulation events do not need to be rendered and displayed.
[0042] For example, when a specific simulation event is a change in the position of an entity, the corresponding simulation data may be the dynamic state of the simulation object, including physical quantities such as position, velocity, acceleration, etc.; when a specific simulation event is interactive data, the corresponding simulation data may be interactive information between simulation objects, such as collision, contact, communication, etc.; when a specific simulation event is a change in environmental parameters, the corresponding simulation data may be environmental factors such as temperature, humidity, wind speed, etc.; when a specific simulation event is a change in entity parameters, the corresponding simulation data may be the addition, deletion, modification, degree of damage, health status, etc. of a simulation object. Specific simulation events can be determined based on actual simulation tasks and are not limited here.
[0043] Specifically, the simulation display system starts its simulation solution module to perform simulation calculations. The results of the simulation calculations will generate a series of simulation data related to specific simulation events, which are the basis for subsequent rendering and display.
[0044] In some embodiments, since there may be multiple specific simulation events occurring concurrently at the same time, thereby generating a large amount of simulation data, in order to ensure data consistency, the simulation data are all provided with corresponding timestamps to record the specific time point at which the simulation event occurred, so that the simulation calculations of the simulation solution module are consistent with the rendering display in the rendering display module.
[0045] In some embodiments, the timestamp can be generated based on the simulation time defined within the simulation display system, which is independent of the actual time and is generally used to control the simulation process and synchronize simulation events. The simulation time can be discrete or continuous, and the simulation time can also be conveniently backtracked, paused, accelerated or decelerated, depending on the needs of the simulation model, and is not affected by the actual passage of time.
[0046] In some embodiments, the timestamp may also be generated based on actual time.
[0047] S102 divides the simulation data into rendering levels according to the event type of the specific simulation event, and generates at least one sub-simulation data with a rendering level label and a simulation time label.
[0048] The rendering level label is used to indicate the rendering priority of the data. This label can be a number, a color code, or any other identifier that can be recognized and processed by the rendering display module. The simulation time label is used to indicate the time when the data is generated or the time point when it needs to be rendered to ensure the timing and synchronization between the independent simulation solution module and the rendering display module.
[0049] Specifically, after calling the simulation solution module to calculate and obtain the simulation data, the rendering order of the sub-simulation data can be quickly and accurately determined according to the event type of the specific simulation event through the dependency relationship between the simulation event types set by its calculation logic, that is, the simulation data is divided into rendering levels to obtain sub-simulation data of different rendering levels, and further rendering level labels are set according to different rendering levels, and a simulation time label is set according to the timestamp to obtain at least one sub-simulation data with a rendering level label and a simulation time label.
[0050] For example, the change of entity position in the simulation solution module may depend on the change of entity parameters. When a new car is added to the simulation environment, the operation logic of the simulation solution module is to first complete the entity parameter change, including the structural parameters of the new car to generate a car; then complete the entity position change, including the location information of the car in the simulation environment. When the rendering and display module processes the corresponding sub-simulation data, the rendering logic also needs to process the sub-simulation data corresponding to the entity parameter change to render the car entity, and then render and display the car at the correct position according to the sub-simulation data corresponding to the entity position change.
[0051] For another example, if the sub-simulation data of the entity position change is rendered before the sub-simulation data of the entity parameter change, the rendering display module only obtains the position information but not the structural parameters of the car, and the rendering of the car cannot be completed, which leads to confusion in the rendering logic and makes it difficult to ensure the accuracy and consistency of the simulation environment.
[0052] Therefore, there is commonality between simulation logic and rendering logic.
[0053] It should be understood that the computational logic based on the simulation solution module can quickly grasp the complex logical relationship between simulation event types, and the logical relationship can reflect the dependency relationship between simulation event types. However, the dependency relationship is a key factor for the rendering display module to determine the data rendering order, and the accuracy of the rendering order directly determines the quality of the rendering display result, and the rendering display module needs to consume a lot of computing power to accurately analyze the rendering order between sub-simulation data.
[0054] Therefore, in the simulation display system in the embodiment of the present invention, the simulation solution module can be called to be responsible for two parts of the task. Task one is to perform simulation calculations and generate simulation data, which are then used for rendering and display; Task two is to pre-process the rendering order of sub-simulation data from the perspective of rendering processing according to its simulation logic, that is, to divide the sub-simulation data into rendering levels according to the event type of a specific simulation event, and determine the rendering priority of the sub-simulation data. The simulation solution module not only generates simulation data, but also provides necessary support for the subsequent processing and display of these data, realizes collaborative processing between modules, reduces the difficulty of data processing in the rendering and display module, and ensures that the simulation display system can respond to simulation events efficiently and accurately.
[0055] That is to say, considering that the simulation solution module has a more efficient processing advantage in determining the rendering processing order compared to the rendering display module, this embodiment optimizes the allocation and process of simulation rendering tasks, and advances the task of determining the rendering processing order to the simulation solution stage. It can be assigned to the simulation solution module or implemented by other modules that fully learn the simulation operation logic, thereby reducing the burden on the rendering display module and improving the overall simulation efficiency.
[0056] Furthermore, the consistency of simulation data in the simulation solution module and the rendering display module is ensured according to the simulation time label, and the rendering level division result of the simulation solution module is transmitted through the rendering level label, so as to realize efficient, accurate and easy transmission of information between the two modules, ensure the consistency of data in a multi-threaded environment, and simplify the data synchronization and communication process between the two modules.
[0057] In some embodiments, a rendering level table is preset according to the dependency of the simulation event type, and the simulation data is divided into rendering levels according to the preset rendering level table, thereby determining the rendering level label of the sub-simulation data. For example, when a specific simulation event includes position change, entity change, and interactive information, the rendering level of the entity parameter change takes precedence over the rendering level of the entity position change and the rendering level of the interactive information, and the corresponding preset rendering level table is generated based on this.
[0058] In some embodiments, the simulation solution module may also optimize and adjust the rendering level division of the simulation data according to the rendering quality feedback or performance monitoring results of the rendering display module to improve the overall performance and response speed of the simulation display system.
[0059] S103 monitors simulation events in the simulation process in real time, and when the specific simulation event is detected, transmits the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module.
[0060] Specifically, the events occurring during the simulation process are monitored in real time. When a specific simulation event that needs to be rendered and displayed is detected, the sub-simulation data with a rendering level label and a simulation time label related to the specific simulation event is immediately transmitted to the rendering and display module for rendering and display.
[0061] In some embodiments, when there are multiple sub-simulation data, each sub-simulation data is packaged into a data packet and transmitted one by one to ensure data integrity.
[0062] S104 allocates the at least one sub-simulation data to a first rendering level list or a second rendering level list according to the rendering level label.
[0063] Specifically, the transmitted sub-simulation data are distributed into two different rendering level lists according to their rendering level labels, the first rendering level list contains high-priority sub-simulation data, and the second rendering level list contains low-priority sub-simulation data.
[0064] It should be understood that the rendering and display tasks of the rendering and display module in the simulation display during the rendering phase include: environmental background rendering tasks, such as rendering background elements such as sky boxes and ground, and environmental effects such as fog effects; static object rendering tasks, such as rendering static buildings, terrain, vegetation, etc.; dynamic object rendering tasks, such as rendering animated objects such as vehicles and characters. Among them, dynamic object rendering tasks include model change tasks (calling, deleting, and modifying models), animation update tasks, etc. Further, the rendering and display tasks are corresponded to specific simulation events, the environmental background rendering tasks and static object rendering tasks correspond to environmental parameter changes, the model change tasks in the dynamic object rendering tasks correspond to entity parameter changes, and the animation update tasks correspond to entity position changes and interactions between entities.
[0065] In some embodiments, based on the commonality of simulation logic and rendering logic, only two rendering level lists are required to achieve fast and efficient sub-simulation data division, thereby avoiding the rendering display module from consuming too much computing power and time when dividing and reading the rendering list of sub-simulation data.
[0066] Specifically, the rendering level includes a first rendering level and a second rendering level, the rendering level tag of the corresponding generated sub-simulation data includes a first rendering level tag and a second rendering level tag, the rendering level list includes a first rendering level list and a second rendering level list, and the sub-simulation data with the first rendering level tag is divided into the first rendering level list, and the sub-simulation data with the second rendering level tag is divided into the second rendering level list. The rendering level of the first rendering level list is higher than the rendering level of the second rendering level list, that is, the first rendering level list is rendered before the second rendering level list.
[0067] For example, in the simulation operation logic, environmental parameter changes and entity parameter changes are specific simulation events that need to be performed first, and the sub-simulation data generated by them are basic simulation data; correspondingly, in the rendering logic, model change tasks in environmental background rendering tasks, static object rendering tasks, and dynamic object rendering tasks also need to be rendered first, so the basic simulation data is divided into the first rendering level list.
[0068] Furthermore, in the simulation operation logic, entity position changes and interactions between entities may depend on certain specific simulation events that occur earlier, and the sub-simulation data generated is extended simulation data that is further generated based on the basic simulation data; correspondingly, in the rendering logic, the animation update task in the dynamic object rendering task also requires post-rendering, so the extended simulation data is divided into the second rendering level list.
[0069] Therefore, the sub-simulation data can be quickly divided into two rendering levels, and a reasonable rendering order can be determined so that the processing of each stage meets expectations, which can improve rendering efficiency while ensuring the accuracy and quality of the image.
[0070] In some embodiments, the rendering level may include at least three rendering levels, corresponding rendering level labels are generated, the first level labels corresponding to the basic simulation data are pre-set, the sub-simulation data with the first level labels are divided into the first rendering level list, and the remaining sub-simulation data are divided into the second rendering level list; the second rendering level list includes multiple secondary rendering level lists, which are further divided according to the importance of different sub-simulation data, thereby refining the rendering order and the rendering process.
[0071] Exemplarily, the rendering level includes three rendering levels, and three rendering level labels are generated correspondingly, including a first level label, a second level label, and a third level label. The first level label corresponding to the basic simulation data is preset, and the sub-simulation data with the first level label is divided into the first rendering level list, and the remaining sub-simulation data is divided into the second rendering level list; Furthermore, a second-level label corresponding to the simulation data of focus is pre-set, and the second rendering level list includes two sub-rendering level lists, namely the main rendering level list and the sub-rendering level list. A second division is performed again according to the second rendering level label, and the sub-simulation data with the second level label is divided into the main rendering level list, and the sub-simulation data with the third level label is divided into the sub-rendering level list.
[0072] Prioritize rendering of sub-simulation data in the first rendering level list to ensure the accuracy of rendering display, and then render the sub-simulation data of the main rendering level list in the second rendering level list, so as to give priority to rendering more important sub-simulation data, such as sub-simulation data of certain key operations (such as attacking, using skills, etc.) and sub-simulation data of key objects, so as to improve the rendering display effect and enhance the user experience; finally, render and process other sub-simulation data from the rendering level list in the second rendering level list.
[0073] In some embodiments, the at least one sub-simulation data also carries an event type tag, and the event type tag is used to indicate the simulation event type of the specific simulation event corresponding to the simulation data. The event type tag is set according to the event type of the specific simulation event to obtain at least one sub-simulation data with a rendering level label, an event type label and a simulation time label.
[0074] It should be understood that the consistency of simulation data in the simulation solution module and the rendering display module is ensured according to the simulation time label, and the rendering level division result of the simulation solution module is transmitted through the rendering level label. The event type label is used to perform secondary division of sub-simulation data of the same rendering level, so as to realize efficient and accurate data transmission between the two modules and ensure data consistency in a multi-threaded environment.
[0075] In some embodiments, events occurring during the simulation process are monitored in real time, and when a specific simulation event that requires rendering and display is detected, sub-simulation data related to the specific simulation event with a rendering level label, event type label, and simulation time label is immediately transmitted to a rendering and display module for further rendering and display.
[0076] In some embodiments, the second rendering level list includes several event type sub-lists, and the sub-simulation data is assigned to the event type sub-list of the corresponding event type according to the event type label. Several event type sub-lists can be rendered at the same time or sorted according to the event type.
[0077] It should be understood that the embodiment of the present invention divides the sub-simulation data into lists in two dimensions: on the first dimension, the sub-simulation data is divided into lists based on the simulation rendering level to distinguish the sub-simulation data of different rendering levels, so as to facilitate the subsequent rapid determination of the rendering order; on the basis of the first dimension, the second dimension is divided, that is, the sub-simulation data within the second rendering level is divided into lists based on the event type label to distinguish the sub-simulation data of different simulation event types, so as to facilitate the subsequent unified rendering processing of the same type of sub-simulation data at a certain moment.
[0078] It should be noted that when the second rendering level list includes multiple secondary rendering level lists, the sub-simulation data is divided into lists based on the event type label in the multiple secondary rendering level lists. For example, when the sub-simulation data is "the moving speed of aircraft A is 1000 kilometers per hour", its rendering level label is the second level label, and the event type label is the entity position change, it is correspondingly divided into "second rendering level list-main rendering level list-entity position change event type sub-list".
[0079] Sub-simulation data is stored in separate tables based on simulation event types and simulation rendering levels, which is convenient for on-demand extraction during subsequent processing. It can better manage and schedule data of different levels, quickly grab the required sub-simulation data, so that high-priority data can get priority processing rights in the rendering display module, and data of the same rendering level can also be rendered uniformly, avoiding repeated switching of some rendering behaviors and optimizing the scheduling of rendering resources. On the one hand, it ensures the rendering quality, and on the other hand, it also improves the rendering efficiency in all aspects.
[0080] S105: Acquire the transmission frequency of the sub-simulation data, and determine the reading interval of the rendering and display module according to the transmission frequency.
[0081] The reading interval refers to the time interval for the rendering display module to extract data from the rendering level list, and the reading interval can be adjusted and reminded through a timer.
[0082] Specifically, the simulation rate of the simulation solution module is analyzed based on the transmission frequency of the sub-simulation data, and the interval time for the rendering display module to read data from the rendering level list is determined accordingly, so as to adjust the rendering rate of the rendering display module to adapt to the simulation rate of the simulation solution module to ensure the real-time performance of the data. If the data transmission is frequent, the reading interval may be shorter; vice versa. This dynamic adjustment helps to maintain the response speed and efficiency of the simulation display system.
[0083] In some embodiments, based on a preset mapping relationship, the expected reading interval of the rendering display module is determined according to the transmission frequency; when the expected reading interval is greater than a first limiting threshold, the expected reading interval is set to a reading interval, wherein the first limiting threshold is a reading interval corresponding to a preset rendering rate of the rendering display module; when the expected reading interval is less than the first limiting threshold, the reading interval is set to the first limiting threshold.
[0084] Among them, the preset mapping relationship defines the relationship between the transmission frequency of simulation data and the reading frequency of the rendering and display module. This mapping relationship is set by comprehensively considering the processing efficiency of the simulation solution module, the processing efficiency of the rendering and display module and the real-time rendering requirements of the simulation display system to ensure that the data can be processed and displayed in a timely manner.
[0085] Among them, the preset rendering rate can be the maximum rendering rate supported by the rendering and display module performance, or the rendering rate with the best rendering effect supported by the rendering and display module performance. When reading at a reading interval exceeding the first limit threshold, the rendering and display module or the system is prone to overload and crash, and the error rate of the rendering and display module will increase, and the corresponding rendering display quality will also decrease.
[0086] Specifically, in the simulation display system, the expected reading interval of the rendering display module is determined according to the preset mapping relationship and the transmission frequency to ensure real-time processing and display of data. If the expected reading interval obtained by mapping exceeds the first limit threshold, the reading interval is set to the first limit threshold to prevent the rendering display module or the system from overloading and ensure the accuracy of the rendering display; if the expected reading interval is less than the first limit threshold, the expected reading interval is set to the reading interval to fully utilize the performance of the simulation solution module. This dynamic adjustment mechanism takes into account both simulation display efficiency and system performance, ensures the smoothness and responsiveness of the simulation scene, and avoids system overload and crashes due to excessive reading frequency.
[0087] It should be understood that, based on the transmission frequency, in order to meet the rendering speed requirements limited by the real-time performance of the simulation rendering, the reading interval of the rendering display module needs to reach the expected reading interval. However, due to the performance limitations of the rendering display module, or to avoid the rendering display module from excessively occupying the computing power of the simulation display system, which in turn makes it difficult for the simulation solution module to continue to perform simulation operations, the system is overloaded and crashes, etc., the rendering display module may not be able to read and process the simulation data completely according to the expected reading interval.
[0088] Based on this, an embodiment of the present invention proposes a high-reliability simulation data preprocessing in an event type sublist, so as to reduce the accumulation of simulation data to be rendered and displayed, reduce the rendering burden of the rendering display module, and thus maintain the response speed and efficiency of the simulation display system.
[0089] In some embodiments, at least one of the sub-simulation data also carries an event type label, and the second rendering level list includes several event type sub-lists; after setting the reading interval to the first limiting threshold, it also includes: allocating the sub-simulation data in the second rendering level list to the corresponding event type sub-list according to the event type label; defining a time window for the event type sub-list; analyzing several sub-simulation data in the time window, and merging the sub-simulation data whose data fluctuations under the same entity are within a preset range into a merged sub-simulation data; and performing curve fitting operations when calling the rendering display module to process the merged sub-simulation data.
[0090] The time window is used to define a specific time range, which can be set according to actual needs. For example, under normal circumstances, the reading interval is set to 30 milliseconds, the first limit threshold is 20 milliseconds, and the expected reading interval is 15 milliseconds. At this time, the time window can be determined based on the proportional relationship between the simulation time flow rate and the actual time flow rate, and the value of the expected reading interval exceeding the first limit threshold. For example, 5 milliseconds of actual time corresponds to 1 second of simulation time, that is, the time window can be defined as 1 second. For another example, in order to ensure the reliability of fusion processing, the time window can be fixed to 0.5 seconds.
[0091] Among them, the preset range can be flexibly set according to the reliability of the fusion processing and is not limited here.
[0092] Among them, curve fitting is a mathematical method used to determine the optimal curve of data points so as to best represent these data points on a graph. For details, please refer to the relevant technology.
[0093] Specifically, when the reading interval is limited to the first limit threshold, the rendering and display module is difficult to provide sufficient rendering and display capabilities to bear the rendering and display requirements of the simulation data in the current scene, define the time window of the event type sublist, and analyze multiple sub-simulation data within the time window. For the same entity, if the data fluctuation is within a preset range, the system will merge these sub-simulation data to generate a merged sub-simulation data.
[0094] Exemplarily, the fusion processing method can be flexibly predetermined according to different simulation event types. For example, when environmental parameters change (such as temperature, humidity, wind speed), these sub-simulation data are superimposed on each other or offset each other into a merged sub-simulation data; for example, when the entity position changes (such as position, speed, acceleration), the sub-simulation data with the latest simulation time tag among these sub-simulation data can be used as the merged sub-simulation data, or the mean of these sub-simulation data can be calculated as the merged sub-simulation data.
[0095] Among them, the rendering level label and event type label of the simulation representative data are consistent with these sub-simulation data. The simulation time label can take the middle time or the latest time of the simulation time labels of these sub-simulation data, and then combine the curve fitting operation to smooth the rendering errors that may be caused by the fusion processing.
[0096] It should be understood that when the expected reading interval is greater than the first limit threshold, the data reading interval is extremely short, which can reflect that the update frequency of the simulation data is extremely fast at this time and involves frequent activities of a large number of entities. Therefore, there are multiple sub-simulation data in the simulation data within a short period of time, for the same entity, and with small data fluctuations. At the same time, the event type sub-list provides feasibility support for the accelerated fusion processing of similar simulation data. Based on this, the embodiment of the present invention fuses these sub-simulation data to realize an accelerated rendering strategy for simulation data.
[0097] It can be seen that the sub-simulation data for fusion processing are subject to strict conditional restrictions, requiring that the sub-simulation data involved in the fusion must have a high degree of individual correlation, continuity of change, and an extremely short time span. Therefore, the errors that may be caused by the fusion processing can be controlled within the acceptable range of the simulation display system, which can effectively avoid rendering display freezes and frame skipping, as well as rendering data logic disorder.
[0098] The high-reliability simulation data preprocessing performed in the event type sublist can reduce data redundancy and noise, improve data accuracy and availability, and maintain the response speed and efficiency of the simulation display system while ensuring rendering quality. In addition, when calling the rendering display module to process these simulation representative data, curve fitting operations are also performed to ensure smooth transition and realism of the data.
[0099] S106 calls the rendering and display module to read at least one target sub-simulation data with the earliest simulation time tag from the first rendering level list and the second rendering level list based on the reading interval, and completes the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
[0100] Specifically, the rendering display module is called according to the reading interval to traverse the first rendering level list and the second rendering level list, and at least one target sub-simulation data with the earliest time value corresponding to the simulation time label in the rendering list is read to complete the rendering display of these data according to the timing information, so as to achieve data consistency between the two loosely coupled modules. In addition, since the data in the first rendering level list has a higher priority, they will be rendered before the data in the second rendering level list, so as to complete the rendering processing of these data according to the rendering order corresponding to the simulation rendering logic, thereby improving the accuracy of the rendering processing. This process ensures that the simulation display system can process and display simulation data efficiently and orderly, while ensuring the timely display of high-priority data.
[0101] In some embodiments, traversing the first rendering level list and the second rendering level list according to the read interval includes: traversing several event type sublists in the first rendering level list and the second rendering level list according to the read interval; or traversing several event type sublists in the secondary rendering level list in the first rendering level list and the second rendering level list according to the read interval. This process ensures that the simulation display system can process and display simulation data efficiently and orderly, while ensuring the timely display of high-priority data.
[0102] In some embodiments, the rendering phase and the display phase of the rendering display module are separated, that is, the rendering of all sub-simulation data with the same time tag is completed first, and then they are displayed uniformly. It should be understood that in order to ensure the consistency between the display screen and the simulation data, the target sub-simulation data at the same time is first determined based on the time value of the simulation time tag. These target sub-simulation data need to be displayed at the same time point regardless of whether they are in the first rendering level list or the second rendering level list. However, since there are some dependencies between the sub-simulation data that need to be considered, it is necessary to distinguish the rendering levels to determine the order of rendering.
[0103] In some embodiments, see Figure 2 , Figure 2 is a schematic flow chart of another simulation display method provided by an embodiment of the present invention, such as Figure 2 As shown, the process of completing the rendering and display of the target sub-simulation data includes steps S201 and S204.
[0104] S201 performs rendering processing on the target sub-simulation data in the first rendering level list to obtain first rendering data; S202 groups the target sub-simulation data of the same event type sub-list into one group to obtain at least one target sub-simulation data group; S203 performs rendering processing on each of the target sub-simulation data groups respectively to obtain second rendering data; S204 displays the first rendering data and the second rendering data.
[0105] Specifically, after rendering the target sub-simulation data in the first rendering level list, the first rendering data is obtained, and the target sub-simulation data is grouped according to the event type sub-list to which the target sub-simulation data belongs. Then, the target sub-simulation data in the same event type sub-list at the same time are uniformly rendered to obtain the second rendering data, so as to complete the rendering of these data according to the simulation event type, making the rendering smoother and faster, and further displaying the first rendering data and the second rendering data obtained by the rendering processing to complete the rendering display of multiple target sub-simulation data under the same simulation time label, thereby improving the efficiency of rendering and display.
[0106] The rendering behaviors corresponding to the simulation data of the same simulation event type have similar properties, and are uniformly rendered in sequence. Compared with mixed rendering of different types, this is faster and smoother, and can effectively avoid repeated switching between different rendering behaviors, thus optimizing the scheduling of rendering resources. Therefore, the simulation event type can not only be used in the simulation solution module to determine the rendering order of data types to better handle some rendering types with dependencies, but can also be used in the rendering display module to uniformly render the same type of behavior at a certain moment, thereby improving the efficiency of rendering display.
[0107] In some embodiments, the target sub-simulation data of different event type sub-lists at the same time may be rendered in a predetermined order, or may be rendered in random order without a specific order.
[0108] In some embodiments, the amount of simulation data that can be processed in parallel is determined according to the performance of the rendering display module. Based on this, the target sub-simulation data of the sub-lists of different event types at the same time can be grouped according to the amount of simulation data to obtain a number of parallel rendering data groups, and then the target sub-simulation data is processed in parallel by group, thereby ensuring the rendering display quality while making full use of the system performance to improve the rendering display efficiency. Since the rendering levels of the target sub-simulation data in the second rendering list are the same, they can be processed in parallel if the performance allows. Correspondingly, the target sub-simulation data in the first rendering list and the target sub-simulation data in the second rendering list can only be processed serially.
[0109] In some embodiments, the entity type corresponding to the target sub-simulation data is analyzed, and the corresponding simulation entity rendering model is called according to the entity type; and the rendering process of the target sub-simulation data is completed based on the simulation entity rendering model.
[0110] Specifically, the target sub-simulation data is analyzed to identify the entity type recorded in the target sub-simulation data, and the preset simulation entity rendering model of the entity type is called according to the entity type. Based on the preset simulation entity rendering model, the sub-simulation data can be efficiently rendered. For example, when the entity type is human, the preset simulation entity rendering model is a basic model of human. On this basis, the sub-simulation data is rendered to realize human vital sign model generation, action update, special effect generation, etc. This process not only improves the realism of the simulation, but also enhances the user experience.
[0111] In some embodiments, a corresponding index, such as an entity ID, can be set between the entity type and the simulation entity rendering model library. Thus, based on the index, it is possible to quickly check whether there is a model in the simulation entity rendering model library. If so, the specified model is found according to the index and added to the rendering scene, and then the position, posture, and state of the model are changed according to the sub-simulation data.
[0112] In some embodiments, the rendering level list is traversed based on the reading interval to check whether there is updated sub-simulation data in the rendering level list. The sub-simulation data will be deleted immediately after being read or rendered and displayed. Therefore, there may be multiple sub-simulation data in the rendering level list, or there may be no sub-simulation data. Therefore, in addition to reducing the data processing difficulty of the rendering display module, the rendering level list can also effectively smooth the peak traffic and adapt to high-concurrency large-scale simulation data rendering scenarios.
[0113] In some embodiments, the method also includes: when the expected reading interval is less than a second limiting threshold, the rendering display module sends a simulation deceleration signal to the simulation solution module, and the second limiting threshold is less than the first limiting threshold; the simulation solution module performs simulation operations based on the expected rate in the simulation deceleration signal.
[0114] The second limiting threshold can be flexibly set based on comprehensive consideration of the performance of the simulation solution module, the rendering display module and the simulation display system. The first limiting threshold is the reading interval corresponding to the preset rendering rate of the rendering display module. When it is detected that the expected reading interval is less than the set second limiting threshold, it means that the simulation solution module has generated simulation data at a rate far exceeding the processing rate of the rendering display module. On the one hand, it will cause a large amount of sub-simulation data to accumulate in the rendering display module. At the same time, the rendering display module runs at the maximum rate for a long time, which may cause the rendering display module to overload, thereby affecting the stability of the simulation display system and causing the quality of the rendering display to decline.
[0115] Therefore, when there is a serious imbalance between the data generation and data processing stages, the rendering display module will be triggered to actively send a simulation deceleration signal to the simulation solution module. After receiving the simulation deceleration signal, the simulation solution module will adjust the speed of its simulation operation according to the expected rate contained in the signal to reduce the data generation speed, thereby ensuring the stability of the simulation process and the accuracy of the data.
[0116] Furthermore, the simulation display system optimizes the configuration of computing resources. As the speed of simulation calculations in the simulation solution module is reduced, the computing power required is reduced. Accordingly, more computing power can be allocated to the rendering display module to support the rapid, continuous and high-quality completion of rendering display tasks.
[0117] In some embodiments, when the expected reading interval is continuously greater than a third limiting threshold within a preset time length, the rendering and display module sends a simulation acceleration signal to the simulation solution module, and the third limiting threshold is greater than the first limiting threshold; the simulation solution module performs simulation operations based on the expected rate of the simulation acceleration signal.
[0118] The third limit threshold is set to be higher than the first limit threshold to ensure that the rendering display module will be triggered to actively send a simulation acceleration signal to the simulation solution module only when the simulation data is updated slowly. The specific value of the preset duration and the third limit threshold can be flexibly set according to actual needs and is not limited here.
[0119] Specifically, when the expected reading interval exceeds the third limit threshold continuously within a preset time, the rendering display module sends a simulation acceleration signal to the simulation solution module. After receiving the acceleration signal, the simulation solution module adjusts the speed of the simulation operation according to the expected rate specified in the signal to make full use of the performance of the simulation display, improve the efficiency of the simulation display, and improve the real-time performance and response speed of the simulation.
[0120] In some embodiments, the expected rate may be a preset fixed value, or may be flexibly determined according to the operation status of the simulation display system, which is not limited here.
[0121] It should be understood that the embodiment of the present invention optimizes the operation strategy and resource allocation of the simulation display system through the association feedback mechanism between the rendering and display module and the simulation and solution module, so that the two loosely coupled modules are in a restricted relatively independent state. While ensuring the accuracy of the simulation display, efficient collaboration between the simulation and solution module and the rendering and display module in asynchronous processing is achieved, thereby improving the efficiency and performance of the simulation and display system.
[0122] First, the simulation operation rate is reflected according to the data transmission frequency, and the reading interval is adaptively adjusted, and then the rendering display rate is adjusted, so as to achieve efficient collaboration between the loosely coupled simulation solution module and the rendering display module, thereby improving the efficiency and performance of the simulation display system. Furthermore, a high-reliability simulation data preprocessing is provided in the event type sublist to achieve accelerated rendering of simulation data, so as to maintain the response speed and efficiency of the simulation display system.
[0123] Secondly, the working strategies of the simulation solution module and the rendering display module are optimized according to the expected reading interval, and the simulation speed is adaptively adjusted when the working efficiency of the two modules is not compatible. For example, when a large amount of simulation data appears in a high-concurrency area, the expected reading interval exceeds the reading interval corresponding to the preset rendering rate (such as the maximum rendering rate) of the rendering display module, and the accelerated rendering strategy of the rendering display module is enabled to ensure the real-time rendering; for another example, when the expected reading interval is too large or too small, the running rate of the simulation operation is adjusted accordingly to balance the load according to the processing capacity of the system, and the system resource configuration of the two modules is adaptively optimized to avoid system overload caused by excessive data volume, which effectively improves the working efficiency and reliability of the simulation display system.
[0124] It should be noted that when the expected reading interval is less than the first limiting threshold, setting the reading interval to the first limiting threshold can effectively synchronize the smoothness and lag issues of simulation and rendering. At the same time, the rendering display module and the simulation solution module are separated into separate threads. The rendering display module can also correctly render the simulation solution process by processing the sub-simulation data with a simulation time tag. The rendering process will not affect the smoothness of the simulation solution process at all. That is to say, even if there is a difference in time between the simulation and rendering modules (since rendering is processed by a separate thread, the delay in simulation solution time is expected to be in milliseconds), it can also ensure that the rendering screen is rendered according to the correct process data of the simulation solution, thereby ensuring the accuracy of the simulation display.
[0125] Furthermore, the sub-simulation data is sent to the rendering display module on a frame-by-frame basis, and the data volume is huge. When the expected reading interval is greater than the first limiting threshold or the second limiting threshold, the data volume further increases, and the rendering display module temporarily stores the data in the memory in sequence. If it is not processed in time, it is easy to cause data overflow risks and cause system crash errors. Therefore, it is necessary to classify the rendering level list through rendering level labels to improve fluency, define time windows to accelerate rendering, and associate feedback mechanisms to balance the operating efficiency between the two modules, thereby avoiding the reason for data accumulation caused by slow rendering thread processing.
[0126] In some embodiments, an embodiment of the present invention further provides a simulation display system, the system further comprising: A simulation solution module, used for calling the simulation solution module to perform simulation calculations, generating simulation data corresponding to a number of specific simulation events; dividing the simulation data into rendering levels according to the event type of the specific simulation event, generating at least one sub-simulation data with a rendering level label and a simulation time label; An event monitoring module is used to monitor simulation events in the simulation process in real time, and trigger the data transmission module when the specific simulation event is detected; The data transmission module is used to transmit the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; The rendering and display module is used to allocate the at least one sub-simulation data to the first rendering level list or the second rendering level list according to the rendering level label; obtain the transmission frequency of the sub-simulation data, and determine the reading interval of the rendering and display module according to the transmission frequency; based on the reading interval, call the rendering and display module to read at least one target sub-simulation data with the earliest simulation time label from the first rendering level list and the second rendering level list to complete the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
[0127] The simulation display method provided by the embodiment of the present invention is applied to a simulation display system, wherein the simulation display system includes an independent simulation solution module and a rendering display module, so as to separate the solution function and the data visualization display function in the simulation deduction, and the solution function and the display function are decoupled into at least two threads for operation, respectively. The simulation solution module is only responsible for solving and deducing the simulation process to obtain simulation data, dividing the rendering order of sub-simulation data, and transmitting the sub-simulation data in real time through the event monitoring module, while the rendering display module is responsible for classifying and processing the sub-simulation data into multiple rendering level lists, storing and providing data visualization display. Since the display module is only responsible for receiving the sub-simulation data of the simulation solution module and storing and processing it by itself, there is no need to feedback the data status to the simulation solution module, thereby achieving loose coupling.
[0128] In some embodiments, the simulation display system provided by the embodiments of the present invention further includes other modules for implementing the simulation display method provided by any embodiment of the present invention.
[0129] Exemplarily, the rendering and display module further includes: a reading interval module for acquiring the transmission frequency of the sub-simulation data and determining the reading interval of the rendering and display module according to the transmission frequency. The reading interval module further includes: an expected interval submodule, a first interval submodule, and a second interval submodule.
[0130] An expected interval submodule, used to determine an expected reading interval of the rendering and display module according to the transmission frequency based on a preset mapping relationship; A first interval submodule, configured to set the expected reading interval as a reading interval when the expected reading interval is greater than a first limiting threshold, wherein the first limiting threshold is a reading interval corresponding to a preset rendering rate of the rendering and display module; A second interval submodule is configured to set the reading interval to the first limiting threshold when the expected reading interval is smaller than the first limiting threshold.
[0131] Exemplarily, at least one of the sub-simulation data also carries an event type label, and the second rendering level list includes several event type sub-lists; the rendering display module also includes: a type list sub-module, a time window sub-module, a data merging sub-module, and a curve fitting sub-module.
[0132] a type list submodule, configured to allocate the sub-simulation data in the second rendering level list to a corresponding event type sublist according to the event type tag; A time window submodule, used to define a time window of the event type sublist; A data merging submodule, used for analyzing a plurality of sub-simulation data in the time window, and fusing the sub-simulation data of the same entity whose data fluctuations are within a preset range into a merged sub-simulation data; The curve fitting submodule is used to perform a curve fitting operation when calling the rendering and display module to process the merged sub-simulation data.
[0133] Exemplarily, the rendering and display module further includes: a first rendering submodule, a type grouping submodule, a second rendering submodule, and a display data submodule.
[0134] A first rendering submodule, configured to perform rendering processing on the target sub-simulation data in the first rendering level list to obtain first rendering data; A type grouping submodule, used for grouping the target sub-simulation data of the same event type sub-list into one group to obtain at least one target sub-simulation data group; A second rendering submodule, used for rendering each of the target sub-simulation data groups to obtain second rendering data; The data display submodule is used to display the first rendering data and the second rendering data.
[0135] Exemplarily, the simulation display system further includes: a deceleration signal module and a deceleration operation module.
[0136] A deceleration signal module, configured to cause the rendering and display module to send a simulation deceleration signal to the simulation solution module when the expected reading interval is less than a second limit threshold, and the second limit threshold is less than the first limit threshold; The deceleration calculation module is used for the simulation solution module to perform simulation calculation based on the expected rate in the simulation deceleration signal.
[0137] Exemplarily, the simulation display system further includes: an acceleration signal module and an acceleration calculation module.
[0138] An acceleration signal module, configured to cause the rendering and display module to send a simulation acceleration signal to the simulation solution module when the expected reading interval is continuously greater than a third limit threshold within a preset time period, and the third limit threshold is greater than the first limit threshold; The acceleration signal module is used for the simulation solution module to perform simulation calculation based on the expected rate of the simulation acceleration signal.
[0139] Exemplarily, the simulation display system further includes: a model calling module and a model rendering module.
[0140] A model calling module, used for analyzing the entity type corresponding to the target sub-simulation data, and calling the corresponding simulation entity rendering model according to the entity type; Model rendering processing is used to complete the rendering processing of the target sub-simulation data based on the simulation entity rendering model.
[0141] In some embodiments, the event monitoring module may be an observer callback module. An observer is created in the simulation solution module, and the observer is placed in the simulation solution module and automatically triggered after each specific simulation event, thereby realizing the simulation data transmission function.
[0142] In some embodiments, QT is a cross-platform C++ development library. The present invention makes full use of the multi-threaded advantages of QT and the powerful graphics rendering capabilities and free development of the Open Graphics Library (OpenGL), decouples simulation solution from display, so as to improve the simulation running speed and the effect of the rendering display process, and integrates it from the perspective of C++ source code to improve the integrity of the entire simulation display system, so as to quickly and efficiently achieve better simulation experiment results, reduce the hardware requirements of the simulation display system, and do not require complex transmission protocols. Among them, the specific implementation methods of OpenGL and QT can refer to the relevant technology, and QT is combined with OpenGL technology to meet various simulation rendering solutions.
[0143] Create a C++ class in the rendering display module and inherit the QThead class in the QT framework to implement the thread creation function.
[0144] Create a QT thread corresponding to the data update function, and bind the data update function to the simulation solution module observer callback function when the thread is initialized, so that the simulation solution module transfers the real-time sub-simulation data to the rendering display module, that is, completes a round of simulation solution and data transfer, and the simulation solution module continues to execute the simulation process until the simulation ends or is manually stopped.
[0145] Create a QT thread corresponding to the data reading processing function, which is used to extract the sub-simulation data according to the rendering level label and push it into the corresponding rendering level list, and sort the sub-simulation data by type in the rendering level list according to the event type label.
[0146] Create a QT timer to enable the rendering display module to read the sub-simulation data according to the reading interval to control the processing frequency of the rendering display module. During processing, the sub-simulation data of different rendering levels are processed serially, and the sub-simulation data are processed according to the first-in-first-out principle based on the simulation time tag, and displayed through OpenGL function mapping.
[0147] Among them, the creation process of OpenGL function is as follows: create a C++ class in the rendering display module, inherit the OpenGL class, and implement the rendering mapping function; write simulation entity rendering model and special effects related functions, including entity model generation, model data update, special effects generation, model color and material binding and other functions, and bind the rendering level list to it.
[0148] In some embodiments, the simulation display system provided by any embodiment of the present invention can be a visual simulation project. The simulation platform project is divided into a simulation solution module and a rendering display module, wherein the simulation solution module includes two main sub-modules, a simulation calculation module and an event monitoring module. The simulation solution module is the underlying logic of the entire simulation project, and is used to parse and process the simulation script, and pass the sub-simulation data through the event monitoring module; the rendering display module is responsible for reading the sub-simulation data passed by the simulation solution module and classifying it, and pressing the sub-simulation data such as entity addition and deletion, entity movement, etc. into different rendering level lists, processing them at a certain reading interval, and displaying them in the QT window using OpenGL technology.
[0149] See also Figure 3 3 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a server.
[0150] The computer device includes a processor, a memory and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0151] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any simulation display method.
[0152] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0153] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any simulation display method.
[0154] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0156] In one embodiment, the simulation display system includes an independent simulation solution module and a rendering display module, and the processor is used to run a computer program stored in the memory to implement the following steps: S101 calls the simulation solution module to perform simulation calculations to generate simulation data corresponding to a number of specific simulation events; S102: dividing the simulation data into rendering levels according to the event type of the specific simulation event, and generating at least one sub-simulation data with a rendering level label and a simulation time label; S103 monitors simulation events in the simulation process in real time, and when the specific simulation event is detected, transmits the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; S104, assigning the at least one sub-simulation data to a first rendering level list or a second rendering level list according to the rendering level label; S105: acquiring the transmission frequency of the sub-simulation data, and determining the reading interval of the rendering and display module according to the transmission frequency; S106 calls the rendering and display module to read at least one target sub-simulation data with the earliest simulation time tag from the first rendering level list and the second rendering level list based on the reading interval, and completes the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
[0157] In some embodiments, when implementing step S105, the processor is also used to implement: based on a preset mapping relationship, determining the expected reading interval of the rendering display module according to the transmission frequency; when the expected reading interval is greater than a first limiting threshold, setting the expected reading interval to a reading interval, wherein the first limiting threshold is a reading interval corresponding to a preset rendering rate of the rendering display module; when the expected reading interval is less than the first limiting threshold, setting the reading interval to the first limiting threshold.
[0158] In some embodiments, at least one of the sub-simulation data also carries an event type tag, and the second rendering level list includes several event type sub-lists; after implementing the step of setting the reading interval to the first limiting threshold, the processor is also used to implement: allocating the sub-simulation data in the second rendering level list to the corresponding event type sub-list according to the event type tag; defining a time window for the event type sub-list; analyzing several sub-simulation data in the time window, and merging the sub-simulation data whose data fluctuations under the same entity are within a preset range into a merged sub-simulation data; and performing curve fitting operations when calling the rendering display module to process the merged sub-simulation data.
[0159] In some embodiments, when implementing the step of completing the rendering and display of the target sub-simulation data, the processor is also used to implement: rendering the target sub-simulation data in the first rendering level list to obtain first rendering data; grouping the target sub-simulation data of the same event type sub-list into a group to obtain at least one target sub-simulation data group; rendering each of the target sub-simulation data groups separately to obtain second rendering data; and displaying the first rendering data and the second rendering data.
[0160] In some embodiments, the processor is also used to implement: when the expected reading interval is less than a second limit threshold, the rendering display module sends a simulation deceleration signal to the simulation solution module, and the second limit threshold is less than the first limit threshold; the simulation solution module performs simulation operations based on the expected rate in the simulation deceleration signal.
[0161] In some embodiments, the processor is also used to implement: when the expected reading interval is continuously greater than a third limit threshold within a preset time period, the rendering and display module sends a simulation acceleration signal to the simulation solution module, and the third limit threshold is greater than the first limit threshold; the simulation solution module performs simulation operations based on the expected rate of the simulation acceleration signal.
[0162] In some embodiments, when implementing step S106, the processor is also used to implement: analyzing the entity type corresponding to the target sub-simulation data, calling the corresponding simulation entity rendering model according to the entity type; and completing the rendering processing of the target sub-simulation data based on the simulation entity rendering model.
[0163] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any simulation display method provided in an embodiment of the present invention.
[0164] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0165] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A simulation display method, characterized in that: Applied to a simulation display system, the simulation display system includes an independent simulation solution module and a rendering display module, and the method includes the following steps: S101 calls the simulation solution module to perform simulation calculations to generate simulation data corresponding to a number of specific simulation events, wherein the specific simulation events are events that occur in the simulation environment and need to be rendered and displayed; S102: dividing the simulation data into rendering levels according to the event type of the specific simulation event, and generating at least one sub-simulation data with a rendering level label and a simulation time label; S103 monitors simulation events in the simulation process in real time, and when the specific simulation event is detected, transmits the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; S104, assigning the at least one sub-simulation data to a first rendering level list or a second rendering level list according to the rendering level label; S105: acquiring the transmission frequency of the sub-simulation data, and determining the reading interval of the rendering and display module according to the transmission frequency; S106 calls the rendering and display module to read at least one target sub-simulation data with the earliest simulation time tag from the first rendering level list and the second rendering level list based on the reading interval, and completes the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
2. The method according to claim 1, characterized in that The S105 includes: Based on a preset mapping relationship, determining an expected reading interval of the rendering and display module according to the transmission frequency; When the expected reading interval is greater than a first limiting threshold, setting the expected reading interval to a reading interval, wherein the first limiting threshold is a reading interval corresponding to a preset rendering rate of the rendering and display module; When the expected reading interval is smaller than the first limit threshold, the reading interval is set to the first limit threshold.
3. The method according to claim 2, characterized in that The at least one sub-simulation data further carries an event type tag, and the second rendering level list includes a plurality of event type sub-lists; After setting the reading interval to the first limiting threshold, the method further includes: Allocating the sub-simulation data in the second rendering level list to the corresponding event type sub-list according to the event type tag; defining a time window for the event type sublist; Analyze the plurality of sub-simulation data in the time window, and fuse the sub-simulation data of the same entity whose data fluctuations are within a preset range into a combined sub-simulation data; The rendering and display module is called to perform a curve fitting operation when processing the merged sub-simulation data.
4. The method according to claim 3, characterized in that The step of completing the rendering and display of the target sub-simulation data includes: Performing rendering processing on the target sub-simulation data in the first rendering level list to obtain first rendering data; Grouping the target sub-simulation data of the same event type sub-list into one group to obtain at least one target sub-simulation data group; Performing rendering processing on each of the target sub-simulation data groups respectively to obtain second rendering data; The first rendering data and the second rendering data are displayed.
5. The method according to claim 2, characterized in that: The method further comprises: When the expected reading interval is less than a second limiting threshold, the rendering and display module sends a simulation deceleration signal to the simulation solving module, and the second limiting threshold is less than the first limiting threshold; The simulation solution module performs simulation calculations based on an expected rate in the simulated deceleration signal.
6. The method according to claim 2, characterized in that The method further comprises: When the expected reading interval is continuously greater than a third limiting threshold within a preset time period, the rendering and display module sends a simulation acceleration signal to the simulation solving module, and the third limiting threshold is greater than the first limiting threshold; The simulation solving module performs simulation calculation based on the expected rate of the simulation acceleration signal.
7. The method according to claim 1, characterized in that The S106 further includes: Analyze the entity type corresponding to the target sub-simulation data, and call the corresponding simulation entity rendering model according to the entity type; The rendering process of the target sub-simulation data is completed based on the simulation entity rendering model.
8. A simulation display system, characterized in that: The system further comprises: A simulation solution module, used for calling the simulation solution module to perform simulation calculations, generating simulation data corresponding to a number of specific simulation events; dividing the simulation data into rendering levels according to the event type of the specific simulation event, generating at least one sub-simulation data with a rendering level label and a simulation time label; An event monitoring module is used to monitor simulation events in the simulation process in real time, and trigger the data transmission module when the specific simulation event is detected; The data transmission module is used to transmit the at least one sub-simulation data corresponding to the specific simulation event to the rendering and display module; The rendering and display module is used to allocate the at least one sub-simulation data to the first rendering level list or the second rendering level list according to the rendering level label; obtain the transmission frequency of the sub-simulation data, and determine the reading interval of the rendering and display module according to the transmission frequency; based on the reading interval, call the rendering and display module to read at least one target sub-simulation data with the earliest simulation time label from the first rendering level list and the second rendering level list to complete the rendering and display of the target sub-simulation data; wherein, the target sub-simulation data in the first rendering level list is rendered before the target sub-simulation data in the second rendering level list.
9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the simulation display method according to any one of claims 1 to 7 when executing the computer program.
10. 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 processor implements the simulation display method according to any one of claims 1 to 7.
Citation Information
Patent Citations
GPU simulation method and system based on virtual simulation platform
CN116010037A
Simulation method, model, electronic equipment and storage medium
CN117634369A
Data visualization system based on Qt frame and OpenGL programmable pipeline
CN108109105A
Multi-thread simulation method and device, electronic equipment, storage medium and vehicle
CN116188238A
Cloud desktop system, cloud desktop display method, terminal device and storage medium
WO2024061180A1