Virtual environment situation research and judgment visualization method based on digital commander
Through the virtual environment situation analysis and visualization method based on digital commanders, using technologies such as OpenCV and Matplotlib to generate and analyze natural environment information, and combining with multi-layer perceptron models for situation evaluation, the shortcomings of the existing technology in situation awareness and visualization implementation are solved, and efficient situation analysis and understanding capabilities are achieved.
Patent Information
- Application Number
- CN202510004167.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-09
AI Technical Summary
The existing environmental situation analysis and judgment technology is difficult to effectively improve situation awareness and situation visualization. Especially in the context of information warfare and intelligent weapons applications, the existing technology has shortcomings in situation analysis and understanding capabilities.
The virtual environment situation analysis and visualization method based on digital commanders is adopted to achieve real-time analysis and understanding of environmental situations by determining parameter types, creating and analyzing natural environment data, evaluating environmental situations and visualizing them. The specific steps include using the OpenCV platform to generate grayscale maps of natural environment information, using Matplotlib to generate three-dimensional topography and landform distribution maps, and combining morphological operations and multi-layer perceptron models for situational evaluation and decision-making.
Through this method, we can visualize environmental situations, improve the efficiency of data processing and analysis, and better adapt to environmental changes through artificial intelligence to enhance situation awareness and analysis capabilities.
Smart Images

