Novel structured hierarchical geographic grid coding method, system, device and medium

By determining the backbone level and subordinate level in geographic grid coding and encoding according to coding accuracy requirements, the problem of too long encoding bits in the prior art is solved, effectively controlling the encoding length and improving ease of use are achieved.

CN118152497BActive Publication Date: 2025-04-01SOUTH CHINA BOTANICAL GARDEN CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410368971.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-04-01
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

In the existing geographic grid coding scheme, the more grid levels, the longer the number of coded bits, resulting in increased difficulty in manual memory and greater computer storage space.

Method used

By determining the backbone level and subordinate level from the geographic grid level of the target geographic grid system, and determining the target coding level according to the preset coding accuracy requirements, different coding schemes are used to encode the backbone level and subordinate level, the target grid unit encoding corresponding to the preset geographical location is obtained.

Benefits of technology

It effectively controls the encoding length, improves the ease of use of geographic grid encoding, makes it more suitable for manual memory, recognition, recording and application, and reduces the use of computer storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152497B_ABST
    Figure CN118152497B_ABST
Patent Text Reader

Abstract

The present invention discloses a novel structured hierarchical geographic grid coding method, system, device and medium. The method comprises: determining a main level and a subordinate level from the geographic grid level of a target geographic grid system; determining a target coding scheme of the main level and the subordinate level according to the type of the target geographic grid system; determining a target coding level according to a preset coding accuracy requirement, encoding a preset geographic location according to the target coding level and the target coding scheme, and obtaining a target grid unit code corresponding to the preset geographic location. By adopting the present invention, the coding length can be effectively controlled, and the usability of the geographic grid code can be greatly improved, making it more conducive to manual memory, recognition, recording and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of spatial coding technology, and in particular relates to a novel structured hierarchical geographic grid coding method, system, device and medium. Background Art

[0002] Geographic grid coding can not only give a globally unique geographic identifier to areas as large as the entire earth or as small as centimeters, but also symbolize the geographic grid, making it easier for humans to remember, identify, record and apply it. At the same time, the coded geographic space will be more conducive to computer representation and processing, and can greatly improve the organization, management, analysis and calculation efficiency of digital geographic space elements.

[0003] When gridding large-scale geographic space, existing solutions usually map the coding system to a structured hierarchical geographic grid system to achieve hierarchical and block coding of geographic space. This not only provides grid coding with adjustable granularity, but also allows the coding to be trimmed to a certain extent according to the actual application scenario, thereby further controlling the length of the coding to facilitate human recognition. However, the current geographic grid coding scheme still faces the following problems:

[0004] In the existing coding scheme, each level of grid cells in the grid system needs to occupy a number of code elements, so the more grid levels there are, the longer the number of bits of the code. For example, the Beidou location code has a full length of 20 code elements, which can encode 10 levels of geographic grid cells, and the Plus Code standard code has 10 code elements, which can only encode 5 levels of geographic grid cells. Obviously, the more geographic grid levels mapped by the geographic grid code, the more grid cell spatial scales that can be selected, and the better the applicability of the code, but the corresponding number of code bits will also increase, and the difficulty of manual recognition and the space occupied by computer storage will increase simultaneously. Summary of the invention

[0005] Based on this, it is necessary to provide a new structured hierarchical geographic grid coding method, system, equipment and medium to address the above problems, which can effectively control the coding length and greatly improve the ease of use of geographic grid coding, making it more conducive to manual memory, recognition, recording and application.

[0006] The first aspect of the present invention discloses a novel structured hierarchical geographic grid encoding method, comprising:

[0007] Determining a trunk level and a subordinate level from the geographic grid levels of the target geographic grid system;

[0008] Determining target coding schemes for the main level and the subordinate level according to the type of the target geographic grid system;

[0009] A target coding level is determined according to a preset coding accuracy requirement, and a preset geographical location is encoded according to the target coding level and a target coding scheme to obtain a target grid unit code corresponding to the preset geographical location.

[0010] The above-mentioned new structured hierarchical geographic grid coding method selects the main level and the subordinate level and encodes the main level and the subordinate level, so that the coding of the geographic grid can not only effectively control the coding length, but also be compatible with grid unit identifiers of different levels of different precisions, thereby greatly improving the usability of the geographic grid coding and making it more conducive to manual memory, recognition, recording and application.

[0011] In some embodiments, determining the target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system includes:

[0012] determining a type of the target geographic grid system;

[0013] When the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, the child grid units corresponding to each parent grid unit of the multi-level rectangular grid system are encoded in a Z curve, a Hilbert curve or an XY coordinate system.

[0014] In the implementation of this embodiment, the sub-grid units corresponding to each parent grid unit of the multi-level rectangular grid system are encoded by using a Z curve, a Hilbert curve or an XY coordinate system, which conforms to the grid unit arrangement characteristics of the rectangular grid system and is conducive to understanding and memory.

[0015] In some embodiments, determining the target coding schemes of the trunk level and the subordinate level according to the type of the target geographic grid system further includes:

