Terrain data processing method, device, equipment and storage medium

The DEM topographic map data is processed through partition compression and preset encoding methods, which solves the problem of large storage space for terrain data and achieves efficient storage and fast loading of data.

CN114596415BActive Publication Date: 2024-08-23GUANGDONG HUITIAN AEROSPACE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210209683.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2024-08-23
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

With the development of geographic data acquisition technology and the improvement of resolution, the amount of grid DEM data is large, resulting in an increase in the local storage space occupied by terrain data, which brings inconvenience to the storage and loading of real-time terrain data.

Method used

Partition compression and preset encoding methods are used to process digital elevation model DEM topographic map data. Feature aggregation and lossy compression planar data are extracted through elevation translation and agglomerative hierarchical clustering algorithms, and are encoded and serialized for storage.

Benefits of technology

It effectively reduces the storage space requirements for terrain data, improves the real-time updating and loading efficiency of data, and at the same time retains the basic characteristics of the original data to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114596415B
    Figure CN114596415B
Patent Text Reader

Abstract

The present application relates to a terrain data processing method, device, equipment and storage medium. The method comprises: obtaining an input digital elevation model (DEM) terrain map data block; partitioning and compressing the elevation data and plane data in the DEM terrain map data block; encoding the elevation data and plane data after partitioning and compression using a preset encoding method to obtain encoded data; serializing the encoded data; associating the serialized encoded data with the DEM terrain map data block and storing them. The technical solution provided by the present application can reduce the local space occupied by terrain data and facilitate loading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital map technology, and in particular to a terrain data processing method, device, equipment and storage medium. Background Art

[0002] Digital Elevation Model (DEM) is an important data information in the three-dimensional geographic information system and the core data for the analysis of three-dimensional terrain features. DEM is also a data set of plane coordinates (X, Y) and elevations (Z) of regular grid points within a certain range. It mainly describes the spatial distribution of regional landforms and is formed by collecting data through contour lines or similar stereo models and then interpolating the data. DEM is a virtual representation of landforms and can derive information such as contour lines and slope maps. Common representations of DEM include grids and irregular triangulated networks. Grid DEM is more common in actual use due to its simple data structure.

[0003] However, with the development of geographic data acquisition technology and the improvement of resolution, the amount of grid DEM data has become larger and larger, resulting in an increasing amount of local storage space occupied by terrain data, which brings inconvenience to related applications such as storage and loading of real-time terrain data. Summary of the invention

