Method, system and device for retrieving spatio-temporal data and program product

Converting multi-dimensional spatiotemporal data through spatial curve coding and creating indexes in ElasticSearch solves the problem of low spatiotemporal data storage and retrieval efficiency in HBase and enables efficient spatiotemporal data retrieval and query.

CN118839072APending Publication Date: 2024-10-25XIAMEN YUANTING INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410976879.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

When HBase distributed database processes spatio-temporal data, due to the matching problem between its single-dimensional RowKey sorting and multi-dimensional spatio-temporal data, storage and retrieval efficiency is low, and existing spatio-temporal index technology is difficult to effectively optimize.

Method used

Convert multi-dimensional spatial data in spatio-temporal data objects into one-dimensional encoding through spatial curve encoding, and store it in the database of the key-value storage model, create time indexes and spatial indexes, and use these indexes in ElasticSearch for query routing decisions and optimization Storage and retrieval of spatiotemporal data.

Benefits of technology

It significantly improves the storage efficiency and query speed of spatiotemporal data, ensures the accuracy and efficiency of queries, avoids unnecessary full table scans, and is suitable for efficient management and analysis of spatiotemporal big data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118839072A_ABST
    Figure CN118839072A_ABST
Patent Text Reader

Abstract

The invention provides a method, a system, a device and a program product for retrieving spatio-temporal data, and the method comprises the following steps: S1, converting multi-dimensional spatial data information in a pre-established spatio-temporal data object into a spatial one-dimensional code through spatial curve coding, and storing the spatial one-dimensional code in a preset expansion field of the spatio-temporal data object, the spatio-temporal data object comprises multi-dimensional spatial data information, time data information and expanded fields; s2, storing the spatio-temporal data object in a database of a key-value storage model, taking the spatial one-dimensional code as a key, and taking the multi-dimensional spatial data information, the time data information and the expansion field as values; s3, a time index and a space index are created in the ElasticSearch; s4, analyzing the to-be-retrieved data, obtaining a query type of the to-be-retrieved data, and performing routing decision; and S5, querying a database of the key-value storage model through a routing decision to obtain a retrieval result. By utilizing the technical scheme, the storage efficiency and the query speed of the spatio-temporal data are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of spatiotemporal data retrieval and analysis, and in particular to a method, system, device and program product for retrieving spatiotemporal data. Background Art

[0002] In recent years, the rise of distributed technology has provided new ideas for the management of massive data, especially for location data frequently generated in spatiotemporal databases. The HBase distributed database is favored for its ability to quickly and randomly access massive data, but its sorting and organization based on a single-dimensional RowKey is difficult to match with the multi-dimensional characteristics of spatiotemporal data. To overcome this challenge, spatiotemporal indexing technology (R-Tree, Quad-Tree, KD-Tree, and space filling curves, etc.) has been introduced to optimize the storage and retrieval efficiency of multi-dimensional spatiotemporal data in a distributed environment. The integration of these technologies has laid the foundation for the realization of an efficient and intelligent spatiotemporal data analysis and retrieval system. Summary of the invention

[0003] The present invention provides a method, system, device and program product for retrieving spatiotemporal data, aiming to improve the storage efficiency and query speed of spatiotemporal data.

[0004] In order to achieve the above object, a method for retrieving spatiotemporal data is provided, the method comprising the following steps:

[0005] S1, converting the multidimensional spatial data information in the pre-established spatiotemporal data object into a spatial one-dimensional code through spatial curve coding, and then storing the spatial one-dimensional code in a preset extended field of the spatiotemporal data object, wherein the spatiotemporal data object includes the multidimensional spatial data information, the time data information and the extended field;

[0006] S2, storing the spatiotemporal data object in a database of a key-value storage model, wherein the spatial one-dimensional code is used as a key, and the multidimensional spatial data information, the time data information and the extended field are used as values;

[0007] S3, creating a time index and a space index in ElasticSearch, wherein the time index includes: the time data information and the one-dimensional space code, and the space index includes: the multidimensional space data information and the one-dimensional space code, and the one-dimensional space code is used as a unique identifier of the time index and the space index;

