Simulation scheduling method based on multiple resolutions
By loading simulation resources at different levels in the simulation system and using .json files and interface files to match the simulation resolution, the problem of excessive resource occupation in traditional simulation systems is solved, and efficient multi-resolution simulation resource allocation is achieved.
Patent Information
- Application Number
- CN202510771479.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When traditional simulation systems deal with simulation of resolution models at different levels, they occupy too much computing resources and communication resources, and cannot meet the joint simulation needs in tightly coupled multi-resolution large scenarios.
By loading simulation resources at different levels in the simulation system, using .json files to store the correspondence between entities and resolution, creating .h and .cpp interface files, reading and matching simulation resolution information, and quickly allocating corresponding simulation resources.
In the simulation of different levels of resolution models, it realizes that simulation resources are quickly loaded without occupying too much computing and communication resources, which improves the efficiency and resource utilization of the simulation process.
Smart Images

Figure CN120277932A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation technology, and particularly to a simulation scheduling method based on multi-resolution. Background Art
[0002] The field of simulation is a technology and method for a virtual reality world. It can simulate the behaviors and performances of complex systems, thereby helping people better understand, analyze, and predict problems in the real world. The field of simulation is widely applied in various fields, including industry, military, medical, transportation, etc., and has become an important decision-making support tool and technical means.
[0003] The essence of combat simulation is to establish a virtual environment. By modeling and simulating all aspects of the system, various situations and scenarios in the real world can be simulated. These models are based on physical laws, mathematical models, statistical data, etc. By running simulation experiments, we can observe the behaviors of the system, analyze the performances of the system, and conduct various tests and optimizations.
[0004] Resolution is an important concept in the field of modeling and simulation, used to characterize the richness and accuracy of model content. A fine resolution means rich content and high accuracy, while a coarse resolution is the opposite. Traditional simulation systems often assume that all model resolutions are the same during construction. They either focus on the fineness of simulation or the speed of simulation, and have limitations in the trade-off between the fineness and speed of simulation. Moreover, traditional simulation is the same in terms of model scheduling, state update, time advancement, etc.
[0005] Regarding the simulation problem involving models with different levels of resolution, it is often solved through data transfer between simulation systems. First, the high-resolution model is simulated, and the simulation results are used as the simulation input for the low-resolution model. This method has poor real-time performance and cannot meet the requirements of joint simulation in a tightly coupled multi-resolution large-scale scenario.
[0006] Currently, in the campaign-level / tactical-level joint simulation technology, in order to achieve the aggregation and disaggregation of multi-resolution models, heterogeneous interconnection technology is used to integrate respective simulation tasks onto a unified platform. The network engines on each platform implement networking communication, interconnection, and interoperability among simulation entities, and at the same time support interconnection and interaction with heterogeneous systems using protocols such as DIS, HLA, and DDS, ultimately forming a feasible, verifiable, and stable heterogeneous interconnection technology solution. Thereby, during the simulation process, the disaggregation conversion of unit-level models to entity-level models is completed in real time according to the disaggregation rules under different types and states; or, during the simulation process, the calculation of entity-level model results to unit-level model results is completed in real time according to the aggregation rules under different types and states, thus ensuring the seamless, correct, and efficient progress of the simulation process. However, there are various models with different resolutions in complex simulation systems. When converting according to the disaggregation and aggregation rules under different types and states during the simulation process, the networking communication, interconnection, and interoperability among simulation entities implemented by the network engines on each platform consume more computing resources and communication resources. Summary of the Invention
[0007] Based on this, it is necessary to provide a multi-resolution-based simulation scheduling method for the above technical problems, which can quickly allocate resolution resources for corresponding entities in the simulation, enabling different entities to correspond to different resolutions, and solving the technical problem of excessive consumption of computing resources and communication resources when converting according to the disaggregation and aggregation rules under different types and states in the simulation involving different-level resolution models.
[0008] A multi-resolution-based simulation scheduling method includes the steps of: S1, loading various simulation resources with different levels of simulation resolution; S2, in response to the current simulation engineering requirement instruction, obtaining information on all entities in the current simulation engineering; among them, different entities and their corresponding simulation resolutions are stored in a pre-created.json file. S3, reading the resolution resources of each of the entities, including: S301, creating an.h format interface file and a.cpp format interface code file for reading the resolution; S302, establishing an interface function for reading the.json file in the interface code file; S303, reading the.json file, and writing a local variable result in the.cpp file to store the simulation resolution information corresponding to the entity read from the.json file; S304, matching the local variable result with the resolutions of the various simulation resources loaded in step S1 to obtain the simulation resources with the matching resolution. S4, load the simulation resources of the matched resolution for each of the said entities.
[0009] Preferably, before the step S2, there is also a step S20, which is a step of setting corresponding simulation resolutions for different entities in the simulation project, including: S201, create a.json file in the simulation project; S202, write the correspondence between the entity name and the preset resolution in the form of key-value pairs in the.json file.
[0010] Preferably, the step S301 includes creating Multiresolution.h and Multiresolution.cpp files for reading resolutions under the directory of the simulation project, declaring the int() function and the Multiresolution Select() function in Multiresolution.h, and defining the int() function and the Multiresolution Select() function in the Multiresolution.cpp file. Among them, the function of the Multiresolution Select() function is to read the set multi-resolution resources, the return value is of int type, and the key parameter is the entity for which the resolution is to be read and set currently.
[0011] Preferably, the step S302 includes finding the path to read the.json file and managing the text and binding the text file through the j_file_test() function.
[0012] Preferably, the step S303 includes: Read the.json file bound in step S302 into the memory through the json tool and store it as jsonStruct; Search for the key parameter in json Struct, read each data in each line, and obtain the target line; And write a local variable result in the.cpp file, and store the simulation resolution information corresponding to the entity read from the target line in the local variable result.
[0013] Preferably, the multiple simulation resources of different levels of simulation resolutions include: low-resolution simulation resources, medium-resolution simulation resources, and high-resolution simulation resources.
[0014] Preferably, in step S304, matching the local variable result with the resolutions of multiple simulation resources loaded in step S1 to obtain the simulation resources with the matching resolution includes: When the result obtained by matching the local variable result is Lo, enter the low-resolution simulation resources; When the result obtained by matching the local variable result is Md, enter the medium-resolution simulation resources; When the result obtained by matching the local variable result is Hi, enter the high-resolution simulation resources.
[0015] Preferably, step S4 specifically includes: loading the simulation resources with the matching resolution for each entity through the LoadResources(string res) function.
[0016] In the above method, through the multi-resolution simulation scheduling mechanism, among multiple simulation resources with different levels of simulation resolution loaded, different entities and their corresponding simulation resolutions pre-set are stored in a pre-created.json file. When it is necessary to respond to the current simulation project requirement instruction, information of all entities in the current simulation project is obtained; by creating an.h format interface file and a.cpp format interface code file for reading the resolution, an interface function for reading the.json file is established in the interface code file, the.json file is read, and a local variable result is written in the.cpp file to store the simulation resolution information corresponding to the entity read from the.json file, and the local variable result is matched with the resolution. Finally, the simulation resources with the matching resolution are loaded for each entity. Matching different simulation entities with corresponding resolution levels can quickly realize the resolution resource allocation of corresponding entities in the simulation, enabling different entities corresponding to different resolutions to be quickly loaded without occupying too much computing resources and communication resources. Description of the Drawings
[0017] Figure 1 It is a flowchart of the simulation scheduling method based on multi-resolution in an embodiment; Figure 2 For Figure 1 The sub-flowchart of step S3 in Detailed Embodiment
[0018] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] In one embodiment, in a simulation scenario, there are three different resolution simulation resources, namely low-resolution simulation resources, medium-resolution simulation resources, and high-resolution simulation resources. As Figure 1 shown, a simulation scheduling method based on multi-resolution is provided, including the following steps S1-S4.
[0020] S1, load various simulation resources with different levels of simulation resolution.
[0021] Specifically, the low-resolution simulation resources (Lo) include a rule module and a model module. This resource has few modules and is characterized by fast simulation speed and low level of detail; the medium-resolution simulation resources (Md) include a rule module, a model module, and an environment module. This resource has more modules and is characterized by relatively fast simulation speed and relatively low level of detail; the high-resolution simulation resources (Hi) include a rule module, a model module, an environment module, and a UE (Unreal Engine) photo-taking module. This resource has the most modules and is characterized by low simulation speed and high level of detail.
[0022] It should be emphasized here that the simulation resource environment is not limited to the three levels of low-resolution simulation resources, medium-resolution simulation resources, and high-resolution simulation resources mentioned above. The simulation resource environment can be divided into more levels according to different actual application scenarios, so that different entities correspond to different resolutions, balance the weight between the level of detail and speed of the simulation, and optimize the simulation performance.
[0023] S2, in response to the current simulation engineering requirement instruction, obtain information of all entities in the current simulation project; among them, different entities and their corresponding simulation resolutions are stored in a pre-created.json file.
[0024] Preferably, before step S2, there is also step S20, the step of setting corresponding simulation resolutions for different entities in the simulation project, including: S201, create a.json file in the simulation project; S202, write in the.json file the correspondence between the entity name and the preset resolution in the form of key-value pairs (for example: {Entity A: Hi}, {Entity B: Lo}, etc.).
[0025] S3, read the resolution resources of each entity, including: S301, create an.h format interface file and a.cpp format interface code file for reading the resolution; S302, establish an interface function for reading the.json file in the interface code file; S303. Read the.json file and write a local variable result in the.cpp file to store the simulation resolution information corresponding to the entity read from the.json file. S304. Match the local variable result with the resolutions of various simulation resources loaded in step S1 to obtain the simulation resources with the matching resolution.
[0026] In step S301, the format of the interface file is generally a.h file, and the format of the interface code file is generally a.cpp file. Preferably, step S301 includes creating Multiresolution.h and Multiresolution.cpp files for reading the resolution under the directory of the simulation project. Declare the int() function (C++ data type) and Multiresolution Select() function (string cmd (parameter)) in Multiresolution.h, and define the int() function and Multiresolution Select() function in the Multiresolution.cpp file. Among them, the function of the Multiresolution Select() function is to read the set multi-resolution resources, the return value is of int type, and the key parameter is the entity for which the resolution to be read and set currently.
[0027] Preferably, step S302 includes finding the path to read the.json file and managing the text and binding the text file through the j_file_test() function. Specifically, first receive and save the parameter in the Multiresolution Select() function as a string (C++ parameter type) key, then set the path to read the resource text file (json file), manage the text through the file stream if stream, and bind the text file through the path.
[0028] Preferably, step S303 includes: Read the.json file bound in step S302 into memory through the json tool and store it as json Struct; Search for the key parameter in json Struct, read each data in each line to obtain the target line; And write a local variable result in the.cpp file, and store the simulation resolution information corresponding to the entity after the ":" read from the target line in the local variable result.
[0029] Preferably, in step S304, matching the local variable result with the resolutions of multiple simulation resources loaded in step S1 to obtain the simulation resources with the matching resolution includes: When the result obtained by matching the local variable result is Lo, enter the low-resolution simulation resources; When the result obtained by matching the local variable result is Md, enter the medium-resolution simulation resources; When the result obtained by matching the local variable result is Hi, enter the high-resolution simulation resources.
[0030] S4. Load the simulation resources with the matching resolution for each of the entities.
[0031] Preferably, step S4 specifically includes: using the Load Resources(string res) function to load the simulation resources with the matching resolution for each of the entities. According to the result obtained by matching the local variable result with the three resolutions in step S304, if result is Lo and the simulation resource is matched to low resolution, load the resource through the LoadResources(string res) function to make the simulation resource enter the low-resolution scenario; if result is Md and the simulation resource is matched to medium resolution, load the resource through the LoadResources(string res) function to make the simulation resource enter the medium-resolution scenario; if result is Hi and the simulation resource is matched to high resolution, load the resource through the LoadResources(string res) function to make the simulation resource enter the high-resolution scenario.
[0032] In the above method, through the multi-resolution simulation scheduling mechanism, among various simulation resources loaded with different levels of simulation resolution, the pre-created.json file stores different pre-set entities and their corresponding simulation resolutions. When it is necessary to respond to the current simulation project requirement instruction, the information of all entities in the current simulation project is obtained; by creating an.h format interface file and a.cpp format interface code file for reading the resolution, an interface function for reading the.json file is established in the interface code file, the.json file is read, and a local variable result is written in the.cpp file to store the simulation resolution information corresponding to the entity read in the.json file, and the local variable result is matched with the resolution. Finally, the simulation resources with the matched resolution are loaded for each entity. By matching different simulation entities with corresponding resolution levels, the resolution resource allocation for corresponding entities in the simulation is quickly realized, enabling different entities corresponding to different resolutions to be quickly loaded without occupying too much computing resources and communication resources.
[0033] In academic research, this scheduling mechanism can also be applied to simulation fields such as medical treatment and transportation to increase academic value.
[0034] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A simulation scheduling method based on multi - resolution, characterized in that Including the steps: S1. Load a variety of simulation resources with different levels of simulation resolution; S2. Respond to the current simulation project requirement instruction, and obtain information of all entities in the current simulation project; wherein, different pre-set entities and their corresponding simulation resolutions are stored in a pre-created.json file; S3. Read the resolution resources of each of the said entities, including: S301. Create an.h format interface file and a.cpp format interface code file for reading the resolution; S302. Establish an interface function for reading the.json file in the interface code file; S303. Read the.json file, and write a local variable result in the.cpp file to store the simulation resolution information corresponding to the entity read in the.json file; S304. Match the local variable result with the resolutions of the variety of simulation resources loaded in step S1 to obtain the simulation resources with the matched resolution; S4. Load the simulation resources with the matched resolution for each of the said entities.
2. The multi-resolution based simulation scheduling method according to claim 1, wherein Before step S2, there is also step S20, which is the step of setting corresponding simulation resolutions for different entities in the simulation project, including: S201. Create a.json file in the simulation project; S202. Write in the.json file the corresponding relationship between the entity name and the pre-set resolution in the form of key-value pairs.
3. The multi-resolution based simulation scheduling method according to claim 1, characterized in that Step S301 includes creating Multiresolution.h and Multiresolution.cpp files for reading the resolution under the directory of the simulation project. Declare int() function and MultiresolutionSelect() function in Multiresolution.h, and define the int() function and MultiresolutionSelect() function in the Multiresolution.cpp file. Among them, the function of the MultiresolutionSelect() function is to read the set multi-resolution resources, the return value is of int type, and the key parameter is the entity for which the resolution to be read and set currently.
4. The simulation scheduling method based on multi-resolution according to claim 3, wherein Step S302 includes finding the path for reading the.json file, and managing the text and binding the text file through the j_file_test() function.
5. The simulation scheduling method based on multi-resolution according to claim 4, characterized in that, Step S303 includes: Read the.json file bound in step S302 into the memory through the json tool and store it as jsonStruct; Search for the key parameter in jsonStruct, read each data in each line to obtain the target line; And write a local variable result in the.cpp file, and store the simulation resolution information corresponding to the entity read in the target line in the local variable result.
6. The multi-resolution based simulation scheduling method according to claim 1, wherein The various simulation resources with different levels of simulation resolution include: low-resolution simulation resources, medium-resolution simulation resources, and high-resolution simulation resources.
7. The simulation scheduling method based on multi-resolution according to claim 6, wherein, In step S304, the local variable result is matched with the resolution of the various simulation resources loaded in step S1 to obtain the simulation resources with the matched resolution, including: When the result obtained by matching the local variable result is Lo, then enter the low-resolution simulation resources; When the result obtained by matching the local variable result is Md, then enter the medium-resolution simulation resources; When the result obtained by matching the local variable result is Hi, then enter the high-resolution simulation resources.
8. The multi-resolution based simulation scheduling method according to any one of claims 1-7, characterized in that Step S4 specifically includes: loading the simulation resources with the matched resolution for each of the entities through the LoadResources(string res) function.
Citation Information
Patent Citations
Simulation system implementation method based on multiresolution model framework
CN108133099A
Multi-resolution modeling and simulation method and system
CN112270083A
Aggregation and deaggregation system and method based on multi-resolution general military strength model
CN116258026A
Apparatus for feeding fruit
KR102367804B1