Method, system, device and medium for spatiotemporal coding of geographic entities in real-scene three-dimensional systems

Through multi-level network division, BTC Beidou segmentation time code, spatiotemporal embedding model and heap sorting algorithm, combined with Morton code and binary tree coding, the problem of low efficiency in existing technologies is solved, and the fast and accurate spatiotemporal positioning and coding of geographic entities in the real-life three-dimensional system are achieved, thereby improving data processing efficiency and accuracy.

CN119379820BActive Publication Date: 2025-09-19INSPUR SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411448861.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-09-19
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the existing technology, the traditional latitude and longitude coordinate system is inefficient under large amounts of data, and the Morton code still has limitations in processing multi-dimensional spatiotemporal data. It lacks a coding scheme that is closely integrated with the time dimension, making it difficult to meet real-time dynamic management needs.

Method used

It adopts multi-level network division and unique identifier, BTC Beidou segmentation time code, space-time embedding model, Morton code and binary tree coding to optimize spatial data coding and heap sorting algorithm, combined with deep learning technology to generate an efficient space-time coding mechanism to achieve fast and accurate space-time positioning and coding.

Benefits of technology

It improves the efficiency and accuracy of data processing, supports real-time dynamic management, ensures the orderliness and rapid accessibility of data, and is suitable for large-scale real-scene 3D data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379820B_ABST
    Figure CN119379820B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device and medium for spatiotemporal coding of geographic entities in a real-life three-dimensional system, which belongs to the field of three-dimensional scene technology. The technical problem to be solved by the present invention is how to quickly and accurately perform spatiotemporal positioning and coding of geographic entities in a real-life three-dimensional system, thereby improving the efficiency and accuracy of data processing. The technical solution is as follows: multi-level network division and unique identifier: based on the GeoSOT model, the earth's surface is divided into multi-level and multi-scale grids, and the GB / T 40087-2021 earth space grid coding rules are followed. The grid level is determined by calculating the bounding box size of the geographic entity, and a coordinate binary left shift operation is performed at the coordinates of the entity center point. Combined with Morton code conversion and quaternary conversion technology, a unique grid code containing markers for the northern and southern hemispheres and the eastern and western hemispheres is generated; BTC Beidou segmentation time code; spatiotemporal embedding model; combining Morton code and binary tree coding to optimize spatial data coding; and sorting the spatiotemporal codes through a heap sorting algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional scene technology, and in particular to a method, system, device and medium for spatiotemporal coding of geographic entities in a real-scene three-dimensional system. Background Art

[0002] 3D Real Scene (3DRealScene) is a digital virtual space that provides a realistic, three-dimensional, and time-sequential reflection and expression of human production, living, and ecological spaces. It is a new type of standardized basic surveying and mapping product that provides a unified spatial foundation for economic development and informatization. 3D Real Scene is constructed by carrying structured, semantic geographic entities on a 3D geographic scene that support human-machine compatibility and real-time perception through the Internet of Things.

[0003] The advancement of smart city construction and real-world 3D policies has placed higher demands on the precise representation and management of geographic information. Currently, commonly used geographic information encoding methods, such as latitude and longitude coordinates and Morton codes, suffer from large data volumes and low processing efficiency. This is particularly true for dynamically changing spatiotemporal data, which lacks effective encoding and rapid retrieval mechanisms.

[0004] In summary, the prior art has the following shortcomings:

[0005] (1) The traditional latitude and longitude coordinate system is inefficient when dealing with large amounts of data.

[0006] (2) Although Morton code improves the compression efficiency of spatial data, it still has limitations in processing multidimensional spatiotemporal data.

[0007] (3) There is a lack of coding schemes that are closely integrated with the time dimension, making it difficult to meet the needs of real-time dynamic management.

[0008] Therefore, how to quickly and accurately locate and encode geographic entities in real-life three-dimensional systems in space and time and improve the efficiency and accuracy of data processing is a technical problem that needs to be solved urgently. Summary of the Invention

[0009] The technical task of the present invention is to provide a method, system, device and medium for spatiotemporal coding of geographic entities in a real-life three-dimensional system to solve the problem of how to quickly and accurately perform spatiotemporal positioning and coding of geographic entities in a real-life three-dimensional system, thereby improving the efficiency and accuracy of data processing.

[0010] The technical task of the present invention is achieved in the following manner: a method for spatiotemporal coding of geographic entities in a real-scene three-dimensional system, the method being specifically as follows:

[0011] Multi-level network division and unique identifier: Based on the GeoSOT (Geographic Spatial Object Tree) model, the Earth's surface is divided into multi-level, multi-scale grids. Following the GB / T 40087-2021 geospatial grid encoding rules, the grid level is determined by calculating the bounding box size of the geographic entity. The coordinates of the entity center point are binary-shifted to the left. Combined with Morton code conversion and quaternary conversion technology, a unique grid code containing northern and southern hemisphere and eastern and western hemisphere labels is generated, namely the GeoSOT grid position vector;