[0008] S4, parsing the data to be retrieved, obtaining the query type of the data to be retrieved, and making a routing decision through a pre-set route according to the obtained query type;

[0009] S5, querying the database of the key-value storage model through the routing decision to obtain the retrieval result of the data to be retrieved.

[0010] Preferably, in the method for retrieving spatiotemporal data, the space curve encoding is space data encoding based on space filling curve Z-Ordering.

[0011] Preferably, in the method for retrieving spatiotemporal data, the database of the key-value storage model is an HBase database.

[0012] Preferably, the method for retrieving spatiotemporal data, wherein the one-dimensional spatial code is used as a unique identifier of the time index and the space index, comprises: using the timestamp of the current time as a prefix to splice the one-dimensional spatial code, and the spliced ​​data is the unique identifier of the time index and the space index.

[0013] Preferably, in the method for retrieving spatiotemporal data, the step of parsing the data to be retrieved is performing query type parsing on the data to be retrieved, wherein the query type includes:

[0014] Query multidimensional spatial data information based on a location information;

[0015] Query multi-dimensional spatial data information based on first-time information;

[0016] Querying multidimensional spatial data information according to the first geographic information; and,

[0017] The multidimensional spatial data information is queried according to the second time information and the second geographic information.

[0018] Preferably, in the method for retrieving spatiotemporal data, the step of making a routing decision based on the obtained query type through a preset route is: selecting a retrieval path based on the query type obtained by parsing the query type, wherein the retrieval path includes:

[0019] The location information is converted into a spatial one-dimensional code according to the spatial curve code, and a database of a key-value storage model is queried through the spatial one-dimensional code to obtain multi-dimensional spatial data information;

[0020] Retrieve the time index in the ElasticSearch database according to the first time information to obtain a spatial one-dimensional code set that conforms to the first time information, query the database of the key-value storage model through the obtained spatial one-dimensional code set of the first time information, and obtain a multidimensional spatial data information set of the first time information;

[0021] Retrieve the spatial index in the ElasticSearch database according to the first geographic information to obtain a spatial one-dimensional code set that conforms to the first geographic information, query the database of the key-value storage model through the obtained spatial one-dimensional code set of the first geographic information, and obtain a multidimensional spatial data information set of the first geographic information;

[0022] According to the second time information and the second geographic information, the time index and the spatial index in the ElasticSearch database are retrieved to obtain a spatial one-dimensional code set that conforms to the second time information and a spatial one-dimensional code set that conforms to the second geographic information. The intersection of the spatial one-dimensional code set of the second time information and the spatial one-dimensional code set of the second geographic information is taken to obtain a spatial one-dimensional code set that conforms to the second time information and the second geographic information. The database of the key-value storage model is queried through the obtained spatial one-dimensional code set of the second time information and the second geographic information to obtain a multidimensional spatial data information set of the second time information and the second geographic information.

[0023] Preferably, the method for retrieving spatiotemporal data, wherein the step of selecting a retrieval path according to the query type obtained by parsing the query type, further comprises:

[0024] A retrieval method for retrieving a time index in an ElasticSearch database according to the first time information or the second time information includes: a range filter, a date range aggregation query, and / or an exact time query;

[0025] The retrieval method of retrieving the spatial index in the ElasticSearch database according to the first geographic information or the second geographic information includes: rectangular filtering, circular filtering, polygon query and / or geographic shape query, wherein the geographic shape query includes: intersection relationship, non-intersection relationship, within relationship and / or inclusion relationship.

[0026] On the other hand, a system for performing spatiotemporal data retrieval using the method for retrieving spatiotemporal data as described in any one of the above items, wherein the system comprises:

[0027] A data converter, used to convert the multi-dimensional spatial data information in the pre-established spatiotemporal data object into a spatial one-dimensional code through spatial curve coding, create a time index and a spatial index in the ElasticSearch database, and store the spatiotemporal data object in the HBase database;

[0028] An analysis engine, used to parse the data to be retrieved and obtain the query type of the data to be retrieved;

