Spatio-temporal data processing method and device

By using a tree-like index structure in the GIS system and leveraging time intervals and spatial range constraints, target spatiotemporal data can be quickly located, solving the problem of low efficiency in spatiotemporal data query and achieving efficient data management and querying.

CN121456005APending Publication Date: 2026-02-03CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511407578.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

The existing GIS system suffers from low query efficiency for spatiotemporal data, making it difficult to efficiently manage and query large amounts of spatiotemporal data.

Method used

By employing a tree-structured index, the system quickly locates target spatiotemporal data based on time intervals and spatial range constraints in the data query conditions, and then uses the tree-structured index to search for candidate data in the database that matches the time intervals and spatial ranges.

Benefits of technology

It improves the efficiency of spatiotemporal data query, reduces the number of times spatiotemporal data is traversed in the database, and enhances the speed and efficiency of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456005A_ABST
    Figure CN121456005A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a spatio-temporal data processing method and device. The method comprises the steps of obtaining a data query condition; the data query condition carries a first time interval and a first space range; obtaining a first tree index of a database; the first tree index comprises a plurality of first nodes, and the first nodes are used for representing a second time interval and storage positions of spatio-temporal data of objects appearing in the second time interval in the database; determining a first target node in the first nodes according to the first time interval; the second time interval represented by the first target node is matched with the first time interval; obtaining first candidate data in a database according to the storage position represented by the first target node, and determining target spatio-temporal data according to the first spatial range and the first candidate data; the first candidate data is spatio-temporal data of an object appearing in a second time interval represented by the first target node. Through the embodiment, the data query efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data processing technology, and in particular to a spatiotemporal data processing method and apparatus. Background Technology

[0002] With the development of internet technology, the application of GIS (Geographic Information System) systems is becoming increasingly widespread. A GIS system is a computer-supported technology system that collects, stores, analyzes, and displays geographic distribution data related to the Earth's surface. Its database stores a large amount of continuously collected spatiotemporal data. The continuity of spatiotemporal data in the time dimension and the geometric complexity in the spatial dimension lead to relatively high data management difficulty and low data query efficiency. Therefore, how to improve data query efficiency is receiving increasing attention. Summary of the Invention

[0003] This disclosure provides a spatiotemporal data processing method and apparatus to address the problem of improving data query efficiency.

[0004] In a first aspect, embodiments of this disclosure provide a spatiotemporal data processing method, including: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; Obtain the first tree index of the database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; Based on the first time interval, a first target node is determined among each of the first nodes; the second time interval represented by the first target node matches the first time interval. Based on the storage location represented by the first target node, first candidate data is obtained from the database, and the target spatiotemporal data is determined based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0005] Secondly, embodiments of this disclosure provide a spatiotemporal data processing apparatus, comprising: A condition acquisition unit is used to acquire data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; An index acquisition unit is used to acquire a first tree index of a database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of a second time interval and objects appearing in the second time interval in the database; A node determination unit is configured to determine a first target node among each of the first nodes based on the first time interval; the second time interval represented by the first target node matches the first time interval. The data determination unit is configured to obtain first candidate data from the database based on the storage location represented by the first target node, and determine the target spatiotemporal data based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0006] Thirdly, embodiments of this disclosure provide an electronic device, including: a memory, a processor, and computer-executable instructions stored in the memory and executable on the processor, wherein the computer-executable instructions, when executed by the processor, implement the method described in the first aspect above.

[0007] Fourthly, embodiments of this disclosure provide a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the method described in the first aspect above.

[0008] Fifthly, embodiments of this disclosure provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the method described in the first aspect above.

[0009] In one or more embodiments of this disclosure, firstly, data query conditions for querying spatiotemporal data are obtained; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; then, a first tree index of the database is obtained; the first tree index includes multiple first nodes, and the first nodes are used to represent the storage location of the spatiotemporal data of the second time interval and the object appearing in the second time interval in the database; next, according to the first time interval, a first target node is determined in each first node; the second time interval represented by the first target node matches the first time interval; finally, according to the storage location represented by the first target node, first candidate data is obtained in the database, and target spatiotemporal data is determined according to the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of the object appearing in the second time interval represented by the first target node. As can be seen, through this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in one or more embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating a spatiotemporal data processing method according to an embodiment of this disclosure; Figure 2 This is a schematic diagram of the structure of a first tree-like index provided in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of a second tree index provided in one embodiment of the present disclosure; Figure 4 A flowchart illustrating another spatiotemporal data processing method provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of the structure of a spatiotemporal data processing device provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. Detailed Implementation

[0012] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this disclosure, the technical solutions in one or more embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of the embodiments. Based on one or more embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.

[0013] This disclosure provides a spatiotemporal data processing method and apparatus that can improve data query efficiency. The spatiotemporal data processing method can be applied to and implemented by a terminal device, which includes, but is not limited to, laptops, tablets, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), smartphones, smart speakers, smartwatches, smart TVs, in-vehicle terminals, and other types of user terminals.

[0014] Figure 1 This is a flowchart illustrating a spatiotemporal data processing method according to an embodiment of this disclosure. Figure 1 As shown, the process includes: Step S102: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range.

[0015] Step S104: Obtain the first tree index of the database; the first tree index includes multiple first nodes, which are used to represent the storage location of the spatiotemporal data of the second time interval and the objects that appear in the second time interval in the database.

[0016] Step S106: Based on the first time interval, determine the first target node among the various first nodes; the second time interval represented by the first target node matches the first time interval.

[0017] Step S108: Based on the storage location represented by the first target node, obtain the first candidate data from the database, and determine the target spatiotemporal data based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0018] In this embodiment, firstly, data query conditions for querying spatiotemporal data are obtained; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; then, a first tree index of the database is obtained; the first tree index includes multiple first nodes, which are used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; next, according to the first time interval, a first target node is determined in each first node; the second time interval represented by the first target node matches the first time interval; finally, according to the storage location represented by the first target node, first candidate data is obtained in the database, and the target spatiotemporal data is determined according to the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of the objects appearing in the second time interval represented by the first target node. As can be seen, through this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0019] In step S102 above, data query conditions for querying spatiotemporal data are obtained; the data query conditions carry a first time interval and a first spatial range. The spatiotemporal data can include both time and spatial information. For example, spatiotemporal data 1 is (x, y, z, start_time, end_time), where the spatial information in spatiotemporal data 1 includes the three-dimensional coordinates of a point data: x, y, z, and the time information in spatiotemporal data 1 includes start_time (start time) and end_time (end time).

[0020] The first time interval represents the time period included in the data query conditions. For example, the first time interval is represented by the time period [T1, T2], where the start time of the time period [T1, T2] is T1 and the end time is T2.

[0021] The first spatial range represents the spatial information included in the data query conditions, for example: (a1) Spatial information can be the location information of three-dimensional point data, for example, the first spatial range can be represented by (x1, y1, z1).

[0022] (a2) Spatial information can also include positional information related to 3D line / surface data. For example, for 3D line data a1, a1 is a straight line, and the coordinates of the two endpoints of a1 represent the first spatial extent. Or, for 3D line data a2, determine the MBR (Minimum Bounding Rectangle) of a2, whose vertex set is... , The first spatial extent is represented by the coordinates of each vertex of the MBR of a2. Alternatively, for three-dimensional line data a3, the MBR of a3 is determined, and its vertex set is... , Based on the MBR vertex set of a3, determine the minimum coordinate value (x) of the MBR. min ,y min ,z min ) and maximum coordinate value (x) max ,y max ,z max The first spatial extent is represented by the maximum and minimum coordinate values ​​of the MBR in a3. Due to the similar concept, the three-dimensional surface data can be referenced from the example of the three-dimensional line data.

[0023] (a3) Spatial information can also be the minimum and maximum coordinates of a pre-defined cuboid, for example, W=[(x wmin ,y wmin ,z wmin ), (x wmax ,y wmax ,zwmax )], where W represents the first spatial range.