[0012] BTC BeiDou time code: BTC (BeiDou Time Code) of the BeiDou Navigation Satellite System (BDS) time service is used to generate a time code, dividing time into 42 levels. The STC time single-granularity code is converted into an MTC fixed-length time segment integer code, and the final time code, namely the BTC time vector, is obtained by calculating STC0 and MTC0, achieving accurate expression and unique coding of time information.

[0013] Spatiotemporal Embedding Model: The GeoSOT grid position vector and BTC time vector are used as inputs for a deep learning spatiotemporal embedding model. A multi-layer neural network structure learns spatiotemporal correlations and employs an attention mechanism and HiRA-Pro fusion method in the hidden layer to achieve feature fusion. This generates a semantically rich spatiotemporal embedding vector and ultimately outputs a fixed-length spatiotemporal code.

[0014] Combining Morton Code and Binary Tree Coding to Optimize Spatial Data Coding: Based on GeoSOT grid coding, Morton Code and Binary Tree Coding algorithms are introduced. A quadtree is used for two-dimensional spatial data, and an octree is used for three-dimensional data, dividing the space into four plane quadrants and eight spatial quadrants. Morton Code is used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism.

[0015] Sort the spatiotemporal codes using the heap sort algorithm: By building a heap structure, fast sorting and retrieval of data are achieved, ensuring the orderliness and fast accessibility of data, and improving the overall efficiency of large-scale data set processing.

[0016] As a preferred option, the BTC Beidou split time code is as follows:

[0017] Time coding rules: Based on the time granularity segmentation rules, the geographic entity tag time is divided into 42 levels, and the entire time period is split into five domains (B, C, D, E, and F) for single-granularity STC time coding.

[0018] Time and space association: BTC time code records time information and is combined with GeoSOT grid location code to form a complete time and space identifier, realizing the accurate description of the time and space location of geographic entities.

[0019] Preferably, the time encoding rules are as follows:

[0020] After conversion, STC is simultaneously expressed as a fixed-length integer code MTC divided into 43 time granularities. The maximum time granularity of MTC is 32768 years, and the minimum time granularity is 1 second. 42 different time granularities are recorded in binary coding, such as 1: 1s, 2s, 4s...32s, 1min, 2min, 4min...32min, 1h (hour), 2h, 8h, 16h, 1d (day), 2d, 4d...16d, 1mon (month), 2mon, 4mon, 8mon, 1yr, 4yr...32768yr, 65536yr;

[0021] Take the middle value of STC to get STC0, calculate MTC according to the time segmentation level N to get the time 0 corresponding to MTC0;

[0022] The time code is calculated according to MTC=(STC0>>(43-N))<<(43-N)+MTC0. The time code rule divides time into multiple standard time periods and assigns a unique code to each time period.

[0023] Preferably, the spatiotemporal embedding model includes an input layer, a hidden layer, and an output layer;

[0024] The input layer receives the GeoSOT grid position vector and the BTC time vector, learns the intrinsic correlation between time and space through a multi-layer neural network structure, and maps high-dimensional spatiotemporal data into a low-dimensional embedding space.

[0025] The hidden layer uses attention and HiRA-Pro fusion methods to achieve high-precision alignment of multimodal data in spatiotemporal resolution through process signatures, reducing the impact of spatiotemporal noise, improving the predictive performance of machine learning models, and effectively fusing temporal and spatial features to generate semantically rich spatiotemporal embedding vectors.

[0026] The output layer converts the spatiotemporal embedding vector into a fixed-length spatiotemporal code, which contains precise time information and reflects the spatial location of geographic entities.

[0027] More preferably, the spatial data encoding is optimized by combining Morton code and binary tree coding as follows:

[0028] Data preprocessing: Apply Morton code encoding to each point in a multidimensional dataset (such as a 2D point set or a 3D voxel); and sort the points according to the value of the Morton code.

[0029] Initialize the root node: The root node represents the area of ​​the entire dataset;

[0030] Recursive partitioning: Select the Morton code value of the first point (or the middle point, depending on the specific implementation) from the sorted list of data points. The Morton code value is used to determine how to partition the area represented by the current node; specifically:

[0031] For a quadtree, the decision of whether to partition along the x-axis or the y-axis is based on the bit at a specific position in the Morton code (e.g., the least significant bit);

[0032] For the octree, consider multiple bits to decide along which axis of x, y, z and the direction of division;

[0033] Recursively repeat the division process in each sub-region until the stopping condition is met (such as each sub-region contains only one point, or the maximum depth is reached);

[0034] Query: For a given query point, the Morton code of the query point is first calculated, and then the Morton code is searched in the quadtree. Since the Morton code maintains the locality of the data, the search can usually locate the relevant data area more quickly.

[0035] Retrieval: Once the relevant sub-region is located, the data points that meet the query conditions are retrieved in the corresponding sub-region.