[0029] The decision engine is used to query the time index and space index information in the ElasticSearch database, obtain the spatial one-dimensional code, and query the HBase database according to the obtained spatial one-dimensional code to obtain the search result of the data to be searched;

[0030] ElasticSearch database, used to store the time index and the space index;

[0031] The HBase database is used to store the spatiotemporal data objects.

[0032] On the other hand, a device for retrieving spatiotemporal data includes a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the steps of any of the above-mentioned methods for retrieving spatiotemporal data.

[0033] In yet another aspect, a computer program product comprises a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods for retrieving spatiotemporal data are implemented.

[0034] The above technical solution has the following technical effects:

[0035] The technical solution of the embodiment of the present invention converts the multidimensional spatial data in the spatiotemporal data object into one-dimensional code by using spatial curve coding, and stores the spatiotemporal data object in a database of a key-value storage model; creates a time index and a spatial index in the Elasticsearch database, performs query type parsing on the data to be retrieved, and automatically selects the optimal retrieval path according to the query type obtained after parsing, which significantly improves the storage efficiency and query speed of spatiotemporal data and provides strong support for the efficient management and analysis of spatiotemporal big data.

[0036] In a further embodiment, the timestamp of the current time is used as a prefix to concatenate with the spatial one-dimensional code, and the concatenated data is a unique identifier for the time index and the spatial index, ensuring that the time and space dimensions can be considered simultaneously during the query, thereby improving the accuracy and efficiency of the query; the query request can also be intelligently parsed, and the optimal retrieval path can be automatically selected according to the query type. Whether it is a simple location query or a complex time and space range query, it can be quickly filtered through the Elasticsearch index, and then the HBase database can be used for efficient scanning, avoiding unnecessary full table scans and greatly improving the overall query performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of a method for retrieving spatiotemporal data according to an embodiment of the present invention;

[0038] Figure 2A flowchart of decision making and analysis based on different routes in a method for retrieving spatiotemporal data according to another embodiment of the present invention;

[0039] Figure 3 A schematic diagram of a system for retrieving spatiotemporal data according to an embodiment of the present invention;

[0040] Figure 4 It is a schematic diagram of the structure of a device for retrieving spatiotemporal data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0042] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0043] Embodiment 1:

[0044] In order to improve the query efficiency and query accuracy of spatiotemporal data, the present invention provides a method for retrieving spatiotemporal data. Figure 1 FIG. 1 is a flow chart of a method for retrieving spatiotemporal data according to an embodiment of the present invention. Figure 1 As shown, the method for retrieving spatiotemporal data of this embodiment includes the following steps:

[0045] S1, converting the multidimensional spatial data information in the pre-established spatiotemporal data object into a spatial one-dimensional code through spatial curve coding, and then storing the spatial one-dimensional code in a preset extended field of the spatiotemporal data object, wherein the spatiotemporal data object includes the multidimensional spatial data information, the time data information and the extended field;

[0046] S2, storing the spatiotemporal data object in a database of a key-value storage model, wherein the spatial one-dimensional code is used as the key, and the multi-dimensional spatial data information, time data information and extended fields are used as the value;

[0047] S3, create a time index and a space index in ElasticSearch, where the time index includes: time data information and spatial one-dimensional code, and the spatial index includes: multi-dimensional spatial data information and spatial one-dimensional code, and use the spatial one-dimensional code as the unique identifier of the time index and the spatial index;

[0048] S4, parsing the data to be retrieved, obtaining the query type of the data to be retrieved, and making a routing decision through a pre-set route according to the obtained query type;

[0049] S5, querying the database of the key-value storage model through routing decision to obtain the retrieval result of the data to be retrieved.

[0050] Embodiment 2:

[0051] This embodiment provides a method for implementing a storage, rapid analysis, and retrieval system based on spatiotemporal big data, establishing a spatial one-dimensional code through a space filling curve, and establishing a mapping relationship between the spatial one-dimensional code information and time in an analysis engine, thereby implementing a rapid analysis and retrieval process, including the following steps:

[0052] Step 1: Establish a spatiotemporal data conversion layer, convert the spatial data through spatial curve coding, thereby converting the multidimensional spatial data into a one-dimensional spatial coding, and establishing an association relationship between time and the one-dimensional spatial coding;