[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a terrain data processing method, device, equipment and storage medium, which can reduce the local space occupied by terrain data and facilitate loading.

[0005] The first aspect of the present application provides a terrain data processing method, comprising:

[0006] Get the input digital elevation model DEM topographic map data block;

[0007] Compressing the elevation data and plane data in the DEM topographic map data block by partition;

[0008] The elevation data and plane data after partition compression are encoded by using a preset encoding method to obtain encoded data;

[0009] Serializing the encoded data;

[0010] The serialized encoded data is associated with the DEM topographic map data block and then stored.

[0011] In one embodiment, the partitioning and compressing the elevation data and plane data in the DEM topographic map data block includes: retaining the elevation data in the DEM topographic map data block after performing elevation shifting;

[0012] Extracting plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm;

[0013] The elevation data retained after elevation shifting will be losslessly compressed.

[0014] In one embodiment, the retaining of the elevation data in the DEM topographic map data block after elevation shifting includes:

[0015] The elevation values ​​of the elevation data in the DEM topographic map data block are subtracted from the median elevation value and retained.

[0016] In one embodiment, the extracting of plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm includes:

[0017] An agglomerative hierarchical clustering algorithm is used to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and the extracted plane data is represented by a plane equation containing plane parameters.

[0018] In one embodiment, the agglomerative hierarchical clustering algorithm is used to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and the extracted plane data is represented by a plane equation containing plane parameters, including:

[0019] Dividing the DEM topographic map data block into grid nodes;

[0020] Filter the set nodes through node filtering processing;

[0021] The remaining nodes after filtering are processed by plane fitting to determine the mean square error;

[0022] Node merging is performed using the comparison of mean square error;

[0023] The merged aggregation nodes are extracted as aggregation planes, and are represented by plane equations containing plane parameters, wherein the plane parameters are obtained by plane fitting processing.

[0024] In one embodiment, the elevation data and plane data after partition compression are encoded using a preset encoding method to obtain encoded data, including:

[0025] The elevation data and plane data after partition compression are encoded by using arithmetic coding or Huffman coding to obtain encoded data.

[0026] In one embodiment, the storing of the serialized encoded data after associating it with the DEM topographic map data block comprises:

[0027] The serialized coded data is associated with the ID number and / or longitude and latitude of the DEM topographic map data block and then stored in a database.

[0028] In one embodiment, the method further comprises:

[0029] After retrieving the stored encoded data, loading the encoded data;

[0030] Deserializing the encoded data;

[0031] Decode the deserialized encoded data;

[0032] The decoded coded data is processed for elevation restoration to obtain the restored DEM topographic map data block.

[0033] A second aspect of the present application provides a terrain data processing device, comprising:

[0034] The acquisition module is used to obtain the input digital elevation model DEM topographic map data block;

[0035] A partition compression module is used to partition and compress the elevation data and plane data in the DEM topographic map data block acquired by the acquisition module;

[0036] An encoding module, used for encoding the elevation data and plane data after the partition compression by the partition compression module by using a preset encoding method to obtain encoded data;

[0037] A serialization module, used for serializing the encoded data obtained by the encoding module;

[0038] The storage module is used to associate the coded data serialized by the serialization module with the DEM topographic map data block and store them.

[0039] In one embodiment, the partition compression module includes:

[0040] The first compression processing module is used to retain the elevation data in the DEM topographic map data block after elevation translation, and to perform lossless compression on the elevation data retained after elevation translation;

[0041] The second compression processing module is used to extract plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm.

[0042] In one embodiment, the first compression processing module retains the elevation value of the elevation data in the DEM topographic map data block after subtracting the median elevation value; or,

[0043] The second compression processing module adopts an agglomerative hierarchical clustering algorithm to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and expresses the extracted plane data using a plane equation containing plane parameters.

[0044] In one embodiment, the device further comprises:

[0045] A retrieval module for retrieving stored coded data from a database;

[0046] A loading module, used for loading the coded data after the retrieval module retrieves the stored coded data;

[0047] A deserialization module, used for deserializing the encoded data loaded by the loading module;

[0048] A decoding module, used for decoding the encoded data deserialized by the deserialization module;

[0049] The restoration module is used to perform elevation restoration processing on the encoded data decoded by the decoding module to obtain a restored DEM topographic map data block.

[0050] A third aspect of the present application provides an aircraft, comprising the terrain data processing device as described above.

[0051] A fourth aspect of the present application provides an electronic device, including:

[0052] Processor; and

[0053] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0054] A fifth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.

[0055] The technical solution provided by this application may have the following beneficial effects:

[0056] The technical solution of the present application is that after obtaining the input digital elevation model DEM topographic map data block, the elevation data and plane data in the DEM topographic map data block are partitioned and compressed, and then encoded using a preset encoding method, and then serialized and stored. By adopting the partition compression method, the traditional global mathematical modeling method is no longer used, and encoding is performed, so that compared with the original DEM topographic map data block, the data storage space can be reduced, the data storage pressure is greatly reduced, and it is also conducive to the real-time update and loading of map data.

[0057] Furthermore, by adopting an agglomerative hierarchical clustering algorithm, plane data that has undergone feature aggregation and lossy compression is extracted from the DEM topographic map data block, and the extracted plane data is represented by a plane equation containing plane parameters. In this way, by extracting the data through aggregation surfaces, the planes with less information and greater redundancy in the DEM topographic map data block can be lossily compressed, reducing the amount of data storage, that is, mathematical abstraction can be performed on the plane data with less information and greater redundancy in a targeted manner, and the basic features of the original DEM topographic map data block can be preserved to the greatest extent while refining the information redundancy.

[0058] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0060] Figure 1 is a flow chart of a terrain data processing method shown in an embodiment of the present application;

[0061] Figure 2 is a flow chart of a terrain data processing method according to another embodiment of the present application;

[0062] Figure 3 is a flow chart of a terrain data processing method according to another embodiment of the present application;

[0063] Figure 4 is a schematic diagram of face data features used for aggregation shown in an embodiment of the present application;

[0064] Figure 5 It is a flowchart of extracting a plane using an agglomerative hierarchical clustering algorithm according to an embodiment of the present application;

[0065] Figure 6 It is a schematic diagram of the encoding process shown in the embodiment of the present application;

[0066] Figure 7 is a schematic diagram of the structure of a terrain data processing device shown in an embodiment of the present application;

[0067] Figure 8 is a structural schematic diagram of a terrain data processing device shown in another embodiment of the present application;

[0068] Fig. 9 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The present application provides a terrain data processing method, which can reduce the local space occupied by terrain data and facilitate loading. In order to better understand the technical solution of the present application, the technical solution of the present application is described in detail below in conjunction with the accompanying drawings.

[0070] Figure 1 A schematic flow chart of a terrain data processing method in an embodiment of the present application is shown.

