Geographic Information Grid Coding Method, Device and Equipment Based on Adaptive Segmentation

By generating a global index table through adaptive segmentation and matrix encoding, the high encoding complexity and redundancy of existing geographic grid encoding methods in high-dimensional space and spatiotemporal indexes are solved, achieving efficient and accurate indexing and querying.

CN118260371BActive Publication Date: 2026-06-30NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2024-04-12
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing geographic grid coding methods have high computational complexity when dealing with high-dimensional space and spatiotemporal indexes, making it impossible to achieve efficient indexing and querying. Furthermore, they have high coding redundancy in non-uniform spaces, which reduces indexing efficiency.

Method used

An adaptive segmentation method is adopted to adaptively segment the geographic region, calculate the difference degree and segmentation factor, generate a global index table using matrix encoding, perform planar and height non-uniform segmentation, and generate a two-dimensional vector grid encoding result.

Benefits of technology

It improves the efficiency and accuracy of geographic information indexing, reduces coding redundancy, and is suitable for processing unevenly distributed real-world data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118260371B_ABST
    Figure CN118260371B_ABST
Patent Text Reader

Abstract

This application relates to a geographic information gridding coding method, apparatus, and device based on adaptive segmentation. The method includes: adaptively segmenting a geographic region; determining whether further segmentation is needed based on the degree of difference and segmentation factors; and outputting all segmentation results when the current segmentation level reaches the maximum segmentation level; drawing a global index table of all segmentation results using matrix encoding; performing planar grid coding on the sub-block images of each level of adaptive segmentation according to the global index table to obtain planar grid coding results; performing height-non-uniform segmentation of the geographic region; performing height-grid coding on the height segmentation results to obtain height-grid coding results; and combining the planar grid coding results and the height-grid coding results into a two-dimensional vector, where the two-dimensional vector represents the grid coding result of the geographic region. This method can improve the efficiency of geographic information indexing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geographic information technology, and in particular to a geographic information grid coding method, apparatus and equipment based on adaptive segmentation. Background Technology

[0002] Geogrid coding is a major foundational technology system developed for big data construction and application. It is widely used in the field of spatial information and location services, bringing significant benefits to various industries such as high-precision location services, the Internet of Things, smart cities, precision agriculture, and mass consumer applications. Geogrid coding converts a string of geographic location information into a string of numbers that computers can recognize, thereby facilitating the unified modeling, storage, and computation of geographic data. Currently, grid coding methods mainly focus on two research directions: coordinate coding and filled curve coding methods.

[0003] Coordinate encoding is the simplest grid encoding method. Its basic idea is to define grid coordinate axes based on grid spatial partitioning, and use grid coordinates and hierarchical identifiers to represent the grid encoding. This method is highly efficient for computationally dealing with neighborhood cells, but it does not achieve dimensionality reduction for high-dimensional spaces, resulting in high encoding computational complexity. It cannot convert high-dimensional spatial or spatiotemporal indexes into one-dimensional encoded indexes, hindering efficient data indexing and querying operations. Space-filling curves are functions that map points in multidimensional space to points on a one-dimensional curve. This function defines a path that traverses the entire space without intersections or overlaps, dividing the data space into uniformly sized, non-overlapping grid partitions. Z-curves and Hilbert curves are the most commonly used. These curves each have their advantages and disadvantages, and they are all single-scale and lack multi-level characteristics, only suitable for uniformly distributed target spaces. However, data distribution in real-world spaces often exhibits significant spatial variability. Using these curves to fill non-uniform spaces typically generates substantial encoding redundancy, reducing indexing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a geographic information gridding coding method, apparatus, and device based on adaptive segmentation that can improve the efficiency of geographic information indexing, addressing the aforementioned technical problems.

[0005] A geographic information gridding coding method based on adaptive segmentation, the method comprising:

[0006] Obtain the geographic region to be encoded; set the geographic region to be encoded as a square region, and calculate the maximum number of divisions of the square region based on the preset minimum division length;

[0007] Adaptively segment a geographical area, calculate the difference degree and segmentation factor of all sub-block images at the current segmentation level, determine whether further segmentation is needed based on the difference degree and segmentation factor, and output all segmentation results when the current segmentation level reaches the maximum segmentation level;