[0016] When the target geographic grid system is a multi-level hexagonal grid system constructed based on a spherical icosahedron, the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system are encoded in a clockwise / counterclockwise encoding manner starting from the center cell using a three-axis coordinate system.

[0017] In this embodiment, a three-axis coordinate system is selected to encode the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system in a clockwise / counterclockwise encoding manner starting from the center cell, which conforms to the grid cell arrangement characteristics of the hexagonal grid system and is conducive to understanding and memory.

[0018] In some embodiments, determining the target coding level according to a preset coding accuracy requirement includes:

[0019] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not greater than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not greater than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0020] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not less than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not less than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0021] When the preset coding accuracy requirement is that the spatial scale of the grid coding is closest to the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is closest to the spatial scale threshold is selected from the target geographic grid system as the target coding level.

[0022] In the implementation of this embodiment, a target coding level is selected from a target geographic grid system according to a preset coding accuracy requirement, so that grid units meeting the preset coding accuracy requirement are subsequently selected and encoded.

[0023] In some embodiments, encoding the preset geographical location according to the target coding level and the target coding scheme to obtain the target grid unit code corresponding to the preset geographical location includes:

[0024] Acquire a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0025] Determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0026] The preset geographical location is converted according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0027] In the implementation of this embodiment, the spatial mapping relationship between the target geographic grid system and the preset geographic location is obtained, and then the coding mapping relationship between the preset geographic location and the grid unit is determined. Then, the preset geographic location is encoded and converted according to the target coding level and the coding mapping relationship to obtain the target grid unit code, thereby improving computing efficiency.

[0028] In some embodiments, converting the preset geographical location according to the target coding level and the coding mapping relationship to obtain the target grid unit code of the preset geographical location in the target coding level includes:

[0029] Determine whether the target coding level belongs to the backbone level. If so, select all target backbone levels whose spatial scale is not less than the target coding level, and arrange the codes corresponding to the preset geographical locations in each target backbone level in sequence to obtain the target grid unit code;

[0030] If not, all target trunk levels whose spatial scale is not less than the target coding level are selected, and the target coding level is used as the target subordinate level. The codes corresponding to the preset geographic locations in each target trunk level and the codes corresponding to the target subordinate levels are arranged in sequence to obtain the target grid unit code.

[0031] Embodiment In this embodiment, different encoding methods are adopted according to whether the target coding level is the backbone level or the subordinate level, which can effectively control the coding length and greatly improve the usability of geographic grid coding, making it more conducive to manual memory, recognition, recording and application.

[0032] The second aspect of the present invention discloses a novel structured hierarchical geographic grid coding system, comprising:

[0033] A master-slave hierarchy determination module, used to determine a master hierarchy and a slave hierarchy from the geographic grid hierarchy of the target geographic grid system;

[0034] A coding scheme determination module, used to determine target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system;

[0035] The grid coding module is used to determine the target coding level according to the preset coding accuracy requirement, encode the preset geographical location according to the target coding level and the target coding scheme, and obtain the target grid unit code corresponding to the preset geographical location.

[0036] In some embodiments, the grid encoding module includes:

[0037] A spatial mapping unit, used to obtain a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0038] A coding mapping unit, configured to determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0039] The coding conversion unit is used to convert the preset geographical location according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0040] A third aspect of the present invention discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0041] A fourth aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0042] The present invention has the following beneficial effects: by selecting a main level and a subordinate level, and encoding the main level and the subordinate level, the coding of the geographic grid can not only effectively control the coding length, but also be compatible with grid unit identifiers of different levels of different precisions, thereby greatly improving the usability of the geographic grid coding and making it more conducive to manual memory, recognition, recording and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein show specific examples of the technical solutions described in the present invention, and together with the specific implementation methods, constitute a part of the specification, and are used to explain the technical solutions, principles and effects of the present invention.

[0044] Unless otherwise specified or defined, the same reference numerals in different drawings represent the same or similar technical features, and the same or similar technical features may also be represented by different reference numerals.

[0045] Figure 1 A flow chart of a novel structured hierarchical geographic grid encoding method provided by the present invention;

[0046] Figure 2 A schematic diagram of a multi-level rectangular grid system constructed based on quadtree decomposition provided by the present invention;

[0047] Figure 3 A schematic diagram of a multi-level hexagonal grid system based on a spherical icosahedron provided by the present invention;

[0048] Figure 4 A schematic diagram of sequentially encoding rectangular grid cells using a Z curve provided by the present invention;

[0049] Figure 5 A schematic diagram of using an XY coordinate system to encode rectangular grid cells provided by the present invention;

[0050] Figure 6 A schematic diagram of using a three-axis coordinate system to encode hexagonal grid cells provided by the present invention;

[0051] Figure 7 A schematic diagram of dividing the main layer and the subordinate layer using the Amap tile grid system as an example provided by the present invention;

[0052] Figure 8 A schematic diagram of using XY row and column numbers and hexadecimal code elements to identify backbone level grid cells provided by the present invention;