[0071] See also Figure 1 , a terrain data processing method, comprising:

[0072] S11, obtaining an input digital elevation model DEM topographic map data block.

[0073] DEM (Digital Elevation Model) terrain map data blocks may contain elevation data and plane data, among which plane data refers to flat terrain data, and elevation data refers to data with large elevation changes, such as mountains, canyons, etc., which may include step points and lines. In this step, the DEM terrain map data blocks collected by the aircraft can be obtained.

[0074] S12, partitioning and compressing the elevation data and plane data in the DEM topographic map data block.

[0075] In this step, the elevation data in the DEM topographic map data block can be retained after elevation shifting; the plane data for feature aggregation and lossy compression can be extracted from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm; and the elevation data retained after elevation shifting can be losslessly compressed.

[0076] The method comprises: extracting plane data subjected to feature aggregation and lossy compression from the DEM topographic map data block by using an agglomerative hierarchical clustering algorithm, and expressing the extracted plane data by using a plane equation containing plane parameters. The plane parameters may include plane equation coefficients and plane coordinate indexes (spatial coordinate values). If the plane parameters are determined, the plane equation is also determined.

[0077] S13, encoding the elevation data and plane data after partition compression using a preset encoding method to obtain encoded data.

[0078] In this step, the elevation data and plane data after partition compression may be encoded by using arithmetic coding or Huffman coding to obtain encoded data.

[0079] S14. Serialize the encoded data.

[0080] This step can serialize the encoded data to obtain a binary sequence.

[0081] S15, associating the serialized coded data with the DEM topographic map data block and then storing them.

[0082] In this step, the serialized coded data can be associated with the ID number and / or longitude and latitude of the DEM topographic map data block and then stored in the database.

[0083] As can be seen from this example, the technical solution of the present application, after obtaining the input digital elevation model DEM topographic map data block, is to partition and compress the elevation data and plane data in the DEM topographic map data block, and then use the preset encoding method to encode, and then serialize and store. By adopting the partition compression method, the traditional global mathematical modeling method is no longer used, and encoding is performed, so that compared with the original DEM topographic map data block, the data storage space can be reduced, the data storage pressure is greatly reduced, and it is also conducive to the real-time update and loading of map data.

[0084] Figure 2 It is a flowchart of a terrain data processing method shown in another embodiment of the present application.

[0085] See also Figure 2 , a terrain data processing method, comprising:

[0086] S21, obtaining an input digital elevation model DEM topographic map data block;

[0087] For step S21, please refer to the description of step S11, which will not be repeated here.

[0088] S22, retaining the elevation data in the DEM topographic map data block after performing elevation shifting.

[0089] This step can retain the elevation value of the elevation data in the DEM topographic map data block by subtracting the median elevation value. The advantage of elevation translation is that it can make each data in the DEM topographic map data block have a relatively small absolute value, which can effectively reduce the digital overhead in subsequent encoding operations and improve the compression rate.

[0090] S23. Extracting plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm.

[0091] This step can use an agglomerative hierarchical clustering algorithm to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and the extracted plane data is represented by a plane equation containing plane parameters.

[0092] For example, it may include: dividing the DEM topographic map data block into grid nodes; filtering the set nodes through node filtering processing; determining the mean square error of the remaining nodes after filtering through plane fitting processing; merging nodes by comparing the mean square error; extracting the merged aggregated nodes as an aggregated plane, and expressing them with a plane equation containing plane parameters, wherein the plane parameters are obtained through plane fitting processing.

[0093] S24. Losslessly compress the elevation data retained after the elevation shift.

[0094] Lossless compression refers to compression using statistical redundancy of data, which can completely restore the original data without causing any distortion, but the compression rate is theoretically limited by the statistical redundancy of the data, generally 2:1 to 5:1. Lossless compression is generally widely used for compression of text data, programs and image data in special application occasions (such as fingerprint images, medical images, etc.).

[0095] S25, encoding the elevation data and plane data after partition compression using a preset encoding method to obtain encoded data.

[0096] In this step, the elevation data and plane data after partition compression may be encoded by using arithmetic coding or Huffman coding to obtain encoded data.

[0097] S26. Serialize the encoded data.

[0098] This step can serialize the encoded data to obtain a binary sequence.

[0099] S27, associating the serialized coded data with the DEM topographic map data block and storing them.

[0100] In this step, the serialized coded data can be associated with the ID number and / or longitude and latitude of the DEM topographic map data block and then stored in the database.