[0008] Use matrix encoding to draw the global index table of all segmentation results, and perform plane grid encoding on the sub-block images of each level of adaptive segmentation according to the global index table to obtain the plane grid encoding results;

[0009] Perform highly non-uniform segmentation on the geographical area, with each segmentation performed in a 1:2 ratio. When all sub-block images in the current height segmentation level are not greater than a pre-set height threshold, output the height segmentation results; perform height grid encoding on the height segmentation results to obtain the height grid encoding results;

[0010] Combine the plane grid encoding results and the height grid encoding results into a two-dimensional vector, which is the grid encoding result of the geographical area.

[0011] In one embodiment, calculating the maximum segmentation level of a square area according to a pre-set minimum segmentation length includes:

[0012] Calculating the maximum segmentation level of a square area according to a pre-set minimum segmentation length as

[0013]

[0014] where, cd ∈ [10, 20] represents the minimum segmentation length, W represents the side length of the square area, and [] represents the rounding operation.

[0015] In one embodiment, adaptively segmenting a geographical area, calculating the difference degree and segmentation factor of all sub-block images at the current segmentation level, determining whether further segmentation is needed based on the difference degree and segmentation factor, and outputting all segmentation results when the current segmentation level reaches the maximum segmentation level includes:

[0016] S1.1: Let the segmentation level n = 1, segment the geographical area F(x, y) into 4×4 sub-blocks with equal area, and record them in the "bow" order as M = {m|m = 1, …, 16};

[0017] S1.2: Analyze all sub-block images f(x, y) at the current segmentation level, calculate the difference degree and segmentation factor of all sub-block images at the current segmentation level. If the segmentation factor Qs = 1, the current sub-block image f(x, y) needs to be further segmented; if Qs = 0, no further segmentation is required;

[0018] S1.3: Perform segmentation at level n+1 based on the segmentation factor Qs. For all sub-block images f(x,y) in the current segmentation level where the segmentation factor Qs equals 1, segment them into 4×4 sub-blocks of equal area, denoted as M={m1m2…m ... n |m i =1,…,16; i=1,…,n};

[0019] S1.4: Let n = n + 1; if n < Num, go to S1.2, otherwise end the splitting and output all splitting results.

[0020] In one embodiment, the difference and segmentation factor of all sub-block images in the current segmentation level are calculated, including:

[0021] Calculate the difference Ps and segmentation factor Qs of all sub-blocks in the current segmentation level.

[0022]

[0023] Where f(x,y) represents the sub-block image, and G1 is a 16×16 Gaussian template. ε1 is the convolution operator, ε1∈[1,10] is a pre-defined parameter, sum is the summation operator, ε2∈[0.01,0.1] is a pre-defined parameter, and psum(·) is the number of pixels in the sub-block image.

[0024] In one embodiment, a global index table of all segmentation results is drawn according to matrix encoding, including:

[0025] S2.1: Divide the image F(x,y) into 4 equal parts. Num-1 ×4 Num-1 Sub-block image, defined as F(x,y) as a 4 Num-1 ×4 Num-1 The matrix is ​​such that each element is a sub-block image, and each sub-block image has a two-dimensional matrix coordinate (i,j). Converting the two-dimensional coordinates (i,j) into one-dimensional coordinates A in left-to-right, top-to-bottom order, we get A = (i-1) × 4. Num-1 +j,

[0026] S2.2: Each sub-block image is further divided into 4×4 segments and sorted in a "bow" shape to obtain an internal sequence number B;

[0027] S2.3: Define the index value C of the sub-image obtained after the two rounds of segmentation S2.1 and S2.2 as...

[0028] C = (A-1)×32 + B×2.

[0029] In one embodiment, planar grid coding is performed on the sub-block images of each level of adaptive segmentation according to the global index table to obtain the planar grid coding result, including:

[0030] The adaptively segmented sub-block image is compared with the global index table. If the adaptively segmented sub-block image is completely equal to one of the sub-block images in the global index table, then the index value C of the sub-block image in the global index table is used as the grid coding result of the adaptively segmented sub-block image. If the adaptively segmented sub-block image contains several sub-block images in the global index table, then the average of the index values ​​C of these several sub-block images is used as the grid coding result of the adaptively segmented sub-block image.

[0031] In one embodiment, the geographic region is segmented non-uniformly at a height, with each segmentation performed at a 1:2 ratio. The height segmentation result is output when all sub-blocks in the current height segmentation level are no larger than a preset height threshold, including:

[0032] S3.1: Let the height division number u = 1, and divide the entire height H into segments at a ratio of 1:2. Then the height range of the upper sub-blocks is... The height range of the following sub-blocks is

[0033] S3.2 Analyze all sub-blocks in the current height segmentation level. If the height of the current sub-block image is greater than the preset height threshold ε3, further segmentation is required; otherwise, no further segmentation is required.

[0034] S3.3 Let u = u + 1. For the sub-blocks in the current height segmentation number that need to be further segmented, segment them according to a ratio of 1:2. After the segmentation is completed, go to S3.2. When all sub-block images no longer need to be segmented, the height segmentation ends and the height segmentation result is output.

[0035] In one embodiment, the height segmentation result is subjected to height grid encoding to obtain a height grid encoded result, including:

[0036] S4.1: Start encoding from the maximum height segment number u, and encode each sub-block image in a top-to-bottom order, that is, the first sub-block is recorded as 1, the second sub-block is recorded as 2, and so on.

[0037] S4.2: When the current encoding sequence number reaches t, let u = u-1, and encode the current height segment number u. If the sub-block image has already been encoded, skip it and encode the remaining sub-blocks from top to bottom. That is, the first sub-block is recorded as t+1, the second sub-block is recorded as t+2, and so on.

[0038] S4.3: When u = 1, the encoding ends and the height encoding result is output; otherwise, proceed to step S4.2.

[0039] A geographic information gridding encoding device based on adaptive segmentation, the device comprising:

[0040] The maximum number of cuts calculation module is used to obtain the geographic region to be encoded; the geographic region to be encoded is set as a square region, and the maximum number of cuts of the square region is calculated according to the preset minimum cut length;

[0041] The adaptive segmentation module is used to adaptively segment the geographic region. It calculates the difference and segmentation factor of all sub-block images in the current segmentation level, determines whether to continue segmenting based on the difference and segmentation factor, and outputs all segmentation results when the current segmentation level reaches the maximum segmentation level.

[0042] The planar mesh coding module is used to draw a global index table of all segmentation results using matrix coding. Based on the global index table, planar mesh coding is performed on the sub-block images of each level of adaptive segmentation to obtain the planar mesh coding results.

[0043] The height grid coding module is used to perform height non-uniform segmentation of the geographic region. Each segmentation is performed at a ratio of 1:2. When all sub-blocks in the current height segmentation level are not larger than a preset height threshold, the height segmentation result is output. The height segmentation result is then subjected to height grid coding to obtain the height grid coding result.

[0044] The encoding result composition module is used to combine the planar grid encoding results and the height grid encoding results into a two-dimensional vector, which is the grid encoding result of the geographic region.

[0045] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0046] Obtain the geographic region to be encoded; set the geographic region to be encoded as a square region, and calculate the maximum number of divisions of the square region based on the preset minimum division length;

[0047] Adaptive segmentation of the geographic region is performed, the difference and segmentation factor of all sub-block images in the current segmentation level are calculated, and it is determined whether further segmentation is needed based on the difference and segmentation factor. When the current segmentation level reaches the maximum segmentation level, all segmentation results are output.

[0048] A global index table of all segmentation results is drawn using matrix encoding. Based on the global index table, planar grid encoding is performed on the sub-block images of each level of adaptive segmentation to obtain the planar grid encoding results.

[0049] Perform a highly non-uniform segmentation of the geographical area, with each segmentation being performed in a 1:2 ratio. When all sub-block images in the current height segmentation level do not exceed a pre-set height threshold, output the height segmentation result; perform height grid coding on the height segmentation result to obtain the height grid coding result;

[0050] Combine the planar grid coding result and the height grid coding result into a two-dimensional vector, which is the grid coding result of the geographical area.

[0051] The above-mentioned geographical information grid coding method, device and equipment based on adaptive segmentation. In this application, the planar area is adaptively segmented to obtain a non-uniform segmentation result, and a global index table of all possible segmentation results is made. According to the global index table, each level of sub-images obtained by adaptive segmentation is respectively subjected to planar grid coding to obtain the result of one-dimensional planar grid coding; then the height is non-uniformly segmented and coded starting from the maximum segmentation level to obtain the result of one-dimensional height grid coding; the planar grid coding and the height grid coding are combined into a two-dimensional vector, which is the result of the entire grid coding. Compared with the prior art, this application is more suitable for actual data with non-uniform distribution, has a lower redundancy and higher accuracy in the coding method, and has good practical value in the field of geographical information science. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic flowchart of a geographical information grid coding method based on adaptive segmentation in an embodiment;