[0024] The spatial information listed above is merely exemplary, and the spatial information in this embodiment can be represented by any coordinate system, not limited to a three-dimensional rectangular coordinate system. In practical applications, the representation of the first spatial range can be flexibly set according to requirements.

[0025] Regarding (a2) above, the minimum coordinate value (x) of the MBR min ,y min ,z min It can be calculated using the following formula: (1) Where l represents the number of vertices in the MBR vertex set of a3. This represents the x-coordinate of the i-th vertex. This represents the y-coordinate of the i-th vertex. This represents the z-coordinate of the i-th vertex. This represents the x-coordinate value among the minimum coordinate values ​​of the MBR of a3. This represents the y-coordinate value among the minimum coordinate values ​​of the MBR of a3. This represents the z-coordinate value in the minimum coordinate value of the MBR of a3.

[0026] Maximum coordinates of MBR (x max ,y max ,z max It can be calculated using the following formula: (2) Where l represents the number of vertices in the MBR vertex set of a3. This represents the x-coordinate of the i-th vertex. This represents the y-coordinate of the i-th vertex. Let x represent the z-coordinate of the i-th vertex. max This represents the x-coordinate value and y-coordinate value in the maximum coordinate value of the MBR of a3. max This represents the y-coordinate value and z-coordinate value in the maximum coordinate value of the MBR of a3. max This represents the z-coordinate value among the maximum coordinate values ​​of the MBR of a3.

[0027] Regarding the above (a3), the minimum coordinate value (x) of the cuboid is preset. wmin ,y wmin ,z wmin The determination method for (x) can refer to the minimum coordinate value of MBR in (a2) above. min ,y min ,z minThe calculation process of ) presets the maximum coordinate value (x) of the cuboid. wmax ,y wmax ,z wmax The determination method for (x) can refer to the maximum coordinate value of MBR in (a2) above. max ,y max ,z max The calculation process for ) will not be elaborated here.

[0028] In step S102 above, each spatiotemporal data corresponds to an object. The object can be a physical object, such as a person, animal, house, vehicle, etc., or a momentary / continuous event occurring in space, such as a natural disaster event, a public safety event, etc., or a spatial coverage phenomenon, such as vegetation coverage distribution, haze concentration distribution, etc.

[0029] In one example, the spatiotemporal data is traffic spatiotemporal data stored in the database of a transportation system, with each traffic spatiotemporal data point corresponding to a vehicle. In another example, the spatiotemporal data is geographic spatiotemporal data stored in the database of a GIS system, with each geographic spatiotemporal data point corresponding to an earthquake event. In yet another example, the spatiotemporal data is climate spatiotemporal data stored in the database of a climate system, with each climate spatiotemporal data point corresponding to a typhoon.

[0030] The objects and corresponding spatiotemporal data listed above are exemplary. The specific content of the spatiotemporal data may differ in different application scenarios, but all will include both temporal and spatial information. Any spatiotemporal data that includes both temporal and spatial information can be used in the spatiotemporal data processing method provided in this embodiment.

[0031] In step S102 above, the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied by the corresponding object when it appears. The first sub-time interval can be determined by the time information in the spatiotemporal data. The first sub-space range can be determined by the spatial information in the spatiotemporal data. An object can correspond to one or more spatiotemporal data. Within the same spatiotemporal data, the first sub-space range occupied by the corresponding object when it appears remains unchanged.

[0032] Taking a vehicle as an example, let's illustrate spatiotemporal data: For instance, spatiotemporal data 2 corresponds to vehicle A. The time information in spatiotemporal data 2 is: start time t1, end time t2. The spatial information in spatiotemporal data 2 includes a set of points and the three-dimensional position information of each point in the set. Each point in the set is a vertex of vehicle A. Based on spatiotemporal data 2, we can know that during the time interval [t1, t2], vehicle A remains stationary at a fixed position. After the end time t2, the three-dimensional position information of each vertex in vehicle A changes partially or completely. Considering that the movement of vehicle A can be approximated as vehicle A remaining stationary at corresponding fixed positions in multiple extremely short time intervals, assuming vehicle A remains stationary in the first time interval, then vehicle A has only one corresponding spatiotemporal data in the first time interval. Assuming vehicle A moves at a constant speed in a straight line in the second time interval, then vehicle A corresponds to multiple spatiotemporal data in the second time interval. Each of these multiple spatiotemporal data has different spatial and temporal information.

[0033] In step S102 above, the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first space range. For example, the first time interval is from 0:00 on January 1st to 0:00 on January 2nd, and the first space range is the preset cuboid corresponding to intersection X. The objects corresponding to the spatiotemporal data include people and vehicles. The target spatiotemporal data queried by the data query conditions simultaneously satisfy: (1) the start time is equal to or later than 0:00 on January 1st; (2) the end time is earlier than or equal to 0:00 on January 2nd; (3) people / vehicles appear in the preset cuboid corresponding to intersection X.

[0034] In step S104 above, the first tree-based index of the database is obtained. The first tree-based index includes multiple first nodes, which represent the storage location of spatiotemporal data of objects appearing in the second time interval within the database. A tree-based index is an index implemented based on a tree structure. Its core is to store and manage data index information through a hierarchical organization of trees (such as the hierarchical relationship between root nodes, intermediate nodes, and leaf nodes), thereby achieving efficient query, insertion, and deletion operations. In this embodiment, the first node in the first tree-based index can be a leaf node of the first tree-based index, that is, a node located at the bottom level of the tree structure and without child nodes.

[0035] In this embodiment, the database can be a database that stores spatiotemporal data. In one example, the database is a PostgreSQL database loaded with PostGIS. PostGIS, as a spatial extension of the PostgreSQL database, can be used to store, manage, and query spatial data. The spatiotemporal data processing method provided in this embodiment can be executed through PostGIS.

[0036] For example, a three-dimensional geometric type can be added to the existing two-dimensional geometric types in PostGIS. The ST_3DPoint type is defined to store three-dimensional point data, with a storage format of (x, y, z), where x and y are planar coordinates and z is the height coordinate. Assume a three-dimensional point dataset exists. , where the i-th 3D point data This enables the storage of three-dimensional point data.

[0037] For 3D line data (ST_3DLineString), a z-coordinate dimension can be added to the corresponding 2D type. 3D line data can be represented as... Where m is the number of nodes in the 3D line data. This represents the first node of the 3D line data, ... This represents the m-th node of the 3D line data. The same logic applies to 3D surface data and 3D solid data; they can be referenced from the 3D line data.

[0038] Furthermore, based on the 3D geometry type, a temporal table structure can be introduced, adding start_time (data effective start time) and end_time (data effective end time) fields to the traditional spatial data table. A new spatiotemporal geometry type, such as ST_TemporalPoint, can be defined, with a storage structure of (x, y, z, start_time, end_time). Assume a spatiotemporal point dataset. Data at the j-th spatiotemporal point ,in For the start time, To achieve spatiotemporal data association and storage, the end time is used.

[0039] The data structure expansion process described above is merely an illustrative example provided to facilitate a better understanding of databases that store spatiotemporal data. Any database that can be used to store spatiotemporal data, or a database that can be used to store spatiotemporal data after being expanded through data structure, can be applied to the spatiotemporal data processing method provided in this embodiment, and is not limited to the PostgreSQL database loaded with PostGIS listed above.

[0040] In this embodiment, for any first node in the first tree index, the first node carries a corresponding second time interval. Different first nodes may carry the same, partially overlapping, or completely different second time intervals. It is important to emphasize that if two first nodes carry the same second time interval but the spatiotemporal data corresponding to those two second nodes are different, then a single first node can be used to uniquely identify a specific spatiotemporal data point in the database. For example, if the object is a vehicle, and vehicle A's spatiotemporal data contains time information [t1, t2] and spatial information Z1, while vehicle B's spatiotemporal data contains time information [t1, t2] and spatial information Z2, then these two spatiotemporal data points have identical time information but different spatial information, and therefore correspond to two different first nodes in the first tree index.

