General spatio-temporal data encoding method, device and storage medium

By building a metadata management system and generating metadata management tables, the city's spatiotemporal data is binary coded, and the general spatiotemporal data encoding is integrated to generate general spatiotemporal data encoding, the problem of inefficient spatiotemporal data processing in the existing technology is solved, and rapid indexing, retrieval and analysis are realized.

CN119961373BActive Publication Date: 2025-06-10SHENZHEN SMARTCITY TECH DEV GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510444968.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-06-10
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

When judging the encoded slices of data storage, the prior art relies on checking the degree of matching between the data items and the encoded slices one by one, and cannot quickly locate the encoded slices that data should be stored, resulting in inefficient spatiotemporal data processing.

Method used

By constructing a metadata management system and generating metadata management tables, the product information, time information and spatial information of urban spatiotemporal data are extracted for binary encoding, and the general spatiotemporal data encoding is integrated to achieve rapid indexing, retrieval and analysis of spatiotemporal data.

Benefits of technology

It improves data processing efficiency and quality, realizes rapid indexing, retrieval and analysis of spatiotemporal data, and solves the problem of inefficient spatiotemporal data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961373B_ABST
    Figure CN119961373B_ABST
Patent Text Reader

Abstract

The present application discloses a general spatio-temporal data encoding method, device and storage medium, relating to the technical field of data processing. The general spatio-temporal data encoding method includes: generating a metadata management table based on the read urban spatio-temporal data; extracting the product information, time information and spatial information of each piece of the urban spatio-temporal data according to the metadata management table; performing binary encoding on the product information, time information and spatial information respectively to obtain a product code, a time code and a geospatial code; and fusing the product code, the time code and the geospatial code to generate a general spatio-temporal data encoding of each piece of the urban spatio-temporal data. The present application achieves the technical effect of improving the spatio-temporal data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and particularly to a general spatio-temporal data encoding method, device, and storage medium. Background Art

[0002] In the encoding technology system, data is allocated to different encoding slice dimensional spaces for storage to facilitate subsequent efficient retrieval and processing. However, currently, when determining the encoding slice for data storage, it depends on checking the matching degree between data items and encoding slices one by one, and it is impossible to quickly locate the encoding slice where the data should be stored, resulting in low spatio-temporal data processing efficiency.

[0003] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a general spatio-temporal data encoding method, device, and storage medium, aiming to solve the technical problem of low spatio-temporal data retrieval efficiency.

[0005] To achieve the above purpose, this application proposes a general spatio-temporal data encoding method, and the general spatio-temporal data encoding method includes:

[0006] Generating a metadata management table based on the read urban spatio-temporal data;

[0007] Extracting the product information, time information, and spatial information of each piece of the urban spatio-temporal data according to the metadata management table;

[0008] Performing binary encoding on the product information, time information, and spatial information respectively to obtain a product encoding, a time encoding, and a spatial encoding;

[0009] Fusing the product encoding, the time encoding, and the spatial encoding to generate a general spatio-temporal data encoding for each piece of the urban spatio-temporal data.

[0010] In one embodiment, the step of generating a metadata management table based on the read urban spatio-temporal data includes:

[0011] Constructing a primary key of the metadata management table according to the product category of the urban spatio-temporal data;

[0012] Based on the primary key, constructing a secondary key of the metadata management table according to the production time of the urban spatio-temporal data;

[0013] Pairing the metadata information of the urban spatio-temporal data to the corresponding secondary key as the value of the metadata management table.

[0014] In one embodiment, the step of respectively performing binary encoding on the product information, time information, and spatial information to obtain a product code, a time code, and a spatial code includes:

[0015] Based on the product information of each piece of urban spatio-temporal data, perform hierarchical encoding according to a preset encoding table as the product code;

[0016] Based on the time information of each piece of urban spatio-temporal data, perform Unix time encoding to determine the time code;

[0017] Based on the spatial information of each piece of urban spatio-temporal data, perform GeoSOT encoding to determine the geospatial code.

[0018] In one embodiment, the step of based on the time information of each piece of urban spatio-temporal data, performing Unix time encoding to determine the time code includes:

[0019] Sort the time information and perform Unix time encoding on each time variable in the sorted time information;

[0020] Convert the result of the Unix time encoding to binary encoding as the time code.

[0021] In one embodiment, the step of based on the spatial information of each piece of urban spatio-temporal data, performing GeoSOT encoding to determine the geospatial code includes:

[0022] According to the spatial information, calculate the oriented bounding box range of the urban spatio-temporal data at each time point;

[0023] Select the maximum value within the oriented bounding box range during the time span as the reference spatial range and determine the dissection level code of GeoSOT;

[0024] According to the dissection level corresponding to the dissection level code and the reference spatial range, generate the corresponding geospatial code.

[0025] In one embodiment, the step of according to the dissection level corresponding to the dissection level code and the reference spatial range, generating the corresponding geospatial code includes:

[0026] According to the dissection level, determine the level of the urban spatio-temporal data in the GeoSOT encoding and calculate the boundary of the GeoSOT slice at this level;

[0027] Compare the reference spatial range of the urban spatio-temporal data with the boundary of the GeoSOT slice to determine the GeoSOT slice covered by the reference spatial range of the urban spatio-temporal data as the selected slice;

[0028] According to the rules of the GeoSOT encoding, calculate the row and column indexes of the selected slice, and convert the row and column indexes of the selected slice into binary numbers, which are used as the geospatial encoding.

[0029] In one embodiment, the step of fusing the product encoding, the time encoding, and the geospatial encoding to generate a general spatio-temporal data encoding for each of the urban spatio-temporal data includes:

[0030] Concatenate the subdivision level encoding, the geospatial encoding, the time encoding, and the product encoding in sequence to obtain a long binary string, which is used as the general spatio-temporal data encoding.

[0031] In one embodiment, after the step of fusing the product encoding, the time encoding, and the geospatial encoding to generate a general spatio-temporal data encoding for each of the urban spatio-temporal data, it includes:

[0032] According to the query instruction of the client, parse the time parameter, the product parameter, and the space parameter in the query instruction, convert the time parameter into a corresponding time parameter encoding, and convert the product parameter into a corresponding product parameter encoding;

[0033] Use the time parameter encoding to compare with the time encoding part in the general spatio-temporal data encoding to obtain a corresponding time slice array;

[0034] For the time slice array, further use the product parameter encoding to compare with the product encoding part in the general spatio-temporal data encoding to determine a corresponding product slice array;

[0035] In the product slice array, determine the spatial range queried in the query instruction according to the space parameter, and determine the intersection range with the spatial range of the general spatio-temporal data encoding through a spatial intersection algorithm to determine a corresponding spatial slice array, which is used as the query result and returned to the client.

[0036] In addition, to achieve the above object, the present application also proposes a general spatio-temporal data encoding device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the general spatio-temporal data encoding method as described above.

[0037] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the general spatio-temporal data encoding method as described above.

[0038] This application provides a general spatio-temporal data encoding method. Based on the read urban spatio-temporal data, this application generates a metadata management table; extracts the product information, time information, and spatial information of each urban spatio-temporal data according to the metadata management table; performs binary encoding on the product information, time information, and spatial information respectively to obtain a product code, a time code, and a geospatial code; fuses the product code, the time code, and the geospatial code to generate a general spatio-temporal data encoding for each urban spatio-temporal data. This application first realizes the comprehensive and systematic management of spatio-temporal data by constructing a metadata management system and generating a metadata management table. By extracting the product, time, and spatial dimension information of spatio-temporal data from the metadata management table, binary encoding is performed, and complex data information is converted into binary information that is easily understood by machines, improving the data processing efficiency and quality. The encoded product, time, and spatial dimension information are fused to generate a general spatio-temporal data encoding, realizing the rapid indexing, retrieval, and analysis of spatio-temporal data. This application achieves the technical effect of improving the spatio-temporal data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the general spatio-temporal data encoding method of this application;

[0042] Figure 2 It is a logical structure diagram of the metadata management table provided for the general spatio-temporal data encoding method of this application;

[0043] Figure 3 It is a general spatio-temporal data encoding structure diagram provided for the general spatio-temporal data encoding method of this application;

[0044] Figure 4 It is a schematic flowchart provided for Embodiment 2 of the general spatio-temporal data encoding method of this application;

[0045] Figure 5 It is a schematic flowchart provided for Embodiment 3 of the general spatio-temporal data encoding method of this application;

[0046] Figure 6 It is a schematic flowchart provided for Embodiment 4 of the general spatio-temporal data encoding method of this application;

[0047] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the general spatio-temporal data encoding method in the embodiments of the present application.

[0048] The realization of the purpose, functional characteristics and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific embodiments.

[0051] The main solution of the embodiments of the present application is as follows:

[0052] Currently, in the coding technology system, data is allocated to different coding slice spaces for storage to facilitate subsequent efficient retrieval and processing. However, currently, when judging the coding slice for data storage, it depends on checking the matching degree between data items and coding slices one by one, and it is impossible to quickly locate the coding slice where the data should be stored, resulting in low spatio-temporal data processing efficiency.

[0053] The present application realizes the comprehensive and systematic management of spatio-temporal data by constructing a metadata management system and generating a metadata management table. By extracting the product, time, and space dimension information of spatio-temporal data from the metadata management table, binary coding is performed, converting complex data information into binary information that is easily understood by machines, improving the data processing efficiency and quality. The encoded product, time, and space dimension information are fused to generate a general spatio-temporal data encoding, realizing the rapid indexing, retrieval, and analysis of spatio-temporal data.