[0053] Figure 2 It is a schematic diagram of grid coding in the order of the character "bow" in an embodiment;

[0054] Figure 3 It is a schematic diagram of grid coding after secondary segmentation in an embodiment;

[0055] Figure 4 It is a schematic diagram of a possible segmentation result after tertiary segmentation in another embodiment;

[0056] Figure 5 It is a schematic diagram of one-dimensional coordinates in an embodiment;

[0057] Figure 6 It is a structural block diagram of a geographical information grid coding device based on adaptive segmentation in an embodiment;

[0058] Figure 7 It is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] In one embodiment, such as Figure 1 As shown, a geographic information gridding coding method based on adaptive segmentation is provided, including the following steps:

[0061] Step 102: Obtain the geographic region to be encoded; set the geographic region to be encoded as a square region, and calculate the maximum number of segments of the square region based on the preset minimum segmentation length.

[0062] Obtain the geographic region to be encoded. If the geographic region to be encoded is not a square region, expand it outward to obtain a square region, denoted as F(x,y), with a region size of W×W, which facilitates subsequent adaptive segmentation.

[0063] Step 104: Perform adaptive segmentation on the geographic region, calculate the difference and segmentation factor of all sub-block images in the current segmentation level, determine whether further segmentation is needed based on the difference and segmentation factor, and output all segmentation results when the current segmentation level reaches the maximum segmentation level.

[0064] To adaptively segment the geographical region, first let the segmentation number n = 1, and then divide F(x,y) into 4×4 sub-blocks of equal area, such as... Figure 2 As shown, following the "bow" shape, we denote them as M = {m | m = 1, ..., 16}. We calculate the difference and segmentation factor of all sub-block images in the current segmentation level. If the segmentation factor Qs = 1, the current sub-block image f(x,y) needs to be segmented further; if Qs = 0, no further segmentation is needed. We then perform segmentation at level n+1 based on the segmentation factor Qs. We segment all sub-block images f(x,y) in the current segmentation level where the segmentation factor Qs equals 1, dividing them into 4×4 sub-blocks of equal area, denoted as M = {m1m2...m ... n |m i =1,…,16; i=1,…,n}; For example, if the sub-block image with the first segmentation index 2 is judged and can be further segmented, then the segmented sub-image is as follows: Figure 3 As shown; let n = n + 1, continue the segmentation, and end the segmentation when the current segmentation level reaches the maximum segmentation level, outputting all segmentation results. Assume the maximum segmentation level is 3. Figure 4 As shown, a possible segmentation result is given.

[0065] After segmentation, each sub-block image obtains an encoding M = {m1m2…m n|m i =1,…,16; i=1,…,n}, but this grid encoding has inconsistent lengths for each segmentation level and high redundancy, which is not conducive to practical applications. These sub-block images need to be re-encoded.

[0066] Step 106: Draw a global index table of all segmentation results using matrix encoding. Based on the global index table, perform planar grid encoding on the sub-block images of each level of adaptive segmentation to obtain the planar grid encoding results.

[0067] This application uses matrix encoding to draw a global index table of all segmentation results, dividing the image F(x,y) into 4 equal areas. Num-1 ×4 Num-1 Sub-image, that is, treating F(x,y) as a 4 Num-1 ×4 Num-1 Given a matrix, where each element is a sub-image and each sub-image has two-dimensional coordinates (i,j), converting the two-dimensional coordinates (i,j) into one-dimensional coordinates A in a left-to-right, top-to-bottom order, then A = (i-1) × 4. Num-1 +j, such as Figure 5 As shown. Each sub-image is further divided into 4×4 sections and sorted in a "bow" shape to obtain an internal index B, as shown. Figure 2 As shown, the index value of the sub-block image is calculated using one-dimensional coordinates and internal indices. Based on the index values ​​of all sub-block images, a global index table for all segmentation results can be constructed. The global index table is used to encode each level of sub-image in the adaptive segmentation. Encoding the unevenly distributed actual data through the global index table enables indexers to quickly find the corresponding geographic information using the index value, thus improving the indexing efficiency and accuracy of geographic information.

