Spatiotemporal data retrieval method and apparatus for dynamically adjusting grid coding precision
By dynamically adjusting the grid coding precision and constructing a spatiotemporal grid code index, the problem that the index structure in existing technologies cannot adapt to data changes is solved, achieving efficient and stable spatiotemporal data retrieval and improving system performance and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-04-03
AI Technical Summary
Existing spatiotemporal data retrieval methods struggle to dynamically adjust their index structure in response to increasing data volume and changing user access patterns. This leads to unstable system performance, increased response latency, decreased throughput, and low resource utilization, failing to meet the requirements of efficiency and adaptability.
By statistically analyzing regional retrieval frequency based on historical retrieval data, dynamically adjusting the spatial grid coding level, generating spatiotemporal grid codes, and constructing their index relationship with associated data, resource allocation is optimized by combining multi-level caching strategies and load-aware scheduling.
It significantly improves retrieval performance and system resource utilization in large-scale spatiotemporal data environments, achieves millisecond-level response speed and stability in high-concurrency scenarios, and optimizes the allocation of computing and storage resources.
Smart Images

Figure CN121210783B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data retrieval technology, and specifically to a spatiotemporal data retrieval method and apparatus for dynamically adjusting grid coding precision. Background Technology
[0002] Currently, most technical solutions in the field of spatiotemporal data retrieval are based on static index structures, such as R-trees, quadtrees, or fixed-size grid indexes, and are usually combined with time indexes with fixed weight assignments for joint queries.
[0003] These methods pre-define index parameters and structures during the system design phase, making it difficult to dynamically adjust them based on the actual operating environment and data characteristics once deployed. Lacking a mechanism for perceiving and learning data access patterns, the system cannot identify and adapt to spatiotemporal locality patterns in query requests, such as frequently accessed hotspots or periodic query peaks.
[0004] In practical applications, with the continuous growth of data scale and dynamic changes in user access patterns, such static architectures struggle to effectively handle complex scenarios such as uneven data distribution and large fluctuations in query load. The direct consequence is unstable system performance, easily leading to significantly increased response latency and decreased throughput under high concurrency or sudden query pressure. This not only affects user experience but also results in low utilization of computing and storage resources, failing to meet the core requirements of modern large-scale spatiotemporal data services for efficiency, adaptability, and scalability. Summary of the Invention
[0005] In view of the above problems, the present invention is proposed to provide a spatiotemporal data retrieval method and apparatus for dynamically adjusting grid coding accuracy to overcome or at least partially solve the above problems.
[0006] According to one aspect of the present invention, a spatiotemporal data retrieval method for dynamically adjusting grid coding precision is provided, executed in a computing device. The method includes: based on historical retrieval data, statistically analyzing the retrieval frequency of each region and sorting them accordingly; dynamically adjusting the spatial grid coding level of the corresponding region according to a predefined strategy based on the sorting results; in response to the adjustment of the grid coding level, updating the spatial grid code of the corresponding region to a new code corresponding to the new level; combining each updated spatial grid code with the temporal information of any associated data to generate a spatiotemporal grid code; constructing a mapping relationship between the spatiotemporal grid code and its associated region, and constructing an index relationship between the spatiotemporal grid code and the corresponding associated data; in response to user query information, parsing the spatiotemporal range in the user query, mapping it to the corresponding spatiotemporal grid code range, and performing a retrieval based on this range to return the matched associated data.
[0007] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, constructing the index relationship between spatiotemporal grid codes and corresponding associated data includes: classifying associated data whose historical retrieval frequency meets the frequency threshold condition into a first dataset, and classifying other associated data into a second dataset; for associated data in the first dataset, deploying it to a cache system composed of multi-level cache media according to a predefined multi-level caching strategy; and for associated data in the second dataset, transferring it to a storage medium after processing by a compression algorithm.
[0008] Optionally, the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention further includes: using historical retrieval data, determining one or more high-activity time intervals based on the access activity of retrieval operations in each region in the time dimension; for each high-activity time interval, filtering and selecting associated data whose retrieval frequency exceeds a frequency threshold within that interval as hot data; and in response to detecting that the time difference between the current time and the target high-activity time interval is less than a time threshold, preloading the hot data corresponding to the target high-activity time interval into the cache.
[0009] Optionally, the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention further includes: in response to detecting that the access growth rate of the target area is greater than the growth rate threshold, preloading associated data related to the target area into the cache.
[0010] Optionally, the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention further includes: in response to identifying that the behavior of a target user conforms to a predetermined behavior pattern, preloading associated data related to the behavior pattern into a cache.
[0011] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, the spatial grid coding level of the corresponding region is dynamically adjusted according to the sorting result and a predefined strategy, including: determining the ranking interval to which the ranking of the region belongs, and setting its spatial grid coding level to the fixed level corresponding to the interval, wherein the higher the ranking indicated by the ranking interval, the higher the corresponding spatial grid coding level.
[0012] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, in response to the adjustment of the grid coding level, the spatial grid code of the corresponding region is updated to a new code corresponding to the new level, including: dividing the target region into a spatial grid set that conforms to the BeiDou grid standard based on the updated grid precision; and encoding the geometric coordinates of each grid in the spatial grid set according to the BeiDou grid coding rules to generate a corresponding grid code.
[0013] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, combining each updated spatial grid code with the temporal information of any associated data to generate a spatiotemporal grid code includes: combining the spatial grid code with the temporal information into a spatiotemporal grid code using a concatenation or hash operation.
[0014] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, in response to the user's query information, the spatiotemporal range in the user's query is parsed, mapped to the corresponding spatiotemporal grid code range, and a retrieval is performed based on this range to return the matched associated data, including: extracting the spatial range and time interval contained in the query information; mapping the spatial range and time interval to the spatiotemporal grid code range to be queried; using the spatiotemporal grid code range as the query condition, performing a retrieval in the index relationship to obtain a list of associated data matching the range.
[0015] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding accuracy according to the present invention, the associated data is one of GIS map data, video data, oblique photography data, signaling / positioning data, laser point cloud data, civil defense data, meteorological and oceanographic data, and public thematic data.
[0016] Optionally, the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention further includes: when the access growth rate of the target area is greater than the growth rate threshold, performing a load transfer operation on subsequent retrieval requests sent to the computing device to distribute them to other service nodes for processing.
[0017] Optionally, in the spatiotemporal data retrieval method for dynamically adjusting grid coding precision according to the present invention, the predetermined behavior pattern includes: when it is determined that the number of times a target user retrieves specific related data within a specific time period reaches a threshold, the target user's personalized behavior profile is included, and when the current time enters a specific time period, the specific related data is preloaded into the local cache.
[0018] According to another aspect of the present invention, a spatiotemporal data retrieval device for dynamically adjusting grid coding precision is provided, residing in a computing device. The device includes: a statistics module adapted to statistically analyze and sort the retrieval frequencies of each region based on historical retrieval data; an adjustment module adapted to dynamically adjust the spatial grid coding level of the corresponding region according to a predefined strategy based on the sorting results; an update module adapted to update the spatial grid code of the corresponding region to a new code corresponding to the new level in response to the adjustment of the grid coding level; a combination module adapted to combine each updated spatial grid code with the temporal information of any associated data to generate a spatiotemporal grid code; a construction module adapted to construct a mapping relationship between the spatiotemporal grid code and its associated region, and to construct an index relationship between the spatiotemporal grid code and the corresponding associated data; and a retrieval module adapted to parse the spatiotemporal range in the user's query, map it to the corresponding spatiotemporal grid code range, perform a retrieval based on this range, and return the matched associated data.
[0019] According to another aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the methods described above.
[0020] According to another aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the method described above.
[0021] According to the present invention, the retrieval performance and system resource utilization in large-scale spatiotemporal data environments can be significantly improved. Specifically, by dynamically adjusting the grid coding level of different regions based on historical access frequency, high-precision coding and index optimization of high-frequency access areas are achieved, resulting in a significant reduction in retrieval latency for hot data, achieving millisecond-level response speeds, while effectively supporting high-concurrency query scenarios. This solution possesses excellent adaptability, dynamically adjusting the index structure and resource allocation strategy according to changes in real-time access patterns, ensuring stable throughput and response performance even under conditions of uneven data distribution or sudden increases in access load. Furthermore, through differentiated coding strategies, storage and computational overhead for low-frequency areas are reduced while improving retrieval efficiency, thus optimizing resource allocation.
[0022] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0024] Figure 1 A block diagram of the physical components (i.e., hardware) of the computing device 100 is shown;
[0025] Figure 2 A flowchart of a spatiotemporal data retrieval method 200 for dynamically adjusting grid coding precision according to an embodiment of the present invention is shown;
[0026] Figure 3 A schematic diagram of a spatiotemporal data retrieval device 300 for dynamically adjusting grid coding precision according to an embodiment of the present invention is shown. Detailed Implementation
[0027] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0028] The following is an explanation and description of the terms that appear in this application:
[0029] 1. Definition of Abbreviations
[0030] BDS: BeiDou Navigation Satellite System
[0031] GCI: Grid Code Index, refers to the unique identifier of a spatial grid under the BeiDou grid coding standard.
[0032] API: Application Programming Interface
[0033] GIS: Geographic Information System
[0034] QPS: Queries Per Second
[0035] STGCI: Spatio-Temporal Grid Code Index
[0036] 2. Definition of Key Terms
[0037] BeiDou grid coding: Based on the national standard GB / T 37963-2019 "Geographic Information BeiDou Grid Coding", the Earth's surface is divided into multi-level grids, and each grid has a unique code, realizing efficient expression and retrieval of spatial location.
[0038] Spatiotemporal data: Data that contains both spatial (geographical location) and temporal (moment or time period) attributes, commonly used in applications such as positioning, trajectory, and remote sensing.
[0039] Fast retrieval algorithms: These are algorithms that can efficiently locate and filter target data in large-scale datasets, typically requiring low latency, high concurrency, and high accuracy.
[0040] Multilevel grid: refers to a spatial grid divided into levels of different resolutions, supporting spatial representation and retrieval with different precision.
[0041] Integrated index: It integrates spatial and temporal information into a unified index structure to achieve efficient spatiotemporal joint retrieval.
[0042] The following are some existing indexing schemes for spatiotemporal data:
[0043] Technical Solution A: Static R-tree index combined with fixed-time segmentation
[0044] Technical features: Spatial indexing uses a static R-tree index, while temporal indexing uses a preset fixed segmentation strategy.
[0045] Implementation method: The index structure and parameters are determined during system initialization and remain unchanged during operation.
[0046] Application scope: Suitable for small to medium-sized scenarios with relatively stable data distribution and fixed access patterns.
[0047] Core flaw: It cannot adapt to the dynamic changes in data access hotspots, and there is a large difference in processing efficiency between hot and cold data.
[0048] Technical Solution B: Traditional Quadtree + Linear Time Index
[0049] Technical features: The space uses a fixed-depth quadtree, and the time uses a linear sorted index.
[0050] Implementation method: The tree structure depth and branching strategy are preset and cannot be adjusted at runtime.
[0051] Application scope: Suitable for trajectory data management with relatively uniform spatial distribution.
[0052] Core flaw: Lack of optimization for frequently accessed areas, resulting in low efficiency in cross-regional retrieval.
[0053] Technical Solution C: Fixed Parameter Grid Index
[0054] Technical features: The space is divided into fixed grids of preset size, and the data within the grids is stored in a simple manner.
[0055] Implementation method: The grid size and index parameters are determined during the design phase and cannot be adjusted at runtime.
[0056] Application scope: Suitable for batch processing of large-scale static spatial data.
[0057] Core flaw: It cannot dynamically adjust index weights based on access frequency, resulting in low efficiency in retrieving hot data.
[0058] A comprehensive analysis of the existing technologies reveals that current retrieval methods all have certain limitations, mainly in the following aspects:
[0059] 1. Technical defects
[0060] Lack of access pattern learning capability manifests as follows: the index structure and parameters are fixed, making it unable to learn and adapt to users' query habits, and unable to identify data access hotspots and time patterns; the impact is that it leads to low efficiency in retrieving hot data, unreasonable allocation of system resources, and inability to meet personalized and intelligent retrieval needs.
[0061] Static index structures have poor adaptability, manifesting in the following ways: index weights and structures are fixed and cannot be dynamically adjusted according to changes in data distribution and access frequency, resulting in insufficient support for sudden high-concurrency access; impact: in scenarios with complex data access patterns and dynamically changing loads, system performance fluctuates greatly, making it difficult to guarantee stable service quality.
[0062] The lack of intelligent prefetching and caching mechanisms leads to the following problems: Traditional methods adopt a passive retrieval mode, lack predictive data loading based on historical access patterns, and have simple caching strategies; the impact is that it is impossible to prepare the data that users may need in advance, resulting in high retrieval latency and poor user experience.
[0063] 2. Performance issues
[0064] Performance is unstable under dynamic load, and performance bottlenecks are likely to occur during high-frequency access.
[0065] Resource utilization is uneven, with hot data being overloaded while less popular data resources are idle.
[0066] Limited scalability makes it difficult to adapt to rapid changes in data scale and access patterns.
[0067] 3. User experience issues
[0068] The ability to provide personalized services is weak, and it is unable to optimize the search experience based on user habits.
[0069] It has a low level of intelligence and lacks proactive data recommendation and preloading capabilities.
[0070] The response time is unstable, and the retrieval performance varies greatly depending on the time and scenario.
[0071] To address the problems existing in the prior art, the present invention is proposed. This application proposes a spatiotemporal data retrieval method for dynamically adjusting grid coding precision. Compared with the prior art, this method can bring the following significant technical effects:
[0072] Firstly, regarding retrieval performance, this invention introduces an access pattern learning engine, which can analyze and predict user query behavior in real time and dynamically adjust the weight allocation and index structure of the spatiotemporal grid code, thereby significantly improving retrieval efficiency. For frequently accessed hot data, the system can achieve millisecond-level response speeds, significantly reducing the average retrieval latency and effectively meeting the performance requirements of high-concurrency, low-latency retrieval in large-scale spatiotemporal data environments.
[0073] Secondly, regarding system adaptability and stability, this algorithm possesses the ability to dynamically adapt to changes in data access distribution. Through intelligent prefetching mechanisms and load-aware scheduling strategies, the system can not only preload data with potentially high access demands, but also automatically implement reasonable request distribution and resource allocation when access pressure surges, thereby significantly improving the system's stability and reliability under sudden loads and avoiding performance bottlenecks caused by local overheating.
[0074] Third, regarding resource utilization and scalability, this invention optimizes the allocation efficiency of computing and storage resources and reduces redundancy overhead by implementing differentiated encoding and indexing strategies for data with varying access frequencies. The system can better adapt to the continuous growth of data scale and dynamic changes in access patterns, possessing excellent horizontal scalability and providing an efficient and economical solution for ultra-large-scale spatiotemporal data applications.
[0075] In summary, this method not only effectively overcomes the inherent defects of traditional static indexing mechanisms, such as poor flexibility and difficulty in adapting to dynamic query needs, but also achieves a comprehensive improvement in the performance, stability, and resource efficiency of spatiotemporal data retrieval through an intelligent and adaptive technical approach, demonstrating significant technological advancement and application value.
[0076] The spatiotemporal data retrieval method for dynamically adjusting grid coding precision of this application can be executed in a computing device 100. The computing device 100 can be implemented as a server, such as an application server or a web server; it can also be implemented as a desktop computer, a laptop computer, a processor chip, a tablet computer, etc., but is not limited to these. Figure 1A block diagram of the physical components (i.e., hardware) of a computing device 100 is shown. In a basic configuration, the computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, depending on the configuration and type of the computing device, the system memory 104 includes, but is not limited to, volatile memory (e.g., random access memory), non-volatile memory (e.g., read-only memory), flash memory, or any combination of such memories.
[0077] According to one aspect, system memory 104 includes operating system 105. System memory 104 also includes program module 150. According to one aspect, operating system 105, for example, is adapted to control the operation of computing device 100. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other applications, and are not limited to any particular application or system. Figure 1 The basic configuration is illustrated by the components within the dashed lines 108. According to one aspect, the computing device 100 has additional features or functions. For example, according to one aspect, the computing device 100 includes additional data storage devices (removable and / or non-removable), such as disks, optical discs, or magnetic tapes. This additional storage... Figure 1 The image is shown by removable storage device 109 and non-removable storage device 110.
[0078] As stated above, according to one aspect, a program module 150 is stored in system memory 104. According to one aspect, the program module 150 can be implemented as one or more computer program products. This application does not limit the type of computer program product, and may include, for example, email, word processing applications, spreadsheet applications, database applications, slideshow applications, drawing or computer-aided applications, web browsers, etc. In some embodiments according to this application, computer programs / instructions related to the spatiotemporal data retrieval method 200 with dynamically adjusted trellis coding precision are encapsulated as a computer program product. When these computer programs / instructions are executed by a processor (i.e., processing unit 102), the spatiotemporal data retrieval method 200 with dynamically adjusted trellis coding precision according to this application is implemented.
[0079] According to one aspect, examples can be practiced on circuits including discrete electronic components, packaged or integrated electronic chips containing logic gates, circuits utilizing microprocessors, or on a single chip containing electronic components or a microprocessor. For example, it can be practiced via wherein... Figure 1Each or many of the components shown can be implemented as an example by integrating a System-on-a-Chip (SOC) on a single integrated circuit. According to one aspect, such an SOC device may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or “burned in”) as a single integrated circuit onto a chip substrate. When operated via the SOC, the functions described herein can be operated via dedicated logic integrated on a single integrated circuit (chip) with other components of the computing device 100. Embodiments of the invention can also be practiced using other techniques capable of performing logical operations (e.g., AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. Additionally, embodiments of the invention can be practiced within a general-purpose computer or in any other circuit or system.
[0080] According to one aspect, the computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, etc. It may also include output devices 114, such as a monitor, speaker, printer, etc. The foregoing devices are examples and other devices may also be used. The computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118, such as printing devices, like printers. Examples of suitable communication connections 116 include, but are not limited to: RF transmitters, receivers, and / or transceiver circuitry; Universal Serial Bus (USB); parallel and / or serial ports.
[0081] As used herein, the term computer-readable medium includes computer storage medium. Computer storage medium can include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules). System memory 104, removable storage device 109, and non-removable storage device 110 are examples of computer storage media (i.e., memory storage). Computer storage media can include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital universal disc (DVD) or other optical storage, magnetic tape, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and is accessible by computer device 100. According to one aspect, any such computer storage medium can be part of computing device 100. Computer storage media does not include carrier waves or other transmitted data signals.
[0082] According to one aspect, a communication medium is implemented by computer-readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transmission mechanism), and includes any information transmission medium. According to one aspect, the term "modulated data signal" describes a signal having one or more sets of characteristics or altered in a manner that encodes information in the signal. By way of example and not limitation, a communication medium includes wired media such as wired networks or direct wired connections, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
[0083] In an embodiment of the invention, computing device 100 is configured to execute a spatiotemporal data retrieval method 200 for dynamically adjusting grid coding precision according to the invention. Computing device 100 includes one or more processors and one or more readable storage media storing program instructions that, when executed by the one or more processors, cause the computing device to execute the spatiotemporal data retrieval method 200 for dynamically adjusting grid coding precision according to the embodiment of the invention.
[0084] Figure 2 A flowchart of a spatiotemporal data retrieval method 200 for dynamically adjusting grid coding precision according to an embodiment of the present invention is shown. Method 200 is adapted to be executed in a computing device (e.g., the aforementioned computing device 100).
[0085] like Figure 2 As shown, the purpose of method 200 is to implement a spatiotemporal data retrieval method that can significantly improve retrieval performance and system resource utilization in large-scale spatiotemporal data environments. This method is suitable for the intelligent management and service of large-scale spatiotemporal data with high-frequency changes and complex access patterns. Specific practical scenarios applicable to this method include:
[0086] Intelligent transportation: such as high-frequency dynamic data scenarios like real-time vehicle trajectory analysis, dynamic road condition monitoring, and intelligent traffic scheduling.
[0087] IoT monitoring: such as real-time monitoring of sensor networks, equipment status tracking, dynamic analysis of environmental parameters, and fusion of multi-source heterogeneous data.
[0088] Mobile Internet services: such as LBS location services, social check-in analysis, user behavior trajectory mining, and other user access pattern learning scenarios.
[0089] Emergency command systems: such as real-time disaster monitoring, dynamic dispatch of emergency resources, and intelligent planning of rescue routes for sudden high-concurrency scenarios.
[0090] Smart city platform: such as city operation status perception, public service resource optimization, citizen service hotspot analysis and other multi-dimensional data correlation.
[0091] Method 200 begins with step 202, in which the search frequency of each region is statistically analyzed and sorted based on historical search data. Specifically, the ranking interval to which the ranking of a region belongs is determined, and its spatial grid coding level is set to a fixed level corresponding to that interval. The higher the ranking interval, the lower the corresponding spatial grid coding level.
[0092] In this embodiment, the region refers to a geographical space with a physical entity. It can be set as a factory, a city, a location, or the space above and below ground within a location. This application does not limit the specific setting of the region.
[0093] Historical retrieval data includes the specific retrieval area, the retrieval time point, the related data retrieved, the number of times each area was retrieved, and the number of times each data item was retrieved. Step 202 can rank the areas based on the number of times each area was retrieved. For example, if area A was retrieved 10 times, area B was retrieved 8 times, and area C was retrieved 2 times, then the ranking result would be area A → area B → area C.
[0094] Subsequently, in step 204, the spatial grid coding level of the corresponding region is dynamically adjusted according to the sorting results and a predefined strategy. Specifically, the ranking interval to which the region's ranking belongs is determined, and its spatial grid coding level is set to the fixed level corresponding to that interval. The higher the ranking interval, the higher the corresponding spatial grid coding level.
[0095] In a specific example, suppose we monitor vehicle trajectory data for a city and sort it according to the frequency of regional access. The preset ranking interval-hierarchy mapping rule is as follows:
[0096] Ranking range 1: 1st-10th place → corresponding level 12 (highest precision, approximately 10-meter grid).
[0097] Ranking range 2: 11th-50th place → corresponding level 10 (medium precision, approximately 100-meter grid).
[0098] Ranking range 3: 51st and above → corresponding level 8 (basic accuracy, approximately 1 km grid).
[0099] According to statistics, the "Guomao CBD" area ranks 5th in real-time access volume, which falls within ranking range 1 (ranks 1-10). Based on the mapping rules, ranking range 1 corresponds to level 12. Therefore, the system automatically sets the spatial grid coding level of the "Guomao CBD" area to level 12, a high-precision level. This area is divided into many fine grids of approximately 10m x 10m.
[0100] Subsequently, when users search for vehicles within the "Guomao CBD" area, they only need to search within these finely defined grids, resulting in a very small search range and extremely fast speed.
[0101] Another scenario comparison: Suppose the "Forest Park" area is ranked 60th in terms of visitor count. It is determined to belong to ranking range 3 (51st and below), therefore its grid level is set to level 8. Level 8 is a coarse-precision level. This area is divided into a few large grids of approximately 1km x 1km.
[0102] It should be noted that the spatial grid coding in this embodiment refers to the BeiDou grid coding. The spatial grid coding level, i.e., grid precision (Grid Precision / Resolution), refers to the size of the actual geographical area represented by a grid cell.
[0103] Although the amount of data scanned within a single grid when searching this area is large, the total number of queries is very small because this area is a niche area. Therefore, it is reasonable to sacrifice some search speed to save a lot of storage and computing resources.
[0104] In step 206, in response to the adjustment of the grid coding level, the spatial grid code of the corresponding area is updated to a new code corresponding to the new level.
[0105] Specifically, firstly, based on the updated grid accuracy, the target area is divided into a set of spatial grids conforming to the BeiDou grid standard. Then, according to the BeiDou grid coding rules, the geometric coordinates of each grid in the spatial grid set are encoded to generate a corresponding grid code.
[0106] Spatial partitioning (also known as mesh creation) is based on a three-dimensional grid model of the Earth's sphere, recursively dividing the Earth's surface into grids of different sizes.
[0107] Multi-level: The mesh hierarchy ranges from low to high, corresponding to a precision range from coarse to fine. For example:
[0108] Level 1: A grid of approximately 1000 km × 1000 km (applicable to global and continental scales).
[0109] Level 10: A grid of approximately 1 meter by 1 meter (suitable for precisely locating a parking space or a manhole cover).
[0110] Higher-level meshes are recursively subdivided from lower-level meshes, forming a "parent-child" containment relationship.
[0111] The BeiDou grid coding rule (GB / T 39409-2020 BeiDou Grid Coding) refers to assigning each grid a globally unique string code of varying length based on its geographical location and level through a complex mathematical algorithm.
[0112] Encoding characteristics: Uniqueness: A code corresponds to only one specific region on Earth.
[0113] Hierarchical structure: The encoding itself contains hierarchical information. Long codes represent small grids (high precision), and short codes represent large grids (low precision).
[0114] Computability: The encoding and latitude / longitude coordinates can be converted to each other.
[0115] In a specific example, the geographical area of "the central area of a park" is encoded using BeiDou grid technology to enable efficient spatiotemporal retrieval of it later.
[0116] Step 1: Spatial grid generation
[0117] Target area: The geographical boundary of the central area of the park (usually represented by a polygonal string of latitude and longitude coordinates).
[0118] Predetermined grid precision: Select a 10-meter grid level for subdivision. This means dividing the Earth's surface into grid units of approximately 10 meters by 10 meters.
[0119] Processing procedure: The system calls the BeiDou grid subdivision algorithm to overlay the polygon boundary of the "park center area" with the global 10-meter level grid and find all 10-meter grids that intersect with or are contained in the polygon.
[0120] Output: A set of spatial grids. This set contains hundreds or thousands of uniformly sized 10-meter grid cells covering the central area of the park. Each grid cell has a unique set of geometric coordinates defined by its latitude and longitude range.
[0121] Step 2: Mesh Encoding Generation
[0122] Spatial grid set: Hundreds or thousands of 10-meter grids obtained in the previous step.
[0123] BeiDou grid coding rules: follow the coding algorithm specified in the national standard GB / T 39409-2020.
[0124] Grid precision: 10-meter level (this parameter is implicit in the grid cells and participates in the encoding calculation).
[0125] Processing procedure:
[0126] The system iterates through each 10-meter grid in the above spatial grid set and performs the following operations:
[0127] Extract the geometric coordinates of the grid (usually the latitude and longitude of its center point, or the characteristic coordinates that represent its uniqueness).
[0128] The coordinates and the 10-meter layer information are input into the BeiDou grid coding formula for calculation.
[0129] Output: A set of Grid Codes (GCIs). Each element in the set is a unique grid code in string form, corresponding one-to-one with a previous spatial grid cell.
[0130] To be more specific, suppose the coordinates of the center point of a 10-meter grid cell in the central area of the park are:
[0131] Latitude: 39.9922°
[0132] Longitude: 116.3911°
[0133] Different precisions result in different encodings:
[0134] If a 1-kilometer precision is selected, the area may be divided into only a few grids, and its coding may be similar to GCM1JX4. This coding represents a large area of approximately 1 square kilometer.
[0135] When a 10-meter precision is selected, the area is divided into numerous grids. The coordinates above are then encoded more precisely and longer, possibly similar to GCM1JX4U8N9W0. This encoding uniquely identifies a specific 10m x 10m square on Earth.
[0136] The hierarchy and meaning of encoding:
[0137] This code GCM1JX4U8N9W0 is not random; it has a hierarchical structure.
[0138] GCM1 may represent a very large region (such as North China).
[0139] JX4 further narrows down the block size based on the prefix (e.g., a certain city).
[0140] U8N9 may be located in a specific area of a park.
[0141] W0 eventually located the unique 10-meter grid.
[0142] This coarse-to-fine coding structure enables highly efficient cross-scale retrieval.
[0143] In step 208, each updated spatial grid code is combined with the temporal information of any of its associated data to generate a spatiotemporal grid code. The associated data can be one of the following: GIS map data, video data, oblique photography data, signaling / positioning data, laser point cloud data, civil defense data (referring to civil defense engineering data, i.e., data on underground protective structures used for personnel shelter, material storage, command and communication, medical rescue, etc. These projects are divided into independently constructed or basements built in conjunction with above-ground buildings, whose main functions include air defense and disaster prevention), meteorological and oceanographic data, and public thematic data. The temporal information is the acquisition time information of the associated data, i.e., the time information when the associated data was collected (e.g., collection timestamp).
[0144] Preferably, spatial grid codes and temporal information are combined into spatiotemporal grid codes by using splicing or hashing operations.
[0145] Concatenation refers to appending time information directly to the end of the spatial grid code to form a longer new string.
[0146] For example, the timestamp is converted into a standard, compact string format for concatenation. A common format is YYYYMMDDHHMMSS.
[0147] T_start_formatted = "20231027100500" / / That is, 10:05:00 on October 27, 2023.
[0148] Then, for the grid code GCM1JX4U8N9W0, the STGCI obtained from its splicing time information is: GCM1JX4U8N9W020231027100500.
[0149] Hash operation refers to inputting a spatial grid code and a timestamp string into a hash function (such as SHA-256 or MD5) to generate a fixed-length, unique hash value.
[0150] For example, during the hash operation, the spatial grid code and the timestamp string are first concatenated into an intermediate string, which is: "GCM1JX4U8N9W0:20231027100500".
[0151] Then, the middle string 1 is input into the SHA-256 algorithm to obtain the hash value: a1b2c3d4e5f6... (a 64-bit hexadecimal string). Usually, to save space, the first N bits (e.g., 16 bits) are truncated as the final STGCI.
[0152] After obtaining the spatiotemporal grid code, proceed to step 210 to construct the mapping relationship between the spatiotemporal grid code and its associated region, and to construct the index relationship between the spatiotemporal grid code and the corresponding associated data.
[0153] The mapping relationship can be specifically implemented as a grid coding index system. The mapping relationship establishes a table-based data storage method, storing spatiotemporal grid codes and the location information of corresponding areas, and establishing an index for the grid codes based on the location information.
[0154] The index relationship is to establish an information table based on the spatiotemporal grid code and related data, and to establish an index for the related data based on the spatiotemporal grid code.
[0155] The steps for constructing the index relationship between spatiotemporal grid codes and corresponding associated data include: first, classifying associated data whose historical retrieval frequency meets the frequency threshold condition into a first dataset, and classifying other associated data into a second dataset. Then, for the associated data in the first dataset, according to a predefined multi-level caching strategy, it is deployed to a caching system composed of multi-level caching media; for the associated data in the second dataset, it is processed by a compression algorithm and then transferred to the storage medium.
[0156] This implementation continuously monitors and analyzes historical access logs to calculate the access frequency of each associated data. The access frequency is then compared with a frequency threshold. If the access frequency is greater than the frequency threshold, the associated data is considered hot data (active data) and is assigned to the first dataset. If the access frequency is not greater than the frequency threshold, the associated data is considered cold data (inactive data) and is assigned to the second dataset.
[0157] It's important to note that the "frequency threshold" is not a fixed value, but rather a parameter that can be dynamically adjusted based on the overall load of the computing device, the total amount of data, and business objectives. For example, during nighttime when the system is idle, the threshold can be lowered to allow more data to be considered "hot data" and preheated; while during peak daytime hours, the threshold is raised so that only the hottest data remains in the cache.
[0158] The first dataset (hot data): Data that is currently or is expected to be accessed frequently. This type of data is extremely sensitive to read latency and throughput.
[0159] The second dataset (cold data): historical or archived data that is accessed infrequently. This type of data is more sensitive to storage costs and allows for higher access latency.
[0160] Different storage strategies are adopted for the data in the first and second datasets. Specifically, for the first dataset (hot data), multi-level caching is used, with the goal of providing the fastest data retrieval path for hot data.
[0161] "Multi-level caching" typically uses multiple levels of caching media, forming a pyramid structure, with the capacity increasing, the speed decreasing, and the cost decreasing from top to bottom.
[0162] L1 - Memory cache (such as Redis, Memcached): Extremely fast (microseconds), but limited capacity and high cost. Used to store frequently accessed data, such as homepage information that is being refreshed rapidly.
[0163] L2 - High-speed SSD cache (such as NVMe SSD): Very fast (millisecond level) and large capacity. Used to store frequently accessed data, serving as a supplement and backup to the memory cache.
[0164] L3 - Local Disk / High-Speed Cloud Disk: Faster speed and larger capacity. Used to store frequently accessed data or as a cache queue.
[0165] Strategy: Data flows between different cache levels. The most frequently accessed data is in L1, and when its popularity decreases or it is evicted, it may move down to L2 or L3; conversely, when data in L2 is frequently accessed, it may be promoted to L1.
[0166] The processing of the second dataset (cold data) involves compression and archiving, with the goal of storing large amounts of data at the lowest cost while ensuring that it can be retrieved when needed.
[0167] Compression algorithms: Compression algorithms such as LZ4 and Zstandard (ZSTD) are used to achieve a balance between compression ratio and speed. For archived data, even higher compression ratio algorithms such as GZIP can be used.
[0168] Storage media: This data is transferred to low-cost, high-capacity, high-latency storage systems, such as object storage (e.g., Amazon S3, Azure Blob Storage) and archive storage (e.g., Amazon Glacier, Azure ArchiveStorage).
[0169] In addition, in some embodiments, the following sub-steps are included when constructing the index relationship between the spatiotemporal trellis code and the associated data:
[0170] First, using historical search data, one or more high-activity time intervals are determined based on the access activity of search operations in each region over time.
[0171] Access activity is a quantitative metric used to measure the level of activity in retrieval operations at a given point in time. The most common calculation methods are queries per second (QPS) or queries per minute. For example, if the system receives 150 query requests for a specific region at 10:00:00, then the access activity for that region in that second is 150 QPS.
[0172] A high-activity time interval refers to a continuous period of time during which access activity is consistently and significantly higher than the baseline level. The definition of "significant" is usually determined by a threshold (e.g., activity > twice the average activity).
[0173] When determining high-activity time intervals based on access activity, the following methods can be used: a threshold method can be employed: set an activity threshold (e.g., 1000 QPS) and mark all time periods that consistently exceed this threshold as high-activity intervals; clustering analysis can be used: machine learning algorithms (e.g., K-Means) can be used to cluster time windows in historical data to automatically identify which time periods always cluster in high-activity categories; periodicity analysis can be used: analyze time series curves to discover whether they have obvious daily cycles (daily peaks), weekly cycles (different patterns on weekdays and weekends), or even annual cycles (holiday patterns).
[0174] Then, for each high-activity time interval, filter and select related data whose retrieval frequency exceeds the frequency threshold within that interval as hot data.
[0175] For example, the computing device first groups the input historical retrieval logs according to the data ID being queried (e.g., the ID of an intersection, the ID of a vehicle, or the ID of a sensor).
[0176] For each data ID, calculate the total number of times it appears in the current time interval (i.e., access frequency).
[0177] The access frequency of each data ID is compared with a preset frequency threshold. If the access frequency > the frequency threshold, the data ID and all its associated data are selected. Otherwise, the data is filtered out.
[0178] Finally, in response to the detection that the time difference between the current time and the target high-activity time interval is less than the time threshold, the hot data corresponding to the target high-activity time interval is preloaded into the cache.
[0179] The current time refers to the real-time time of the computing device's clock. The target high-activity time interval is summarized as an upcoming peak access period known in advance through historical data analysis (e.g., 09:00-11:00 on weekdays). The time difference refers to how much time is left before the start time of the target high-activity time interval.
[0180] For example: if the current time is 08:50 and the target time range is 09:00-11:00, then the time difference is 10 minutes.
[0181] The time threshold is a preset lead time that defines how far in advance the computing device should begin preparation.
[0182] The computing device is configured with a resident scheduled task or event listener that continuously checks the current time. It compares the current time with the start times of all predefined high-activity time intervals. When it detects that (target interval start time - current time) <= time threshold, it performs the action of preloading hot data into the cache. For example, if the time threshold is set to 10 minutes, when the current time reaches 08:50 (10 minutes until 09:00), the hot data is preloaded into the cache.
[0183] The specific process of preloading hot data into the cache is as follows: The computing device retrieves the previously computed and stored hot dataset (HotDataset) based on the target high-activity time interval (e.g., weekday 09:00-11:00) as the key. The computing device initiates an asynchronous preloading task, reading all data items in the hot dataset in batches from low-speed main storage (such as database, object storage) to high-speed cache media (such as Redis, Memcached). This loading process is asynchronous and will not block normal user requests.
[0184] In some embodiments, step 210 further includes preloading associated data related to the target region into the cache when the access growth rate of the target region is detected to be greater than the growth rate threshold.
[0185] The visit growth rate is a metric that measures the speed at which visitor traffic changes, rather than simply the number of visits. Its calculation formula is typically: Growth Rate = (Requests in the current time window - Requests in the previous time window) / Requests in the previous time window. It focuses on "how fast the growth is." For example, a sudden jump from 10 QPS to 1000 QPS represents a growth rate of 9900%. Even if the absolute amount is not large, the extremely high growth rate indicates a sudden trend.
[0186] The growth rate threshold is a preset growth rate cutoff value. Once this threshold is exceeded, it means that the search volume will surge. For example, it can be set to 100% (doubling) or 500%.
[0187] In addition, when the access growth rate of the target area exceeds the growth rate threshold, in order to avoid excessive load on the computing device and cause anomalies, in some embodiments, a load transfer operation is performed on subsequent retrieval requests sent to the computing device to distribute them to other service nodes for processing.
[0188] This implementation also enables personalized retrieval. Specifically, in response to identifying that a target user's behavior conforms to a predetermined behavioral pattern, related data associated with the behavioral pattern is preloaded into the cache. The predetermined behavioral pattern includes: when it is determined that the number of times a target user retrieves specific related data within a specific time period reaches a threshold, the user is included in the target user's personalized behavioral profile, and when the current time enters the specific time period, the specific related data is preloaded into the local cache.
[0189] For example, user A frequently queries home-office routes, primarily between 7:30 AM and 6:00 PM, establishing a personal access pattern: P(route_home_office, 7:30) = 0.8. The computing device can be configured to automatically preload user A's frequently used route data daily at 7:25 AM.
[0190] Finally, in step 212, in response to the user's query information, the spatiotemporal range in the user's query is parsed, mapped to the corresponding spatiotemporal grid code range, and a retrieval is performed based on this range to return the matched related data.
[0191] Step 210 specifically includes the following sub-steps:
[0192] First, extract the spatial range and time interval contained in the query information.
[0193] It's worth noting that user queries are typically not structured mesh codes, but rather initiated through various front-end interactive interfaces. For example, natural language descriptions might include phrases like, "Find video footage of the sky above a park yesterday afternoon," or "I want to watch video footage from around 3 PM last Wednesday near the east gate of a park." Alternatively, there might be map interactions: users manually draw a rectangle or polygon on a map to select a spatial range, and then specify a time range by sliding a timeline or selecting a calendar control. Or, there might be structured query forms: users fill in the address, start time, end time, etc., in dropdown menus and input boxes, respectively.
[0194] Upon receiving a query request, the ambiguous and diverse input needs to be converted into a precise and structured spatiotemporal grid code range.
[0195] For spatial extent processing: place names can be converted to latitude and longitude coordinates through geocoding services (such as GeoCoding API), or the vertex coordinates of user-drawn shapes can be directly parsed to calculate the minimum bounding rectangle that can cover the area.
[0196] For time processing: natural language or relative time (such as "yesterday") can be converted into absolute UTC timestamps to avoid time zone ambiguity and handle time boundaries (such as "afternoon" may be converted to 12:00:00 to 18:00:00).
[0197] Then, the spatial range and time interval are mapped to the spatiotemporal grid code range to be queried. The specific mapping process is the same as in step 202, and relevant details can be found in the description of step 202, which will not be repeated here.
[0198] Finally, using the spatiotemporal grid code range as the query condition, a search is performed in the index structure to obtain a list of associated data that matches the range.
[0199] In a specific example, a user queries: "Find all videos taken yesterday afternoon in a certain park."
[0200] After receiving the query request, the computing device first parses the time condition – “yesterday afternoon”: Assuming today is October 27, 2023. “Yesterday” = October 26, 2023. “Afternoon” = a common time period definition, such as the system default of 12:00:00–18:00:00 (UTC+8). The normalized time interval output is: [2023-10-26 12:00:00, 2023-10-26 18:00:00].
[0201] Further analyze the spatial condition – “within a certain park”: Obtain the latitude and longitude coordinates of “a certain park” through a geocoding service, for example: (116.3170, 39.9812). Generate a circular area covering the entire park, centered on these coordinates. Calculate the bounding box of this circular area. Minimum longitude (MinX) = 116.3070, minimum latitude (MinY) = 39.9712, maximum longitude (MaxX) = 116.3270, maximum latitude (MaxY) = 39.9912. The normalized spatial extent output is a rectangular area defined by (MinX, MinY, MaxX, MaxY).
[0202] The above rectangular area is converted into a grid code range: Based on the preset grid precision level (e.g., selecting an L20 meter-level grid for retrieval), the system calculates: the BeiDou grid code Code_lower_left corresponding to the lower left corner point (MinX, MinY) of the spatial range; and the BeiDou grid code Code_upper_right corresponding to the upper right corner point (MaxX, MaxY) of the spatial range.
[0203] Since grid coding is ordered, these two codes actually define a spatial grid coding range [Code_lower_left, Code_upper_right].
[0204] Similarly, the start and end times within the time interval are converted into time grid codes, and a time grid coding range is defined.
[0205] Ultimately, the query is transformed into: in the database's STGCI index, find all data records whose STGCI values fall within the continuous interval [Spatial_Code_Low + Time_Code_Low, Spatial_Code_High + Time_Code_High].
[0206] The method provided by this invention brings the following significant beneficial effects:
[0207] Firstly, regarding retrieval performance, this invention introduces an access pattern learning engine, which can analyze and predict user query behavior in real time and dynamically adjust the weight allocation and index structure of the spatiotemporal grid code, thereby significantly improving retrieval efficiency. For frequently accessed hot data, the system can achieve millisecond-level response speeds, significantly reducing the average retrieval latency and effectively meeting the performance requirements of high-concurrency, low-latency retrieval in large-scale spatiotemporal data environments.
[0208] Secondly, regarding system adaptability and stability, this algorithm possesses the ability to dynamically adapt to changes in data access distribution. Through intelligent prefetching mechanisms and load-aware scheduling strategies, the system can not only preload data with potentially high access demands, but also automatically implement reasonable request distribution and resource allocation when access pressure surges, thereby significantly improving the system's stability and reliability under sudden loads and avoiding performance bottlenecks caused by local overheating.
[0209] Third, regarding resource utilization and scalability, this invention optimizes the allocation efficiency of computing and storage resources and reduces redundancy overhead by implementing differentiated encoding and indexing strategies for data with varying access frequencies. The system can better adapt to the continuous growth of data scale and dynamic changes in access patterns, possessing excellent horizontal scalability and providing an efficient and economical solution for ultra-large-scale spatiotemporal data applications.
[0210] In summary, this method not only effectively overcomes the inherent defects of traditional static indexing mechanisms, such as poor flexibility and difficulty in adapting to dynamic query needs, but also achieves a comprehensive improvement in the performance, stability, and resource efficiency of spatiotemporal data retrieval through an intelligent and adaptive technical approach, demonstrating significant technological advancement and application value.
[0211] Figure 3 A schematic diagram of a spatiotemporal data retrieval device 300 for dynamically adjusting grid coding precision according to an embodiment of the present invention is shown. The device 300 resides in a computing device. The device 300 includes a statistical module 302, an adjustment module 304, an update module 306, a combination module 308, a construction module 310, and a retrieval module 312, all coupled to each other.
[0212] The system comprises the following modules: Statistics module 302 is adapted to count the retrieval frequency of each region based on historical retrieval data and sort them accordingly. Adjustment module 304 is adapted to dynamically adjust the spatial grid coding level of the corresponding region according to a predefined strategy based on the sorting results. Update module 306 is adapted to update the spatial grid code of the corresponding region to the new code corresponding to the new level in response to the adjustment of the grid coding level. Combination module 308 is adapted to combine each updated spatial grid code with the temporal information of any associated data to generate a spatiotemporal grid code. Construction module 310 is adapted to construct the mapping relationship between the spatiotemporal grid code and its associated region, and to construct the index relationship between the spatiotemporal grid code and the corresponding associated data. Retrieval module 312 is adapted to respond to the user's query information, parse the spatiotemporal range in the user's query, map it to the corresponding spatiotemporal grid code range, perform a retrieval based on this range, and return the matched associated data.
[0213] It should be noted that the working principle and process of the device 300 provided in this embodiment are similar to those of the method 200 described above. For relevant details, please refer to the description of the method 200 described above, which will not be repeated here.
[0214] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the present invention.
[0215] When the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute the method of the present invention according to instructions in the program code stored in the memory.
[0216] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.
[0217] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing preferred embodiments of the invention.
[0218] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0219] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in devices as described in this embodiment, or alternatively, can be located in one or more devices different from the device in this example. The modules in the foregoing examples can be combined into a single module or further divided into multiple sub-modules.
[0220] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.
[0221] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.
[0222] Although the invention has been described with reference to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and instructional purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and alterations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims.
Claims
1. A spatiotemporal data retrieval method for dynamically adjusting grid coding precision, executed on a computing device, comprising: Based on historical search data, the search frequency of each region is statistically analyzed and sorted accordingly; Based on the sorting results, the spatial grid coding level of the corresponding area is dynamically adjusted according to a predefined strategy. In response to the adjustment of the grid coding level, the spatial grid code of the corresponding area is updated to a new code corresponding to the new level; Each updated spatial grid code is combined with the temporal information of any associated data to generate a spatiotemporal grid code. Construct a mapping relationship between spatiotemporal grid codes and their associated regions, and construct an index relationship between spatiotemporal grid codes and their corresponding associated data; In response to the user's query information, the system parses the spatiotemporal range in the user's query, maps it to the corresponding spatiotemporal grid code range, performs a search based on this range, and returns the relevant data that was matched.
2. The method as described in claim 1, wherein, Constructing the index relationship between spatiotemporal grid codes and corresponding associated data includes: Related data whose historical retrieval frequency meets the frequency threshold condition are assigned to the first dataset, and other related data are assigned to the second dataset. For the associated data in the first dataset, according to the predefined multi-level caching strategy, it is deployed to a caching system composed of multi-level caching media; The associated data in the second dataset is processed by a compression algorithm and then transferred to a storage medium.
3. The method as described in claim 1, wherein, Also includes: Using the historical retrieval data, one or more high-activity time intervals are determined based on the access activity of retrieval operations in each region over time. For each high-activity time interval, filter and select related data whose retrieval frequency exceeds the frequency threshold within that interval, and use them as hot data. In response to detecting that the time difference between the current time and the target high-activity time interval is less than a time threshold, the hot data corresponding to the target high-activity time interval is preloaded into the cache.
4. The method of claim 2, wherein, Also includes: When the access growth rate of the target region is detected to be greater than the growth rate threshold, the associated data related to the target region is preloaded into the cache.
5. The method of claim 1, wherein, Also includes: In response to identifying that the target user's behavior conforms to a predetermined behavior pattern, associated data related to the behavior pattern is preloaded into the cache.
6. The method of claim 1, wherein, Based on the sorting results, the spatial grid coding level of the corresponding area is dynamically adjusted according to a predefined strategy, including: The ranking range to which the ranking of a region belongs is determined, and its spatial grid coding level is set to the fixed level corresponding to that range. The higher the ranking range, the higher the corresponding spatial grid coding level.
7. The method of claim 6, wherein, In response to the adjustment of the grid coding level, the spatial grid code of the corresponding region is updated to a new code corresponding to the new level, including: Based on the updated grid accuracy, the target area is divided into a set of spatial grids that conform to the BeiDou grid standard; According to the BeiDou grid coding rules, the geometric coordinates of each grid in the spatial grid set are encoded to generate the corresponding grid code.
8. The method of claim 1, wherein, Each updated spatial grid code is combined with the temporal information of any associated data to generate a spatiotemporal grid code, including: By using concatenation or hashing methods, spatial grid codes are combined with temporal information to form spatiotemporal grid codes.
9. The method of claim 1, wherein, In response to the user's query, the system parses the spatiotemporal range in the query, maps it to the corresponding spatiotemporal grid code range, performs a search based on this range, and returns the relevant data, including: Extract the spatial range and time interval contained in the query information; Map the spatial range and time interval to the spatiotemporal grid code range to be queried; Using the spatiotemporal grid code range as the query condition, a search is performed in the index relationship to obtain a list of associated data that matches the range.
10. The method of claim 1, wherein, The associated data is one of the following: GIS map data, video data, oblique photography data, signaling / positioning data, laser point cloud data, civil defense data, meteorological and oceanographic data, and public thematic data.
11. The method of claim 4, wherein, Also includes: When the access growth rate of the target area exceeds the growth rate threshold, a load balancing operation is performed on subsequent retrieval requests sent to the computing device to distribute them to other service nodes for processing.
12. The method of claim 5, wherein, The predetermined behavioral patterns include: When it is determined that the number of times a target user searches for specific related data within a specific time period reaches a threshold, the user is included in the target user's personalized behavior profile, and when the user enters the specific time period at the current time, the specific related data is preloaded into the local cache.
13. A spatiotemporal data retrieval device for dynamically adjusting grid coding precision, residing in a computing device, the device comprising: The statistics module is suitable for calculating and sorting the search frequency of each region based on historical search data. The adjustment module is suitable for dynamically adjusting the spatial grid coding level of the corresponding area according to the sorting results and a predefined strategy. The update module is adapted to update the spatial grid code of the corresponding area to a new code corresponding to the new level in response to the adjustment of the grid coding level; The combined module is suitable for combining each updated spatial grid code with the temporal information of any associated data to generate a spatiotemporal grid code. The module is suitable for constructing the mapping relationship between spatiotemporal grid codes and their associated regions, and for constructing the index relationship between spatiotemporal grid codes and their corresponding associated data; The retrieval module is adapted to respond to user query information, parse the spatiotemporal range in the user query, map it to the corresponding spatiotemporal grid code range, perform retrieval based on this range, and return the matched related data.
14. A computing device, comprising: At least one processor; and A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the method as described in any one of claims 1-12.
15. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method as described in any one of claims 1-12.
Citation Information
Patent Citations
Livestock breeding abnormity early warning system based on Internet of Things
CN116913057A
Space-time data service method based on grid coding and industrial internet platform
CN117435823A