[0053] Fig. 9 A schematic diagram of encoding subordinate level grid units using the Amap tile grid system as an example provided by the present invention;

[0054] Fig.10 The structural block diagram of the novel structured hierarchical geographic grid coding system provided by the present invention;

[0055] Fig.11 It is a diagram of the internal structure of a computer device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to facilitate the understanding of the present invention, specific embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.

[0057] Unless otherwise specified or defined, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art. In the case of combining the technical solution of the present invention with a realistic scenario, all technical and scientific terms used herein may also have meanings corresponding to the purpose of implementing the technical solution of the present invention.

[0058] Unless otherwise specified or defined, the "first, second..." used in this article is merely used to distinguish names and does not represent a specific quantity or order.

[0059] Unless specifically stated or defined otherwise, the term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0060] like Figure 1 As shown, the present invention provides a novel structured hierarchical geographic grid coding method, comprising:

[0061] Step 1: Determine the main level and subordinate levels from the geographic grid levels of the target geographic grid system.

[0062] Specifically, the target geographic grid system is a structured hierarchical geographic grid system, which has multiple geographic grid levels of different spatial scales. For example, the tile grid system of Amap based on Web Mercator projection has 0-18 levels by default, and the tile grid system of Google Maps is similar to that of Amap. Figure 1However, the default levels are 0-22, the default levels of the H3 grid system are 0-15, and the default levels of the GeoSot grid system are 0-32. In this application, according to the actual application needs, several geographic grid levels can be selected from the target geographic grid system as the main level, and the geographic grid levels between the main levels and the geographic grid levels with levels greater than the maximum main level are used as subordinate levels. In subsequent encoding, the grid cells of the main level are used to encode and identify the location by default. Only when the subordinate level is required for accuracy, the subordinate level and the corresponding main level are used to encode the location. Taking the default geographic grid level of Amap as an example, if the 6th, 9th and 17th levels are selected as the main levels, then in actual applications, the main level is The grid unit coding of the trunk level can provide three spatial scale identifications: level 6 (equivalent to a 625×625km grid at the equator), level 9 (equivalent to a 78×78km grid at the equator), and level 17 (equivalent to a 305×305m grid at the equator). Levels 7-8 can be used as subordinate levels of level 6, levels 10-16 can be used as subordinate levels of level 9, and level 18 can be used as a subordinate level of level 17. The subordinate levels are only encoded and used when there are additional scale requirements. The geographic grid units of levels 0-5 cannot be encoded and used because they have no subordinate trunk levels. Compared with the prior art, in which the grid units of each level are encoded, the encoding method of the present application enables the encoding length to be effectively controlled.

[0063] Moreover, in the prior art, the number of levels of geographic grid coding and the granularity of spatial coding cannot be taken into account at the same time. For example, when the Beidou location code takes 12-bit code elements, it can identify grid cells of 5 geographic grid levels, and the identification accuracy is equivalent to the grid cell of about 61.84×61.84m at the equator; Plus Code is a latitude and longitude encoding method, generally with 10-bit code elements, which can also identify grid cells of 5 levels of geographic grid levels, but the identification accuracy can be equivalent to the grid cell of about 14×14m at the equator. If the code elements are further expanded, the Beidou location code can identify a grid cell of about 0.97×0.97m at the equator when taking 16-bit code elements, and can identify a grid cell of about 12.1×12.1cm at the equator when taking 18-bit code elements. Plus Code only needs to expand one to two code elements to expand to meter and sub-meter scales. Obviously, compared with Beidou location code, Plus Code can use fewer code elements to realize the identification of smaller-scale grid units because it has fewer codable geographic grid levels, while Beidou location code takes into account the identification of grid units of more levels, so more code elements are needed to identify grid units of similar scales. However, in this application, since only the backbone level is encoded layer by layer, and only a subordinate level is encoded when necessary, grid units of various spatial scales can be identified, that is, limited code elements are used to identify grid units of various spatial scales.

[0064] Step 2: Determine the target coding schemes for the main level and the subordinate level according to the type of the target geographic grid system.

[0065] Specifically, determining the target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system includes:

[0066] determining a type of the target geographic grid system;

[0067] When the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, the child grid units corresponding to each parent grid unit of the multi-level rectangular grid system are encoded in a Z curve, a Hilbert curve or an XY coordinate system.

[0068] The determining of the target coding scheme of the trunk level and the subordinate level according to the type of the target geographic grid system further includes:

[0069] When the target geographic grid system is a multi-level hexagonal grid system constructed based on a spherical icosahedron, the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system are encoded in a clockwise / counterclockwise encoding manner starting from the center cell using a three-axis coordinate system.

