Multi-scale local equidistant grid coding method for non-rigid grid region
By using a multi-scale local equidistant grid coding method for non-rigid grid regions, the problem of insufficient flexibility of the global equidistant grid system in local areas and the inability of single-scale coding to express multi-scale information is solved. This method enables efficient cross-scale information association and integration, improving data accuracy and management efficiency.
Patent Information
- Application Number
- CN202511112000.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-11
AI Technical Summary
Existing global equidistant grid systems lack flexibility when processing local areas, leading to information redundancy and wasted storage space. At the same time, the data interfaces between different systems are complex, and there is a lack of unified gridding standards, which affects data accuracy and management efficiency. Furthermore, single-scale integer encoding cannot express multi-scale information.
A multi-scale local equidistant grid coding method for non-rigid grid regions is adopted. Grid coding is sorted in space and scale layers through integer operations. Morton cross coding is formed by using horizontal and vertical coordinate cross coding. Multi-scale coding is achieved through recursive quadtree decomposition to adapt to the grid coding requirements at different scales.
It improves coding efficiency and adaptability, supports cross-scale information association and integration, reduces data processing burden, improves data accuracy and management efficiency, and adapts to grid requirements at different scales.
Smart Images

Figure CN120931740A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of equidistant grid coding technology, specifically relating to a multi-scale local equidistant grid coding method for non-rigid grid regions. Background Technology
[0002] The equidistant grid subdividing coding model is a model developed based on the GeoSOT (Geographic Coordinate Subdividing Grid with One Dimension Integral Coding on a 2n Tree) Earth subdivision framework. Due to its seamless, non-overlapping global latitude and longitude coverage, GeoSOT grids can achieve multi-scale representation and efficient coding computation. Currently, it has been widely used in disaster reduction and emergency response, aerospace remote sensing, land surveying, smart cities, and smart agriculture. It has been incorporated into national and military standards and has played a role in the development of international standards by organizations such as the Open Geospatial Consortium (OGC), the International Organization for Standardization (ISO), and the Institute of Electrical and Electronics Engineers (IEEE).
[0003] In practical applications, the rigid fixed grid division used in global equidistant grid systems has limitations when processing local areas. In some areas, the lack of flexibility in grid division leads to information redundancy, storing a large amount of data that has no substantial value for the analysis of that area. This not only wastes storage space but also increases the burden of data processing.
[0004] Meanwhile, the data interfaces between various industry systems in the city are extremely complex and lack a unified grid standard. This situation leads to high adaptation costs when conducting joint data analysis. The overlap of latitude and longitude between grids of different systems reduces data accuracy, affecting the accuracy of network planning, optimization, and other business operations, and restricting the improvement of refined management efficiency. The existing local geographic grid division system lacks a unified standard. The geographic grids divided by different modules, systems, and business domains are different, and the grid division cannot be aligned, making it difficult to conduct joint analysis and data sharing and exchange. Cross-domain data collaboration faces high adaptation costs and accuracy loss. At present, mainstream geographic grids are mostly used for visualization and usually only store the latitude and longitude of the grid center point, lacking effective encoding and indexing capabilities, and cannot support efficient spatial computing and analysis. Existing local equidistant grids are mainly single-scale integer encodings, which have the disadvantage of not being able to express multi-scale information. Summary of the Invention
[0005] To address the limitation of single-scale integer encoding in expressing multi-scale information, this invention proposes a multi-scale local equidistant grid encoding method for non-rigid grid regions. The core idea is to use a fixed integer to simultaneously sort the grid codes at different scales in both space and scale, and to reflect the encoding hierarchy and spatial relationships between grids through integer operations.
[0006] A multi-scale local isometric mesh encoding method for non-rigid mesh regions, comprising the following steps: determining the mesh encoding of the non-rigid mesh region based on its extent, and dividing the region into isometric meshes.
[0007] Step 1: Determine the center of the local adaptive zone based on the center of the non-rigid mesh region. The range of the local adaptive zone is the boundary of the non-rigid mesh.
[0008] Step 2: After determining the projection base, project the non-rigid mesh onto the two-dimensional plane under local adaptive zoning, and convert the coordinate range under the geographic coordinate system to the coordinate range under the Gaussian projection coordinate system.
[0009] Step 3: Virtually extend the Gaussian projection result. The equidistant grid encoding rule virtually extends the projection plane to S×2. L Where S is the scale of the smallest unit and L is the grid level;
[0010] Step 4: Recursively partition the virtual extended projection range into quadtrees. Based on the virtual extension, the equidistant grid is partitioned into quadtrees layer by layer for the 0th level equidistant grid until the minimum scale is reached.
[0011] Furthermore, each grid code adopts a cross-coding method with horizontal and vertical coordinates, forming a Morton cross-coding with the vertical coordinate code first and the horizontal coordinate code second; then, scale information is incorporated into the code according to a multi-scale coding method, and finally the grid code is formed.
[0012] Furthermore, taking a network with a maximum of 17 layers as an example, the range of two-dimensional multi-scale integer coding layers is 0 ≤ L ≤ 17, and the coding interval of the Lth layer of two-dimensional multi-scale integer coding is SC. (N) =2 35-2L ,
[0013] Two-dimensional multi-scale integer coding, the 0th code value of the Lth layer is SC (L,0) =2 34-2L -1,
[0014] The value range of i in the Lth layer of two-dimensional multi-scale integer coding is 0 ≤ i ≤ 2. 2L-1The k-th coded value of the L-th layer in multi-scale integer coding is SC. (L,k) =SC (L,0) +k·SC (L) =2 34-2L -1+k·2 35-2L .
[0015] Furthermore, the method for generating multi-scale codes from single-scale coding is as follows:
[0016] Step A1: Establish a two-dimensional single-scale integer code;
[0017] Step A2: Determine the encoding interval SC based on the single-scale grid hierarchy L. (L) and the 0th encoded value SC of layer L (L,0) ;
[0018] Step A3: Calculate the multi-scale code SC based on the single-scale code k and the level L. (L,k) .
[0019] Furthermore, the multi-scale grid coding level calculation rules are as follows: Let the multi-scale coding value be Mc, and the total number of levels be N. The algorithm implementation steps are as follows:
[0020] Step B1: If Mc is even, then Mc&1 = 0, and we can get the level L = 17.
[0021] Step B2: If Mc is odd, calculate the integer Mid = (Mc-1)∧(Mc+1) using an XOR operation, and find the nearest common parent code between these two multi-scale integer codes;
[0022] Step B3: Determine how many zeros are to the left of the integer Mid using a branching method, calculate the level L of the multi-scale integer code Mc, first set L = 0, and then perform the following judgment:
[0023] Use 0xFFFFFFFF00000000 to get the high-order bits of Mid, then right-shift by 32 bits to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x00000000FFFFFFFF, and L = 32.
[0024] Use 0xFFFF0000 to get the high-order bits of Mid, then right-shift by 16 bits to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x0000FFFF, and L = L + 16.
[0025] Use 0xFF00 to get the high-order bits of Mid, then right-shift by 8 bits to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x00FF, and L = L + 8.
[0026] Use 0xF0 to get the high-order bits of Mid, then right-shift by 4 bits to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x0F, and L = L + 4.
[0027] Use 0xC to get the high-order bits of Mid, then right-shift by 2 bits to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x3, and L = L + 2.
[0028] Use 0x2 to get the high-order bit of Mid, then shift it right by 1 bit to get Mid0. Check if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x1, and L = L + 1.
[0029] The L calculated according to the above steps is transformed to obtain the level n = (N >> 1) - 14.
[0030] Furthermore, assuming the multi-scale coding value is Mc, the calculation method and steps for the single-scale coding value are as follows:
[0031] Step C1: Calculate the encoding level L;
[0032] Step C2: Calculate the coding interval SC of the Lth layer based on the layer L. (L) =2 35-2L ;
[0033] Step C3, based on the multi-scale encoded value SC (L,k) and the coding interval SC of the Lth layer (L) Calculate the position of the multi-scale code in the Lth level, i.e., the single-scale code value k = (SC (L,k) -SC (L,0) )÷SC (L) =(SC) (L,k)) -(2 35-2L -1))÷2 35-2L ;
[0034] Step C4: Calculate the grid coordinates corresponding to the single-scale code. Based on the grid coordinates, calculate the single-scale code value by cross-biting. Based on the single-scale code value, calculate the corresponding grid coordinates by reverse cross-biting.
[0035] Further, the parent grid query is a process of quickly locating and querying the parent grid code to which a given grid code belongs. Given a multi-scale grid Mcode, its parent grid at the query level Lp The calculation steps are as follows:
[0036] Step D1, obtain the level L where the grid is located according to the multi-scale grid code level calculation method;
[0037] Step D2, calculate the position j of the multi-scale integer code Mcode at the Lth level;
[0038] Step D3, calculate the position k of the position j at the Lth level in the parent grid at the query level Lp (Lp < L);
[0039] Step D4, calculate the parent grid code of Mcode at the query level Lp
[0040]
[0041] Further, the sub-grid query is a process of quickly locating and querying the set of sub-grids to which a given grid code belongs. Given a multi-scale grid Mcode, its set of sub-grids is
[0042]
[0043] Further, for the polar region, centered on the pole, in the area where the latitude is 65° and above (65°N - 90°N, 65°S - 90°S), the gnomonic projection is adopted; on the projection plane, centered on the pole, on the spherical cap with a spherical radius of 5×219m, subdivision is carried out, and the highest level is set to 20 levels, so that the grid with a minimum granularity of 5m can cover the polar region above 65°, and the maximum can cover a partial area of 54°; on this area, recursive quadtree subdivision is carried out, and the subdivision axis is parallel to the projection lines of the 0° meridian and the 90° meridian. After 20 levels of subdivision with a minimum granularity of 5m, it can cover the polar region where the latitude is 65° and above.
[0044] The multi-scale local equidistant grid coding method of the present invention is to subdivide and encode the non-rigid grid area. Through integers with a certain number of digits, the grid codes at different scales are sorted both in space and scale layers, and the hierarchical relationship and spatial relationship between grids are reflected through integer operations; at the same time, integers with specific digits are used to uniformly encode grids at different scales, converting the two-dimensional coding problem into a one-dimensional coding index problem, while retaining spatial and scale characteristics, thereby improving the efficiency and adaptability of coding. Brief Description of the Drawings
[0045] Figure 1 It is a schematic diagram of non-rigid grid virtual expansion and quadtree subdivision;
[0046] Figure 2 This is a schematic diagram of the multi-scale grid hierarchy.
[0047] Figure 3 This is a schematic diagram of an equidistant grid in the polar region.
[0048] Figure 4 This is a schematic diagram of height field encoding;
[0049] Figure 5 This is a schematic diagram showing the geographical distribution of mobile traffic in the Milan and Trentino areas. Figure 5 (a) refers to Milan. Figure 5 (b) is Trentino;
[0050] Figure 6 This is a schematic diagram showing the airspace traffic distribution in the core areas of Shenzhen and Changchun. Figure 6 (a) refers to Shenzhen. Figure 6 (b) is the core area of Changchun;
[0051] Figure 7 A schematic diagram of the basic framework for airspace traffic transfer learning;
[0052] Figure 8 This is a schematic diagram illustrating the height domain encoding of the loss function curve during training and validation. Detailed Implementation
[0053] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The embodiments of the present invention are given for illustrative and descriptive purposes only, and are not intended to be exhaustive or to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described to better illustrate the principles and practical application of the invention, and to enable those skilled in the art to understand the invention and design various embodiments with various modifications suitable for a particular purpose.
[0054] Example 1
[0055] This embodiment mainly discusses the problem of determining the grid code of any non-rigid grid region based on its range, and then dividing and encoding the region into equidistant grids.
[0056] The non-rigid mesh here refers to a hierarchical mesh structure that replaces the rigid tree structure between mesh layers with a tree structure with variable hierarchical relationships, under the condition that the basic framework of mesh generation remains unchanged. Based on the grid cell, a multi-type grid cell that spans grid points and grid edges is formed, and a unified coding method is used for identification and calculation.
[0057] The advantages of non-rigid grids are twofold: First, rigid grid systems have fixed grid divisions, which can lead to the same city being placed in two or more grids (such as the US MGRS grid system) when identifying administrative divisions, causing inconvenience in data conversion and analysis. Second, given the diverse nature of global administrative division data, a more flexible structure is needed. This structure should be able to uniquely identify prefecture-level city administrative division data using a single code within a unified global grid framework, and the code should have spatial attributes, allowing for rapid range calculations and spatial relationship operations. The non-rigid grid area in this embodiment primarily refers to administrative divisions.
[0058] I. Partitioning Method
[0059] The meshing of any non-rigid mesh region includes the following steps:
[0060] A1. Determine the center of the local adaptive zone based on the center of the non-rigid mesh region A. The range of the local adaptive zone is the boundary of the non-rigid mesh.
[0061] The center of the non-rigid mesh region A is determined by calculating the minimum bounding rectangle Box of region A, and then calculating the length B of Box in the latitude and longitude directions. X and L X The center of Box is (B0, L0), where B0 and L0 are the latitude and longitude of the center of Box, respectively.
[0062] A2. After determining the projection base, project the non-rigid mesh onto a two-dimensional plane using a locally adaptive zoning method. Convert the coordinate range from the geographic coordinate system to the Gaussian projection coordinate system using the following formula: Where l is the difference in longitude between the calculation point and the central meridian (unit: degrees), Let t be the radius of curvature of the ramusoidal circle, t = tanB, and η = e′cosB. The eccentricity of the CGCS2000 ellipsoid. The second eccentricity of the CGCS2000 ellipsoid is given by: semi-major axis a = 6378137 m, flattening f = 1 / 298.257222101.
[0063] A3. Virtually extend the Gaussian projection result; the equidistant grid encoding rule virtually extends the projection plane to S×2. L Where S is the scale of the smallest unit and L is the grid level; this embodiment takes the highest level 17 as an example.
[0064] A4. Recursively partition the virtual extended projection range using a quadtree. Based on the virtual extension, the equidistant mesh is further partitioned layer by layer using a quadtree on the 0th-level equidistant mesh until the smallest scale is reached. Figure 1 As shown.
[0065] Figure 1 In this process, each grid code adopts a cross-coding method with horizontal and vertical coordinates, forming a Morton cross-coding with the vertical coordinate code first and the horizontal coordinate code second; then, scale information is incorporated into the code according to a multi-scale coding method to finally form the grid code.
[0066] II. Multi-scale coding design
[0067] Multi-scale coding is essentially a quadtree pyramid structure. Following the principle of geometric progression summation, the total number of grids in all levels (the first 16 levels) above the base level (level 17) is... Therefore, it has enough coding space to accommodate quadtree meshes of all scales (level 1 to level 17).
[0068] The basic idea behind equidistant grid multi-scale encoding calculation is as follows: Based on the single-scale integer encoding, the integer value of the single-scale encoding is multiplied by 2 (left-shifted by 1 bit) to obtain the encoding value of the largest scale (largest level, highest resolution) in the multi-scale encoding. Clearly, all integer encoding values in this level are even numbers, and all odd values are left blank. Subsequent levels of encoding are generated based on this level, utilizing the left-blank odd values. Specifically, the average of every four adjacent encoding values is taken to obtain the encoding value for the next level, and so on, thus achieving multi-scale integer encoding of the scene. The purpose of this design is mainly to encode scale and spatial information simultaneously. On the one hand, it reflects the order of the single-scale grid; on the other hand, it reflects the order between scales. Furthermore, the size relationship of the encoding values ensures the inclusion relationship between parent and child units.
[0069] In this embodiment, the maximum number of network layers is set to 17. Based on the coding principle, the properties of multi-scale coding are summarized as follows:
[0070] The range of two-dimensional multi-scale integer coding levels is 0 ≤ L ≤ 17, and the coding interval of the Lth level of two-dimensional multi-scale integer coding is SC. (N) =2 35-2L ,
[0071] Two-dimensional multi-scale integer coding, the 0th code value of the Lth layer is SC (L,0) =2 34-2L -1,
[0072] The value range of i in the Lth layer of two-dimensional multi-scale integer coding is 0 ≤ i ≤ 2. 2L-1 The k-th coded value of the L-th layer in multi-scale integer coding is SC.(L,k) =SC (L,0) +k·SC (L) =2 34-2L -1+k·2 35-2L .
[0073] This embodiment also provides a method for generating multi-scale coding from single-scale coding, as follows:
[0074] B1. Establish a two-dimensional single-scale integer encoding;
[0075] B2. Determine the coding interval SC based on the single-scale grid hierarchy L. (L) and the 0th encoded value SC of layer L (L,0) ;
[0076] B3. Calculate the multi-scale code SC based on the single-scale code k and the level L. (L,k) .
[0077] III. Multi-scale grid coding hierarchy calculation rules
[0078] Multi-scale coding has multiple levels, each with different code values and corresponding grid sizes. Therefore, after performing multi-scale coding, given any code, the coding level needs to be determined during use. Let the multi-scale code value be Mc, and its algorithm implementation steps are as follows:
[0079] C1. If Mc is even, then Mc&1=0, and we can get the level L=17;
[0080] C2. If Mc is odd, calculate the integer Mid = (Mc-1)∧(Mc+1) using the XOR operation. The purpose is to calculate how many of the first high-order bits of Mc-1 and Mc+1 are the same, and find the nearest common parent code of these two multi-scale integer codes.
[0081] C3. Determine how many bits are 0 on the left side of the integer Mid (taking 64-bit as an example) using a branching method, calculate the level L of the multi-scale integer code Mc, first set L = 0, and then perform the following judgment:
[0082] ① Use 0xFFFFFFFF00000000 to get the high-order bits of Mid, then right-shift by 32 bits to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x00000000FFFFFFFF, and L = 32.
[0083] ② Use 0xFFFF0000 to get the high-order bit of Mid, then right-shift by 16 bits to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x0000FFFF, and L = L + 16.
[0084] ③ Use 0xFF00 to get the high-order bit of Mid, then right-shift by 8 bits to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x00FF, and L = L + 8.
[0085] ④ Use 0xF0 to get the high-order bit of Mid, then right-shift by 4 bits to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x0F, and L = L + 4.
[0086] ⑤ Use 0xC to get the high-order bit of Mid, then right-shift by 2 bits to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x3, and L = L + 2.
[0087] ⑥ Use 0x2 to get the high-order bit of Mid, then shift it right by 1 bit to get Mid0. Determine if Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x1, and L = L + 1.
[0088] ⑦ Convert the L calculated according to the above steps to obtain the level n = (N>>1)-14.
[0089] IV. Multi-scale coding and grid coding conversion rules
[0090] The calculation of coordinates first requires determining the level of the code, then determining the face coordinates of the corresponding base-level sub-unit code, and finally calculating the grid coordinates through a shift operation based on the multi-scale generation rules (merging four adjacent grid codes to obtain the unit of the next higher level). Let the multi-scale code value be Mc, then the calculation method and steps for the single-scale code value are as follows:
[0091] D1. Calculate the encoding level L;
[0092] D2, calculate the coding interval SC of the Lth layer based on the layer level L. (L) =2 35-2L ;
[0093] D3, based on the multi-scale coding value SC (L,k) and the coding interval SC of the Lth layer (L)Calculate the position of the multi-scale code in the Lth level, i.e., the single-scale code value k = (SC (L,k) -SC (L,0) )÷SC (L) =(SC) (L,k)) -(2 34-2L -1))÷2 35-2L ;
[0094] D4 calculates the grid coordinates corresponding to the single-scale code. Based on the grid coordinates, the single-scale code value is calculated by cross-biting. Based on the single-scale code value, the corresponding grid coordinates are calculated by reverse cross-biting.
[0095] V. Multi-scale coding hierarchical relationship operation
[0096] The core of multi-scale grid coding lies in constructing a spatial information coding system capable of flexibly adapting to the needs of different scales. This system not only supports efficient querying and management of grids within the same scale but also establishes clear hierarchical relationships between different scales, enabling cross-scale information association and integration. Besides multi-scale encoding, decoding, and hierarchical operations, it also needs to implement hierarchical relationship operations such as neighbor grid queries, parent grid queries, and child grid queries, for example… Figure 2 As shown.
[0097] 1. Neighborhood grid query
[0098] Grid neighborhood queries are commonly used to analyze the spatial characteristics of a region's surroundings, such as in environmental impact assessments and land use compatibility analyses in urban planning. Through grid neighborhood queries, decision-makers can quickly understand the spatial relationships within and outside a given area, providing a scientific basis for policy formulation and project site selection.
[0099] Given a multi-scale grid Mcode, its neighborhood code set at the same level is Ω. nb Ω nb The calculation steps are as follows:
[0100] E1. Use decoding methods to obtain the grid level L and grid coordinates (x,y);
[0101] E2. Calculate the set of grid coordinates for the neighborhood grid. Where i n j n ∈{-1,0,1},∑|i n |+|j n |≠0, n∈[1,N] and 0≤x+i n ≤(N L -1), 0≤y+j n ≤(N L -1), set The maximum number of elements in the middle is (3) N -1), N is the dimension of the grid, and N = 2 in a two-dimensional planar space.
[0102] E3. Use encoding methods to convert grid coordinates Convert to multi-scale coding Ω nb .
[0103] 2. Parent grid query
[0104] Parent grid lookup is the process of quickly locating and querying the parent grid code of a given grid code. As can be seen from the structure of multi-scale coding, for two-dimensional multi-scale integer coding of the Earth's surface, the parent grid code is the average of four adjacent codes. The core of parent grid coding is to determine the position and level of the grid.
[0105] Given a multi-scale grid Mcode, find the parent grid of its query level Lp. The algorithm principle is as follows:
[0106] According to k = (SC) (L,k)) -(2 34-2L -1))÷2 35-2L The position of multi-scale integer encoding Mcode in layer L
[0107] According to the multi-scale coding rules, the position of the parent grid at the Lp level corresponding to Mcode is: Therefore, it can be inferred that Mcode queries the parent grid of level Lp. for
[0108] Since L≤17 and Lp<L, we know that 0≤2 34-2L -1 < 2 34-2Lp ,have Mcode is the parent grid encoding of level Lp. It can be written as Further, it can be written as
[0109] 3. Subgrid query
[0110] In multi-scale grid systems, as datasets expand, the demand for spatial information analysis increases, requiring the ability to acquire data from each sub-region with high precision during processing and querying. Sub-grid queries, based on the parent grid's encoding, traverse and query all its contained sub-grid codes, achieving the refinement and expansion of spatial information from macro to micro levels. According to the encoding rules of multi-scale grids, the parent grid's encoding value is the average of the sub-grid codes. For sub-grid queries at any level, the most important aspect is determining the initial encoding value and location of the sub-grid at that level.
[0111] Given a multi-scale grid Mcode, find the set of subgrids at query level Lp (L < Lp ≤ 17). The algorithm principle is as follows:
[0112] Assuming the multi-scale grid is located at position j in the Lth layer, according to formula SC (L,k) =SC (L,0) +k·SC (L) =2 34-2L -1+k·2 35-2L Multi-scale mesh Mcode=2 34-2L -1+j·2 35-2L Then the positions of the grid Mcode corresponding to the Lp layer are [j·4] Lp-L ,(j+1)·4 Lp-L -1].
[0113] For level Lp, the sub-network encoding range corresponding to grid Mcode is: in,
[0114]
[0115] The set of subgrids of network Mcode is
[0116] Example 2
[0117] In the grid partitioning for Earth's spatial coverage, theoretically each level of grid should cover the entire globe, including the North and South Poles. However, as the grid approaches the North and South Poles, its area on the Earth's surface gradually decreases, necessitating special processing of the equidistant grids in the polar regions. Therefore, this embodiment employs a separate partitioning method for the polar regions.
[0118] For the polar regions, a spherical azimuth projection is used in areas at latitudes of 65° and above (65°N, 90°N and 65°S, 90°N) centered on the pole. The projection surface is divided into subdivisions on a spherical cap with a radius of 5×219m centered on the pole, with a maximum level of 20 layers. This ensures that a grid with a minimum granularity of 5m can cover the polar regions above 65° (the maximum inscribed circle) and can cover a portion of the region at 54° (the maximum corner point), as shown in the figure. A recursive quadtree subdivision is then performed on this region, with the subdivision axis parallel to the projection lines of the 0° and 90° meridians. This subdivision, with 20 levels and a minimum granularity of 5m, can cover the polar regions at 65° and above.
[0119] Establish a normal azimuth projection coordinate system with the origin at the poles, the x-axis pointing towards the 0° meridian, and the y-axis pointing towards the 90° meridian. Convert the coordinates (B, L) in the geographic coordinate system to coordinates (x, y) in the normal azimuth projection coordinate system using the following conversion formula:
[0120] x = R × cos(B) × cos(L),
[0121]
[0122] Where R is the average radius of the Earth, which is taken as 6,371,000m in this embodiment for polar calculations, B is latitude, and L is longitude.
[0123] For the height domain, it maintains consistency with the Global Equal Grid System (GEDGS) on the reference datum, employing binary tree partitioning to divide the height information according to a preset hierarchy, ensuring its encoding hierarchy matches the planar grid structure. This layer-by-layer binary encoding, such as... Figure 4 As shown, this not only achieves a fine representation of high-level information, but also ensures the consistency and integrity of the entire grid coding model in three-dimensional space, meeting the needs of different application scenarios.
[0124] The following provides an application experiment of equidistant grids. Of course, the experimental basis is the administrative division corresponding to the non-rigid grid region, so as to construct its corresponding non-rigid grid code. The multi-scale local equidistant grid coding method disclosed in this invention is for the subdivision and coding of a certain administrative division.
[0125] The non-rigid mesh encoding includes a non-rigid mesh center domain G and a non-rigid mesh scale domain P. The G domain identifies the center of the equidistant region formed by the non-rigid mesh, and the P domain describes the shape of the equidistant region formed by the non-rigid mesh.
[0126] The G-domain encoding method is as follows: Obtain the row coordinates I and column coordinates J of the center point of the non-rigid mesh region on the 11th layer of the GeoSOT mesh, and calculate the G-domain encoding that forms the non-rigid mesh region.
[0127] The T-domain encoding method is as follows: obtain the network levels m and n of the non-rigid grid region in the latitude and longitude directions, and generate the directional scale code Code2 = (m-1)×11 + (n-1), where m and n are less than or equal to the specified level of the GeoSOT grid. Since the specified level in this embodiment is 11, the values of m and n are both integers between 1 and 11.
[0128] For ease of description, the combination of non-rigid grid coding and multi-scale local equidistant grid coding is called CEDG coding.
[0129] I. Experimental Objective
[0130] With the widespread application of artificial intelligence technology, sufficient data support has become a key factor in improving model performance. However, differences in economic development levels and infrastructure construction among cities have led to a severe imbalance in the spatial distribution of data. For example, consider the distribution of mobile traffic in Italy (see...). Figure 5 Developed cities like Milan possess well-developed mobile communication infrastructure and abundant traffic flow data, while less developed regions like Trentino face data scarcity due to insufficient data collection equipment and low user density. This uneven distribution of data has led current research to focus primarily on data-rich developed cities, neglecting the actual needs of data-scarce regions, thus hindering the application of artificial intelligence technology across a wider geographical area.
[0131] Transfer learning, by transferring general knowledge learned in a source city (data-rich region) to a target city (data-scarce region), can significantly reduce the dependence on local data in the target city. Theoretically, there are certain similarities in traffic flow patterns between different cities; for example, traffic demand in commercial and residential areas exhibits cyclical changes. This consistency in spatial characteristics provides a theoretical basis for cross-regional transfer learning. However, in cross-latitudinal transfer learning, non-equidistant data inputs can cause convergence problems due to grid deformation, affecting the model's generalization performance and prediction accuracy. Equidistant grids, by maintaining consistent distances between grid cells, can maintain spatial scale uniformity globally, effectively mitigating the convergence problem caused by grid deformation.
[0132] The core objective of this experiment is to evaluate the feasibility of applying equidistant grids in cross-regional and cross-latitudinal transfer learning. Therefore, this experiment focuses on the impact of grid design on transfer learning tasks, rather than the optimization of the transfer learning algorithm itself.
[0133] II. Experiment Content
[0134] The experiment employed a rigorous ablation experimental design, systematically evaluating the applicability and effectiveness of equidistant grids in cross-regional and cross-latitude transfer learning by comparing three different input methods: no grid, GeoSOT grid, and CEDG equidistant grid. Low-altitude airspace traffic data from Shenzhen (around 22°N, a low-latitude region) was used for model training, and the data was then transferred to Changchun (around 44°N, a high-latitude region) for testing and fine-tuning. Based on the distribution characteristics of urban hotspots, this experiment generated the necessary data through simulation.
[0135] First, the airspace traffic data is processed in three ways:
[0136] 1. Gridless input: Directly input the raw airspace flow point data into the model.
[0137] 2. GeoSOT grid input: Based on the GeoSOT grid, the data is mapped to regularized latitude and longitude grid cells, and the flow data is statistically analyzed for each grid cell.
[0138] 3. CEDG equidistant grid input: The Shenzhen area is uniformly divided using a CEDG grid, and the flow characteristics of each grid cell are statistically analyzed (see...). Figure 6 The design of the equidistant grid aims to solve the deformation problem of traditional latitude and longitude grids in high-latitude regions caused by the shortening of latitude circles.
[0139] To evaluate the effectiveness of equidistant grids in low-altitude airspace traffic forecasting, this experiment used gridless, GeoSOT, and CEDG equidistant grids as inputs to conduct the following tasks (see [link]). Figure 7 ):
[0140] Source City Model Training: A regression model based on a convolutional neural network is trained on the source domain (low-altitude airspace data of Shenzhen) to learn the features of the source domain data. Features are extracted from the model trained on the source domain and used for prediction in the target domain (data of Changchun).
[0141] Target City Model Transfer: The model trained in the source city is transferred to the target domain. Fine-tuning is performed using a small amount of data from the target city. This can be done by freezing only some layers of the model and training only the last few layers, or by fine-tuning the entire model. The model is then trained in the target domain, parameters are adjusted, and the transfer performance is tested. Mean Squared Error (MSE) is chosen as the loss function.
[0142] III. Results Analysis
[0143] The low-altitude airspace traffic model from Shenzhen was transferred to Changchun for fine-tuning training. The performance of the transferred model is shown in Table 1. For input without a grid, the prediction performance of the transferred model in the target domain decreased significantly due to the lack of spatial partitioning support, resulting in large RMSE and MAE values. When GeoSOT grid was used as input, the performance improved, but the model's adaptability in the target domain was limited due to the inconsistency in cross-latitude accuracy of the grid partitioning. However, the performance after transfer based on CEDG grid was excellent. Thanks to the cross-latitude consistency of the equidistant grid, the model can effectively learn and transfer the spatial distribution patterns of low-altitude airspace traffic.
[0144] Table 1
[0145]
[0146] Figure 8This is the decline curve of the loss function during training and validation. In the early stages of training, the model loss decreases rapidly, indicating that the equidistant grid significantly improves learning efficiency and helps the model quickly capture the characteristics of low-altitude airspace traffic. In the middle stage, the rate of decrease in the loss value gradually decreases, and the model begins to stably learn the characteristics of regional traffic patterns. In the later stage (30 training epochs), the loss value tends to converge, with the training loss and test loss stabilizing at 0.17 and 0.23, respectively, indicating that the model achieves good generalization performance in the target domain without significant overfitting. Meanwhile, although fluctuations in the test set loss occur occasionally, the overall error remains at a low level, further validating the spatial consistency and transfer performance of the equidistant grid. Compared to traditional grid partitioning methods, the equidistant grid avoids the introduction of accuracy errors in cross-latitude scenarios, providing a solid spatial foundation for efficient learning and transfer of traffic patterns.
[0147] The CEDG grid has demonstrated significant advantages in many aspects of cross-latitude applications, and its characteristics and performance have been fully verified.
[0148] First, spatial consistency is a major highlight of the CEDG grid. It maintains consistent grid division across latitudinal applications, effectively avoiding the accuracy errors introduced by other grids during latitudinal transformations. Traditional grid systems may exhibit shape or area deviations across different latitudinal regions due to geographical span, while the CEDG grid ensures spatial consistency through a finely defined equidistant division strategy, thus accurately reflecting actual spatial characteristics in both high and low latitude regions.
[0149] Secondly, the CEDG grid significantly improves the efficiency of model learning traffic patterns by providing a unified spatial partition. Experiments show that models based on the CEDG grid can more effectively capture traffic characteristics between regions, enabling models trained in source cities to maintain strong generalization ability after being transferred to target cities. The spatial consistency of the grid reduces the complexity of the model during training and transfer, and reduces learning bias caused by scale inconsistencies, ultimately achieving a significant performance improvement.
[0150] Furthermore, the CEDG grid exhibits excellent transfer performance. Experimental results show that the transfer learning model based on the CEDG grid significantly outperforms other grids in the target domain. The transferred model demonstrates lower errors (such as lower RMSE and MAE) and higher stability in the target city, indicating that the CEDG grid can more effectively retain and transfer knowledge from the source domain, thereby achieving more accurate traffic prediction for the target domain.
[0151] Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art and related fields based on the embodiments of the present invention without inventive effort should fall within the scope of protection of the present invention.
Claims
1. A multi-scale local equidistant grid encoding method for non-rigid grid regions, wherein the grid encoding of the region is determined based on its extent, characterized in that... Perform meshing of equidistant grids for this area, including the following steps: Step 1: Determine the center of local adaptive zoning with the center of the non-rigid grid area. The range of local adaptive zoning is the boundary of the non-rigid grid. Step 2: After determining the projection base, project the non-rigid grid. Project the non-rigid grid onto a two-dimensional plane under local adaptive zoning, and convert the coordinate range in the geographic coordinate system to the coordinate range in the Gauss projection coordinate system. Step 3: Virtually extend the Gaussian projection result. The equidistant grid encoding rule virtually extends the projection plane to S×2. L Where S is the scale of the smallest unit and L is the grid level; Step 4: Perform recursive quadtree meshing on the projected range after virtual expansion. Based on the virtual expansion, perform layer-by-layer quadtree meshing on the level 0 equidistant grids until the minimum scale.
2. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 1, characterized in that, Each grid code adopts the method of cross-coding of horizontal and vertical coordinates, forming a Morton cross code with the vertical coordinate code in front and the horizontal coordinate code behind; then incorporate the scale information into the code according to the multi-scale coding method to finally form the grid code.
3. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 2, characterized in that, If the highest network level is 17, then the range of the two-dimensional multi-scale integer coding levels is 0 ≤ L ≤ 17, and the coding interval of the Lth layer of the two-dimensional multi-scale integer coding is SC. (N) =2 35-2L , Two-dimensional multi-scale integer coding, the 0th code value of the Lth layer is SC (L,0) =2 34-2L -1, The value range of i in the Lth layer of two-dimensional multi-scale integer coding is 0 ≤ i ≤ 2. 2L-1 The k-th coded value of the L-th layer in multi-scale integer coding is SC. (L,k) =SC (L,0) +k·SC (L) =2 34-2L -1+k·2 35-2L .
4. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 3, characterized in that, The method for generating multi-scale codes from single-scale codes is as follows: Step A1: Establish a two-dimensional single-scale integer code. Step A2: Determine the encoding interval SC based on the single-scale grid hierarchy L. (L) and the 0th encoded value SC of layer L (L,0) ; Step A3: Calculate the multi-scale code SC based on the single-scale code k and the level L. (L,k) .
5. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 3, characterized in that, Calculation rules for multi-scale grid code levels: Let the value of the multi-scale code be Mc and the total number of levels be N. The algorithm implementation steps are as follows: Step B1: If Mc is even, then Mc & 1 = 0, and the level L = 17 can be obtained. Step B2: If Mc is odd, calculate the integer Mid = (Mc - 1) ^ (Mc + 1) through exclusive OR operation to find the nearest common parent code of these two multi-scale integer codes. Step B3: Determine how many bits on the left of the integer Mid are 0 through branching methods to calculate the level L of the multi-scale integer code Mc. First, let L = 0, and then perform the following judgments: Use 0xFFFFFFFF00000000 to get the high-order bits of Mid, then right-shift by 32 bits to get Mid0. Check if Mid0 is 0. If Mid0 is 0... 0≠ If 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x00000000FFFFFFFF, and L = 32; Take the high bits of Mid using 0xFFFF0000 and then shift it 16 bits to the right to get Mid0. Determine whether Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0 and L remains unchanged; otherwise, Mid = Mid & 0x0000FFFF and L = L + 16. Take the high bits of Mid using 0xFF00 and then shift it 8 bits to the right to get Mid0. Determine whether Mid0 is 0. If Mid0 ≠ 0, then Mid = Mid0 and L remains unchanged; otherwise, Mid = Mid & 0x00FF and L = L + 8. Use 0xF0 to retrieve the high-order bits of Mid, then right-shift by 4 bits to get Mid0. Check if Mid0 is 0. If Mid0 is 0... 0≠ If the value is 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x0F, and L = L + 4. Use 0xC to retrieve the high-order bits of Mid, then right-shift by 2 bits to get Mid0. Check if Mid0 is 0. If Mid0 is 0... 0≠ If the value is 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0 x 3, and L = L + 2. Use 0x2 to retrieve the high-order bit of Mid, then right-shift by 1 bit to get Mid0. Check if Mid0 is 0. If Mid0 is 0... 0≠ If the value is 0, then Mid = Mid0, and L remains unchanged; otherwise, Mid = Mid & 0x1, and L = L + 1. Convert the L calculated according to the above steps to get the level n = (N >> 1) - 14.
6. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 3, characterized in that, Let the multi-scale code value be Mc. The calculation method and steps for the single-scale code value are as follows: Step C1: Calculate the level L of the code. Step C2: Calculate the coding interval SC of the Lth layer based on the layer L. (L) =2 35-2L ; Step C3, based on the multi-scale encoded value SC (L,k) and the coding interval SC of the Lth layer (L) Calculate the position of the multi-scale code in the Lth level, i.e., the single-scale code value k = (SC (L,k) -SC (L,0) )÷SC (L) =(SC) (L,k)) -(2 35-2L -1))÷2 35-2L ; Step C4: Calculate the grid coordinates corresponding to the single-scale code. According to the coordinates of the grid, calculate the single-scale code value through the method of cross-taking bits; according to the single-scale code value, calculate the corresponding grid coordinates through the reverse cross-taking bit method.
7. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 3, characterized in that, Parent grid lookup is the process of quickly locating and querying the parent grid code of a given grid code. Given a multi-scale grid Mcode, the parent grid of the query level Lp is the parent grid. The calculation steps are as follows: Step D1: Obtain the level L where the grid is located according to the multi-scale grid code level calculation method. Step D2: Calculate the position j of the multi-scale integer code Mcode at the Lth level. Step D3: Calculate the position k of the parent grid of the position j at the Lth level in the query level Lp (Lp < L). Step D4: Calculate the parent grid code of Mcode at the query level Lp 8. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 3, characterized in that, Subgrid lookup is the process of quickly locating and querying the set of subgrids to which a given grid code belongs. Given a multi-scale grid Mcode, its set of subgrids is...
9. The multi-scale local equidistant grid encoding method for non-rigid grid regions according to claim 1, characterized in that, For the polar regions, a spherical azimuth projection is used in areas at latitudes of 65° and above (65°N to 90°N and 65°S to 90°N), centered on the pole. The projection surface is divided into subdivisions on a spherical cap with a radius of 5×219m, centered on the pole, with a maximum level of 20 layers. This allows a minimum granularity of 5m to cover polar regions above 65° and a maximum coverage of areas up to 54°. A recursive quadtree subdivision is then performed in this region, with the subdivision axis parallel to the projection lines of the 0° and 90° meridians. This subdivision has 20 levels with a minimum granularity of 5m, covering polar regions at latitudes of 65° and above.