[0054] It should be noted that the execution subject of this embodiment can be a general spatio-temporal data coding system, or a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a control device of a general spatio-temporal data coding system that can implement the above functions. This embodiment does not make specific limitations in this regard. The following takes the general spatio-temporal data coding system as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0055] Embodiment 1

[0056] Based on this, the present application proposes a general spatio-temporal data encoding method for the first embodiment. Please refer to Figure 1 , and the general spatio-temporal data encoding method includes:

[0057] Step S10: Generate a metadata management table based on the read urban spatio-temporal data.

[0058] Construct a comprehensive, systematic and efficient metadata management system to manage and describe multi-source heterogeneous urban spatio-temporal data across time domains. By constructing the metadata management system and generating the metadata management table, we can better understand and utilize the spatio-temporal data of multi-source heterogeneous cities across time domains, and improve the efficiency and quality of data processing.

[0059] In this embodiment, the urban spatio-temporal data is multi-source heterogeneous urban spatio-temporal data across time domains. Across time domains means that the data spans different time periods. Data across time domains implies that the time attributes of the data need to be considered in order to accurately record and manage it in the metadata management system. Multi-source heterogeneous means that the data comes from multiple different sources and there are differences in the structure, format, content, etc. of the data. Urban spatio-temporal data is data with timestamp and geographical location information, including various information such as traffic flow, environmental monitoring, and population distribution in the city.

[0060] In this embodiment, metadata is data that describes data, including the source, format, timestamp, spatial range, etc. of the data. The metadata management table is a data structure used to store and manage metadata, which is stored in the form of key-value pairs and uses the Redis in-memory data structure. A key-value pair consists of a key and a value, which is a data structure used for quickly retrieving data. Redis is an open-source high-performance key-value storage system used for caching and message queues.

[0061] As an alternative implementation, please refer to Figure 2 the logical structure of the metadata management table shown in the figure, perform multi-threaded concurrent reading of the urban spatio-temporal data, obtain and record the key information, construct the metadata management system according to the key information, generate a metadata management table including a first-level key, a second-level key, and a value, and use the hash table data structure of Redis to store the metadata management table. Among them, the key information includes file path, file name, coordinate system calibration, spatial range, time information, file format, etc.

[0062] Optionally, when performing data reading, determine the file reading method according to the storage method and medium of the file data. Methods such as single-threaded reading, distributed reading, and cloud reading can be used.

[0063] It should be noted that single-threaded reading is applicable to small-scale data sets or files with sequential access. Single-threaded reading is simple to implement and does not require handling thread synchronization issues. Multi-threaded concurrent reading is applicable to large-scale data sets. When the data can be divided into multiple independent blocks for parallel processing, using multi-threaded concurrent reading can make full use of the parallel processing capabilities of multi-core processors and improve I / O performance. Distributed reading is applicable to large data sets in distributed storage systems. Distributed reading can read data in parallel across multiple nodes, improving the overall system throughput and fault tolerance. Cloud reading is applicable to data stored in cloud storage services, and can utilize the elasticity and scalability of cloud storage services, as well as the network acceleration and data transmission optimization provided by cloud providers.

[0064] Optionally, the metadata management table can be stored not only in Redis, but also in a file system or a database, and its content format can be JSON, binary, XML, library tables, etc.

[0065] Optionally, the primary and secondary keys of the metadata management table are not fixed and can be formed by combining two selections respectively in the time, product, and space dimensions.

[0066] Optionally, step S10 includes:

[0067] Step S11, constructing the primary key of the metadata management table according to the product category of the urban spatio-temporal data.

[0068] It should be noted that the product category is the category to which the urban spatio-temporal data belongs, including traffic flow, environmental monitoring, population distribution, etc. The primary key is the key used to distinguish data of different product categories in the metadata management table.

[0069] Exemplarily, according to the product category of the urban spatio-temporal data, the data is preliminarily classified to determine the product category list of the urban spatio-temporal data, and a unique identifier is assigned to each product category as the primary key.

[0070] It should be noted that in the metadata management table, the primary key is used as an index to provide a basis for subsequent data storage and retrieval.

[0071] Step S12, constructing the secondary key of the metadata management table based on the primary key according to the production time of the urban spatio-temporal data.

[0072] Based on the primary key, further classify and manage the urban spatio-temporal data in the time dimension, and distinguish data with different production times under the same product category by constructing the secondary key.

[0073] It should be noted that the production time is the time when the urban spatio-temporal data is generated or recorded. The secondary key is a key in the metadata management table that further subdivides the data based on the primary key and is used to distinguish data with different production times under the same product category.

[0074] Exemplarily, based on the primary key, the data is further classified according to the production time of the data. The production time of each urban spatio-temporal data is extracted, and the production time information is converted into the format of a timestamp or a date string, which is used as the secondary key and associated with the corresponding primary key.

[0075] Step S13: Pair the metadata information of the urban spatio-temporal data with the corresponding secondary key and use it as the value of the metadata management table.

[0076] Associate the specific metadata information with the corresponding secondary key to complete the construction of the metadata management table.