[0041] In this embodiment, the second time interval represented by the first node can be determined based on the time information in a unique spatiotemporal data set corresponding to the first node. For example, if the time information in spatiotemporal data 1 is [t1, t2], then the second time interval represented by the first node corresponding to spatiotemporal data 1 is [t1, t2]. As another example, if the time information in spatiotemporal data 2 is [t3, t4], then the second time interval represented by the first node corresponding to spatiotemporal data 2 is [t3-x, t4+x], where x is a preset value.

[0042] In this embodiment, the spatiotemporal data of the object represented by the first node that appears in the second time interval is stored in the database, that is, the unique spatiotemporal data corresponding to the first node is stored in the database.

[0043] In one embodiment, the first tree index is generated as follows: spatiotemporal data stored in the database and the storage location of the spatiotemporal data are obtained; the obtained spatiotemporal data is determined as data to be processed; the data to be processed carries a corresponding timestamp and time interval; the preset time interval is divided into multiple sub-intervals; based on the timestamp carried by the data to be processed, a target sub-interval matching the data to be processed is determined among the multiple sub-intervals; based on the target sub-interval, the data to be processed, the time interval carried by the data to be processed, and the storage location of the data to be processed, a first node representing the time interval carried by the data to be processed and the storage location of the data to be processed in the database is added to the initial tree index to obtain the first tree index.

[0044] The acquired spatiotemporal data can be stored in one or more target data tables specified in the database. The storage location of the spatiotemporal data can include the identification information of each target data table, as well as the number of rows and columns of the spatiotemporal data in the target data table, etc. The time information of each spatiotemporal data can include the corresponding timestamp and time interval; therefore, the data to be processed carries the corresponding timestamp and time interval.

[0045] Divide the preset time interval into multiple sub-intervals. In one example, the preset time interval can be represented as [T]. start ,T end ], T start T is the start time of the preset time interval. end The end time of the preset time interval is set to [T]. start ,T end [T] is divided into multiple sub-intervals, resulting in: [T] start ,T1),[T1,T2),……,[T n-1 ,T end ].

[0046] Based on the timestamp carried by the data to be processed, a target sub-interval matching the data to be processed is determined from multiple sub-intervals. For example, if the timestamp of data to be processed 1 is t, the target sub-interval matching data to be processed 1 can be determined by the following formula: i=(tT start ) / interval (3) Where i is used to identify the target sub-interval. T start This is the start time of the preset time interval. The interval is the time length of each sub-interval.

[0047] Based on the target sub-interval, the data to be processed, the time interval carried by the data to be processed, and the storage location of the data to be processed, a first node representing the time interval carried by the data to be processed and the storage location of the data to be processed in the database is added to the initial tree index to obtain the first tree index. This can include: determining the insertion position of the first node corresponding to the data to be processed based on the target sub-interval and adding the first node to the initial tree index based on the insertion position; generating the node content of the first node based on the time interval carried by the data to be processed and the storage location of the data to be processed. In addition, during the process of adding the first node, strategies such as the quadratic splitting algorithm can be used to ensure the balance of the first tree index.

[0048] In this embodiment, by using timestamps to determine the target sub-partition among multiple sub-partitions of a preset time partition, the first node corresponding to each spatiotemporal data can be added to the index in the same orderly manner as possible, even when the time periods of each spatiotemporal data are of varying lengths, thereby improving the construction efficiency of the first tree index.

[0049] Step S106: Based on the first time interval, determine the first target node among the various first nodes; the second time interval represented by the first target node matches the first time interval. The number of first target nodes can be one or more. Each first target node corresponds to one spatiotemporal data point.

[0050] The second time interval represented by the first target node matches the first time interval, which can be either the first time interval including the second time interval. For example, the first time interval is [t1, t2], and the second time interval is [t3, t4], where t1 is earlier than or equal to t3, and t2 is later than or equal to t4. Alternatively, the second time interval represented by the first target node can match the first time interval, or the first and second time intervals can intersect. For example, the first time interval is [t1, t2], and the second time interval is [t3, t4], and the intersection between the first and second time intervals is non-empty.

[0051] In one embodiment, the first tree index further includes a second node, which represents a third time interval, and the third time interval represented by the second node includes the second time interval or the third time interval represented by each child node of the second node; determining a first target node in each first node according to the first time interval includes: traversing each node in the first tree index in a first order according to the first time interval to obtain the first target node; wherein, for the node being traversed in the first tree index, the following steps are performed: if the node being traversed in the first tree index has child nodes, then the node being traversed in the first tree index is determined as a second node; if the third time interval represented by the second node... If the second node does not intersect with the first time interval, then skip traversing all child nodes of the second node. If the third time interval represented by the second node intersects with the first time interval, then continue traversing all child nodes of the second node in the first order. If the node being traversed in the first tree index has no child nodes, then the node being traversed in the first tree index is determined as the first node. If the second time interval represented by the first node does not match the first time interval, then the first node is determined not to be the first target node. If the second time interval represented by the first node matches the first time interval, then the first node is determined as the first target node. Continue traversing the remaining nodes in the first order until the first tree index traversal is completed.

[0052] In this embodiment, each node in the first tree index can be either a first node or a second node. A second node can be a non-leaf node in the first tree index, that is, a node with child nodes. The child nodes of a second node can be other second nodes or first nodes.

[0053] The first node is used to represent the second time interval, which is determined by the spatiotemporal data corresponding to the first node; the second node is used to represent the third time interval, which includes the second or third time interval represented by each child node of the second node.

[0054] Figure 2 This is a schematic diagram illustrating the structure of a first tree-structured index according to an embodiment of the present disclosure, demonstrating one possible structure of the first tree-structured index. For example... Figure 2 As shown, the first tree index includes: node 202, node 204, node 206, node 208, node 210, node 212, and node 214. Among them, node 202, node 204, and node 210 are all second nodes, and node 206, node 208, node 212, and node 214 are all first nodes.

[0055] The node content of node 206 includes the second time interval 1, the node content of node 208 includes the second time interval 2, the node content of node 212 includes the second time interval 3, and the node content of node 214 includes the second time interval 4.

[0056] The child nodes of node 204 include node 206 and node 208. The node content of node 204 includes a third time interval 1, which includes a second time interval 1 and a second time interval 2.

[0057] The child nodes of node 210 include node 212 and node 214. The node content of node 210 includes a third time interval 2, which includes a second time interval 3 and a second time interval 4.

[0058] The child nodes of node 202 include node 204 and node 210. The node content of node 202 includes a third time interval 3, which includes a third time interval 1 and a third time interval 2.

[0059] In this embodiment, based on a first time interval, the nodes in the first tree index are traversed in a first order to obtain the first target node. The first order can be the node traversal order of the preorder traversal method, or it can be other custom-defined node traversal order.

[0060] For the node being traversed in the first tree index, if the node being traversed in the first tree index has child nodes, perform the following steps: (b1) The node being traversed in the first tree index is identified as the second node.

[0061] (b2) If the third time interval represented by the second node does not intersect with the first time interval, then it is determined to skip traversing each child node of the second node.

[0062] (b3) If the third time interval represented by the second node intersects with the first time interval, then continue to traverse the child nodes of the second node in the first order.

[0063] If the node being traversed in the first tree index has no child nodes, perform the following steps: (b4) Determine the node being traversed in the first tree index as the first node.

[0064] (b5) If the second time interval represented by the first node does not match the first time interval, then the first node is determined to be not the first target node; continue to traverse the remaining nodes in the first order.

[0065] (b6) If the second time interval represented by the first node matches the first time interval, then the first node is determined as the first target node; continue traversing the remaining nodes in the first order.

[0066] Perform the above steps until the first tree index traversal is complete.

