Adaptive grid coding method, device and system for Beidou grid codes

By using an adaptive grid coding method and leveraging multi-threaded parallel tree traversal and the separating axis theorem, the problems of coding integrity and computational efficiency in large-scale oblique photogrammetry 3D models were solved, achieving fast and accurate BeiDou grid code assignment.

CN121585176AActive Publication Date: 2026-02-27ZHONGKE XINGTU YIMA (WUXI) TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202610108283.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-02-27
Estimated Expiration
2046-01-27

AI Technical Summary

Technical Problem

Existing technologies struggle to balance coding integrity and computational efficiency in the process of assigning BeiDou grid codes to large-scale oblique photogrammetric 3D models. Traditional methods suffer from omissions or high computational complexity, consume huge resources, and lack in-depth utilization of the hierarchical structure of BeiDou grid codes.

Method used

An adaptive grid coding method is adopted, which performs top-down hierarchical tree traversal coding on triangular facet data through multi-threaded parallel processing. Combined with axis-aligned bounding boxes and the separating axis theorem, coarse screening and precise detection are performed, and duplicates are removed and merged to obtain the BeiDou grid code set.

Benefits of technology

It achieves high-efficiency computation while ensuring coding integrity, improves coding speed and memory utilization efficiency, significantly reduces the risk of missing code, and is suitable for fast coding of large-scale 3D models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585176A_ABST
    Figure CN121585176A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Beidou grid codes, and particularly discloses a self-adaptive grid coding method, device and system for Beidou grid codes, and the method comprises the steps: obtaining oblique photography three-dimensional model data; analyzing and processing the oblique photography three-dimensional model data to obtain all triangular patch data forming the oblique photography three-dimensional model; parallel tree traversal coding is carried out on all triangular patch data according to a multi-working-thread parallel mode, and each working thread independently carries out hierarchical tree traversal coding on respective triangular patch data according to a top-down sequence until a preset target level is reached; the sequence from top to bottom is determined according to the hierarchical standard of the Beidou grid code; carrying out merging and duplicate removal processing on preset target level grid codes obtained after traversal of each working thread to obtain a Beidou grid code set; and outputting the Beidou grid code set. The adaptive grid coding method for the Beidou grid code provided by the invention can give consideration to both coding integrity and calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Beidou grid code technology, and in particular to a self-adaptive grid coding method, device and system for Beidou grid code. BACKGROUND

[0002] Beidou grid code is increasingly widely used in low-altitude fields, especially in scenes such as unmanned aerial vehicle aerial survey, low-altitude economic supervision, and urban airspace management, and it is necessary to accurately code large-scale oblique photography three-dimensional models in a grid to achieve unified identification and efficient retrieval of spatial positions.

[0003] Oblique photography technology can obtain the real three-dimensional structure of ground objects, and the OSGB, 3DTiles and other format models generated thereby contain a large amount of triangular mesh patches, and a single city-level scene often contains millions or even hundreds of millions of triangular meshes. How to quickly and accurately assign Beidou grid codes to these complex three-dimensional entities is a technical problem that needs to be solved urgently at present.

[0004] However, the prior art still has obvious limitations in processing large-scale oblique photography three-dimensional models. On the one hand, traditional coding methods based on point sampling (such as vertex sampling, barycenter sampling, etc.) are difficult to accurately cover large areas of triangular mesh patches, and are prone to omissions in high-precision grid coding scenarios, resulting in incomplete spatial representation of data; on the other hand, although the dense sampling method based on bounding boxes alleviates the omission problem to some extent, the computational complexity is extremely high, and the resource consumption is huge, which makes it difficult to meet the real-time processing needs of massive data. In addition, the existing technology generally lacks deep use of the hierarchical structure of Beidou grid codes, and there is a lack of accurate intersection detection between three-dimensional entities and grid cells, which makes it difficult to balance accuracy and efficiency.

[0005] Therefore, how to provide a grid coding method that takes into account coding completeness and computational efficiency has become a technical problem that needs to be solved by those skilled in the art. SUMMARY

[0006] The present application provides a self-adaptive grid coding method, device and system for Beidou grid code, which solves the problem of being unable to balance coding completeness and computational efficiency in related technologies.

[0007] As a first aspect of the present application, a self-adaptive grid coding method for Beidou grid code is provided, comprising: obtaining oblique photography three-dimensional model data, the data format of the oblique photography three-dimensional model data at least including OSGB, OBJ and 3dTiles; analyzing and processing the oblique photography three-dimensional model data to obtain all triangular patch data constituting the oblique photography three-dimensional model; According to the multi-thread parallel mode, the parallel tree traversal coding is performed on all the triangular patch data, wherein each thread independently performs hierarchical tree traversal coding on the respective triangular patch data in a top-down order until a preset target level is reached, and the top-down order is determined according to the level standard of the Beidou grid code; The preset target level grid codes obtained by each thread are merged and de-duplicated to obtain a Beidou grid code set; The Beidou grid code set is output.

[0008] Further, the oblique photography three-dimensional model data is parsed to obtain all the triangular mesh data constituting the oblique photography three-dimensional model, including: All the triangular patch data in the oblique photography three-dimensional model data is extracted, and the triangular patch data at least includes three vertex coordinates of the triangular patch and index information of the triangular patch topology relationship; The axis-aligned bounding box of each triangular patch in the triangular patch data is calculated to obtain the minimum cubic range wrapping each triangular patch.

[0009] Further, according to the multi-thread parallel mode, the parallel tree traversal coding is performed on all the triangular patch data, including: Each triangular patch in all the triangular mesh patch data is stored as an independent computing task in a task pool; The number of cores of the current CPU is dynamically created to create a work thread, wherein each work thread can obtain a triangular patch from the task pool to perform hierarchical tree traversal coding on the triangular patch in a top-down order of the Beidou grid code until a preset target level is reached.