[0077] It should be noted that the value is the data associated with the key, that is, the specific metadata information stored in the metadata management table.

[0078] Exemplarily, determine the metadata information to be stored, including file path, file name, coordinate system calibration, spatial range, time information, file format, etc. Pair this information with the corresponding secondary key and store the paired metadata information as the value under the corresponding secondary key in the metadata management table.

[0079] Step S20: Extract the product information, time information, and spatial information of each urban spatio-temporal data according to the metadata management table.

[0080] In this embodiment, the product information refers to the category or type to which the urban spatio-temporal data belongs, such as traffic data, meteorological data, etc. The time information refers to the time attribute of the urban spatio-temporal data, such as the specific time when the data is collected or generated. The spatial information refers to the spatial location attribute of the urban spatio-temporal data, such as longitude and latitude coordinates, geographical regions, geographical grid codes, etc.

[0081] As an alternative implementation, for the metadata management table stored in the database, use SQL query statements to extract information related to the metadata management table, and extract the product information, time information, and spatial information of the urban spatio-temporal data according to the query statements.

[0082] As another alternative implementation, for the metadata management table managed by the API (Application Programming Interface), call the corresponding API interface to pass parameters and receive the returned metadata information in JSON format. Parse out the product information, time information, and spatial information from the returned metadata. Among them, JSON (JavaScript Object Notation) is a lightweight data exchange format, which is based on a subset of ECMAScript (the JS specification formulated by the European Computer Society) and uses a text format completely independent of the language to store and represent data.

[0083] Step S30: Perform binary encoding on the product information, time information, and spatial information respectively to obtain a product code, a time code, and a geospatial code.

[0084] Convert the key spatio-temporal data information extracted from the metadata management table into binary encoding to facilitate data storage, retrieval, and analysis. Through binary encoding, data can be effectively compressed, storage space can be reduced, and the speed of data processing can be increased.

[0085] It should be noted that binary encoding is the process of converting information into binary form. Binary is a number system that only contains two states, 0 and 1, and is suitable for computer processing and storage.

[0086] As an alternative implementation, for product information, formulate binary encoding rules for product information to ensure that each product category has a unique binary representation. For time information, use Unix timestamps and convert them into binary form. For spatial information, formulate corresponding binary encoding rules according to the specific geocoding system.

[0087] Optionally, associate the encoded information with the records in the original metadata management table.

[0088] Step S40: Integrate the product code, the time code, and the geospatial code to generate a common spatio-temporal data code for each city's spatio-temporal data.

[0089] In this embodiment, the common spatio-temporal data code is a unique code that integrates product, time, and spatial dimension information and is used to identify data points or data sets in the spatio-temporal data set.

[0090] As an alternative implementation, sequentially combine or splice the encoded product, time, and spatial dimension information to form a unified encoded string, that is, the common spatio-temporal data code.

[0091] Optionally, a check bit or an error detection code is added to the general spatio-temporal data encoding to improve the accuracy of the encoding.

[0092] As another alternative implementation, different weights are assigned to the dimension information of the product, time, and space based on the importance of the spatio-temporal data, and the information is fused into a single encoded string according to the weights as the general spatio-temporal data encoding.

[0093] Exemplarily, in time-sensitive applications, higher weights are assigned to the time dimension information.

[0094] Optionally, step S40 includes:

[0095] Step S41, concatenating the dissection level encoding, the geospatial encoding, the time encoding, and the product encoding in sequence to obtain a long binary string as the general spatio-temporal data encoding.

[0096] Optionally, please refer to Figure 3 to concatenate a 5-bit slice level encoding (i.e., the dissection level encoding), a GeoSOT encoding of the dynamic height range (i.e., the spatial encoding, 3L bits, where L is the slice level), a 32-bit time encoding, and a 7-bit product encoding in sequence to form a general spatio-temporal data binary encoding structure.

[0097] Exemplarily, if the slice level is "01011", the GeoSOT encoding is "110100", the time encoding is "0001 10000101 1001 1101 0000 0000 0000", and the product encoding is "0110001", then the concatenated encoding is "01011110100 0001 1000 0101 1001 1101 0000 0000 0000 0110001".

[0098] This embodiment provides a general spatio-temporal data encoding method. First, this embodiment realizes the comprehensive and systematic management of spatio-temporal data by constructing a metadata management system and generating a metadata management table. By extracting the product, time, and space dimension information of the spatio-temporal data from the metadata management table, binary encoding is performed, converting complex data information into binary information that is easily understood by machines, improving the data processing efficiency and quality. The encoded product, time, and space dimension information is fused to generate a general spatio-temporal data encoding, realizing the fast indexing, retrieval, and analysis of spatio-temporal data.

[0099] Based on Embodiment 1, Embodiment 2 of this application proposes a general spatio-temporal data encoding method. Referring to Figure 4 , step S20 includes:

[0100] Step S21, based on the product information of the spatiotemporal data of each city, hierarchical coding is performed according to a preset coding table as a product code.

[0101] The product information of spatiotemporal data in the metadata management table is converted into a standardized format, namely product code. This code can uniquely identify different data products, facilitating data classification, retrieval and management. Through hierarchical coding, complex product information can be simplified into easy-to-process digital or letter combinations, thereby improving the efficiency and accuracy of data processing.

[0102] It should be noted that hierarchical coding is a coding method that encodes information according to a certain hierarchical structure.

[0103] As an optional implementation method, please refer to the national basic geographic information element classification table to determine the coding rules for each major and medium category of each element, extract the product information of each data item from the metadata management table, and determine the major and medium category of the element to which it belongs. According to the extracted product information, use a seven-bit binary code, where the first three bits represent the code of the major category of the element, and the last four bits represent the code of the medium category of the element, and use the result of the hierarchical coding as the product code.

[0104] Exemplarily, the 7-digit product code for an intercity highway is "0110001", where "011" represents the major category of transportation and "0001" represents the medium category of intercity highway.

[0105] Step S22, performing Unix time coding based on the time information of the spatiotemporal data of each city to determine the time code.

[0106] It should be noted that Unix time code, also known as Unix timestamp or POSIX time, is the number of seconds starting from 00:00:00 UTC on January 1, 1970. It is a standard and widely accepted way of expressing time. Unix time code makes it easier to exchange and process time data between different systems and applications, and also facilitates time-related calculations and analysis.

[0107] Exemplarily, the time information of each data item is extracted from the metadata management table, the date string is converted into a time tuple, and then the time tuple is converted into a Unix time code, and the output Unix time code is used as the time dimension identifier of the data item, that is, the time code.

[0108] Optionally, step S22 includes:

[0109] Step A10, sorting the time information, and performing Unix time encoding on each time variable in the sorted time information.

[0110] In this embodiment, sorting is to ensure the order of time data for facilitating subsequent processing.

[0111] Exemplarily, sort the extracted time information in chronological order, and use the date and time processing functions in the programming language to perform Unix time encoding conversion on each sorted time variable, that is, convert each time point into the number of seconds since January 1, 1970.

[0112] Step A20, convert the result of the Unix time encoding into a binary encoding as the time encoding.

[0113] Exemplarily, convert the result of the Unix time encoding into a binary number, and ensure that the converted binary number is 32 bits. If it is less than 32 bits, fill it with 0s at the high positions.

[0114] Exemplarily, the Unix encoding of the time "October 1, 2021 00:00:00" is: "1633046400", and the encoded result after converting it into 32-bit binary and filling it is: "0001, 1000, 0101, 1001, 1101, 0000, 0000, 0000".

[0115] Optionally, the time encoding can also use a 64-bit binary encoding.

[0116] Step S23, perform GeoSOT encoding based on the spatial information of each piece of the urban spatio-temporal data to determine the geospatial encoding.

[0117] It should be noted that GeoSOT encoding is a coding method for geospatial information. Based on multi-level grid division, geospatial data is segmented into regular grid cells, and each grid cell has a unique code to identify its spatial location.

[0118] As an alternative implementation, use an SQL query statement to extract the spatial information of the spatio-temporal data from the metadata management table, integrate the GeoSOT encoding library in the data processing environment, call the function in the GeoSOT encoding library, use the extracted spatial information as the input parameter for encoding processing, and use the GeoSOT encoding result returned by the encoding function as the geospatial encoding.

[0119] As another alternative implementation, according to the programming language script, extract the spatial information from the metadata management table through database connection, call the API interface provided by GeoSOT, parse the API response, and extract the GeoSOT encoding result as the geospatial encoding.

[0120] This embodiment provides a general spatio-temporal data encoding method. Through hierarchical encoding, Unix time encoding, and GeoSOT encoding, this embodiment realizes the standardized processing of spatio-temporal data products, time, and space dimensions. The encoded data has uniqueness and structure, facilitating rapid retrieval and positioning in the database.

[0121] Based on the first and second embodiments, Embodiment 3 of this application proposes a general spatio-temporal data encoding method. Referring to Figure 5 , step S23 includes:

[0122] Step B10, according to the spatial information, calculate the oriented bounding box range of the urban spatio-temporal data at each time point.

[0123] It should be noted that the oriented bounding box (OBB) is a rectangular area used to enclose and contain spatial data objects, approximately representing the spatial distribution range of the data, and the direction can be arbitrary.

[0124] Exemplarily, for each time point, according to the coordinates of all spatial objects at this time point, an oriented bounding box is calculated, and this bounding box should contain all relevant spatial objects at this time point.

[0125] Optionally, the axis-aligned bounding box (AABB) can also be used to express the spatial range of the data product, and an axis-aligned bounding box is calculated for each time point as the axis-aligned bounding box.