[0053] Preferably, the data conversion layer performs conversion based on the spatiotemporal data object, which contains spatial information and time information, wherein the time information is non-mandatory information; the spatial data is encoded during the conversion process, and the specific operation is to encode the spatial data based on the space filling curve Z-Ordering to obtain a one-dimensional spatial code, which is GeoCode, and fill the one-dimensional spatial code into the object extension field, thereby establishing an association between the code and the object time.

[0054] Step 2: Obtain the converted spatial data information through the data conversion layer and store it based on the key-value database;

[0055] Preferably, the spatiotemporal data object obtained in step 1 is inserted into the key-value data system HBase, the GeoCode is used as the RowKey of the HBase database, and other data information in the spatiotemporal data object is used as the value.

[0056] Step 3, create spatiotemporal index information, establish a time index based on time and GeoCode, and establish a spatial index based on GeoCode and spatial data;

[0057] Preferably, based on the spatiotemporal data object obtained in step 1, a time index and a spatial index are created in ElasticSearch respectively. The detailed steps are as follows:

[0058] (1) Create a mapping, where the time index data type is date and the spatial index data type is geo_shape;

[0059] (2) Create an index, where the time index inserts time data into the date field and uses GeoCode as a unique identifier; the spatial index inserts spatial data into the geo_shape field and uses GeoCode as a unique identifier.

[0060] Step 4: Establish a spatiotemporal information analysis and decision engine to analyze the spatiotemporal information to be retrieved and make decision routing;

[0061] Preferably, the analysis and decision engine includes two stages: query parsing and decision routing. The query parsing stage will parse the query statement by query type. The query types include the following:

[0062] 1. Single query: that is, simply query a certain location information, and the query can be completed based on GeoCode;

[0063] 2. Time-related query: that is, it is necessary to retrieve spatial information based on time information, such as querying location information within a certain time range;

[0064] 3. Complex query of geographic information: that is, query spatial information based on geographic information, such as drawing a circle with a radius (unit: KM) with a certain location as the center, and retrieving all location information within the circle;

[0065] 4. Comprehensive query: The conditions include both time relevance and complex geographical information query, such as taking a certain location as the center, drawing a circle according to the radius (unit: KM), and retrieving all location information within the circle within a certain time period;

[0066] Figure 2 FIG. 1 is a flowchart of decision making and analysis based on different routes in a method for retrieving spatiotemporal data according to another embodiment of the present invention. Figure 2 As shown in the figure, after obtaining the query type according to the query statement parsing, decision routing is performed to determine whether the query type is a single query. If not, it is determined which of the remaining query types the query type is. According to the query type obtained, decisions are made based on different routes and the HBase database is queried. The decision and analysis contents are as follows:

[0067] 1.1. Single query: query the HBase database based on the GeoCode obtained in the parsing phase. GeoCode is the RowKey in the HBase database.

[0068] 2.1. Time-related query: Based on the time index data in ElasticSearch, search for time conditions, obtain the GeoCode collection through Range filter, Date Range aggregation query and precise time query, and obtain the RowKey in the collection through the scan method of HBase database, and obtain the spatiotemporal data;

[0069] 3.1. Complex query of geographic information: Based on the spatial index data in ElasticSearch, the geographic information conditions are searched, and the GeoCode collection is obtained through geo_bounding_box rectangular filtering, geo_distance circular filtering, geo_polygon polygon query, geo_shape geographic shape query, etc. The collection is obtained through the scan method of the HBase database. The RowKey in the collection is obtained, and the spatiotemporal data is obtained. Among them, the geographic shape query includes intersecting relationships, disjoint relationships, within relationships, and contains relationships;

[0070] 4.1. Comprehensive query: If there are both time-related conditions and geographic information conditions, query ElasticSearch through the above two methods to obtain two types of GeoCode sets respectively. Use the filter to take the intersection of the two sets to obtain the GeoCode result set to be queried, and based on the set, use the scan method of the HBase database to obtain the RowKey in the set and obtain the spatiotemporal data.

