Data query method, device, equipment and machine-readable storage medium

By adopting a two-level index structure of global index and local index in the database, efficient query of massive spatiotemporal data is realized, the problem of high resource consumption is solved, and query performance and efficiency are improved.

CN112579714BActive Publication Date: 2024-10-01ALIBABA GROUP HOLDING LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN201910939921.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-30
Publication Date
2024-10-01
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

When storing massive spatiotemporal data in the database, how to achieve efficient query and save computing resources and storage resources.

Method used

It adopts a two-level index structure of global index and local index to quickly locate feature data through metadata information and spatiotemporal coding information, reducing disk IO operations during query.

Benefits of technology

It improves query performance and efficiency, saves computing resources and storage resources, avoids characteristic data transmission between computing nodes and storage nodes, and reduces disk IO operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112579714B_ABST
    Figure CN112579714B_ABST
Patent Text Reader

Abstract

The present application provides a data query method, device, equipment and machine-readable storage medium, the method comprising: obtaining spatiotemporal query information; if the computing node has established a first global index and a first local index, obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; querying the storage partition corresponding to the metadata information according to the first global index, and querying the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; obtaining feature data corresponding to the spatiotemporal query information from the storage space. Through the technical solution of the present application, feature data can be quickly queried through two-level indexes, with high query performance and high query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a data query method, device, equipment and machine-readable storage medium. Background Art

[0002] With the rapid development of Internet technology, more and more spatiotemporal data need to be stored. Spatiotemporal data refers to data related to time and location. For example, smart wearable devices can collect user location data in real time, and upload the time data and location data to the server. The server stores the time data and location data in the database, and the user queries the time data and location data from the server to obtain the user's real-time location. For another example, the terminal device can monitor the vehicle's location data in real time, and upload the time data and location data to the server. The server stores the time data and location data in the database, and the user queries the time data and location data from the server to obtain the vehicle's real-time location.

[0003] At present, it is necessary to store massive spatiotemporal data in the database. How to realize the query of large amounts of spatiotemporal data and save computing resources and storage resources is a problem that needs to be solved. Summary of the invention

[0004] The present application provides a data query method, which is applied to a computing node, and the method comprises:

[0005] Get spatiotemporal query information;

[0006] If the computing node has established a first global index and a first local index, then obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0007] Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition;

[0008] Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0009] The present application provides a data query method, which is applied to a storage node, and the method includes:

[0010] Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0011] Querying the segment file corresponding to the metadata information according to the second global index, and querying the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file;

[0012] Acquire feature data corresponding to the spatiotemporal query information from the index file;

[0013] The feature data corresponding to the spatiotemporal query information is sent to the computing node.

[0014] The present application provides a data query device, which is applied to a computing node, and the device includes:

[0015] An acquisition module is used to acquire spatiotemporal query information; if the computing node has established a first global index and a first local index, metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information are acquired; a query module is used to query a storage partition corresponding to the metadata information according to the first global index, and query a storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; the acquisition module is also used to acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0016] The present application provides a computing node, the computing node comprising:

[0017] A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing:

[0018] Get spatiotemporal query information;

[0019] If the computing node has established a first global index and a first local index, then obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0020] Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition;

[0021] Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0022] The present application provides a machine-readable storage medium, wherein a plurality of computer instructions are stored on the machine-readable storage medium; when the computer instructions are executed, the following processing is performed:

[0023] Get spatiotemporal query information;

[0024] If the computing node has established a first global index and a first local index, then obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0025] Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition;

[0026] Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0027] The present application provides a data query device, which is applied to a storage node, and the device includes:

[0028] An acquisition module is used to receive spatiotemporal query information sent by a computing node, and to acquire metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; a query module is used to query the segmented file corresponding to the metadata information according to a second global index, and to query the index file corresponding to the spatiotemporal coding information according to a second local index of the segmented file; the acquisition module is also used to acquire feature data corresponding to the spatiotemporal query information from the index file; a sending module is used to send the feature data corresponding to the spatiotemporal query information to a computing node.

[0029] The present application provides a storage node, the storage node comprising:

[0030] A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing:

[0031] Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0032] Querying the segment file corresponding to the metadata information according to the second global index, and querying the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file;

[0033] Acquire feature data corresponding to the spatiotemporal query information from the index file;

[0034] The feature data corresponding to the spatiotemporal query information is sent to the computing node.

[0035] The present application provides a machine-readable storage medium, wherein a plurality of computer instructions are stored on the machine-readable storage medium; when the computer instructions are executed, the following processing is performed:

[0036] Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0037] Querying the segment file corresponding to the metadata information according to the second global index, and querying the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file;

[0038] Acquire feature data corresponding to the spatiotemporal query information from the index file;

[0039] The feature data corresponding to the spatiotemporal query information is sent to the computing node.

[0040] Based on the above technical solution, in an embodiment of the present application, query of feature data is implemented based on global index and local index, which can realize query of a large amount of feature data and save computing resources and storage resources. If query of feature data is implemented at a computing node, since the computing node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high. Moreover, there is no need to transmit feature data between computing nodes and storage nodes, which saves disk IO operations between computing nodes and storage nodes. If query of feature data is implemented at a storage node, since the storage node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0042] Figure 1 is a schematic diagram of a minimum enclosing rectangle in one embodiment of the present application;

[0043] Figure 2A is a schematic diagram of the S2 space-time coding technology in one implementation of the present application;

[0044] Figure 2B is a schematic diagram of the S3 space-time coding technology in one implementation of the present application;

[0045] Figure 3 It is a flowchart of a data query method in one embodiment of the present application;

[0046] Figure 4 is a flow chart of a data query method in another embodiment of the present application;

[0047] Figure 5A and Figure 5Bis a flow chart of a data query method in another embodiment of the present application;

[0048] Fig. 6A It is a structural schematic diagram of a data query device in one embodiment of the present application;

[0049] Figure 6B is a structural schematic diagram of a data query device in another embodiment of the present application;

[0050] Figure 6C It is a schematic diagram of the structure of a computing node / storage node in one implementation of the present application. DETAILED DESCRIPTION

[0051] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0052] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".

[0053] In the embodiment of the present application, a data query method is proposed, which can be applied to a distributed system including a computing node and a storage node. In a distributed system, a computing node can be a computing layer node, and a distributed system can include one or more computing nodes. These computing nodes are used to implement data query functions, and can be deployed on the same host (such as implementing these computing nodes through multiple virtual machines of the host), or on multiple hosts, without limitation, and this article takes a computing node as an example for illustration.

[0054] In a distributed system, a storage node can be a storage layer node. A distributed system can include one or more storage nodes, which are used to implement data storage functions. These storage nodes can be deployed on the same host (such as implementing the functions of these storage nodes through multiple virtual machines of the host), or on multiple hosts. There is no restriction on this. This article takes one storage node as an example for explanation.

[0055] Before introducing the technical solution of the present application, the concepts involved in the present application are first explained.

[0056] Feature data: data with spatiotemporal attributes, including time data, location data, and application data. For example, feature data 1 includes time 1, location 1, and application data 1, which means application data 1 collected at location 1 at time 1. Feature data 1 includes time 2, location 1, and application data 2, which means application data 2 collected at location 1 at time 2, and so on.

[0057] For example, feature data may be user location data with spatiotemporal attributes collected by a smart wearable device (such as a phone watch), through which the user's real-time location can be known. For another example, feature data may be vehicle location data with spatiotemporal attributes collected by a terminal device (such as a monitoring app), through which the vehicle's real-time location can be known. For another example, feature data may be data with spatiotemporal attributes collected by a lidar of an autonomous driving vehicle, and data mining technology may be used to provide planning and decision-making services for autonomous driving. For another example, feature data may be data with spatiotemporal attributes collected by an intelligent connected vehicle, and data analysis technology may be used to effectively perform remote diagnosis and driving safety assistance services on the vehicle. Of course, the above are just a few examples of feature data, and there is no restriction on the type of feature data.

[0058] Sharded file and index file (Region File): A storage node may include multiple shard files, and store feature data through these shard files. The size of each shard file can be set. Each shard file can be divided into multiple sub-files, which are called index files. The size of each index file can be set. The storage node stores feature data through the index files of shard files. In summary, shard files and index files both refer to files on the storage node used to store feature data. For example, feature data 1 is stored in index file 11 of shard file 1, feature data 2 is stored in index file 12 of shard file 1, feature data 3 is stored in index file 21 of shard file 2, and so on.