[0126] Step B20, select the maximum value among the oriented bounding box ranges of each time point within the time span as the reference spatial range, and determine the dissection level encoding of GeoSOT.

[0127] As an alternative implementation, traverse the oriented bounding box ranges of all time points within the time span, and select the range with the largest coverage area as the reference spatial range. According to the size and shape of the reference spatial range, and the dissection rules of the GeoSOT encoding system, determine the dissection level encoding. Among them, a larger range may require a lower dissection level to reduce the number of grids, while a smaller range may require a higher dissection level to provide higher accuracy.

[0128] Exemplarily, use the judgment formula " " to determine the GeoSOT dissection level. Among them, "E" represents the spatial range of the GeoSOT slice, the subscript "n" represents the dissection level, "X" represents the reference spatial range of the current data. When this inequality is satisfied, "n" is the corresponding dissection level of the GeoSOT encoding of the current data, represented by 5-bit binary, and the high bits are filled with 0 if it is less than 5 bits.

[0129] Step B30: Generate the corresponding geospatial encoding according to the dissected level code corresponding to the dissected level and the reference spatial range.

[0130] Exemplarily, map the reference spatial range to the GeoSOT grid system, and determine the index of the grid according to the dissected level to generate the corresponding spatial encoding.

[0131] Optionally, query the highest and lowest elevations within the administrative division of the city where the spatio-temporal data is located as the upper and lower limits of the dynamic elevation range. Based on the determined GeoSOT dissection level and the dynamic elevation range, use the GeoSOT encoding algorithm to generate the spatial encoding.

[0132] Optionally, step B30 includes:

[0133] Step B31: Determine the level of the urban spatio-temporal data in the GeoSOT encoding according to the dissected level, and calculate the boundaries of the GeoSOT slices at this level.

[0134] As an alternative implementation, calculate the boundaries of each slice in the GeoSOT encoding according to the determined dissected level. According to the GeoSOT encoding rules, determine the longitude and latitude ranges of each grid cell.

[0135] Step B32: Compare the reference spatial range of the urban spatio-temporal data with the boundaries of the GeoSOT slices, and determine the GeoSOT slices covered by the reference spatial range of the urban spatio-temporal data as the selected slices.

[0136] Exemplarily, compare the reference spatial range of the spatio-temporal data with the boundaries of the GeoSOT slices to determine which GeoSOT slices are covered by the reference spatial range, and select all GeoSOT slices covered by the reference spatial range for subsequent spatial encoding generation.

[0137] Step B33: Calculate the row, column, and elevation indexes of the selected slices according to the GeoSOT encoding rules, and convert the row, column, and elevation indexes of the selected slices into binary numbers as the geospatial encoding.

[0138] It should be noted that the row and column indexes are used in the GeoSOT encoding system to uniquely identify the row, column, and elevation positions of a slice in the overall spatial structure.

[0139] Exemplarily, calculate the row, column, and elevation indexes of the selected slices according to the GeoSOT encoding rules to represent the position of the slice in the GeoSOT grid system. Convert the row, column, and elevation indexes into binary numbers as the geospatial encoding.

[0140] This embodiment provides a general spatio-temporal data encoding method. First, by calculating the oriented bounding box range of urban spatio-temporal data at each time point, the spatial distribution changes of the data at different time points can be captured. By selecting the maximum range in the oriented bounding box range as the reference spatial range, it is ensured that the generated geographical space encoding can cover all data points, while reducing unnecessary subdivision and improving the encoding efficiency.

[0141] Based on Embodiment 1, Embodiment 4 of this application proposes a general spatio-temporal data encoding method. Referring to Figure 6 , after step S40, it includes:

[0142] Step S50, according to the query instruction of the client, parse the time parameter, product parameter and spatial parameter in the query instruction, convert the time parameter into the corresponding time parameter encoding, and convert the product parameter into the corresponding product parameter encoding.

[0143] Convert the time parameter and product requirements in the query instruction sent by the client into a form that can be understood and efficiently processed by the database or system, that is, the time parameter encoding and product parameter encoding, so as to facilitate fast and accurate retrieval in the encoding database.

[0144] It should be noted that the query instruction of the client is an instruction containing query conditions sent by the user on the client, including information such as time parameters, product requirements and spatial parameters. The time parameter is the time range or time point specified in the query instruction, which is used to limit the time dimension of data retrieval. The product requirement is the data type or category specified in the query instruction, which is used to limit the product dimension of data retrieval. The spatial parameter is the geographical location or area specified in the query instruction, which is used to limit the spatial dimension of data retrieval. The time parameter encoding is the standardized encoding after the conversion of the time parameter, which is used to retrieve the data corresponding to the time in the database. The product parameter encoding is the standardized encoding after the conversion of the product parameter, which is used to retrieve the data corresponding to the product category in the database.