[0036] More preferably, the spatiotemporal codes are sorted by a heap sort algorithm as follows:

[0037] Reading data: When the data set exceeds the preset size, the data set is divided into multiple data blocks to ensure that the size of each data block can be processed in memory, so as to achieve data segmentation and load each block into memory in turn;

[0038] In-memory heap sort: For each data block in memory, create a maximum heap or minimum heap, and use the heap sort method to sort the data blocks in memory. That is, repeatedly remove the maximum or minimum element from the heap, put the maximum or minimum element at the end of the resulting array or list, and then rearrange the remaining elements to restore the heap properties;

[0039] Merge sort results: For the sorted data blocks in memory, use the external merge sort method to merge the sorted data blocks. That is, manage the merging process of data blocks on external storage (such as disk), while minimizing the number of read and write operations to improve efficiency. A minimum heap is created to maintain the minimum element of all currently unmerged data blocks, ensuring that the currently available minimum element is always retrieved and merged, thereby ensuring merge efficiency.

[0040] Detailed optimization: Use multi-way merging to improve merging efficiency, optimize reading and writing, reduce the number of reads and writes to external storage, and reduce disk I / O overhead through caching mechanisms; when available resources allow, parallelize data reading, in-memory heap sorting or merge sorting results, use parallel processing of multiple data blocks, or perform merging operations in parallel on multi-core processors.

[0041] A spatiotemporal coding system for geographic entities in a real-world 3D system. This system, based on the backend Spring framework and the frontend VUE framework, uses the PyTorch deep learning library to build a spatiotemporal feature fusion model. The system cleans the collected dataset to remove noise, then trains the model and performs spatiotemporal coding fusion. The system ultimately integrates the aforementioned spatiotemporal coding method for geographic entities in a real-world 3D system. The system also supports real-time dynamic geographic information management and analysis, including data collection, processing, storage, retrieval, and visualization.

[0042] The system also uses VUE to develop front-end pages, removing redundant functions as much as possible, retaining core pages and functional points, so that users can easily operate the software platform to query, analyze and display geographic information.

[0043] Preferably, the system comprises:

[0044] The multi-level network partitioning module is used to divide the Earth's surface into multi-level and multi-scale grids based on the GeoSOT (Geographic Spatial Object Tree) model. It follows the GB / T 40087-2021 geospatial grid coding rules, determines the grid level by calculating the bounding box size of the geographic entity, and performs a binary left shift operation on the coordinates of the entity center point. Combined with Morton code conversion and quaternary conversion technology, it generates a unique grid code containing the northern and southern hemispheres and the eastern and western hemispheres, namely the GeoSOT grid position vector;

[0045] The BTC BeiDou time code generation module is used to generate a time code using the BTC (BeiDou Time Code) of the BeiDou Navigation Satellite System (BDS) time service. It divides time into 42 levels, converts the STC time single-granularity code into an MTC fixed-length time segment integer code, and calculates the STC0 and MTC0 to obtain the final time code, namely the BTC time vector, to achieve accurate expression and unique coding of time information.

[0046] The spatiotemporal embedding model construction module uses the GeoSOT grid position vector and BTC time vector as input to the deep learning spatiotemporal embedding model. It learns spatiotemporal correlations through a multi-layer neural network structure and uses the attention mechanism and HiRA-Pro fusion method in the hidden layer to achieve feature fusion, generating a semantically rich spatiotemporal embedding vector and ultimately outputting a fixed-length spatiotemporal code.

[0047] The spatial data coding optimization module is used to introduce Morton Code and binary tree coding algorithms based on GeoSOT grid coding. Quadtrees are used for two-dimensional spatial data, and octrees are used for three-dimensional data, dividing the space into four plane quadrants and eight spatial quadrants. Morton codes are used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism.

[0048] The spatiotemporal coding sorting module is used to achieve fast sorting and retrieval of data by building a heap structure, ensuring the orderliness and fast accessibility of data and improving the overall efficiency of large-scale data set processing.

[0049] An electronic device comprising: a memory and at least one processor;

[0050] Wherein, the memory stores a computer program;

[0051] The at least one processor executes the computer program stored in the memory, so that the at least one processor performs the above-mentioned spatiotemporal encoding method for geographic entities in a real-scene three-dimensional system.

[0052] A computer-readable storage medium stores a computer program, which can be executed by a processor to implement the above-mentioned method for spatiotemporal encoding of geographic entities in a real-scene three-dimensional system.

[0053] The method, system, device and medium for spatiotemporal coding of geographic entities in a real-scene 3D system of the present invention have the following advantages:

[0054] (1) The present invention introduces the GeoSOT earth segmentation model and the Beidou segmentation time code rule (BTC), combines the Morton code encoding algorithm and the multi-tree encoding algorithm, and introduces a spatiotemporal feature fusion deep learning model to fuse the spatiotemporal coding features. This solves the problems of low efficiency and poor accuracy of existing spatial data coordinate extraction and encoding algorithms when processing large-scale real-world 3D data. It can quickly and accurately perform spatiotemporal positioning and encoding of geographic entities in the real-world 3D system, thereby improving the efficiency and accuracy of data processing.