[0010] Further, each work thread can obtain a triangular patch from the task pool to perform hierarchical tree traversal coding on the triangular patch in a top-down order of the Beidou grid code until a preset target level is reached, including: The traversal path of the triangular patch is constructed according to the breadth-first search strategy; Starting from the first level of the Beidou grid code, the grid nodes of each level are coarsely screened and traversed to determine whether the triangular patch and the grid node intersect in space, and the Beidou grid code includes multiple level structures arranged in a top-down manner, and each grid code in the level structure is defined as a grid node; When it is determined that the triangular patch and the grid node intersect in space, the subordinate grid nodes of the grid node are coarsely screened and traversed and / or accurately detected and traversed until the current traversal level reaches the target preset level, and the target preset level grid code corresponding to the current triangular patch is obtained. Collecting the target preset level grid code of each working thread.

[0011] Further, the grid nodes of each level are subjected to coarse screening traversal starting from the first level of the Beidou grid code, to determine whether the triangular patches and the grid nodes intersect in space, including: calculating the axis-aligned bounding box of the current grid node; determining whether the axis-aligned bounding box of the current grid node and the axis-aligned bounding box of the triangular patch overlap; if the axis-aligned bounding box of the current grid node and the axis-aligned bounding box of the triangular patch overlap, it is determined that the current grid node and the triangular patch intersect in space; if the axis-aligned bounding box of the current grid node and the axis-aligned bounding box of the triangular patch do not overlap, it is determined that the current grid node and the triangular patch do not intersect in space, and the processing of the current grid node and the subordinate grid nodes thereof is abandoned.

[0012] Further, when it is determined that the triangular patch and the grid node intersect in space, the subordinate grid nodes of the grid node are subjected to coarse screening traversal and / or accurate detection traversal until it is determined that the current traversal level is the target preset level, to obtain the target preset level grid code corresponding to the current triangular patch, including: when it is determined that the triangular patch and the grid node intersect in space, it is determined whether the level of the subordinate grid nodes of the grid node is the target preset level; if the level of the subordinate grid nodes of the grid node is not the target preset level, the level of the subordinate grid nodes of the grid node is subjected to coarse screening traversal until it is determined that the traversal level is the target preset level; if the level of the subordinate grid nodes of the grid node is the target preset level, the subordinate grid nodes of the grid node are subjected to accurate detection traversal to obtain the target preset level grid code corresponding to the current triangular patch.

[0013] Further, the accurate detection traversal of the subordinate grid nodes of the grid node includes: constructing a set of potential separation axes according to the subordinate grid nodes of the grid node and the triangular patch, the set of potential separation axes including at least the face normal vector axes and edge normal vector axes of the subordinate grid nodes of the grid node and the face normal vector axes and edge normal vector axes of the triangular patch; calculating the projection of the triangular patch and each subordinate grid node of the grid node on each axis in the set of potential separation axes, respectively; determining whether the projection of the triangular patch on each axis and the projection of each subordinate grid node on each axis overlap; The sub-grid node on each axis that is overlapped by the projection is determined to intersect with the triangular patch, and the grid surface of the intersected sub-grid node is determined as the target preset level grid code.

[0014] Further, the preset target level grid codes obtained after each work thread is traversed are merged and de-duplicated to obtain a Beidou grid code set, including: The preset target level grid codes obtained after all threads are traversed are converged to a global de-duplication container to remove duplicate preset target level grid codes. The remaining target preset level grid codes after the duplicate target preset level grid codes are removed are merged to obtain a Beidou grid code set.

[0015] As another aspect of the present application, an adaptive grid coding device for Beidou grid codes is provided for implementing the adaptive grid coding method for Beidou grid codes described above, which comprises: An acquisition module is configured to acquire oblique photography three-dimensional model data, and the data format of the oblique photography three-dimensional model data at least includes OSGB, OBJ and 3dTiles; An analysis processing module is configured to analyze and process the oblique photography three-dimensional model data to obtain all triangular patch data constituting the oblique photography three-dimensional model; A traversal coding module is configured to perform parallel tree traversal coding on all triangular patch data according to a multi-work thread parallel mode, wherein each work thread independently performs hierarchical tree traversal coding on the respective triangular patch data in a top-down order until a preset target level is reached, and the top-down order is determined according to the level standard of the Beidou grid code; A de-duplication and merging module is configured to merge and de-duplicate the preset target level grid codes obtained after each work thread is traversed to obtain a Beidou grid code set; An output module is configured to output the Beidou grid code set.

[0016] As another aspect of the present application, an adaptive grid coding system for Beidou grid codes is provided, which comprises an oblique photography three-dimensional model data acquisition device and the adaptive grid coding device for Beidou grid codes described above, wherein the oblique photography three-dimensional model data acquisition device is in communication connection with the adaptive grid coding device for Beidou grid codes, The oblique photography three-dimensional model data acquisition device is configured to acquire oblique photography three-dimensional model data; The adaptive grid coding device for Beidou grid codes is configured to analyze and process the oblique photography three-dimensional model data, and perform parallel tree traversal coding on the analyzed triangular patch data based on a multi-work thread to obtain a Beidou grid code set.

[0017] The adaptive grid coding method for BeiDou grid codes provided by this invention parses the acquired oblique photogrammetry 3D model data to obtain triangular facet data, and then encodes the triangular facet data using a multi-threaded parallel tree traversal encoding method. Finally, it deduplicates and merges the grid codes of a preset target level obtained from the multi-threaded method to obtain a set of BeiDou grid codes for the oblique photogrammetry 3D model data. This adaptive grid coding method for BeiDou grid codes effectively improves computational efficiency through parallel threads, and the parallel tree traversal encoding method also ensures coding integrity. Therefore, this adaptive grid coding method for BeiDou grid codes can balance coding integrity and computational efficiency. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof.