[0070] In practical applications, different types of geographic grid systems have different mapping relationships and spatial distribution characteristics of grid units at different levels. For example, the tile grid systems of web maps such as Amap and Google are usually multi-level rectangular grid systems based on quadtree decomposition. Figure 2 As shown in the figure, each parent grid unit in the rectangular grid system corresponds to 4 child grid units, and each level of grid unit has a maximum of 8 adjacent grid units. The H3 grid system (that is, the hexagonal grid system) uses regular hexagons to divide the space based on the spherical icosahedron, as shown in the figure. Figure 3 As shown in , each parent grid cell in the hexagonal grid system corresponds to 7 child grid cells, and each grid cell has 6 neighboring grid cells. Therefore, encoding different types of geographic grid systems requires using different encoding schemes depending on the specific situation. For a rectangular grid system, Figure 4 As shown in FIG. 1 , the child grid unit corresponding to the parent grid unit can encode each grid unit in sequence starting from a specific code element in the manner of a Z curve, and then combine the codes of the grid units at all levels in a specific form (they can be directly spliced ​​in the order of the grid levels, or they can be arranged and combined according to a specific rule) to form a complete position code. In addition, even the same type of grid can have a variety of different coding schemes. For example, a rectangular grid system can also use a Hilbert curve or an XY coordinate system (such as Figure 5 The XY coordinate system uses row and column numbers to identify the position of grid cells, which is more conducive to human intuitive understanding than the Z curve or Hilbert curve. For the H3 grid system, the sub-grid cells corresponding to the parent grid cells have different spatial arrangement characteristics of the grid cells, so different encoding logic is required, such as Figure 6 As shown, a three-axis coordinate system can be used to encode each sub-grid unit clockwise / counterclockwise starting from the center unit. The code element of the center unit, that is, the center grid unit, is 0, and then the grid units surrounding the center unit can be encoded in a clockwise or counterclockwise order starting from any axis of the three-axis coordinate system.

[0071] Specifically, taking the Amap tile grid system as an example, if levels 0, 4, 8, 12, and 16 are selected as the main levels, then levels 1-3, 5-7, 9-11, 13-15, and 17-18 are subordinate levels. For levels 0, 4, 8, 12, and 16, a parent grid unit of the previous main level can correspond to 4 4 = 256 sub-grid units, for example, a grid unit at level 0 will correspond to 256 grid units at level 4 (such as Figure 7As shown). Since the correspondence between the parent and child grid cells at levels 0 and 4, 4 and 8, 8 and 12, and 12 and 16 is consistent, the same encoding scheme can be used to encode the grid cells at levels 0 and 4, 4 and 8, 8 and 12, and 12 and 16, and the top level 0 grid has only one grid cell, so it can be left unencoded to shorten the encoding length. In this embodiment, the encoding scheme constructs an XY coordinate system with the upper left corner of the matrix composed of the sub-grid cells as the origin, and uses hexadecimal characters as the row and column numbers of the code element encoding X and Y. Each grid cell at the trunk level can be encoded using a pair of XY characters, such as Figure 8 As shown, the grid cell at the 14th row and 10th column in the 4th-level sub-grid cell corresponding to the 0th-level grid cell can be encoded as D9, and the grid cell at the 9th row and 3rd column in the 8th-level sub-grid cell corresponding to D9 can be encoded as D982. Compared with the 4th-level grid cell, the encoding length of the 8th-level grid cell increases by 2 bits, but the accuracy is improved by 4 levels. According to this level-by-level encoding method, the 16th-level grid cell will have an 8-bit character length (for example, D9820FA3).

[0072] For the coding identification of the grid cells of the subordinate levels, the coding schemes of the grid cells of the subordinate levels need to be distinguishable not only from each other, but also from the coding of the grid cells of the main level to avoid confusion. For example, each of the above-mentioned main level subordinate levels has three levels (such as the subordinate levels of level 0 are levels 1-3, and the subordinate levels of level 4 are levels 5-7), so it is necessary to design three different coding schemes to encode the grid cells of different subordinate levels. Specifically, the spatial arrangement rules of the grid cells of the subordinate levels are actually consistent with those of the grid cells of the main level. Therefore, the 2-bit XY row and column numbers can still be used to encode the grid cells of the subordinate levels. In other embodiments, the grid cells of the subordinate levels can be encoded in other ways (such as Z curves, Hilbert curves), and in order to facilitate distinction, this embodiment uses different code elements to identify the grid cells of different subordinate levels, such as Fig. 9As shown, for example, the two characters [X, Y] can be used to encode the grid cells of the first level, the four characters [R, S, T, V] can be used to encode the grid cells of the second level, and the eight characters [G, H, J, K, L, M, P, Q] can be used to encode the grid cells of the third level. Since the code elements of different categories of grid cells are different, the codes at each level will not be confused with each other. The entire coding scheme also intentionally eliminates the six characters [I, N, O, U, W, Z] that are easily confused in manual recording and recognition, thereby further enhancing the ease of use of the coding. In addition, to ensure the consistency of grid cell coding at each level, the subordinate grid cell to be coded can only be located at the end of the trunk level code. For example, the 14th-level grid cell is coded, which is equivalent to the subordinate 2nd-level grid cell of the 12th-level grid cell of the trunk level. Therefore, the first 6 bits of its code must be the trunk-level grid cell code, such as D9820F, where D9 represents the 4th-level trunk-level grid cell code, 82 represents the 8th-level trunk-level grid cell code, and 0F represents the 12th-level trunk-level grid cell code. It cannot contain subordinate grid cell codes (such as the 13th-level grid cell code), and the 14th-level sub-grid cell code is 0F. The code can only be located at the end of the entire code, and needs to be encoded using the subordinate layer 2 code element [R, S, T, V] (such as VT). Then the code length of a complete 14th-level grid unit is 8 bits (such as D9820FVT), which is consistent with the code length of the 16th-bit backbone-level grid unit. However, different code elements can be used to distinguish the coding levels. For example, D9820FA3 is a 16-level grid unit code, while D9820FVT is a 14-level grid code, and D9820FGP is a 15-level grid unit code. By using different coding schemes for different categories of grid cells, equal-length coding is used to identify grid cells of different levels.

[0073] Step 3: determine a target coding level according to a preset coding accuracy requirement, encode a preset geographic location according to the target coding level and the target coding scheme, and obtain a target grid unit code corresponding to the preset geographic location.

[0074] Specifically, determining the target coding level according to the preset coding accuracy requirement includes:

[0075] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not greater than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not greater than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0076] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not less than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not less than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0077] When the preset coding accuracy requirement is that the spatial scale of the grid coding is closest to the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is closest to the spatial scale threshold is selected from the target geographic grid system as the target coding level.

