Data localization simulation control method, device, program product, and medium
Through the deduction simulation control method of data localization, the problem of waste of computing resources caused by reopening and time-point adjustment in deduction simulation is solved, and efficient deduction simulation and visualization effects are achieved.
Patent Information
- Application Number
- CN202510094515.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In deduction simulation, when reopening the visual simulation scene or adjusting the time point, recalculation needs to be performed, resulting in wasted computing resources.
Through the deduction simulation control method of data localization, the plan deduction data is loaded to the memory, and the evolution status of the corresponding frame is retrieved according to the progress bar position, image information and basic data are obtained and reorganized to realize the rendering and display of the scene without repeated calculations.
It realizes that computing resources can be saved without restarting or adjusting time points in deduction simulation, and improves the efficiency and visualization effect of deduction simulation.
Smart Images

Figure CN119538598B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation technology, and in particular to a data localization deduction simulation method, a computer device and a computer program product, and a computer-readable storage medium. Background Art
[0002] In the process of emergency management and disaster plan simulation, it is very important to accurately simulate and visualize the evolution of the simulation scene, which usually involves a lot of calculations and real-time rendering. In the simulation process of a scene, such as a flood scene or a fire scene, the calculation and rendering are updated frame by frame, just like the passage of time, which is sequential, continuous and irreversible.
[0003] Since it is irreversible, it cannot be adjusted to a certain time point at will. Once adjusted to a certain time point, it needs to be updated and calculated in real time, and the visual simulation of each reopened scene also needs to be recalculated, wasting computing resources. Summary of the invention
[0004] One purpose of the present application is to solve the problem of reopening the visual simulation scene and adjusting the time point in the deduction simulation without the need for recalculation, so as to save computing resources.
[0005] According to one aspect of an embodiment of the present application, a data localization deduction simulation control method is disclosed, the method comprising:
[0006] In response to the execution of the plan deduction simulation, the plan deduction data persistently stored after the plan deduction is loaded into the operation memory, wherein the loaded plan deduction data includes basic data;
[0007] Following the progress bar position of the currently started simulation, the evolution state of the corresponding frame is retrieved, and basic data of the corresponding evolution state frame in the emergency plan deduction data is extracted;
[0008] Acquiring image information of the evolution state frame, wherein the image information is an image expression of the evolution state of the deduced scene, and the acquisition of the image information includes loading and extracting the image information from cache call or persistent storage to a running memory;
[0009] The image information and basic data are reorganized for the evolution state frame, and the simulated evolution state is displayed in the scene rendering by reorganizing the image information and basic data.
[0010] According to one aspect of an embodiment of the present application, a computer device is disclosed, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0011] According to one aspect of an embodiment of the present application, a computer program product is disclosed, including a computer program, wherein when the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0012] According to one aspect of an embodiment of the present application, a computer-readable storage medium is disclosed, on which a computer program is stored, and when the program is executed by a processor, the steps of any of the methods described above are implemented.
[0013] The embodiment of the present application implements dynamic data loading and scene rendering based on data localization, which can achieve efficient and intuitive plan simulation while saving computing resources. The reopening of the visual simulation scene and the adjustment of the time point in the simulation do not require recalculation, thereby providing strong technical support for the simulation, monitoring and decision-making of complex scenarios, and can be applicable to multiple plan simulation scenarios.
[0014] Specifically, as a plan deduction simulation proceeds, the embodiment of the present application will first load the plan deduction data persistently stored after the plan deduction into the running memory, and the loaded plan deduction data will at least include basic data. Then, as the progress position of the current simulation is started, the evolution state of the corresponding frame is initiated to retrieve the evolution state of the corresponding frame. On the one hand, the basic data of the corresponding evolution state frame in the plan deduction data in the running memory is extracted, and on the other hand, the image information of the evolution state frame is obtained by calling the cache or loading and extracting the persistently stored image information into the running memory. In this way, the evolution state of the corresponding frame is retrieved, so that the image information and basic data of the evolution state frame can be reorganized and rendered into the scene to display the simulated evolution state. The execution of this process greatly reduces the deduction calculation and effectively saves computing resources. Restarting the visual simulation scene and dragging the progress bar position can directly perform visual simulation of the progress bar position through localized data.
[0015] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0018] Figure 1 It is a flow chart describing a deduction simulation control method for data localization according to an exemplary embodiment.
[0019] Figure 2 is based on Figure 1 The corresponding embodiment shows a flow chart describing a method for extracting basic data of the corresponding evolution state frame in the plan deduction data by calling the evolution state of the corresponding frame following the progress bar position of the currently started simulation.
[0020] Figure 3 It is a flow chart showing the recording and retrieval of river status by taking flood simulation as an example.
[0021] Figure 4 is based on Figure 3 A flowchart of recording and caching river data to RAM during a simulation process is shown in the corresponding embodiment.
[0022] Figure 5 is based on Figure 4 A schematic diagram of the execution process of retrieving, reorganizing and rendering all the data in the hard disk shown in the corresponding embodiment.
[0023] Figure 6 is based on Figure 4 A schematic diagram of the execution process of retrieving image information from a hard disk and reorganizing and rendering cached basic data in real time according to the corresponding embodiment.
[0024] Figure 7 is based on Figure 5 A flowchart of the entire simulation restoration process shown in the corresponding embodiment.
[0025] Figure 8 is based on Figure 6 A schematic diagram of a simulation restoration process based on extraction and reduction of image information of each frame is shown in the corresponding embodiment.
[0026] Fig. 9 is based on Figure 6 The illustrated embodiment shows a schematic diagram of a simulation restoration process combining cache retrieval with real-time simulation. DETAILED DESCRIPTION
[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0028] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0029] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0030] In existing visualization simulation scenes, for example, a flood simulation scene, the description of the evolution state in each frame, that is, the deduction result of the flood state is completed by computer frame-by-frame update calculation, and if it is necessary to jump to a past time node to simulate the corresponding flood state in the scene again, it is necessary to recalculate the corresponding frame of this past time node.
[0031] In short, users can only watch the complete simulation process of a fixed length, and cannot trigger the operation of fast forward, rewind or jump to a certain time node during the viewing process. It is difficult to simulate the flooding state in a specific time period, and the simulated scene appears to be gone forever.
[0032] For example, in an existing implementation, an intelligent scheduling system for flood storage areas that simulates flooding conditions uses a progress bar to display a flooding simulation for a total duration of 2 minutes. During this flooding simulation, if you need to click on a position on the progress bar that has not been simulated, such as triggering a click on the progress bar, the screen will stagnate. When the time difference between the clicked progress bar position and the current progress bar position is, for example, 60 seconds, the background has to calculate the data after 60 seconds, that is, to deduce the flooding condition after 60 seconds. Only after the deduction is completed can the screen loading and display continue.
[0033] The longer the time difference between the clicked progress bar position and the current progress bar position, the longer the time used for deduction and calculation will be, and the longer the screen will be stagnant.
[0034] The embodiment of the present application is used to provide a visual simulation scenario to display the evolutionary state changes of a plan over time, that is, the evolutionary state of a specified time node can be displayed in real time in the implemented plan simulation, thereby facilitating the user to analyze each time node and improve the accuracy of decision-making.
[0035] In the visual simulation scene, it corresponds to the position of each progress bar, that is, as the position of the progress bar jumps and switches, the simulation in the scene can be directly performed, and the evolution state presented is not paused or stuck.
[0036] See also Figure 1 , Figure 1 It is a flow chart describing a deduction simulation control method for data localization according to an exemplary embodiment.
[0037] The data localization deduction simulation control method provided in the embodiment of the present application includes:
[0038] Step S110, in response to the execution of the plan simulation, loading the plan simulation data stored persistently after the plan simulation into the operation memory, wherein the loaded plan simulation data includes basic data;
[0039] Step S120, following the progress bar position of the current simulation start, the evolution state of the corresponding frame is retrieved, and basic data of the corresponding evolution state frame in the plan deduction data is extracted;
[0040] Step S130, acquiring image information of the evolution state frame, the image information is an image expression of the evolution state of the deduced scene, and the acquisition of the image information includes loading and extracting the cache call or persistently stored image information into the running memory;
[0041] Step S140, reorganizing the image information and basic data for the evolution state frame, and rendering the scene to display the simulated evolution state by reorganizing the image information and basic data.
[0042] These steps are described in detail below.
[0043] First of all, it should be clear that the simulations conducted include but are not limited to the simulations of flooding, fire and other scenarios, and the simulations conducted for any scenario can be conducted under multiple plans, so as to simulate the evolutionary state of any plan under the plan, and load the simulated evolutionary state in the displayed visual simulation scene. Here, you can also switch to other plans as needed, and then implement the evolutionary state simulation under other plans, so as to accurately and smoothly display the development and characteristics of specific situations or disasters.
[0044] The deduction simulation referred to is the implementation of deduction calculations and the loading and display of the evolution status in a visual simulation scene of the deduction calculation results, such as the plan deduction data referred to in this application. The evolution status presented frame by frame in the visual simulation scene simulates the flooding state of a river or the situation in a fire scene, etc.
[0045] As a plan simulation proceeds, the simulation calculation results are recorded to generate plan simulation data. The generated plan simulation data is cached in the running memory (running memory, such as Ram), and is subsequently stored persistently in one go or in batches and saved in the hard disk (Disk).
[0046] That is, for the emergency plan simulation, the evolution states corresponding to several frames are recorded periodically, for example, one frame is recorded every minute, and so on until the simulation is completed. The obtained emergency plan simulation data corresponds to the evolution states of the recorded several frames.
[0047] Further explained, the plan deduction data generated by recording the evolution state in the deduction includes basic data and image information corresponding to the basic data. In short, the basic data and the image information corresponding to it correspond to an evolution state frame. In other words, the evolution state of a frame is described by the basic data and the image information corresponding to it.
[0048] The basic data and image information recorded in an evolutionary state frame are separated and correspond to each other, so that the data loading performed by the simulation can load the basic data and image information separately, enhancing the flexibility of local data loading and being able to adapt to the visualization simulation scenes in different situations.
[0049] As for the storage of data during the emergency plan simulation, the basic data and image information are also saved to the hard disk separately. For example, for the basic data and image information recorded every n seconds, it corresponds to the currently recorded evolution state frame, and the corresponding basic data continuously recorded can be saved to the hard disk at one time to perform persistent storage of the basic data obtained from the emergency plan simulation, and then all the obtained image information is saved to the hard disk at one time to achieve persistent storage of the image information obtained from the emergency plan simulation.
[0050] In addition, and not limited to this, the obtained emergency plan deduction data can also be stored in batches to the hard disk. Specifically, several frames of cached basic data are written to the hard disk for persistent storage of this batch of basic data. Correspondingly, several frames of cached image information are written to the hard disk for persistent storage of this batch of image information. On this basis, as the emergency plan deduction proceeds, the recording is cyclically recorded, and the next batch of persistent storage is cyclically performed until the emergency plan deduction is completed. The persistent storage of all emergency plan deduction data can be completed by transferring the emergency plan deduction data to the hard disk in batches. The scheme adaptively adapts to the situation of large number of frames and large scenes in the emergency plan deduction, thereby avoiding the impact on the real-time cache performance and avoiding the situation of exceeding the upper limit of the running memory load due to large number of frames and large scenes.
[0051] Based on this, under the premise that the plan simulation data is localized and the basic data and image information are separately saved to the hard disk, the plan simulation data in the hard disk is loaded into the running memory through the execution of step 110 for the realization of the visual simulation scene, thereby responding to the initiation of the plan simulation.
[0052] In step S110, when the plan simulation begins, such as when the subsequent startup program triggers the running of a visual simulation scene of a plan after the plan simulation is completed, the plan simulation data persistently stored after the plan simulation will be loaded into the running memory in response to the progress of the plan simulation, so as to load the plan simulation data into the cache in the running memory, so as to provide data support for the upcoming evolution state frame call.
[0053] It should be understood that when the plan simulation is completed, the corresponding plan simulation data is persistently stored locally, and the program for the plan simulation and the visual simulation scene is closed until the program is started when the visual simulation scene of the specified plan needs to be run. The started program will load the persistently stored plan simulation data cache for the plan that needs to run the visual simulation scene, so as to extract data following the frame call.
[0054] As mentioned above, the persistently stored emergency plan deduction data includes basic data and image information, and the two are stored independently. The emergency plan deduction data loaded in step S110 at least includes basic data, that is, the corresponding image information will be loaded as needed, but not necessarily loaded into the operating system synchronously with the basic data.
[0055] Exemplarily, for an evolution state frame, the synchronous loading of basic data and image information in the plan simulation data will cause the running visual simulation scene to consume time for the loading of the plan simulation data, and then pause the screen for the loading of the plan simulation data. However, it will also benefit from the loading of basic data and image information into the running memory, and the evolution state in the visual simulation scene can be quickly switched when the progress bar is dragged, thereby quickly changing the evolution state during the dragging of the progress bar until it stops at the target position.
[0056] If, during the execution of step S110, the loading of the plan simulation data is limited to the loading of the basic data, on the one hand, the loading speed is greatly improved to avoid the situation where the screen pauses, but on the other hand, it is limited by the lack of image information in the running memory and cannot present the corresponding evolution status during the process of dragging the progress bar.
[0057] It can be clearly seen that whether to load image information during the loading of emergency plan simulation data depends on the settings of two dimensions, namely, the acceptance of the length of time taken for loading and whether it is necessary to simulate the evolution state during the change of the progress bar position.
[0058] If you need to quickly load and quickly enter the visual simulation scene of the plan, only the basic data is loaded in step S110; if you need to simulate the evolution state during the change of the progress bar position, the plan simulation data loaded in the execution of step S110 includes the basic data and the image information corresponding to the basic data.
[0059] In an exemplary embodiment, the execution process of step S110 includes: saving and caching the plan deduction data locally and loading the persistently stored basic data into the running memory in the subsequent start-up of the plan deduction simulation, and the image information corresponding to the basic data is to be loaded and extracted.
[0060] This is to load only basic data without loading image information, and then load the image information from the hard disk when the visual simulation scene calls the corresponding evolution state frame, so as to ensure that the loading time is short and will not cause screen freeze.
[0061] At this point, it should be added that the basic data is used to describe the simulation range, offset value and position, etc. On the one hand, it limits the simulation range in the visual simulation scene, and on the other hand, it also limits the position of the corresponding evolution state frame in the visual simulation scene.
[0062] Specifically, the simulation range indicates the range of simulation implementation in the visual simulation scene. The visual simulation scene is configured with a three-dimensional model to present the evolution state, such as various flooding behaviors, river behaviors, etc. Based on this, the simulation range is the area where the three-dimensional model exists in the visual simulation scene. The simulation range covers the three-dimensional models distributed in the visual simulation scene, ensuring the comprehensiveness of the simulation. The offset value in the basic data indicates the height corresponding to the evolution state in the visual simulation scene, specifically, it can be the value in the Z-axis direction of the coordinate system in the scene; the position in the basic data refers to the frame of the simulated evolution state, that is, the position of the evolution state frame in the scene.
[0063] In summary, the basic data in the plan simulation data is used to control the fusion of the rendered evolution state frame into the visual simulation scene, while the image information is used to implement the rendering of the corresponding evolution state frame.
[0064] With the execution of step S110 , the basic data corresponding to each evolving state frame of the visual simulation scene is loaded into the running memory, while the image information is loaded into the running memory according to the setting, or is still persistently stored in the hard disk and is not loaded.
[0065] After completing the loading of the plan deduction data through step S110, that is, at least the loading of all basic data, or the loading of all basic data and all image information separately, the basic data of the corresponding evolution state frame can be obtained from the running memory through cache call through the execution of step S120.
[0066] In step S120, after the visual simulation scene starts running, following the flow of the progress bar position, the evolution state of the corresponding frame will be called according to the current progress bar position to provide data support for the rendering of the evolution state frame at the current progress bar position.
[0067] Correspondingly, in step S130, the image information of the evolution state frame is obtained by calling the cache or loading the image information into the running memory and then extracting it. The evolution state frame corresponding to the image information corresponds to the basic data extracted in step S110.
[0068] In step S120, the evolution state of the corresponding frame is retrieved according to the current position of the progress bar. The basic data may be retrieved frame by frame, or the basic data corresponding to several frames may be retrieved according to the frame rate of the visual simulation scene.
[0069] The evolution state presentation of the visual simulation scene frame by frame is adapted to the specified frame rate, for example, 10 frames per second. Therefore, the basic data of the corresponding number of evolution state frames is extracted according to the number of frames switched per unit time at the specified frame rate, which will not significantly increase the time consumption and will enhance the smoothness of the scene screen, avoiding the loss of evolution state simulation in this unit time.
[0070] As a supplementary explanation, the acquisition of the image information corresponding to the basic data is performed synchronously with the basic data. Specifically, regardless of whether the image information has been loaded into the storage, the image information will be acquired in accordance with the extraction of the basic data.
[0071] During the execution of step S120, if several frames of basic data are extracted from the cached plan deduction data to adapt to the frame rate, then in the image information acquisition performed in step S130, correspondingly, several frames of image information cache calls or loading and extraction are also performed.
[0072] In step S130, the image information is not loaded into the running memory along with the loading of the plan deduction data, that is, the running memory is only loaded with basic data but no image information. At this time, the number of evolutionary state frames corresponding to the extracted basic data and the extracted image information loaded into the running memory are adapted to the specified frames, that is, as mentioned above, the number of evolutionary state frames is the number of frames per unit time indicated by the specified frame rate.
[0073] In addition, in another exemplary embodiment, the image information may also be loaded from the hard disk to the memory through the execution of step 130 so as to be retrieved by cache call.
[0074] Correspondingly, the execution process of step S130 includes: caching and calling the image information corresponding to the extracted basic data, where the image information is a frame cache recording the position of the progress bar.
[0075] The basic data and image information are both obtained from recording a frame, and the basic data is used to control the integration of the corresponding evolution state frame into the running visual simulation scene. The image information is used to render the evolution state frame. Therefore, the acquisition of the basic data and image information will be adapted to correspond, so that the basic data and image information can be directly reorganized and rendered in step S140.
[0076] It is emphasized again that the plan simulation data will be loaded from the hard disk to the running memory when the program is started and a simulation of a plan is initiated. The loaded plan simulation data includes all the basic data of this plan, or all the basic data and all the image data of this plan. Therefore, it is adapted to load the plan simulation data into the running memory. In step S130, the corresponding image information will be obtained by one of two methods: cache call or loading and extracting the persistently stored image information into the running memory.
[0077] The cache call acquisition method referred to is to extract image information when both basic data and image information are loaded into the running memory; the loading and extraction of image information is the execution process of loading image information into the running memory and then extracting image information from the running memory when only basic data is loaded into the running memory.
[0078] Exemplarily, when the image information is loaded into the running memory along with the loading of the plan deduction data, the basic data and image information are extracted from the running memory respectively according to the specified frame rate.
[0079] See also Figure 2 of, Figure 2 is based on Figure 2 The corresponding embodiment shows a flow chart describing a method for extracting basic data of the corresponding evolution state frame in the plan deduction data by calling the evolution state of the corresponding frame following the progress bar position of the currently started simulation.
[0080] The embodiment of the present application provides a method for following the progress bar position of the currently started simulation to retrieve the evolution state of the corresponding frame, and performing a basic data extraction step S120 of the corresponding evolution state frame in the plan deduction data, including:
[0081] Step S121, initiating the call of the progress bar position at the progress bar position located by the progress bar flow currently starting to be simulated, and the call of the progress bar position at the progress bar position is controlled by the configured timer;
[0082] Step S122, in response to the call of the evolution state frame, extract basic data of a specified number of evolution state frames per unit time from the plan deduction data loaded into the memory at a specified frame rate.
[0083] These two steps are described in detail below.
[0084] As the emergency plan simulation data is loaded, the running visual simulation scene will start to simulate at the specified frame rate, that is, the evolution status of the visual simulation scene will be dynamically displayed according to the specified frame. For this reason, each call of the evolution status frame will be adapted to the specified frame rate.
[0085] The progress bar configured for the visual simulation scene will flow and advance during the simulation playback, so the evolution state frame is called for the current position of the progress bar.
[0086] According to the specified frame rate, the call of the evolution status frame is initiated every unit time. For this purpose, a timer is configured to control the call of each round of evolution status frame through the timer.
[0087] In response to the initiated evolution state frame call, basic data corresponding to the currently called evolution state frame will be extracted from the cached basic data.
[0088] Exemplarily, the number of evolution status frames initiated for retrieval is not one, and the number is adapted to a specified frame rate, which is the number of frames of the specified frame rate per unit time.
[0089] Correspondingly, the execution process of step S130 includes: extracting image information of a specified number of evolution state frames per unit time at a specified frame rate by configuring a timer, and the extracted image deluxe version corresponds to the basic data extracted at the specified frame rate.
[0090] In summary, the basic data extraction and image information extraction of a specified number of evolution state frames are performed in the running memory respectively. The two are executed independently of each other, but both correspond to the number of evolution state frames that need to be called at present.
[0091] In addition, step S120 and step S130 are executed in an orderly manner according to the unit time indicated by the frame rate under the control of the configured timer, so that even if the scene is complex and the amount of data is large, the situation where the scene is difficult to load and is stuck for a long time can be effectively avoided.
[0092] The basic data extraction and image information extraction for a specified number of evolution state frames per unit time will be performed before the reorganization between the two, that is, before step S140, and the image information will also be extracted to reduce the amount of data for subsequent real-time reorganization, avoid simulation jams, realize cache simulation restoration when there are too many frames, and obtain a smooth playback visual simulation scene.
[0093] Specifically, in an exemplary embodiment, before step S140, the method provided by the present application further includes:
[0094] For image information corresponding to the same evolution state frame, the image information corresponding to the same evolution state frame is reduced by extracting the image information, and the extracted image information is used for reorganization with the corresponding basic data.
[0095] For example, in flooding simulation, image information is used to characterize the evolution of dimensions such as water level height (Heightwet), ground elevation (Ground) and flow velocity (Velocit), and the image information for each dimension will exist in the form of an image. In other words, water level height, ground elevation and flow velocity will all be represented by corresponding images. The three-dimensional image information corresponds to three image files. Therefore, it can be clearly seen that when the number of frames is too large, the image information corresponds to a large amount of data, and it is necessary to simplify it by extracting and reducing the image information.
[0096] Each evolution state frame corresponds to at least three image files. Therefore, the image information corresponding to each evolution state frame is extracted and reduced, and finally the image information corresponding to each evolution state frame is reduced to a negligible dimension.
[0097] For example, for the 1-10 frames of image information loaded from the hard disk per second, the image information of each frame is extracted and reduced so that the image information of the frame only exists in one or two image files. Similarly, for all evolution state frames, the amount of data can be reduced through this process to avoid the time problem caused by centralized reorganization.
[0098] For example, step S140 is the real-time centralized reorganization of 10 frames of evolution states. 10 frames of evolution states are reorganized in real time every second. Each frame of evolution state has at least 3 images, such as a river state diagram that describes the water level, ground elevation and flow rate respectively. The real-time reorganization and real-time loading of data rendering performed at this time will cause the simulation process to freeze. Therefore, it is necessary to extract the image information of each frame of evolution state.
[0099] The extracted image information is used to be reorganized with the corresponding basic information, and then reorganized and rendered in real time in step S140 to provide a smooth picture for the operation of the visual simulation scene.
[0100] The image information extraction for each frame can be adapted to the evolution state change and / or the dimension of interest. For example, when the evolution state change in the ground elevation dimension is small, only the image information describing the water level and flow rate can be extracted; when the flooding state of an area is concerned, only the image information describing the water level and flow rate can be extracted, which is not limited here.
[0101] In another exemplary embodiment, unlike the aforementioned image information being loaded into the running memory for cache call, in this exemplary embodiment, the image information is not loaded into the running memory along with the loading of the plan deduction data, and the progress bar position indicated by step S120 corresponds to a node configured on the progress bar, and step S130 includes:
[0102] When the progress bar flows to a configured node, persistently stored image information is loaded to the progress bar position, where the image information corresponds to basic data extracted at the progress bar position.
[0103] First of all, it should be explained that in the operation of a visual simulation scene for a plan, several nodes are configured on the progress bar, and the node is used to initiate the loading of image information of the evolution state frame at the position of the progress bar.
[0104] The number of progress bar configuration nodes will depend on the duration of the visual simulation scene being run and the complexity of the scene, and is not limited here.
[0105] For example, when the duration of the running visual simulation scene is long, a larger number of nodes can be configured. On the one hand, this is adapted to the duration, and on the other hand, it will ensure that the running of the visual simulation scene will not be stuck due to the long distance between the nodes.
[0106] As the progress bar moves forward, or as the progress bar is dragged and moves to a node, the basic data of the evolution state frame corresponding to this node is first extracted from the running memory, and the image information corresponding to the evolution state frame is also loaded from the hard disk.
[0107] At this point, through the execution of step S140, the basic data and image information can be reorganized in real time for the current node and the obtained evolution state frame can be loaded into the visual simulation scene rendering.
[0108] It should be understood that at this time, the progress bar continues to flow and advance, and the current position of the progress bar will not trigger the loading and extraction of image information because no node is configured. At this time, a real-time deduction simulation will be performed based on the evolution state simulated by the previous node, so that the simulated evolution state frame can be rendered into the visual simulation scene to display the real-time deduced evolution state.
[0109] Similarly, real-time deduction and simulation are performed between two nodes, and when the nodes are reached, the cache scheduling of basic data and the loading and extraction of image information are performed. The integration of the two methods ensures the integrity of the visual simulation. Also, since too much evolution state recording is no longer required during the deduction process, the number of evolution state frames that need to be recorded is greatly reduced, thereby improving the implementation efficiency of the deduction process.
[0110] In summary, after step S140 is executed, the method of the embodiment of the present application further includes:
[0111] In response to the flow of the progress bar, a real-time simulation is performed based on the simulated response state on the node through which the progress bar flows, and the evolution state of the real-time simulation is rendered and displayed until the progress bar flows to the next node. The progress bar position of the next node is configured as the progress bar position of the currently started simulation.
[0112] At this point, in this exemplary embodiment, the pure cache restoration method is no longer used alone. It is adapted to the long-duration emergency plan simulation. When the number of frames in the long-duration emergency plan simulation is particularly large, the execution process of the simulation record can be consistent with the restoration simulation process through the integration of real-time simulation and cache scheduling, and there will be no time difference, such as time is not compressed, thereby improving system performance to support long-duration emergency plan simulation.
[0113] For example, in the operation of the visual simulation scene, that is, in the restoration simulation process, if the cache method is used, such as only real-time reorganization and rendering of locally stored image information and basic data to provide a visual simulation scene, it is necessary to support the recording of 10 frames of evolution status per second. At this time, frame leakage often occurs. In order to avoid the occurrence of frame leakage, the simulation process of the plan with a cache simulation time of 100 minutes takes 1000 minutes, which is used to implement the simulation calculation on the one hand and record the cache on the other hand, and then save it to the hard disk. The cached image information and basic data are saved to the hard disk at one time or in batches after caching.
[0114] If a combination of real-time simulation and cache scheduling is adopted, the basic data and image information of the evolution state cache are recorded according to the set unit time, and saved to the hard disk at one time or in batches.
[0115] The unit time referred to may be 1 minute. For example, for a 100-minute emergency plan simulation, 100 frames may be recorded, that is, 1 frame is recorded every minute. Correspondingly, the resulting simulation restoration, that is, the operation of the corresponding visual simulation scene, will configure nodes according to the unit time, that is, configure a node every 1 minute.
[0116] The basic data and image information recorded on the node are obtained through cache scheduling, and then reorganized and rendered. Real-time simulation is performed within a unit of time (between nodes). In short, a cache adjustment is implemented every minute, and real-time simulation is performed every minute. The duration of the real-time simulation can be adjusted according to the operation of the visual simulation scene.
[0117] At this point, the operation of the visual simulation scene can be realized by integrating real-time simulation with cache calls.
[0118] In summary, the visual simulation scenario operation implemented for the plan includes the following execution process:
[0119] (1) The startup simulation of a plan only loads the basic data from the full amount, and loads the images corresponding to the frames frame by frame or the number of frames adapted to the frame rate mapping during the operation of the visual simulation scene according to the frame rate:
[0120] The running time of the visual simulation scene in this way is different from the time of conducting the plan deduction, and the detail of the picture depends on the loading of the image information, but the loading time at startup will not be too long, thus avoiding long-term picture stagnation.
[0121] (2) When a plan is started for simulation, the corresponding full amount of basic data and full amount of image information are loaded from the hard disk. This method is suitable for situations where the amount of data is not large. When the amount of data is small, loading the full amount of data can avoid long-term stagnation of the screen.
[0122] However, the loading of the full amount of data enables the operation of the visual simulation scenes to be reorganized and rendered in real time, ensuring the smoothness of the picture.
[0123] (3) When the plan is started for simulation, only the basic data is fully loaded. The image information involved is loaded according to the nodes configured on the progress bar. The simulation is carried out between the nodes, so that the operation of the visual simulation scene is a fusion of real-time simulation and cache scheduling, ensuring that the duration of the plan simulation is consistent with the running duration of the visual simulation scene. The running duration is no longer compressed, and the evolution status and evolution status changes between nodes can be accurately provided, and there is no longer a situation where the evolution status is missing.
[0124] The three execution processes are flexibly adjusted to provide the optimal visual simulation scenario, thus guaranteeing visual simulation under various plans.
[0125] The following uses flooding simulation as an example to illustrate the implementation of the method of the present application.
[0126] As mentioned above, the realization of the visual simulation scenario includes the execution process of plan deduction (simulation), recording and localized storage of plan deduction, and retrieving localized data to run the visual simulation scenario (simulation restoration).
[0127] For a plan, river data in the time and space dimension is obtained by simulating river behavior and river state. The river data is the plan deduction data, which describes the river state and is also in a flooded state when flooding occurs. It should be understood that the river data is recorded in the simulation made by the plan deduction.
[0128] See also Figure 3 , Figure 3 It is a flow chart showing the recording and retrieval of river status by taking flood simulation as an example.
[0129] At the beginning of a scenario simulation, that is, the river data in the flood simulation is not available, the river data will be recorded every n seconds, and after the simulation is completed, all the river data will be recorded and saved to the hard disk at one time or in batches.
[0130] At this point, you can call and simulate and restore to obtain the corresponding visual simulation scene. The visual simulation scene is configured with progress points. By clicking anywhere on the progress bar to call the river data at the corresponding position and load it, you can render and display the river data to restore the river state, and call the simulation results at any point on the progress bar.
[0131] To further specify, for the recording and local storage performed, as the simulation proceeds, the river data will be continuously recorded and cached until the simulation is completed and the recording is suspended.
[0132] See also Figure 4 , Figure 4 is based on Figure 3 A flowchart of recording and caching river data to RAM during a simulation process is shown in the corresponding embodiment.
[0133] At the beginning of the simulation, river data is recorded every n seconds. The river data recording includes recording the basic data such as the size, offset value, position of the simulation range, as well as Heightwet, Ground and Velocit image information, and so on until the simulation is completed and recording is paused.
[0134] The basic data and image information obtained can be saved to the hard disk at one time or in batches. For example, one frame can be recorded and saved to the hard disk one frame at a time.
[0135] In this way, localized data can be obtained for the plan to support the operation of the visual simulation scene of the plan, that is, to support the realization of simulation restoration.
[0136] Aiming at the simulation restoration directly performed after the simulation, that is, the difference between closing the program and subsequently restarting the program to implement the simulation restoration, the river data in the cache will be directly called for single-frame loading, that is, the river data will be called frame by frame according to the position of the progress bar, and after real-time reorganization, the river status will be provided to the presented visual simulation scene through the rendering function, and the river simulation process can be viewed arbitrarily as the progress bar flows.
[0137] After the simulation is completed, the river data is saved to the hard disk (Disk), and the cache is released and no longer retains the simulated data. When the program is subsequently started to simulate and restore a plan, the data must first be read from the hard disk and loaded into the running memory.
[0138] On the one hand, see Figure 5 , Figure 5 is based on Figure 4 The corresponding embodiment shows a schematic diagram of the execution process of retrieving, reorganizing and rendering all the data in the hard disk. Figure 6 As shown, the basic data in the hard disk can be obtained, and the image information in the hard disk can be loaded, and then the basic data and the image information can be centrally reorganized and temporarily stored in the Ram.
[0139] According to the position of the progress bar flow, the river state of the corresponding frame is triggered. At this time, the corresponding cache data will be found in the running memory, that is, the reorganized data of the frame, and then rendered into the river state through the rendering function and displayed in the visual simulation scene. That is, the river simulation process can be viewed arbitrarily as the position of the progress bar changes.
[0140] This is the implementation process of loading the full amount of river data, but it is not limited to this. The image information can be loaded frame by frame to increase the running speed.
[0141] See also Figure 6 , Figure 6 is based on Figure 4 A schematic diagram of the execution process of retrieving image information from a hard disk and reorganizing and rendering cached basic data in real time according to the corresponding embodiment.
[0142] When simulating the subsequent startup program to run a simulated restoration of a plan, the full amount of basic data is loaded into the cache, so that the required basic data can be obtained in the running memory.
[0143] When it is necessary to view the simulation status of a certain frame, on the one hand, the corresponding basic data is found in the cache, and on the other hand, the corresponding image information is loaded from the Disk. At this point, the basic data and image information are reorganized in real time, and the reorganized data is cached in the Ram. Finally, it is rendered into a river through the rendering function. By turning the data into a picture, the river simulation view at any position of the progress bar can be realized.
[0144] For further information, see Figure 7 , Figure 7 is based on Figure 5 A flowchart of the entire simulation restoration process shown in the corresponding embodiment.
[0145] based on Figure 5 After loading all the data and reorganizing them centrally, the simulation can be restored by retrieving n frames per second, thereby achieving the operation of a visual simulation scene.
[0146] Correspondingly, the visual simulation scene is run at a frame rate of n frames per second, thereby compressing the time relative to the simulation process.
[0147] The data obtained by centralized reorganization is cached. After the cache simulation starts, the data corresponding to n frames per second will be retrieved through the configuration of the timer, and then 10 frames will be updated per second. The cached data will be rendered and displayed from 1 to 10 frames per second.
[0148] Similarly, when the timer is paused, the update of the river state is paused. If the simulation needs to continue, the timer will continue to update. When the simulation ends, the timer is cleared to achieve cache simulation.
[0149] This process is suitable for simulation restoration processes with a small number of frames. Centralized reconstruction takes a certain amount of time. The more frames there are, the longer the reconstruction time is. Therefore, if the number of frames is large, other methods need to be adopted, such as only fully loading the basic data, only fully loading the basic data and extracting to reduce the image information of each frame, or real-time simulation + cache retrieval.
[0150] See also Figure 8 , Figure 8 is based on Figure 6 A schematic diagram of a simulation restoration process based on extraction and reduction of image information of each frame is shown in the corresponding embodiment.
[0151] based on Figure 6 The following shows the execution process of fully loading basic data. Figure 8 As shown, after the full amount of basic data is loaded, the full amount of basic data is saved in Ram, and the simulation restoration starts according to the number of frames n set for each call.
[0152] In the simulation restoration that is being performed, a fixed frame is updated by configuring a timer. For example, when n is 10, 10 frames of evolution status are updated every second. Correspondingly, under the control of the timer, the basic data in the Ram is called from frames 1 to 10 every second, and then the image information of frames 1 to 10 is directly called from the hard disk.
[0153] At this time, as mentioned before, the image information in the flooding simulation includes at least three images, namely, Heightwet image, Ground image and Velocit image. Therefore, the image information of each frame will be extracted and reduced to avoid the time problem of concentrated reorganization of 10 frames of data, which is suitable for cache restoration when the number of frames is too large.
[0154] In addition, in the simulation restoration, the real-time simulation + cache retrieval method can be applied to cache restoration when the number of frames is too large. Due to the introduction of real-time simulation, simulation restoration can also be performed between the two recorded evolution state frames, avoiding the direct switching of two evolution state frames.
[0155] See also Fig. 9 , Fig. 9 is based on Figure 6 The illustrated embodiment shows a schematic diagram of a simulation restoration process combining cache retrieval with real-time simulation.
[0156] After starting the program, the full amount of basic data is loaded and cached to load the basic data into Ram. For the simulation being performed, it is a simulation restoration implemented at n frames per second.
[0157] When starting the simulation, that is, starting the simulation from the start position of the progress bar or any node position, on the one hand, the corresponding basic data is cached and retrieved, and on the other hand, the image information of the corresponding node position is loaded from the disk for reorganization and rendering.
[0158] At this point, before the progress bar flows to the next node position, a real-time simulation between the two node positions will be performed in real time according to the flow size and simulation, so as to call the cache when reaching the next node position.
[0159] This will make it possible for data recording, that is, the acquisition of basic data and image information, to no longer take up a lot of time, and under the action of real-time simulation, the corresponding evolutionary state changes between node positions can also be presented without any loss.
[0160] The number of frames in the long-duration scenario simulation is particularly large, and the simulated river state does not support 10 frames of river state recording per second. This number will cause frame leakage. Therefore, for data with a simulation duration of 100 minutes, it takes 1000 minutes to calculate and record in the real-time simulation.
[0161] And in Fig. 9 In the implementation process shown, only the node positions need to be recorded, and there is no recorded data between the node positions, so a short-term real-time simulation will be performed. For the operation of the 100-minute visual simulation scene, the simulation will record 1 frame every minute, thus achieving 100 frames in 100 minutes, 1 frame per minute, and real-time simulation within every minute, realizing the fusion of real-time simulation and cache.
[0162] And as mentioned above, the data related to the three frames saved in real time during the simulation of a plan can also be saved to the hard disk in batches, that is, the data related to the recorded frames can be saved to the hard disk in real time during the program running.
[0163] After starting the program, if you need to run a visual simulation scenario of a certain plan, that is, implement the simulation of this plan, you can directly load the specified plan.
[0164] In an exemplary embodiment, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0165] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, wherein the computer program implements the steps of the above-mentioned method when executed by a processor.
[0166] In an exemplary embodiment, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described above are implemented.
[0167] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation method of the present application.
[0168] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.
[0169] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0170] The program product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0171] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0172] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0173] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0174] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0175] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0176] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.
[0177] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A data localization deduction simulation control method, characterized in that: The method comprises: In response to the execution of the plan deduction simulation, the plan deduction data persistently stored after the plan deduction is loaded into the running memory, wherein the loaded plan deduction data includes basic data, wherein the basic data is used to describe the simulation range, offset value and position, the simulation range is the area where the three-dimensional model exists in the visual simulation scene, the offset value in the basic data indicates the height corresponding to the evolution state in the visual simulation scene, and the position in the basic data refers to the frame of the simulated evolution state; Following the progress bar position of the currently started simulation, the evolution state of the corresponding frame is retrieved, and basic data of the corresponding evolution state frame in the emergency plan deduction data is extracted; Acquiring image information of the evolution state frame, wherein the image information is an image expression of the evolution state of the deduced scene, and the acquisition of the image information includes loading and extracting the image information from cache call or persistent storage to a running memory; The image information and basic data are reorganized for the evolution state frame, and the simulated evolution state is displayed in the scene rendering by reorganizing the image information and basic data.
2. The method according to claim 1, characterized in that The step of loading the evolution data stored persistently after the plan deduction into the operation memory in response to the plan deduction simulation comprises: When the emergency plan deduction data is saved and cached locally and in the subsequent emergency plan deduction simulation, the basic data of persistent storage is loaded into the running memory, and the image information corresponding to the basic data is to be loaded and extracted.
3. The method according to claim 1, characterized in that The loaded plan deduction data includes image information corresponding to the basic data, and the step of obtaining the image information of the evolution state frame includes: The cache calls image information corresponding to the extracted basic data, wherein the image information is a frame cache recording the position of the progress bar.
4. The method according to claim 1, characterized in that: The image information is not loaded into the operating memory along with the loading of the plan deduction data; The number of evolution state frames corresponding to the extracted basic data and the extracted image information loaded into the memory is adapted to the specified frame rate.
5. The method according to claim 4, characterized in that The following step of following the progress bar position of the currently started simulation to retrieve the evolution state of the corresponding frame and extracting the basic data of the corresponding evolution state frame in the plan deduction data includes: Initiate the call of the progress bar position located at the progress bar flow that starts the simulation at present, and the call of the progress bar position is controlled by the configured timer; In response to the calling of the evolution state frame, basic data extraction of a specified number of evolution state frames is performed per unit time at a specified frame rate from the plan deduction data loaded into the memory.
6. The method according to claim 4, characterized in that The acquiring the image information of the evolution state frame includes: The image information of a specified number of frames in evolving states is extracted per unit time by configuring a timer at a specified frame rate, and the extracted image information corresponds to basic data extracted at the specified frame rate.
7. The method according to claim 4, characterized in that The method of reorganizing the image information and basic data for the evolution state frame, and before the step of rendering the scene to display the simulated evolution state, the image information and basic data obtained by reorganization, comprises: For image information corresponding to the same evolution state frame, the image information corresponding to the same evolution state frame is reduced by extracting the image information, and the extracted image information is used for reorganization with the corresponding basic data.
8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Three-dimensional dynamic simulation method and system for hazardous chemical substance diffusion process
CN113239605A
Flood disaster defense deduction method and system, terminal and storage medium
CN116186973A