[0019] Figure 1 The flowchart shows the adaptive grid coding method for BeiDou grid codes provided by this invention.

[0020] Figure 2 A schematic diagram of the oblique photogrammetry three-dimensional model data provided by the present invention.

[0021] Figure 3 This is a flowchart for parsing and processing oblique photogrammetric 3D model data provided by the present invention.

[0022] Figure 4 This is a flowchart for performing parallel tree traversal encoding on all triangular facet data provided by the present invention.

[0023] Figure 5 This is a flowchart illustrating the independent traversal encoding for each worker thread provided by the present invention.

[0024] Figure 6 This is a schematic diagram of hierarchical tree traversal and pruning provided by the present invention.

[0025] Figure 7 The flowchart illustrates the geometric intersection detection process of the separation axis theorem provided by this invention.

[0026] Figure 8 This invention provides a flowchart for merging and deduplicating grid codes at a preset target level.

[0027] Figure 9a This invention provides a set of BeiDou grid codes for the final encoding of oblique photogrammetry 3D model data.

[0028] Figure 9bThis is another level of BeiDou grid code set for the final encoding of the oblique photogrammetry 3D model data provided by this invention.

[0029] Figure 9c This is another level of BeiDou grid code set for the final encoding of the oblique photogrammetry 3D model data provided by this invention.

[0030] Figure 10 This is a structural block diagram of the adaptive grid coding device for BeiDou grid codes provided by the present invention.

[0031] Figure 11 The diagram shows the structure of the adaptive grid coding system for BeiDou grid codes provided by this invention.

[0032] Figure 12 This is a schematic diagram of the configurable optimization strategies and action points integrated into the system's underlying layer, as provided by the present invention. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] This embodiment provides an adaptive grid coding method for BeiDou grid codes. Figure 1 This is a flowchart of an adaptive grid coding method for BeiDou grid codes provided according to an embodiment of the present invention, such as... Figure 1 As shown, it includes: S100. Obtain oblique photogrammetry 3D model data, wherein the data format of the oblique photogrammetry 3D model data includes at least OSGB, OBJ and 3dTiles; In this embodiment of the invention, the acquired oblique photogrammetry 3D model data can be specifically as follows: Figure 2 As shown, the data format of this oblique photogrammetry 3D model data can include a variety of mainstream formats, including OSGB, OBJ, and 3dTiles.

[0037] S200. The oblique photogrammetry 3D model data is parsed to obtain all the triangle facet data constituting the oblique photogrammetry 3D model. Specifically, the acquired oblique photogrammetry 3D model data can be converted into a standard format that can be processed later. Specifically, the oblique photogrammetry 3D model data can be read by a parser and parsed. The parsing process delves into the internal structure of the model and extracts all the triangular facet data that make up the 3D entity.

[0038] S300. Perform parallel tree traversal encoding on all triangular facet data in a multi-threaded parallel manner. Each thread independently performs hierarchical tree traversal encoding on its own triangular facet data in a top-down order until a preset target level is reached. The top-down order is determined according to the hierarchical standard of Beidou grid code. In this embodiment of the invention, in order to reduce the computational pressure of massive data, a fine-grained multi-threaded parallel approach is used to perform parallel tree traversal encoding on all triangular facet data. This approach reduces the computational pressure of massive data through parallel threads, and also effectively removes irrelevant BeiDou grid codes by having each working thread perform hierarchical tree traversal encoding in a top-down order, thereby reducing computational complexity and improving computational efficiency.

[0039] It should be understood that the hierarchical standard of the BeiDou grid code in the embodiments of the present invention can specifically be GB / T39409-2020 BeiDou grid location code.

[0040] S400: Merge and deduplicate the preset target level grid codes obtained after each working thread traverses to obtain a set of Beidou grid codes; In this embodiment of the invention, in order to avoid duplicate grid codes in multi-threaded processes, the grid codes of the preset target level after all threads are finally aggregated are deduplicated and then merged to obtain a set of Beidou grid codes.

[0041] S500, output the BeiDou grid code set.

[0042] In summary, the adaptive grid coding method for BeiDou grid codes provided by this invention obtains triangular facet data by parsing the acquired oblique photogrammetry 3D model data. Then, it encodes the triangular facet data using a multi-threaded parallel tree traversal encoding method. Finally, it deduplicates and merges the grid codes obtained from the multi-threaded methods at a preset target level to obtain a set of BeiDou grid codes for the oblique photogrammetry 3D model data. This adaptive grid coding method for BeiDou grid codes effectively improves computational efficiency through parallel threads, and the parallel tree traversal encoding method ensures coding integrity. Therefore, this adaptive grid coding method for BeiDou grid codes can balance coding integrity and computational efficiency.

[0043] In this embodiment of the invention, the oblique photogrammetry 3D model data is parsed to obtain all the triangular mesh data constituting the oblique photogrammetry 3D model, such as... Figure 3 As shown, it includes: S210. Extract all triangular patch data from the oblique photogrammetry 3D model data. The triangular patch data includes at least the coordinates of the three vertices of the triangular patch and the index information of the topological relationship of the triangular patch. In this embodiment of the invention, the extracted triangular patch data specifically includes the coordinates (x, y, z) of the three vertices of the triangle and index information defining the topological relationship of the triangular patch.

[0044] S220. Calculate the axis-aligned bounding box of each triangular facet in the triangular facet data to obtain the minimum cube range that encloses each triangular facet.