[0068] Step 108: Perform height non-uniform segmentation on the geographic region. Each segmentation is performed at a ratio of 1:2. When all sub-block images in the current height segmentation level are not greater than a preset height threshold, output the height segmentation result. Perform height grid encoding on the height segmentation result to obtain the height grid encoding result.

[0069] Let the height division number u = 1, and divide the entire height H into segments at a ratio of 1:2. This means the height range of the sub-blocks mentioned above is... The height range of the following sub-blocks is Analyze all sub-blocks in the current height segmentation level to determine whether the current sub-block image needs further segmentation. The specific method is as follows: if the height of the sub-block image is greater than the preset height threshold ε3, further segmentation is required; otherwise, no further segmentation is needed. When all sub-block images no longer need segmentation, the height segmentation ends. Let u = u + 1, and for the sub-blocks in the current height segmentation level that need further segmentation, segment them according to a 1:2 ratio. When all sub-block images in the current height segmentation level are not greater than the preset height threshold, output the height segmentation. As a result, the height segmentation results are then subjected to height grid encoding. Encoding begins with the maximum height segmentation level u, and each sub-block is encoded in a top-down order, i.e., the first sub-block is denoted as 1, the second sub-block as 2, and so on. When the current encoding sequence number reaches t, u = u-1, and the current height segmentation level u is encoded. If the image of that sub-block has already been encoded, it is skipped, and the remaining sub-blocks are encoded in a top-down order, i.e., the first sub-block is denoted as t+1, the second sub-block as t+2, and so on. Encoding ends when u = 1. The height encoding method of this application can greatly reduce the redundancy of spatial encoding and achieve high accuracy.

[0070] Step 110: Combine the planar grid coding results and the height grid coding results into a two-dimensional vector, which represents the grid coding results of the geographic region.

[0071] In the aforementioned adaptive segmentation-based geographic information gridding coding method, this application adaptively segments the planar region to obtain uneven segmentation results, creating a global index table of all possible segmentation results. Based on this global index table, each level of the adaptively segmented sub-image is individually coded using planar grids to obtain a one-dimensional planar grid code. Then, the height is non-uniformly segmented, and coding begins from the maximum segmentation level to obtain a one-dimensional height grid code. The planar grid code and the height grid code are combined into a two-dimensional vector, which represents the overall grid coding result. Compared to existing technologies, this application is more suitable for unevenly distributed real-world data, exhibits lower redundancy in its coding method, and achieves higher accuracy, demonstrating significant practical value in the field of geographic information science.

[0072] In one embodiment, calculating the maximum number of divisions for the square region based on a pre-set minimum division length includes:

[0073] The maximum number of divisions for the square region is calculated based on the preset minimum division length.

[0074]

[0075] Where cd∈[10,20] represents the minimum segmentation length, W represents the side length of the square region, and [] represents the rounding operation.

[0076] In a specific embodiment, the minimum segmentation length is set to cd ∈ [10, 20], and the 4×4 method is used for segmentation. Then Num can be calculated as the integer part of

[0077] In one embodiment, the geographical area is adaptively segmented. The difference degree and segmentation factor of all sub-block images in the current segmentation level are calculated. It is determined whether further segmentation is required based on the difference degree and segmentation factor. When the current segmentation level reaches the maximum segmentation level, all segmentation results are output, including:

[0078] S1.1: Let the segmentation level n = 1. The geographical area F(x, y) is segmented into 4×4 sub-blocks with equal areas, which are respectively denoted as M = {m|m = 1, …, 16} in the "bow" order;

[0079] S1.2: Analyze all sub-block images f(x, y) in the current segmentation level, calculate the difference degree and segmentation factor of all sub-block images in the current segmentation level. If the segmentation factor Qs = 1, the current sub-block image f(x, y) needs to be further segmented; if Qs = 0, no further segmentation is required;

[0080] S1.3: Perform the (n + 1)-level segmentation according to the segmentation factor Qs. Segment all sub-block images f(x, y) with the segmentation factor Qs equal to 1 in the current segmentation level into 4×4 sub-blocks with equal areas, which are respectively denoted as M = {m1m2…m n |m i = 1, …, 16; i = 1, …, n};

[0081] S1.4: Let n = n + 1; when n < Num, transfer to S1.2, otherwise end the segmentation and output all segmentation results.

