Dynamic loading and unloading method for digital elevation data of simulation deduction platform
By dynamically calculating the resolution levels of the simulation area and grid in the simulation deduction platform, and dynamically loading or releasing digital elevation data, the problems of large amount of digital elevation data and large amount of calculation are solved, and the real-time nature of simulation deduction is improved.
Patent Information
- Application Number
- CN202411022084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-08
AI Technical Summary
In the simulation deduction platform, the large amount of digital elevation data and the large amount of calculations make the simulation calculation too long, affecting real-time performance.
By calculating the current simulation area and the simulated body heat of each grid in each simulation frame period, the resolution level of each grid is dynamically determined, and digital elevation data is loaded or released dynamically according to the resolution level to reduce the invalid data Compute and store.
While ensuring the accuracy of simulation calculation, the amount of digital elevation data and calculation amount is reduced, the time-consuming simulation calculation is reduced, and the real-time performance of simulation deduction is improved.
Smart Images

Figure CN118917089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation and deduction, and in particular to a method for dynamically loading and unloading digital elevation data of a simulation and deduction platform. Background Art
[0002] In simulation platforms such as war games and offensive and defensive confrontations, digital elevation data can be used for aircraft confrontation decisions, aircraft navigation and guidance, terrain generation and display, and aircraft formation collaborative simulation. It is widely used in simulation platforms. Typical applications are as follows:
[0003] Application scenario 1: For an aircraft flying low to the ground, it is necessary to determine in real time whether the aircraft has hit a mountain wall, so as to determine in real time whether the aircraft is damaged.
[0004] Application scenario two: Digital elevation data can be loaded into the scene display or situation display terminal of the simulation platform, and the corresponding two-dimensional or three-dimensional situation scenes can be generated through elevation interpolation methods such as the inverse distance weighted method, the natural neighbor method, the spline function method, etc. combined with terrain rendering technology to improve the visualization of the simulation platform.
[0005] Digital elevation data is an important basic data for simulation and deduction platforms, and is generally provided through DEM (Digital Elevation Model) data files such as GeoTiff. DEM generally has regular grid type (Grid), irregular triangulated network type (TIN) and other representation methods. Regular grid type refers to a regularly spaced square grid point or longitude and latitude grid point array. At each grid point, only the elevation value of the point needs to be stored, and then the plane coordinates of any grid point can be calculated by the coordinates of the starting point and the grid spacing and the row and column numbers of the corresponding matrix elements. Irregular triangulated network type refers to connecting the points collected according to terrain features into triangles that cover the entire area and do not overlap according to certain rules, forming an irregular triangulated network, usually called triangulated network DEM or TIN. A DEM data file describes the elevation data within a certain area, such as 1 degree longitude and 1 degree latitude. When the simulated geographical area is larger than 1 degree, several DEM data files need to be spliced together according to their longitude and latitude to form a large area.
[0006] The working process of the simulation platform generally includes the preparation stage, the initialization stage, the operation stage, and the termination stage. In the simulation preparation stage, the digital elevation data in the area is generally pre-loaded according to the geographical area of the simulation. The higher the resolution of the digital elevation data, the more accurate the simulation calculation results in the above-mentioned applications, which is conducive to improving the accuracy of the simulation calculation. However, at the same time, the higher the data resolution, the more digital elevation data needs to be loaded, the more computer memory is occupied, the greater the amount of simulation calculation in the above-mentioned application, and the longer the simulation calculation consumes, which may cause the simulation to time out, thereby affecting the real-time nature of the simulation, causing the simulation to "stutter", and reducing the effect of the simulation.
[0007] In large-scale simulations of large geographic areas, due to limited computing resources such as computer memory and computing power, as the simulated geographic area becomes larger, the more entities participate in the simulation, and the larger the scale, the more digital elevation data and calculations are required. How to reduce the amount of digital elevation data and calculations, reduce the time consumption of simulation calculations, and improve the real-time performance of simulations while ensuring the accuracy of simulation calculations has become an urgent problem to be solved. Summary of the invention
[0008] In view of the above analysis, an embodiment of the present invention aims to provide a method for dynamically loading and unloading digital elevation data of a simulation platform, so as to solve the problems of large amount of digital elevation data and calculation, and time-consuming simulation calculation in existing simulation platforms.
[0009] On the one hand, an embodiment of the present invention provides a method for dynamically loading and unloading digital elevation data of a simulation platform, comprising the following steps:
[0010] In each frame period of the simulation deduction operation, the current simulation area is determined according to the current simulation entity position, and the digital elevation data of the area without simulation entity is released;
[0011] Calculating the simulated entity heat of each grid in the current simulation area, and determining the dynamic resolution level of each grid in the current simulation area based on the simulated entity heat of each grid in the current simulation area and the resolution level cutoff value corresponding to each grid;
[0012] The digital elevation data of each grid is loaded based on the dynamic resolution level of each grid in the current simulation area and the resolution level corresponding to the digital elevation basic data.
[0013] Based on the further improvement of the above method, the resolution level cutoff value corresponding to each grid is determined in the following manner, including:
[0014] Calculate the standard deviation of the digital elevation basic data corresponding to each grid, and determine the maximum resolution level of each grid according to the standard deviation;
[0015] The resolution level cutoffs are calculated based on the maximum resolution level of each grid and the total number of simulated entities.
[0016] Based on the further improvement of the above method, if the current grid is a newly loaded grid, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data, including:
[0017] If the dynamic resolution level of the current grid is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read to obtain the digital elevation data corresponding to the current grid;
[0018] If the dynamic resolution level of the current grid is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid;
[0019] If the dynamic resolution level of the current grid is greater than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read, and the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid.
[0020] Based on the further improvement of the above method, if the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is greater than the dynamic resolution level in the previous frame period, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data:
[0021] If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data;
[0022] If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read;
[0023] If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data: if the dynamic resolution level of the current grid in the previous frame period is also greater than the resolution level corresponding to the digital elevation basic data, then the digital elevation data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the previous frame period and the dynamic resolution level of the current grid in the current frame period; otherwise, the digital elevation basic data corresponding to the current grid is read, and the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data;
[0024] When reading the basic digital elevation data corresponding to the current grid, only the basic digital elevation data that was not read in the previous frame period is read.
[0025] Based on the further improvement of the above method, if the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is less than the dynamic resolution level in the previous frame period, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data:
[0026] If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data, then part of the interpolation data in the digital elevation data corresponding to the current grid is released according to the difference between the dynamic resolution level of the current grid in the current frame period and the dynamic resolution level of the current grid in the previous frame period;
[0027] If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released;
[0028] If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released, and the digital elevation basic data corresponding to the current grid are released according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data.
[0029] Based on the further improvement of the above method, the current simulation area is determined according to the current simulation entity position, including:
[0030] Select the longitude and latitude of the northernmost, southernmost, westernmost and easternmost simulation entities among all current simulation entities; round the latitude value of the northernmost point to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the rounded four longitude and latitude values is the current simulation area.
[0031] Based on the further improvement of the above method, the current simulation area is determined according to the current simulation entity position, including:
[0032] Calculate the minimum coverage circle of all current simulation entity positions; and take the minimum coverage circle as the current simulation area.
[0033] Based on the further improvement of the above method, the current simulation area is determined according to the current simulation entity position, including:
[0034] Calculate the minimum coverage circle of all current simulated entity positions; round the latitude value of the northernmost point of the minimum coverage circle to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the four rounded longitude and latitude values is the current simulation area.
[0035] Based on the further improvement of the above method, the simulation entity heat of each grid in the current simulation area is calculated, including:
[0036] The number and type of simulation entities in each grid of the current simulation area are determined, and the heat of the simulation entities in each grid of the current simulation area is calculated based on the number and type of simulation entities in each grid.
[0037] Based on the further improvement of the above method, the following formula is used to calculate the simulated entity heat of each grid in the current simulation area:
[0038]
[0039] Among them, ω i represents the weight of the confrontation capability of the i-th type of simulation entity, n i represents the number of the i-th type of simulation entities in the grid, and k represents the number of simulation entity types in the grid.
[0040] Compared with the prior art, the present invention calculates the simulation entity heat of the current simulation area and each grid in the area that needs to be loaded in each simulation frame period, judges the dynamic resolution level of each grid accordingly, dynamically loads the digital elevation data in the grid according to the dynamic resolution level, and releases the digital elevation data of the area without simulation entity. While ensuring the accuracy of the simulation calculation, the amount of digital elevation data and the amount of calculation are effectively reduced, thereby reducing the simulation calculation time and improving the real-time performance of the simulation deduction under the condition of limited computing resources.
[0041] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0043] Figure 1 A flowchart of a method for dynamically loading and unloading digital elevation data of a simulation and deduction platform according to an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a simulated geographical area and a current simulation area according to an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of resolution levels in an embodiment of the present invention;
[0046] Figure 4 The figure is a schematic diagram of a geographical area simulated by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0048] In different landforms such as plains, mountains, basins, deserts, Gobi, and hills, the terrain changes differently, resulting in huge differences in elevation data changes. For example, in plains, the terrain is flat and the elevation data does not fluctuate much. At this time, the resolution of the elevation data is not high, and lower-resolution elevation data can be used. In mountains, hills and other areas, the terrain fluctuates greatly, resulting in large fluctuations in elevation data, and higher-resolution elevation data is required.
[0049] The simulation entity described in the present invention is a simulation entity concept in a broad sense, which includes not only the personnel participating in the performance, but also the participating vehicles, aircraft and various types of confrontation equipment, including both introduced real entities and virtual entities. The heat of a simulation entity refers to the number of simulation entities in a certain area. The more simulation entities participating in a certain area, the higher the heat. When the number of simulation entities in a certain area is large, the heat is high, the confrontation between them is strong, and the accuracy of confrontation judgment is required to be high. It is necessary to accurately judge and calculate the confrontation between the two parties, and higher-resolution elevation data should be used. On the contrary, when the number of simulation entities in a certain area is small, the confrontation between them is weak, the heat of the simulation entity is low, and the accuracy of the judgment can be appropriately reduced, thereby relaxing the requirements for the resolution of the elevation data, and lower-resolution elevation data can be used.
[0050] Embodiment 1
[0051] Based on this, a specific embodiment of the present invention discloses a method for dynamically loading and unloading digital elevation data of a simulation deduction platform, such as Figure 1 As shown, the following steps are included:
[0052] S1, in each frame period of the simulation deduction operation, determine the current simulation area according to the current simulation entity position, and release the digital elevation data of the area without simulation entity;
[0053] S2, calculating the simulated entity heat of each grid in the current simulation area, and determining the dynamic resolution level of each grid in the current simulation area based on the simulated entity heat of each grid in the current simulation area and the resolution level boundary value corresponding to each grid;
[0054] S3. Load the digital elevation data of each grid based on the dynamic resolution level of each grid in the current simulation area and the resolution level corresponding to the digital elevation basic data.
[0055] Compared with the prior art, the method for dynamically loading and unloading digital elevation data of a simulation platform provided in this embodiment calculates the simulation entity heat of the current simulation area to be loaded and each grid in the area in each simulation frame period, and judges the dynamic resolution level of each grid based on this, dynamically loads the digital elevation data in the grid according to the dynamic resolution level, and releases the digital elevation data of the area without simulation entity. While ensuring the accuracy of the simulation calculation, the amount of digital elevation data and the amount of calculation are effectively reduced, thereby reducing the simulation calculation time and improving the real-time performance of the simulation under the condition of limited computing resources.
[0056] During the implementation, in the simulation preparation stage, the simulation geographical area is set according to the simulation task assumptions, and a number of DEM data files of any resolution are obtained as digital elevation basic data. The area covered by all digital elevation basic data should be able to include the simulation geographical area, and the two can overlap. In other words, the simulation geographical area should be within the area covered by all digital elevation basic data, or the two can overlap. Figure 2 As shown, the simulated geographical area is a rectangular area, and the four vertices of the rectangle are P1, P2, P3, and P4. The area covered by the digital elevation basic data should be greater than or equal to the above-mentioned simulated geographical area. The four vertices of the area covered by the digital elevation basic data can be G1, G2, G3, and G4. The area enclosed by the four points G1, G2, G3, and G4 is larger than the area enclosed by the four points P1, P2, P3, and P4, and the longitude values of the four points P1, P2, G1, and G2 are the same, the latitude value of G1 is greater than the latitude value of P1, and the latitude value of G2 is smaller than the latitude value of P2.
[0057] During implementation, the highest resolution level of digital elevation data, for example level 5, is determined based on the computing resource conditions such as computer memory and computing power of the hardware on which the simulation platform is located.
[0058] According to the actual accuracy of the acquired DEM data file, determine the resolution level corresponding to the digital elevation basic data. The larger the actual accuracy value, the lower the resolution level. For example, assuming that the actual accuracy of the DEM data file is 90m, the resolution of the digital elevation basic data is relatively low and can be set to level 1 or level 2. Assuming that the actual accuracy of the DEM data file is 12.5m, the resolution of the digital elevation basic data is relatively high and can be set to level 4 or level 5.
[0059] During implementation, the size of the grid is determined according to the size of the simulated geographic area, and the simulated geographic area is divided into grids. For example, each grid spans 1 degree in east-west longitude and 1 degree in north-south latitude.
[0060] Then, the resolution level cutoff value corresponding to each grid is determined according to the topographic features of each grid, including:
[0061] S01, calculating the standard deviation of the digital elevation basic data corresponding to each grid, and determining the maximum resolution level of each grid according to the standard deviation;
[0062] S02. Calculate a resolution level cutoff value based on the maximum resolution level of each grid and the total number of simulation entities.
[0063] It should be noted that the number of resolution levels corresponding to each grid determined according to the topographic and geomorphic characteristics of each grid may be different, and accordingly, the number of resolution level cutoff values corresponding to each grid is also different. For example, the number of resolution levels corresponding to grid A is determined to be 5 according to the topographic and geomorphic characteristics, and there are four resolution level cutoff values, namely, the resolution level cutoff value between level 1 and level 2, the resolution level cutoff value between level 2 and level 3, the resolution level cutoff value between level 3 and level 4, and the resolution level cutoff value between level 4 and level 5. The number of resolution levels corresponding to grid B is determined to be 3 according to the topographic and geomorphic characteristics, and there are two resolution level cutoff values, namely, the resolution level cutoff value between level 1 and level 2, and the resolution level cutoff value between level 2 and level 3.
[0064] During implementation, for each grid, the standard deviation of the digital elevation basic data within the grid is calculated. The larger the standard deviation, the greater the elevation change within the grid, and the more resolution levels need to be set. According to the pre-set standard deviation range corresponding to different resolution levels, the number of resolution levels for each grid is quantitatively determined, that is, the maximum resolution level.
[0065] During implementation, the maximum resolution level corresponding to each grid can also be qualitatively determined according to the type of topographic features of the grid. For example, in a flat plain area, a lower resolution level can be set; in areas such as deserts and Gobi deserts with undulating terrain, a higher resolution level can be set; in areas such as mountains and basins with drastic terrain changes, the highest resolution level can be set; other unset areas in the entire domain can set a default resolution level. Load the global digital elevation basic data in the simulation deduction geographic area, preview the topographic features of each location in the simulation deduction geographic area, assuming that the simulation deduction geographic area includes mountains and plains, set the maximum resolution level of the mountain area to 5, and the maximum resolution level of other plain areas is set to 3 by default. When the same grid includes different types of topographic features, take the largest number of resolution levels. For example, if grid A has both mountains and plains, its maximum resolution level is 5.
[0066] Then, the resolution level cutoff value is calculated based on the maximum resolution level of each grid and the total number of simulated entities.
[0067] During implementation, the resolution level dividing value can be determined by multiplying the total number of simulated entities by a certain percentage. As the resolution level increases, the percentage gradually increases, which is called the simulation entity quantity method.
[0068] For example, for a grid with a maximum resolution level of 5, the critical heat value of simulated entities between resolution levels 1 and 2 can be set to 3% of the total number of simulated entities; the critical heat value of simulated entities between resolution levels 2 and 3 can be set to 5% of the total number of simulated entities; the critical heat value of simulated entities between resolution levels 3 and 4 can be set to 7% of the total number of simulated entities; and the critical heat value of simulated entities between resolution levels 4 and 5 can be set to 10% of the total number of simulated entities.
[0069] During implementation, the resolution level dividing values of different grids can be determined according to the above-mentioned unified standards, or different percentage values can be set according to the maximum resolution level of the grid. The percentage corresponding to the dividing value between the maximum resolution level and the second largest resolution level generally does not exceed 10%.
[0070] For example, for a grid with a maximum resolution level of 5, the resolution level dividing value is determined according to the above percentage value; for a grid with a maximum resolution level of 3, the critical value of the simulated entity heat between resolution levels 1 and 2 can be set to 3% of the total number of simulated entities; the critical value of the simulated entity heat between resolution levels 2 and 3 can be set to 6% of the total number of simulated entities.
[0071] During implementation, due to the different confrontation capabilities of different simulated entities, the simulated entities with greater confrontation capabilities have stronger confrontation strength, and the accuracy of confrontation decisions is required to be higher. Therefore, different types of simulated entities can be weighted according to their different confrontation capabilities, so as to more accurately determine the dynamic resolution level of the grid. Therefore, different types of simulated entities are given different weights, and the total number of weighted simulated entities is calculated. The total number of weighted simulated entities multiplied by the percentage is used as the resolution level demarcation value. This is called the simulated entity weighting method.
[0072] When implemented, according to the formula Calculate the total number of weighted simulation entities, ω i represents the confrontation capability weight of the i-th type of simulation entity, N i Represents the total number of simulation entities of the i-th type.
[0073] After calculating the resolution level cutoff value of each grid, the dynamic resolution level of the grid is subsequently determined based on the simulated entity heat of the grid and the resolution level cutoff value, and then the corresponding digital elevation data is dynamically loaded.
[0074] During implementation, some special simulated entities often have a decisive effect in confrontation. Therefore, on the basis of the above-mentioned calculated resolution level demarcation value, several additional conditions can be set for the critical values of simulated entity heat between different resolution levels. When the simulated entity heat value in a certain grid at a certain moment does not exceed the demarcation value, but meets any additional conditions, it is deemed that the simulated entity heat value is greater than or equal to the demarcation value, and the dynamic resolution level of the grid also needs to be adjusted.
[0075] For example, after determining the dividing values between different resolution levels, additional conditions are set between resolution level 1 and level 2:
[0076] Condition 1: The number of special simulation entities is greater than or equal to 3;
[0077] The additional conditions for simulations between resolution levels 2 and 3 are:
[0078] Condition 2: The number of special simulation entities is greater than or equal to 5;
[0079] When the heat value of a simulated entity in a grid is less than the dividing value between resolution levels 1 and 2, but the number of special simulated entities is 4, condition 1 is met but condition 2 is not met, it is deemed that the heat value of the simulated entity is greater than or equal to the dividing value between resolution levels 1 and 2, and less than the dividing value between resolution levels 2 and 3. At this time, the dynamic resolution level of the grid is also adjusted to level 2.
[0080] In the simulation initialization phase, the initial simulation entity deployment is completed according to the simulation task scenario. In each simulation frame cycle, the area covered by the digital elevation data to be loaded is calculated based on the current locations of all simulation entities, that is, the current simulation area. The area covered by the loaded digital elevation data should be able to cover the locations of all initial simulation entities.
[0081] Specifically, the current simulation area is determined according to the current simulation entity position, including:
[0082] Select the latitude and longitude of the northernmost, southernmost, westernmost and easternmost simulation entities among all the current simulation entities; round the latitude value of the northernmost point to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the rounded four longitude and latitude values is the current simulation area. This method is called the rectangular calculation method.
[0083] When implementing, Figure 2As shown, the northernmost, southernmost, westernmost and easternmost simulation entities are points A, B, C and D in the figure respectively. The latitude value of point A is rounded to the north, the latitude value of point B is rounded to the south, the longitude value of point C is rounded to the west, and the longitude value of point D is rounded to the east. The rectangular areas T1, T2, T3 and T4 formed by the above four longitude and latitude values are the current simulation areas.
[0084] During implementation, the circular calculation method may also be used to determine the current simulation area. Specifically, the current simulation area is determined according to the current simulation entity position, including:
[0085] Calculate the minimum covering circle of all current simulation entity positions;
[0086] The minimum coverage circle is taken as the current simulation area.
[0087] During implementation, existing algorithms may be used, such as the least square method, to calculate the minimum covering circle that can cover all current simulated entity positions, and the area of the minimum covering circle may be directly used as the current simulation area.
[0088] The rectangular calculation method and the circular calculation method can also be combined. Specifically, the current simulation area is determined according to the current simulation entity position, including:
[0089] Calculate the minimum coverage circle of all current simulated entity positions; round the latitude value of the northernmost point of the minimum coverage circle to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the four rounded longitude and latitude values is the current simulation area.
[0090] During implementation, after calculating the minimum coverage circle, the latitude value of the northernmost point of the minimum coverage circle is rounded to the north, the latitude value of the southernmost point is rounded to the south, the longitude value of the westernmost point is rounded to the west, and the longitude value of the easternmost point is rounded to the east. The rectangular area formed by the rounded four longitude and latitude values is used as the current simulation area. This method combines the rectangular calculation method with the circular calculation method.
[0091] If the current is not the first simulation cycle, the loaded digital elevation data of the area without simulation entities will be released according to the positions of all current simulation entities.
[0092] After determining the current simulation area, calculate the simulation entity heat of each grid in the current simulation area, including:
[0093] The number and type of simulation entities in each grid of the current simulation area are determined, and the heat of the simulation entities in each grid of the current simulation area is calculated based on the number and type of simulation entities in each grid.
[0094] Specifically, in step S2, the following formula is used to calculate the simulated entity heat of each grid in the current simulation area:
[0095]
[0096] Among them, ω i represents the weight of the confrontation capability of the i-th type of simulation entity, n i represents the number of the i-th type of simulation entities in the grid, and k represents the number of simulation entity types in the grid.
[0097] During implementation, the simulated entity heat of the grid is calculated by weighting the number of different types of simulated entities, or the simulated entity heat of the grid is obtained by directly calculating the number of simulated entities in the grid without weighting.
[0098] When calculating the simulated entity heat of the grid, only the currently valid simulated entities are calculated, and invalid simulated entities are not taken into account.
[0099] Then, the dynamic resolution level of each grid in the current simulation area is determined based on the simulated entity heat of each grid in the current simulation area and the resolution level boundary value corresponding to each grid. For example, when the simulated entity heat value of a certain grid is greater than or equal to the boundary value between level 1 and level 2 of the resolution level of the grid, and less than the boundary value between level 2 and level 3, the dynamic resolution level of the grid is level 2; when the simulated entity heat value in the grid is greater than or equal to the boundary value between level 2 and level 3, and less than the boundary value between level 3 and level 4, the dynamic resolution of the grid is level 3, and so on. If additional conditions are set between the resolution levels, the dynamic resolution level of the grid needs to be determined based on the additional conditions.
[0100] After calculating the dynamic resolution level of each grid in the current simulation area, the digital elevation data of each grid is loaded based on the dynamic resolution level of each grid in the current simulation area and the resolution level corresponding to the digital elevation basic data.
[0101] Specifically, if the current grid is a newly loaded grid, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data:
[0102] If the dynamic resolution level of the current grid is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read to obtain the digital elevation data corresponding to the current grid;
[0103] If the dynamic resolution level of the current grid is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid;
[0104] If the dynamic resolution level of the current grid is greater than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is first read, and then the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid.
[0105] For the first frame cycle, all grids in the current simulation area are newly loaded grids. For each subsequent frame cycle, whether the grid is newly loaded is determined based on the difference between the current simulation area and the simulation area of the previous cycle. If the simulation area of the previous frame cycle does not contain a certain grid, then the grid is a newly loaded grid in the current frame cycle, otherwise it is not a newly loaded grid.
[0106] Assume that the resolution level corresponding to the digital elevation basic data is level 3. If the dynamic resolution level of a newly loaded grid is also level 3, then the digital elevation basic data corresponding to the grid can be directly loaded. If the dynamic resolution level of a newly loaded grid is level 1, and the resolution level corresponding to the digital elevation basic data is 2 levels lower, that is, the difference between the dynamic resolution level of the grid and the resolution level corresponding to the digital elevation basic data is 2, then when reading the digital elevation basic data in the grid, read a value every 2 values, so as to load the digital elevation data corresponding to the current grid. If the dynamic resolution level of a newly loaded grid is level 5, and the resolution level corresponding to the digital elevation basic data is 2 levels lower, then first read the digital elevation basic data in the grid, and then perform two elevation interpolations, so as to load the digital elevation data corresponding to the grid.
[0107] During implementation, DEM interpolation algorithms such as weighted average interpolation, polynomial interpolation, radial basis interpolation, and Kriging interpolation can be used for interpolation.
[0108] For grids that are not newly loaded, when loading the corresponding digital elevation data, the dynamic resolution level of the previous frame cycle also needs to be considered. If the dynamic resolution has not changed compared to the previous frame cycle, there is no need to reload it. If it has changed, it needs to be reloaded.
[0109] Specifically, if the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is greater than the dynamic resolution level in the previous frame period, then the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data:
[0110] If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data;
[0111] If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read;
[0112] If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data: if the dynamic resolution level of the current grid in the previous frame period is also greater than the resolution level corresponding to the digital elevation basic data, then the digital elevation data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the previous frame period and the dynamic resolution level of the current grid in the current frame period; otherwise, the digital elevation basic data corresponding to the current grid is read, and the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data;
[0113] When reading the basic digital elevation data corresponding to the current grid, only the basic digital elevation data that was not read in the previous frame period is read.
[0114] For example, the dynamic resolution level of a grid in the previous frame period is level 1, and the dynamic resolution level of the current frame period is increased to level 2, but it is still lower than the resolution level corresponding to the digital elevation basic data (level 3). The dynamic resolution level of the current frame period differs from the resolution level corresponding to the digital elevation basic data by 1 level. When reading the digital elevation basic data in the grid, read a value every 1 value interval, and the data that has been read in the previous frame period does not need to be read repeatedly. If the dynamic resolution level of the grid in the current frame period is increased to level 3, directly read the digital elevation basic data in the grid, and the data that has been read in the previous period does not need to be read repeatedly.
[0115] If the dynamic resolution level of the grid in the current cycle is increased to level 5, and the dynamic resolution level of the previous frame cycle is level 4, both of which are greater than the resolution level corresponding to the digital elevation basic data, there is no need to read the digital elevation basic data, and an elevation interpolation is performed directly according to the difference between the resolution level of the current cycle and the resolution level of the previous cycle. If the dynamic resolution of the previous frame cycle is less than or equal to level 3, the digital elevation basic data in the grid is read first, and the data that has been read in the previous cycle does not need to be read repeatedly. Then, an elevation interpolation is performed according to the difference 1 between the dynamic resolution level of the grid in the current frame cycle and the resolution level corresponding to the digital elevation basic data.
[0116] If the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is less than the dynamic resolution level in the previous frame period, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data:
[0117] If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data, then part of the interpolation data in the digital elevation data corresponding to the current grid is released according to the difference between the dynamic resolution level of the current grid in the current frame period and the dynamic resolution level of the current grid in the previous frame period;
[0118] If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released;
[0119] If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released, and the digital elevation basic data corresponding to the current grid are released according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data.
[0120] For example, the dynamic resolution level of a grid in the previous frame period is level 5. If the dynamic resolution level of the current frame period is reduced to level 4, which is still higher than level 3, and the difference between the dynamic resolution level of the current frame period and that of the previous frame period is 1, then one interpolation data is released every other interpolation data; if the dynamic resolution level of the current frame period is reduced to level 3, then all elevation interpolation data are released, and the read digital elevation basic data are retained; if the dynamic resolution level of the current frame period is reduced to level 1, and the difference between the dynamic resolution level of the current frame period and the resolution level corresponding to the digital elevation basic data is 2, then all elevation interpolation data are released first, and then the digital elevation basic data in the grid are sequentially released, 2 values are released and 1 value is retained, then 2 values are released and 1 value is retained, and so on.
[0121] By dynamically loading the digital elevation data in the grid through the dynamic resolution level of the grid, the amount of digital elevation data and calculation can be effectively reduced while ensuring the accuracy of the simulation calculation. This can reduce the simulation calculation time and improve the real-time performance of the simulation under the condition of limited computing resources.
[0122] During implementation, step S1 can also take minimizing memory resource usage, minimizing simulation timeout time, and minimizing the cumulative number of timeouts as optimization goals, and use a multi-objective optimization algorithm to determine the highest resolution level of digital elevation data, the resolution level corresponding to the digital elevation basic data, the size of the simulation geographic area grid, and the resolution level boundary value corresponding to each grid.
[0123] During implementation, based on the current simulation task scenario and the application scenario of digital elevation data in the simulation task scenario, before the formal simulation task begins, a multi-objective optimization algorithm can be used to repeat the rehearsal according to the above steps for multiple times, and the parameters such as the highest resolution level of digital elevation data, the resolution level corresponding to the digital elevation basic data, the size of the grid, the maximum resolution level of each grid, and the resolution level boundary value between different resolution levels can be optimized to find the most suitable parameter combination suitable for the current hardware computing resources and this simulation task scenario.
[0124] Assume that the simulation frame period of the simulation deduction platform is T f In each frame period of the simulation deduction running stage, the total time consumed to execute all deduction tasks is T total ,but
[0125] T total =T1+T2+T3
[0126] Among them, T1 refers to the time spent executing steps S2 to S3 in each frame cycle. T2 refers to the time spent using the loaded digital elevation data to complete the application scenario calculation, such as the time spent determining whether the aircraft hits the mountain wall in application scenario 1, and the time spent on terrain rendering in application scenario 2. T3 refers to the time spent completing other deduction task calculations.
[0127] In order to ensure the real-time performance of the simulation platform, T total Should be less than or equal to T f , that is, T total ≤T f , let △T=T total -T f .
[0128] When △T>0, it indicates that the simulation calculation of the frame period has timed out, and △T is the simulation calculation timeout time of the frame period. The simulation deduction platform generally has an automatic compensation mechanism for simulation timeout. When a simulation calculation timeout occasionally occurs in a deduction task, the simulation deduction platform will gradually compensate for the time in subsequent frame periods, thereby ensuring that the actual time consumed by the simulation deduction platform to complete the deduction task within a period of time is consistent with the theoretical simulation time. However, when the simulation computing resources are insufficient, the number of simulation timeouts is large and the timeout time is long, the simulation deduction platform cannot complete the timeout compensation, and the simulation timeout time will gradually accumulate, making the gap between the actual time consumed by the deduction task and the theoretical simulation time increasingly larger, resulting in the simulation deduction platform no longer having real-time performance.
[0129] The following uses application scenario 2 as an example to illustrate the optimization method:
[0130] The method for calculating the heat value of the simulation entity is selected as method 1, the simulation entity quantity method, and the method for calculating the area covered by the digital elevation data to be loaded is method 1, the rectangular calculation method. In a simulation deduction task, for each simulation frame period, if △T>0, it is recorded as a timeout, and the total time T consumed by each simulation frame period to execute all deduction tasks is counted. total and timeout △T, the memory size HP occupied by each frame cycle, and the image resolution size Q generated by terrain rendering. After the deduction is completed, calculate T total and the mean of △T, the mean of the cumulative timeout times NUM and HP.
[0131] The optimization objective function is:
[0132] {min(Mean(T total ),Mean(△T),NUM,Mean(HP))}=F(P,M,K,G(KS))
[0133] Among them, Mean(T total ) represents the mean of the total time spent on executing all deduction tasks in each simulation frame period; Mean(△T) represents the mean of the timeout time of each simulation frame period; NUM represents the cumulative value of the simulation frame period timeout times, that is, the cumulative timeout times; Mean(HP) represents the mean of the memory resource usage of each frame period; P represents the highest resolution level of digital elevation data; M represents the resolution level corresponding to the digital elevation basic data, M≤P; K represents the size of the grid;
[0134] KS=(KS1,KS2,…,KS x ) is a set of vectors, x represents the total number of grids in the current simulation geographical area, KS1, KS2, …, KS xThey respectively represent the maximum resolution level corresponding to each grid, which is qualitatively determined according to the type of topographic features of each grid.
[0135] G(KS)=(G1,G2,…,G x ) is a matrix representing the resolution level boundary value between different resolution levels of each grid, where G1 represents the resolution level boundary value vector between different resolution levels of the first grid, G x Respectively represent the resolution level boundary value vectors between different resolution levels of the x-th grid.
[0136] During implementation, other optimization objectives can be added as needed, such as maximizing the resolution of the generated image.
[0137] The optimization objective function means that by reasonably setting the above parameters, the simulation timeout and the cumulative number of timeouts are minimized while the image resolution generated by terrain rendering is maximized under the condition of less memory resource usage. During implementation, the optimization objective function can be constructed based on the above objectives, and a variety of known multi-objective optimization algorithms can be used to optimize parameters, such as genetic algorithms, multi-objective particle swarm optimization algorithms, ant colony optimization algorithms, etc.
[0138] If the time for a simulation task specified in the simulation task scenario is too long, in order to speed up the parameter optimization, the time period with the most simulation entities and the most intense confrontation in the simulation task scenario can be intercepted for rehearsal, thereby shortening the time required for a rehearsal.
[0139] In the above optimization method, the maximum resolution level corresponding to each grid is qualitatively determined according to the topographical feature type of each grid, and the resolution level boundary values between different resolution levels of different grids are different. There are many parameters to be optimized, and the parameter optimization is difficult. In order to reduce the optimization difficulty and speed up the optimization progress, the optimization method can be further improved, as follows:
[0140] Calculate the standard deviation of the digital elevation basic data corresponding to each grid, and quantitatively determine the number of resolution levels for each grid, that is, the maximum resolution level, according to the pre-set standard deviation range corresponding to different resolution levels. The same resolution level cutoff value is used between different resolution levels of different grids. The simplified optimization objective function is:
[0141] {min(Mean(T total ),Mean(△T),NUM,Mean(HP))}=F(P,M,K,δ,GN)
[0142] δ=(δ1,δ2,…,δ P-1) is a set of vectors, P represents the highest resolution level of digital elevation data, (δ1,δ2,…,δ P-1 ) represent the standard deviation thresholds corresponding to different resolution levels. When the standard deviation of the digital elevation basic data of a grid is less than δ1, the maximum resolution level of the grid is 1; when the standard deviation of the digital elevation basic data of a grid is greater than or equal to δ1 and less than δ2, the maximum resolution level of the grid is 2, and so on; when the standard deviation of the digital elevation basic data of a grid is greater than or equal to δ1 and less than δ2, the maximum resolution level of the grid is 2. P-1 When , the maximum resolution level of the grid is P level.
[0143] GN=(g1,g2,…,g P-1 ) is a set of vectors, which represent the resolution level boundary values between different resolution levels. When the simulated entity heat of a grid is less than g1, the dynamic resolution level of the grid is level 1; when the simulated entity heat of a grid is greater than or equal to g1 and less than g2, the dynamic resolution level of the grid is level 2, and so on; when the simulated entity heat of a grid is greater than or equal to g P-1 , the dynamic resolution level of the grid is P. The dynamic resolution level of each grid shall not exceed the maximum resolution level of the grid. For example, assuming that the simulated entity heat of a grid in the current period is greater than or equal to g3 and less than g4, but the maximum resolution level determined by the standard deviation of the digital elevation basic data of the grid is level 2 (the standard deviation is greater than or equal to δ1 and less than δ2), then the dynamic resolution level of the grid in the current period is still level 2.
[0144] Compared with the original objective function, the simplified optimization objective function greatly reduces the number of parameters to be optimized, which can reduce the amount of calculation of the optimization algorithm and save the time required for parameter optimization.
[0145] Before the formal simulation begins, the relevant parameters are reasonably set through a multi-objective optimization algorithm, which can be applied to various application scenarios of large-scale simulation in large geographical areas. After determining the optimal parameters, the actual simulation is carried out according to the optimal parameters, thereby improving the real-time performance of the simulation under the condition of limited computing resources.
[0146] Embodiment 2
[0147] The following examples are used to illustrate the technical solution of the present invention.
[0148] A simulation platform is mainly used for the offensive and defensive confrontation between the red and blue sides. The simulation platform runs on an ordinary industrial computer with a CPU frequency of 2.1Ghz and a memory of 8GB. Assuming that according to the provisions of the simulation task assumption, the simulation geographical area is the area surrounded by the four vertices P1, P2, P3, and P4, with a span of 10 degrees in longitude from east to west and 10 degrees in latitude from north to south. It is assumed that the topography in the area is the northwest, including high mountains with drastic terrain changes, the southeast is a rolling desert, and the other parts are flat Gobi Desert. The above assumptions are only used to demonstrate the implementation process of the technical solution of the present invention, and may differ from the actual topography within the above-mentioned area. The simulation entities participating in the exercise on both sides include a total of 50 transport vehicles, 800 personnel, 20 confrontation vehicles, and 10 aircraft. Each person is equipped with 50 pieces of the first confrontation equipment, each confrontation vehicle is equipped with 10 pieces of the second confrontation equipment, and each aircraft is equipped with 20 pieces of the third confrontation equipment.
[0149] In the simulation preparation stage, according to the above simulation task assumptions, the simulation geographical area is the area surrounded by the four vertices P1, P2, P3, and P4. A number of DEM data files with a resolution of 30m in the area surrounded by G1, G2, G3, and G4 are obtained from the open source website as digital elevation basic data. The area covered by all digital elevation basic data can cover the simulation geographical area.
[0150] According to the above simulation task assumptions, combined with the computing resource conditions such as memory and computing power of ordinary industrial computers, the highest resolution level of digital elevation data is set to level 4. The actual accuracy of the DEM data file is 30m, and the resolution level corresponding to the digital elevation basic data is set to level 2. The simulation geographical area has a span of 10 degrees in east-west longitude and 10 degrees in north-south latitude. The grid size is set according to the size of the simulation geographical area multiplied by 1%, that is, each grid has a span of 1 degree in east-west longitude and 1 degree in north-south latitude, for a total of 100 grids. Load the global digital elevation basic data within the simulation geographical area, preview the topographic and geomorphic features of different locations in the simulation geographical area, set the resolution level of the northwestern mountainous area to 4 levels, i.e., level 1 to level 4, and the resolution level of the southeastern desert area to 3 levels, i.e., level 1 to level 3. The resolution level of other unset areas is set to 2 levels by default, i.e., level 1 to level 2. Figure 3 shown.
[0151] The simulation entity weighted method is used to determine the resolution level cutoff value. According to the above simulation task assumptions, the weights are set to 5%, 10%, 15%, 20%, 5%, 15%, and 30% respectively according to the different confrontation capabilities of the participating transport vehicles, personnel, confrontation vehicles, aircraft, first confrontation equipment, second confrontation equipment, and third confrontation equipment.
[0152] In the high mountain area, the percentage of simulated entities between resolution levels 1 and 2 is 2%, the percentage of simulated entities between resolution levels 2 and 3 is 4%, and the percentage of simulated entities between resolution levels 3 and 4 is 6%. The resolution level cutoff value between resolution levels 1 and 2 is 43.55, the resolution level cutoff value between resolution levels 2 and 3 is 87.1, and the resolution level cutoff value between resolution levels 3 and 4 is 130.65 calculated by the simulated entity weighting method. In other words, in the high mountain area, the cutoff values between resolution levels 1, 2, 3, and 4 are 43.55, 87.1, and 130.65, respectively.
[0153] In the desert area, the percentage of simulated entities between resolution levels 1 and 2 is 3%, and the percentage of simulated entities between resolution levels 2 and 3 is 6%. The resolution level cutoff value between resolution levels 1 and 2 is 65.325, and the resolution level cutoff value between resolution levels 2 and 3 is 130.65, calculated by the simulated entity weighting method. In other words, in the desert area, the cutoff values between resolution levels 1, 2, and 3 are 65.325 and 130.65, respectively.
[0154] In other Gobi desert areas, the percentage of simulated entities corresponding to resolution levels 1 and 2 is 5%. The resolution level cutoff value between resolution levels 1 and 2 is calculated to be 108.875 using the simulated entity weighting method.
[0155] After completing the settings, load the global digital elevation basic data to release memory resources.
[0156] During implementation, the highest resolution level of the digital elevation data, the resolution level corresponding to the digital elevation basic data, the size of the grid, the maximum resolution level of each grid, and the resolution level boundary values between different levels can also be determined based on the multi-objective optimization results.
[0157] In the simulation deduction initialization stage, according to the simulation deduction task assumption, the initial simulation entity deployment is completed, such as Figure 4 As shown, the initial positions of the simulation entities are located at points A, B, C, and D. A method combining the rectangular calculation method and the circular calculation method is selected to calculate the coverage area of the digital elevation data to be loaded, wherein the least square method is used to calculate the coordinates and radius of the center of the circle, and then the longitude and latitude of the northernmost, southernmost, westernmost, and easternmost points of the circle are selected, and the latitude value of the northernmost point is rounded to the north, the latitude value of the southernmost point is rounded to the south, the longitude value of the westernmost point is rounded to the west, and the longitude value of the easternmost point is rounded to the east. The above four rounded values are combined in pairs to form a rectangle with four vertices EFGH, which is the coverage area of the digital elevation data to be loaded.
[0158] Calculate the initial resolution level of each grid in the area surrounded by the EFGH points. Assume that the initial simulated entity heat values of the grids where points A, B, C, and D are located are 50.1, 151.2, 123.4, and 20.5, respectively. Among them, points A, C, and D are all located in other Gobi desert areas. According to the resolution level cutoff value of the Gobi desert area, the initial resolution levels of the grids where they are located are 1, 2, and 1, respectively. Point B is located in the mountainous area. According to the resolution level cutoff value of the mountainous area, the initial resolution level of the grid where it is located is 4. Since there are no simulated entities in other grids, the simulated entity heat values are all 0, and the initial resolution levels are all 1.
[0159] The digital elevation basic data in the grid is automatically loaded according to the initial resolution level of different grids. The resolution level corresponding to the digital elevation basic data is set to level 2. The initial resolution level of the grid where point B is located is level 4, and the difference between the resolution level corresponding to the digital elevation basic data is 2 levels. In this case, the digital elevation basic data in the grid is read first, and then the elevation interpolation is performed twice. The DEM interpolation algorithm selects weighted average interpolation. The initial resolution level of the grid where point C is located is level 2, which is the same as the resolution level corresponding to the digital elevation basic data. In this case, the digital elevation basic data in the grid is directly read. The initial resolution level of the grid where points A and D are located and other grids are all level 1, and the difference between the resolution level corresponding to the digital elevation basic data is 1 level. In this case, when reading the digital elevation basic data in the grid, one value is read every 1 value.
[0160] During the simulation run phase, the area covered by the digital elevation data that needs to be loaded is recalculated in each frame period according to the current locations of all simulation entities using a combination of the rectangular calculation method and the circular calculation method. When the area covered by the digital elevation data that needs to be loaded calculated in the current period changes from the area covered by the digital elevation data that needs to be loaded in the previous period, the digital elevation data in the newly added area is loaded, and all digital elevation data in the area where there are no simulation entities is released, ensuring that the locations of all simulation entities are always within the area covered by the digital elevation data.
[0161] When loading a new area, the simulated entity heat value of each grid in the new area is calculated according to the set grid size and the simulated entity weighted method. According to the resolution level boundary value of each grid, the dynamic resolution level corresponding to the grid is obtained, and the digital elevation basic data in the grid is automatically loaded according to the corresponding dynamic resolution level.
[0162] For areas that are not newly loaded, if the resolution level of the current cycle changes compared to the resolution level of the previous cycle, the digital elevation data in the grid is dynamically loaded and unloaded according to the resolution level of the current cycle. When calculating the simulation entity heat value of each grid, only the currently valid simulation entities are calculated, and the invalid simulation entities are not included.
[0163] For example, the resolution level corresponding to the digital elevation basic data is set to level 2. Assuming that the resolution level of the grid where point A is located in the previous cycle is level 1, and the resolution level of the current cycle is increased to level 2, which is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data in the grid is directly read, and the data that has been read in the previous cycle does not need to be read again.
[0164] Assuming that the resolution level of the grid where point C is located in the previous cycle is level 1, and the resolution level of the current cycle is increased to level 3, which is 1 level lower than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data in the grid is read first, and the data that has been read in the previous cycle does not need to be read repeatedly, and then one elevation interpolation is performed.
[0165] Assume that the resolution level of the grid where point B is located in the previous cycle is level 4. If the resolution level of the current cycle is reduced to level 3, which is still higher than level 2, and the difference between the resolution level of the current cycle and the resolution level of the previous cycle is 1, then one interpolation data is released for each interpolation data interval; if the resolution level of the current cycle is reduced to level 2, then all the 2 times elevation interpolation data are released, and the read digital elevation basic data are retained; if the resolution level of the current cycle is reduced to level 1, and the difference between the resolution level of the current cycle and the resolution level corresponding to the digital elevation basic data is 1, then all the elevation interpolation data are released first, and then the digital elevation basic data in the grid are released in sequence, 1 value is retained, 1 value is released, and 1 value is retained, and so on.
[0166] During the simulation termination phase, after the simulation stops, all digital elevation data are automatically loaded at the termination time to release memory resources in time.
[0167] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0168] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for dynamically loading and unloading digital elevation data of a simulation platform. It is characterized in that The following steps are involved: In each frame period of the simulation deduction operation, the current simulation area is determined according to the current simulation entity position, and the digital elevation data of the area without simulation entity is released; Calculating the simulated entity heat of each grid in the current simulation area, and determining the dynamic resolution level of each grid in the current simulation area based on the simulated entity heat of each grid in the current simulation area and the resolution level cutoff value corresponding to each grid; The digital elevation data of each grid is loaded based on the dynamic resolution level of each grid in the current simulation area and the resolution level corresponding to the digital elevation basic data.
2. The method for dynamically loading and unloading digital elevation data of the simulation platform according to claim 1, It is characterized in that The resolution level cutoff value corresponding to each grid is determined in the following ways, including: Calculate the standard deviation of the digital elevation basic data corresponding to each grid, and determine the maximum resolution level of each grid according to the standard deviation; The resolution level cutoffs are calculated based on the maximum resolution level of each grid and the total number of simulated entities.
3. The method for dynamically loading and unloading digital elevation data of the simulation platform according to claim 1, It is characterized in that If the current grid is a newly loaded grid, the digital elevation data is loaded in the following ways based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation base data, including: If the dynamic resolution level of the current grid is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read to obtain the digital elevation data corresponding to the current grid; If the dynamic resolution level of the current grid is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid; If the dynamic resolution level of the current grid is greater than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read, and the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data to obtain the digital elevation data corresponding to the current grid.
4. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that If the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is greater than the dynamic resolution level in the previous frame period, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data: If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is read according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data; If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, the digital elevation basic data corresponding to the current grid is directly read; If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data: if the dynamic resolution level of the current grid in the previous frame period is also greater than the resolution level corresponding to the digital elevation basic data, then the digital elevation data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the previous frame period and the dynamic resolution level of the current grid in the current frame period; otherwise, the digital elevation basic data corresponding to the current grid is read, and the digital elevation basic data corresponding to the current grid is interpolated according to the difference between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data; When reading the basic digital elevation data corresponding to the current grid, only the basic digital elevation data that was not read in the previous frame period is read.
5. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that If the current grid is not a newly loaded grid, and the dynamic resolution level of the current grid in the current frame period is less than the dynamic resolution level in the previous frame period, the digital elevation data is loaded in the following manner based on the dynamic resolution level of the current grid and the resolution level corresponding to the digital elevation basic data: If the dynamic resolution level of the current grid in the current frame period is greater than the resolution level corresponding to the digital elevation basic data, then part of the interpolation data in the digital elevation data corresponding to the current grid is released according to the difference between the dynamic resolution level of the current grid in the current frame period and the dynamic resolution level of the current grid in the previous frame period; If the dynamic resolution level of the current grid in the current frame period is equal to the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released; If the dynamic resolution level of the current grid in the current frame period is less than the resolution level corresponding to the digital elevation basic data, then all interpolation data in the digital elevation data corresponding to the current grid are released, and the digital elevation basic data corresponding to the current grid are released according to the difference interval between the dynamic resolution level of the current grid in the current frame period and the resolution level corresponding to the digital elevation basic data.
6. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that The current simulation area is determined according to the current simulation entity position, including: Select the longitude and latitude of the northernmost, southernmost, westernmost and easternmost simulation entities among all current simulation entities; round the latitude value of the northernmost point to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the rounded four longitude and latitude values is the current simulation area.
7. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that The current simulation area is determined according to the current simulation entity position, including: Calculate the minimum coverage circle of all current simulation entity positions; and take the minimum coverage circle as the current simulation area.
8. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that The current simulation area is determined according to the current simulation entity position, including: Calculate the minimum coverage circle of all current simulated entity positions; round the latitude value of the northernmost point of the minimum coverage circle to the north, the latitude value of the southernmost point to the south, the longitude value of the westernmost point to the west, and the longitude value of the easternmost point to the east. The rectangular area formed by the four rounded longitude and latitude values is the current simulation area.
9. The method for dynamically loading and unloading digital elevation data of a simulation platform according to claim 1, It is characterized in that Calculate the simulated entity heat of each grid in the current simulation area, including: The number and type of simulation entities in each grid of the current simulation area are determined, and the heat of the simulation entities in each grid of the current simulation area is calculated based on the number and type of simulation entities in each grid.
10. The method for dynamically loading and unloading digital elevation data of the simulation platform according to claim 9, It is characterized in that The simulated entity heat of each grid in the current simulation area is calculated using the following formula: Among them, ω i represents the weight of the confrontation capability of the i-th type of simulation entity, n i represents the number of the i-th type of simulation entities in the grid, and k represents the number of simulation entity types in the grid.