[0078] In practical applications, the preset spatial scale threshold can be set to 10×10m. When the target geographic grid system is a tile grid system of Google or Amap, if the preset coding accuracy requirement is that the spatial scale of the grid code is not greater than 10×10m, the grid cells of the 21st level of the target geographic grid system can identify a spatial scale of 19×19m at the equator, and the grid cells of the 22nd level can identify a spatial scale of 9.5×9.5m at the equator, then the target coding level can be a geographic grid level of the 22nd level or above. If the preset coding accuracy requirement is that the spatial scale of the grid code is not less than 10×10m, then the target coding level can be a geographic grid level of the 21st level or below. If the preset coding accuracy requirement is that the spatial scale of the grid code is closest to 10×10m, the grid cells of the 21st level of the target geographic grid system can identify a spatial scale of 19×19m at the equator, and the grid cells of the 22nd level can identify a spatial scale of 9.5×9.5m at the equator, then the target coding level can be a geographic grid level of the 22nd level.

[0079] Specifically, encoding the preset geographical location according to the target coding level and the target coding scheme to obtain the target grid unit code corresponding to the preset geographical location includes:

[0080] Acquire a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0081] Determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0082] The preset geographical location is converted according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0083] In practical applications, different geographic grid systems and preset geographic locations may use different coordinate systems and coordinate definition parameters. It is necessary to first obtain the spatial mapping relationship between the target geographic grid system and the preset geographic location, and convert the preset geographic location according to the spatial mapping relationship to unify the dimensions of the two. For example, the 2000 National Geodetic Coordinate System (CGSC2000) commonly used in China and the Web Mercator Projection Coordinate System based on WGS84 used by Google Maps are completely different. The former is a geographic coordinate system that uses spherical coordinates, while the latter is a projection coordinate system that uses plane coordinates. The two cannot be directly numerically calculated and compared.

[0084] The preset geographic location can be converted into the coordinates of the target geographic grid system through the spatial mapping relationship, and the coordinates can be solved into the target grid unit code through the target coding scheme. Since the coordinates of the target geographic grid system itself is a coding system, it can be further integrated with the target coding scheme to obtain a more intuitive coding mapping relationship:

[0085] Let X be the preset geographic location, Y be the coordinate of X in the target geographic grid system, and let the spatial mapping relationship between X and Y be F, then:

[0086] Y=F(X)

[0087] Let L be the target coding level, C L Encode the target grid unit of Y in the target coding level, assuming that the coding function of the target coding scheme is G, then:

[0088] C L =G(Y)

[0089] Further we can get:

[0090] C L =G(F(X))

[0091] Continuing the abstraction, the coding mapping relationship between the preset geographic location and the grid unit can be obtained as follows:

[0092] C L =H(X)

[0093] Among them, H represents the coding mapping relationship between the preset geographical location and the grid unit, and the preset geographical location can be directly converted into the target grid unit code through the coding mapping relationship. For example, the preset geographical location is the South China National Botanical Garden Herbarium (23.180418°, 113.350974°, CGSC2000 coordinate system), the target geographical grid system is the Web Mercator tile grid system of Google Maps, and the target coding level is 22. Through the spatial mapping relationship, it can be known that the XY coordinates of the preset geographical location in the 22nd level grid of Google Maps are (3417786, 1819396). The coordinates are further encoded using the coding scheme in this embodiment to obtain the target grid unit code. Its essence is actually to use the coding mapping relationship H to replace the spatial mapping relationship F between the preset geographical location and the target geographical grid system, that is, to achieve the conversion of the preset geographical location to the target grid unit code through the coding mapping relationship.