[0082] In one embodiment, calculating the difference degree and segmentation factor of all sub-block images in the current segmentation level includes:

[0083] Calculating the difference degree Ps and segmentation factor Qs of all sub-block images in the current segmentation level as

[0084]

[0085] where f(x, y) represents the sub-block image, G1 is a 16×16 Gaussian template, is a convolution operator, ε1 ∈ [1, 10] is a pre-set parameter, sum is a summation operator, ε2 ∈ [0.01, 0.1] is a pre-set parameter, and psum(·) is the number of pixels of the sub-block image.

[0086] In one embodiment, a global index table of all segmentation results is drawn according to matrix encoding, including:

[0087] S2.1: Divide the image F(x,y) into 4 equal parts. Num-1 ×4 Num-1 Sub-block image, defined as F(x,y) as a 4 Num-1 ×4 Num-1 The matrix is ​​such that each element is a sub-block image, and each sub-block image has a two-dimensional matrix coordinate (i,j). Converting the two-dimensional coordinates (i,j) into one-dimensional coordinates A in left-to-right, top-to-bottom order, we get A = (i-1) × 4. Num-1 +j,

[0088] S2.2: Each sub-block image is further divided into 4×4 segments and sorted in a "bow" shape to obtain an internal sequence number B;

[0089] S2.3: Define the index value C of the sub-image obtained after the two rounds of segmentation S2.1 and S2.2 as...

[0090] C = (A-1)×32 + B×2.

[0091] In one embodiment, planar grid coding is performed on the sub-block images of each level of adaptive segmentation according to the global index table to obtain the planar grid coding result, including:

[0092] The adaptively segmented sub-block image is compared with the global index table. If the adaptively segmented sub-block image is completely equal to one of the sub-block images in the global index table, then the index value C of the sub-block image in the global index table is used as the grid coding result of the adaptively segmented sub-block image. If the adaptively segmented sub-block image contains several sub-block images in the global index table, then the average of the index values ​​C of these several sub-block images is used as the grid coding result of the adaptively segmented sub-block image.

[0093] In one embodiment, the geographic region is segmented non-uniformly at a height, with each segmentation performed at a 1:2 ratio. The height segmentation result is output when all sub-blocks in the current height segmentation level are no larger than a preset height threshold, including:

[0094] S3.1: Let the height division number u = 1, and divide the entire height H into segments at a ratio of 1:2. Then the height range of the upper sub-blocks is... The height range of the following sub-blocks is

[0095] S3.2 Analyze all sub-blocks in the current height segmentation level. If the height of the current sub-block image is greater than the preset height threshold ε3, further segmentation is required; otherwise, no further segmentation is required.

[0096] S3.3 Let u = u + 1. For the sub-blocks in the current height segmentation number that need to be further segmented, segment them according to a ratio of 1:2. After the segmentation is completed, go to S3.2. When all sub-block images no longer need to be segmented, the height segmentation ends and the height segmentation result is output.

[0097] In one embodiment, the height segmentation result is subjected to height grid encoding to obtain a height grid encoded result, including:

[0098] S4.1: Start encoding from the maximum height segment number u, and encode each sub-block image in a top-to-bottom order, that is, the first sub-block is recorded as 1, the second sub-block is recorded as 2, and so on.

[0099] S4.2: When the current encoding sequence number reaches t, let u = u-1, and encode the current height segment number u. If the sub-block image has already been encoded, skip it and encode the remaining sub-blocks from top to bottom. That is, the first sub-block is recorded as t+1, the second sub-block is recorded as t+2, and so on.

[0100] S4.3: When u = 1, the encoding ends and the height encoding result is output; otherwise, proceed to step S4.2.

[0101] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Furthermore, Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0102] In one embodiment, such as Figure 6 As shown, a geographic information gridding coding device based on adaptive segmentation is provided, including: a maximum segmentation level calculation module 602, an adaptive segmentation module 604, a planar grid coding module 606, a height grid coding module 608, and a coding result composition module 610, wherein:

[0103] The maximum number of cuts calculation module 602 is used to obtain the geographic region to be encoded; set the geographic region to be encoded as a square region, and calculate the maximum number of cuts of the square region according to the preset minimum cut length;