[0067] Regarding (b2) above, if the third time interval represented by the second node does not intersect with the first time interval, it means that the third time interval / second time interval represented by each child node of the second node obviously does not intersect with the first time interval. Therefore, it can be determined that the traversal of each child node of the second node should be skipped. For example, if the third time interval 1 represented by node 204 does not intersect with the first time interval, then it is determined that the traversal of nodes 206 and 208 should be skipped.

[0068] Regarding (b3) above, if the third time interval represented by the second node intersects with the first time interval, it means that the third / second time interval represented by each child node of the second node may intersect with the first time interval. Therefore, the second time interval represented by the first node below the second node may match the first time interval. Thus, the child nodes of the second node are traversed in the first order. The first node below the second node refers to the first node that has a direct or indirect parent-child relationship with the second node. For example, if the third time interval 2 represented by node 210 intersects with the first time interval, then nodes 212 and 214 are traversed in the first order.

[0069] Regarding (b5) above, the mismatch between the second time interval represented by the first node and the first time interval could be due to either the first time interval not including the second time interval, or the first and second time intervals not intersecting. In the case where the second time interval represented by the first node does not match the first time interval, it can be determined that the first node is unrelated to the target spatiotemporal data to be queried, and the remaining nodes are traversed in the first order. For example, if the second time interval 2 represented by node 208 does not match the first time interval, it can be determined that node 208 is not the first target node, and the traversal continues with nodes 210, 212, and 214.

[0070] Regarding (b6) above, the second time interval represented by the first node matches the first time interval. This can mean that the first time interval includes the second time interval, or that the first time interval intersects with the second time interval. When the second time interval represented by the first node matches the first time interval, the first node can be identified as the first target node related to the target spatiotemporal data to be queried, and the remaining nodes can be traversed in the first order. For example, if the second time interval 2 represented by node 208 matches the first time interval, node 208 can be identified as the first target node, and nodes 210, 212, and 214 can be traversed.

[0071] In this embodiment, by traversing the first tree index, the second node and its child nodes that are obviously unrelated to the target spatiotemporal data can be quickly eliminated, thereby improving the data processing efficiency of determining the first target node among multiple first nodes.

[0072] In another embodiment, the first target node is determined from each first node according to the first time interval. Alternatively, the first tree index can be traversed according to the first time interval and a preset number to obtain a preset number of first target nodes. Specifically, traversal can stop when the preset number of first target nodes is obtained. For example, assuming that a total of 10,000 first target nodes can be obtained after traversing the first tree index, and the preset number is set to 100, traversal can stop when 100 first target nodes are obtained during the actual traversal of the first tree index. This helps to save time traversing the first tree index and improves the overall data query efficiency. When the user's demand for the amount of target spatiotemporal data is small, for example, if the target user only needs a few target spatiotemporal data, even if some of the 100 first target nodes mentioned above may not match the spatiotemporal data corresponding to the first spatial range, as long as a few nodes match the first spatial range, the queried target spatiotemporal data can be quickly provided to the user.

[0073] In step S108 above, first candidate data is obtained from the database based on the storage location represented by the first target node. The first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node. In this embodiment, the storage location represented by the first target node is, for example, the identifier of a data table, the number of rows and columns of the spatiotemporal data in the corresponding data table, etc. The first candidate data is a unique spatiotemporal data corresponding to the first target node.

[0074] In step S108 above, the target spatiotemporal data is determined based on the first spatial range and the first candidate data. If the first candidate data does not exist, it can be determined that the target spatiotemporal data does not exist. The number of first candidate data can also be one or more.

[0075] In one embodiment, determining target spatiotemporal data based on a first spatial range and first candidate data includes: obtaining a second tree index of a database; the second tree index includes multiple third nodes, each third node representing the storage location in the database of spatiotemporal data of a first cuboid and objects appearing in the first cuboid; determining a second target node in each of the third nodes based on the first spatial range; the first cuboid represented by the second target node matching the first spatial range; obtaining second candidate data in the database based on the storage location represented by the second target node; the second candidate data being the spatiotemporal data of objects appearing in the first cuboid represented by the second target node; and obtaining the target spatiotemporal data by finding the intersection of the first candidate data and the second candidate data.

[0076] In this embodiment, the second tree index can be a three-dimensional spatial index, such as a 3D-R-Tree index. The third node can be a leaf node in the second tree index, and each third node corresponds to a spatiotemporal data. The first cuboid represented by the third node can be the MBR of the spatial information in the spatiotemporal data corresponding to the third node. For example, the object corresponding to spatiotemporal data 1 is a building, which is simplified to a three-dimensional point data. The spatial information of spatiotemporal data 1 includes the position information of the three-dimensional point data. Then, the MBR of the spatial information in spatiotemporal data 1 is the three-dimensional point data itself, and the node content of the third node corresponding to spatiotemporal data 1 can include the position information of the three-dimensional point data. The object corresponding to spatiotemporal data 2 is a track, which is simplified to a three-dimensional line data. The spatial information of spatiotemporal data 2 includes its vertex set as... , Then, the MBR of the spatial information in spatiotemporal data 2 is the three-dimensional line data itself, and the node content of the third node corresponding to spatiotemporal data 2 can include the minimum coordinate value (x) of the MBR. min ,y min ,z min ) and maximum coordinate value (x) max ,y max ,z max The calculation methods for the minimum and maximum coordinate values ​​of the MBR can be found in the corresponding explanations above. The object corresponding to spatiotemporal data 3 is a vehicle, which can be considered a polyhedron. The spatial information of spatiotemporal data 3 includes its vertex set as follows: , Then, the MBR of the spatial information in spatiotemporal data 3 can be determined based on the position information of each vertex of the vehicle, and the node content of the third node corresponding to spatiotemporal data 3 can include the minimum coordinate value (x) of the MBR. min ,y min ,z min ) and maximum coordinate value (x) max ,y max ,z max ).

[0077] Due to the similarity in concept, the second tree index of the database is obtained; the second tree index includes multiple third nodes, which are used to represent the storage location of the spatiotemporal data of the first cuboid and the objects appearing in the first cuboid in the database, and can also refer to the corresponding description of the aforementioned step S104.

[0078] Since the concepts are similar, the second target node is determined in each of the third nodes according to the first spatial range; the first cuboid represented by the second target node matches the first spatial range, and the corresponding description of step S106 above can also be referred to.

[0079] Since the concepts are similar, the second candidate data is obtained from the database according to the storage location represented by the second target node; the second candidate data is the spatiotemporal data of the object appearing in the first cuboid represented by the second target node, and can also refer to the corresponding description of the aforementioned step S108.

[0080] The intersection of the first and second candidate data is used to obtain the target spatiotemporal data. For example, the first candidate data includes: spatiotemporal data 1, spatiotemporal data 2, and spatiotemporal data 3. The second candidate data includes: spatiotemporal data 1, spatiotemporal data 4, and spatiotemporal data 5. The intersection of the first and second candidate data is used to obtain spatiotemporal data 1, which is then taken as the target spatiotemporal data.

[0081] In this embodiment, using the first tree index for data querying is beneficial to improving the data query efficiency of the first candidate data, and using the second tree index for data querying is beneficial to improving the data query efficiency of the second candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0082] In one embodiment, the first spatial range includes the position information of the target cuboid; the second tree index further includes a fourth node, which represents the second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; determining the second target node in each third node according to the first spatial range includes: traversing each node in the second tree index according to the position information of the target cuboid in a second order to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: if the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the fourth node represents the first cuboid or the second cuboid represented by each child node of the target cuboid, then the second target node is determined as the second target node. If the second cuboid represented by the fourth node does not overlap with the target cuboid, then skip traversing all child nodes of the fourth node. If the second cuboid represented by the fourth node overlaps with the target cuboid, continue traversing all child nodes of the fourth node in the second order. If the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node. If the first cuboid represented by the third node is not a spatial subset of the target cuboid, then the third node is determined not to be the second target node. If the first cuboid represented by the third node is a spatial subset of the target cuboid, then the third node is determined as the second target node. Continue traversing the remaining nodes in the second order until the second tree index traversal is completed.