[0101] From this example, we can see that by using the agglomerative hierarchical clustering algorithm, we can extract the plane data after feature aggregation and lossy compression from the DEM topographic map data block, and express the extracted plane data with the plane equation containing the plane parameters. In this way, by extracting the data through aggregation surface, we can perform lossy compression on the plane with less information and high redundancy in the DEM topographic map data block, thus reducing the amount of data storage. In other words, we can perform mathematical abstraction on the plane data with less information and high redundancy in a targeted manner, and preserve the basic features of the original DEM topographic map data block to the greatest extent while refining the information redundancy.

[0102] Figure 3 It is a flowchart of a terrain data processing method shown in another embodiment of the present application.

[0103] The terrain data processing method provided in the embodiment of the present application is a compression method based on agglomerative hierarchical aggregation. This method does not rely on any prediction model. Through plane aggregation, the method extracts and compresses the plane terrain with less information from the DEM topographic map data block, while retaining the non-plane feature information (such as feature points, lines, etc.); finally, combined with arithmetic coding, the data block is uniformly compressed into a floating point decimal, and serialized into a corresponding binary number and saved locally. Data loading can be performed later, for example, user retrieval can trigger data loading, and loading can be understood as the reverse process of storage.

[0104] See also Figure 3 , a terrain data processing method, comprising:

[0105] S31, obtaining an input digital elevation model DEM topographic map data block.

[0106] The DEM topographic map data block may contain elevation data and plane data, among which plane data refers to flat terrain data, and elevation data refers to data with large elevation changes, such as mountains, canyons and other terrain data, which may include step points and lines. In this step, the DEM topographic map data block collected by the aircraft is obtained.

[0107] S32, retaining the elevation data in the DEM topographic map data block after performing elevation shifting.

[0108] This step can retain the elevation values ​​of the elevation data in the DEM topographic map data block after subtracting the median elevation value.

[0109] Elevation shifting refers to calculating the median value V of the elevation data in the DEM topographic map data block, and subtracting the median value V from the elevation values ​​of all elevation data to achieve the elevation shifting operation. The benefit of elevation shifting is that it can make each data in the DEM topographic map data block have a relatively small absolute value, which can effectively reduce the digital overhead in subsequent encoding operations and improve the compression rate.

[0110] The formula for elevation translation can be referred to as follows:

[0111] E new (i, j) = E old (i, j)-V; i∈[0, W], j∈[0, H]; (1)

[0112] Among them, E old It represents the original elevation data, (i, j) represents the two-dimensional coordinates, and W and H are the physical length and width represented by the DEM topographic map data block.

[0113] S33. Extracting plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm.

[0114] This step can use an agglomerative hierarchical clustering algorithm to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and express the extracted plane data using a plane equation containing plane parameters. For example, it can include: dividing the DEM topographic map data block into grid nodes; filtering the set nodes through node filtering; determining the mean square error of the remaining nodes after filtering through plane fitting; performing node merging processing using comparison of mean square errors; extracting the merged aggregated nodes as an aggregated plane, and expressing it using a plane equation containing plane parameters, wherein the plane parameters are obtained through plane fitting processing.

[0115] In the embodiment of the present application, an agglomerative hierarchical clustering algorithm can be used to perform plane feature aggregation on the associated data in the DEM topographic map data block, such as the associated point cloud data. The purpose of this processing method is to compress the planes that carry less information. Figure 4 As shown, it is the surface data feature used for aggregation. Figure 4 In the left image, 255 represents terrain data, and 0 represents no data; the right image is a simplified representation of the left image, where 2 represents an edge and 1 represents a plane. It should be noted that when the agglomerative hierarchical clustering algorithm is used to extract plane data, the plane fitting actually compresses the nodes on the plane in a lossy manner.

[0116] The agglomerative hierarchical clustering algorithm is used to extract the plane in the DEM topographic map data block. The extracted plane can be expressed by the following plane equation:

[0117] Ax+By+Cz+D=0; (2)

[0118] Among them, A, B, C and D represent the plane equation coefficients, and (x, y, z) represents the three-dimensional spatial coordinate value of the DEM topographic map data block.

[0119] The plane parameters may include the plane equation coefficients and the plane coordinate index (spatial coordinate value). If the plane parameters are determined, the plane equation is also determined.

[0120] By using plane equations to represent a plane, the value of each point in the entire plane can be replaced by saved plane parameters, reducing the redundancy of plane data.

[0121] The process of extracting the plane data after feature aggregation and lossy compression using the agglomerative hierarchical clustering algorithm can be referred to Figure 5 The process is shown.

[0122] See also Figure 5 , Figure 5 A flowchart of extracting a plane using agglomerative hierarchical aggregation method and performing lossy compression on the plane is shown. Figure 5 Included:

[0123] S331, dividing the input DEM topographic map data block into grid nodes, and proceeding to step S332.

[0124] The input data is a DEM topographic map data block, which is generally given in the form of a single-channel raster image, where the size of the raster, that is, the actual physical size of a single pixel in the image, can be set as needed.

[0125] The DEM topographic map data block is divided into N*N grids, where each grid represents a node, each node contains multiple image pixels, and each node is linked to its adjacent nodes by edges.

[0126] S332, perform node filtering on the DEM topographic map data block and proceed to step S333.

[0127] This step filters the set nodes through node filtering, including filtering out some special nodes and corresponding edges in the DEM topographic map data block. For example, nodes that lack some data information (sensor limitations) in the DEM topographic map data block and nodes at the intersection of two planes in the DEM topographic map data block can be filtered out. It is assumed here that each valid node is on a certain plane. For nodes with step points with discontinuous values, the step points can be backed up separately and then removed as plane outliers.

[0128] S333, using plane fitting processing to determine the mean square error (MSE) of each node, removing nodes with too high mean square error, and proceeding to step S334.

[0129] The plane fitting may adopt the least square method but is not limited thereto, and the result output of the plane fitting is the plane equation coefficient of the plane equation.

[0130] S334. Select the node M with the smallest mean square error and proceed to step S335.

[0131] S335, calculate the minimum mean square error of the node M and all adjacent nodes after merging them And choose the smallest mean square error The corresponding neighboring nodes are merged with M (that is, after the merger smallest neighboring node).

[0132] The so-called merging means treating the two nodes as a whole, performing plane fitting on the whole, and then calculating the mean square error.

[0133] S336. Calculate the mean square error corresponding to the merged aggregation node Determine the mean square error corresponding to the aggregation node Is it greater than a preset threshold? If so, proceed to step S337; if not, return to step S334.

[0134] S337. Extract the merged aggregation node as the aggregation plane and proceed to step S338.

[0135] In this step, the merged aggregation nodes are extracted as the aggregation plane, and are represented by a plane equation containing plane parameters, wherein the plane parameters are obtained by plane fitting processing.

[0136] S338. Determine whether there are any unprocessed nodes. If so, return to step S334; if not, go to step S339.

[0137] The remaining unaggregated nodes re-execute the above process until all valid nodes are processed.

[0138] S339. Use a preset optimization method to perform pixel-level optimization on the aggregation node.

[0139] Because many nodes are discarded in S332, a preset optimization method may be used to optimize each aggregation node at the pixel level during the final optimization. For example, each aggregation node may be optimized at the pixel level by filling with an average value or by data fitting.

[0140] It should be noted that when the plane data is extracted from the DEM topographic map data block using the agglomerative hierarchical clustering algorithm in step S33, the plane fitting is actually a lossy compression of the nodes on the plane. Since the amount of elevation information expressed by the plane is relatively small, using this method to perform lossy compression on the plane area is helpful to improve the efficiency of information transmission.

[0141] S34. Losslessly compress the elevation data retained after the elevation shift.

[0142] After the agglomerative hierarchical aggregation, that is, after extracting the plane data from the DEM topographic map data block, the plane part of the entire DEM topographic map data block has been almost extracted, and the remaining are some non-smooth step points, plane boundary lines and other elevation data. In order to further compress the storage space, the remaining step points, boundary lines and other elevation data in the DEM topographic map data block can be losslessly compressed to further reduce the storage volume of subsequent data.

[0143] Lossless data compression refers to the use of compressed data for reconstruction (or restoration, decompression), and the reconstructed data is exactly the same as the original data, but the compression ratio is usually lower than the compression ratio of lossy data compression. Commonly used lossless compression algorithms may include the Huffman algorithm and the LZW (Lenpel-Ziv & Welch) compression algorithm, etc. The embodiments of the present application do not limit the lossless compression algorithm used.

[0144] S35, encoding the elevation data and plane data after partition compression using a preset encoding method to obtain encoded data; and serializing the encoded data.

[0145] After obtaining the elevation data and plane data after partition compression, the data preparation work is completed, and the next step is encoding.

[0146] Regarding encoding, the embodiment of the present application takes into account the priority of storage space and the need for space and speed trade-offs, and can use arithmetic coding with higher encoding efficiency. A whole string of characters is encoded into a floating point number through arithmetic coding, and finally the binary bit stream corresponding to the floating point number is saved to a local file. It should be noted that in addition to arithmetic coding, data encoding can also be replaced by other information encoding methods, such as Huffman coding.