[0071] Step 5, spatiotemporal data query, conduct quick query based on the decision results of the spatiotemporal information analysis decision engine.

[0072] Embodiment three:

[0073] Figure 3 FIG. 1 is a schematic diagram of a system for retrieving spatiotemporal data according to another embodiment of the present invention. Figure 3 As shown, the system includes a data converter, an analysis engine, a decision engine, an HBase database, and an ElasticSearch database.

[0074] In this embodiment, based on the corresponding capabilities provided by ElasticSearch and HBase, further encapsulation is performed to establish an analysis engine and a decision engine. The spatial data is converted into spatial one-dimensional data GeoCode, and GeoCode is used as the RowKey of the HBase database. A spatial index and a time index are created in ElasticSearch and are associated with GeoCode. The analysis engine parses the query input, and makes routing decisions through the decision engine based on the different results of the analysis. Therefore, the system can support a variety of query scenarios for spatiotemporal data. For a single type, the HBase database can be directly queried to maximize query efficiency, and index filtering can be performed for other query types, so that it is more flexible, easy to expand, and more efficient when facing a variety of query scenarios.

[0075] A specific implementation, in this system, the data converter performs spatial data encoding conversion through a space filling curve. Take Z-Ordering as an example: by encoding and converting geographic coordinates based on the GeoHash algorithm, such as the longitude and latitude coordinates (40.222012, 116.248283), according to a certain precision, it can be converted into a wx4sv61q string, which is the GeoCode. The string is used as the RowKey in the HBase database, and a time index mapping is created in ElasticSearch based on the string. The time index mapping is mappings, the index field type is set to date, and the date format is set (such as: yyyy-MM-dd HH:mm:ss, the format can be multiple and spliced ​​by the || symbol), as follows:

[0076] PUT my_date_index

[0077] {

[0078] "mappings":{

[0079] "_doc":{

[0080] "properties":{

[0081] "my_date_field":{

[0082] "type":"date",

[0083] "format":"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"

[0084] }

[0085] }

[0086] }

[0087] }

[0088] }

[0089] Add index data based on time index mapping. Add the timestamp prefix to GeoCode, for example: 1652261954727_wx4sv61q, set it as a custom id and add it to the index data. The prefix here solves the problem of id conflict caused by different coordinates but the same GeoCode at a certain precision. The following is the added index data:

[0090] POST my_date_index / 1652261954727_wx4sv61q

[0091] {

[0092] "my_date_field":"2023-05-2712:23:35"

[0093] }

[0094] Similarly, set the spatial index in ElasticSearch, the spatial index mapping field type is geo_shape, and the spatial index mapping settings are as follows:

[0095] POST my_geo_index

[0096] {

[0097] "mappings":{

[0098] "properties":{

[0099] "my_geo_field":{

[0100] "type":"geo_shape"

[0101] }

[0102] }

[0103] }

[0104] }

[0105] The following is the added spatial index data:

[0106] POST my_geo_index / 1652261954727_wx4sv61q

[0107] {

[0108] "my_geo_field" {

[0109] "type":"point",

[0110] "coordinates":[40.222012,116.248283]

[0111] }

[0112] }

[0113] Through the above steps, the data storage and the creation of time index and space index are completed. Subsequent queries are based on the ElasticSearch data model stored above.

[0114] The analysis engine can query through an interface or a query statement with a specific syntax. Taking the interface as an example, if a query is initiated and the interface is called, the interface carries a conditional input parameter object, which can be conditionally constructed through the construction chain.

[0115] A specific implementation is to query all locations within a radius of 50 kilometers with the location (40.222012,116.248283) as the center and the associated time attribute information range from 2023-05-2612:23:35 to 2023-05-2812:23:35. The input parameter object is constructed as follows:

[0116] ConditionParam.circle(40.222012,116.248283,50).timeRange("2023-05-2612:23:35", "2023-05-2812:23:35").builder();

[0117] The input object is passed to the analysis engine through the interface. Based on the construction process of the input object, the corresponding query type is carried. It can be known that the type is a comprehensive query, that is, the query has both geographical query conditions and time query conditions. The decision engine then processes the query request.