[0059] Storage partitions and storage spaces (i.e., storage locations): Computing nodes can include multiple storage partitions, and store feature data through these storage partitions. Each storage partition includes multiple storage spaces, which are areas that are actually used to store feature data. For example, these storage spaces can be memory pages of computing nodes. Computing nodes store feature data through the storage spaces of storage partitions. In summary, storage partitions and storage spaces both refer to areas on computing nodes that are used to store feature data. For example, feature data 1 is stored in storage space 11 of storage partition 1, feature data 2 is stored in storage space 12 of storage partition 1, feature data 3 is stored in storage space 21 of storage partition 2, and so on.

[0060] Global Index and Local Index: For the sake of distinction, the global index established by the computing node is called the first global index, and there can be one first global index. The local index established by the computing node is called the first local index, and there can be multiple first local indexes, such as one first local index corresponding to each storage partition, such as storage partition 1 corresponds to first local index 1, storage partition 2 corresponds to first local index 2, and so on. The global index established by the storage node is called the second global index, and there can be one second global index. The local index established by the storage node is called the second local index, and there can be multiple second local indexes, such as one second local index corresponding to each shard file, such as shard file 1 corresponds to second local index 1, shard file 2 corresponds to second local index 2, and so on.

[0061] Exemplarily, the method of establishing the first global index, the first local index, the second global index, and the second local index will be introduced in subsequent embodiments and will not be described in detail here.

[0062] Two-tier structure with separation of storage and computing: The storage layer and computing layer of the distributed system are separated, that is, the networking architecture of computing nodes and storage nodes is adopted. Storage nodes use storage engines such as HBase and Accumulo to implement the storage function of feature data, and there is no restriction on this storage engine. Computing nodes use the Spark computing engine to implement the query function of feature data, and there is no restriction on this computing engine.

[0063] Exemplarily, the storage node is used to implement the storage of feature data. When storing feature data, the storage node may use a spatiotemporal database (such as a TSDB database, etc.) to store the feature data.

[0064] Exemplarily, the computing node is used to receive externally input spatiotemporal query information, obtain feature data corresponding to the spatiotemporal query information, and output the feature data corresponding to the spatiotemporal query information.

[0065] In summary, in this embodiment, storage nodes and computing nodes may be involved, and a two-level spatiotemporal index (Two-level Index) is adopted, where the two-level spatiotemporal indexes are a global index and a local index.

[0066] The data query method of the embodiment of the present application is described below in conjunction with specific embodiments.

[0067] Embodiment 1: A storage node stores feature data. When storing feature data, it is necessary to obtain metadata information of the feature data, and store the feature data in an index file of a shard file according to the metadata information of the feature data; wherein feature data with the same metadata information is stored in the same shard file.

[0068] Exemplarily, the metadata information may be: minimum enclosing rectangle; or minimum enclosing rectangle and time interval; or minimum enclosing rectangle and slice file environment; or minimum enclosing rectangle, time interval and slice file environment. Of course, the above are just a few examples of metadata information and are not limited thereto.

[0069] Among them, the minimum bounding rectangle is MBR (Minimum Bounding Rectangle), which can also be called the minimum circumscribed rectangle. Before storing feature data, the storage node needs to obtain multiple minimum bounding rectangles. The minimum bounding rectangle can include a location area composed of multiple longitude and latitude positions. In other words, the location area composed of all longitude and latitude positions can be divided into multiple minimum bounding rectangles, and each minimum bounding rectangle includes a location area composed of multiple longitude and latitude positions. For example, see Figure 1 As shown, it is an example of a minimum enclosing rectangle. The location area composed of all longitude and latitude positions can be divided into four minimum enclosing rectangles. The four minimum enclosing rectangles are respectively recorded as MBR1, MBR2, MBR3 and MBR4.

[0070] In a possible implementation, multiple minimum bounding rectangles may be obtained in the following manner:

[0071] Method 1: According to the latitude and longitude positions of the historical data, all the latitude and longitude positions are divided into multiple minimum outer bounding rectangles, so that the difference in the number of historical data in each minimum outer bounding rectangle is less than a threshold.

[0072] For example, historical data is counted according to geographic blocks with appropriate digits, and geographic blocks are merged to achieve the purpose of uniform data distribution. The merged geographic blocks are the minimum enclosing rectangles, thereby generating multiple minimum enclosing rectangles.

[0073] See also Figure 1As shown, each black dot represents a piece of historical data, and the longitude and latitude positions of these historical data can be known (multiple longitude and latitude positions constitute a geographic block). Then, all longitude and latitude positions are divided into multiple minimum outer bounding rectangles, and the difference in the number of historical data in each minimum outer bounding rectangle is relatively small. For example, the number of historical data in MBR1, the number of historical data in MBR2, the number of historical data in MBR3, and the number of historical data in MBR4, the difference between any two historical data is relatively small.

[0074] Based on the above processing, the number of feature data distributed in the shard files corresponding to each minimum enclosing rectangle can be uniform, avoiding too much feature data in a certain shard file, or too little feature data in a certain shard file, thereby improving query performance and query efficiency.

[0075] Method 2: Divide all longitude and latitude positions into multiple minimum enclosing rectangles according to preconfigured division conditions (ie, conditions for dividing minimum enclosing rectangles configured based on experience).

[0076] Specifically, the division conditions of the minimum enclosing rectangle can be pre-configured, such as dividing the geographical range according to 4-bit geographical blocks or 0.5 degrees, etc. There is no restriction on the division conditions, and they can be arbitrarily configured according to experience. Then, based on the pre-configured division conditions, all latitude and longitude positions can be divided into multiple minimum enclosing rectangles.

[0077] Of course, the above-mentioned method 1 and method 2 are just two examples, and the storage node can also use other methods to divide all longitude and latitude positions into multiple minimum bounding rectangles, and there is no limitation on this division method.

[0078] The storage node can create multiple shard files according to the metadata information. For example, when the metadata information is the minimum bounding rectangle, a shard file 1 corresponding to MBR1, a shard file 2 corresponding to MBR2, a shard file 3 corresponding to MBR3, and a shard file 4 corresponding to MBR4 are created.

[0079] For another example, when the metadata information is the minimum enclosing rectangle and time interval, a fragment file 1 corresponding to MBR1 and time interval 1 (i.e., a time range, such as a 24-hour time interval, etc.) is created, a fragment file 2 corresponding to MBR1 and time interval 2, a fragment file 3 corresponding to MBR1 and time interval 3, a fragment file 4 corresponding to MBR2 and time interval 1, and so on.

[0080] When the metadata information is other cases, the implementation is similar to the above method, that is, a segment file can be created for each type of metadata information, which will not be repeated here. For the convenience of description, in the subsequent embodiments, the metadata information is the minimum outer bounding rectangle and the time interval as an example for explanation.

[0081] When a storage node needs to store feature data (such as feature data A), it first obtains the metadata information of feature data A. The minimum enclosing rectangle of feature data A is the minimum enclosing rectangle where the longitude and latitude of feature data A are located. Specifically, position A1 (i.e., a certain longitude and latitude position) and time A2 are parsed from feature data A. The minimum enclosing rectangle to which position A1 belongs is determined. For example, when position A1 is located at MBR1, the minimum enclosing rectangle of feature data A is determined to be MBR1. The time interval to which time A2 belongs is obtained. For example, when time A2 is located at time interval 2, the time interval of feature data A is determined to be time interval 2. In summary, the metadata information of feature data A is MBR1 and time interval 2.

[0082] Then, the slice file corresponding to the metadata information of the feature data A is determined, and the feature data A is stored in the index file of the slice file. For example, the slice file corresponding to MBR1 and time interval 2 is slice file 2, so the feature data A is stored in the index file of slice file 2 (that is, any index file, without limitation), and the storage process of the feature data A is not limited.

[0083] Obviously, since the metadata information corresponds to the segment file, the feature data with the same metadata information is stored in the same segment file. For example, the metadata information of feature data A1-feature data A100 is MBR1 and time interval 2, so feature data A1-feature data A100 are all stored in segment file 2.

[0084] Embodiment 2: A storage node establishes a second global index and a second local index.

[0085] In one example, the storage node may establish a second global index, which includes a mapping relationship between metadata information of the feature data and the shard file where the feature data is located. For example, the second global index may be shown in Table 1. Since the metadata information corresponds to the shard file, the mapping relationship between the metadata information and the shard file may be recorded in the second global index. In addition, the feature data corresponding to the metadata information is stored in the index file of the shard file corresponding to the metadata information.