[0147] Arithmetic coding is one of the main algorithms for image compression and is a lossless data compression method. Arithmetic coding directly encodes the entire input message into a number. The working principle of arithmetic coding is that given a set of symbols and symbol probabilities, arithmetic coding can give a near-optimal encoding result. Compression algorithms using arithmetic coding usually estimate the probability of the input symbols before encoding. The more accurate this estimate is, the closer the encoding result is to the optimal result.

[0148] See also Figure 6 , the operation flow of arithmetic coding can be as follows:

[0149] First, convert the image matrix of the DEM topographic map data block into a vector. Count the probability of occurrence of each value, for example, character 1 is 0.2, character 2 and character 3 are also 0.2, and character 4 is 0.4. At the beginning of encoding, the probability space is [0, 1]. When character 1 is encoded first, the probability space will be reduced to the interval of character 1, that is, the interval [0, 0.2]. Then, the probability space is redistributed according to the probability of each character in the reduced interval. By analogy, when the last character is reached, the probability space corresponding to the last character is used as the encoding interval, and a probability close to the upper limit of the interval is selected in the encoding interval as the encoding probability. After obtaining the code length, the encoding probability is converted into a binary sequence of the same length, which is the encoding result, thereby completing the encoding and serialization process.

[0150] S36, associating the encoded and serialized encoded data with the DEM topographic map data block and storing them in a database.

[0151] In this step, the serialized coded data can be associated with the ID number and / or longitude and latitude of the DEM topographic map data block and then stored in the database.

[0152] The embodiment of the present application can use the SQLite database to associate the encoded and serialized binary sequence or binary code stream file with the ID number and / or longitude and latitude of the DEM topographic map data block and store it, so that the loading process can be facilitated to quickly retrieve the target data block through the ID number and longitude and latitude.

[0153] The database can be SQLite database, which is lightweight and fast. Although it is not suitable for high-concurrency and high-traffic applications, it can meet the needs in local stand-alone scenarios. Of course, other types of databases can also be selected according to actual needs, and this application does not make specific restrictions.

[0154] S37. Search the database.

[0155] In the database, the target data block, that is, the encoded data, can be quickly retrieved by setting search conditions such as ID number and longitude and latitude.

[0156] S38. After retrieving the stored encoded data, load the encoded data and deserialize the encoded data.

[0157] Based on the search conditions input by the user, the encoded data matching the search conditions is retrieved from the database, that is, the stored target binary sequence.

[0158] Then, the target binary sequence is deserialized, that is, the target binary sequence (binary encoding sequence) is converted into a floating point number.

[0159] S39, decoding the deserialized encoded data.

[0160] After converting the binary code sequence into floating point numbers, it is decoded according to the decoding method corresponding to the encoding method. The character probability space change sequence stored during the sequential traversal encoding is compared with the restored coding probability, and the character corresponding to the corresponding character probability space is selected. In this way, the original character sequence can be obtained, and the DEM topographic map data block can be obtained to complete the decoding.

[0161] S40, performing elevation restoration processing on the decoded coded data to obtain a restored DEM topographic map data block.

[0162] By restoring the elevation data in the obtained DEM topographic map data block, the original input DEM topographic map data block can be obtained.

[0163] It should be noted that, regarding the processing method of the boundary line in the above-mentioned processing process, the embodiment of the present application adopts a method of directly saving point by point. In order to further improve efficiency, it can also be expressed in the form of line segmentation and straight line fitting. For example: if the boundary points are numerically continuous and the gradient is consistent (the numerical change trend is consistent), then a straight line fitting can be performed, and only the points at both ends and the link relationship between the two points are saved. For boundaries with continuous values ​​but inconsistent gradients, the same fitting can be performed in a segmented manner. For boundaries with discontinuous values, the step point backup and outlier removal (similar to the aggregation surface filtering node) are used to convert to the case of continuous values.

[0164] It can be seen from the above embodiments that the technical solution provided by the embodiment of the present application specifically performs mathematical abstraction on planes with less information and greater redundancy, and preserves the basic characteristics of the original DEM data to the greatest extent while refining the information redundancy. The embodiment of the present application adopts compression coding, which greatly reduces the storage pressure of data compared with the original DEM data, and provides guarantee for the real-time update and loading of the map. The embodiment of the present application also introduces a stand-alone offline database, which can improve the overall robustness and convenience of data retrieval.

[0165] Corresponding to the aforementioned functional method embodiments, the present application provides terrain data processing devices, equipment and corresponding embodiments.

[0166] Figure 7 It is a schematic diagram of the structure of a terrain data processing device shown in an embodiment of the present application.

[0167] See also Figure 7 A terrain data processing device 700 includes: an acquisition module 701, a partition compression module 702, an encoding module 703, a serialization module 704, and a storage module 705.