[0118] The decision engine first queries based on geographic query conditions, and all points within a 50-kilometer range centered on (40.222012, 116.248283) can be quickly obtained through the spatial index pre-set in ElasticSearch to obtain the first GeoCode set; secondly, based on the time query condition, all locations with a time range of 2023-05-26 12:23:35 to 2023-05-28 12:23:35 are queried quickly through the time index set in ElasticSearch to obtain the second GeoCode set. By taking the intersection of the first set and the second set to obtain the final third set, and performing an HBase query based on the third set, all location information in the scenario can be quickly obtained, where the third set contains the RowKey value in the HBase database.

[0119] In a specific implementation, when the query condition is a single query, such as querying information about a certain location, the input parameter object is constructed as follows:

[0120] ConditionParam.point(40.222012,116.248283,50).builder();

[0121] The analysis engine converts the location information (40.222012, 116.248283) into GeoCode through the data converter according to the type of the input object, and obtains the GeoCode of wx4sv61q. The decision engine uses the corresponding route to directly query HBase with the GeoCode as a condition, completes the quick query and returns the corresponding result.

[0122] Different execution routes can be quickly configured by adding or removing query types, making the system flexible and easy to expand, meeting the retrieval needs in complex scenarios of spatiotemporal big data; the efficiency of obtaining data in different retrieval scenarios is maximized by selecting the optimal query solution through the analysis engine and decision engine and by establishing spatiotemporal indexes.

[0123] Embodiment 4:

[0124] The present invention also provides a device for retrieving spatiotemporal data, such as Figure 4 As shown, the device includes a processor 401, a memory 402, a bus 403, and a computer program stored in the memory 402 and executable on the processor 401. The processor 401 includes one or more processing cores. The memory 402 is connected to the processor 401 via the bus 403. The memory 402 is used to store program instructions. When the processor executes the computer program, the steps in the above method embodiment of the first embodiment of the present invention are implemented.

[0125] Further, as an executable solution, the device for retrieving spatiotemporal data may be a computer unit, which may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer unit may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that the composition structure of the above-mentioned computer unit is only an example of a computer unit and does not constitute a limitation on the computer unit, and may include more or less components than the above-mentioned, or a combination of certain components, or different components. For example, the computer unit may also include input and output devices, network access devices, buses, etc., which are not limited in the embodiments of the present invention.

[0126] Further, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, and various interfaces and lines are used to connect the various parts of the entire computer unit.

[0127] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer unit by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0128] Embodiment five:

[0129] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.

[0130] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A method for retrieving spatiotemporal data, characterized in that: include: S1, converting the multidimensional spatial data information in the pre-established spatiotemporal data object into a spatial one-dimensional code through spatial curve coding, and then storing the spatial one-dimensional code in a preset extended field of the spatiotemporal data object, wherein the spatiotemporal data object includes the multidimensional spatial data information, the time data information and the extended field; S2, storing the spatiotemporal data object in a database of a key-value storage model, wherein the spatial one-dimensional code is used as a key, and the multidimensional spatial data information, the time data information and the extended field are used as values; S3, creating a time index and a space index in ElasticSearch, wherein the time index includes: the time data information and the one-dimensional space code, and the space index includes: the multidimensional space data information and the one-dimensional space code, and the one-dimensional space code is used as a unique identifier of the time index and the space index; S4, parsing the data to be retrieved, obtaining the query type of the data to be retrieved, and making a routing decision through a pre-set route according to the obtained query type; S5, querying the database of the key-value storage model through the routing decision to obtain the retrieval result of the data to be retrieved.

2. The method for retrieving spatiotemporal data according to claim 1, characterized in that: The space curve encoding is to perform space data encoding based on the space filling curve Z-Ordering.

3. The method for retrieving spatiotemporal data according to claim 1, characterized in that: The database of the key-value storage model is an HBase database.

4. The method for retrieving spatiotemporal data according to claim 1, characterized in that: The using the one-dimensional spatial code as the unique identifier of the time index and the space index includes: taking the timestamp of the current time as a prefix to splice with the one-dimensional spatial code, and the spliced ​​data is the unique identifier of the time index and the space index.