[0055] (2) The present invention also uses a heap sort algorithm to optimize the encoding results, further improving the operating speed and stability of the system. It is applicable to the field of geospatial grid encoding, especially when processing large-scale real-scene three-dimensional data.

[0056] (3) When processing large-scale data sets, the present invention applies a heap sort algorithm to sort the spatiotemporal codes to ensure the orderliness and rapid accessibility of the data;

[0057] (4) The present invention uses encryption technology and a rights management mechanism to protect user data and ensure the data security of the software platform. At the same time, it designs an extensible architecture to support the integration and upgrade of more functional modules in the future; the user rights management mechanism is used to protect the security and privacy of user data;

[0058] (5) The present invention converts the GeoSOT grid code into a new format that integrates Morton code and binary tree code, and constructs a corresponding index structure to support fast data retrieval and update operations; wherein, the GeoSOT model is designed with multiple levels, from coarse-grained grids at the global level to fine-grained grids at the city level; the grid size of each level is set according to the needs of the application scenario to ensure that it can cover the global scope and meet the fine management of local areas; and the basic coding algorithm is designed according to the GB / T40087-2021 Earth Grid Coding Rules standard document to ensure that each grid unit can be located by a unique identifier; wherein, the coding rules should take into account the grid level, longitude and latitude range, and possible expansion requirements to ensure the scalability and compatibility of the coding;

[0059] (6) The present invention selects a universal time recording type BTC time code based on the requirements of the application scenario; if there are projects with special requirements, for areas that require high-precision time recording, a precise time recording type BTC can be used; at the same time, based on the universal time recording type BTC described in the GBT / 4257-2023 standard document, a time encoding algorithm is designed to convert time information into a coded form that is easy to store and transmit, ensuring the accuracy and reliability of the encoding;

[0060] (7) The present invention collects a dataset of geographic entities containing temporal and spatial information for training the spatiotemporal embedding model; wherein the dataset should cover different time points and geographic locations to ensure the generalization ability of the model;

[0061] (8) The present invention uses a deep learning framework (PyTorch) to train the model. By adjusting parameters such as the model structure, optimization algorithm, and loss function, the training efficiency and performance of the model are improved. At the same time, the trained model is evaluated using a test dataset to verify the accuracy and efficiency of its spatiotemporal coding, and the model is further optimized and adjusted based on the evaluation results.

[0062] (9) The present invention develops an algorithm fusion strategy that effectively combines Morton code and multitree coding algorithms. Morton code is used to maintain spatial proximity. The four quadrants of two-dimensional spatial coding correspond to quadtree index sorting, and the eight quadrants of three-dimensional spatial coding correspond to octree index sorting. Multitree coding improves the efficiency of data retrieval and indexing, supports fast data retrieval and update operations, and meets the needs of real-time geographic information management.

[0063] (10) The present invention designs a heap sorting strategy for spatiotemporal coding to ensure that the spatiotemporal continuity of data is maintained during the sorting process; the sorting strategy takes into account the distribution characteristics and access patterns of data to improve the efficiency and accuracy of sorting;

[0064] (11) The present invention optimizes the performance of the heap sort algorithm, reduces unnecessary comparison and exchange operations, and optimizes memory access patterns; at the same time, it uses parallel computing technology (GPU acceleration) to further improve the sorting speed;

[0065] (12) The present invention adopts a modular design concept and is divided into multiple independent modules to facilitate system maintenance and upgrades; and designs clear interface specifications to ensure that data exchange and communication between modules can proceed smoothly; at the same time, provides an open API interface so that third-party applications can easily access and use the system; and also implements a user authority management mechanism to ensure that different users can only access data within their authority scope, and protects the security and privacy of user data through encryption technology and security protocols. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The present invention will be further described below with reference to the accompanying drawings.

[0067] Attachment Figure 1 The figure is a flowchart of the spatiotemporal coding method of geographic entities in a real-scene 3D system. DETAILED DESCRIPTION

[0068] The method, system, device and medium for spatiotemporal coding of geographic entities in a real-scene three-dimensional system of the present invention are described in detail below with reference to the accompanying drawings and specific embodiments.

[0069] Example 1:

[0070] As attached Figure 1 As shown, this embodiment provides a method for spatiotemporal coding of geographic entities in a real-scene 3D system, and the method is specifically as follows:

[0071] S1. Multi-level network division and unique identifier: Based on the GeoSOT (Geographic Spatial Object Tree) model, the Earth's surface is divided into multi-level, multi-scale grids. Following the GB / T 40087-2021 Earth Spatial Grid Coding Rules, the grid level is determined by calculating the bounding box size of the geographic entity, and the coordinates are binary-shifted left at the coordinates of the entity center point. Combined with Morton code conversion and quaternary conversion technology, a unique grid code containing northern and southern hemisphere and eastern and western hemisphere labels is generated, namely the GeoSOT grid position vector;