[0168] The acquisition module 701 is used to acquire the input digital elevation model DEM topographic map data block. The DEM topographic map data block may contain elevation data and plane data, wherein the plane data refers to flat terrain data, and the elevation data refers to data with large elevation changes, such as mountains, canyons and other terrain data, which may include step points and lines.

[0169] The partition compression module 702 is used to partition and compress the elevation data and plane data in the DEM topographic map data block obtained by the acquisition module 701. The partition compression module 702 can retain the elevation data in the DEM topographic map data block after elevation shifting; extract the plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm; and perform lossless compression on the elevation data retained after elevation shifting.

[0170] The encoding module 703 is used to encode the elevation data and plane data compressed by the partition compression module 702 using a preset encoding method to obtain encoded data. The encoding module 703 can encode the elevation data and plane data compressed by the partition by using an arithmetic coding method or a Huffman coding method to obtain encoded data.

[0171] The serialization module 704 is used to serialize the coded data obtained by the coding module 703. The serialization module 704 can serialize the coded data to obtain a binary sequence.

[0172] The storage module 705 is used to associate the coded data serialized by the serialization module 704 with the DEM topographic map data block and store them. The storage module 705 can associate the coded data serialized with the ID number and / or longitude and latitude of the DEM topographic map data block and store them in the database.

[0173] From this example, it can be seen that the terrain data processing device provided by the present application, after obtaining the input digital elevation model DEM terrain map data block, partitions and compresses the elevation data and plane data in the DEM terrain map data block, and then uses the preset encoding method to encode, and then serializes and stores. By adopting the partition compression method, the traditional global mathematical modeling method is no longer used, and encoding is performed, so that compared with the original DEM terrain map data block, the data storage space can be reduced, the data storage pressure is greatly reduced, and it is also conducive to the real-time update and loading of map data.

[0174] Figure 8 is a structural schematic diagram of a terrain data processing device shown in another embodiment of the present application;

[0175] See also Figure 8 A terrain data processing device 800 includes: an acquisition module 701, a partition compression module 702, an encoding module 703, a serialization module 704, a storage module 705, a retrieval module 706, a loading module 707, a deserialization module 708, a decoding module 709, and a restoration module 710.

[0176] The functions of the acquisition module 701, the partition compression module 702, the encoding module 703, the serialization module 704, and the storage module 705 are shown in FIG. Figure 7 The relevant description in will not be repeated here.

[0177] The partition compression module 702 may include: a first compression processing module 7021 and a second compression processing module 7022 .

[0178] The first compression processing module 7021 is used to retain the elevation data in the DEM topographic map data block after elevation shifting, and to perform lossless compression on the elevation data retained after elevation shifting;

[0179] The second compression processing module 7022 is used to extract plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm.

[0180] The first compression processing module 7021 retains the elevation value of the elevation data in the DEM topographic map data block after subtracting the median elevation value; or,

[0181] The second compression processing module 7022 uses an agglomerative hierarchical clustering algorithm to extract plane data that has undergone feature aggregation and lossy compression from the DEM topographic map data block, and represents the extracted plane data using a plane equation containing plane parameters.

[0182] The second compression processing module 7022 can divide the DEM topographic map data block into grid nodes; filter the set nodes through node filtering processing; determine the mean square error of the remaining nodes after filtering through plane fitting processing; perform node merging processing by comparing the mean square error; extract the merged aggregation nodes as the aggregation plane, and express them using a plane equation containing plane parameters, wherein the plane parameters are obtained through plane fitting processing.

[0183] The retrieval module 706 is used to retrieve the stored coded data from the database.

[0184] The loading module 707 is used to load the coded data after the retrieval module 706 retrieves the stored coded data.

[0185] The deserialization module 708 is used to deserialize the encoded data loaded by the loading module 707 .

[0186] The decoding module 709 is used to decode the encoded data deserialized by the deserialization module 708 .

[0187] The restoration module 710 is used to perform elevation restoration processing on the coded data decoded by the decoding module 709 to obtain a restored DEM topographic map data block.

[0188] It can be seen from this example that the terrain data processing device provided by the present application, by adopting an agglomerative hierarchical clustering algorithm, extracts plane data that has undergone feature aggregation and lossy compression from a DEM topographic map data block, and represents the extracted plane data using a plane equation containing plane parameters. In this way, by extracting the data through aggregation surfaces, the planes with less information and greater redundancy in the DEM topographic map data block can be lossily compressed, reducing the amount of data storage, that is, mathematical abstraction can be performed on the plane data with less information and greater redundancy in a targeted manner, and the basic features of the original DEM topographic map data block can be preserved to the greatest extent while refining the information redundancy.