[0094] Specifically, converting the preset geographical location according to the target coding level and the coding mapping relationship to obtain the target grid unit code of the preset geographical location in the target coding level includes:

[0095] Determine whether the target coding level belongs to the backbone level. If so, select all target backbone levels whose spatial scale is not less than the target coding level, and arrange the codes corresponding to the preset geographical locations in each target backbone level in sequence to obtain the target grid unit code;

[0096] If not, all target trunk levels whose spatial scale is not less than the target coding level are selected, and the target coding level is used as the target subordinate level. The codes corresponding to the preset geographic locations in each target trunk level and the codes corresponding to the target subordinate levels are arranged in sequence to obtain the target grid unit code.

[0097] In this embodiment, if the 0th, 4th, 8th, 12th, 16th, and 20th levels are selected as the main levels, the main level grid cells and the subordinate level grid cells are encoded using the encoding mapping relationship of this embodiment, and the target encoding level belongs to the 22nd level, which is a subordinate level of the 20th level and does not belong to the main level. Since the 0th level does not require encoding, it is necessary to arrange the encodings of the grid cells corresponding to the row and column coordinates in the 4th, 8th, 12th, 16th, 20th, and 22nd levels in sequence, then (23.180418°, 113.350974°, CGSC2000 coordinate system) will be converted into a 12-bit target grid cell code D60F90ACE1TR. If the CGSC2000 coordinates are adjusted about 10 meters south, the new coordinates (23.180318°, 113.350974°) are obtained, and the new coordinates are converted into the target grid cell code to obtain D60F90ACE1TR. TS, compared with D60F90ACE1TR, it can be found that the last digit of the code has changed from R to S, which is equivalent to the Y value of the last level of the grid moving 1 bit southward, which is consistent with the spatial scale of the 22nd level grid unit of the Google tile grid system of nearly 10m. It can be seen that the encoded geographic location information is not only more conducive to manual recognition, but also can be directly applied to the analysis and judgment of spatial location.

[0098] The novel structured hierarchical geographic grid coding method of the present invention selects a main level and a subordinate level, and uses different code elements to encode the main level and the subordinate level, so that the coding of the geographic grid can not only effectively control the coding length, but also be compatible with grid unit identifiers of different levels of different precisions, thereby greatly improving the usability of the geographic grid coding and making it more conducive to manual memory, recognition, recording and application.

[0099] like Fig.10 As shown, the present invention also provides a novel structured hierarchical geographic grid coding system, comprising:

[0100] A master-slave hierarchy determination module 10, for determining a master hierarchy and a slave hierarchy from the geographic grid hierarchy of the target geographic grid system;

[0101] A coding scheme determination module 20, for determining target coding schemes of a main level and a subordinate level according to the type of the target geographic grid system;

[0102] The grid coding module 30 is used to determine a target coding level according to a preset coding accuracy requirement, encode a preset geographical location according to the target coding level and a target coding scheme, and obtain a target grid unit code corresponding to the preset geographical location.

[0103] In some embodiments, the grid encoding module includes:

[0104] A spatial mapping unit, used to obtain a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0105] A coding mapping unit, configured to determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0106] The coding conversion unit is used to convert the preset geographical location according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0107] The specific composition of the novel structured hierarchical geographic grid coding system can be found in the composition of the novel structured hierarchical geographic grid coding method described above, which will not be repeated here. Each module of the novel structured hierarchical geographic grid coding system can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0108] In some embodiments, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a new structured hierarchical geographic grid coding method is implemented.

[0109] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0111] Determining a trunk level and a subordinate level from the geographic grid levels of the target geographic grid system;

[0112] Determining target coding schemes for the main level and the subordinate level according to the type of the target geographic grid system;

[0113] A target coding level is determined according to a preset coding accuracy requirement, and a preset geographical location is encoded according to the target coding level and a target coding scheme to obtain a target grid unit code corresponding to the preset geographical location.

[0114] In some embodiments, determining the target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system includes:

[0115] determining a type of the target geographic grid system;

[0116] When the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, the child grid units corresponding to each parent grid unit of the multi-level rectangular grid system are encoded in a Z curve, a Hilbert curve or an XY coordinate system.

[0117] In some embodiments, determining the target coding schemes of the trunk level and the subordinate level according to the type of the target geographic grid system further includes:

[0118] When the target geographic grid system is a multi-level hexagonal grid system constructed based on a spherical icosahedron, the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system are encoded in a clockwise / counterclockwise encoding manner starting from the center cell using a three-axis coordinate system.

[0119] In some embodiments, determining the target coding level according to a preset coding accuracy requirement includes:

[0120] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not greater than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not greater than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0121] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not less than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not less than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0122] When the preset coding accuracy requirement is that the spatial scale of the grid coding is closest to the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is closest to the spatial scale threshold is selected from the target geographic grid system as the target coding level.