[0072] S2, BTC BeiDou time code: The BeiDou Time Code (BTC) of the BeiDou Navigation Satellite System (BDS) time service is used to generate a time code, dividing time into 42 levels. The STC time single-granularity code is converted into an MTC fixed-length time segment integer code, and the final time code, namely the BTC time vector, is calculated by STC0 and MTC0 to achieve accurate expression and unique coding of time information.

[0073] S3, Spatiotemporal Embedding Model: The GeoSOT grid position vector and BTC time vector are used as inputs to the deep learning spatiotemporal embedding model. The model learns spatiotemporal correlations through a multi-layer neural network structure. The attention mechanism and HiRA-Pro fusion method are used in the hidden layer to achieve feature fusion, generate semantically rich spatiotemporal embedding vectors, and finally output fixed-length spatiotemporal codes.

[0074] S4. Combining Morton Code and Binary Tree Coding to Optimize Spatial Data Coding: Based on GeoSOT grid coding, Morton Code and binary tree coding algorithms are introduced. A quadtree is used for two-dimensional spatial data, and an octree is used for three-dimensional data, dividing the space into four plane quadrants and eight spatial quadrants. Morton Code is used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism.

[0075] S5. Sort spatiotemporal codes using a heap sort algorithm: By building a heap structure, fast sorting and retrieval of data are achieved, ensuring the orderliness and fast accessibility of data, and improving the overall efficiency of large-scale data set processing.

[0076] The BTC Beidou segmentation time code in step S2 of this embodiment is as follows:

[0077] S201, time coding rules: According to the time granularity segmentation rules, the geographic entity tag time is divided into 42 levels, and the entire time is split into five domains B, C, D, E, and F STC time single granularity coding;

[0078] S202. Time-space association: The BTC time code records time information and is combined with the GeoSOT grid location code to form a complete time-space identifier, achieving an accurate description of the time-space location of geographic entities.

[0079] The time encoding rules in step S201 of this embodiment are as follows:

[0080] S20101 and STC are converted and expressed in 43 fixed-length time interval integer codes (MTCs) with a maximum time granularity of 32,768 years and a minimum time granularity of 1 second. These 42 different time granularities are recorded in binary coding, such as: 1s, 2s, 4s...32s, 1min, 2min, 4min...32min, 1h (hour), 2h, 8h, 16h, 1d (day), 2d, 4d...16d, 1mon (month), 2mon, 4mon, 8mon, 1yr, 4yr...32,768yr, and 65,536yr.

[0081] S20102: Take the middle value of STC to obtain STC0, and calculate MTC0 corresponding to time 0 according to the time segmentation level N;

[0082] S20103. Calculate the time code according to MTC=(STC0>>(43-N))<<(43-N)+MTC0. The time code rule divides time into multiple standard time periods and assigns a unique code to each time period.

[0083] The spatiotemporal embedding model in step S3 of this embodiment includes an input layer, a hidden layer, and an output layer;

[0084] The input layer receives the GeoSOT grid position vector and the BTC time vector, learns the intrinsic correlation between time and space through a multi-layer neural network structure, and maps high-dimensional spatiotemporal data into a low-dimensional embedding space.

[0085] The hidden layer uses attention and HiRA-Pro fusion methods to achieve high-precision alignment of multimodal data in spatiotemporal resolution through process signatures, reducing the impact of spatiotemporal noise, improving the predictive performance of machine learning models, and effectively fusing temporal and spatial features to generate semantically rich spatiotemporal embedding vectors.

[0086] The output layer converts the spatiotemporal embedding vector into a fixed-length spatiotemporal code, which contains precise time information and reflects the spatial location of geographic entities.

[0087] The optimization of spatial data coding by combining Morton code and binary tree coding in step S4 of this embodiment is as follows:

[0088] S401, data preprocessing: applying Morton code encoding to each point in a multidimensional data set (such as a two-dimensional point set or a three-dimensional voxel); and sorting the points according to the value of the Morton code.

[0089] S402, initializing the root node: the root node represents the area of ​​the entire data set;

[0090] S403, recursive partitioning: Select the Morton code value of the first point (or the middle point, depending on the specific implementation) from the sorted data point list. The Morton code value is used to determine how to partition the area represented by the current node; specifically:

[0091] For a quadtree, the decision of whether to partition along the x-axis or the y-axis is based on the bit at a specific position in the Morton code (e.g., the least significant bit);

[0092] For the octree, consider multiple bits to decide along which axis of x, y, z and the direction of division;

[0093] Recursively repeat the division process in each sub-region until the stopping condition is met (such as each sub-region contains only one point, or the maximum depth is reached);