[0086] Table 1

[0087]

[0088]

[0089] In summary, the storage node can construct a second global index according to the metadata information of the shard file, so that the specific shard file can be located according to the spatiotemporal query conditions, thereby reducing the query workload.

[0090] Exemplarily, when the metadata information includes a time interval, since the time interval is continuously updated, the second global index needs to be continuously updated. For example, as time goes on, assuming that a new time interval 4 is added, if time interval 4 is merged into the existing time interval, such as merging time interval 3 and time interval 4, the updated second global index is shown in Table 2, and the feature data corresponding to MBR1 and time interval 4 are stored in the index file of segment file 3. If time interval 4 is used as an independent time interval, the updated second global index is shown in Table 3, and segment file 13 is created for time interval 4, and the feature data corresponding to MBR1 and time interval 4 are stored in the index file of segment file 13.

[0091] Table 2

[0092] Metadata Information Shard Files MBR1 and Time Interval 1 Shard file 1 MBR1 and time interval 2 Shard file 2 MBR1 and time interval 3 and time interval 4 Shard file 3 MBR2 and Time Interval 1 Shard file 4 … …

[0093] Table 3

[0094] Metadata Information Shard Files MBR1 and Time Interval 1 Shard file 1 MBR1 and time interval 2 Shard file 2 MBR1 and time interval 3 Shard file 3 MBR2 and Time Interval 1 Shard file 4 … … MBR1 and time interval 4 Shard file 13 … …

[0095] In one example, the storage node may establish a second local index, that is, establish a second local index for each shard file, and the second local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located. For example, a second local index 1 is established for shard file 1, and the second local index 1 includes a mapping relationship between the spatiotemporal coding information of the feature data in shard file 1 and the index file where the feature data is located. A second local index 2 is established for shard file 2, and the second local index 2 includes a mapping relationship between the spatiotemporal coding information of the feature data in shard file 2 and the index file where the feature data is located, and so on. The second local index 1 of shard file 1 is used as an example for explanation below.

[0096] Exemplarily, establishing a second local index for a segmented file may include, but is not limited to: obtaining spatiotemporal index information of feature data, and performing a preset type encoding on the spatiotemporal index information to obtain spatiotemporal coding information of the feature data. Then, a second local index may be established for the segmented file based on the spatiotemporal coding information of the feature data and the index file of the segmented file where the feature data is located.

[0097] Exemplarily, the preset type encoding is encoding longitude and latitude; or, the preset type encoding is encoding longitude, latitude and time. For example, the spatiotemporal index information of the feature data can be the longitude and latitude position of the feature data (such as longitude and latitude, etc.), and then, the spatiotemporal index information can be encoded by a preset type, such as encoding the longitude and latitude, to obtain the spatiotemporal encoding information of the feature data. For another example, the spatiotemporal index information of the feature data can be the longitude and latitude position of the feature data (such as longitude and latitude, etc.) and the time of the feature data, and then, the spatiotemporal index information can be encoded by a preset type, such as encoding the longitude, latitude and time, to obtain the spatiotemporal encoding information of the feature data.

[0098] Exemplarily, the preset type code is used to reduce a multi-dimensional index to a one-dimensional index, thereby improving query performance. For example, the index of two dimensions (longitude and latitude) is reduced to a one-dimensional index. For another example, the index of three dimensions (longitude, latitude and time) is reduced to a one-dimensional index. Among them, the one-dimensional index is the above-mentioned spatiotemporal coding information, and the spatiotemporal coding information can be a spatiotemporal coding value, such as 1, 2, 3, 4, etc.

[0099] In a possible implementation, the S2 space-time coding technology can be used to reduce the index of two dimensions (longitude and latitude) to a one-dimensional index. The S2 space-time coding technology is a coding technology that uses the Hilbert curve to fill the longitude and latitude. Figure 2A As shown in the figure, it is a schematic diagram of S2 space-time coding technology, which can divide all areas into Figure 2A For the 16 regions shown, if the spatiotemporal index information (longitude and latitude) of the feature data is located in region 1, the S2 spatiotemporal coding technology is used to encode the longitude and latitude, and the spatiotemporal coding value (i.e., spatiotemporal coding information) is 0000. If the spatiotemporal index information (longitude and latitude) of the feature data is located in region 2, the S2 spatiotemporal coding technology is used to encode the longitude and latitude, and the spatiotemporal coding value is 0001. Similarly, if the spatiotemporal index information (longitude and latitude) of the feature data is located in region 15, the S2 spatiotemporal coding technology is used to encode the longitude and latitude, and the spatiotemporal coding value is 1110. If the spatiotemporal index information (longitude and latitude) of the feature data is located in region 16, the S2 spatiotemporal coding technology is used to encode the longitude and latitude, and the spatiotemporal coding value is 1111. Of course, the above is just an example of using the S2 spatiotemporal coding technology to reduce the index of two dimensions (longitude and latitude) to a one-dimensional index, and there is no limitation to this.

[0100] In a possible implementation, the S3 spatiotemporal coding technology can be used to reduce the index of three dimensions (longitude, latitude and time) to a one-dimensional index. The S3 spatiotemporal coding technology is a coding technology that uses the Hilbert curve to fill in the longitude, latitude and time. Figure 2BAs shown in the figure, it is a schematic diagram of S3 spatiotemporal coding technology, which can divide all regions into Figure 2B Each region corresponds to a spatiotemporal coding value (i.e., spatiotemporal coding information) for the regions shown. When the spatiotemporal index information (longitude, latitude, and time) of the feature data is located in a certain region, the longitude, latitude, and time are encoded using the S3 spatiotemporal coding technology, and the obtained spatiotemporal coding value is the spatiotemporal coding value corresponding to the region. Of course, the above is just an example of using the S3 spatiotemporal coding technology to reduce the index of three dimensions (longitude, latitude, and time) to a one-dimensional index, and there is no limitation on this.

[0101] Of course, the above-mentioned S2 spatiotemporal coding technology and S3 spatiotemporal coding technology are only examples, and there is no limitation on this, as long as the index of two dimensions (longitude and latitude) or the index of three dimensions (longitude, latitude and time) can be reduced to a one-dimensional index. For example, Rtree, QuardTree, KDtree and other coding methods can also be used to encode the spatiotemporal index information to obtain spatiotemporal coding information (i.e., spatiotemporal coding value).

[0102] See Table 4, which is an example of the second local index 1 of the shard file 1. The second local index 1 includes the mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located. For example, assuming that the spatiotemporal coding information of the feature data A1 is 0001, and the feature data A1 is stored in the index file 11 of the shard file 1, then the second local index 1 includes the mapping relationship between the spatiotemporal coding information 0001 and the index file 11. For another example, assuming that the spatiotemporal coding information of the feature data A2 is 0101, and the feature data A2 is stored in the index file 15 of the shard file 1, then the second local index 1 includes the mapping relationship between the spatiotemporal coding information 0101 and the index file 15, and so on, and finally the second local index 1 shown in Table 4 is maintained.

[0103] Table 4

[0104]

[0105]

[0106] In summary, the storage node can construct a second local index for each shard file, so that the specific index file in the shard file can be located according to the spatiotemporal query conditions, thereby reducing the query workload.

[0107] Exemplarily, since the feature data is continuously written, each time new feature data is written to the index file of the shard file, the second local index of the shard file needs to be updated, which will not be described in detail here.

[0108] Embodiment 3: The computing node stores characteristic data.

[0109] The computing node may store all feature data of the storage node in the storage space of the computing node's storage partition. For example, the computing node obtains all feature data from the storage node and stores the feature data in the storage space of the computing node's storage partition. In the subsequent process, the computing node periodically obtains incremental feature data from the storage node and stores the incremental feature data in the storage space of the computing node's storage partition. Alternatively, each time the feature data changes, the storage node synchronizes the changed feature data to the computing node, and the computing node stores the changed feature data in the storage space of the computing node's storage partition.

[0110] When storing feature data, the computing node can obtain metadata information of the feature data and store the feature data in the storage space of the storage partition of the computing node according to the metadata information of the feature data; wherein feature data with the same metadata information is stored in the same storage partition.

[0111] Exemplarily, the metadata information may be: minimum enclosing rectangle; or minimum enclosing rectangle and time interval; or minimum enclosing rectangle and slice file environment; or minimum enclosing rectangle, time interval and slice file environment. Of course, the above are just a few examples of metadata information and are not limited thereto.