[0083] In this embodiment, each node in the second tree index can be either a third node or a fourth node. The fourth node can be a non-leaf node in the second tree index. The child nodes of the fourth node can be other fourth nodes or third nodes.

[0084] The third node is used to represent the first cuboid, which is determined by the spatiotemporal data corresponding to the third node; the fourth node is used to represent the second cuboid, which includes the first or second cuboid represented by each child node of the fourth node.

[0085] Figure 3 This is a schematic diagram illustrating the structure of a second tree index according to an embodiment of this disclosure, demonstrating one possible structure of the second tree index. For example... Figure 3 As shown, the second tree index includes: node 302, node 304, node 306, node 308, node 310, node 312, and node 314. Among them, nodes 302, 304, and 310 are all fourth nodes, and nodes 306, 308, 312, and 314 are all third nodes.

[0086] The node content of node 306 includes first cuboid 1, the node content of node 308 includes first cuboid 2, the node content of node 312 includes first cuboid 3, and the node content of node 314 includes first cuboid 4.

[0087] The child nodes of node 304 include node 306 and node 308. The node content of node 304 includes a second cuboid 1, which includes a first cuboid 1 and a first cuboid 2.

[0088] The child nodes of node 310 include node 312 and node 314. The node content of node 310 includes a second cuboid 2, which includes a first cuboid 3 and a first cuboid 4.

[0089] The child nodes of node 302 include node 304 and node 310. The node content of node 302 includes a second cuboid 3, which includes a second cuboid 1 and a second cuboid 2.

[0090] In this embodiment, based on the position information of the target cuboid, the nodes in the second tree index are traversed in a second order to obtain the second target node. The second order can be a node traversal order using a preorder traversal method, or it can be another custom-defined node traversal order. The second order can be the same as or different from the aforementioned first order.

[0091] For the node being traversed in the second tree index, if the node being traversed in the second tree index has child nodes, perform the following steps: (c1) Determine the node being traversed in the second tree index as the fourth node.

[0092] (c2) If the second cuboid represented by the fourth node does not overlap with the target cuboid, then it is determined to skip traversing each child node of the fourth node.

[0093] (c3) If the second cuboid represented by the fourth node overlaps with the target cuboid, then continue traversing each child node of the fourth node in the second order.

[0094] If the node being traversed in the second tree index has no child nodes, perform the following steps: (c4) Determine the node being traversed in the second tree index as the third node.

[0095] (c5) If the first cuboid represented by the third node is not a spatial subset of the target cuboid, then the third node is determined to be not the second target node, and the remaining nodes are traversed in the second order.

[0096] (c6) If the first cuboid represented by the third node is a spatial subset of the target cuboid, then the third node is determined as the second target node, and the remaining nodes are traversed in the second order.

[0097] Perform the above steps until the second tree index traversal is complete.

[0098] Regarding (c2) above, if the second cuboid represented by the fourth node does not overlap with the target cuboid, it means that the second / first cuboids represented by the child nodes of the fourth node obviously do not overlap with the target cuboid. Therefore, it can be determined that the traversal of the child nodes of the fourth node should be skipped. For example, if the second cuboid 1 represented by node 304 does not overlap with the target cuboid, then it is determined that the traversal of nodes 306 and 308 should be skipped.

[0099] Regarding (c3) above, if the second cuboid represented by the fourth node overlaps with the target cuboid, it indicates that the second / first cuboids represented by each child node of the fourth node may overlap with the target cuboid. Therefore, the first cuboid represented by the third node below the fourth node may match the first spatial range. Thus, the child nodes of the fourth node are traversed in the second order. The third node below the fourth node refers to a third node with a direct or indirect parent-child relationship to the fourth node. For example, if the second cuboid 2 represented by node 310 overlaps with the target cuboid, then nodes 312 and 314 are traversed in the second order.

[0100] Regarding (c5) above, if the first cuboid represented by the third node is not a spatial subset of the target cuboid, it can be determined that the third node is unrelated to the target spatiotemporal data to be queried, and the remaining nodes are traversed in the second order. For example, if the first cuboid 2 represented by node 308 is not a spatial subset of the target cuboid, it can be determined that node 308 is not the second target node, and nodes 310, 312, and 314 are traversed.

[0101] Regarding (c6) above, if the first cuboid represented by the third node is a spatial subset of the target cuboid, the third node can be identified as the second target node related to the target spatiotemporal data to be queried, and the remaining nodes can be traversed in the second order. For example, if the first cuboid 2 represented by node 308 is a spatial subset of the target cuboid, node 308 can be identified as the second target node, and nodes 310, 312, and 314 can be traversed.

[0102] In one example, the first spatial extent includes the positional information of the target cuboid, which can be represented by W as shown below: W = [(x wmin ,y wmin ,z wmin ), (x wmax ,y wmax ,z wmax )] . Among them, (x wmin ,y wmin ,z wmin (x) represents the minimum coordinates of the target cuboid. wmax ,y wmax ,z wmax ) represents the maximum coordinates of the target cuboid.

[0103] Starting from the root node of the second tree index, traverse the tree and determine whether the first cuboid represented by each third node / the second cuboid represented by each fourth node overlaps with the target cuboid represented by W above using the following formula: (4) (5) (6) If there are overlapping parts, continue traversing the subtree until all second target nodes that match the first spatial range are found.

[0104] In this embodiment, by traversing the second tree index to perform spatial range queries, the fourth node and its child nodes that are obviously irrelevant to the target spatiotemporal data can be quickly eliminated, thereby improving the data processing efficiency of determining the second target node among multiple third nodes.

[0105] In one embodiment, the first spatial range includes the location information of the query point and a distance threshold; the second tree index further includes a fourth node, which represents a second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; determining the second target node in each third node according to the first spatial range includes: traversing each node in the second tree index in a third order according to the location information of the query point and the distance threshold to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: if the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the second cuboid represented by the fourth node is consistent with the query point, then the second target node is determined as the second target node. If the minimum distance between points is greater than the distance threshold, then skip traversing the child nodes of the fourth node; if the minimum distance between the second cuboid represented by the fourth node and the query point is less than or equal to the distance threshold, then continue traversing the child nodes of the fourth node in the third order; if the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node; if the minimum distance between the first cuboid represented by the third node and the query point is greater than the distance threshold, then the third node is determined not to be the second target node; if the minimum distance between the first cuboid represented by the third node and the query point is less than or equal to the distance threshold, then the third node is determined as the second target node; continue traversing the remaining nodes in the third order until the second tree index traversal is completed.

[0106] In this embodiment, each node in the second tree index can be either a third node or a fourth node. The fourth node can be a non-leaf node in the second tree index. The child nodes of the fourth node can be other fourth nodes or third nodes.

[0107] The third node is used to represent the first cuboid, which is determined by the spatiotemporal data corresponding to the third node; the fourth node is used to represent the second cuboid, which includes the first or second cuboid represented by each child node of the fourth node.

[0108] In this embodiment, based on the location information and distance threshold of the query point, the nodes in the second tree index are traversed in a third order to obtain the second target node. The third order can be a preorder traversal or another custom-defined node traversal order. The third order can be the same as or different from the aforementioned first order. Similarly, the third order can be the same as or different from the aforementioned second order.

[0109] For the node being traversed in the second tree index, if the node being traversed in the second tree index has child nodes, perform the following steps: (d1) Determine the node being traversed in the second tree index as the fourth node.

[0110] (d2) If the minimum distance between the second cuboid represented by the fourth node and the query point is greater than the distance threshold, then it is determined to skip traversing each child node of the fourth node; (d3) If the minimum distance between the second cuboid represented by the fourth node and the query point is less than or equal to the distance threshold, then continue to traverse the child nodes of the fourth node in the third order; If the node being traversed in the second tree index has no child nodes, perform the following steps: (d4) Determine the node being traversed in the second tree index as the third node.