[0123] In some embodiments, encoding the preset geographical location according to the target coding level and the target coding scheme to obtain the target grid unit code corresponding to the preset geographical location includes:

[0124] Acquire a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0125] Determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0126] The preset geographical location is converted according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0127] In some embodiments, converting the preset geographical location according to the target coding level and the coding mapping relationship to obtain the target grid unit code of the preset geographical location in the target coding level includes:

[0128] Determine whether the target coding level belongs to the backbone level. If so, select all target backbone levels whose spatial scale is not less than the target coding level, and arrange the codes corresponding to the preset geographical locations in each target backbone level in sequence to obtain the target grid unit code;

[0129] If not, all target trunk levels whose spatial scale is not less than the target coding level are selected, and the target coding level is used as the target subordinate level. The codes corresponding to the preset geographic locations in each target trunk level and the codes corresponding to the target subordinate levels are arranged in sequence to obtain the target grid unit code.

[0130] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0131] Determining a trunk level and a subordinate level from the geographic grid levels of the target geographic grid system;

[0132] Determining target coding schemes for the main level and the subordinate level according to the type of the target geographic grid system;

[0133] A target coding level is determined according to a preset coding accuracy requirement, and a preset geographical location is encoded according to the target coding level and a target coding scheme to obtain a target grid unit code corresponding to the preset geographical location.

[0134] In some embodiments, determining the target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system includes:

[0135] determining a type of the target geographic grid system;

[0136] When the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, the child grid units corresponding to each parent grid unit of the multi-level rectangular grid system are encoded in a Z curve, a Hilbert curve or an XY coordinate system.

[0137] In some embodiments, determining the target coding schemes of the trunk level and the subordinate level according to the type of the target geographic grid system further includes:

[0138] When the target geographic grid system is a multi-level hexagonal grid system constructed based on a spherical icosahedron, the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system are encoded in a clockwise / counterclockwise encoding manner starting from the center cell using a three-axis coordinate system.

[0139] In some embodiments, determining the target coding level according to a preset coding accuracy requirement includes:

[0140] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not greater than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not greater than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0141] When the preset coding accuracy requirement is that the spatial scale of the grid coding is not less than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not less than the spatial scale threshold is selected from the target geographic grid system as the target coding level;

[0142] When the preset coding accuracy requirement is that the spatial scale of the grid coding is closest to the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is closest to the spatial scale threshold is selected from the target geographic grid system as the target coding level.

[0143] In some embodiments, encoding the preset geographical location according to the target coding level and the target coding scheme to obtain the target grid unit code corresponding to the preset geographical location includes:

[0144] Acquire a spatial mapping relationship between the target geographic grid system and a preset geographic location;

[0145] Determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme;

[0146] The preset geographical location is converted according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

[0147] In some embodiments, converting the preset geographical location according to the target coding level and the coding mapping relationship to obtain the target grid unit code of the preset geographical location in the target coding level includes:

[0148] Determine whether the target coding level belongs to the backbone level. If so, select all target backbone levels whose spatial scale is not less than the target coding level, and arrange the codes corresponding to the preset geographical locations in each target backbone level in sequence to obtain the target grid unit code;

[0149] If not, all target trunk levels whose spatial scale is not less than the target coding level are selected, and the target coding level is used as the target subordinate level. The codes corresponding to the preset geographic locations in each target trunk level and the codes corresponding to the target subordinate levels are arranged in sequence to obtain the target grid unit code.

[0150] The purpose of the above embodiments is to exemplarily reproduce and deduce the technical solution of the present invention, and to fully describe the technical solution, purpose and effect of the present invention. Its purpose is to make the public understand the disclosed content of the present invention more thoroughly and comprehensively, and it does not limit the scope of protection of the present invention.

[0151] The above embodiments are not exhaustive enumerations of the present invention, and there may be multiple other implementations not listed. Any replacement and improvement made without violating the concept of the present invention shall fall within the protection scope of the present invention.

Claims

1. A novel structured hierarchical geographic grid coding method, characterized in that: include: Determining a trunk level and a subordinate level from the geographic grid levels of the target geographic grid system; Determining target coding schemes for the main level and the subordinate level according to the type of the target geographic grid system; Determine a target coding level according to a preset coding accuracy requirement, encode a preset geographical location according to the target coding level and the target coding scheme, and obtain a target grid unit code corresponding to the preset geographical location; In encoding, by default, the grid cells of the main level are used to encode and identify the location. When the accuracy requires the use of the subordinate level, the subordinate level and the corresponding main level are used to encode the preset geographical location; The step of determining the target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system includes: determining a type of the target geographic grid system; In the case where the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, encoding the child grid cells corresponding to each parent grid cell of the multi-level rectangular grid system in a manner of a Z curve, a Hilbert curve or an XY coordinate system; For the tile grid system, levels 0, 4, 8, 12, and 16 are selected as the main levels, and levels 1-3, 5-7, 9-11, 13-15, and 17-18 are subordinate levels. The grid cells are encoded using a pair of XY characters, and hexadecimal characters are used as the code elements of the main level to encode the row and column numbers of X and Y. The grid cells of the subordinate level 1 are encoded using two characters [X, Y], the grid cells of the subordinate level 2 are encoded using four characters [R, S, T, V], and the grid cells of the subordinate level 3 are encoded using eight characters [G, H, J, K, L, M, P, Q].