[0045] It should be understood that, while extracting geometric data, the axis-aligned bounding box (AABB) of each triangular facet is calculated immediately, that is, the minimum cubic range that encloses the triangular facet is determined by comparing the extreme values ​​of the coordinates of the three vertices.

[0046] Considering that the original model typically uses a local Cartesian coordinate system or a projected coordinate system, while the BeiDou grid code is based on the Earth's spherical subdivision, the oblique photogrammetry 3D model data is parsed to obtain all the triangular patch data constituting the oblique photogrammetry 3D model, and also includes: Based on the projection matrix, the coordinates of all vertices in the triangular patch data are transformed to obtain latitude, longitude, and elevation data in the WGS84 coordinate system.

[0047] It should be understood that by using the projection matrix to uniformly convert all vertex coordinates into latitude, longitude, and elevation data in the WGS84 coordinate system, a unified mathematical foundation is laid for subsequent spatial calculations.

[0048] In this embodiment of the invention, all triangle facet data are encoded using a parallel tree traversal in a multi-threaded parallel manner, such as... Figure 4 As shown, it includes: S310a. Store each triangle facet in all triangle mesh facet data as an independent computation task in the task pool; Specifically, at the task scheduling level, the system treats millions of triangle facet data as independent computational tasks and places them into a task pool.

[0049] S320a. Dynamically create worker threads based on the current number of CPU cores. Each worker thread can obtain a triangular facet from the task pool and encode the triangular facet in a hierarchical tree traversal order according to the BeiDou grid code from top to bottom until the preset target level is reached.

[0050] It should be understood that worker threads are dynamically created based on the number of CPU cores. Each worker thread obtains a triangle from the task pool and independently executes a top-down hierarchical tree traversal algorithm.

[0051] This hierarchical tree traversal algorithm utilizes the spatial partitioning characteristics of the BeiDou grid code, starting from Level 1 (specifically based on the hierarchical standard of the BeiDou grid code mentioned earlier; in this standard, Level 1 is a large-scale grid, and as the level increases, the grid scale becomes smaller, i.e., the accuracy becomes higher), and searches downwards layer by layer. At each level, the algorithm intelligently judges based on spatial geometric relationships: if the current grid node is spatially separated from the triangle, the node and all its descendant child nodes are directly pruned; if they intersect, the algorithm further subdivides to the next level until the user-specified target subdivision level (such as Level 7 or Level 10) is reached. This "on-demand traversal" strategy avoids ineffective searches of irrelevant regions.

[0052] Specifically, each worker thread can obtain a triangular facet from the task pool, and encode the triangular facet using a hierarchical tree traversal according to the BeiDou grid code in top-down order until a preset target level is reached, such as... Figure 5 As shown, it includes: S310b, Construct the traversal path of the triangle facets according to the breadth-first search strategy; It should be understood that the embodiments of the present invention abandon the traditional brute-force sampling method and make full use of the natural multi-branch tree structure characteristics of the BeiDou grid code. The spatial partitioning of the BeiDou grid code is essentially a recursive quadtree (2D) or octree (3D) structure. The embodiments of the present invention regard each grid code as a node in the tree and use the breadth-first search (BFS) strategy to construct the traversal path.

[0053] S320b: Starting from the first level of the Beidou grid code, a coarse traversal is performed on the grid nodes of each level to determine whether the triangular facets and the grid nodes intersect in space. The Beidou grid code includes multiple hierarchical structures set from top to bottom, and each grid code in the hierarchical structure is defined as a grid node. In this embodiment of the invention, it should be understood that the coarse screening process is a very low-cost and rapid filtering process. Specifically, starting from the first level of the BeiDou grid code, a coarse screening process is performed on the grid nodes of each level to determine whether the triangular facets intersect with the grid nodes in space, including: 1) Calculate the axis-aligned bounding box of the current mesh node; 2) Determine whether the axis-aligned bounding box of the current mesh node overlaps with the axis-aligned bounding box of the triangle facet; 3) If the axis-aligned bounding box of the current mesh node overlaps with the axis-aligned bounding box of the triangle facet, then the current mesh node and the triangle facet are determined to intersect in space. 4) If the axis-aligned bounding box of the current mesh node does not overlap with the axis-aligned bounding box of the triangle face, then it is determined that the current mesh node and the triangle face do not intersect in space, and the processing of the current mesh node and its subordinate mesh nodes is abandoned.

[0054] In this embodiment of the invention, the coarse screening process involves calculating the axis-aligned bounding box of the current mesh node and detecting whether it overlaps with the triangular facet AABB. This comparison method involves only 6 floating-point comparison operations (comparison of the minimum and maximum values ​​of the X, Y, and Z axes), with a complexity of O(1). Once it is determined that there is no overlap, a "pruning" operation can be performed immediately, abandoning further processing of that mesh node and all its subordinate sub-mesh nodes. This coarse screening method of the present invention can filter out more than 80% of irrelevant meshes, greatly reducing the number of subsequent complex calculations.

[0055] S330b When it is determined that the triangular facet intersects with the grid node in space, the subordinate grid nodes of the grid node are subjected to coarse screening and / or precise detection traversal until the current traversal level is determined to be the target preset level, and the target preset level grid code corresponding to the current triangular facet is obtained. In this embodiment of the invention, for leaf nodes that have passed the coarse screening and reached the target subdivision level, in order to further improve accuracy and ensure the geometric integrity of the encoding results, a rigorous geometric intersection test can be performed using the Separating Axis Theorem (SAT). It should be noted that the SAT theorem states that if two convex polyhedra do not intersect, then there must exist a separating axis such that the projection intervals of the two objects on this axis do not overlap. Therefore, a geometric intersection test is performed based on this principle.