[0111] (d5) If the minimum distance between the first cuboid represented by the third node and the query point is greater than the distance threshold, then the third node is determined to be not the second target node, and the remaining nodes are traversed in the second order.

[0112] (d6) If the minimum distance between the first cuboid represented by the third node and the query point is less than or equal to the distance threshold, then the third node is determined as the second target node, and the remaining nodes are traversed in the second order.

[0113] Perform the above steps until the second tree index traversal is complete.

[0114] Regarding (d2) above, if the minimum distance between the second cuboid represented by the fourth node and the query point is greater than the distance threshold, it means that the minimum distance between the second cuboid / first cuboid represented by each child node of the fourth node and the query point is obviously greater than the distance threshold. Therefore, it can be determined to skip traversing each child node of the fourth node. For example, if the minimum distance between the second cuboid 1 represented by node 304 and the query point is greater than the distance threshold, then it is determined to skip traversing nodes 306 and 308.

[0115] Regarding (d3) above, if the minimum distance between the second cuboid represented by the fourth node and the query point is less than or equal to the distance threshold, it means that the minimum distance between the second cuboid / first cuboid represented by each child node of the fourth node and the query point may be less than or equal to the distance threshold. Therefore, the first cuboid represented by the third node below the fourth node may match the first spatial range. Thus, the child nodes of the fourth node are traversed in the third order. The third node below the fourth node refers to a third node that has a direct or indirect parent-child relationship with the fourth node. For example, if the minimum distance between the second cuboid 2 represented by node 310 and the query point is less than or equal to the distance threshold, then nodes 312 and 314 are traversed in the third order.

[0116] Regarding (d5) above, if the minimum distance between the first cuboid represented by the third node and the query point is greater than the distance threshold, it can be determined that the third node is unrelated to the target spatiotemporal data to be queried, and the remaining nodes are traversed in the third order. For example, if the minimum distance between the first cuboid 2 represented by node 308 and the query point is greater than the distance threshold, it can be determined that node 308 is not the second target node, and nodes 310, 312, and 314 are traversed.

[0117] Regarding (d6) above, if the minimum distance between the first cuboid represented by the third node and the query point is less than or equal to the distance threshold, the third node can be identified as the second target node related to the target spatiotemporal data to be queried, and the remaining nodes can be traversed in the third order. For example, if the minimum distance between the first cuboid 2 represented by node 308 and the query point is less than or equal to the distance threshold, node 308 can be identified as the second target node, and nodes 310, 312, and 314 can be traversed.

[0118] In one example, the first spatial extent includes the location information of the query point. and distance threshold The minimum distance between the query point and the first cuboid represented by each third node / the second cuboid represented by the fourth node is calculated using the following formula. : (7) In the above formula (7), the minimum coordinate value of the first cuboid / second cuboid is (x min ,y min ,z min The maximum coordinate value of the first cuboid / second cuboid is (x max ,y max ,z max ).

[0119] like If the node and its subtree are skipped, unnecessary calculations are reduced.

[0120] Alternatively, the following formula can be used for calculating distances in three-dimensional space: (8) in, and These are the coordinates of two three-dimensional points. The distance between the two points is denoted as .

[0121] In this embodiment, by traversing the second tree index to perform distance queries, the fourth node and its child nodes that are obviously irrelevant to the target spatiotemporal data can be quickly eliminated, thereby improving the data processing efficiency of determining the second target node among multiple third nodes.

[0122] In one embodiment, determining the target spatiotemporal data based on the first spatial range and the first candidate data includes: traversing the first candidate data according to the first spatial information to obtain a traversal result; if the traversal result indicates that there is first candidate data that matches the first spatial range, then the first candidate data that matches the first spatial range is determined as the target spatiotemporal data; if the traversal result indicates that there is no first candidate data that matches the first spatial range, then a preset null value is determined as the target spatiotemporal data.

[0123] Based on the first spatial information, the first candidate data is traversed to obtain the traversal results. For example, the first candidate data includes: spatiotemporal data 1, spatiotemporal data 2, and spatiotemporal data 3. When traversing spatiotemporal data 1, it is determined whether the spatial information of spatiotemporal data 1 matches the first spatial range, resulting in matching result 1; when traversing spatiotemporal data 2, it is determined whether the spatial information of spatiotemporal data 2 matches the first spatial range, resulting in matching result 2; when traversing spatiotemporal data 3, it is determined whether the spatial information of spatiotemporal data 3 matches the first spatial range, resulting in matching result 3. Matching result 1, matching result 2, and matching result 3 are used as the traversal results.

[0124] If the traversal results indicate the existence of a first candidate data that matches the first spatial range, then the first candidate data that matches the first spatial range is determined as the target spatiotemporal data. For example, matching result 1 indicates that the spatial information of spatiotemporal data 1 matches the first spatial range, and spatiotemporal data 1 is determined as a target spatiotemporal data.

[0125] If the traversal results indicate that no first candidate data matching the first spatial range exists, then the preset null value is determined as the target spatiotemporal data. For example, if matching result 1 indicates that the spatial information of spatiotemporal data 1 does not match the first spatial range, matching result 2 indicates that the spatial information of spatiotemporal data 2 does not match the first spatial range, and matching result 3 indicates that the spatial information of spatiotemporal data 3 does not match the first spatial range, then it is determined that the target spatiotemporal data does not exist, and the preset null value can be determined as the target spatiotemporal data.

[0126] In this embodiment, spatiotemporal data query can also be quickly achieved by directly traversing the first candidate data when the number of first candidate data is relatively small.

[0127] In another embodiment, the spatiotemporal data processing method may further include: obtaining data query conditions carrying a first time interval; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belonging to the first time interval; determining a first target node in each first node of a first tree index according to the first time interval; the second time interval represented by the first target node matching the first time interval; and obtaining the target spatiotemporal data from the database according to the storage location represented by the first target node. Due to the similar concept, the specific details can be found in the corresponding description above.

[0128] In another embodiment, the spatiotemporal data processing method may further include: obtaining data query conditions carrying a first spatial range; the first subspace range of the target spatiotemporal data queried by the data query conditions belongs to the first spatial range; determining a second target node in each third node of the second tree index according to the first spatial range; the first cuboid represented by the second target node matching the first spatial range; and obtaining the target spatiotemporal data from the database according to the storage location represented by the second target node. Due to the similar concept, the specific details can be found in the corresponding description above.

[0129] In another embodiment, the spatiotemporal data includes an object identifier; the spatiotemporal data processing method may further include: querying the spatiotemporal data of the corresponding object based on the object identifier; and sorting the queried spatiotemporal data in chronological order to generate spatiotemporal trajectory information of the object.

[0130] In one example, spatial geometry information is queried in the temporal table based on object ID and temporal order. Assume the object ID is... This can be achieved using the query statement shown below: SELECT geometry FROM temporal_table WHERE object_id = ORDER BY start_time Obtain the spatiotemporal data of the object, and then connect the query results in chronological order to form a trajectory.

[0131] In the query statement above, SELECT specifies the column (field) to be extracted from the database table, i.e., the field "geometry"; FROM specifies the table (or view, subquery, or other data source) where the query data is located, i.e., "temporal_table"; and WHERE sets the filter conditions for the query, i.e., "object_id = The ORDER BY clause is used to sort query results according to a specified column, namely, by the start time "start_time".

[0132] In summary, through the embodiments of this disclosure, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Furthermore, the first tree-structured index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. Therefore, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, the use of the first tree-structured index for data querying in this embodiment is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0133] Based on the same technical concept, this disclosure also provides another spatiotemporal data processing method. Figure 4 This is a flowchart illustrating another spatiotemporal data processing method provided in an embodiment of the present disclosure.

[0134] Step S402, data structure expansion.

[0135] For three-dimensional spatial data, perform the following steps: S404-408, and step S416: Step S404: Construct a three-dimensional spatial data structure.