[0112] Before storing the feature data, the computing node may also obtain multiple minimum enclosing rectangles, which may include location areas composed of multiple longitude and latitude positions. In other words, the location areas composed of all longitude and latitude positions may be divided into multiple minimum enclosing rectangles, each of which includes location areas composed of multiple longitude and latitude positions. For example, see Figure 1 As shown, it is an example of a minimum enclosing rectangle. The location area composed of all longitude and latitude positions can be divided into four minimum enclosing rectangles. The four minimum enclosing rectangles are respectively recorded as MBR1, MBR2, MBR3 and MBR4.

[0113] In a possible implementation, multiple minimum bounding rectangles may be obtained in the following manner:

[0114] Method 1: The computing node obtains the minimum enclosing rectangle partitioning strategy of the storage node, and divides all longitude and latitude positions into multiple minimum enclosing rectangles according to the minimum enclosing rectangle partitioning strategy of the storage node.

[0115] Specifically, referring to the above embodiment, it has been introduced that the storage node divides all longitude and latitude positions into a plurality of minimum enclosing rectangles. For example, all longitude and latitude positions are divided into Figure 1 As shown in the figure, the minimum enclosing rectangle division strategy of the storage node is the division strategy of these four minimum enclosing rectangles.

[0116] After the computing node obtains the division strategy of the four smallest enclosing rectangles, it can use the same division method to divide all longitude and latitude positions into Figure 1 The four minimum enclosing rectangles shown, that is, the minimum enclosing rectangle obtained by the computing node is the same as the minimum enclosing rectangle obtained by the storage node.

[0117] Obviously, since the minimum enclosing rectangle of the computing node is the same as the minimum enclosing rectangle of the storage node, the storage partition of the computing node corresponds to the shard file of the storage node, that is, the storage node has several shard files and the computing node also has several storage partitions. Moreover, the formulation strategy of the first global index of the computing node is the same as the formulation strategy of the second global index of the storage node. In summary, when creating the first global index, the repartitioning process can be reduced, and the repartitioning process will trigger the shuffle of feature data. Therefore, reducing repartitioning can reduce the shuffle operation, thereby improving storage performance.

[0118] Method 2: The computing node divides all longitude and latitude positions into multiple minimum bounding rectangles according to the longitude and latitude positions of the historical data, so that the difference in the number of historical data in each minimum bounding rectangle is less than a threshold.

[0119] For example, historical data is counted according to geographic blocks with appropriate digits, and geographic blocks are merged to achieve the purpose of uniform data distribution. The merged geographic blocks are the minimum enclosing rectangles, thereby generating multiple minimum enclosing rectangles.

[0120] See also Figure 1 As shown, each black dot represents a piece of historical data, and the longitude and latitude positions of these historical data can be known (multiple longitude and latitude positions constitute a geographic block). Then, all longitude and latitude positions are divided into multiple minimum outer bounding rectangles, and the difference in the number of historical data in each minimum outer bounding rectangle is relatively small. For example, the number of historical data in MBR1, the number of historical data in MBR2, the number of historical data in MBR3, and the number of historical data in MBR4, the difference between any two historical data is relatively small.

[0121] Based on the above processing, the number of feature data distributed in the storage partition corresponding to each minimum enclosing rectangle can be uniform, avoiding too much feature data in a certain storage partition, or too little feature data in a certain storage partition, thereby improving query performance and query efficiency.

[0122] Method 3: Divide all longitude and latitude positions into multiple minimum enclosing rectangles according to preconfigured division conditions (ie, conditions for dividing minimum enclosing rectangles configured based on experience).

[0123] Specifically, the division conditions of the minimum enclosing rectangle can be pre-configured, such as dividing the geographical range according to 4-bit geographical blocks or 0.5 degrees, etc. There is no restriction on the division conditions, and they can be arbitrarily configured according to experience. Then, based on the pre-configured division conditions, all latitude and longitude positions can be divided into multiple minimum enclosing rectangles.

[0124] Of course, the above-mentioned methods 1, 2 and 3 are only examples, and the computing node may also use other methods to divide all longitude and latitude positions into multiple minimum bounding rectangles, and there is no limitation on this division method.

[0125] The computing node can create multiple storage partitions according to the metadata information. For example, when the metadata information is the minimum enclosing rectangle, storage partition 1 corresponding to MBR1, storage partition 2 corresponding to MBR2, storage partition 3 corresponding to MBR3, and storage partition 4 corresponding to MBR4 are created.

[0126] For another example, when the metadata information is the minimum enclosing rectangle and time interval, a storage partition 1 corresponding to MBR1 and time interval 1 (i.e., a time range, such as a 24-hour time interval, etc.) is created, a storage partition 2 corresponding to MBR1 and time interval 2, a storage partition 3 corresponding to MBR1 and time interval 3, a storage partition 4 corresponding to MBR2 and time interval 1, and so on.

[0127] When the metadata information is other cases, the implementation is similar to the above method, that is, a storage partition can be created for each type of metadata information, which will not be repeated here. For the convenience of description, in the subsequent embodiments, the metadata information is the minimum outer bounding rectangle and the time interval as an example for explanation.

[0128] When a computing node needs to store feature data (such as feature data A), it first obtains the metadata information of feature data A. The minimum enclosing rectangle of feature data A is the minimum enclosing rectangle where the longitude and latitude of feature data A are located. Specifically, position A1 (i.e., a certain longitude and latitude position) and time A2 are parsed from feature data A. The minimum enclosing rectangle to which position A1 belongs is determined. For example, when position A1 is located at MBR1, the minimum enclosing rectangle of feature data A is determined to be MBR1. The time interval to which time A2 belongs is obtained. For example, when time A2 is located at time interval 2, the time interval of feature data A is determined to be time interval 2. In summary, the metadata information of feature data A is MBR1 and time interval 2.

[0129] Then, the storage partition corresponding to the metadata information of the feature data A is determined, and the feature data A is stored in the storage space of this storage partition. For example, the storage partition corresponding to MBR1 and time interval 2 is storage partition 2, so the feature data A is stored in the storage space of storage partition 2 (i.e., any storage space, without restriction), and the storage process of the feature data A is not restricted.

[0130] Obviously, since the metadata information corresponds to the storage partition, the feature data with the same metadata information is stored in the same storage partition. For example, the metadata information of feature data A1-feature data A100 is MBR1 and time interval 2, so feature data A1-feature data A100 are all stored in storage partition 2.

[0131] Embodiment 4: A computing node establishes a first global index and a first local index.

[0132] In one example, the computing node may establish a first global index, which includes a mapping relationship between metadata information of feature data and a storage partition where the feature data is located. For example, the first global index may be shown in Table 5. Since the metadata information corresponds to the storage partition, the mapping relationship between the metadata information and the storage partition may be recorded in the first global index. In addition, the feature data corresponding to the metadata information is stored in the storage space of the storage partition corresponding to the metadata information.

[0133] Table 5

[0134] Metadata Information Storage Partitions MBR1 and Time Interval 1 Storage Partition 1 MBR1 and time interval 2 Storage Partition 2 MBR1 and time interval 3 Storage Partition 3 MBR2 and Time Interval 1 Storage Partition 4 … …

[0135] In summary, the computing node can construct the first global index according to the metadata information of the storage partition, so that the specific storage partition can be located according to the spatiotemporal query conditions, thereby reducing the query workload.

[0136] In one example, the computing node may establish a first local index, that is, establish a first local index for each storage partition, and the first local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located. For example, a first local index 1 is established for storage partition 1, and the first local index 1 includes a mapping relationship between the spatiotemporal coding information of the feature data in storage partition 1 and the storage space where the feature data is located. A first local index 2 is established for storage partition 2, and the first local index 2 includes a mapping relationship between the spatiotemporal coding information of the feature data in storage partition 2 and the storage space where the feature data is located, and so on. The first local index 1 of storage partition 1 is used as an example for explanation below.

[0137] Exemplarily, establishing a first local index for a storage partition may include, but is not limited to: obtaining spatiotemporal index information of feature data, and performing a preset type encoding on the spatiotemporal index information to obtain spatiotemporal coding information of the feature data. Then, a first local index may be established for the storage partition based on the spatiotemporal coding information of the feature data and the storage space of the storage partition where the feature data is located.