[0056] Specifically, when it is determined that a triangular facet intersects with a mesh node in space, a coarse screening traversal and / or a precise detection traversal are performed on the subordinate mesh nodes of that mesh node until the current traversal level is determined to be the target preset level, thereby obtaining the target preset level mesh code corresponding to the current triangular facet, including: 1) When it is determined that a triangular facet intersects with a grid node in space, determine whether the level of the subordinate grid nodes of that grid node is the target preset level; It should be understood that when determining that a triangular facet intersects with a grid node in space, it is necessary to further determine that the level of the subordinate grid nodes of the grid node is the target preset level. Then, a geometric intersection test can be performed based on the separating axis theorem. If the level of the subordinate grid nodes of the grid node is not the target preset level, then the coarse screening traversal continues.

[0057] 2) If the level of the subordinate grid nodes of the grid node is not the target preset level, then perform a coarse traversal of the level of the subordinate grid nodes of the grid node until the traversed level is determined to be the target preset level. In embodiments of the present invention, for example, in combination with Figure 6 As shown, the target preset level is Level 7, while the subordinate grid nodes of the current grid node are at Level 6. Therefore, it is necessary to perform a coarse traversal of the grid nodes at Level 6 until Level 7 is reached. For the grid node at Level 6, its subordinate grid nodes are at Level 7. Therefore, a geometric intersection test based on the separating axis theorem is performed on the subordinate grid nodes at Level 7.

[0058] 3) If the level of the subordinate grid nodes of the grid node is the target preset level, then perform precise detection and traversal of the subordinate grid nodes of the grid node to obtain the target preset level grid code corresponding to the current triangle facet.

[0059] In this embodiment of the invention, the precise detection and traversal of the subordinate grid nodes of the grid node includes: 31) Construct a set of potential separation axes based on the subordinate mesh nodes and triangular facets of the mesh node. The set of potential separation axes includes at least the face normals and edge normals of the subordinate mesh nodes of the mesh node and the face normals and edge normals of the triangular facets. 32) Calculate the projection of the triangular facet and each subordinate mesh node of the mesh node onto each axis in the potential separation axis set; It should be understood that, based on the geometric features of the triangular facets and the cube mesh nodes, the embodiments of the present invention construct a complete set of 13 potential separation axes: including the three face normal vector axes of the cube, the one face normal vector axis of the triangle, and the nine axes generated by the cross products of the three sides of the cube and the three sides of the triangle.

[0060] 33) Determine whether the projection of the triangular facet on each axis overlaps with the projection of each subordinate mesh node on each axis; 34) Determine the subordinate mesh nodes whose projections overlap on each axis as intersecting with the triangular facets, and determine the mesh face of the intersecting subordinate mesh nodes as the target preset level mesh code.

[0061] It should be understood that, for each axis in the set of separation axes constructed above, the projection of the triangular facet and the projection of its subordinate mesh nodes are calculated sequentially on these axes. If projection separation is found on any axis, it can be determined that they are not intersecting; only when the projections on all axes overlap are they finally determined to be intersecting and the mesh code is recorded. This mechanism ensures that the geometric integrity of the encoding result is close to 100%.

[0062] It should be noted that the specific process of this geometric intersection detection based on the separating axis theorem can be described as follows: Figure 7 As shown, first move the vertices of the triangular facet to the coordinate system of the center of the mesh node (in the attached...). Figure 7 The grid nodes are represented by boxes, which makes it easier to understand that each grid can be likened to a box. Then, based on the coarse screening, the target grid nodes can be determined. Then, the separation axis theorem is used to detect the subordinate grid nodes of the target grid nodes, that is, to calculate the projection of the triangular facet and each subordinate grid node on each axis and determine whether they are separated. If they are not separated on all axes, they are determined to be intersecting, and the grid code of the corresponding subordinate grid node is determined to be the target preset level grid code.

[0063] S340b: Collect the target preset level grid code for each worker thread.

[0064] In this embodiment of the invention, after all parallel threads have completed their respective tasks, the system enters the data aggregation stage. Since different triangles (especially adjacent triangles) are highly likely to cover the same grid cell, the local results generated by each thread will inevitably contain a large number of duplicate grid codes. In this embodiment of the invention, to eliminate duplicate grid codes, specifically, the grid codes at a preset target level obtained after each working thread's traversal are merged and deduplicated to obtain a BeiDou grid code set, such as... Figure 8 As shown, it includes: S410. Gather the preset target level grid codes obtained after traversing all threads into a global deduplication container to remove duplicate preset target level grid codes. S420. Merge the remaining target preset level grid codes after removing duplicate target preset level grid codes to obtain the Beidou grid code set.

[0065] In this embodiment of the invention, a highly efficient set merging algorithm can be employed to aggregate the local results of all threads into a global deduplication container (such as std::set or hash table). This container utilizes its internal data structure characteristics to automatically identify and remove duplicate grid code strings during the insertion process, ensuring the uniqueness of the final result. Furthermore, this embodiment of the invention also supports formatted output of the results, which can generate a standard string list file or be serialized into a binary stream for subsequent storage, transmission, or database operations.

[0066] like Figures 9a to 9c As shown, this is the corresponding Figure 2 The oblique photogrammetry 3D model data shown represents the final BeiDou grid code set obtained from the data. Figures 9a to 9c These represent sets of BeiDou grid codes at different target levels, namely Figures 9a to 9c The target level of BeiDou grid codes is constantly increasing, for example, Figure 9a It can represent Level 5. Figure 9b It can represent Level 6. Figure 9c It can represent Level 7. Different levels result in different encoding precision. Obviously, the higher the level, the higher the encoding precision. The specific target level is set according to the user's needs.

[0067] The effectiveness of the adaptive grid coding method for BeiDou grid codes of the present invention will be described below with reference to specific embodiments.