Figure CN119962988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental situation analysis and judgment, and mainly to a virtual environmental situation analysis and judgment visualization method based on a digital commander. Background Art
[0002] Environmental situation assessment refers to the real-time analysis and understanding of the environment by collecting, processing, analyzing and displaying environmental information. This assessment is not only about the position, movement and intention of both sides in the environment, but also includes a comprehensive assessment of multi-dimensional information such as the environment, weather, terrain and landforms. With the in-depth development of information warfare, the importance of environmental situation assessment has become increasingly prominent. On the one hand, the environmental space of modern warfare is vast, the combat forces are dispersed, and the combat operations are complex and changeable, requiring efficient situation awareness technology to provide accurate and timely information support; on the other hand, with the development and application of intelligent weapons, the ability to analyze and understand the environmental situation has become a key factor in determining the outcome of the war. At present, there is still a long way to go to improve the ability to assess the environmental situation and realize situation visualization. Summary of the invention
[0003] Purpose of the invention: The technical problem to be solved by the present invention is to provide a virtual environment situation analysis visualization method based on digital commanders in view of the shortcomings of the prior art, including the following steps:
[0004] Step 1, determine the parameter type;
[0005] Step 2: Create and analyze natural environment data;
[0006] Step 3: Assess the environmental situation;
[0007] Step 4: Visualize the environmental information.
[0008] Step 1 includes: using the minimum number of missiles d required to destroy the opponent's unit, the minimum value R of the opponent's firepower strike radius and reconnaissance radius, the opponent's interception probability p of the own missile, the opponent's interception frequency f of the own missile, the total number of missiles n that the own side needs to launch, and the flight speed V of the own weapon to analyze the units of both sides; using the height y1 of the measured point, the terrain complexity y2 of the measured point, the topographic complexity y3 of the measured point, the meteorological obstruction y4 of the measured point, and the reconnaissance credibility e of the measured point (calculated from the first four parameters) to analyze the natural environment;
[0009] Among the parameters used to analyze both units, the parameters except n are conditions that need to be given by the system user; n is the target parameter to be solved by the system. All parameters used to analyze the natural environment are calculated in step 3.
[0010] Step 2 includes: using the OpenCV platform to generate corresponding grayscale images of terrain, landform, and weather, and further analyzing the generated natural environment information.
[0011] In step 2, the grayscale image includes a topographic map, a landform distribution map (including forest and swamp distribution) and a meteorological condition map (corresponding to a cloud distribution map);
[0012] The size of the grayscale image is 100*100 pixels, and each pixel represents 1km 2 Each point in the figure has its own corresponding grayscale value, and its value range is [0,255]. For convenience, the height range of the terrain map is also [0m,255m]. Based on the existing public research, the terrain and clouds are simulated by Perlin noise, and the forests and swamps are simulated by cellular automata.
[0013] In step 2, the generated natural environment information is further analyzed, specifically including: using Matplotlib to generate a three-dimensional terrain and landform distribution map; using the erosion and expansion algorithms in morphological operations to extract extreme points in the terrain. The formula of the erosion algorithm is:
[0014]
[0015] in, represents the erosion operation;
[0016] F represents the result image after A performs corrosion operation on Y;
[0017] Y is the given target image, which is a set whose elements represent pixels or pixel sets in the image;
[0018] A is a structural element used for corrosion operation. It is also a set, usually with a smaller size and shape than Y, and is used to define the scope and method of corrosion operation;
[0019] (x,y) represents the coordinate position in the image;
[0020] A(x,y) represents the result of translating the structural element A at the (x,y) position of image Y. The translation here means that each pixel of A is aligned with the pixel corresponding to the (x,y) position of Y.
[0021] This condition means that when the structural element A is translated at the position (x, y) of the image Y, all pixels of A are completely located inside Y (that is, A and Y overlap at this position, and A is not surrounded by the external pixels of Y). Only when this condition is met, (x, y) will be included in the erosion result F;
[0022] Use the Sharr operator in OpenCV to process the height map and calculate the gradient to achieve the display of the gentle and steep nature of the terrain;
[0023] Through the gradient and height information, the areas with high and low passability in the terrain are analyzed and marked in the grayscale map.
[0024] In step 3, integrate the information about the enemy units and the natural environment that has been obtained, and use the following analysis rules to make strategic decisions:
[0025] Assuming that it takes d missiles to destroy the target unit, the problem is equivalent to finding the total number of missiles n that the team needs to launch so that at least d of the n missiles launched hit the target;
[0026] Set the minimum value of the opponent's firepower strike radius and reconnaissance radius to R, the interception probability of the own missile to p, the interception frequency to f, the flight speed of the own weapon to V, and the own weapon is intercepted in the cover area. times; without considering environmental factors, when one side launches a missile, the probability q of the other side's firepower attack weapon intercepting the missile is:
[0027]
[0028] The reconnaissance credibility e is defined, where e represents the deviation between the reconnaissance result and the actual result. The reconnaissance credibility model is constructed based on four parameters: height, terrain complexity, landform complexity, and meteorological obstruction. The calculation formula for the reconnaissance credibility e of a point X on the map is:
[0029] e=y4(0.2y1-0.6y2+0.2y3)
[0030] Among them, the value of y1 is equal to 1 / 255 of the gray value of the measured point in the topographic map;
[0031] The y2 calculation formula is:
[0032]
[0033] Where θ represents the slope, TCD represents the surface cutting depth;
[0034] y3 represents the landform complexity. If the landform complexity of the swamp is set to 1, the landform complexity of the plain and forest are 0.8 and 0.4 respectively.
[0035] y4 represents the meteorological obstruction degree. The meteorological obstruction degree when there is no obstruction is 1, and the meteorological obstruction degree when there is obstruction is 0.7. Use e to correct the interception probability q, then the corrected interception probability q ′ for:
[0036]
[0037] In step 3, the analysis and judgment rules are input into a multi-layer perceptron for training to generate an environmental situation assessment model, which specifically includes:
[0038] Step 3-1, generate two or more sets of grayscale images, each set includes four pictures showing terrain, landforms and meteorological conditions, randomly select several points from each set of grayscale images, calculate the relevant parameters at the randomly selected points, and form samples for training or testing. Each sample has an example (used to describe the properties of the sample) and a label (recording the e value directly calculated by the formula at the point);
[0039] Step 3-2, set the number of hidden layers of the multilayer perceptron model to 3, and the number of neurons in each layer to 100, 30, and 10 respectively. The number of neurons is adaptively obtained during training;
[0040] Step 3-3: Divide the sample set obtained in step 3-1 into a training set and a test set at a ratio of 4:1, input the training set into the set perceptron for training, and generate a trained perceptron model. Then use the test set to test the performance of the model.
[0041] In step 4, the whole process from natural environment information generation to situation analysis and prediction is encapsulated into a program, including: designing a Summon button on the main interface of the program, which is responsible for generating and saving all natural environment information with one click; designing a Load button on the main interface of the program, which is responsible for popping up a secondary interface to perform environmental situation analysis for a specific image; designing a Load 2D Map button and a Load 3D Map button on the secondary interface of the program, which are responsible for quickly loading the image after entering the specified image name; designing a Predict button on the secondary interface of the program, which is responsible for predicting the minimum number of missiles n that the side needs to launch under given conditions according to the parameters of the units of both sides entered by the user, and generating a distribution map of n for the terrain image.
[0042] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the described method.
[0043] The present invention also provides a storage medium storing a computer program or instruction. When the computer program or instruction is run on a computer, the steps of the method described are executed.
[0044] Beneficial effects: The method of the present invention can visualize the environmental situation and display it in the form of images. The processing and analysis of data can be more fully utilized, and the addition of artificial intelligence to assist decision-making is more conducive to adapting to environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0046] Figure 1 It is a framework for building a virtual environment situation analysis visualization system based on digital commanders.
[0047] Figure 2 This is the effect of terrain height data after processing.
[0048] Figure 3 It is the original topographic map.
[0049] Figure 4 This is a forest distribution map.
[0050] Figure 5 This is a map of swamp distribution.
[0051] Figure 6 It is a weather obstruction situation map.
[0052] Figure 7 The original topographic map.
[0053] Figure 8 This is a map showing the distribution of low points.
[0054] Fig. 9 This is a map showing the distribution of high points.
[0055] Fig.10 is a gradient map.
[0056] Fig.11 This is a passability test diagram.
[0057] Fig.12 It is the main interface of the system.
[0058] Fig.13 It is the secondary interface of the system.
[0059] Fig.14 This is the system's prediction chart for the n value when the d value is set to 3.
[0060] Fig.15 This is the system's prediction chart for the n value when the d value is set to 8.
[0061] Fig.16 This is the system's prediction chart for the n value when the d value is set to 9. DETAILED DESCRIPTION
[0062] The embodiment of the present invention provides a virtual environment situation analysis visualization method based on digital commanders, which mainly relies on databases and platforms such as OpenCV and scikit-learn. The main work involved is as follows: Figure 1 The method is applicable to land warfare environments, and assumes that our side has obtained all the natural environment information of the environment and the data of the opponent's equipment and firepower. Specifically, it includes: the construction of the opponent's unit attributes, the creation of natural environment data, the analysis of the opponent's unit attributes and behavior, and the visualization of environmental information, involving image generation and processing, machine learning, visualization and other technologies.
[0063] In one embodiment, Figure 1 As shown in the figure, a method for creating a virtual environment situation analysis visualization system mainly based on OpenCV, scikit-learn and other databases and platforms is provided, including the following steps:
[0064] Step 1, determine the parameter type required by the system. The opponent's target unit is the main body of the entire method for evaluation and analysis. There are too many factors to consider for the army in the real environment, and it is difficult to analyze directly. In simulation studies in various related fields, specific aspects of military units are selected for modeling to facilitate data processing and analysis. Since the invention uses machine learning as an analysis method, the present invention selects the following main parameters to realize the system's evaluation function of the environmental situation: d (the minimum number of missiles required for the opponent's unit to be destroyed), R (the minimum value of the opponent's firepower strike radius and the reconnaissance radius), p (the opponent's interception probability of one's own missiles), f (the opponent's interception frequency of one's own missiles), n (the total number of missiles that one needs to launch), V (the flight speed of one's own weapons), y1 (the height of the measured point), y2 (the terrain complexity of the measured point), y3 (the topographic complexity of the measured point), y4 (the meteorological obstruction of the measured point). Among the above parameters, n is the unknown number that is finally required to be obtained, and the other parameters are considered to be able to directly obtain accurate values.
[0065] Step 2, create and analyze natural environment data. The natural environment will directly affect the relevant actions of the two combatants, and its analysis is the basis for the analysis of the opposing units. In the existing related studies, most of them choose to use a third-party platform to import real terrain and analyze it after the data format is converted. In the embodiment of the present invention, the relevant algorithm is used to directly generate natural environment data, and a two-dimensional grayscale image is selected as the carrier of environmental information. In each generated grayscale image, the grayscale value of each point represents the value of a certain attribute of the point.
[0066] The embodiment of the present invention selects three dimensions, namely, topography, landform and meteorology, to generate natural environment information. When some environmental factors need to be further explored, the corresponding grayscale image is processed for a second time.
[0067] (1) Perlin noise algorithm generates altitude data and weather occlusion data
[0068] For the virtual environment situation analysis system, the Perlin noise function is used to generate simulated environmental terrain maps and weather condition maps. The Perlin noise algorithm presets a set of sampling points and their supporting 2D random gradient vectors, and represents the "height" of each point as the dot product of the gradient and distance of the 4 nearest sampling points, so that it can fluctuate continuously while retaining randomness. Adjusting the number of sampling points can generate grayscale images with different fluctuations. The fewer the sampling points, the flatter the overall terrain. Based on this principle, the virtual terrain and virtual cloud generated by the present invention can highly imitate the real situation and can be used as a substitute for the real terrain environment and meteorological environment.
[0069] Using the same principle as terrain generation, we can also simulate cloud distribution. For the convenience of subsequent analysis, we assume that there are only two possible situations: cloud cover and no cloud cover. After converting the simulated terrain map into a binary image, we can simulate the cloud distribution under the current assumptions. Figure 3 The original topographic map is shown. Figure 4 This is a forest distribution map. Figure 5 This is a map of swamp distribution. Figure 6 It is the generated meteorological obstruction situation map.
[0070] (2) Scharr operator to detect image gradient
[0071] The Scharr operator is an operator used for edge detection in image processing. It performs a convolution operation on the input image by using a template with a set value (also called a convolution kernel). This template slides on the image, and a weighted sum is performed on each pixel point and its neighborhood to obtain a new pixel value. Based on this principle, the embodiment of the present invention uses the Scharr operator to display the gradient information in the image. In the gradient image obtained after processing, the larger the grayscale of the pixel, the larger the gradient, and the smaller the grayscale, the smaller the gradient.
[0072] Figure 7 is the original terrain map generated, Figure 8 This is a map showing the distribution of low points. Fig. 9 This is a map showing the distribution of high points. Fig.10 The gradient map is obtained after Scharr operator processing. It is easy to see that the gradient map correctly represents the steepness of the terrain in the original image. Fig.11 This is a passability test diagram.
[0073] (3) Morphological operation to find the extreme points of the image
[0074] Morphological operation is an image processing method developed based on the set theory method of mathematical morphology for binary images. The present invention uses the corrosion and expansion methods in morphological operation to achieve the extraction of extreme points in the terrain.
[0075] The principle of the erosion operation is to find the minimum value of each element in the data set within the custom structural element (window) to replace the value of the central element. In the present invention, the size of the grayscale represents the height of the terrain. Performing an erosion operation on a point in the topographic map can achieve the operation of replacing the grayscale value of the point in the image with the minimum grayscale value in the field. After this operation, if the grayscale value does not change, it means that the point is the minimum point to be found. Applying this operation to each point on the image can extract the low points in the map.
[0076] The dilation algorithm is the inverse process of the erosion algorithm, and its principle is similar to the latter. It is used to expand the edge of an object outward, fill small holes in an image, or connect adjacent objects. In the present invention, the high points in the map can be initially extracted by combining this operation. Figure 7 The original topographic map. Figure 8 This is a map showing the distribution of low points. Fig. 9 This is a map showing the distribution of high points.
[0077] (4) Normalized integration of gradient and height information to assess passability
[0078] The present invention determines the passability of a point by using two parameters, gradient and height. Multiply a pair of pixels at the same position in the topographic map and the corresponding gradient map, and then normalize the product to the interval [0, 255] to obtain the corresponding passability distribution map. Figure 7 , Fig.10 and Fig.11 It can be found that the higher the terrain and the greater the slope, the lower the passability and the lighter the color in the passability detection map.
[0079] (5) Cellular automata create terrain materials
[0080] The cellular automaton model is a discrete dynamic system that mainly simulates various highly complex self-organization phenomena and chaotic phenomena in nature and physical systems, and on this basis, reproduces the relevant dynamic evolution process.
[0081] Based on this principle, the present invention establishes the evolution rules of forests and swamps. Among them, the formation of forests is affected by both terrain gradient and height, while swamps can only be formed on low-lying land. The simulated results are consistent with the distribution of forest and swamp areas in the natural environment to a great extent. Figure 4 This is a forest distribution map. Figure 5This is a map of swamp distribution.
[0082] (6) Generate 3D terrain maps using Matplotlib
[0083] Matplotlib is a two-dimensional graphics library written in Python. It makes full use of the fast and accurate matrix computing capabilities of Python numerical computing packages and has good drawing performance. Matplotlib is one of the most commonly used visualization tools in Python. It can easily create high-quality 2D charts of different types and some basic 3D charts.
[0084] from Figure 2 It is not difficult to see that the generated 3D image shows the topographic and landform features of the original image. The lightest areas in the image are forests, and the darkest areas are swamps. Figure 2 The units of the x-axis and y-axis are kilometers, and the unit of the z-axis is meters. By placing the mouse on any point on the 3D map, you can get its horizontal and vertical coordinate information, as well as its height information.
[0085] Step 3: Evaluate the environmental situation. The present invention uses a neural network to integrate the obtained information about the opponent's units and the natural environment to make strategic decisions.
[0086] Assuming that it takes d missiles to destroy the target unit, the problem is equivalent to finding the total number of missiles n that the team needs to launch, so that at least d of the n missiles launched hit the target. If the probability q of each of the team's missiles hitting the enemy unit can be determined, then the value of n can be solved. Then use a multi-layer perceptron to implement the entire solution process and train the perceptron model used by the system.
[0087] (1) Range of values for each parameter of the combat unit model
[0088] Parameters such as d, R, p, f, and V are directly given by the user in actual use. Therefore, it is necessary to set a reasonable value range for them to facilitate the subsequent training of the perceptron model. Based on relevant public data, the value ranges of these six parameters are limited as shown in Table 1 below.
[0089] Table 1
[0090]
[0091] (2) Hit probability q' under ideal conditions
[0092] Set the minimum value of the opponent's firepower strike radius and reconnaissance radius to R, the interception probability of the own missile to p, the interception frequency to f, the flight speed of the own weapon to V, and the own weapon is intercepted in the cover area. Without considering environmental factors, when one side launches a missile, the probability q of the other side's firepower weapon intercepting it is:
[0093]
[0094] (3) Reconnaissance credibility
[0095] Let's consider the impact of the natural environment on the reconnaissance results. The definition of reconnaissance credibility e represents the deviation between the reconnaissance results and the actual results. The larger the value, the closer the detection results are to the actual results. The reconnaissance credibility model is constructed with four parameters: height, terrain complexity, landform complexity, and meteorological obstruction. The calculation formula for the reconnaissance credibility e of a point on the map is:
[0096] e=y4(0.2y1-0.6y2+0.2y3)
[0097] Among them, y1 represents the normalized height of the point, and its value is equal to the grayscale value of the corresponding point in the height map divided by 255. y2 represents the terrain complexity, which includes two parameters: slope θ (the rate of change of surface elevation in a certain direction) and surface cutting depth TCD (the difference between the average elevation and the minimum elevation within the field). The calculation formula is: y3 represents the complexity of the terrain. The smaller its value, the less reliable the reconnaissance results. If the terrain complexity of the swamp is set to 1, the terrain complexity of the flat land and the forest are 0.8 and 0.4 respectively. y4 represents the meteorological obstruction. The meteorological obstruction when there is no obstruction is set to 1, and the meteorological obstruction when there is obstruction is set to 0.7.
[0098] When calculating the reconnaissance credibility at a certain point, first read the value of the corresponding parameter at that point from the relevant grayscale image, then standardize it to the interval [0,1] to obtain y1 to y4 through the above method, and finally calculate the value of e according to the formula.
[0099] (4) Hit probability q in actual situation
[0100] Use e to correct q, and the corrected formula is:
[0101]
[0102] (5) The total number of missiles that the enemy needs to launch, n
[0103] Use multiple Bernoulli trials to get the value of n from the value of q. For each given value of n, perform n Bernoulli trials with a success probability of q. If the result of this round of trials is true (the number of successes is greater than or equal to the value of d, that is, the enemy unit is successfully destroyed), then the current value of n is what is required; otherwise, assign n+1 to n and continue to test the new value of n. Set the initial value of n to d and execute the above process. The final value of n returned is the total number of missiles that the enemy actually needs to launch.
[0104] (6) Training of Multilayer Perceptron Model
[0105] The perceptron model trained by the present invention is not only used to judge the opponent's situation in the system, but also used to verify the credibility of each situation analysis rule. If the trained model performs normally in all error indicators, it means that the situation analysis rules proposed by the present invention are reasonable. In order to verify the rationality of each analysis rule in more detail, a perceptron model is first trained for the reconnaissance credibility e, and after confirming that the model converges, the final multi-layer perceptron model is trained using this model. The entire design process includes the following steps.
[0106] 1. Generate environmental data for training
[0107] Using the method described in the present invention, the project team first generated 50 sets of natural environment images to provide sufficient environmental data. Each set of images contains topographic maps, forest distribution maps, swamp distribution maps, and cloud distribution maps. Figure 4 pictures.
[0108] Next, write a program to randomly select 20 points from each set of images and calculate the relevant parameters at these points as training or test data. Assume that the coordinates of each point in the corresponding image are (x, y). The data set sent to the model for learning contains a total of 1000 samples. Each sample has an example (used to describe the properties of the sample) and a label (recording the e value calculated directly by the formula for the point). The example of each sample is (y1, y2, y 31 ,y 32 ,y 33 ), represents the five attributes of height, terrain complexity, whether it is a forest, whether it is a swamp, and whether it has clouds at (x, y). When the corresponding forest distribution map has forest distribution at (x, y), y 31 The value of y is 1, otherwise it is 0. 32 and 33 The value rule of y 31 Similarly, the label of each sample is the value of the reconnaissance credibility e calculated directly according to the formula at (x, y).
[0109] 2. Train the multi-layer perceptron model for e
[0110] The data set obtained in the previous step is divided into training set and test set in a ratio of 4:1, and trained using the MLPRegressor class in scikit-learn. The number of hidden layers of the multilayer perceptron model is set to 3, and the number of neurons in each layer is 100, 30, and 10 respectively. The final trained model performs well on the test set and can correctly predict the e value of a given point. The training results show that the multilayer perceptron can correctly fit the calculation process set by the project for the reconnaissance credibility e, and the process is sufficiently credible.
[0111] 3. Generate data for training the final model
[0112] The final trained model predicts the total number of missiles n that the enemy needs to launch. Therefore, the parameters used to build the unit models of both sides and the natural environment model will be used. Among them, the parameters for building the unit models of both sides need to be manually input by the user during the actual use of the system, so they are replaced by random numbers within the specified range during the model training process.
[0113] Using the same method, 1000 points are randomly selected from the previous 50 sets of images to form 1000 samples for training the model. Assume that the normalized values of d, R, p, f, and V are ad, aR, ap, af, and aV respectively. Then the example of each sample is (ad, ap, af, aR, av, y1, y2, y 31 ,y 32 ,y 33 ), marked as the value of n calculated directly according to the formula at (x,y).
[0114] 4. Train the final multi-layer perceptron model
[0115] Without changing the parameters of the perceptron, the training is directly conducted on the data set generated in the previous step. The model finally trained performs well on the test set and can correctly predict the e value of a given point. The training results show that the multilayer perceptron can correctly predict the n value of the sample in the test set, and the entire situation analysis rule is credible enough.
[0116] Step 4: Visualize the environmental information. After obtaining the environmental information and processing the data, it is an important task to present the analysis results to the user in a more intuitive form. To facilitate users to use the trained model, the present invention encapsulates the entire process from natural environmental information generation to situation analysis and prediction into one program. Fig.12 and Fig.13 They are the main interface and Load interface of the program respectively.
[0117] Click "Summon" on the main interface to generate and save all natural environment information in one click; click "Load" to analyze the environmental situation for a specific image in the secondary interface. In the Load interface, enter the correct image name to quickly load the image. After setting the parameters of the combat unit, click "Predict" to predict the minimum number of missiles n that the side needs to launch under given conditions with one click, and generate a distribution map of n for the terrain image, such as Fig.14 , Fig.15 and Fig.16 As shown in the figure, the brighter the point, the larger the corresponding n value. Fig.14 , Fig.15 and Fig.16 In the example, the only input parameter is d (3, 8, and 9 respectively), and the resulting distribution of n is also different. Fig.14 , Fig.15 and Fig.16 The top line in English means "the processed image and the marked target point (x, y)".
[0118] The present invention provides a method for visualizing the situation analysis of a virtual environment based on a digital commander. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A virtual environment situation analysis and visualization method based on digital commanders, characterized in that: The following steps are involved: Step 1, determine the parameter type; Step 2: Create and analyze natural environment data; Step 3: Assess the environmental situation; Step 4: Visualize the environmental information.
2. The method according to claim 1, characterized in that: Step 1 includes: using the minimum number of missiles d required to destroy the opponent's unit, the minimum value R of the opponent's firepower strike radius and reconnaissance radius, the opponent's interception probability p of one's own missiles, the opponent's interception frequency f of one's own missiles, the total number of missiles one's own side needs to launch n and the flight speed V of one's own weapons to analyze the units of both sides; using the height y1 of the measured point, the terrain complexity y2 of the measured point, the topography complexity y3 of the measured point, the meteorological obstruction y4 of the measured point, and the reconnaissance credibility e of the measured point to analyze the natural environment.
3. The method according to claim 1, characterized in that Step 2 includes: using the OpenCV platform to generate corresponding grayscale images of terrain, landform, and weather, and further analyzing the generated natural environment information.
4. The method according to claim 3, characterized in that In step 2, the grayscale map includes a topographic map, a landform distribution map and a meteorological condition map; The size of the grayscale image is 100*100 pixels, and each pixel represents 1km 2 area.
5. The method according to claim 4, characterized in that In step 2, the generated natural environment information is further analyzed, specifically including: using Matplotlib to generate a three-dimensional terrain and landform distribution map; using the erosion and expansion algorithms in morphological operations to extract extreme points in the terrain. The formula of the erosion algorithm is: in, represents the erosion operation; F represents the result image after A performs corrosion operation on Y; Y is the given target image; A is the structural element used for the corrosion operation; (x,y) represents the coordinate position in the image; A(x,y) represents the result of translating the structural element A at the (x,y) position of image Y; Use the Sharr operator in OpenCV to process the height map and calculate the gradient to achieve the display of the gentle and steep nature of the terrain; Through the gradient and height information, the areas with high and low passability in the terrain are analyzed and marked in the grayscale map.
6. The method according to claim 5, characterized in that In step 3, integrate the information about the enemy units and the natural environment that has been obtained, and use the following analysis rules to make strategic decisions: Assuming that it takes d missiles to destroy the target unit, the problem is equivalent to finding the total number of missiles n that the team needs to launch so that at least d of the n missiles launched hit the target; Set the minimum value of the opponent's firepower strike radius and reconnaissance radius to R, the interception probability of the own missile to p, the interception frequency to f, the flight speed of the own weapon to V, and the own weapon is intercepted in the cover area. times; without considering environmental factors, when one side launches a missile, the probability q of the other side's firepower attack weapon intercepting the missile is: The reconnaissance credibility e is defined, where e represents the deviation between the reconnaissance result and the actual result. The reconnaissance credibility model is constructed based on four parameters: height, terrain complexity, landform complexity, and meteorological obstruction. The calculation formula for the reconnaissance credibility e of a point X on the map is: e=y4(0.2y1-0.6y2+0.2y3) Among them, the value of y1 is equal to 1 / 255 of the gray value of the measured point in the topographic map; The y2 calculation formula is: Where θ represents the slope, TCD represents the surface cutting depth; y3 represents the landform complexity. If the landform complexity of the swamp is set to 1, the landform complexity of the plain and forest are 0.8 and 0.4 respectively. y4 represents the meteorological obstruction degree, where the meteorological obstruction degree is 1 when there is no obstruction and 0.7 when there is obstruction; Use e to correct the interception probability q, then the corrected interception probability q ′ for:
7. The method according to claim 6, characterized in that In step 3, the analysis and judgment rules are input into a multi-layer perceptron for training to generate an environmental situation assessment model, which specifically includes: Step 3-1, generate two or more sets of grayscale images, each set includes four pictures showing terrain, landforms and meteorological conditions, randomly select a number of points from each set of grayscale images, calculate the parameters at the randomly selected points, and form samples for training or testing; Step 3-2, set the number of hidden layers of the multilayer perceptron model to 3; Step 3-3, divide the sample set obtained in step 3-1 into a training set and a test set in proportion, input the training set into the set perceptron for training, and generate a trained perceptron model; then use the test set to test the performance of the model.
8. The method according to claim 7, characterized in that In step 4, the whole process from natural environment information generation to situation analysis and prediction is encapsulated into a program, including: designing a Summon button on the main interface of the program, which is responsible for generating and saving all natural environment information with one click; designing a Load button on the main interface of the program, which is responsible for popping up a secondary interface to perform environmental situation analysis for a specific image; designing a Load 2D Map button and a Load 3D Map button on the secondary interface of the program, which are responsible for quickly loading the image after entering the specified image name; designing a Predict button on the secondary interface of the program, which is responsible for predicting the minimum number of missiles n that the side needs to launch under given conditions according to the parameters of the units of both sides entered by the user, and generating a distribution map of n for the terrain image.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 8 are executed.