5. The method for retrieving spatiotemporal data according to claim 1, characterized in that: The parsing of the data to be retrieved is to perform query type parsing on the data to be retrieved, wherein the query type includes: Query multidimensional spatial data information based on a location information; Query multi-dimensional spatial data information based on first-time information; Querying multidimensional spatial data information according to the first geographic information; and, The multi-dimensional spatial data information is queried according to the second time information and the second geographic information.

6. The method for retrieving spatiotemporal data according to claim 5, characterized in that: The method of making a routing decision based on the obtained query type through a preset route is: selecting a search path based on the query type obtained by parsing the query type, wherein the search path includes: The location information is converted into a spatial one-dimensional code according to the spatial curve code, and a database of a key-value storage model is queried through the spatial one-dimensional code to obtain multi-dimensional spatial data information; Retrieve the time index in the ElasticSearch database according to the first time information to obtain a spatial one-dimensional code set that conforms to the first time information, query the database of the key-value storage model through the obtained spatial one-dimensional code set of the first time information, and obtain a multidimensional spatial data information set of the first time information; Retrieve the spatial index in the ElasticSearch database according to the first geographic information to obtain a spatial one-dimensional code set that conforms to the first geographic information, query the database of the key-value storage model through the obtained spatial one-dimensional code set of the first geographic information, and obtain a multidimensional spatial data information set of the first geographic information; According to the second time information and the second geographic information, the time index and the spatial index in the ElasticSearch database are retrieved to obtain a spatial one-dimensional code set that conforms to the second time information and a spatial one-dimensional code set that conforms to the second geographic information. The intersection of the spatial one-dimensional code set of the second time information and the spatial one-dimensional code set of the second geographic information is taken to obtain a spatial one-dimensional code set that conforms to the second time information and the second geographic information. The database of the key-value storage model is queried through the obtained spatial one-dimensional code set of the second time information and the second geographic information to obtain a multidimensional spatial data information set of the second time information and the second geographic information.

7. The method for retrieving spatiotemporal data according to claim 6, characterized in that: The step of selecting a search path according to the query type obtained by parsing the query type also includes: A retrieval method for retrieving a time index in an ElasticSearch database according to the first time information or the second time information includes: a range filter, a date range aggregation query, and / or an exact time query; The retrieval method of retrieving the spatial index in the ElasticSearch database according to the first geographic information or the second geographic information includes: rectangular filtering, circular filtering, polygon query and / or geographic shape query, wherein the geographic shape query includes: intersection relationship, non-intersection relationship, within relationship and / or inclusion relationship.

8. A system for performing spatiotemporal data retrieval using the method for retrieving spatiotemporal data according to any one of claims 1 to 7, characterized in that: The system comprises: A data converter, used to convert the multi-dimensional spatial data information in the pre-established spatiotemporal data object into a spatial one-dimensional code through spatial curve coding, create a time index and a spatial index in the ElasticSearch database, and store the spatiotemporal data object in the HBase database; An analysis engine, used to parse the data to be retrieved and obtain the query type of the data to be retrieved; The decision engine is used to query the time index and space index information in the ElasticSearch database, obtain the spatial one-dimensional code, and query the HBase database according to the obtained spatial one-dimensional code to obtain the search result of the data to be searched; ElasticSearch database, used to store the time index and the space index; The HBase database is used to store the spatiotemporal data objects.

9. A device for retrieving spatiotemporal data, characterized in that: The method comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the steps of the method for retrieving spatiotemporal data as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for retrieving spatiotemporal data according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Spatial-contiguity-considered vector space data coding method

    CN106649425A

  • Space-time big data intelligent service system

    CN110990726A

  • Data storage and query method and device, electronic equipment and storage medium

    CN113051264A

Cited By

  • Track data-oriented storage and index construction method

    CN119938802A

  • Distributed big data storage system and method

    CN120256494A

  • A distributed big data storage system and method

    CN120256494B

  • Spatial-temporal index fused retrieval enhancement method, medium and equipment

    CN121117128A

  • Method and device for automatically generating firewall access control strategy

    CN121441593A