[0189] Regarding the device in the above embodiment, the specific manner in which each module and unit performs operations has been described in detail in the method embodiment corresponding to the device, and will not be elaborated again here.

[0190] Fig. 9 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0191] See also Fig. 9 , the electronic device 1000 includes a processor 1100 and a memory 1200 .

[0192] The processor 1100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0193] The memory 1200 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1100 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1200 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. The memory 1200 stores executable codes, and when the executable codes are processed by the processor 1100 , the processor 1100 can execute part or all of the methods described above.

[0194] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0195] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0196] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A terrain data processing method, characterized in that: include: Get the input digital elevation model DEM topographic map data block; The elevation data and plane data in the DEM topographic map data block are compressed by partition, including: retaining the elevation data in the DEM topographic map data block after elevation shifting; extracting plane data for feature aggregation and lossy compression from the DEM topographic map data block by using an agglomerative hierarchical clustering algorithm; and losslessly compressing the elevation data retained after elevation shifting; The elevation data and plane data after partition compression are encoded by using a preset encoding method to obtain encoded data; Serializing the encoded data; Associating the serialized encoded data with the DEM topographic map data block and storing them; The method comprises: dividing the DEM topographic map data block into grid nodes; filtering the set nodes by node filtering; determining the mean square error of the remaining nodes after filtering by plane fitting; merging nodes by comparing the mean square error; extracting the merged aggregated nodes as the aggregated plane, and expressing them by plane equations containing plane parameters, wherein the plane parameters are obtained by plane fitting.

2. The method according to claim 1, characterized in that The step of performing elevation shifting on the elevation data in the DEM topographic map data block and retaining the elevation data includes: The elevation values ​​of the elevation data in the DEM topographic map data block are subtracted from the median elevation value and retained.

3. The method according to claim 1, characterized in that The elevation data and plane data after partition compression are encoded using a preset encoding method to obtain encoded data, including: The elevation data and plane data after partition compression are encoded by using arithmetic coding or Huffman coding to obtain encoded data.

4. The method according to claim 1, characterized in that: The step of associating the serialized encoded data with the DEM topographic map data block and storing the data block comprises: The serialized coded data is associated with the ID number and / or longitude and latitude of the DEM topographic map data block and then stored in a database.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After retrieving the stored encoded data, loading the encoded data; Deserializing the encoded data; Decode the deserialized encoded data; The decoded coded data is processed for elevation restoration to obtain the restored DEM topographic map data block.

6. A terrain data processing device, characterized in that: include: The acquisition module is used to obtain the input digital elevation model DEM topographic map data block; A partition compression module is used to partition and compress the elevation data and plane data in the DEM topographic map data block acquired by the acquisition module; An encoding module, used for encoding the elevation data and plane data after the partition compression by the partition compression module by using a preset encoding method to obtain encoded data; A serialization module, used for serializing the encoded data obtained by the encoding module; A storage module, used for associating the encoded data serialized by the serialization module with the DEM topographic map data block and storing the data; Among them, the partition compression module includes: a first compression processing module, which is used to retain the elevation data in the DEM topographic map data block after elevation translation, and to perform lossless compression on the elevation data retained after elevation translation; a second compression processing module, which is used to extract plane data for feature aggregation and lossy compression from the DEM topographic map data block using an agglomerative hierarchical clustering algorithm, including: dividing the DEM topographic map data block into grid nodes; filtering the set nodes through node filtering processing; determining the mean square error of the remaining nodes after filtering by plane fitting processing; performing node merging processing by comparing the mean square error; extracting the merged aggregated nodes as an aggregated plane, and expressing them using a plane equation containing plane parameters, wherein the plane parameters are obtained through plane fitting processing.

7. The device according to claim 6, characterized in that: The first compression processing module subtracts the median value of the elevation value from the elevation value of the elevation data in the DEM topographic map data block and retains the result.

8. The device according to any one of claims 6 to 7, characterized in that The device also includes: A retrieval module for retrieving stored coded data from a database; A loading module, used for loading the coded data after the retrieval module retrieves the stored coded data; A deserialization module, used for deserializing the encoded data loaded by the loading module; A decoding module, used for decoding the encoded data deserialized by the deserialization module; The restoration module is used to perform elevation restoration processing on the encoded data decoded by the decoding module to obtain a restored DEM topographic map data block.

9. An aircraft, characterized in that: The method comprises a terrain data processing device as claimed in any one of claims 6 to 8.

10. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 5.

11. A computer-readable storage medium having executable codes stored thereon, and when the executable codes are executed by a processor of an electronic device, the processor is caused to execute the method according to any one of claims 1 to 5.