[0138] Exemplarily, the preset type encoding is encoding longitude and latitude; or, the preset type encoding is encoding longitude, latitude and time. For example, the spatiotemporal index information of the feature data can be the longitude and latitude position of the feature data (such as longitude and latitude, etc.), and then, the spatiotemporal index information can be encoded by a preset type, such as encoding the longitude and latitude, to obtain the spatiotemporal encoding information of the feature data. For another example, the spatiotemporal index information of the feature data can be the longitude and latitude position of the feature data (such as longitude and latitude, etc.) and the time of the feature data, and then, the spatiotemporal index information can be encoded by a preset type, such as encoding the longitude, latitude and time, to obtain the spatiotemporal encoding information of the feature data.

[0139] Exemplarily, the preset type code is used to reduce a multi-dimensional index to a one-dimensional index, thereby improving query performance. For example, the index of two dimensions (longitude and latitude) is reduced to a one-dimensional index. For another example, the index of three dimensions (longitude, latitude and time) is reduced to a one-dimensional index. Among them, the one-dimensional index is the above-mentioned spatiotemporal coding information, and the spatiotemporal coding information can be a spatiotemporal coding value, such as 1, 2, 3, 4, etc.

[0140] In a possible implementation, the S2 space-time coding technology can be used to reduce the index of two dimensions (longitude and latitude) to a one-dimensional index. The S2 space-time coding technology is a coding technology that uses the Hilbert curve to fill the longitude and latitude. The S3 space-time coding technology can be used to reduce the index of three dimensions (longitude, latitude and time) to a one-dimensional index. The S3 space-time coding technology is a coding technology that uses the Hilbert curve to fill the longitude, latitude and time. Of course, the S2 space-time coding technology and the S3 space-time coding technology are just an example, and there is no limitation to this, as long as the index of two dimensions (longitude and latitude) or the index of three dimensions (longitude, latitude and time) can be reduced to a one-dimensional index. For example, Rtree, QuardTree, KDtree and other coding methods can also be used to encode the space-time index information to obtain space-time coding information.

[0141] See Table 6, which is an example of the first local index 1 of storage partition 1. The first local index 1 includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located. For example, assuming that the spatiotemporal coding information of the feature data A1 is 0001, and the feature data A1 is stored in the storage space 11 of the storage partition 1, then the first local index 1 includes a mapping relationship between the spatiotemporal coding information 0001 and the storage space 11. For another example, assuming that the spatiotemporal coding information of the feature data A2 is 0101, and the feature data A2 is stored in the storage space 15 of the storage partition 1, then the first local index 1 includes a mapping relationship between the spatiotemporal coding information 0101 and the storage space 15, and so on, and finally the first local index 1 shown in Table 6 is maintained.

[0142] Table 6

[0143] Space-time coded information Storage Space 0001 Storage Space 11 0101 Storage space 15 0101 Storage space 13 1110 Storage Space 11 … …

[0144] In summary, the computing node can construct a first local index for each storage partition, so that the specific storage space in the storage partition can be located according to the spatiotemporal query conditions, thereby reducing the query workload.

[0145] Example 5: Data query process of computing nodes, see Figure 3 FIG. 1 is a flow chart of a data query method in an embodiment of the present application, which can be applied to a computing node. The method may include:

[0146] Step 301, obtaining spatiotemporal query information (ie, spatiotemporal query conditions).

[0147] Exemplarily, the computing node may receive spatiotemporal query information input by a user, where the spatiotemporal query information includes a time range and spatial information (such as a longitude and latitude position, which may be multiple longitude and latitude positions).

[0148] Exemplarily, taking SQL (Structured Query Language) statements as an example, the computing node can receive SQL statements input by users. The spatial information included in the SQL statements can be spatial operators, such as the spatial inclusion operator st_contains and the spatial intersection operator st_intersects. There is no restriction on this SQL statement, as long as the SQL statement includes a time range and spatial information.

[0149] Step 302: If the computing node has established the first global index and the first local index, metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information are obtained.

[0150] Specifically, referring to the above embodiment, the process of establishing the first global index and the first local index has been introduced. If the first global index and the first local index are established in the manner of Embodiment 4, metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information are obtained.

[0151] Exemplarily, the metadata information may be: the minimum outsourcing rectangle; or the minimum outsourcing rectangle and time interval; or the minimum outsourcing rectangle and slice file environment; or the minimum outsourcing rectangle, time interval and slice file environment. There is no limitation on this, and the metadata information is the minimum outsourcing rectangle and time interval as an example.

[0152] Since the spatiotemporal query information includes a time range and spatial information, a time interval is determined according to the time range, and the time range may correspond to one or more time intervals. In addition, the minimum enclosing rectangle where the spatial information is located is determined according to the spatial information (such as the longitude and latitude position), that is, the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the longitude and latitude position of the spatiotemporal query information is located.

[0153] In summary, metadata information corresponding to the spatiotemporal query information can be obtained.

[0154] Exemplarily, the spatiotemporal query information may be encoded with a preset type to obtain spatiotemporal coding information (such as a spatiotemporal coding value) corresponding to the spatiotemporal query information. The preset type coding is to encode longitude and latitude; or, the preset type coding is to encode longitude, latitude and time. For example, the spatiotemporal query information may be a longitude and latitude position (such as longitude and latitude, etc.), and the longitude and latitude are encoded to obtain spatiotemporal coding information. For another example, the spatiotemporal query information may be a longitude and latitude position (such as longitude and latitude, etc.) and time, and the longitude, latitude and time are encoded to obtain spatiotemporal coding information.

[0155] Among them, the S2 space-time coding technology can be used to encode two dimensions (longitude and latitude) to obtain space-time coding information. The S3 space-time coding technology can be used to encode three dimensions (longitude, latitude and time) to obtain space-time coding information. The specific coding method is shown in the above embodiment and will not be repeated here.

[0156] Step 303: query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition.

[0157] Specifically, after obtaining the metadata information and spatiotemporal coding information corresponding to the spatiotemporal query information, the computing node can query the first global index shown in Table 5 through the metadata information corresponding to the spatiotemporal query information to obtain the storage partition corresponding to the metadata information. Then, through the spatiotemporal coding information corresponding to the spatiotemporal query information, query the first local index of the storage partition (see Table 6) to obtain the storage space (which may be one or more storage spaces) corresponding to the spatiotemporal coding information.

[0158] Step 304: Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0159] After obtaining the storage space corresponding to the spatiotemporal coding information, the feature data corresponding to the spatiotemporal query information can be obtained from the storage space, and there is no restriction on the process of obtaining the feature data.

[0160] Exemplarily, the computing node may obtain multiple feature data, merge the multiple feature data, obtain a feature data set, and output the feature data set. Alternatively, the feature data in the feature data set may be format converted, with no restriction on the conversion process, and the format-converted feature data may be output.

[0161] In a possible implementation, after step 301, if the computing node has not established the first global index and the first local index, the computing node sends the spatiotemporal query information to the storage node, so that the storage node obtains the feature data corresponding to the spatiotemporal query information according to the second global index and the second local index established by itself. Further, the computing node may receive the feature data corresponding to the spatiotemporal query information returned by the storage node, and output the feature data corresponding to the spatiotemporal query information.

[0162] In another possible implementation, after step 301, if the computing node has not established the first global index and the first local index, the computing node obtains the feature data from the storage node and stores the feature data in the storage space of the storage partition of the computing node. Then, the computing node establishes a first global index, which includes a mapping relationship between metadata information of the feature data and the storage partition where the feature data is located. In addition, the computing node establishes a first local index for the storage partition, which includes a mapping relationship between spatiotemporal coding information of the feature data and the storage space where the feature data is located.

[0163] For the process of storing the feature data, please refer to Embodiment 3, which will not be described in detail here. For the process of establishing the first global index and the first local index, please refer to Embodiment 4, which will not be described in detail here.

[0164] After the computing node establishes the first global index and the first local index, for the spatiotemporal query information (i.e., the spatiotemporal query information obtained in step 301), steps 302-304 can be used to obtain feature data corresponding to the spatiotemporal query information and output the feature data corresponding to the spatiotemporal query information.

[0165] Exemplarily, the computing node can determine whether it supports establishing the first global index and the first local index in itself. If yes, the operation of acquiring feature data from the storage node is performed, and the feature data is stored in the storage space of the storage partition of the computing node, and the first global index and the first local index are established. If no, the operation of sending the spatiotemporal query information to the storage node is performed, that is, the feature data corresponding to the spatiotemporal query information is received from the storage node, and the feature data corresponding to the spatiotemporal query information is output.