[0068] As a specific implementation of city-level oblique photogrammetry model encoding, a city's UAV low-altitude flight path planning project requires Level 7 (approximately 50-meter accuracy) BeiDou grid code encoding of an oblique photogrammetry model covering approximately 100 square kilometers. Data preparation: The input data is an oblique photogrammetry model in OSGB format, with a model size of approximately 100,000 triangle faces, target level: Level 7. The OSGB model is parsed, vertex coordinates and triangle indices are extracted, and the AABB bounding box of each triangle is calculated. The local coordinates of the model are converted to WGS84 latitude, longitude, and elevation coordinates. Parallel tree traversal is performed, specifically using OpenMP with 8 threads for parallel processing. Each triangle face undergoes independent tree traversal, starting with BFS traversal from Level 1, dynamically pruning non-intersecting branches, and performing SAT (Satisfactory Aspect-Adjustable Threshold) detection at Level 7 leaf nodes. Results from each thread are merged and automatically deduplicated.

[0069] The final performance results are as follows: total encoding time: 1.8 seconds (8 cores in parallel); peak memory usage: approximately 500MB; number of generated grid codes: approximately 1.2 million; encoding integrity: 100% sampling verification coverage.

[0070] Table 1 Performance Comparison Data (Compared with Traditional Methods)

[0071] Additionally, it should be noted that traditional vertex sampling methods only sample 10 points for large triangles (side length 100m), potentially missing more than 40 grid points. This invention addresses the processing of large triangles by automatically expanding the tree traversal to all intersecting Level 7 grids, and using SAT detection to ensure that every intersecting grid is recorded, providing complete coverage regardless of triangle size.

[0072] The final verification results are as follows: For the large triangle (side length 100m): the coverage rate of the traditional method is 62%, while the coverage rate of the present invention is 100%; For the small triangle (side length 10m): the coverage rates of the two methods are comparable, but the present invention is faster.

[0073] In summary, the adaptive grid coding method for BeiDou grid codes provided by this invention has the following advantages: (1) Although traditional vertex sampling has low complexity, it is insufficient for large triangles and has a high omission rate; bounding box dense sampling increases cubically with sampling density, and in city-level and high-level grids, it is easy to have hundreds of millions of sampling points, which is extremely slow and has high memory pressure. In contrast, this invention adopts a combination of "hierarchical tree traversal and SAT", with a complexity of O(N×B×L), where N represents the number of triangles, B represents the average number of branches retained at each level (about 2~4), and L represents the target level. In the typical scenario of "100,000 triangles + Level 7", the amount of computation is about 60 million times, with a single core < 1 second; 8 cores in parallel can reach 0.2 seconds. This complexity comes from the synergy of layer-by-layer pruning and leaf layer fine inspection: the upper layer quickly removes most non-intersecting nodes, and only goes deeper to a finer level when necessary, thereby avoiding exponential expansion of invalid calculations.

[0074] (2) High efficiency: The combination of hierarchical traversal and pruning is 50 to 100 times faster than traditional methods; it maintains stable throughput even in complex scenarios; Accuracy: Leaf layer SAT fine inspection, coding integrity is about 99.97%, significantly reducing the risk of missing coding; Parallel friendly: Independent tasks + dynamic scheduling, 8 cores accelerate by about 7 times, and the load balance is good; Memory friendly: Streaming and lazy strategies, low peak value, avoid overflow, suitable for large-scale batch processing.

[0075] (3) Compared with traditional vertex sampling and bounding box sampling, the present invention is significantly superior to existing solutions in terms of integrity, speed, memory, large triangle processing and parallelism; at the same time, it also has advantages in terms of engineering feasibility and easy integration into existing production pipelines.

[0076] As another embodiment of the present invention, an adaptive grid coding device 100 for BeiDou grid codes is provided, which is used to implement the adaptive grid coding method for BeiDou grid codes described above, wherein, as Figure 10 As shown, it includes: The acquisition module 110 is used to acquire oblique photogrammetry 3D model data, wherein the data format of the oblique photogrammetry 3D model data includes at least OSGB, OBJ and 3dTiles; The parsing and processing module 120 is used to parse and process the oblique photogrammetry 3D model data to obtain all the triangle facet data constituting the oblique photogrammetry 3D model. The traversal encoding module 130 is used to perform parallel tree traversal encoding on all triangular facet data in a multi-threaded parallel manner. Each thread independently performs hierarchical tree traversal encoding on its own triangular facet data in a top-down order until a preset target level is reached. The top-down order is determined according to the hierarchical standard of the Beidou grid code. The deduplication and merging module 140 is used to merge and deduplicate the preset target level grid codes obtained after each working thread traverses, and obtain a set of Beidou grid codes. Output module 150 is used to output the BeiDou grid code set.

[0077] The adaptive grid encoding device for BeiDou grid codes provided by this invention parses the acquired oblique photogrammetry 3D model data to obtain triangular facet data, and then encodes the triangular facet data using a multi-threaded parallel tree traversal encoding method. It then deduplicates and merges the grid codes of a preset target level obtained from the multi-threaded method to obtain a set of BeiDou grid codes for the oblique photogrammetry 3D model data. This adaptive grid encoding device for BeiDou grid codes effectively improves computational efficiency through parallel threads, and the parallel tree traversal encoding method also ensures encoding integrity. Therefore, this adaptive grid encoding device for BeiDou grid codes can balance encoding integrity and computational efficiency.

[0078] The specific working principle of the adaptive grid coding device for BeiDou grid codes of the present invention can be referred to the description of the adaptive grid coding method for BeiDou grid codes above, and will not be repeated here.