[0094] S404, query: For a given query point, first calculate the Morton code of the query point, and then search in the quadtree based on the Morton code; since the Morton code maintains the locality of the data, the search can usually locate the relevant data area more quickly;

[0095] S405, search: once the relevant sub-region is located, search for data points that meet the query conditions in the corresponding sub-region.

[0096] In step S5 of this embodiment, the spatiotemporal codes are sorted by the heap sort algorithm as follows:

[0097] S501, reading data: When the data set exceeds the preset size, the data set is divided into multiple data blocks to ensure that the size of each data block can be placed in the memory for processing, thus realizing data segmentation and loading each block into the memory in sequence;

[0098] S502. In-memory heap sort: For each data block in memory, a maximum heap or minimum heap is created, and the data blocks in memory are sorted using the heap sort method, that is, the maximum or minimum element is repeatedly removed from the heap, the maximum or minimum element is placed at the end of the result array or list, and the remaining elements are rearranged to restore the heap property;

[0099] S503, merging sort results: For the sorted data blocks in the memory, an external merge sort method is used to merge the sorted data blocks. That is, the merging process of the data blocks is managed on the external storage (such as disk), while the number of read and write operations is minimized to improve efficiency. A minimum heap is created to maintain the minimum element of all the currently unmerged data blocks, ensuring that the currently available minimum element is always retrieved and merged, thereby ensuring merging efficiency.

[0100] S504, Detail Optimization: Use multi-way merging to improve merging efficiency, optimize reading and writing, reduce the number of reads and writes to external storage, and reduce disk I / O overhead through caching mechanisms; when available resources allow, parallelize data reading, in-memory heap sorting or merge sorting results, use parallel processing of multiple data blocks, or perform merging operations in parallel on multi-core processors.

[0101] In this embodiment, a quadtree or other spatial indexing technology is used to replace the GeoSOT model.

[0102] In this embodiment, a quadtree or other spatial indexing technology is used to replace the GeoSOT model.

[0103] In this embodiment, different data structures and algorithms are used to optimize performance.

[0104] Example 2:

[0105] This embodiment provides a spatiotemporal coding system for geographic entities in a real-life 3D system. The system is based on the backend Spring framework and the frontend VUE framework, and uses the PyTorch deep learning library to build a spatiotemporal feature fusion model. The collected data set is cleaned to remove noise, and then the model is trained and spatiotemporal coding fusion is performed. Finally, the spatiotemporal coding method for geographic entities in a real-life 3D system in Example 1 is integrated. The system also supports real-time dynamic geographic information management and analysis, including data collection, processing, storage, retrieval, and visualization functions.

[0106] The system also uses VUE to develop front-end pages, removing redundant functions as much as possible, retaining core pages and functional points, so that users can easily operate the software platform to query, analyze and display geographic information.

[0107] The system includes:

[0108] The multi-level network partitioning module is used to divide the Earth's surface into multi-level and multi-scale grids based on the GeoSOT (Geographic Spatial Object Tree) model. It follows the GB / T 40087-2021 geospatial grid coding rules, determines the grid level by calculating the bounding box size of the geographic entity, and performs a binary left shift operation on the coordinates of the entity center point. Combined with Morton code conversion and quaternary conversion technology, it generates a unique grid code containing the northern and southern hemispheres and the eastern and western hemispheres, namely the GeoSOT grid position vector;

[0109] The BTC BeiDou time code generation module is used to generate a time code using the BTC (BeiDou Time Code) of the BeiDou Navigation Satellite System (BDS) time service. It divides time into 42 levels, converts the STC time single-granularity code into an MTC fixed-length time segment integer code, and calculates the STC0 and MTC0 to obtain the final time code, namely the BTC time vector, to achieve accurate expression and unique coding of time information.

[0110] The spatiotemporal embedding model construction module uses the GeoSOT grid position vector and BTC time vector as input to the deep learning spatiotemporal embedding model. It learns spatiotemporal correlations through a multi-layer neural network structure and uses the attention mechanism and HiRA-Pro fusion method in the hidden layer to achieve feature fusion, generating a semantically rich spatiotemporal embedding vector and ultimately outputting a fixed-length spatiotemporal code.

[0111] The spatial data coding optimization module is used to introduce Morton Code and binary tree coding algorithms based on GeoSOT grid coding. Quadtrees are used for two-dimensional spatial data, and octrees are used for three-dimensional data, dividing the space into four plane quadrants and eight spatial quadrants. Morton codes are used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism.

[0112] The spatiotemporal coding sorting module is used to achieve fast sorting and retrieval of data by building a heap structure, ensuring the orderliness and fast accessibility of data and improving the overall efficiency of large-scale data set processing.

[0113] Example 3:

[0114] This embodiment also provides an electronic device, including: a memory and a processor;

[0115] wherein the memory stores computer-executable instructions;

[0116] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the spatiotemporal encoding method for geographic entities in a real-scene three-dimensional system in any embodiment of the present invention.