[0145] As an optional implementation method, receive and analyze the query instruction sent by the client, and extract the time, product and spatial parameters therein. According to the defined encoding rules, convert the time parameter into a Unix timestamp as the time parameter encoding, and convert the product parameter into a product parameter encoding according to the national basic geographic information element classification table.

[0146] Step S60, use the time parameter encoding to compare with the time encoding part in the general spatio-temporal data encoding to obtain the corresponding time slice array.

[0147] By comparing the time parameter encoding with the time encoding of the general spatio-temporal data encoding in the encoding database, the data slice array related to the query time can be effectively screened out.

[0148] It should be noted that the time slice array is a data set that matches the time parameter encoding and represents data slices within a specified time range.

[0149] Exemplarily, in the encoding database, the time parameter encoding in the received query request is compared with the time encoding in the general spatio-temporal data encoding. According to the comparison result, all data slices that match the time parameter encoding are filtered out to form a time slice array.

[0150] Step S70: For the time slice array, further compare the product parameter encoding with a part of the product encoding in the general spatio-temporal data encoding to determine the corresponding product slice array.

[0151] It should be noted that the product slice array is a data set that matches the product parameter encoding and represents data slices under the corresponding time and product categories.

[0152] Exemplarily, based on the time slice array, further compare the product parameter encoding in the query instruction with the product encoding part in the general spatio-temporal data encoding. According to the comparison result, data slices that match the product parameter encoding are filtered out from the time slice array to form a product slice array.

[0153] Step S80: In the product slice array, determine the spatial range queried in the query instruction according to the spatial parameter, and determine the intersection range with the spatial range of the general spatio-temporal data encoding through a spatial intersection algorithm to determine the corresponding spatial slice array, which is used as the query result and returned to the client.

[0154] Based on the product slice array, according to the spatial parameter in the query instruction, determine and filter out data slices that meet the spatial range requirements. Through the spatial intersection algorithm, accurately identify data slices that intersect or are included in the spatial range specified in the query instruction, and return these spatial slice arrays as the final query result to the client.

[0155] It should be noted that the spatial intersection algorithm is an algorithm for judging whether two or more spatial objects intersect or are included, and is used to determine whether the spatial data in the product slice array intersects with the spatial parameter in the query instruction. The spatial slice array is a data set that matches the spatial parameter and represents data slices under the time and product categories and within the specified spatial range.

[0156] As an alternative implementation, according to the spatial parameters in the query instruction, determine the spatial range required for the query. Use the spatial intersection algorithm to calculate the intersection of the query spatial range and the spatial range in the general spatio-temporal data encoding, and form an array of spatial slices. Return the determined array of spatial slices as the query result to the client.

[0157] As another alternative implementation, according to the received spatial parameters, determine the spatial range specified in the query instruction. Use the spatial intersection algorithm to compare the query spatial range with the spatial range of each data item in the product slice array. According to the result of the spatial intersection algorithm, filter out the product slice array that intersects with the query spatial range to form an array of spatial slices. Return the array of spatial slices as the query result to the client.

[0158] In this embodiment, when performing queries on time, space, and product encodings, the order is not limited. It is also possible to first perform a preliminary screening according to the product encoding, then compare the time encoding, and finally determine the spatial range specified in the query instruction according to the spatial parameters.

[0159] As another alternative implementation of this embodiment, receive the query instruction sent by the client, parse the time parameter, product requirement, and spatial parameter in the instruction, and convert them into corresponding time encoding, product encoding, and spatial encoding respectively. According to the converted time encoding, product encoding, and spatial encoding, combine or splice them according to the rules of the general spatio-temporal data encoding to form a query encoding. Use the constructed query encoding to compare with the general spatio-temporal data encoding. According to the comparison result, retrieve the dataset that matches the query encoding from the spatio-temporal dataset and return it to the client as the query result.

[0160] This embodiment provides a method for general spatio-temporal data encoding. In this embodiment, first, by parsing the time parameter, product requirement, and spatial parameter in the query instruction, convert them into corresponding encodings, and quickly find the matching data slices in the encoding database. Finally, determine and return the query result of the spatial range, which improves the query efficiency, reduces the data processing time, and ensures the accuracy of the query result.

[0161] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the general spatio-temporal data encoding method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.

[0162] The present application provides a general spatio-temporal data encoding device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the general spatio-temporal data encoding method in the first embodiment above.

[0163] Reference is made below to Figure 7 , which shows a schematic structural diagram of a general spatio-temporal data encoding device suitable for implementing the embodiments of the present application. The general spatio-temporal data encoding device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The general spatio-temporal data encoding device shown is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present application.

[0164] As Figure 7As shown in the figure, the general spatio-temporal data encoding device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM) 1004. In the random access memory 1004, various programs and data required for the operation of the general spatio-temporal data encoding device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the general spatio-temporal data encoding device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a general spatio-temporal data encoding device having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.