[0104] The adaptive segmentation module 604 is used to adaptively segment the geographic region, calculate the difference and segmentation factor of all sub-block images in the current segmentation level, determine whether to continue segmentation based on the difference and segmentation factor, and output all segmentation results when the current segmentation level reaches the maximum segmentation level.

[0105] The planar mesh coding module 606 is used to draw a global index table of all segmentation results using matrix coding, and to perform planar mesh coding on the sub-block images of each level of adaptive segmentation according to the global index table to obtain the planar mesh coding result.

[0106] The height grid coding module 608 is used to perform height non-uniform segmentation of the geographic region. Each segmentation is performed at a ratio of 1:2. When all sub-block images in the current height segmentation level are not larger than a preset height threshold, the height segmentation result is output. The height segmentation result is then subjected to height grid coding to obtain the height grid coding result.

[0107] The encoding result composition module 610 is used to combine the planar grid encoding result and the height grid encoding result into a two-dimensional vector, which is the grid encoding result of the geographic region.

[0108] Specific limitations regarding the adaptive segmentation-based geographic information gridding coding device can be found in the limitations of the adaptive segmentation-based geographic information gridding coding method described above, and will not be repeated here. Each module in the aforementioned adaptive segmentation-based geographic information gridding coding device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0109] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a geographic information gridding coding method based on adaptive segmentation. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0110] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A geographic information gridding coding method based on adaptive segmentation, characterized in that, The method includes: Obtain the geographical area to be encoded; set the geographical area to be encoded as a square area, and calculate the maximum number of splitting levels of the square area according to a preset minimum splitting length; Perform adaptive splitting on the geographical area, calculate the difference degree and splitting factor of all sub-block images in the current splitting level, judge whether further splitting is needed according to the difference degree and splitting factor, and output all splitting results when the current splitting level reaches the maximum number of splitting levels; Draw a global index table of all the splitting results by means of matrix encoding, and perform plane grid encoding on the sub-block images of each level of adaptive splitting according to the global index table to obtain plane grid encoding results; Perform highly non-uniform splitting on the geographical area, and perform splitting in a ratio of 1:2 each time. When all the sub-block images in the current height splitting level are not greater than a preset height threshold, output the height splitting results; perform height grid encoding on the height splitting results to obtain height grid encoding results; Combine the plane grid encoding results and the height grid encoding results into a two-dimensional vector, and the two-dimensional vector is the grid encoding result of the geographical area.

2. The method according to claim 1, characterized in that, Calculating the maximum number of splitting levels of the square area according to a preset minimum splitting length includes: Calculating the maximum number of splitting levels of the square area according to a preset minimum splitting length as where cd ∈ [10, 20] represents the minimum splitting length, W represents the side length of the square area, and [] represents the rounding operation.

3. The method according to claim 1, characterized in that, Performing adaptive splitting on the geographical area, calculating the difference degree and splitting factor of all sub-block images in the current splitting level, judging whether further splitting is needed according to the difference degree and splitting factor, and outputting all splitting results when the current splitting level reaches the maximum number of splitting levels includes: S1.1: Let the splitting level n = 1, split the geographical area F(x, y) into 4×4 sub-blocks with equal areas, and record them in the "bow" order as M = {m|m = 1,..., 16}; S1.2: Analyze all the sub-block images f(x, y) in the current splitting level, calculate the difference degree and splitting factor of all sub-block images in the current splitting level. If the splitting factor Qs = 1, the current sub-block image f(x, y) needs to be further split, and if Qs = 0, no further splitting is required; S1.3: According to the split factor Qs, split the (n+1)th level, split the sub-block image f(x, y) with all split factors Qs equal to 1 in the current split level, and split it into 4x4 sub-blocks with equal areas, respectively denoted as M={m1m2…m n | i =1,…,16; i=1,…,n}. S1.4: Let n = n + 1; when n < Num, transfer to S1.2, otherwise end the splitting and output all splitting results.

4. The method according to claim 3, characterized in that, Calculating the difference degree and splitting factor of all sub-block images in the current splitting level includes: Calculating the difference degree Ps and splitting factor Qs of all sub-block images in the current splitting level as Where f(x,y) represents the sub-block image, and G1 is a 16×16 Gaussian template. ε1 is the convolution operator, ε1∈[1,10] is a pre-defined parameter, sum is the summation operator, ε2∈[0.01,0.1] is a pre-defined parameter, and psum(·) is the number of pixels in the sub-block image.