[0079] As another embodiment of the present invention, an adaptive grid coding system 10 for BeiDou grid codes is provided, wherein, as Figure 11As shown, it includes: an oblique photogrammetry 3D model data acquisition device 200 and the aforementioned adaptive grid coding device 100 for BeiDou grid codes. The oblique photogrammetry 3D model data acquisition device 200 is communicatively connected to the adaptive grid coding device 100 for BeiDou grid codes. The oblique photogrammetry 3D model data acquisition device 200 is used to acquire oblique photogrammetry 3D model data; The adaptive grid coding device 100 for BeiDou grid codes is used to analyze and process oblique photogrammetry 3D model data, and to obtain a set of BeiDou grid codes by performing parallel tree traversal coding on the analyzed triangular patch data based on multiple working threads.

[0080] The adaptive grid coding system for BeiDou grid codes provided by this invention, sampling the aforementioned adaptive grid coding device for BeiDou grid codes, obtains triangular facet data by parsing the acquired oblique photogrammetric 3D model data. Then, it encodes the triangular facet data using a multi-threaded parallel tree traversal encoding method. Finally, it deduplicates and merges the grid codes of a preset target level obtained from the multi-threaded method to obtain a set of BeiDou grid codes for the oblique photogrammetric 3D model data. This adaptive grid coding system for BeiDou grid codes effectively improves computational efficiency through parallel threads, and the parallel tree traversal encoding method ensures coding integrity. Therefore, this adaptive grid coding system for BeiDou grid codes can balance coding integrity and computational efficiency.

[0081] In this embodiment of the invention, the oblique photogrammetry 3D model data acquisition device 200 can specifically be an unmanned aerial vehicle platform or an oblique photogrammetry camera, etc.

[0082] In terms of architecture optimization design, in order to further explore hardware performance, combined with Figure 12 As shown, the adaptive grid coding system for BeiDou grid codes of the present invention integrates the following configurable optimization strategies at the system bottom layer: (1) Pre-calculated lookup table (LUT): Considering that the size of each level of the grid code is fixed, the system pre-calculates and stores the latitude and longitude span and metric size of each level of grid. In the massive intersection detection calculation, the parameters are obtained directly by looking up the table, avoiding the overhead of hundreds of millions of repeated trigonometric function operations and coordinate transformations.

[0083] (2) Delayed child node generation: During tree traversal, the system abandons the practice of pre-generating all child grid nodes and instead adopts a "lazy evaluation" strategy. Child node objects are dynamically calculated and generated only when the parent node is determined to be intersecting. This strategy significantly reduces the number of temporary objects created, reducing memory allocation fragmentation and garbage collection pressure.

[0084] (3) Direct bounding box calculation: Traditional methods usually require decoding the grid code string into latitude and longitude before calculating the bounding box. This invention optimizes this path by using the bounding box coordinates of the parent node to directly derive the bounding box range of the child node through simple numerical addition and subtraction operations, completely bypassing the expensive string parsing and decoding operations.

[0085] (4) Thread Local Storage (TLS): To avoid frequent memory allocation lock contention in a multi-threaded environment, the system allocates an independent memory pool and temporary container (Thread Local Storage) for each thread. Threads reuse these local resources during computation and only access global memory during the final merging, which significantly improves parallel efficiency.

[0086] (5) SIMD Vectorization Acceleration: To address the numerous vector dot product and cross product operations in SAT detection, the system utilizes the CPU's SSE / AVX instruction set to achieve Single Instruction Multiple Data (SIMD) parallel processing. A single instruction can simultaneously perform operations on the X, Y, and Z components, thereby increasing the core calculation speed of geometric detection by 2 to 4 times.

[0087] The specific working principle of the adaptive grid coding system for BeiDou grid codes of the present invention can be referred to the description of the adaptive grid coding method for BeiDou grid codes above, and will not be repeated here.

[0088] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. An adaptive grid coding method for BeiDou grid codes, characterized in that, include: Oblique photogrammetry 3D model data is acquired, and the data format of the oblique photogrammetry 3D model data includes at least OSGB, OBJ and 3dTiles; The oblique photogrammetry 3D model data is parsed to obtain all the triangular facet data that constitute the oblique photogrammetry 3D model. All triangular facet data are encoded in parallel tree traversal using a multi-threaded parallel approach. Each thread independently encodes its own triangular facet data in a hierarchical tree traversal from top to bottom until a preset target level is reached. The top-down order is determined according to the hierarchical standard of the BeiDou grid code. The preset target level grid codes obtained after each worker thread traverses are merged and deduplicated to obtain a set of Beidou grid codes. Output the set of BeiDou grid codes.

2. The adaptive grid coding method for BeiDou grid codes according to claim 1, characterized in that, The oblique photogrammetry 3D model data is parsed to obtain all the triangular mesh data constituting the oblique photogrammetry 3D model, including: Extract all triangular patch data from the oblique photogrammetry 3D model data. The triangular patch data includes at least the coordinates of the three vertices of the triangular patch and the index information of the topological relationship of the triangular patch. Calculate the axis-aligned bounding box of each triangular facet in the triangular facet data to obtain the minimum cube range that encloses each triangular facet.

3. The adaptive grid coding method for BeiDou grid codes according to claim 1, characterized in that, All triangle patch data are encoded using a parallel tree traversal approach based on multi-threading, including: Each triangle in the triangular mesh data is stored as an independent computation task in the task pool; Worker threads are dynamically created based on the current number of CPU cores. Each worker thread can obtain a triangular facet from the task pool and encode the triangular facet in a hierarchical tree traversal order according to the BeiDou grid code from top to bottom until the preset target level is reached.