[0117] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.

[0118] The memory can be used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, the memory can also include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid-state memory devices.

[0119] Example 4:

[0120] This embodiment further provides a computer-readable storage medium storing a plurality of instructions, which are loaded by a processor and cause the processor to execute the spatiotemporal encoding method for geographic entities in a real-world 3D system according to any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, wherein the storage medium stores software program code that implements the functions of any of the above-described embodiments, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0121] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.

[0122] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RYMs, DVD-RWs, DVD+RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communications network.

[0123] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.

[0124] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU installed on the expansion board or expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for spatiotemporal coding of geographic entities in a real-scene three-dimensional system, characterized in that: The method is as follows: Multi-level network division and unique identifier: Based on the GeoSOT model, the Earth's surface is divided into multi-level, multi-scale grids. Following the GB / T 40087-2021 Geospatial Grid Coding Rules, the grid level is determined by calculating the bounding box size of the geographic entity. The coordinates of the entity center point are binary-shifted left. Combined with Morton code conversion and quaternary conversion technology, a unique grid code containing northern and southern hemisphere and eastern and western hemisphere labels is generated, namely the GeoSOT grid position vector; BTC Beidou time code: BTC, a time code service of the Beidou satellite navigation system, is used to generate a time code. Time is divided into 42 levels, and the STC time single-granularity code is converted into an MTC fixed-length time segment integer code. The final time code, namely the BTC time vector, is calculated by STC0 and MTC0, achieving accurate expression and unique coding of time information. Spatiotemporal Embedding Model: The GeoSOT grid position vector and BTC time vector are used as inputs for a deep learning spatiotemporal embedding model. A multi-layer neural network structure learns spatiotemporal correlations and employs an attention mechanism and HiRA-Pro fusion method in the hidden layer to achieve feature fusion. This generates a semantically rich spatiotemporal embedding vector and ultimately outputs a fixed-length spatiotemporal code. Combining Morton code and binary tree coding to optimize spatial data coding: Based on GeoSOT grid coding, Morton code and binary tree coding algorithms are introduced. A quadtree is used for two-dimensional spatial data, and an octree is used for three-dimensional data, dividing the space into four quadrants in the plane and eight quadrants in the space. Morton code is used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism. Sort the spatiotemporal codes using the heap sort algorithm: By building a heap structure, fast sorting and retrieval of data are achieved, ensuring the orderliness and fast accessibility of data, and improving the overall efficiency of large-scale data set processing.

2. The spatiotemporal coding method for geographic entities in a real-scene 3D system according to claim 1, characterized in that: The BTC Beidou split time code is as follows: Time coding rules: Based on the time granularity segmentation rules, the geographic entity tag time is divided into 42 levels, and the entire time period is split into five domains (B, C, D, E, and F) for single-granularity STC time coding. Spatiotemporal association: The BTC time code records time information and is combined with the GeoSOT grid location code to form a complete spatiotemporal identifier, enabling an accurate description of the spatiotemporal location of geographic entities.

3. The spatiotemporal coding method for geographic entities in a real-scene 3D system according to claim 2, characterized in that: The time coding rules are as follows: STC is converted and expressed in 43 fixed-length time segment integer codes (MTC) with different time granularities. The maximum time granularity of MTC is 32768 years, and the minimum time granularity is 1 second. These 42 different time granularities are recorded in binary coding. Take the middle value of STC to get STC0, calculate MTC according to the time segmentation level N to get the time 0 corresponding to MTC0; The time code is calculated according to MTC=(STC0>>(43-N))<<(43-N)+MTC0. The time code rule divides time into multiple standard time periods and assigns a unique code to each time period.

4. The method for spatiotemporal coding of geographic entities in a real-scene 3D system according to claim 3, characterized in that: The spatiotemporal embedding model includes an input layer, a hidden layer, and an output layer; The input layer receives the GeoSOT grid position vector and the BTC time vector, learns the intrinsic correlation between time and space through a multi-layer neural network structure, and maps high-dimensional spatiotemporal data into a low-dimensional embedding space. The hidden layer uses attention and HiRA-Pro fusion methods to achieve high-precision alignment of multimodal data in spatiotemporal resolution through process signatures, and effectively fuses temporal and spatial features to generate semantically rich spatiotemporal embedding vectors. The output layer converts the spatiotemporal embedding vector into a fixed-length spatiotemporal code, which contains precise time information and reflects the spatial location of geographic entities.