[0165] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0166] The general spatio-temporal data encoding device provided in the present application adopts the general spatio-temporal data encoding method in the above embodiments, and can solve the technical problem of low spatio-temporal data processing efficiency. Compared with the prior art, the beneficial effects of the general spatio-temporal data encoding device provided in the present application are the same as those of the general spatio-temporal data encoding method provided in the above embodiments, and other technical features in the general spatio-temporal data encoding device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0167] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0168] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all of them should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0169] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the general spatio-temporal data encoding method in the above embodiments.

[0170] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination of the above.

[0171] The above computer-readable storage medium can be included in the general spatio-temporal data encoding device; it can also exist alone and not be assembled into the general spatio-temporal data encoding device.

[0172] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by a general-purpose spatio-temporal data encoding device, the general-purpose spatio-temporal data encoding device can write computer program code for performing the operations of the present application in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0174] The modules described in the embodiments of the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.

[0175] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned general spatio-temporal data encoding method, which can solve the technical problem of low spatio-temporal data processing efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the general spatio-temporal data encoding method provided by the above embodiments, and will not be elaborated here.

[0176] The above are only partial embodiments of this application, and do not limit the patent scope of this application. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of this application.

Claims

1. A universal spatiotemporal data encoding method based on time, space and product dimensions, characterized in that: The general spatiotemporal data encoding method based on time, space and product dimensions includes: Generate metadata management table based on the read urban spatiotemporal data; Extracting product information, time information and space information of each of the city spatiotemporal data according to the metadata management table; Binary encoding is performed on the product information, time information and space information respectively to obtain a product code, a time code and a geographic space code, including: calculating the directional bounding box range of the urban spatiotemporal data at each time point according to the spatial information, selecting the maximum value in the directional bounding box range of each time point within the time span as the reference space range, determining the GeoSOT segmentation level code, determining the level of the urban spatiotemporal data in the GeoSOT code according to the segmentation level, and calculating the boundary of the GeoSOT slice at the level, comparing the reference space range of the urban spatiotemporal data with the boundary of the GeoSOT slice, determining the GeoSOT slice covered by the reference space range of the urban spatiotemporal data as the selected slice, calculating the row, column and elevation index of the selected slice according to the GeoSOT coding rule, and converting the row, column and elevation index of the selected slice into binary numbers as the geographic space code; The segmentation level code, geographic space code, time code and product code are sequentially concatenated to obtain a long binary string as the universal spatiotemporal data code.

2. The universal spatiotemporal data encoding method based on time, space and product dimensions as claimed in claim 1, characterized in that: The step of generating a metadata management table based on the read urban spatiotemporal data includes: Constructing a primary key of the metadata management table according to the product category of the urban spatiotemporal data; Based on the primary key, construct the secondary key of the metadata management table according to the production time of the urban spatiotemporal data; The metadata information of the urban spatiotemporal data is matched to the corresponding secondary key as the value of the metadata management table.

3. The universal spatiotemporal data encoding method based on time, space and product dimensions as claimed in claim 1, characterized in that: The steps of respectively performing binary coding on the product information, time information and space information to obtain a product code, a time code and a geographic space code include: Based on the product information of the spatiotemporal data of each city, hierarchical coding is performed according to a preset coding table as a product code; Based on the time information of the spatiotemporal data of each city, Unix time encoding is performed to determine the time code.

4. The universal spatiotemporal data encoding method based on time, space and product dimensions as claimed in claim 3, characterized in that: The step of performing Unix time coding based on the time information of the spatiotemporal data of each city and determining the time coding comprises: Sorting the time information, and performing Unix time encoding on each time variable in the sorted time information; The result of the Unix time encoding is converted into a binary code as the time code.

5. The universal spatiotemporal data encoding method based on time, space and product dimensions as claimed in claim 1, characterized in that: After the step of sequentially concatenating the segmentation level code, the geographic space code, the time code and the product code to obtain a long binary string as the universal spatiotemporal data encoding, the method further comprises: According to the query instruction of the client, the time parameter, product parameter and space parameter in the query instruction are parsed, the time parameter is converted into the corresponding time parameter code, and the product parameter is converted into the corresponding product parameter code; Compare the time parameter code with the time code portion in the universal spatiotemporal data code to obtain a corresponding time slice array; For the time slice array, further using the product parameter code to compare with the product code portion in the universal spatiotemporal data code to determine the corresponding product slice array; In the product slice array, the spatial range queried in the query instruction is determined according to the spatial parameters, and the intersection range with the spatial range of the universal spatiotemporal data encoding is determined through a spatial intersection algorithm, and the corresponding spatial slice array is determined as a query result and returned to the client.

6. A universal spatiotemporal data encoding device based on time, space and product dimensions, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of a general spatiotemporal data encoding method based on time, space and product dimensions as described in any one of claims 1 to 5.

7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the general spatiotemporal data encoding method based on time, space, and product dimensions as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Space-time data retrieval method based on space grid coding

    CN116049521A

  • Space-time diagram data processing method based on grid diagram database

    CN119760160A