2. The novel structured hierarchical geographic grid coding method according to claim 1, characterized in that: The determining of the target coding scheme of the trunk level and the subordinate level according to the type of the target geographic grid system further includes: When the target geographic grid system is a multi-level hexagonal grid system constructed based on a spherical icosahedron, the child grid cells corresponding to each parent grid cell of the multi-level hexagonal grid system are encoded in a clockwise / counterclockwise encoding manner starting from the center cell using a three-axis coordinate system.

3. The novel structured hierarchical geographic grid coding method according to claim 1, characterized in that: The determining of the target coding level according to the preset coding accuracy requirement includes: When the preset coding accuracy requirement is that the spatial scale of the grid coding is not greater than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not greater than the spatial scale threshold is selected from the target geographic grid system as the target coding level; When the preset coding accuracy requirement is that the spatial scale of the grid coding is not less than the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is not less than the spatial scale threshold is selected from the target geographic grid system as the target coding level; When the preset coding accuracy requirement is that the spatial scale of the grid coding is closest to the spatial scale threshold, a geographic grid level whose spatial scale of the grid unit is closest to the spatial scale threshold is selected from the target geographic grid system as the target coding level.

4. The novel structured hierarchical geographic grid coding method according to claim 1, characterized in that: The step of encoding the preset geographical location according to the target coding level and the target coding scheme to obtain a target grid unit code corresponding to the preset geographical location includes: Acquire a spatial mapping relationship between the target geographic grid system and a preset geographic location; Determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme; The preset geographical location is converted according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

5. The novel structured hierarchical geographic grid coding method according to claim 4, characterized in that: The converting the preset geographical location according to the target coding level and the coding mapping relationship to obtain the target grid unit code of the preset geographical location in the target coding level includes: Determine whether the target coding level belongs to the backbone level. If so, select all target backbone levels whose spatial scale is not less than the target coding level, and arrange the codes corresponding to the preset geographical locations in each target backbone level in sequence to obtain the target grid unit code; If not, all target trunk levels whose spatial scale is not less than the target coding level are selected, and the target coding level is used as the target subordinate level. The codes corresponding to the preset geographic locations in each target trunk level and the codes corresponding to the target subordinate levels are arranged in sequence to obtain the target grid unit code.

6. A new structured hierarchical geographic grid coding system, characterized by: include: A master-slave hierarchy determination module, used to determine a master hierarchy and a slave hierarchy from the geographic grid hierarchy of the target geographic grid system; A coding scheme determination module, used to determine target coding schemes of the main level and the subordinate level according to the type of the target geographic grid system; The target coding scheme for determining the main level and subordinate level according to the type of the target geographic grid system includes: determining the type of the target geographic grid system; when the target geographic grid system is a multi-level rectangular grid system constructed based on quadtree decomposition, encoding the child grid units corresponding to each parent grid unit of the multi-level rectangular grid system in accordance with the Z curve, Hilbert curve or XY coordinate system; for the tile grid system, selecting the 0th, 4th, 8th, 12th and 16th levels as the main level, then 1- Levels 3, 5-7, 9-11, 13-15, and 17-18 are subordinate levels. The grid cells are encoded using a pair of XY characters. Hexadecimal characters are used as the code elements of the main level to encode the row and column numbers of X and Y. The grid cells of the subordinate level 1 are encoded using two characters [X, Y]. The grid cells of the subordinate level 2 are encoded using four characters [R, S, T, V]. The grid cells of the subordinate level 3 are encoded using eight characters [G, H, J, K, L, M, P, Q]. The grid coding module is used to determine the target coding level according to the preset coding accuracy requirement, encode the preset geographical location according to the target coding level and the target coding scheme, and obtain the target grid unit code corresponding to the preset geographical location. In the coding, the grid unit of the backbone level is used by default to encode the location. When the accuracy requires the use of the subordinate level, the subordinate level and the corresponding backbone level are used to encode the preset geographical location.

7. The novel structured hierarchical geographic grid coding system as claimed in claim 6, characterized in that: The grid coding module comprises: A spatial mapping unit, used to obtain a spatial mapping relationship between the target geographic grid system and a preset geographic location; A coding mapping unit, configured to determine a coding mapping relationship between a preset geographical location and a grid unit according to the spatial mapping relationship and the target coding scheme; The coding conversion unit is used to convert the preset geographical location according to the target coding level and the coding mapping relationship to obtain a target grid unit code of the preset geographical location in the target coding level.

8. 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, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Grid data graph implementation method and device

    CN115017348A

  • Multi-scale spatial data processing method, electronic equipment and storage medium

    CN115858709A