A terrain elevation data service method based on ELM
By training the terrain elevation data service using a machine learning method based on ML-RBF-ELM, the problem of high-resolution DEM memory consumption was solved, achieving efficient storage and computation, and improving the performance and real-time performance of the simulation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2023-06-08
- Publication Date
- 2026-06-19
AI Technical Summary
High-resolution terrain elevation models (DEMs) consume a large amount of memory in simulation systems, affecting system performance and real-time performance. Traditional machine learning methods cannot effectively fit and improve accuracy, and have low computational efficiency.
Employing a machine learning approach based on ML-RBF-ELM, an ELM-fitted model is trained and its parameters are saved to replace high-resolution DEM data, enabling the storage and computation of elevation data and supporting concurrent access by multi-node simulation systems.
It saves memory space, improves data loading efficiency, reduces data transmission costs between simulation nodes, and enhances the performance of the simulation system.
Smart Images

Figure CN116797749B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terrain elevation modeling and simulation technology, and more specifically, to a terrain elevation data service method based on ELM. Background Technology
[0002] Terrain environment modeling and simulation are crucial components of the modeling and simulation field. Terrain environment modeling and simulation can be applied to combat simulation, UAV / unmanned vehicle simulation training, GIS systems, and more. The terrain environment includes environmental elements such as landforms, hydrology, and roads. In simulation systems, the terrain environment can interact with personnel and vehicles, providing terrain environment characteristic information such as elevation, slope, aspect, and slope change rate to relevant simulation entities. A Digital Elevation Model (DEM) is a physical ground model that represents ground elevation information in the mathematical form of an ordered numerical array; that is, it is a collection of surface elevation information within a region, mathematically expressed as z = f(x, y). DEMs are stored in a raster data structure, meaning a two-dimensional regular raster covers the terrain space. Each cell in the raster corresponds to a terrain area. In the mathematical expression, (x, y) are the coordinates of the cell, and z is the cell value representing the elevation value of the corresponding area. The smaller the cells in the raster, the higher the resolution of the DEM, the more accurate the described terrain elevation, and the better the simulation system's performance. However, high-resolution DEMs require significant memory for storage, and their loading time impacts the real-time performance of the simulation system. In distributed simulation systems with multiple nodes, the transmission time of large amounts of DEM data is also a crucial factor affecting system performance. Furthermore, when high-resolution DEM data is unavailable, various interpolation methods are required to obtain the elevation values of desired points; the lower the resolution, the greater the computational error introduced by the interpolation methods.
[0003] Based on machine learning techniques used in regression prediction, DEMs can be fitted by calculating regression models instead of querying memory data, thus saving significant memory space. Traditional feedforward artificial neural networks and support vector machines for regression cannot achieve higher or comparable fitting accuracy to interpolation methods when fitting DEMs, and the training time increases with the amount of input data. Extreme Learning Machines (ELMs) are a type of machine learning method based on feedforward neural networks. Compared to basic feedforward neural networks, ELMs are simpler in structure, faster in learning, and have stronger generalization capabilities, and are currently widely used in regression problems in earth sciences and environmental sciences. ML-RBF-ELM adds two hidden layers to a single-layer neural network and uses the RBF function as the activation function, achieving higher DEM data fitting accuracy while retaining the fast training speed. Therefore, by fitting DEM data with ML-RBF-ELM and saving the trained regression model parameters, DEM data storage is realized, which can save a lot of memory space, save data loading and scheduling time, reduce the transmission cost of DEM data between multiple simulation nodes, and improve the performance of the simulation system.
[0004] In China, the application of terrain elevation data is mainly reflected in rendering and visualization, and there is a lack of research on the calculation and storage of large amounts of terrain elevation data in simulation systems.
[0005] To address this, an ELM-based method for providing terrain elevation data is proposed. Summary of the Invention
[0006] The present invention aims to provide an ELM-based terrain elevation data service method to solve or improve at least one of the above-mentioned technical problems.
[0007] In view of this, a first aspect of the present invention is to provide a terrain elevation data service method based on ELM.
[0008] The first aspect of the present invention provides a terrain elevation data service method based on ELM, comprising the following steps: S1, obtaining elevation values and longitude and latitude values from an original terrain elevation data file stored in raster form, and performing normalization processing to create a dataset containing the longitude, latitude, and elevation values corresponding to all raster pixels; S2, designing an ELM structure for calculating and outputting the longitude and latitude of raster pixels as the elevation corresponding to that raster pixel; S3, training the ELM structure using the dataset to obtain the parameters of each layer of the ELM structure corresponding to different raster files, and then converting the ELM... The structure, parameters of each layer, elevation values, and their corresponding longitude and latitude information, along with normalized parameters, are collectively used as the ELM fitting model and saved. S4: Load the ELM fitting model and obtain the longitude and latitude range of the currently required terrain. Set the parameters of the ELM fitting model within the current longitude and latitude range to obtain the instantiated ELM fitting model corresponding to that range. S5: Assemble the instantiated ELM fitting models into terrain elevation data service nodes. Receive elevation data requests from entity nodes within the current longitude and latitude range via the RP interface, calculate and send the required elevation values to the entity nodes.
[0009] In addition, the technical solutions provided by embodiments of the present invention may also have the following additional technical features:
[0010] In any of the above technical solutions, step S1 includes: S101, reading all raster files of the original terrain elevation data, obtaining the pixel size, the longitude and latitude coordinates of the upper left corner, the pixel resolution in the NS direction and the pixel resolution in the WE direction for each raster, and calculating the longitude and latitude coordinates of the lower right corner to obtain the longitude and latitude coordinate set of the raster file; S102, reading the elevation values of the raster file, creating an array of size equal to the pixel size to store the elevation values; S103, obtaining the maximum and minimum elevations in the array of elevation values; S104, normalizing the longitude, latitude and elevation respectively, and constructing a dataset together.
[0011] In any of the above technical solutions, the ELM structure includes: an input layer, a first hidden layer, a first intermediate vector, a second hidden layer, a second intermediate vector, a third hidden layer, and an output layer; the input layer is used to input normalized longitude and latitude; the first hidden layer is used to output a first intermediate vector with the same magnitude as the input longitude and latitude; the second hidden layer is used to calculate and output a second intermediate vector based on the first intermediate vector; the third hidden layer is used to calculate and output normalized elevation based on the second intermediate vector and pass it to the output layer; the output layer is used to output the elevation to the outside.
[0012] In any of the above technical solutions, step S2 includes: S201, taking the ELM structure including an input layer, a first hidden layer, and an output layer as the basis and adding a second hidden layer and a third hidden layer, as well as a first intermediate vector and a second intermediate vector for intermediate calculation of the hidden layers; S202, configuring the first hidden layer, the second hidden layer, and the third hidden layer to use the RBF function as the activation function; wherein, the first hidden layer contains K1 RBF neurons, the second hidden layer contains K2 RBF neurons, and the third hidden layer contains K3 RBF neurons.
[0013] In any of the above technical solutions, the parameters of each layer structure, the corresponding information of elevation values and latitude / longitude, and the normalized parameters are packaged together as a fitting model index file. This file is used to obtain the corresponding normalized parameters, elevation values and corresponding information of latitude / longitude, and parameters of each layer structure according to different longitude and latitude ranges, so as to transform the ELM fitting model into an instantiated ELM fitting model required for the current longitude and latitude range; and the RBF function is:
[0014] in, The output of the k-th neuron in the p-th hidden layer, x (m) For the m-th input data in the dataset, and The parameters contained in the k-th neuron of the p-th hidden layer, x m ||·|| represents the Euclidean norm of the vector, M is the size of the input dataset, and R... N Let be an N-dimensional real space, exp(*) be an exponential function, and K be the total number of neurons.
[0015] In any of the above technical solutions, step S3 includes: S301, initializing the ELM structure parameters, and setting the sizes of K1, K2, and K3 according to the size of the dataset; S302, clustering the input dataset, setting the parameters of the RBF activation functions of K1 neurons in the first hidden layer, and calculating the output matrix H1 and output weight matrix C1 of the first hidden layer; S303, calculating the first intermediate vector output by the first hidden layer based on the calculation result of step S302; S304, clustering the set of the first intermediate vectors obtained in S303, and setting the K2 in the second hidden layer... S305: Calculate the second intermediate vector output by the second hidden layer based on the calculation results of step S304; S306: Cluster the set of second intermediate vectors obtained in S305, set the parameters of the RBF activation functions of the K3 neurons in the third hidden layer, and calculate the output matrix H3 and output weight matrix C3 of the third hidden layer; S307: Save the parameters of the RBF activation functions of K1, K2, K3, and K1 neurons in the first hidden layer from S301 respectively. The parameters of the RBF activation function for the K2 neurons in the second hidden layer The parameters of the RBF activation function for the K3 neurons in the third hidden layer C1, C2, and C3, along with the corresponding information of elevation values, latitude and longitude, and normalized parameters, are packaged together as a fitting model index file; S308, the fitting model index file and the ELM structure are saved together as an ELM fitting model; wherein... K1, K2, and K3 are the parameters of each RBF activation function, respectively. K1, K2, and K3 are the number of RBF neurons in the three hidden layers, and k1, k2, and k3 are the indices of each RBF neuron in each hidden layer.
[0016] In any of the above technical solutions, step S4 includes: S401, the terrain elevation data service node selects the corresponding parameters from the fitting model index file according to the current longitude and latitude range; S402, the ELM structure is parameter-set according to the selected parameters to obtain the instantiated ELM fitting model required for the current longitude and latitude range.
[0017] In any of the above technical solutions, step S5 includes: S501, the terrain elevation data service node selects an instantiated ELM fitting model to serve the elevation data request of the entity node within the current longitude and latitude range; S502, the terrain elevation data service node receives an RPC request from an entity node and determines whether the number of currently running calculation threads is less than the maximum number of threads. If so, a calculation thread is created and S503 is performed; otherwise, the RPC request is stored in the pending RPC request queue and S504 is performed; S503, the longitude and latitude parameters of the target point location in the received RPC request are normalized and input into the instantiated ELM fitting model to obtain the normalized elevation value. Then, the elevation value of the target point is obtained through inverse normalization calculation and sent to the entity node; S504, the terrain elevation data service node creates threads to process the RPC requests in the pending RPC request queue in sequence. When all RPC requests are processed, the terrain elevation data service node sends a processing completion command to the entity node and returns to S502.
[0018] In any of the above technical solutions, the inverse normalization is calculated using the following formula: data(i) = data'(i) × (max(data) - min(data)) + min(data); where data(i) represents the longitude, latitude, or elevation value, min(data) represents the minimum data value, max(data) represents the maximum data value, and data'(i) represents the normalized longitude, latitude, or elevation value.
[0019] The beneficial effects of this invention compared to the prior art are as follows:
[0020] The ELM machine learning method is employed, where an ELM fitting model is trained to fit the terrain data within a region, and the terrain data is stored by saving the parameters of the ELM fitting model. The method for establishing the terrain database involves storing the longitude, latitude, and elevation values of each pixel in the terrain data file; this addresses the issue of large amounts of terrain elevation data consuming memory during simulation runtime.
[0021] The network structure and training process of the ELM fitting model are presented, and the machine learning method based on ELM for data fitting is applied to the field of terrain elevation data fitting, thereby freeing up memory space and improving data loading efficiency.
[0022] Based on the trained ELM fitting model, a database is established to store terrain data. For example, previously 100MB of space was needed to store terrain data for a certain range, and the elevation value was retrieved from the database when needed. Now, only tens of KB of space are needed to store model parameters, and the elevation value is calculated from the model when needed, thus reducing the memory usage of each simulation node during simulation.
[0023] Using the RPC method can receive concurrent access requests from multiple nodes, and can also support concurrent access requests from multiple simulation nodes to terrain elevation data, providing a new approach for simulation entities to obtain terrain elevation.
[0024] Additional aspects and advantages of embodiments of the invention will become apparent in the following description or may be learned by practice of embodiments of the invention. Attached Figure Description
[0025] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0026] Figure 1 This is a block diagram of the method logic of the present invention;
[0027] Figure 2 This is a schematic diagram of the elevation data stored in the grid format according to the present invention;
[0028] Figure 3 This is a schematic diagram of the ElM structure of the present invention;
[0029] Figure 4 This is a data service flowchart of the present invention;
[0030] Figure 5 This is a flowchart of the ELM fitting model training process of the present invention. Detailed Implementation
[0031] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0032] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0033] Please see Figure 1-5 The following describes an ELM-based terrain elevation data service method according to some embodiments of the present invention.
[0034] An embodiment of the first aspect of the present invention proposes a terrain elevation data service method based on ELM. In some embodiments of the present invention, such as Figure 1-5 As shown, an ELM-based terrain elevation data service method is provided, which includes:
[0035] The data storage section includes the following steps:
[0036] Step 1: Read the raw terrain elevation data stored in raster format, as shown in the diagram. Figure 2 As shown, relevant information about terrain elevation is obtained, including the raster latitude and longitude range, raster data pixel size, and terrain elevation values. A two-dimensional array is created to store the elevation values. The two-dimensional array index corresponds to (longitude, latitude) coordinates. This allows us to obtain the latitude and longitude coordinates and their corresponding elevation value for each raster. Then, the original elevation data is normalized to construct a terrain elevation dataset for training the ELM fitting model.
[0037] Specific steps:
[0038] Step 101: Read the raster file storing the original terrain elevation data using the open-source GDAL library. Obtain the pixel dimensions (width × height) of the raster file, obtain the longitude and latitude coordinates (minLon, maxLat) of the top-left corner of the raster file, and obtain the pixel resolution in the NS direction of the raster file. n-s WE direction pixel resolution w-e The latitude and longitude coordinates (maxLon, minLat) of the lower right corner of the raster file are calculated using the formula. Therefore, the set of representable latitude and longitude coordinates (lon, lat) of the raster file is {(lon, lat)|lon∈[minLon, maxLon], lat∈[minLat, maxLat]}.
[0039]
[0040] Step 102: Using the API provided by the open-source GDAL library for reading raster images, obtain the elevation data stored in the raster file, and create a `data` array of size `width×height` to store the elevation data values. Store the elevation data in the raster in left-to-right and top-to-bottom order. Treat the elevation data values as the latitude and longitude of the raster center. Each element `data[row][col]` in the `data` array corresponds to each raster and also corresponds to the latitude and longitude of the raster center.
[0041] The correspondence between the index [row][col] and the raster latitude and longitude coordinates (lon,lat) is shown in the formula.
[0042]
[0043] in, col∈[0,height-1].
[0044] Step 103: Traverse the elevation array to obtain the maximum elevation (maxHeight) and minimum elevation (minHeight). Normalize the longitude, latitude, and elevation values using formulas.
[0045]
[0046] Where data(i) represents the longitude, latitude, or elevation value, min(data) represents the minimum data value, max(data) represents the maximum data value, and data'(i) represents the normalized longitude, latitude, or elevation value.
[0047] Step 104: Construct a dataset using the normalized latitude, longitude, and elevation values. The dataset is represented as S = {(x...} (m) ,y (m) )|x (m) ∈R 2 ,y (m) ∈R 1 {m = 1, ..., M}, where M represents the size of the dataset, i.e., the number of samples. Represents normalized longitude and latitude, y (m) This represents the normalized elevation value.
[0048] Step 2: Design the ELM structure. RBF is used as the activation function. Based on a conventional single-layer ELM, two hidden layers are added to improve the fitting accuracy for large amounts of terrain elevation data. This ELM structure includes an input layer, hidden layer 1, intermediate vector 1, hidden layer 2, intermediate vector 2, hidden layer 3, and an output layer, as shown below. Figure 3 As shown. The input layer size is 2, representing the normalized longitude and latitude;
[0049] Among them, ELM Extreme Learning Machine, RBF Radial Basis Function, and the two added hidden layers are the first hidden layer and the third hidden layer;
[0050] Hidden layer 1 is designed as an ELM-based autoencoder, an unsupervised network that generates an output variable of the same size as the input vector, i.e., intermediate vector 1. This is used to give the input variable (normalized latitude and longitude) greater weight in rugged terrain areas than in flat areas.
[0051] Hidden layers 2 and 3 are designed as conventional single-layer ELMs. The intermediate vector 2 has a magnitude of 1, and after passing through hidden layer 3, it yields the normalized elevation, which is the output layer. The ELM structure diagram is shown below. Figure 3 As shown.
[0052] Specific steps:
[0053] Step 201: The activation function for each hidden layer of ELM is the RBF function. The RBF function is shown in the formula.
[0054]
[0055] Where, φ k x represents the output of the k-th neuron in the hidden layer. m For the m-th input data in the dataset, β k and α k Let ||·|| be the parameters contained in the k-th neuron, and ||·|| denote the Euclidean norm of the vector.
[0056] Set, β k and α k The steps are as follows: Input data set {x (m) |x (m) ∈R N Let the sample be a subset of a class, m = 1, ..., M, with size M and K neurons in the hidden layer. The K-means clustering algorithm is used to divide the sample into K classes, and the k-th cluster set is defined. Calculate the mean of the data set. variance n k The size of the set, The k-th neuron
[0057] Step 202: The design of each layer is as follows: The input layer size is 2, and {x1,x2} corresponds to the normalized longitude and latitude;
[0058] Hidden layer 1 acts as an ELM-based autoencoder, producing an output vector of the same size as the input vector. It contains K1 RBF neurons, with one neuron having a value of 1 to indicate bias. The intermediate vector 1 is a weighted sum of the values of all neurons in hidden layer 1. The result of the weight calculation (representing the weights between each neuron and the intermediate vector 1) has a size of 2;
[0059] Hidden layer 2 is a conventional neural network layer containing K2 RBF neurons, with one neuron having a value of 1 to indicate bias; the intermediate vector 2 is the weighted result of the calculation of each neuron in hidden layer 2, with a size of 1;
[0060] Hidden layer 3 is a standard neural network layer containing K3 RBF neurons, with one neuron having a value of 1 to indicate bias; the output layer represents the normalized elevation values. K1, K2, and K3 are adjusted according to the size of the training dataset.
[0061] Step 3: Train ELM. Use the normalized longitude and latitude values from the training set built in Step 1 as the input layer vector, and the corresponding normalized elevation values as the output layer vector;
[0062] The input layer samples are clustered using the K-means clustering method. The parameters of the RBF activation function in hidden layer 1 are set, and the output matrix and output weight matrix of hidden layer 1 are calculated. The intermediate vector 1 is then calculated.
[0063] The K-means clustering method is used to cluster the intermediate vector 1, and the parameters of the RBF activation function of hidden layer 2 are set. The output matrix and output weight matrix of hidden layer 2 are calculated.
[0064] Calculate the intermediate vector 2;
[0065] K-means clustering is used to cluster the intermediate vectors 2, and the parameters of the RBF activation function in hidden layer 3 are set. The output matrix and output weight matrix of hidden layer 3 are calculated based on the output layer vectors. The ELM training flowchart is as follows. Figure 5 As shown.
[0066] The meanings of the output matrix and the output weight matrix are as follows:
[0067] If hidden layer i contains K i There are RBF neurons, 1 neuron with a value of 1, and the input data set is {x}. (m) |x (m) ∈R N If the expression is given by {m=1,…M}, then its output matrix is:
[0068]
[0069] The output size of the connection in hidden layer i is L. The connection weights between each neuron in the hidden layer and the output form the output weight matrix, as follows:
[0070]
[0071] Specific steps:
[0072] Step 301: Initialize the ELM structure parameters and set the sizes of K1, K2 and K3 according to the size of the dataset.
[0073] Step 302: Based on step 201, cluster the input sample set and set the parameters of the RBF activation function for the K1 neurons of hidden layer 1.
[0074] Step 303: Calculate the output matrix H1 of hidden layer 1 according to the formula. The calculation method for the output weight matrix C1 is as follows: Where λ is a parameter, set to 0.2, X = (x (1) ,…,x (M) ) T The size of X is M×2, the size of the output matrix H1 is M×(K1+1), and the size of the output weight matrix C1 is (K1+1)×2.
[0075] Step 304: Calculate intermediate vector 1, X' = H1C1, with a size of M×2.
[0076] Step 305: Following the method in step 201, cluster the set of intermediate vectors 1 and set the parameters of the RBF activation function for the K2 neurons in hidden layer 2.
[0077] Step 306: Calculate the output matrix C2 of hidden layer 2 according to the formula. The method for calculating the output weight matrix is as follows: Where λ is a parameter, set to 0.2, T = (y (1) ,…,y (M) ) T The size of T is M×1, the size of the output matrix H2 is M×(K2+1), and the size of the output weight matrix C2 is (K2+1)×1.
[0078] Step 307: Calculate intermediate vector 2, T' = H2C2, with a size of M×1.
[0079] Step 308: Following the method in step 201, cluster the intermediate vector 2 set and set the parameters of the RBF activation function for the K3 neurons in the hidden layer 3.
[0080] Step 309: Calculate the output matrix H3 of hidden layer 3 according to the formula. The calculation method for the output weight matrix C3 is as follows: Where λ is a parameter, set to 0.2, T = (y (1) ,…,y (M) ) T The size of T is M×1, the size of the output matrix H3 is M×(K3+1), and the size of the output weight matrix C3 is (K3+1)×1.
[0081] Step 4: Save the trained ELM model. Save the network structure parameters of the ELM model, the activation function parameters of each hidden layer, and the weight parameters between hidden layers. Save the latitude and longitude range information corresponding to the elevation data. Save the dataset normalization parameters.
[0082] Specific steps:
[0083] Step 401: Save the parameters shown in Table 1 to a file with the file index name minLon-maxLon-minLat-maxLat.
[0084] Table 1: Parameters to be saved
[0085]
[0086]
[0087] The overall data service process is as follows: Figure 4 As shown, the main steps include:
[0088] Step 1: Before starting the simulation, load the ELM fitting model. Based on the terrain latitude and longitude range required for the current simulation, read the corresponding fitting model file. Read the dataset normalization parameters to support subsequent normalization and denormalization calculations. Read the fitting model parameters and restore the fitting model.
[0089] Specific steps:
[0090] Step 501: Before the simulation begins, the terrain elevation data service node obtains the area range of this simulation task from the simulation master control node, and reads the corresponding fitting model file according to the fitting model file index.
[0091] Step 502: Read the parameters of the fitted model file saved in Step 401: minimum and maximum latitude values, minimum and maximum longitude values, and minimum and maximum elevation values. These will be used as parameters for subsequent data normalization and denormalization. The normalization formula is shown in the formula below, and the denormalization formula is also shown in the formula below.
[0092] data(i)=data'(i)×(max(data)-min(data))+min(data)(7)
[0093] Where data(i) represents the longitude, latitude, or elevation value, min(data) represents the minimum data value, max(data) represents the maximum data value, and data'(i) represents the normalized longitude, latitude, or elevation value.
[0094] The input data for the ELM fitting model needs to be normalized, and the output data needs to be inversely normalized.
[0095] Step 503: Read the parameters of the fitted model file saved in Step 401: the number of RBF neurons in each hidden layer, the RBF neuron parameters of hidden layer 1, hidden layer 2, hidden layer 3, and the output weight matrix of each hidden layer. Instantiate the fitted model and load the fitted model parameters into the instantiated model.
[0096] Step 2: Terrain and Elevation Data Service Flow During Simulation Run. During simulation run, at each simulation moment, the terrain and elevation data service node receives elevation data requests from other simulation entity nodes through the Remote Procedure Call (RPC) interface, then starts a calculation thread, calls the ELM fitting model, performs calculations, and returns the required elevation values for the corresponding simulation entity.
[0097] Specific steps:
[0098] Step 601: During a simulation frame, the terrain elevation data service node receives an RPC request from a simulated entity. The RPC interface design is shown in Table 2. After receiving the RPC request, if the number of currently running computation threads is less than the maximum number of threads, the data service node creates a computation thread; otherwise, it stores the RPC request in the pending RPC request queue.
[0099] Table 2 RPC Interface Parameter Design
[0100]
[0101] Step 602: Within the calculation thread, first, the latitude and longitude of the received target point are normalized. Then, the fitting model is called, and the normalized latitude and longitude are used as input. After the fitting model calculates, the normalized elevation value is obtained. The normalized elevation value is then denormalized to obtain the elevation value of the target point. This value is returned to the corresponding simulation entity through the RPC interface, and the calculation thread is destroyed.
[0102] Step 603: The data service node creates threads to process the RPC requests in the queue of unprocessed RPC requests in turn. After all RPC requests have been processed, the data service node sends a command to the simulation control node that the data processing of the current simulation frame is complete, and waits to receive the RPC request of the next simulation frame.
[0103] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this invention, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0104] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. An ELM-based topographic elevation data service method, characterized by, Includes the following steps: S1: Obtain elevation and longitude / latitude values from the original terrain elevation data file stored in raster form, perform normalization processing, and create a dataset containing the longitude, latitude, and elevation values corresponding to all raster pixels. S2 is an ELM structure designed to calculate and output the longitude and latitude of a raster cell as the elevation corresponding to that raster cell. S3, Train the ELM structure using the dataset to obtain the parameters of each layer of the ELM structure corresponding to different raster files. Combine the ELM structure, the parameters of each layer, the corresponding information of elevation values, longitude and latitude, and the normalized parameters as the ELM fitting model and save it. S4, Load the ELM fitting model and obtain the longitude and latitude range of the required terrain. Set the parameters of the ELM fitting model under the current longitude and latitude range to obtain the instantiated ELM fitting model corresponding to the longitude and latitude range. S5, the instantiated ELM fitting model is used to form a terrain elevation data service node, which receives elevation data requests from entity nodes within the current longitude and latitude range through the RP interface, calculates and sends the required elevation values to the entity nodes. 2.The ELM-based terrain elevation data service method of claim 1, wherein, The steps in S1 include: S101: Read all raster files of the original terrain elevation data, obtain the pixel size, latitude and longitude coordinates of the upper left corner, pixel resolution in the NS direction and pixel resolution in the WE direction for each raster, and calculate the latitude and longitude coordinates of the lower right corner to obtain the set of latitude and longitude coordinates of the raster file. S102, Read the elevation values of the raster file and create an array of size equal to the pixel size to store the elevation values; S103, retrieve the maximum and minimum elevations from the array of elevation values; S104 normalizes longitude, latitude, and elevation respectively, and then constructs a dataset together. 3.The ELM-based terrain elevation data service method of claim 1, wherein, The ELM structure includes: an input layer, a first hidden layer, a first intermediate vector, a second hidden layer, a second intermediate vector, a third hidden layer, and an output layer; The input layer is used to input normalized longitude and latitude. The first hidden layer is used to output a first intermediate vector with the same longitude and latitude as the input; The second hidden layer is used to calculate and output the second intermediate vector based on the first intermediate vector. The third hidden layer is used to calculate the output normalized elevation based on the second intermediate vector and pass it to the output layer; The output layer is used to output elevation data to the outside. 4.The ELM-based terrain elevation data service method of claim 3, wherein, Step S2 includes: S201, taking the ELM structure including the input layer, the first hidden layer and the output layer as the basis, and adding the second hidden layer and the third hidden layer, as well as the first intermediate vector and the second intermediate vector for the intermediate calculation of the hidden layer; S202, configure the first hidden layer, the second hidden layer, and the third hidden layer to use the RBF function as the activation function; The first hidden layer contains K1 RBF neurons, the second hidden layer contains K2 RBF neurons, and the third hidden layer contains K3 RBF neurons.
5. The ELM-based topographic elevation data service method of claim 4, wherein, The parameters of each layer, the corresponding information of elevation values and latitude / longitude, and the normalized parameters are packaged together as a fitting model index file. This file is used to obtain the corresponding normalized parameters, elevation values and latitude / longitude, and parameters of each layer according to different longitude and latitude ranges, so as to transform the ELM fitting model into an instantiated ELM fitting model required for the current longitude and latitude range; and the RBF function is: in, The output of the k-th neuron in the p-th hidden layer, x (m) For the m-th input data in the dataset, and The parameters contained in the k-th neuron of the p-th hidden layer, x m ||·|| represents the Euclidean norm of the vector, M is the size of the input dataset, and R... N Let be an N-dimensional real space, exp(*) be an exponential function, and K be the total number of neurons.
6. The ELM-based topographic elevation data service method of claim 5, wherein, The steps in S3 include: S301, Initialize the ELM structure parameters, and set the sizes of K1, K2 and K3 according to the size of the dataset; S302, cluster the input dataset, set the parameters of the RBF activation function of the K1 neurons in the first hidden layer, and calculate the output matrix H1 and output weight matrix C1 of the first hidden layer; S303, Calculate the first intermediate vector output by the first hidden layer based on the calculation result of step S302; S304, cluster the set of first intermediate vectors obtained in S303, set the parameters of the RBF activation function of K2 neurons in the second hidden layer, and calculate the output matrix H2 and output weight matrix C2 of the second hidden layer; S305, Calculate the second intermediate vector output by the second hidden layer based on the calculation result of step S304; S306, cluster the set of second intermediate vectors obtained in S305, set the parameters of the RBF activation function of K3 neurons in the third hidden layer, and calculate the output matrix H3 and output weight matrix C3 of the third hidden layer. S307 stores the parameters of the RBF activation functions of neurons K1, K2, K3, and K1 in the first hidden layer from S301. The parameters of the RBF activation function for the K2 neurons in the second hidden layer The parameters of the RBF activation function for the K3 neurons in the third hidden layer C1, C2, and C3, along with the corresponding information of elevation values, latitude and longitude, and normalized parameters, are packaged together as a fitting model index file; S308, Save the fitting model index file and the ELM structure together as the ELM fitting model; in, K1, K2, and K3 are the parameters of each RBF activation function, respectively. K1, K2, and K3 are the number of RBF neurons in the three hidden layers, and k1, k2, and k3 are the indices of each RBF neuron in each hidden layer.
7. The terrain elevation data service method based on ELM according to claim 5, characterized in that, The steps in S4 include: S401, the terrain elevation data service node selects the corresponding parameters from the fitting model index file based on the current longitude and latitude range; S402 sets the parameters of the ELM structure according to the selected parameters to obtain the instantiated ELM fitting model required for the current longitude and latitude range.
8. The ELM-based topographic elevation data service method of claim 1, wherein, The steps in S5 include: S501, the terrain elevation data service node selects an instantiated ELM fitting model to serve the elevation data requests of the entity node within the current longitude and latitude range; S502, the terrain elevation data service node receives an RPC request from a certain entity node and determines whether the number of currently running computing threads is less than the maximum number of threads. If so, a computing thread is created and S503 is performed; otherwise, the RPC request is stored in the pending RPC request queue and S504 is performed. S503: Normalize the longitude and latitude parameters of the target point location in the received RPC request and input them into the instantiated ELM fitting model to obtain the normalized elevation value. Then, calculate the elevation value of the target point location through inverse normalization and send it to the entity node. S504: The terrain elevation data service node creates threads to process the RPC requests in the queue of pending RPC requests in turn. After all RPC requests have been processed, the terrain elevation data service node sends a processing completion command to the entity node and returns to S502. 9.The ELM-based terrain elevation data service method of claim 8, wherein, The inverse normalization is calculated using the following formula: data(i)=data'(i)×(max(data)-min(data))+min(data); Where data(i) represents the longitude, latitude, or elevation value, min(data) represents the minimum data value, max(data) represents the maximum data value, and data'(i) represents the normalized longitude, latitude, or elevation value.