4. The adaptive grid coding method for BeiDou grid codes according to claim 3, characterized in that, Each worker thread can obtain a triangular facet from the task pool, and encode the triangular facet using a hierarchical tree traversal according to the BeiDou grid code in top-down order until a preset target level is reached, including: Construct traversal paths for the triangle facets using a breadth-first search strategy; Starting from the first level of the BeiDou grid code, each level of grid nodes is coarsely traversed to determine whether the triangular facets intersect with the grid nodes in space. The BeiDou grid code includes multiple hierarchical structures set from top to bottom, and each grid code in the hierarchical structure is defined as a grid node. When it is determined that the triangle facet intersects with the grid node in space, the subordinate grid nodes of the grid node are subjected to coarse screening and / or precise detection traversal until the current traversal level is determined to be the target preset level, and the target preset level grid code corresponding to the current triangle facet is obtained. Collect the target preset level grid code for each worker thread.

5. The adaptive grid coding method for BeiDou grid codes according to claim 4, characterized in that, Starting from the first level of the BeiDou grid code, a coarse traversal is performed on the grid nodes of each level to determine whether the triangular facets intersect with the grid nodes in space, including: Calculate the axis-aligned bounding box of the current mesh node; Determine whether the axis-aligned bounding box of the current mesh node overlaps with the axis-aligned bounding box of the triangle facet; If the axis-aligned bounding box of the current mesh node overlaps with the axis-aligned bounding box of the triangle facet, then the current mesh node and the triangle facet are determined to intersect in space. If the axis-aligned bounding box of the current mesh node does not overlap with the axis-aligned bounding box of the triangle facet, then it is determined that the current mesh node and the triangle facet do not intersect in space, and processing of the current mesh node and its subordinate mesh nodes is abandoned.

6. The adaptive grid coding method for BeiDou grid codes according to claim 4, characterized in that, When it is determined that a triangular facet intersects with a mesh node in space, a coarse traversal and / or a precise detection traversal are performed on the subordinate mesh nodes of that mesh node until the current traversal level is determined to be the target preset level. This yields the target preset level mesh code corresponding to the current triangular facet, including: When it is determined that a triangular facet intersects with a grid node in space, it is determined whether the level of the subordinate grid nodes of that grid node is the target preset level. If the level of the subordinate grid nodes of the grid node is not the target preset level, then a coarse traversal is performed on the level of the subordinate grid nodes of the grid node until the traversed level is determined to be the target preset level. If the subordinate grid nodes of the current grid node are at the target preset level, then the subordinate grid nodes of the current grid node are precisely detected and traversed to obtain the target preset level grid code corresponding to the current triangle facet.

7. The adaptive grid coding method for BeiDou grid codes according to claim 6, characterized in that, Perform precise detection and traversal of the subordinate grid nodes of this grid node, including: A set of potential separating axes is constructed based on the subordinate mesh nodes of the mesh node and the triangular facets. The set of potential separating axes includes at least the face normals and edge normals of the subordinate mesh nodes of the mesh node and the face normals and edge normals of the triangular facets. Calculate the projection of the triangular facet and each subordinate mesh node of the mesh node onto each axis in the set of potential separating axes; Determine whether the projection of the triangular facet on each axis overlaps with the projection of each subordinate mesh node on each axis; Subordinate mesh nodes whose projections overlap on each axis are identified as intersecting with triangular patches, and the mesh faces of these intersecting subordinate mesh nodes are identified as the target preset level mesh codes.

8. The adaptive grid coding method for BeiDou grid codes according to claim 1, characterized in that, The grid codes obtained after traversing each worker thread are merged and deduplicated to obtain a set of BeiDou grid codes, including: The preset target level grid codes obtained after traversing all threads are aggregated into a global deduplication container to remove duplicate preset target level grid codes; The remaining target preset level grid codes after removing duplicate target preset level grid codes are merged to obtain the Beidou grid code set.

9. An adaptive grid coding device for BeiDou grid codes, used to implement the adaptive grid coding method for BeiDou grid codes according to any one of claims 1 to 8, characterized in that, include: The acquisition module is used to acquire oblique photogrammetry 3D model data, wherein the data format of the oblique photogrammetry 3D model data includes at least OSGB, OBJ and 3dTiles; The parsing and processing module is used to parse and process the oblique photogrammetry 3D model data to obtain all the triangle patch data that constitute the oblique photogrammetry 3D model. The traversal encoding module is used to perform parallel tree traversal encoding on all triangular facet data in a multi-threaded parallel manner. Each thread independently performs hierarchical tree traversal encoding on its own triangular facet data in a top-down order until a preset target level is reached. The top-down order is determined according to the hierarchical standard of Beidou grid code. The deduplication and merging module is used to merge and deduplicate the grid codes of the preset target level obtained after each worker thread traverses the grid code to obtain a set of Beidou grid codes. The output module is used to output the BeiDou grid code set.

10. An adaptive grid coding system for BeiDou grid codes, characterized in that, include: The oblique photogrammetry 3D model data acquisition device and the adaptive grid encoding device for BeiDou grid codes as described in claim 9 are provided, wherein the oblique photogrammetry 3D model data acquisition device is communicatively connected to the adaptive grid encoding device for BeiDou grid codes. The oblique photogrammetry 3D model data acquisition device is used to acquire oblique photogrammetry 3D model data; The adaptive grid coding device for BeiDou grid codes is used to analyze and process oblique photogrammetric 3D model data, and to obtain a set of BeiDou grid codes by performing parallel tree traversal coding on the analyzed triangular patch data based on multiple working threads.

Citation Information

Patent Citations

  • Digital earth three-dimensional space scene management method compatible with Beidou grid

    CN114092654A

  • Spatial data retrieval method and device

    CN117688045A

  • Model construction method and system based on Beidou grid code, and computing device

    CN118628683A

  • Space coding method, processing method and device based on space grid

    CN119741387A

  • LOD model generation method and device, electronic equipment and storage medium

    CN120747365A