[0136] Step S406: Construct a three-dimensional spatial tree index.

[0137] Step S408: Execute the three-dimensional spatial query algorithm.

[0138] Step S416: Return the data query results.

[0139] For spatiotemporal data, perform the following steps S410-S416: Step S410: Construct the spatiotemporal data structure.

[0140] Step S412: Construct a spatiotemporal tree index.

[0141] Step S414: Execute the spatiotemporal query algorithm.

[0142] Step S416: Return the data query results.

[0143] Since the technical concept is the same, the description in this embodiment is relatively simple. For the relevant parts, please refer to the corresponding descriptions of the method embodiments provided above.

[0144] Figure 5This is a schematic diagram of the structure of a spatiotemporal data processing device provided in an embodiment of the present disclosure, as shown below. Figure 5 As shown, the device includes: The condition acquisition unit 502 is used to acquire data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; The index acquisition unit 504 is used to acquire a first tree index of the database; the first tree index includes a plurality of first nodes, and the first nodes are used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; The node determination unit 506 is used to determine a first target node among each of the first nodes according to the first time interval; the second time interval represented by the first target node matches the first time interval. The data determination unit 508 is used to obtain first candidate data from the database according to the storage location represented by the first target node, and determine the target spatiotemporal data according to the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of the object appearing in the second time interval represented by the first target node.

[0145] Optionally, the first tree index further includes a second node, which represents a third time interval, and the third time interval represented by the second node includes the second time interval represented by each child node of the second node or the third time interval; when the node determining unit 506 determines the first target node among the first nodes according to the first time interval, it performs the following steps: Based on the first time interval, the nodes in the first tree index are traversed in a first order to obtain the first target node; wherein, for the node being traversed in the first tree index, the following steps are performed: If the node being traversed in the first tree index has child nodes, then the node being traversed in the first tree index is determined as the second node; if the third time interval represented by the second node does not intersect with the first time interval, then it is determined to skip traversing each child node of the second node; if the third time interval represented by the second node intersects with the first time interval, then traversing each child node of the second node continues in the first order. If the node being traversed in the first tree index has no child nodes, then the node being traversed in the first tree index is determined to be the first node; if the second time interval represented by the first node does not match the first time interval, then the first node is determined not to be the first target node; if the second time interval represented by the first node matches the first time interval, then the first node is determined to be the first target node; continue traversing the remaining nodes in the first order until the first tree index traversal is completed.

[0146] Optionally, when determining the target spatiotemporal data based on the first spatial range and the first candidate data, the data determining unit 508 performs the following steps: Obtain the second tree index of the database; the second tree index includes a plurality of third nodes, the third nodes being used to represent the storage location of the spatiotemporal data of the first cuboid and the objects appearing in the first cuboid in the database; Based on the first spatial range, a second target node is determined among each of the third nodes; the first cuboid represented by the second target node matches the first spatial range; Based on the storage location represented by the second target node, second candidate data is obtained from the database; the second candidate data is the spatiotemporal data of the object appearing in the first cuboid represented by the second target node. The intersection of the first candidate data and the second candidate data is used to obtain the target spatiotemporal data.

[0147] Optionally, the first spatial range includes the position information of the target cuboid; the second tree index further includes a fourth node, the fourth node being used to represent a second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; when the data determining unit 508 determines the second target node in each of the third nodes according to the first spatial range, it performs the following steps: Based on the position information of the target cuboid, the nodes in the second tree index are traversed in a second order to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: If the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the second cuboid represented by the fourth node does not overlap with the target cuboid, then it is determined to skip traversing each child node of the fourth node; if the second cuboid represented by the fourth node overlaps with the target cuboid, then the child nodes of the fourth node are traversed in the second order. If the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node; if the first cuboid represented by the third node is not a spatial subset of the target cuboid, then the third node is determined not to be the second target node; if the first cuboid represented by the third node is a spatial subset of the target cuboid, then the third node is determined as the second target node; continue traversing the remaining nodes in the second order until the second tree index traversal is completed.

[0148] Optionally, the first spatial range includes the location information and distance threshold of the query point; the second tree index further includes a fourth node, the fourth node being used to represent a second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; when the data determining unit 508 determines the second target node in each of the third nodes according to the first spatial range, it performs the following steps: Based on the location information of the query point and the distance threshold, the nodes in the second tree index are traversed in a third order to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: If the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the minimum distance between the second cuboid represented by the fourth node and the query point is greater than the distance threshold, then it is determined to skip traversing each child node of the fourth node; if the minimum distance between the second cuboid represented by the fourth node and the query point is less than or equal to the distance threshold, then the child nodes of the fourth node are traversed in the third order. If the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node; if the minimum distance between the first cuboid represented by the third node and the query point is greater than the distance threshold, then the third node is determined not to be the second target node; if the minimum distance between the first cuboid represented by the third node and the query point is less than or equal to the distance threshold, then the third node is determined as the second target node; continue traversing the remaining nodes according to the third order until the second tree index traversal is completed.

[0149] Optionally, when determining the target spatiotemporal data based on the first spatial range and the first candidate data, the data determining unit 508 performs the following steps: Based on the first spatial information, traverse the first candidate data to obtain the traversal result; If the traversal result indicates the existence of a first candidate data that matches the first spatial range, then the first candidate data that matches the first spatial range is determined as the target spatiotemporal data; If the traversal result indicates that there is no first candidate data that matches the first spatial range, then the preset null value is determined as the target spatiotemporal data.

[0150] Optionally, the first tree index is generated in the following manner: The spatiotemporal data stored in the database and its storage location are obtained, and the obtained spatiotemporal data is determined as the data to be processed; the data to be processed carries a corresponding timestamp and time interval. Divide the preset time interval into multiple sub-intervals; Based on the timestamp carried by the data to be processed, a target sub-interval that matches the data to be processed is determined from the plurality of sub-intervals; Based on the target sub-interval, the data to be processed, the time interval carried by the data to be processed, and the storage location of the data to be processed, a first node representing the time interval carried by the data to be processed and the storage location of the data to be processed in the database is added to the initial tree index to obtain the first tree index.

[0151] In this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0152] The spatiotemporal data processing apparatus provided in one embodiment of this disclosure can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.

[0153] Furthermore, one embodiment of this disclosure also provides an electronic device, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 6 As shown, the device includes a memory 601, a processor 602, a bus 603, and a communication interface 604. The memory 601, the processor 602, and the communication interface 604 communicate via the bus 603. The communication interface 604 may include input / output interfaces, including but not limited to a keyboard, mouse, monitor, microphone, and loudspeaker.

[0154] Figure 6 In the memory 601, computer-executable instructions that can run on the processor 602 are stored. When the processor 602 executes the computer-executable instructions, the following process is implemented: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; Obtain the first tree index of the database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; Based on the first time interval, a first target node is determined among each of the first nodes; the second time interval represented by the first target node matches the first time interval. Based on the storage location represented by the first target node, first candidate data is obtained from the database, and the target spatiotemporal data is determined based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0155] In this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0156] An electronic device provided in one embodiment of this disclosure can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.

[0157] Another embodiment of this disclosure also provides a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; Obtain the first tree index of the database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; Based on the first time interval, a first target node is determined among each of the first nodes; the second time interval represented by the first target node matches the first time interval. Based on the storage location represented by the first target node, first candidate data is obtained from the database, and the target spatiotemporal data is determined based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0158] In this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0159] The computer-readable storage medium includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.

[0160] The computer-readable storage medium provided in one embodiment of this disclosure can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.

[0161] Another embodiment of this disclosure also provides a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the following process: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; Obtain the first tree index of the database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; Based on the first time interval, a first target node is determined among each of the first nodes; the second time interval represented by the first target node matches the first time interval. Based on the storage location represented by the first target node, first candidate data is obtained from the database, and the target spatiotemporal data is determined based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