[0166] In one example, the above execution order is just an example given for the convenience of description. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0167] Based on the above technical solution, in an embodiment of the present application, query of feature data is implemented based on global index and local index, which can realize query of a large amount of feature data and save computing resources and storage resources. If query of feature data is implemented at a computing node, since the computing node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high. Moreover, there is no need to transmit feature data between computing nodes and storage nodes, which saves disk IO operations between computing nodes and storage nodes. If query of feature data is implemented at a storage node, since the storage node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high.

[0168] Example 6: Data query process of storage node, see Figure 4 FIG. 1 is a flow chart of a data query method in an embodiment of the present application, which can be applied to a storage node. The method may include:

[0169] Step 401, receiving spatiotemporal query information (ie, spatiotemporal query conditions) sent by a computing node, the spatiotemporal query information including a time range and spatial information (such as longitude and latitude positions, which may be multiple longitude and latitude positions).

[0170] Step 402, obtaining metadata information and spatiotemporal coding information corresponding to the spatiotemporal query information.

[0171] Exemplarily, the metadata information may be: the minimum outsourcing rectangle; or the minimum outsourcing rectangle and time interval; or the minimum outsourcing rectangle and slice file environment; or the minimum outsourcing rectangle, time interval and slice file environment. There is no limitation on this, and the metadata information is the minimum outsourcing rectangle and time interval as an example.

[0172] Since the spatiotemporal query information includes a time range and spatial information, a time interval is determined according to the time range, and the time range may correspond to one or more time intervals. In addition, the minimum enclosing rectangle where the spatial information is located is determined according to the spatial information (such as the longitude and latitude position), that is, the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the longitude and latitude position of the spatiotemporal query information is located.

[0173] In summary, metadata information corresponding to the spatiotemporal query information can be obtained.

[0174] Exemplarily, the spatiotemporal query information may be encoded in a preset type to obtain spatiotemporal coding information (such as a spatiotemporal coding value) corresponding to the spatiotemporal query information. The preset type coding is encoding longitude and latitude; or the preset type coding is encoding longitude, latitude and time.

[0175] Among them, the S2 space-time coding technology can be used to encode two dimensions (longitude and latitude) to obtain space-time coding information. The S3 space-time coding technology can be used to encode three dimensions (longitude, latitude and time) to obtain space-time coding information. The specific coding method is shown in the above embodiment and will not be repeated here.

[0176] Step 403: query the segment file corresponding to the metadata information according to the second global index, and query the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file.

[0177] Specifically, after obtaining the metadata information and spatiotemporal coding information corresponding to the spatiotemporal query information, the storage node can query the second global index shown in Table 1 through the metadata information corresponding to the spatiotemporal query information to obtain the shard file corresponding to the metadata information. Then, through the spatiotemporal coding information corresponding to the spatiotemporal query information, query the second local index of the shard file (see Table 4) to obtain the index file (which may be one or more index files) corresponding to the spatiotemporal coding information.

[0178] Step 404: Acquire feature data corresponding to the spatiotemporal query information from the index file.

[0179] After obtaining the index file corresponding to the spatiotemporal coding information, the feature data corresponding to the spatiotemporal query information can be obtained from the index file, and there is no restriction on the process of obtaining the feature data.

[0180] Step 405: Send the feature data corresponding to the spatiotemporal query information to the computing node.

[0181] Based on the above technical solution, in an embodiment of the present application, query of feature data is implemented based on global index and local index, which can realize query of a large amount of feature data and save computing resources and storage resources. If query of feature data is implemented at a computing node, since the computing node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high. Moreover, there is no need to transmit feature data between computing nodes and storage nodes, which saves disk IO operations between computing nodes and storage nodes. If query of feature data is implemented at a storage node, since the storage node realizes query of feature data based on global index and local index, the feature data can be quickly queried through two-level indexes, and the query performance is high and the query efficiency is high.

[0182] Example 7: Combination of the following Figure 5A The application scenario shown in the figure further illustrates the above process.

[0183] Step 501: The computing node obtains spatiotemporal query information (ie, spatiotemporal query conditions).

[0184] Step 502: The computing node determines whether the first global index and the first local index exist.

[0185] If yes, execute step 503 ; if no, execute step 507 .

[0186] Step 503: The computing node obtains metadata information and spatiotemporal coding information corresponding to the spatiotemporal query information.

[0187] Step 504: The computing node queries the storage partition corresponding to the metadata information according to the first global index, and queries the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition.

[0188] Step 505: The computing node obtains feature data corresponding to the spatiotemporal query information from the storage space.

[0189] Step 506: The computing node converts the format of the feature data and outputs the feature data.

[0190] Step 507: The computing node determines whether it supports establishing the first global index and the first local index on the computing node. If yes, execute step 508; if no, execute step 509.

[0191] Step 508 , the computing node obtains feature data from the storage node, stores the feature data in the storage space of the storage partition of the computing node, establishes a first global index and a first local index, and returns to step 502 .

[0192] Step 509: The computing node sends the spatiotemporal query information to the storage node.

[0193] Step 510: The storage node obtains metadata information and spatiotemporal coding information corresponding to the spatiotemporal query information.

[0194] Step 511: The storage node queries the segment file corresponding to the metadata information according to the second global index, and queries the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file.

[0195] Step 512: The storage node obtains feature data corresponding to the spatiotemporal query information from the index file.

[0196] Step 513: The storage node sends the feature data corresponding to the spatiotemporal query information to the computing node.

[0197] Step 514 : The computing node receives feature data corresponding to the spatiotemporal query information and executes step 506 .

[0198] See also Figure 5B As shown, the above process is described below in conjunction with another application scenario.

[0199] The input is the spatiotemporal query conditions (such as time range and spatial operators).

[0200] At the computing layer, first determine whether the memory index (i.e., the first global index and the first local index) exists. If so, filter the storage partition according to the first global index, filter the storage space according to the first local index, and obtain feature data from the storage space. Then, merge multiple feature data into a feature data set, perform format conversion on the feature data in the feature data set, and output the result set.

[0201] If the memory index does not exist, it is determined whether it is supported to build the memory index in the computing layer. If so, feature data is obtained from the storage node, and a first global index and a first local index are established.

[0202] If building a memory index at the computing layer is not supported, the spatiotemporal query conditions are sent to the storage layer.

[0203] The storage layer converts the spatiotemporal query conditions into query conditions of the second global index and query conditions of the second local index. The shard files are filtered according to the second global index, the index files are filtered according to the second local index, and feature data is obtained from the index files. Then, multiple feature data are merged into a feature data set, and the feature data set is returned to the computing layer. Furthermore, the computing layer performs format conversion on the feature data in the feature data set and outputs a result set.

[0204] Based on the same application concept as the above method, the present application embodiment also provides a data query device, which is applied to a computing node, such as Fig. 6A As shown, it is a structural diagram of the device, and the device includes:

[0205] The acquisition module 611 is used to acquire spatiotemporal query information; if the computing node has established a first global index and a first local index, then the metadata information corresponding to the spatiotemporal query information and the spatiotemporal coding information corresponding to the spatiotemporal query information are acquired; the query module 612 is used to query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; the acquisition module 611 is also used to acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0206] The acquisition module 611 is also used for: if the computing node has not established the first global index and the first local index, sending the spatiotemporal query information to the storage node, so that the storage node obtains the feature data corresponding to the spatiotemporal query information according to the second global index and the second local index established by itself; and receiving the feature data corresponding to the spatiotemporal query information returned by the storage node.

[0207] The acquisition module 611 is also used for: if the computing node has not established the first global index and the first local index, acquiring the feature data from the storage node, and storing the feature data in the storage space of the storage partition of the computing node; establishing a first global index, the first global index including the mapping relationship between the metadata information of the feature data and the storage partition where the feature data is located; establishing a first local index for the storage partition, the first local index including the mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located.

[0208] When the acquisition module 611 stores the feature data in the storage space of the storage partition of the computing node, it is specifically used to: obtain metadata information of the feature data, and store the feature data in the storage space of the storage partition of the computing node according to the metadata information of the feature data; wherein feature data with the same metadata information are stored in the same storage partition.

[0209] When establishing the first local index for the storage partition, the acquisition module 611 is specifically used to: obtain the spatiotemporal index information of the feature data, and perform a preset type encoding on the spatiotemporal index information to obtain the spatiotemporal coding information of the feature data; and establish a first local index for the storage partition based on the spatiotemporal coding information of the feature data and the storage space of the storage partition where the feature data is located.