5. The spatiotemporal coding method for geographic entities in a real-scene 3D system according to claim 4, characterized in that: The optimization of spatial data encoding by combining Morton code and binary tree coding is as follows: Data preprocessing: Apply Morton code to each point in the multidimensional dataset and sort the points according to the value of the Morton code; Initialize the root node: The root node represents the area of ​​the entire dataset; Recursive partitioning: Select the Morton code value of the first point from the sorted list of data points. The Morton code value is used to determine how to partition the area represented by the current node. Specifically: For quadtrees, the bit at a specific position in the Morton code determines whether to partition along the x-axis or the y-axis; For the octree, consider multiple bits to decide along which axis of x, y, z and the direction of division; Recursively repeat the partitioning process in each sub-region until the stopping condition is met; Query: For a given query point, first calculate the Morton code of the query point, and then search in the quadtree based on the Morton code; Retrieval: Once the relevant sub-region is located, the data points that meet the query conditions are retrieved in the corresponding sub-region.

6. The spatiotemporal coding method for geographic entities in a real-scene 3D system according to claim 5, characterized in that: The heap sort algorithm is used to sort the spatiotemporal codes as follows: Reading data: When the data set exceeds the preset size, the data set is divided into multiple data blocks to ensure that the size of each data block can be processed in memory, so as to achieve data segmentation and load each block into memory in turn; In-memory heap sort: For each data block in memory, create a maximum heap or minimum heap, and use the heap sort method to sort the data blocks in memory. That is, repeatedly remove the maximum or minimum element from the heap, put the maximum or minimum element at the end of the resulting array or list, and then rearrange the remaining elements to restore the heap properties; Merge sort results: For the sorted data blocks in memory, use the external merge sort method to merge the sorted data blocks. That is, manage the merging process of data blocks on external storage, reduce the number of read and write operations to improve efficiency; And create a minimum heap to maintain the minimum element in all the currently unmerged data blocks, ensuring that the currently available minimum element is always taken out and merged, thereby ensuring the efficiency of merging; Detailed optimization: Use multi-way merging to improve merging efficiency, optimize reading and writing, reduce the number of reads and writes to external storage, and reduce disk I / O overhead through caching mechanisms; when available resources allow, parallelize data reading, in-memory heap sorting or merge sorting results, use parallel processing of multiple data blocks, or perform merging operations in parallel on multi-core processors.

7. A real-scene three-dimensional system geographic entity spatiotemporal coding system, characterized in that: The system is based on the backend Spring framework and the frontend VUE framework, and uses the PyTorch deep learning library to build a spatiotemporal feature fusion model. The collected data set is cleaned and noise removed before model training, and spatiotemporal coding fusion is performed. Finally, the spatiotemporal coding method of geographic entities in a real-life 3D system according to any one of claims 1 to 6 is integrated. The system also uses VUE to develop front-end pages, maximizing the removal of redundant functions and retaining core pages and functional points, allowing users to easily operate the software platform to query, analyze and display geographic information.

8. The real-scene 3D geographic entity spatiotemporal coding system according to claim 7, characterized in that: The system includes: The multi-level network partitioning module is used to divide the Earth's surface into multi-level and multi-scale grids based on the GeoSOT model. It follows the GB / T 40087-2021 Geospatial Grid Coding Rules. The grid level is determined by calculating the bounding box size of the geographic entity and performing a binary left shift operation on the coordinates of the entity's center point. Combined with Morton code conversion and quaternary conversion technology, it generates a unique grid code containing markings for the northern and southern hemispheres and the eastern and western hemispheres, namely the GeoSOT grid position vector; The BTC Beidou time code generation module is used to generate a time code using the BTC of the Beidou satellite navigation system time service. It divides time into 42 levels, converts the STC time single-granularity code into an MTC fixed-length time segment integer code, and calculates the STC0 and MTC0 to obtain the final time code, namely the BTC time vector, to achieve accurate expression and unique coding of time information. The spatiotemporal embedding model construction module uses the GeoSOT grid position vector and BTC time vector as input to the deep learning spatiotemporal embedding model. It learns spatiotemporal correlations through a multi-layer neural network structure and uses the attention mechanism and HiRA-Pro fusion method in the hidden layer to achieve feature fusion, generating a semantically rich spatiotemporal embedding vector and ultimately outputting a fixed-length spatiotemporal code. The spatial data coding optimization module is used to introduce Morton code and binary tree coding algorithms based on GeoSOT grid coding. Quadtree is used for two-dimensional spatial data, and octree is used for three-dimensional data, dividing the space into four plane quadrants and eight spatial quadrants. Morton code is used to maintain spatial proximity, and binary tree coding is used to improve data retrieval and indexing efficiency, forming an efficient spatial data coding and indexing mechanism. The spatiotemporal coding sorting module is used to achieve fast sorting and retrieval of data by building a heap structure, ensuring the orderliness and fast accessibility of data and improving the overall efficiency of large-scale data set processing.

9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the spatiotemporal encoding method for geographic entities in a real-scene three-dimensional system according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which can be executed by a processor to implement the spatiotemporal encoding method for geographic entities in a real-scene three-dimensional system according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Geographic name and address visualization method and system based on geographic space grid

    CN115455018A

  • Space-time knowledge rule judgment method based on grid space-time knowledge graph and related equipment

    CN116167440A