[0162] In this embodiment, the first time interval carried by the data query condition can be used to constrain the time occupied when the object corresponding to the target spatiotemporal data queried by the data query condition appears, and the first spatial range carried by the data query condition can be used to constrain the space occupied when the object corresponding to the target spatiotemporal data appears. Therefore, the first tree index can be used to quickly find the first candidate data matching the first time interval in the database, and the first spatial range and the first candidate data can be used to determine the target spatiotemporal data that simultaneously matches both the first time interval and the first spatial range. In summary, compared with the technical solution of traversing all spatiotemporal data in the database and matching the spatiotemporal data with the data query condition, this embodiment uses the first tree index for data querying, which is beneficial to improving the data query efficiency of the first candidate data, thereby improving the data query efficiency of spatiotemporal data.

[0163] The computer program product in this embodiment can implement the various processes of the above-described spatiotemporal data processing method embodiments and achieve the same effects and functions, which will not be repeated here.

[0164] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0165] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0166] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0167] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0168] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0169] Memory may include non-persistent storage in computer-readable storage media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable storage media.

[0170] Computer-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0171] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0173] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A spatiotemporal data processing method, characterized in that, include: Obtain data query conditions for querying spatiotemporal data; the data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-space range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-space range of the target spatiotemporal data belongs to the first spatial range; Obtain the first tree index of the database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of the second time interval and the objects appearing in the second time interval in the database; Based on the first time interval, a first target node is determined among each of the first nodes; the second time interval represented by the first target node matches the first time interval. Based on the storage location represented by the first target node, first candidate data is obtained from the database, and the target spatiotemporal data is determined based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

2. The method according to claim 1, characterized in that, The first tree index further includes a second node, which represents a third time interval, and the third time interval represented by the second node includes either the second time interval represented by each child node of the second node or the third time interval; the step of determining the first target node in each of the first nodes according to the first time interval includes: Based on the first time interval, the nodes in the first tree index are traversed in a first order to obtain the first target node; wherein, for the node being traversed in the first tree index, the following steps are performed: If the node being traversed in the first tree index has child nodes, then the node being traversed in the first tree index is determined as the second node; if the third time interval represented by the second node does not intersect with the first time interval, then it is determined to skip traversing each child node of the second node; if the third time interval represented by the second node intersects with the first time interval, then traversing each child node of the second node continues in the first order. If the node being traversed in the first tree index has no child nodes, then the node being traversed in the first tree index is determined to be the first node; if the second time interval represented by the first node does not match the first time interval, then the first node is determined not to be the first target node; if the second time interval represented by the first node matches the first time interval, then the first node is determined to be the first target node; continue traversing the remaining nodes in the first order until the first tree index traversal is completed.

3. The method according to claim 1, characterized in that, The step of determining the target spatiotemporal data based on the first spatial range and the first candidate data includes: Obtain the second tree index of the database; the second tree index includes a plurality of third nodes, the third nodes being used to represent the storage location of the spatiotemporal data of the first cuboid and the objects appearing in the first cuboid in the database; Based on the first spatial range, a second target node is determined among each of the third nodes; the first cuboid represented by the second target node matches the first spatial range; Based on the storage location represented by the second target node, second candidate data is obtained from the database; the second candidate data is the spatiotemporal data of the object appearing in the first cuboid represented by the second target node. The intersection of the first candidate data and the second candidate data is used to obtain the target spatiotemporal data.

4. The method according to claim 3, characterized in that, The first spatial range includes the location information of the target cuboid; the second tree index also includes a fourth node, which is used to represent a second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; The step of determining the second target node among the third nodes according to the first spatial range includes: Based on the position information of the target cuboid, the nodes in the second tree index are traversed in a second order to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: If the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the second cuboid represented by the fourth node does not overlap with the target cuboid, then it is determined to skip traversing each child node of the fourth node; if the second cuboid represented by the fourth node overlaps with the target cuboid, then the child nodes of the fourth node are traversed in the second order. If the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node; if the first cuboid represented by the third node is not a spatial subset of the target cuboid, then the third node is determined not to be the second target node; if the first cuboid represented by the third node is a spatial subset of the target cuboid, then the third node is determined as the second target node; continue traversing the remaining nodes in the second order until the second tree index traversal is completed.

5. The method according to claim 3, characterized in that, The first spatial range includes the location information and distance threshold of the query point; the second tree index also includes a fourth node, which is used to represent a second cuboid, and the second cuboid represented by the fourth node includes the first cuboid or the second cuboid represented by each child node of the fourth node; The step of determining the second target node among the third nodes according to the first spatial range includes: Based on the location information of the query point and the distance threshold, the nodes in the second tree index are traversed in a third order to obtain the second target node; wherein, for the node being traversed in the second tree index, the following steps are performed: If the node being traversed in the second tree index has child nodes, then the node being traversed in the second tree index is determined as the fourth node; if the minimum distance between the second cuboid represented by the fourth node and the query point is greater than the distance threshold, then it is determined to skip traversing each child node of the fourth node; if the minimum distance between the second cuboid represented by the fourth node and the query point is less than or equal to the distance threshold, then the child nodes of the fourth node are traversed in the third order. If the node being traversed in the second tree index has no child nodes, then the node being traversed in the second tree index is determined as the third node; if the minimum distance between the first cuboid represented by the third node and the query point is greater than the distance threshold, then the third node is determined not to be the second target node; if the minimum distance between the first cuboid represented by the third node and the query point is less than or equal to the distance threshold, then the third node is determined as the second target node; continue traversing the remaining nodes according to the third order until the second tree index traversal is completed.

6. The method according to claim 1, characterized in that, The step of determining the target spatiotemporal data based on the first spatial range and the first candidate data includes: Based on the first spatial information, traverse the first candidate data to obtain the traversal result; If the traversal result indicates the existence of a first candidate data that matches the first spatial range, then the first candidate data that matches the first spatial range is determined as the target spatiotemporal data; If the traversal result indicates that there is no first candidate data that matches the first spatial range, then the preset null value is determined as the target spatiotemporal data.

7. The method according to claim 1, characterized in that, The first tree index is generated as follows: The spatiotemporal data stored in the database and its storage location are obtained, and the obtained spatiotemporal data is determined as the data to be processed; the data to be processed carries a corresponding timestamp and time interval. Divide the preset time interval into multiple sub-intervals; Based on the timestamp carried by the data to be processed, a target sub-interval that matches the data to be processed is determined from the plurality of sub-intervals; Based on the target sub-interval, the data to be processed, the time interval carried by the data to be processed, and the storage location of the data to be processed, a first node representing the time interval carried by the data to be processed and the storage location of the data to be processed in the database is added to the initial tree index to obtain the first tree index.

8. A spatiotemporal data processing device, characterized in that, include: The condition acquisition unit is used to acquire data query conditions for querying spatiotemporal data. The data query conditions carry a first time interval and a first spatial range; each spatiotemporal data corresponds to an object, and the spatiotemporal data represents the first sub-time interval and the first sub-spatial range occupied when the corresponding object appears; the first sub-time interval of the target spatiotemporal data queried by the data query conditions belongs to the first time interval, and the first sub-spatial range of the target spatiotemporal data belongs to the first spatial range; An index acquisition unit is used to acquire a first tree index of a database; the first tree index includes a plurality of first nodes, the first nodes being used to represent the storage location of the spatiotemporal data of a second time interval and objects appearing in the second time interval in the database; A node determination unit is configured to determine a first target node among each of the first nodes based on the first time interval; the second time interval represented by the first target node matches the first time interval. The data determination unit is configured to obtain first candidate data from the database based on the storage location represented by the first target node, and determine the target spatiotemporal data based on the first spatial range and the first candidate data; the first candidate data is the spatiotemporal data of objects appearing within the second time interval represented by the first target node.

9. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-executable instructions that, when executed on the processor, enable the implementation of the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, enable the implementation of the method described in any one of claims 1-7.

11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.