[0210] The acquisition module 611 is also used to: determine whether the computing node supports establishing the first global index and the first local index on itself; if yes, execute the operation of acquiring feature data from the storage node; if not, execute the operation of sending the spatiotemporal query information to the storage node.

[0211] When the acquisition module 611 acquires the spatiotemporal coding information corresponding to the spatiotemporal query information, it is specifically used to: perform preset type encoding on the spatiotemporal query information to obtain the spatiotemporal coding information corresponding to the spatiotemporal query information; wherein the preset type encoding is encoding longitude and latitude; or, the preset type encoding is encoding longitude, latitude and time.

[0212] The metadata information is: a minimum enclosing rectangle; or, a minimum enclosing rectangle and a time interval; the acquisition module 611 is also used to: obtain multiple minimum enclosing rectangles, the minimum enclosing rectangle includes a location area composed of multiple longitude and latitude positions; wherein the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the longitude and latitude positions of the spatiotemporal query information are located; the minimum enclosing rectangle of the feature data is the minimum enclosing rectangle where the longitude and latitude positions of the feature data are located.

[0213] When the acquisition module 611 acquires multiple minimum enclosing rectangles, it is specifically used to: acquire the minimum enclosing rectangle division strategy of the storage node, and divide the longitude and latitude position into multiple minimum enclosing rectangles according to the minimum enclosing rectangle division strategy; or, divide the longitude and latitude position into multiple minimum enclosing rectangles according to the longitude and latitude position of historical data; or, divide the longitude and latitude position into multiple minimum enclosing rectangles according to preconfigured division conditions.

[0214] Based on the same application concept as the above method, the embodiment of the present application also provides a data query device, which is applied to a storage node, such as Figure 6BAs shown, it is a structural diagram of the device, and the device includes:

[0215] The acquisition module 621 is used to receive the spatiotemporal query information sent by the computing node, and to obtain the metadata information corresponding to the spatiotemporal query information and the spatiotemporal coding information corresponding to the spatiotemporal query information; the query module 622 is used to query the segmented file corresponding to the metadata information according to the second global index, and to query the index file corresponding to the spatiotemporal coding information according to the second local index of the segmented file; the acquisition module 621 is also used to obtain the feature data corresponding to the spatiotemporal query information from the index file; the sending module 623 is used to send the feature data corresponding to the spatiotemporal query information to the computing node.

[0216] The acquisition module 621 is also used to: when storing feature data, obtain metadata information of the feature data, and store the feature data in an index file of the segment file according to the metadata information of the feature data; wherein feature data with the same metadata information are stored in the same segment file.

[0217] The acquisition module 621 is also used to: establish a second global index, wherein the second global index includes a mapping relationship between metadata information of feature data and the segmented file where the feature data is located; establish a second local index for the segmented file, wherein the second local index includes a mapping relationship between spatiotemporal coding information of feature data and the index file where the feature data is located.

[0218] The acquisition module 621 is specifically used to establish the second local index for the fragment file:

[0219] Acquire spatiotemporal index information of feature data, and perform preset type encoding on the spatiotemporal index information to obtain spatiotemporal coding information of the feature data; establish a second local index for the segmented file based on the spatiotemporal coding information of the feature data and the index file of the segmented file where the feature data is located.

[0220] When the acquisition module 621 acquires the spatiotemporal coding information corresponding to the spatiotemporal query information, it is specifically used to: perform preset type encoding on the spatiotemporal query information to obtain the spatiotemporal coding information corresponding to the spatiotemporal query information; wherein the preset type encoding is encoding longitude and latitude; or, the preset type encoding is encoding longitude, latitude and time.

[0221] The metadata information is: a minimum enclosing rectangle; or, a minimum enclosing rectangle and a time interval; the acquisition module 621 is also used to: obtain multiple minimum enclosing rectangles, the minimum enclosing rectangle includes a location area composed of multiple longitude and latitude positions; wherein the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the longitude and latitude positions of the spatiotemporal query information are located; the minimum enclosing rectangle of the feature data is the minimum enclosing rectangle where the longitude and latitude positions of the feature data are located.

[0222] The acquisition module 621 is specifically used to acquire multiple minimum bounding rectangles:

[0223] The longitude and latitude positions are divided into a plurality of minimum outer bounding rectangles according to the longitude and latitude positions of the historical data; or, the longitude and latitude positions are divided into a plurality of minimum outer bounding rectangles according to a preconfigured division condition.

[0224] Based on the same application concept as the above method, an embodiment of the present application further provides a computing node, the computing node comprising: a processor and a machine-readable storage medium, the machine-readable storage medium storing a number of computer instructions, and the processor performs the following processing when executing the computer instructions:

[0225] Get spatiotemporal query information;

[0226] If the computing node has established a first global index and a first local index, then obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0227] Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition;

[0228] Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0229] The present application also provides a machine-readable storage medium, on which a number of computer instructions are stored; when the computer instructions are executed, the following processing is performed:

[0230] Get spatiotemporal query information;

[0231] If the computing node has established a first global index and a first local index, then obtaining metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0232] Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition;

[0233] Acquire feature data corresponding to the spatiotemporal query information from the storage space.

[0234] Based on the same application concept as the above method, an embodiment of the present application further provides a storage node, the storage node comprising: a processor and a machine-readable storage medium, the machine-readable storage medium storing a number of computer instructions, and the processor performs the following processing when executing the computer instructions:

[0235] Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0236] Querying the segment file corresponding to the metadata information according to the second global index, and querying the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file;

[0237] Acquire feature data corresponding to the spatiotemporal query information from the index file;

[0238] The feature data corresponding to the spatiotemporal query information is sent to the computing node.

[0239] The present application also provides a machine-readable storage medium, on which a number of computer instructions are stored; when the computer instructions are executed, the following processing is performed:

[0240] Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information;

[0241] Querying the segment file corresponding to the metadata information according to the second global index, and querying the index file corresponding to the spatiotemporal coding information according to the second local index of the segment file;

[0242] Acquire feature data corresponding to the spatiotemporal query information from the index file;

[0243] The feature data corresponding to the spatiotemporal query information is sent to the computing node.

[0244] See also Figure 6CAs shown, it is a structural diagram of the computing node / storage node proposed in the embodiment of the present application, which may include: a processor 631, a network interface 632, a bus 633, and a memory 634. The memory 634 may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the memory 634 may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.). The processor 631 may include but is not limited to: CPU (Central Processing Unit), GPU (Graphics Processing Unit), FPGA (Field Programmable Gate Array), NPU (Neural-network Processing Unit).

[0245] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0246] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0247] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0248] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0249] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0250] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0251] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A data query method, characterized in that: Applied to a computing node, the method comprises: Get spatiotemporal query information; If the computing node has established a first global index and a first local index, metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information are obtained; wherein the first global index includes a mapping relationship between the metadata information of the feature data and the storage partition where the feature data is located; each storage partition corresponds to a first local index, and the first local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located; Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; Acquire feature data corresponding to the spatiotemporal query information from the storage space.

2. The method according to claim 1, characterized in that After acquiring the spatiotemporal query information, the method further includes: If the computing node has not established the first global index and the first local index, the spatiotemporal query information is sent to the storage node, so that the storage node obtains feature data corresponding to the spatiotemporal query information according to the second global index and the second local index established by itself; Receive feature data corresponding to the spatiotemporal query information returned by the storage node.

3. The method according to claim 1, characterized in that: After acquiring the spatiotemporal query information, the method further includes: If the computing node has not established the first global index and the first local index, acquiring feature data from the storage node, and storing the feature data in the storage space of the storage partition of the computing node; Establishing the first global index; Create the first local index for the storage partition.

4. The method according to claim 3, characterized in that The storing the characteristic data into the storage space of the storage partition of the computing node includes: Acquire metadata information of the feature data, and store the feature data in a storage space of a storage partition of the computing node according to the metadata information of the feature data; Among them, feature data with the same metadata information is stored in the same storage partition.

5. The method according to claim 3, characterized in that: The step of establishing a first local index for the storage partition specifically includes: Acquire the spatiotemporal index information of the feature data, and perform preset type encoding on the spatiotemporal index information to obtain the spatiotemporal encoding information of the feature data; A first local index is established for the storage partition according to the spatiotemporal coding information of the feature data and the storage space of the storage partition where the feature data is located.