5. According to the method described in claim 1, drawing a global index table of all the splitting results by means of matrix encoding includes: S2.1: Divide the image F(x,y) into 4 equal parts. Num-1 ×4 Num-1 Sub-block image, defined as F(x,y) as a 4 Num-1 ×4 Num-1 The matrix is ​​such that each element is a sub-block image, and each sub-block image has a two-dimensional matrix coordinate (i,j). Converting the two-dimensional coordinates (i,j) into one-dimensional coordinates A in left-to-right, top-to-bottom order, we get A = (i-1) × 4. Num-1 +j, S2.2: Perform another 4×4 splitting inside each sub-block image and sort it in the "bow" shape to obtain an internal serial number B; S2.3: Define the index value C of the sub-image obtained after two rounds of splitting in S2.1 and S2.2 as C = (A - 1) × 32 + B × 2.

6. The method according to claim 1, wherein planar grid coding is performed on the sub-block image of each level of adaptive segmentation according to the global index table to obtain the planar grid coding result, comprising: The adaptively segmented sub-block image is compared with the global index table. If the adaptively segmented sub-block image and one of the sub-block images in the global index table are completely equal, then the index value C of the sub-block image in the global index table is used as the grid coding result of the adaptively segmented sub-block image. If the adaptively segmented sub-block image contains several sub-block images in the global index table, then the average of the index values ​​C of these several sub-block images is used as the grid coding result of the adaptively segmented sub-block image.

7. The method according to claim 1, characterized in that, The geographic region is segmented non-uniformly at a height, with each segmentation performed at a 1:2 ratio. The height segmentation result is output when all sub-blocks in the current height segmentation level are no larger than a preset height threshold, including: S3.1: Let the height division number u = 1, and divide the entire height H into segments at a ratio of 1:

2. Then the height range of the upper sub-blocks is... The height range of the following sub-blocks is S3.2 Analyze all sub-blocks in the current height segmentation level. If the height of the current sub-block image is greater than the preset height threshold ε3, further segmentation is required; otherwise, no further segmentation is required. S3.3 Let u = u+1. For the sub-blocks in the current height segmentation number that need to be further segmented, segment them according to a ratio of 1:

2. After the segmentation is completed, go to S3.

2. When all sub-block images no longer need to be segmented, the height segmentation ends and the height segmentation result is output.

8. The method according to claim 7, characterized in that, The height segmentation result is subjected to height grid encoding to obtain the height grid encoded result, including: S4.1: Start encoding from the maximum height segment number u, and encode each sub-block image in a top-to-bottom order, that is, the first sub-block is recorded as 1, the second sub-block is recorded as 2, and so on. S4.2: When the current encoding sequence number reaches t, let u = u-1, and encode the current height segment number u. If the sub-block image has already been encoded, skip it and encode the remaining sub-blocks from top to bottom. That is, the first sub-block is recorded as t+1, the second sub-block is recorded as t+2, and so on. S4.3: When u = 1, the encoding ends and the height encoding result is output; otherwise, proceed to step S4.

2.

9. A geographic information gridding coding device based on adaptive segmentation, characterized in that, The device includes: The maximum number of cuts calculation module is used to obtain the geographic region to be encoded; set the geographic region to be encoded as a square region, and calculate the maximum number of cuts of the square region according to the preset minimum cut length; An adaptive segmentation module is used to adaptively segment the geographic region, calculate the difference and segmentation factor of all sub-block images in the current segmentation level, determine whether to continue segmenting based on the difference and segmentation factor, and output all segmentation results when the current segmentation level reaches the maximum segmentation level. The planar mesh coding module is used to draw a global index table of all the segmentation results using matrix coding, and to perform planar mesh coding on the sub-block image of each level of adaptive segmentation according to the global index table to obtain the planar mesh coding result; The height grid encoding module is used to perform height non-uniform segmentation of the geographic region. Each segmentation is performed at a ratio of 1:

2. When all sub-block images in the current height segmentation level are not greater than a preset height threshold, the height segmentation result is output. The height segmentation result is then subjected to height grid encoding to obtain the height grid encoding result. The encoding result composition module is used to combine the planar grid encoding result and the height grid encoding result into a two-dimensional vector, wherein the two-dimensional vector is the grid encoding result of the geographic region.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.