6. The method according to claim 2 or 3, characterized in that: After acquiring the spatiotemporal query information, the method further includes: Determine whether the computing node supports establishing a first global index and a first local index on itself; If yes, then the operation of obtaining feature data from the storage node is performed; If not, an operation of sending the spatiotemporal query information to a storage node is performed.

7. The method according to claim 1 or 5, characterized in that: The acquiring of the spatiotemporal coding information corresponding to the spatiotemporal query information includes: performing a preset type coding on the spatiotemporal query information to obtain the spatiotemporal coding information corresponding to the spatiotemporal query information; The preset type of encoding is encoding longitude and latitude; or, The preset type of encoding is encoding longitude, latitude and time.

8. The method according to any one of claims 1, 3 and 4, characterized in that The metadata information is: the minimum enclosing rectangle; or the minimum enclosing rectangle and time interval; Before obtaining the metadata information corresponding to the spatiotemporal query information, the method further includes: obtaining a plurality of minimum outer bounding rectangles, wherein the minimum outer bounding rectangles include a location area composed of a plurality of longitude and latitude positions; Among them, the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the latitude and longitude positions of the spatiotemporal query information are located; the minimum enclosing rectangle of the feature data is the minimum enclosing rectangle where the latitude and longitude positions of the feature data are located.

9. The method according to claim 8, characterized in that The obtaining of multiple minimum bounding rectangles includes: Obtaining a minimum enclosing rectangle partitioning strategy of a storage node, and dividing the longitude and latitude position into a plurality of minimum enclosing rectangles according to the minimum enclosing rectangle partitioning strategy; or, Divide the longitude and latitude positions into multiple minimum bounding rectangles according to the longitude and latitude positions of historical data; or, The latitude and longitude locations are divided into multiple minimum bounding rectangles according to the preconfigured division conditions.

10. A data query method, characterized in that: Applied to a storage node, the method comprises: Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; Query the shard file corresponding to the metadata information according to the second global index, and query the index file corresponding to the spatiotemporal coding information according to the second local index of the shard file; wherein the second global index includes a mapping relationship between the metadata information of the feature data and the shard file where the feature data is located; each shard file corresponds to a second local index, and the second local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located; Acquire feature data corresponding to the spatiotemporal query information from the index file; The feature data corresponding to the spatiotemporal query information is sent to the computing node.

11. The method according to claim 10, characterized in that The method further comprises: When storing feature data, obtaining metadata information of the feature data, and storing the feature data in an index file of a fragment file according to the metadata information of the feature data; Among them, feature data with the same metadata information is stored in the same segment file.

12. The method according to claim 10 or 11, characterized in that: Before querying the fragment file corresponding to the metadata information according to the second global index, the method further includes: Establish a second global index; Create a second local index for the shard file.

13. The method according to claim 12, characterized in that The step of establishing a second local index for the fragment file specifically includes: Acquire spatiotemporal index information of feature data, and perform preset type encoding on the spatiotemporal index information to obtain spatiotemporal encoding information of the feature data; A second local index is established for the segment file according to the spatiotemporal coding information of the feature data and the index file of the segment file where the feature data is located.

14. The method according to claim 13, characterized in that The acquiring of the spatiotemporal coding information corresponding to the spatiotemporal query information includes: performing a preset type coding on the spatiotemporal query information to obtain the spatiotemporal coding information corresponding to the spatiotemporal query information; The preset type of encoding is encoding longitude and latitude; or, The preset type of encoding is encoding longitude, latitude and time.

15. The method according to claim 10 or 11, characterized in that: The metadata information is: the minimum enclosing rectangle; or the minimum enclosing rectangle and time interval; Before obtaining the metadata information corresponding to the spatiotemporal query information, the method further includes: obtaining a plurality of minimum outer bounding rectangles, wherein the minimum outer bounding rectangles include a location area composed of a plurality of longitude and latitude positions; Among them, the minimum enclosing rectangle corresponding to the spatiotemporal query information is the minimum enclosing rectangle where the latitude and longitude positions of the spatiotemporal query information are located; the minimum enclosing rectangle of the feature data is the minimum enclosing rectangle where the latitude and longitude positions of the feature data are located.

16. The method according to claim 15, characterized in that The obtaining of multiple minimum bounding rectangles includes: Divide the longitude and latitude positions into multiple minimum bounding rectangles according to the longitude and latitude positions of historical data; or, The latitude and longitude locations are divided into multiple minimum bounding rectangles according to the preconfigured division conditions.

17. A data query device, characterized in that: Applied to a computing node, the device comprises: An acquisition module is used to acquire spatiotemporal query information; if the computing node has established a first global index and a first local index, then the metadata information corresponding to the spatiotemporal query information and the spatiotemporal coding information corresponding to the spatiotemporal query information are acquired; wherein the first global index includes a mapping relationship between the metadata information of the feature data and the storage partition where the feature data is located; each storage partition corresponds to a first local index, and the first local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located; A query module, configured to query a storage partition corresponding to the metadata information according to a first global index, and query a storage space corresponding to the spatiotemporal coding information according to a first local index of the storage partition; The acquisition module is further used to acquire feature data corresponding to the spatiotemporal query information from the storage space.

18. A computing node, characterized in that: The computing node comprises: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing: Get spatiotemporal query information; If the computing node has established a first global index and a first local index, metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information are obtained; wherein the first global index includes a mapping relationship between the metadata information of the feature data and the storage partition where the feature data is located; each storage partition corresponds to a first local index, and the first local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located; Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; Acquire feature data corresponding to the spatiotemporal query information from the storage space.

19. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a plurality of computer instructions; when the computer instructions are executed, the following processing is performed: Get spatiotemporal query information; If the computing node has established a first global index and a first local index, then obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; wherein the first global index includes a mapping relationship between the metadata information of the feature data and the storage partition where the feature data is located; each storage partition corresponds to a first local index, and the first local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the storage space where the feature data is located; Query the storage partition corresponding to the metadata information according to the first global index, and query the storage space corresponding to the spatiotemporal coding information according to the first local index of the storage partition; Acquire feature data corresponding to the spatiotemporal query information from the storage space.

20. A data query device, characterized in that: Applied to a storage node, the device comprises: An acquisition module, used to receive the spatiotemporal query information sent by the computing node, and acquire metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; A query module, used to query the shard file corresponding to the metadata information according to the second global index, and query the index file corresponding to the spatiotemporal coding information according to the second local index of the shard file; wherein the second global index includes a mapping relationship between the metadata information of the feature data and the shard file where the feature data is located; each shard file corresponds to a second local index, and the second local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located; The acquisition module is further used to acquire feature data corresponding to the spatiotemporal query information from the index file; The sending module is used to send the feature data corresponding to the spatiotemporal query information to the computing node.

21. A storage node, characterized in that: The storage node comprises: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores a plurality of computer instructions, and when the processor executes the computer instructions, the processor performs the following processing: Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; Query the shard file corresponding to the metadata information according to the second global index, and query the index file corresponding to the spatiotemporal coding information according to the second local index of the shard file; wherein the second global index includes a mapping relationship between the metadata information of the feature data and the shard file where the feature data is located; each shard file corresponds to a second local index, and the second local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located; Acquire feature data corresponding to the spatiotemporal query information from the index file; The feature data corresponding to the spatiotemporal query information is sent to the computing node.

22. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a plurality of computer instructions; when the computer instructions are executed, the following processing is performed: Receive the spatiotemporal query information sent by the computing node, and obtain metadata information corresponding to the spatiotemporal query information and spatiotemporal coding information corresponding to the spatiotemporal query information; Query the shard file corresponding to the metadata information according to the second global index, and query the index file corresponding to the spatiotemporal coding information according to the second local index of the shard file; wherein the second global index includes a mapping relationship between the metadata information of the feature data and the shard file where the feature data is located; each shard file corresponds to a second local index, and the second local index includes a mapping relationship between the spatiotemporal coding information of the feature data and the index file where the feature data is located; Acquire feature data corresponding to the spatiotemporal query information from the index file; The feature data corresponding to the spatiotemporal query information is sent to the computing node.

Citation Information

Patent Citations

  • Indexing method for water conservation data integration and sharing

    CN104090949A

  • Space-time geographic big data retrieval method and system

    CN105426491A

  • Spatio-temporal data indexing method in non-relational database

    CN107423368A

  • An efficient organization and management method of massive spatio-temporal data

    CN109144966A

  • Space-time coding method, space-time index and query method and device

    CN109992636A