Spatial-temporal index construction method, track point query method, device, equipment and product

By constructing B-class tree index and R-class tree index, the problem of low efficiency of vehicle trajectory point query in the Internet of Vehicles environment is solved, and efficient query in time and space dimensions is achieved.

CN120492702APending Publication Date: 2025-08-15ZHEJIANG INTELLIGENT TRANSPORTATION TECHNOLOGY INNOVATION CENTER +2
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510567877.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the environment of Internet of Vehicles, the query efficiency of vehicle trajectory points is low, especially in the massive high-frequency data in developed traffic areas, the query efficiency of traditional table structures is insufficient.

Method used

The B-class tree index and R-class tree index are constructed. The B-class tree index is based on timestamps and track point identification, and the R-class tree index is based on geographical location and track point identification, and query optimization is performed in the time and space dimensions respectively.

Benefits of technology

The query efficiency of vehicle trajectory points is improved, especially the query performance in the time dimension, spatial dimension and space-time combination dimension.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492702A_ABST
    Figure CN120492702A_ABST
Patent Text Reader

Abstract

The invention provides a spatio-temporal index construction method, a track point query method, devices, equipment and a product, and the spatio-temporal index construction method comprises the steps: obtaining vehicle track point data, the vehicle track point data comprises the following attribute information of a vehicle track point: a track point identifier, a timestamp and a geographic position; according to the timestamps and the track point identifiers, a B-group tree index is constructed, index key information of leaf nodes in the B-group tree index comprises the timestamps and the track point identifiers, and the B-group tree index is a time index of the vehicle track points; and according to the geographic position and the track point identifier, an R-family tree index is constructed, the space entry information of the leaf node in the R-family tree index comprises the geographic position and the track point identifier, and the R-family tree index is the space index of the vehicle track point. According to the method and the device, the efficiency of querying the track points in the time dimension and / or the space dimension can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a spatiotemporal index construction method, a trajectory point query method, a trajectory point query method, a device, a device, and a product. Background Art

[0002] In the Internet of Vehicles environment, vehicles send their own positioning information at a certain frequency, and the vehicle's positioning information forms the vehicle's driving trajectory data.

[0003] In areas with developed transportation, vehicle trajectory data can reach millions of points, generating massive amounts of high-frequency data in the connected vehicle environment. In this scenario, querying vehicle trajectory points using traditional table structures is inefficient.

[0004] How to improve the query efficiency of vehicle trajectory points is an urgent problem that needs to be solved. Summary of the Invention

[0005] Based on the above technical status, the present application provides a spatiotemporal index construction method, trajectory point query method, device, equipment and product, which can improve the query efficiency of vehicle trajectory points.

[0006] In order to achieve the above technical objectives, this application specifically proposes the following technical solutions:

[0007] According to a first aspect of an embodiment of the present application, a method for constructing a spatiotemporal index is provided, comprising: acquiring vehicle trajectory point data, the vehicle trajectory point data including the following attribute information of the vehicle trajectory point: a trajectory point identifier, a timestamp, and a geographic location; constructing a B-family tree index based on the timestamp and the trajectory point identifier, the index key information of a leaf node in the B-family tree index including the timestamp and the trajectory point identifier, the B-family tree index being a time index of the vehicle trajectory point; constructing an R-family tree index based on the geographic location and the trajectory point identifier, the spatial entry information of a leaf node in the R-family tree index including the geographic location and the trajectory point identifier, the R-family tree index being a spatial index of the vehicle trajectory point.

[0008] In some implementations, after constructing the B-family tree index based on the timestamp and the trajectory point identifier, the method further includes: storing the B-family tree index as a B-family tree structure table and a B-family tree key table, wherein the B-family tree structure table describes the structural information of the nodes in the B-family tree index, and the B-family tree key table describes the index key information of the nodes in the B-family tree index.

[0009] In some implementations, the B-family tree structure table includes structural information of the first node: identification information of the first node, identification information of the parent node of the first node, a leaf node identifier indicating whether the first node is a leaf node, and a level identifier of the level at which the first node is located in the B-family tree, and the first node is any node in the B-family tree index; the B-family tree key table includes index key information of the first index key: identification information of the first index key, identification information of the first node, position information of the first index key in the first node, time information of the first index key, and pointer information of the first index key, and the first index key is any index key in the first node; in the case where the first node is a leaf node, the time information includes the timestamp, and the pointer information includes the track point identifier; in the case where the first node is a non-leaf node, the time information includes the boundary time point associated with the first index key, and the pointer information includes the identification information of the child node pointed to by the first index key.

[0010] In some implementations, after constructing the R-family tree index based on the geographic location and the trajectory point identifier, it also includes: storing the R-family tree index as an R-family tree structure table and an R-family tree key table, the R-family tree structure table describes the structural information of the nodes in the R-family tree index, and the R-family tree key table describes the spatial entry information of the nodes in the R-family tree index.

[0011] In some implementations, the R-family tree structure table includes structural information of the second node: identification information of the second node, identification information of the parent node of the second node, a leaf node identifier indicating whether the second node is a leaf node, and a level identifier of the level at which the second node is located in the R-family tree, and the second node is any node in the R-family tree index; the R-family tree key table includes spatial entry information of the first entry: identification information of the first entry, identification information of the second node, position information of the first entry in the second node, spatial information of the first entry, and pointer information of the first entry, and the first entry is any entry in the second node; in the case where the second node is a leaf node, the spatial information includes the geographic location, and the pointer information includes the track point identifier; in the case where the second node is a non-leaf node, the spatial information of the first entry is the location range information of the spatial area associated with the first entry, and the pointer information includes the identification information of the child node pointed to by the first entry.

[0012] In some implementations, the spatial area associated with the first entry is the minimum bounding rectangle of the spatial area associated with the second entry, and the second entry is all entries in the child node pointed to by the first entry; the location range information includes the latitude and longitude coordinate range of the minimum bounding rectangle.

[0013] In some implementations, the construction process of the B-tree index includes: performing a node processing operation of the B-tree index based on the timestamp to obtain a leaf node in the B-tree index suitable for inserting the timestamp, the node processing operation including a node traversal operation starting from the root node of the B-tree index; and constructing index key information containing the timestamp and the trajectory point identifier in the leaf node suitable for inserting the timestamp.

[0014] In some implementations, the construction process of the R-family tree index includes: performing a node processing operation of the R-family tree index based on the geographic location to obtain a leaf node in the R-family tree index suitable for inserting the geographic location, the node processing operation including a node traversal operation starting from the root node of the R-family tree index; constructing spatial entry information containing the geographic location and the trajectory point identifier in the leaf node suitable for inserting the geographic location; updating the spatial entry information of the nodes on the target path, the target path being the node path of the leaf node suitable for inserting the geographic location.

[0015] In some implementations, a traversal process of the R-family tree index includes: during the node traversal process, determining the area growth value corresponding to the entry in the current traversal node based on the geographic location, the area growth value refers to: if the geographic location is inserted into the child node pointed to by the entry in the current traversal node, then the area value of the spatial area associated with the entry in the current traversal node that needs to be expanded; based on the area growth value, in accordance with the area growth minimization goal, determining the next traversal node among the child nodes of the current traversal node.

[0016] In some implementations, the node processing operation also includes a node splitting operation, which includes: in the R family tree index, determining the spatial entry information of the third entry and the spatial entry information of the fourth entry in the node that needs to be split, and the third entry and the fourth entry in the node that needs to be split are the entries with the farthest relative distance; creating two new nodes, and assigning the spatial entry information of the third entry and the spatial entry information of the fourth entry to the two new nodes respectively; according to the area growth minimization goal, assigning the remaining entries in the node that needs to be split except the third entry and the fourth entry to the two new nodes; updating the node that needs to be split to the two new nodes.

[0017] According to a second aspect of an embodiment of the present application, a trajectory point query method is provided, including: obtaining a trajectory query request, the trajectory query request indicating a search condition for a trajectory point, the search condition including a time condition and / or a space condition; performing a trajectory point identification query in a B-family tree index according to the time condition, and obtaining an identification query result corresponding to the B-family tree index, and / or, performing a trajectory point identification query in an R-family tree index according to the space condition, and obtaining an identification query result corresponding to the R-family tree index, wherein the B-family tree index and the R-family tree index are obtained according to the spatiotemporal index construction method described in the first aspect or any implementation manner of the first aspect; obtaining a trajectory point query result from vehicle trajectory point data according to the identification query result corresponding to the B-family tree index and / or the identification query result corresponding to the R-family tree index.

[0018] According to a third aspect of an embodiment of the present application, a spatiotemporal index construction device is provided, comprising: an acquisition unit for acquiring vehicle trajectory point data, the vehicle trajectory point data including the following attribute information of the vehicle trajectory point: a trajectory point identifier, a timestamp, and a geographic location; a time index construction unit for constructing a B-family tree index based on the timestamp and the trajectory point identifier, the index key information of a leaf node in the B-family tree index including the timestamp and the trajectory point identifier, the B-family tree index being a time index of the vehicle trajectory point; and a spatial index construction unit for constructing an R-family tree index based on the geographic location and the trajectory point identifier, the spatial entry information of a leaf node in the R-family tree index including the geographic location and the trajectory point identifier, the R-family tree index being a spatial index of the vehicle trajectory point.

[0019] According to a fourth aspect of an embodiment of the present application, a trajectory point query device is provided, including: an acquisition unit, configured to acquire a trajectory query request, wherein the trajectory query request indicates a search condition for a trajectory point, wherein the search condition includes a time condition and / or a space condition; an identification query unit, configured to perform a trajectory point identification query in a B-family tree index according to the time condition, and obtain an identification query result corresponding to the B-family tree index, and / or, perform a trajectory point identification query in an R-family tree index according to the space condition, and obtain an identification query result corresponding to the R-family tree index, wherein the B-family tree index and the R-family tree index are obtained according to the spatiotemporal index construction method described in the first aspect or any implementation manner of the first aspect; and a trajectory point query unit, configured to obtain a trajectory point query result from vehicle trajectory point data according to the identification query result corresponding to the B-family tree index and / or the identification query result corresponding to the R-family tree index.

[0020] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory and a processor; the memory is connected to the processor and is used to store a program; the processor is used to implement the spatiotemporal index construction method as described in the first aspect or any implementation manner of the first aspect, or implement the trajectory point query method as described in the second aspect, by running the program in the memory.

[0021] According to a sixth aspect of an embodiment of the present application, a computer program product is provided. When the computer program is executed by a processor, it implements the spatiotemporal index construction method as described in the first aspect or any implementation manner of the first aspect, or implements the trajectory point query method as described in the second aspect.

[0022] According to a seventh aspect of an embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the spatiotemporal index construction method as described in the first aspect or any implementation of the first aspect is implemented, or the trajectory point query method as described in the second aspect is implemented.

[0023] The embodiments of the present application provide a spatiotemporal index construction method, trajectory point query method, device, equipment, and product. In the time dimension, a B-family tree index is constructed for vehicle trajectory point queries. The index key information of the leaf nodes in the B-family tree index includes a timestamp and a trajectory point identifier, so that the trajectory point identifiers with timestamps within the corresponding time range can be queried through layer-by-layer searches in the B-family tree index. In the spatial dimension, an R-family tree index is constructed for vehicle trajectory point queries. The spatial entry information of the leaf nodes in the R-family tree index includes the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point, so that the trajectory point identifiers with geographic locations within the corresponding spatial range can be queried through layer-by-layer searches in the R-family tree index. Through the B-family tree index and the R-family tree index, trajectory point queries in the time dimension and the spatial dimension are realized, thereby improving the query efficiency of vehicle trajectory points. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0025] Figure 1 A flowchart of a method for constructing a spatiotemporal index provided in an embodiment of the present application;

[0026] Figure 2 Design diagram for the table structure of trajectory point data;

[0027] Figure 3 A flowchart of a trajectory point query method provided in an embodiment of the present application;

[0028] Figure 4 Example diagram of the process of building a spatiotemporal index for trajectory points and querying trajectory points;

[0029] Figure 5 This is an example diagram of the structure of a B-tree index;

[0030] Figure 6 This is a structural instance diagram of the R family tree index;

[0031] Figure 7 A structure diagram for storing spatiotemporal dual indexes of trajectory points based on the road network;

[0032] Figure 8 This is a schematic diagram of the structure of a spatiotemporal index construction device provided in an embodiment of the present application;

[0033] Figure 9 Schematic diagram of a track point query device provided by an embodiment of the present application;

[0034] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The technical solutions proposed in the embodiments of this application are applicable to vehicle driving scenarios and aim to significantly improve the query efficiency of vehicle trajectory points by improving the spatiotemporal index construction method. Using the technical solutions described in the embodiments of this application, it is possible to construct B-tree indexes and R-tree indexes for vehicle trajectory point queries, respectively. Based on the B-tree indexes and / or R-tree indexes, the query efficiency of vehicle trajectory points in the time dimension, space dimension, and / or combined spatiotemporal dimension can be improved.

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] In a vehicle network environment, the massive and frequently generated volume of vehicle trajectory data places significant pressure on querying vehicle trajectory points. Traditional storage structures fail to consider the spatiotemporal continuity of trajectory data when storing it, making them inefficient in querying vehicle trajectory points. This is particularly true for queries in the temporal, spatial, and combined spatiotemporal dimensions.

[0038] In view of this, embodiments of the present application are dedicated to providing a spatiotemporal index construction method, trajectory point query method, apparatus, device, and product, which utilize a B-family tree index as the temporal index for vehicle trajectory point queries and an R-family tree index as the spatial index for vehicle trajectory point queries. Compared to traditional storage structures, the B-family tree index organizes time segments into a tree structure, while the R-family tree index organizes spatial partitions into an attribute structure. These structures not only take into account the spatiotemporal continuity characteristics of trajectory data but also implement trajectory point queries by traversing tree nodes, eliminating the need for frequent access to the underlying vehicle trajectory point data. This effectively improves the efficiency of trajectory point queries in the temporal, spatial, and combined spatiotemporal dimensions.

[0039] Exemplary Methods

[0040] Figure 1 This is a flow chart of a method for constructing a spatiotemporal index provided in an embodiment of the present application. Figure 1 As shown, the spatiotemporal index construction method provided in this embodiment includes the following steps S101 to S104:

[0041] S101, obtaining vehicle trajectory point data, where the vehicle trajectory point data includes the following attribute information of the vehicle trajectory point: trajectory point identifier, timestamp, and geographic location.

[0042] Among them, the trajectory point identifier of the vehicle trajectory point is used to uniquely identify the vehicle trajectory point, the timestamp of the vehicle trajectory point refers to the time mark added to the vehicle trajectory point when collecting or recording the vehicle's driving trajectory, and the geographical location of the vehicle trajectory point may include the latitude and longitude coordinates of the vehicle trajectory point.

[0043] In this embodiment, vehicle trajectory point data can be obtained from a database. This vehicle trajectory point data is the basis data upon which B-tree and R-tree indexes are constructed, and is also the basis data upon which vehicle trajectory point queries are based. The vehicle trajectory point data may contain multiple vehicle trajectory points, and the vehicle trajectory point data includes attribute information corresponding to each of the multiple vehicle trajectory points.

[0044] S102: Construct a B-tree index based on the timestamp and the track point identifier of the vehicle track point. The index key information of the leaf node in the B-tree index includes the timestamp and the track point identifier of the vehicle track point. The B-tree index is a time index of the vehicle track point.

[0045] Among them, the B-tree index can be any of the following: B-tree index, B+ tree index, B* tree index. The B-tree index is a multi-level structure index, which includes: the level where the root node is located, the level where the intermediate node is located, and the level where the leaf node is located. It can be understood that the B-tree index divides the continuous timeline into multiple time intervals. From the level where the root node is located to the level where the leaf node is located, the time interval division becomes smaller and smaller. The time division granularity in the leaf node is specific to the timestamp of the vehicle trajectory point, realizing the time indexing of the vehicle trajectory point.

[0046] In a B-tree index, different leaf nodes contain different index key information, and the same leaf node can contain at least one index key information. When a leaf node contains multiple index key information, different index key information in the same leaf node contains different timestamps and different track point identifiers. This allows for time indexing of different vehicle track points.

[0047] In this embodiment, the root node, intermediate node, leaf node and the structural relationship between nodes in the B-tree structure can be constructed through multiple traversal operations and node construction operations according to the construction algorithm of the B-tree structure. Index key information is constructed in the root node, intermediate node and leaf node. The index key information in the leaf node contains the timestamp and trajectory point identifier of the vehicle trajectory point. The query of the vehicle trajectory point in the time dimension can be realized by searching the B-tree index.

[0048] S103: construct an R-family tree index based on the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point. The spatial entry information of the leaf node in the R-family tree index includes the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point. The R-family tree index is a spatial index of the vehicle trajectory point.

[0049] Among them, the R family tree index can be any of the following: R tree index, R+ tree index, R* tree index. The R family tree index is also a multi-level structure index, which includes: the level where the root node is located, the level where the intermediate node is located, and the level where the leaf node is located. Unlike the B family tree index, the R family tree index divides the traffic map into multiple spatial areas. In the R family tree index, the spatial area corresponding to the root node is the largest, and the spatial area corresponding to the root node covers the spatial area corresponding to the intermediate node, and the spatial area corresponding to the intermediate node covers the spatial area corresponding to the child node of the intermediate node. The spatial information in the leaf node is specific to the geographic location of the vehicle trajectory point.

[0050] In an R-family tree index, different leaf nodes can contain different spatial entries, and the same leaf node can contain at least one spatial entry. When a leaf node contains multiple spatial entries, the different spatial entries in the same leaf node contain different timestamps and track point identifiers. This allows for spatial indexing of different vehicle track points.

[0051] In this embodiment, according to the R-family tree structure construction algorithm, multiple traversal operations and node construction operations can be performed to construct the root node, intermediate node, leaf node and the structural relationship between nodes in the R-family tree index. In the root node, intermediate node and leaf node, spatial entry information is constructed. The spatial entry information of the leaf node includes the geographic location and trajectory point identification of the vehicle trajectory point. The query of the vehicle trajectory point in the spatial dimension can be realized through the search operation of the R-family tree index.

[0052] In the embodiment of the present application, the spatiotemporal continuity characteristics of vehicle trajectory point data are utilized to construct a B-tree index and an R-tree index for vehicle trajectory point queries. Both the B-tree index and the R-tree index are multi-way search tree indexes with high search efficiency. Moreover, during the query process of vehicle trajectory points, the search is mainly performed in the B-tree index and / or the R-tree index, eliminating the need for frequent access to the vehicle trajectory point data, effectively improving the query efficiency of vehicle trajectory points in the time dimension, space dimension, and the combined time and space dimension.

[0053] In some embodiments, vehicle trajectory point data is stored in a database in the form of a vehicle trajectory point data table. In the vehicle trajectory point data table, attribute information of the vehicle trajectory point can be stored in a normalized manner according to a relational database model, thereby improving the management effect of massive vehicle trajectory point data.

[0054] In this embodiment, raw trajectory data may be received. The raw trajectory data may contain interference data such as noise points and offset points. To improve the accuracy of trajectory point query, characteristic information of vehicle trajectory points may be identified from the raw trajectory data. The characteristic information of the vehicle trajectory points may include a timestamp of the vehicle trajectory point and a geographic location of the vehicle trajectory point. The characteristic information of the vehicle trajectory points may be stored in a vehicle trajectory point data table, and a trajectory point identifier may be generated for the vehicle trajectory point in the vehicle trajectory point data table.

[0055] Optionally, the raw trajectory data can be received from a distributed message queue system. Distributed message queue systems offer advantages such as real-time performance, high throughput, and distributed storage. This system can improve the efficiency of receiving raw trajectory data.

[0056] Furthermore, the distributed message queue system may be Kafka.

[0057] Optionally, the vehicle trajectory data is batch processed (such as denoising, trajectory point recognition, data table writing and other processing operations) using a distributed stream-batch integrated big data processing framework. The distributed stream-batch integrated big data processing framework has the advantages of strong computing power and the ability to perform data parallel processing, thereby improving the processing efficiency of vehicle trajectory data.

[0058] Furthermore, Flink can be used as a distributed, integrated stream-batch big data processing framework. Vehicle trajectory data can be processed in batches using Flink's time window mechanism. During batch processing, the vehicle trajectory data is partitioned according to time windows, and each partitioned data is processed in batches. This approach improves the processing efficiency of massive amounts of vehicle trajectory data.

[0059] In some embodiments, the attribute information of the vehicle trajectory point also includes one or more of the following: the latitude and longitude code of the vehicle trajectory point (e.g., geohash code), the identification information of the driving track to which the vehicle trajectory point belongs, the identification information of the vehicle to which the vehicle trajectory point belongs, the intersection information of the intersection where the vehicle trajectory point is located, the section information of the road section where the vehicle trajectory point is located, and the lane information of the lane where the vehicle trajectory point is located. This improves the information integrity and semantic richness of the vehicle trajectory point, provides richer trajectory point information for vehicle trajectory point queries, and establishes a connection between the vehicle trajectory point and the actual road network, which can support more advanced path analysis functions and traffic status monitoring functions.

[0060] For a vehicle trajectory point, intersection information and road section information are mutually exclusive, that is, the attribute information of a vehicle trajectory point includes one of intersection information and road section information.

[0061] Optionally, the intersection information of the intersection where the vehicle trajectory point is located includes identification information of the intersection where the vehicle trajectory point is located and location information of the intersection where the vehicle trajectory point is located. The identification information of the intersection where the vehicle trajectory point is located may be the intersection name, intersection code, etc., and the location information of the intersection where the vehicle trajectory point is located may be the latitude and longitude code of the intersection where the vehicle trajectory point is located.

[0062] Optionally, the lane information of the lane where the vehicle trajectory point is located includes the identification information of the lane where the vehicle trajectory point is located and the position information of the lane where the vehicle trajectory point is located. The identification information of the lane where the vehicle trajectory point is located may be the lane name, lane code, etc., and the position information of the lane where the vehicle trajectory point is located may be the latitude and longitude code of the lane where the vehicle trajectory point is located.

[0063] Among them, the content included in the section information of the section where the vehicle trajectory point is located can refer to the content included in the above-mentioned intersection information and the content included in the lane information, and will not be repeated here.

[0064] In some embodiments, after constructing a B-tree index based on timestamps and trajectory point identifiers, the method further includes storing the B-tree index as a B-tree structure table and a B-tree key table, wherein the B-tree structure table describes the structural information of the nodes in the B-tree index, and the B-tree key table describes the index key information of the nodes in the B-tree index. Thus, by storing the node structure and index key information of the B-tree index as separate table files, data redundancy and duplication of the B-tree index are reduced, the index structure of the B-tree index is optimized with limited resources, the storage overhead of the R-tree index is reduced, and the query performance of the B-tree index is guaranteed.

[0065] In this embodiment, after all nodes in the B-family tree index are constructed, the structural information of all nodes in the B-family tree index can be stored in the B-family tree structure table, and the index key information of all nodes in the B-family tree index can be stored in the B-family tree key table; or, after one of the nodes in the B-family tree index is constructed or updated, the structural information of the one of the nodes can be stored in the B-family tree structure table, and the index key information of the one of the nodes can be stored in the B-family tree key table.

[0066] Optionally, the B-tree structure table includes structural information of the first node: identification information of the first node, identification information of the parent node of the first node, a leaf node identifier indicating whether the first node is a leaf node, and a level identifier of the level at which the first node is located in the B-tree. The first node is any node in the B-tree index. The B-tree key table includes index key information of the first index key: identification information of the first index key, identification information of the first node, position information of the first index key in the first node, time information of the first index key, and pointer information of the first index key. The first index key is any index key in the first node. Thus, through the identification information of the first node, an association is established between the structural information of the first node in the B-tree structure table and the first index key in the B-tree key table. While storing the B-tree index through multiple tables, the connection between the multiple tables is maintained.

[0067] Among them, the first node may include multiple index keys, and the index key information corresponding to the multiple index keys is stored in the B-tree key table. The index key information corresponding to the multiple index keys all reference the identification information of the first node to establish an association relationship between the multiple index keys and the first node.

[0068] In the case where the first node is a leaf node, the time information of the first index key includes the timestamp of the vehicle trajectory point, and the pointer information of the first index key includes the trajectory point identifier of the vehicle trajectory point, so that the first index key points to the vehicle trajectory point. When traversing to the first node based on the time condition in the B-tree index, the index key information of the first index key can be obtained from the B-tree key table based on the identifier information of the first node, and it is determined whether the timestamp of the vehicle trajectory point in the index key information meets the time condition. If the timestamp meets the time condition, the trajectory point identifier of the vehicle trajectory point in the index key information is obtained, thereby realizing the query of the vehicle trajectory point in the time dimension.

[0069] Among them, when the first node is a non-leaf node, the time information of the first index key includes the demarcation time point associated with the first index key, and the pointer information of the first index key includes the identification information of the child node pointed to by the first index key. The demarcation time point associated with the first index key reflects the time interval corresponding to the child node pointed to by the first index key. When traversing to the first node based on the time condition in the B-family tree index, the index key information of the first index key can be obtained from the B-family tree key table based on the identification information of the first node; based on the demarcation time point associated with the first index key in the index key information, it is judged whether the time interval corresponding to the child node pointed to by the first index key meets the time condition; if the time interval meets the time condition, the child node pointed to by the first index key is traversed according to the identification information of the child node pointed to by the first index key in the index key information. Thereby, a correct traversal path is formed, which improves the efficiency of vehicle trajectory point query in the time dimension.

[0070] In some embodiments, after constructing the R-family tree index based on the geographic location and trajectory point identifiers, the method further includes: storing the R-family tree index as an R-family tree structure table and an R-family tree key table, wherein the R-family tree structure table describes the structural information of the nodes in the R-family tree index, and the R-family tree key table describes the spatial entry information of the nodes in the R-family tree index. Thus, by storing the node structure and spatial entry information of the R-family tree index as independent table files, data redundancy and duplication of the R-family tree index are reduced, the index structure of the R-family tree index is optimized under limited resources, the storage overhead of the R-family tree index is reduced, and the query performance of the R-family tree index is guaranteed.

[0071] In this embodiment, after all nodes in the R family tree index are constructed, the structural information of all nodes in the R family tree index can be stored in the R family tree structure table, and the spatial entry information of all nodes in the R family tree index can be stored in the R family tree key table; or, after one of the nodes in the R family tree index is constructed or updated, the structural information of the one of the nodes can be stored in the R family tree structure table, and the spatial entry information of the one of the nodes can be stored in the R family tree key table.

[0072] Optionally, the R family tree structure table includes structural information of the second node: identification information of the second node, identification information of the parent node of the second node, a leaf node identifier indicating whether the second node is a leaf node, and a level identifier of the level at which the second node is located in the R family tree, and the second node is any node in the R family tree index. The R family tree key table includes spatial entry information of the first entry: identification information of the first entry, identification information of the second node, position information of the first entry in the second node, spatial information of the first entry, and pointer information of the first entry, and the first entry is any entry in the second node. Thus, through the identification information of the second node, an association is established between the structural information of the second node in the R family tree structure table and the spatial entry information of the first entry in the R family tree key table, and while the R family tree index is stored through multiple tables, the connection between the multiple tables is accurately maintained.

[0073] In the case where the second node is a leaf node, the spatial information of the first entry includes the geographic location of the vehicle trajectory point, and the pointer information of the first entry includes the trajectory point identifier of the vehicle trajectory point, so that the first entry points to the vehicle trajectory point. When traversing to the second node based on the spatial condition in the R-family tree index, the spatial entry information of the first entry can be obtained from the R-family tree key table based on the identifier information of the second node; it is determined whether the geographic location of the vehicle trajectory point in the spatial entry information meets the spatial condition. If the geographic location meets the spatial condition, the trajectory point identifier of the vehicle trajectory point in the spatial entry information is obtained, thereby realizing the query of the vehicle trajectory point in the spatial dimension.

[0074] Wherein, when the second node is a non-leaf node, the spatial information of the first entry is the location range information of the spatial area associated with the first entry, and the pointer information of the first entry includes the identification information of the child node pointed to by the first entry. When traversing to the second node based on the spatial condition in the R-family tree index, the spatial entry information of the first entry can be obtained from the R-family tree key table based on the identification information of the second node; it can be determined whether the location range information of the spatial area in the spatial entry information meets the spatial condition. If the location range information meets the spatial condition, the child node pointed to by the first entry is traversed according to the identification information of the child node pointed to by the first entry in the spatial entry information, thereby forming a correct traversal path and improving the efficiency of vehicle trajectory point query in the time dimension.

[0075] Among them, one entry can be associated with a spatial area.

[0076] Optionally, the location range information of the spatial area associated with the first entry includes the longitude and latitude coordinate range of the spatial area, and the longitude and latitude coordinate range can be expressed as the longitude and latitude values of the boundary of the spatial range, thereby accurately representing the location range of the spatial area through the longitude and latitude coordinate range.

[0077] In some embodiments, in the R-family tree index, the spatial area range in the spatial entry information of the node is determined using the minimum bounding rectangle (MBR) technology. Specifically, in the R-family tree index, the spatial area in the spatial entry information of the leaf node is the minimum bounding rectangle of the vehicle trajectory point, and the minimum bounding rectangle of the vehicle trajectory point can be represented by the geographical location of the vehicle trajectory point; the spatial area in the spatial entry information of the intermediate node is: the minimum bounding rectangle of the spatial area in all spatial entry information in the child node pointed to by the spatial entry information; the spatial area in the spatial entry information of the root node is: the minimum bounding rectangle of the spatial area in all spatial entry information in the intermediate node pointed to by the spatial entry information. Thus, the spatial range of the traffic map is divided into a multi-level structure through the minimum bounding rectangle technology. This design method enables the retrieval of vehicle trajectory points in the spatial dimension to be implemented based on the R-family tree index, thereby improving the efficiency of retrieving vehicle trajectory points in the spatial dimension.

[0078] Among them, taking the above-mentioned first entry as an example, the spatial area associated with the first entry is the minimum bounding rectangle of the spatial area associated with the second entry, and the second entry is all entries in the child node pointed to by the first entry; the location range information of the spatial area associated with the first entry includes the longitude and latitude coordinate range of the minimum bounding rectangle, and the longitude and latitude range of the minimum bounding rectangle can be expressed as the upper and lower bounds of the longitude and latitude of the minimum bounding rectangle: the maximum longitude value, the minimum longitude value, the maximum latitude value and the minimum latitude value.

[0079] Optionally, the B-family tree structure table, the B-family tree key table, the R-family tree structure table, and the R-family tree key table are stored in a distributed database, such as ArgoDB, to improve the efficiency of track point queries.

[0080] As an example, Figure 2 The table structure design diagram for trajectory point data. Figure 2 As shown in the figure, the data tables involved in the track point data include the following: B NODES table, B KEYS table, R NODES table, B KEYS table and TR_POINTS table. B_NODES table is a B-family tree structure table, B_KEYS table is a B-family tree key table, R_NODES table is an R-family tree structure table, R_KEYS table is an R-family tree key table, and TR_POINTS table is a track point data table. Among them:

[0081] The B_NODES table includes the following information of nodes in the B-family tree index: node identifier (i.e., node identification information), parent node identifier (i.e., parent node identification information), leaf node identifier, and level identifier; the B_KEYS table includes the following information of index keys in the B-family tree index: key identifier (i.e., index key identification information), node identifier (i.e., identification information of the node where the index key is located), key position (i.e., position information of the index key in the node), time information, child node identifier (when the node where the index key is located is a leaf node, the child node identifier is empty), and track point identifier (when the node where the index key is located is a non-leaf node, the track point identifier is empty).

[0082] The R_NODES table includes the following information of the nodes in the R family tree index: node identifier, parent node identifier, leaf node identifier and level identifier; the R_KEYS table includes the following information of the entries in the R family tree index: entry identifier (i.e., the identification information of the entry), node identifier (i.e., the identification information of the node where the entry is located), entry position (i.e., the position information of the entry in the node), child node identifier (when the node where the entry is located is a leaf node, the child node identifier is empty), trajectory point identifier (when the node where the entry is located is a non-leaf node, the trajectory point identifier is empty) and the upper and lower bounds of the longitude and latitude of the minimum bounding rectangle (including the maximum longitude value, the minimum longitude value, the maximum latitude value and the minimum latitude value).

[0083] The TR_POINTS table includes the following information of the vehicle trajectory point: geographic coordinates, trajectory point identifier, vehicle identifier (identification information of the vehicle to which the vehicle trajectory point belongs), timestamp, latitude and longitude code (latitude and longitude code of the trajectory point), intersection code, intersection name, intersection latitude and longitude code, lane code, lane name and lane latitude and longitude code.

[0084] It can be seen that the B_NODES table and the B_KEYS table are associated through node identifiers to form a B-family tree index. The B-family tree index serves as the index of the vehicle trajectory points in the TR_POINTS table in the time dimension. The R_NODES table and the R_KEYS table are associated through node identifiers to form an R-family tree index. The R-family tree index serves as the index of the vehicle trajectory points in the TR_POINTS table in the spatial dimension.

[0085] In some embodiments, the process of constructing a B-tree index includes: performing a node processing operation of the B-tree index based on the timestamp of the vehicle trajectory point to obtain a leaf node in the B-tree index suitable for inserting the timestamp of the vehicle trajectory point, the node processing operation of the B-tree index including a node traversal operation starting from the root node of the B-tree index; and constructing index key information containing the timestamp of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point in the leaf node suitable for inserting the timestamp of the vehicle trajectory point. It is understandable that the process of constructing the B-tree index is a multiple traversal process. In each traversal process, the timestamp of the vehicle trajectory point is used as key reference information to search or create a leaf node in the B-tree index suitable for inserting the timestamp of the vehicle trajectory point, and then create index key information containing the timestamp information and the trajectory point identifier of the vehicle trajectory point in the leaf node. Through multiple traversals, corresponding index key information can be created in the leaf nodes for multiple vehicle trajectory points, thereby creating an index for queries of multiple vehicle trajectory points in the time dimension.

[0086] During the traversal process, the timestamp of the vehicle trajectory point can be compared with the boundary time point corresponding to the index key in the current traversal node. According to the comparison result, the next traversal node is determined in the child node pointed to by the index key, thus forming a traversal path. The leaf node that the traversal path finally points to is a leaf node suitable for inserting the timestamp of the vehicle trajectory point.

[0087] With the high-frequency influx of massive amounts of vehicle trajectory data, frequent node splitting and rebalancing operations reduce the efficiency of B-tree index construction, leading to performance bottlenecks. Therefore, maintaining the stability of the B-tree index's tree structure and query efficiency in the face of high-frequency trajectory data streams is one of the main challenges in building a B-tree index.

[0088] Optionally, the node processing operation of the B-tree index also includes a node splitting operation of the B-tree index. The node splitting operation of the B-tree index may include: when there is a target node that needs to be split in the B-tree index, the index key information located in the middle position of the target node may be moved to the parent node of the target node, a new child node is created for the parent node, and the index key information located on the right side of the middle position is moved to the new child node. Thus, by moving the middle index key information to the parent node and constructing a new child node to accommodate the index key information on one side of the middle position, the target node is split and the balance adjustment of the B-tree index is completed, taking into account the balance of key value distribution, avoiding performance degradation caused by the skew of the B-tree structure, and at the same time, not increasing the depth of the B-tree index, maintaining the stability of the tree structure and query efficiency of the B-tree index.

[0089] Among them, if there is a node in the B-tree index whose number of index keys is greater than the number threshold, the node with the number of index keys greater than the number threshold is determined as the target node that needs to be split. The number threshold is equal to the order of the B-tree index minus one. By reasonably setting the order of the B-tree index, the frequency of node splitting in the B-tree index can be reduced and the structural stability of the B-tree index can be improved.

[0090] Alternatively, if the target node is a root node, a new root node can be constructed, set as the parent node of the target node, and then the target node can be split according to the above method. This increases the height of the B-tree index and maintains the stability of the tree structure.

[0091] In some embodiments, the construction process of the R family tree index includes: performing a node processing operation of the R family tree index based on the geographical location of the vehicle trajectory point to obtain a leaf node in the R family tree index that is suitable for inserting the geographical location of the vehicle trajectory point, and the node processing operation includes a node traversal operation starting from the root node of the R family tree index; in the leaf node that is suitable for inserting the geographical location of the vehicle trajectory point, constructing spatial entry information containing the geographical location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point; updating the spatial entry information of the node on the target path, the target path is the node path of the leaf node that is suitable for inserting the geographical location of the vehicle trajectory point, that is, the node path from the root node of the R family tree index to the leaf node.

[0092] As you can understand, the construction process of the R-family tree index also involves multiple traversals. During each traversal, the geographic location of the vehicle trajectory point is used as key reference information. A leaf node suitable for inserting the vehicle trajectory point's geographic location is searched or created in the R-family tree index. Spatial entry information containing the vehicle trajectory point's geographic location and trajectory point identifier is then created in this leaf node. In this way, through multiple traversals, corresponding spatial entry information is created in the leaf nodes for multiple vehicle trajectory points, thereby creating an index for queries in the spatial dimension of multiple vehicle trajectory points.

[0093] During the traversal process, the geographic location of the vehicle trajectory point can be compared with the spatial information of the entry in the current traversal node. According to the comparison result, the next traversal node is determined in the child node pointed to by the entry, thus forming a traversal path. The leaf node that the traversal path finally points to is the leaf node suitable for inserting the geographic location of the vehicle trajectory point.

[0094] In the implementation process of R-family tree index, the multidimensional characteristics of spatial data make the construction of R-family tree index difficult, and the main technical difficulties are as follows: in the scenario of dynamic data changes, the spatial distribution of trajectory points may be uneven, resulting in the spatial areas of entries in the R-family tree index being concentrated in some areas of the traffic map. One of the technical difficulties in constructing the R-family tree index is how to choose the best splitting strategy to reduce the overlap of spatial information of different entries in the R-family tree index (that is, the overlap of spatial areas in different spatial entry information, when the spatial area is represented by a minimum bounding rectangle, that is, the overlap of minimum bounding rectangles in different spatial entry information). This technical difficulty is related to the spatial query efficiency of vehicle trajectory points; in the scenario where trajectory point information is written quickly, another technical difficulty in constructing the R-family tree index is how to efficiently calculate and maintain the spatial information of entries in the R-family tree index, which is related to the computing resource overhead in the process of constructing the R-family tree index.

[0095] Optionally, a traversal process of an R-family tree index includes: during the node traversal process, determining the area growth value corresponding to the entry in the current traversal node based on the geographic location of the vehicle trajectory point, the area growth value refers to: if the geographic location of the vehicle trajectory point is inserted into the child node pointed to by the entry in the current traversal node, then the area value of the spatial region associated with the entry in the current traversal node that needs to be expanded; according to the area growth value corresponding to the entry in the current traversal node, according to the area growth minimization target, the next traversal node is determined in the child nodes of the current traversal node. According to the area growth minimization target, a leaf node that better fits the geographic location of the inserted vehicle trajectory point can be found. On the one hand, it can improve the traversal efficiency when constructing the R-family tree index, and on the other hand, it can reduce the changes in the spatial information of the entries in the R-family tree index, thereby reducing the computing resource overhead during the construction of the R-family tree index.

[0096] In this optional method, when the geographic location of the vehicle trajectory point is inserted into the child node pointed to by the entry in the current traversal node, the spatial area of the entry in the child node may need to be expanded (for example, when the geographic location of the vehicle trajectory point is outside the spatial range, the spatial area needs to be expanded). The spatial area of the entry in the current traversal node needs to cover the spatial area of all entries in the child node, so the spatial area of the entry in the current traversal node may also need to be expanded. This can be done by assuming that the geographic location of the vehicle trajectory point is inserted into the child node pointed to by the entry in the current traversal node, calculating the area growth value (i.e., the expanded area) of the spatial area of the entry in the current traversal node, and selecting the child node corresponding to the entry with the smallest area growth value as the next traversal node.

[0097] Optionally, the node processing operation of the R-family tree index also includes a node splitting operation of the R-family tree index, and the node splitting operation of the R-family tree index includes: in the R-family tree index, determining the spatial entry information of the third entry and the spatial entry information of the fourth entry in the node to be split, where the third entry and the fourth entry are the entries with the farthest relative distance in the node to be split; creating two new nodes, and assigning the spatial entry information of the third entry and the spatial entry information of the fourth entry to the two new nodes respectively; according to the area growth minimization target, assigning the remaining entries in the node to be split except the third entry and the fourth entry to the two new nodes; and updating the node to be split to the two new nodes. Thus, by assigning the entries with the farthest relative distance in the node to be split to the two new nodes respectively, the overlap of the spatial areas of the entries between the two new nodes is reduced, and by assigning the remaining entries in the node to be split to the two new nodes according to the area growth minimization target, the spatial information change caused by the node splitting operation is reduced, thereby reducing the overhead of the node splitting operation.

[0098] The updating of the node to be split into two new nodes may include: determining the parent node of the node to be split as the parent node of the two new nodes; and deleting the node to be split.

[0099] Figure 3 This is a flow chart of a trajectory point query method provided in an embodiment of the present application. Figure 3 As shown, the trajectory point query method provided in this embodiment includes the following steps S301 to S303:

[0100] S301: Obtain a trajectory query request, where the trajectory query request indicates a search condition for a trajectory point, where the search condition includes a time condition and / or a space condition.

[0101] The time condition may include at least one time range to query vehicle trajectory points with timestamps within the time range, and / or the time condition may include at least one time point to query vehicle trajectory points with timestamps at the time point. The spatial condition may include at least one spatial range (e.g., a circular area with a certain location as the center and a radius of a preset distance) to query vehicle trajectory points with geographical locations within the spatial range, and / or the spatial condition may include at least one spatial coordinate to query vehicle trajectory points with geographical locations at the spatial coordinates.

[0102] In this embodiment, a track query request input by a user may be received, or a track query request sent by a service system (such as a navigation service system) may be received.

[0103] S302: Based on the time condition, perform a trajectory point identification query in the B-family tree index to obtain the identification query result corresponding to the B-family tree index, and / or, based on the spatial condition, perform a trajectory point identification query in the R-family tree index to obtain the identification query result corresponding to the R-family tree index.

[0104] Among them, the B-family tree index and the R-family tree index are obtained according to the spatiotemporal index construction method provided by any of the aforementioned embodiments, and the B-family tree index and the R-family tree index are not described in detail here.

[0105] In this embodiment, traversal begins at the root node of the B-family tree index, and the time information contained in the time condition can be compared with the time information of the index key in the currently traversed node. Based on the comparison result, the next traversal node is determined in the child node pointed to by the index key, until the traversal reaches a leaf node. If the timestamp of the vehicle trajectory point in the leaf node meets the time condition, the identification query result corresponding to the B-family tree index is determined to include the trajectory point identification of the vehicle trajectory point in the leaf node. And / or, traversal begins at the root node of the R-family tree index, and the spatial information contained in the spatial condition can be compared with the spatial information of the entry in the currently traversed node. Based on the comparison result, the next traversal node is determined in the child node pointed to by the entry, until the traversal reaches a leaf node. If the geographical location of the vehicle trajectory point in the leaf node meets the spatial condition, the identification query result corresponding to the R-family tree index is determined to include the trajectory point identification of the vehicle trajectory point in the leaf node.

[0106] S303 : Obtain a trajectory point query result from the vehicle trajectory point data according to the identifier query result corresponding to the B-family tree index and / or the identifier query result corresponding to the R-family tree index.

[0107] In this embodiment, the trajectory point identifier in the identifier query result corresponding to the B-family tree index is used as a keyword to search the attribute information of the vehicle trajectory point from the vehicle trajectory point data to obtain a trajectory point query result in the time dimension; and / or, the trajectory point identifier in the identifier query result corresponding to the R-family tree index is used as a keyword to search the attribute information of the vehicle trajectory point from the vehicle trajectory point data to obtain a trajectory point query result in the space dimension, thereby realizing vehicle trajectory point query in the time dimension, space dimension, or time-space combined dimension, thereby improving the query efficiency of vehicle trajectory points.

[0108] In this embodiment of the present application, a B-family tree index is used to query the track point identifiers of vehicle track points whose timestamps meet the time condition, and an R-family tree index is used to query the track point identifiers of vehicle track points whose geographic locations meet the spatial condition. Based on the queried track point identifiers, track point information is obtained from the vehicle track point data. On the one hand, the B-family tree index and the R-family tree index reduce the number of times the vehicle track point data is accessed and read during the query process. On the other hand, the multi-level index structure of the B-family tree index and the R-family tree index improves the efficiency of querying track point identifiers through the tree structure search process. This improves the efficiency of querying vehicle track points.

[0109] To facilitate understanding of the above solution, some examples are provided below with reference to the accompanying drawings.

[0110] Figure 4 The following is an example of the process of building a spatiotemporal index for trajectory points and querying trajectory points. Figure 4 As shown, first, the original trajectory data is obtained from the trajectory data source (for example, from Kafka). In the distributed stream-batch integrated big data processing framework, a time window mechanism is used to perform real-time batch processing and construct a spatiotemporal index on the original trajectory data. In the spatiotemporal index construction, the trajectory point data is stored in the trajectory point data table, the B-tree index constructed based on the timestamp is stored as a B-tree structure table and a B-tree key table, and the R-tree index constructed based on the geographic location is stored as an R-tree structure table and an R-tree key table. The order of the B-tree index is, for example, 8, and the maximum number of entries in the R-tree index is, for example, 8. In the spatiotemporal query application, based on the B-tree structure table and the B-tree key table, efficient query of vehicle trajectory points based on the time index is implemented, and based on the R-tree structure table and the R-tree key table, efficient query of vehicle trajectory points based on the spatial index is implemented.

[0111] Figure 5 The following is an example diagram of the structure of a B-tree index. Figure 5 As shown in the figure, the B-tree index is designed as a three-layer structure: root node, intermediate node and leaf node.

[0112] The root node is an hourly node, and the boundary time points in the root node are 8:00, 9:00, and 10:00.

[0113] Intermediate nodes are 10-minute nodes. For example, one intermediate node corresponds to the time interval of 8:00 to 8:10, with the demarcation time points of 8:00 and 8:05; another intermediate node corresponds to the time interval of 9:00 to 9:10, with the demarcation time points of 9:00 and 9:05; and another intermediate node corresponds to the time interval of 10:00 to 10:10, with the demarcation time points of 10:00 and 10:05.

[0114] Leaf nodes are minute-level nodes with finer granularity. For example, a leaf node includes the timestamps of vehicle trajectory points between 8:00 and 8:03: 8:00, 8:01, and 8:02, and can also include the trajectory point identifiers (not shown) of the vehicle trajectory points corresponding to these timestamps. Another leaf node includes the timestamps of vehicle trajectory points between 8:04 and 8:09: 8:04, 8:06, and 8:08. Another leaf node includes the timestamps of vehicle trajectory points between 10:00 and 10:01: 10:00 and 10:01.

[0115] exist Figure 5 The vehicle trajectory point query is performed in the B-tree index shown. For example, to query the trajectory point data at 8:06, the root node is first traversed, the boundary time point in the root node is compared with 8:06, and the next traversal node is selected as the intermediate node with a time interval of 8:00 to 8:10; the boundary time point in the intermediate node is compared with 8:06, and the next traversal time point is selected as the leaf node with a time interval of 8:04 to 8:09. Finally, the trajectory point identifier corresponding to 8:06 is found in the leaf node.

[0116] Figure 6 This is a structural example diagram of the R family tree index. Figure 6 As shown, the R-family tree index is designed as a three-layer structure: root node, intermediate node and leaf node.

[0117] The root node T contains two entries: the first entry corresponds to the minimum bounding rectangle R1, which points to the intermediate node L; the second entry corresponds to the minimum bounding rectangle R2, which also points to the intermediate node R. The intermediate node L contains two entries: the first entry corresponds to the minimum bounding rectangle R3, which points to the leaf node LL; the second entry corresponds to the minimum bounding rectangle R4, which points to the leaf node LR; R1 is the minimum bounding rectangle of R3 and R4. The intermediate node R contains two entries: the first entry corresponds to the minimum bounding rectangle R5, which points to the leaf node RL; the second entry corresponds to the minimum bounding rectangle R6; R2 is the minimum bounding rectangle of R5 and R6. The two entries in leaf node LL correspond to minimum bounding rectangles R7 and R8, respectively, and the minimum bounding rectangle of R7 and R8 is R3. The two entries in leaf node LR correspond to minimum bounding rectangles R9 and R10, respectively, and the minimum bounding rectangle of R9 and R10 is R4. The two entries in leaf node RL correspond to minimum bounding rectangles R11 and R12, respectively, and the minimum bounding rectangle of R11 and R12 is R5. The minimum bounding rectangle in the leaf node is the minimum bounding rectangle of the geographic location of the vehicle trajectory point. The leaf node contains the trajectory point identifier of the corresponding vehicle trajectory point to point to the vehicle trajectory point in the vehicle trajectory point data.

[0118] Figure 7 It is a spatial-temporal dual index storage structure diagram of trajectory points based on the road network. Figure 7 As shown in the figure, the trajectory point data of a certain road can be stored in a trajectory point data table. A time index is constructed based on the trajectory point data table, using a B-tree index. A spatial index is constructed based on the trajectory point data table, using an R-tree index. During the construction of the R-tree index, the minimum bounding rectangle corresponding to the entry in the node can be determined in the traffic map by referring to the road network reference table.

[0119] in:

[0120] The B-tree index includes the B_NODES table and the B_KEYS table. The B_NODES table shows the structure of the B-tree index: a root node with the node identifier "btn-1001," an intermediate node with the node identifier "btn-1002" under the root node "btn-001," and leaf nodes with the node identifier "btn-1003" and "btn-1004" under the intermediate node "btn-1002." The root node has a level identifier of 0, the intermediate node has a level identifier of 1, and the leaf node has a level identifier of 2. According to the B_KEYS table, the following node contents can be seen: the root node with the node identifier "btn-1001" includes an index key with the key identifier "btk-1001" and a timestamp of "1739514336700" (this is a timestamp string, which is the demarcation time point corresponding to the index key); the leaf node with the node identifier "btn-1003" includes an index key with the key identifier "btk-1002" and a timestamp of "1739514336700" (this is a timestamp string, which is the demarcation time point corresponding to the index key); 4336800", (the timestamp of the vehicle trajectory point pointed to by the index key), and the trajectory point identifier of the vehicle trajectory point pointed to by the index key is "tp-1001"; in the leaf node with the node identifier "btn-1004", it includes the index key with the key identifier "btk-1005", and the timestamp of the index key is "1739514336900" (the timestamp of the trajectory time point pointed to by the index key), and the trajectory point identifier of the vehicle trajectory point pointed to by the index key is "tp-1002". Based on the B-tree index, trajectory points within a specific time period can be efficiently queried, for example, "the trajectory point information of all vehicles within a certain period of time" can be queried.

[0121] The R-family tree index includes the R_NODES table and the R_KEYS table. The R_NODES table shows the structure of the R-family tree index: a root node with the node identifier "rtn-1001," an intermediate node with the node identifier "rtn-1002" under the root node "rtn-001," and leaf nodes with the node identifier "rtn-1003" and "rtn-1004" under the intermediate node "rtn-1002." The root node has a level identifier of 0, the intermediate node has a level identifier of 1, and the leaf node has a level identifier of 2. The following node contents can be seen from the R_KEYS table: the root node with the node identifier "rtn-1001" includes the spatial entry information with the entry identifier "rte-1001". In this spatial entry information, the latitude and longitude range of the minimum bounding rectangle is (120.301°E~120.303°E, 31.548°N~31.550°N); the leaf node with the node identifier "rtn-1003" includes the spatial entry with the entry identifier "rte-1002". The longitude and latitude range of the minimum bounding rectangle in this spatial entry is (120.302°E to 120.303°E, 31.549°N to 31.550°N). The leaf node identified by the node "rtn-1004" includes the spatial entry identified by the entry "rte-1003." In this spatial entry, the longitude and latitude range of the minimum bounding rectangle is (120.301°E to 120.302°E, 31.548°N to 31.549°N). R-tree indexes can efficiently query track points within a specific spatial range, such as querying for the track points of a vehicle on two roads.

[0122] Exemplary devices

[0123] Corresponding to the above-mentioned spatiotemporal index construction method, an embodiment of the present application also provides a spatiotemporal index construction device. Figure 8 This is a schematic diagram of the structure of a spatiotemporal index construction device provided in an embodiment of the present application. Figure 8 As shown, the spatiotemporal index construction device 80 provided in the embodiment of the present application includes: an acquisition unit 81, a time index construction unit 82 and a space index construction unit 83:

[0124] An acquisition unit 81 is used to acquire vehicle trajectory point data, where the vehicle trajectory point data includes the following attribute information of the vehicle trajectory point: trajectory point identifier, timestamp, and geographic location; a time index construction unit 82 is used to construct a B-family tree index based on the timestamp of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point, where the index key information of the leaf node in the B-family tree index includes the timestamp of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point, and the B-family tree index is the time index of the vehicle trajectory point; a spatial index construction unit 83 is used to construct an R-family tree index based on the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point, where the spatial entry information of the leaf node in the R-family tree index includes the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point, and the R-family tree index is the spatial index of the vehicle trajectory point.

[0125] In some implementations, the spatiotemporal index construction device 80 also includes: a time index storage unit (not shown in the figure), which is used to store the B-family tree index as a B-family tree structure table and a B-family tree key table. The B-family tree structure table describes the structural information of the nodes in the B-family tree index, and the B-family tree key table describes the index key information of the nodes in the B-family tree index.

[0126] In some implementations, the B-family tree structure table includes structural information of the first node: identification information of the first node, identification information of the parent node of the first node, a leaf node identifier indicating whether the first node is a leaf node, and a level identifier of the level at which the first node is located in the B-family tree, where the first node is any node in the B-family tree index; the B-family tree key table includes index key information of the first index key: identification information of the first index key, identification information of the first node, position information of the first index key in the first node, time information of the first index key, and pointer information of the first index key, where the first index key is any index key in the first node; when the first node is a leaf node, the time information of the first index key includes the timestamp of the vehicle trajectory point, and the pointer information of the first index key includes the trajectory point identifier of the vehicle trajectory point; when the first node is a non-leaf node, the time information of the first index key includes the boundary time point associated with the first index key, and the pointer information of the first index key includes the identification information of the child node pointed to by the first index key.

[0127] In some implementations, the spatiotemporal index construction device 80 also includes: a spatial index storage unit (not shown in the figure), which is used to store the R-family tree index as an R-family tree structure table and an R-family tree key table, the R-family tree structure table describes the structural information of the nodes in the R-family tree index, and the R-family tree key table describes the spatial entry information of the nodes in the R-family tree index.

[0128] In some implementations, the R family tree structure table includes structural information of the second node: identification information of the second node, identification information of the parent node of the second node, a leaf node identifier indicating whether the second node is a leaf node, and a level identifier of the level at which the second node is located in the R family tree, where the second node is any node in the R family tree index; the R family tree key table includes spatial entry information of the first entry: identification information of the first entry, identification information of the second node, position information of the first entry in the second node, spatial information of the first entry, and pointer information of the first entry, where the first entry is any entry in the second node; when the second node is a leaf node, the spatial information of the first entry includes the geographic location of the vehicle trajectory point, and the pointer information of the first entry includes the trajectory point identifier of the vehicle trajectory point; when the second node is a non-leaf node, the spatial information of the first entry is the location range information of the spatial area associated with the first entry, and the pointer information of the first entry includes the identification information of the child node pointed to by the first entry.

[0129] In some implementations, the spatial area associated with the first entry is the minimum bounding rectangle of the spatial area associated with the second entry, and the second entries are all entries in the child nodes pointed to by the first entry; the location range information of the spatial area associated with the first entry includes the latitude and longitude coordinate range of the minimum bounding rectangle.

[0130] In some implementations, the construction process of the B-tree index includes: performing a node processing operation of the B-tree index based on the timestamp of the vehicle trajectory point to obtain a leaf node in the B-tree index that is suitable for inserting the timestamp of the vehicle trajectory point, and the node processing operation includes a node traversal operation starting from the root node of the B-tree index; in the leaf node that is suitable for inserting the timestamp of the vehicle trajectory point, constructing index key information including the timestamp of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point.

[0131] In some implementations, the construction process of the R-family tree index includes: performing node processing operations on the R-family tree index based on the geographic location of the vehicle trajectory point to obtain a leaf node in the R-family tree index that is suitable for inserting the geographic location of the vehicle trajectory point, and the node processing operation includes a node traversal operation starting from the root node of the R-family tree index; in the leaf node that is suitable for inserting the geographic location of the vehicle trajectory point, constructing spatial entry information containing the geographic location of the vehicle trajectory point and the trajectory point identifier of the vehicle trajectory point; updating the spatial entry information of the nodes on the target path, and the target path is the node path of the leaf node that is suitable for inserting the geographic location of the vehicle trajectory point.

[0132] In some implementations, a traversal process of an R-family tree index includes: during the node traversal process, determining the area growth value corresponding to the entry in the current traversal node based on the geographic location of the vehicle trajectory point, where the area growth value refers to: if the geographic location of the vehicle trajectory point is inserted into the child node pointed to by the entry in the current traversal node, then the area value of the spatial area associated with the entry in the current traversal node that needs to be expanded; based on the area growth value, and in accordance with the area growth minimization goal, determining the next traversal node among the child nodes of the current traversal node.

[0133] In some implementations, the node processing operation also includes a node splitting operation, which includes: in the R family tree index, determining the spatial entry information of the third entry and the spatial entry information of the fourth entry in the node to be split, where the third entry and the fourth entry are the entries with the farthest relative distance in the node to be split; creating two new nodes, and assigning the spatial entry information of the third entry and the spatial entry information of the fourth entry to the two new nodes respectively; according to the area growth minimization goal, assigning the remaining entries in the node to be split except the third entry and the fourth entry to the two new nodes; and updating the node to be split to two new nodes.

[0134] The spatiotemporal index construction device provided in this embodiment is based on the same concept as the spatiotemporal index construction method provided in the aforementioned embodiments of this application. It can execute the spatiotemporal index construction method provided in any of the aforementioned embodiments of this application and has the corresponding functional modules and beneficial effects of executing the spatiotemporal index construction method. For technical details not fully described in this embodiment, please refer to the specific processing content of the spatiotemporal index construction method provided in the aforementioned embodiments of this application and will not be repeated here.

[0135] The functions implemented by the above acquisition unit 81, time index construction unit 82 and space index construction unit 83 can be implemented by the same or different processors respectively, and the embodiment of the present application does not limit this.

[0136] Corresponding to the above-mentioned trajectory point query method, an embodiment of the present application also provides a trajectory point query device. Figure 9 This is a schematic diagram of the structure of a trajectory point query device provided by an embodiment of the present application. Figure 9 As shown, the trajectory point query device 90 provided in the embodiment of the present application includes: an acquisition unit 91, an identification query unit 92 and a trajectory point query unit 93:

[0137] An acquisition unit 91 is used to obtain a trajectory query request, which indicates a search condition for a trajectory point, and the search condition includes a time condition and / or a space condition; an identification query unit 92 is used to perform a trajectory point identification query in a B-family tree index according to the time condition, and obtain an identification query result corresponding to the B-family tree index, and / or, perform a trajectory point identification query in an R-family tree index according to the space condition, and obtain an identification query result corresponding to the R-family tree index, wherein the B-family tree index and the R-family tree index are obtained according to the spatiotemporal index construction method provided in any of the aforementioned embodiments; a trajectory point query unit 93 is used to obtain a trajectory point query result from the vehicle trajectory point data according to the identification query result corresponding to the B-family tree index and / or the identification query result corresponding to the R-family tree index.

[0138] The trajectory point query device provided in this embodiment shares the same concept as the trajectory point query method provided in the aforementioned embodiments of this application. It can execute the trajectory point query method provided in any of the aforementioned embodiments of this application and possesses the corresponding functional modules and beneficial effects of executing the trajectory point query method. For technical details not fully described in this embodiment, please refer to the specific processing content of the trajectory point query method provided in the aforementioned embodiments of this application and will not be further elaborated here.

[0139] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device. The processor can be a general-purpose processor, such as a CPU or a microprocessor, and the memory can be a memory within the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits. The functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units can be realized by designing the logical relationships between the components within the circuit. For another example, in another implementation, the hardware circuit can be implemented by a PLD. For example, an FPGA can include a large number of logic gate circuits. The connection relationships between the logic gate circuits are configured through a configuration file to realize the functions of some or all of the above units. All units of the above devices can be implemented entirely in the form of a processor calling software, or entirely in the form of hardware circuits, or partially in the form of a processor calling software, with the remaining parts implemented in the form of hardware circuits.

[0140] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and execute instructions, such as a CPU, a microprocessor, a GPU, or a DSP. In another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit may be fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the configuration of the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0141] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0142] In addition, the various units in the above apparatus may be fully or partially integrated together, or may be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the apparatus. The at least one processor may be of different types, such as a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0143] Exemplary Systems

[0144] The present application embodiment provides an electronic device, see Figure 10 As shown, the vehicle-mounted device includes a memory 1000 and a processor 1010; wherein the memory 1000 is connected to the processor 1010 for storing programs; the processor 1010 is used to implement the spatiotemporal index construction method or trajectory point query method disclosed in any of the above embodiments by running the program stored in the memory 1000.

[0145] Specifically, the electronic device may further include: a bus, a communication interface 1020 , an input device 1030 and an output device 1040 .

[0146] The processor 1010, the memory 1000, the communication interface 1020, the input device 1030 and the output device 1040 are interconnected via a bus.

[0147] The bus may include a pathway for transmitting information between various components of the vehicle-mounted equipment.

[0148] Processor 1010 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, or the like, or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. Alternatively, it can be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.

[0149] The processor 1010 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0150] The memory 1000 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include program code, and the program code may include computer operating instructions. More specifically, the memory 1000 may include read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), other types of dynamic storage devices that can store information and instructions, disk storage, flash, etc.

[0151] The input device 1030 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0152] Output device 1040 may include devices that allow information to be output to a user, such as a display screen, printer, speakers, etc.

[0153] The communication interface 1020 may include any transceiver or similar device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0154] The processor 1010 executes the program stored in the memory 1000 and calls other devices, which can be used to implement the various steps of any spatiotemporal index construction method or any trajectory point query method provided in the above embodiments of the present application.

[0155] An embodiment of the present application also proposes a chip, which includes a processor and a data interface. The processor reads and runs the program stored in the memory through the data interface to execute the spatiotemporal index construction method or trajectory point query method introduced in any of the above embodiments. The specific processing process and its beneficial effects can be found in the above-mentioned embodiment introduction of the spatiotemporal index construction method.

[0156] Exemplary computer program products and storage media

[0157] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the spatiotemporal index construction method or trajectory point query method according to various embodiments of the present application described in any of the above embodiments of this specification.

[0158] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0159] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the spatiotemporal index construction method or trajectory point query method according to various embodiments of the present application described in any of the above embodiments of this specification, and specifically can implement the steps of the spatiotemporal index construction method as described above.

[0160] For the sake of simplicity, the aforementioned method embodiments are described as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0161] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simplified. For relevant parts, refer to the description of the method embodiments.

[0162] The steps in the methods of each embodiment of the present application can be adjusted in sequence, merged, and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0163] The units of the devices in the embodiments of the present application can be combined, divided, and deleted according to actual needs.

[0164] In the several embodiments provided in this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the terminal embodiments described above are merely illustrative. For example, the division of modules or submodules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.

[0165] The modules or submodules described as separate components may or may not be physically separate, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules may be selected to achieve the purpose of this embodiment according to actual needs.

[0166] In addition, each functional module or submodule in each embodiment of the present application may be integrated into a processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into a single module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or software functional modules or submodules.

[0167] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0168] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, software units executed by a processor, or a combination of the two. The software units may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0169] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0170] The above description of the disclosed embodiments will enable those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is to be construed in the widest manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a spatiotemporal index, characterized in that: include: Acquire vehicle trajectory point data, wherein the vehicle trajectory point data includes the following attribute information of the vehicle trajectory point: trajectory point identifier, timestamp, and geographic location; Constructing a B-tree index according to the timestamp and the trajectory point identifier, wherein the index key information of a leaf node in the B-tree index includes the timestamp and the trajectory point identifier, and the B-tree index is a time index of the vehicle trajectory point; An R-family tree index is constructed according to the geographic location and the trajectory point identifier, wherein the spatial entry information of the leaf node in the R-family tree index includes the geographic location and the trajectory point identifier, and the R-family tree index is a spatial index of the vehicle trajectory point.

2. The method for constructing a spatiotemporal index according to claim 1, wherein: After constructing the B-tree index according to the timestamp and the track point identifier, the method further includes: The B-tree index is stored as a B-tree structure table and a B-tree key table, wherein the B-tree structure table describes the structural information of the nodes in the B-tree index, and the B-tree key table describes the index key information of the nodes in the B-tree index.

3. The method for constructing a spatiotemporal index according to claim 2, wherein: The B-tree structure table includes structural information of a first node: identification information of the first node, identification information of a parent node of the first node, a leaf node identifier indicating whether the first node is a leaf node, and a level identifier of a level of the first node in the B-tree, wherein the first node is any node in the B-tree index; The B-tree key table includes index key information of a first index key: identification information of the first index key, identification information of the first node, position information of the first index key in the first node, time information of the first index key, and pointer information of the first index key, where the first index key is any index key in the first node; In the case where the first node is a leaf node, the time information includes the timestamp, and the pointer information includes the track point identifier; In the case where the first node is a non-leaf node, the time information includes a boundary time point associated with the first index key, and the pointer information includes identification information of the child node pointed to by the first index key.

4. The method for constructing a spatiotemporal index according to claim 1, wherein: After constructing the R-family tree index according to the geographic location and the trajectory point identifier, the method further includes: The R-family tree index is stored as an R-family tree structure table and an R-family tree key table, wherein the R-family tree structure table describes the structural information of the nodes in the R-family tree index, and the R-family tree key table describes the spatial entry information of the nodes in the R-family tree index.

5. The method for constructing a spatiotemporal index according to claim 4, wherein: The R-family tree structure table includes structural information of a second node: identification information of the second node, identification information of a parent node of the second node, a leaf node identifier indicating whether the second node is a leaf node, and a level identifier of a level at which the second node is located in the R-family tree, where the second node is any node in the R-family tree index; The R-family tree key table includes spatial entry information of a first entry: identification information of the first entry, identification information of the second node, position information of the first entry in the second node, spatial information of the first entry, and pointer information of the first entry, where the first entry is any entry in the second node; In the case where the second node is a leaf node, the spatial information includes the geographical location, and the pointer information includes the track point identifier; In the case that the second node is a non-leaf node, the spatial information of the first entry is the location range information of the spatial area associated with the first entry, and the pointer information includes identification information of the child node pointed to by the first entry.

6. The method for constructing a spatiotemporal index according to claim 5, wherein: The spatial region associated with the first entry is the minimum bounding rectangle of the spatial region associated with the second entry, and the second entry is all entries in the child node pointed to by the first entry; The location range information includes the latitude and longitude coordinate range of the minimum bounding rectangle.

7. The method for constructing a spatiotemporal index according to any one of claims 1 to 6, characterized in that: The construction process of the B-tree index includes: Performing a node processing operation on the B-tree index according to the timestamp to obtain a leaf node in the B-tree index suitable for inserting the timestamp, the node processing operation comprising a node traversal operation starting from a root node of the B-tree index; In the leaf node suitable for inserting the timestamp, index key information including the timestamp and the track point identifier is constructed.

8. The method for constructing a spatiotemporal index according to any one of claims 1 to 6, characterized in that: The construction process of the R-family tree index includes: Performing a node processing operation on the R-family tree index according to the geographic location to obtain a leaf node in the R-family tree index suitable for inserting the geographic location, the node processing operation comprising a node traversal operation starting from a root node of the R-family tree index; In the leaf node suitable for inserting the geographic location, constructing spatial entry information including the geographic location and the track point identifier; The spatial entry information of the nodes on the target path is updated, where the target path is the node path of the leaf node suitable for inserting the geographical location.

9. The method for constructing a spatiotemporal index according to claim 8, wherein: A traversal process of the R family tree index includes: During the node traversal process, determining an area growth value corresponding to an entry in the currently traversed node based on the geographic location, where the area growth value refers to the area value that needs to be expanded for the spatial region associated with the entry in the currently traversed node if the geographic location is inserted into the child node pointed to by the entry in the currently traversed node; According to the area growth value and in accordance with an area growth minimization objective, a next traversal node is determined from among the child nodes of the currently traversed node.

10. The method for constructing a spatiotemporal index according to claim 8, wherein: The node processing operation further includes a node splitting operation, and the node splitting operation includes: In the R-family tree index, determining spatial entry information of a third entry and spatial entry information of a fourth entry in a node to be split, wherein the third entry and the fourth entry are entries with the farthest relative distance in the node to be split; creating two new nodes, and assigning the spatial entry information of the third entry and the spatial entry information of the fourth entry to the two new nodes respectively; According to a goal of minimizing area growth, allocating the remaining entries in the node to be split, except for the third entry and the fourth entry, to the two new nodes; The node that needs to be split is updated to the two new nodes.

11. A trajectory point query method, characterized in that: include: Obtaining a trajectory query request, where the trajectory query request indicates a search condition for a trajectory point, where the search condition includes a time condition and / or a space condition; performing a trajectory point identification query in a B-family tree index according to the time condition to obtain an identification query result corresponding to the B-family tree index, and / or performing a trajectory point identification query in an R-family tree index according to the spatial condition to obtain an identification query result corresponding to the R-family tree index, wherein the B-family tree index and the R-family tree index are obtained by the spatiotemporal index construction method according to any one of claims 1 to 10; A trajectory point query result is obtained from the vehicle trajectory point data according to the identification query result corresponding to the B-family tree index and / or the identification query result corresponding to the R-family tree index.

12. A spatiotemporal index construction device, characterized in that: include: An acquisition unit, configured to acquire vehicle trajectory point data, wherein the vehicle trajectory point data includes the following attribute information of the vehicle trajectory point: trajectory point identifier, timestamp, and geographic location; a time index construction unit, configured to construct a B-tree index based on the timestamp and the trajectory point identifier, wherein the index key information of a leaf node in the B-tree index includes the timestamp and the trajectory point identifier, and the B-tree index is a time index of the vehicle trajectory point; A spatial index construction unit is used to construct an R-family tree index based on the geographic location and the trajectory point identifier, wherein the spatial entry information of the leaf node in the R-family tree index includes the geographic location and the trajectory point identifier, and the R-family tree index is the spatial index of the vehicle trajectory point.

13. A trajectory point query device, characterized in that: include: an acquiring unit, configured to acquire a trajectory query request, wherein the trajectory query request indicates a search condition for a trajectory point, wherein the search condition includes a time condition and / or a space condition; an identification query unit, configured to perform a trajectory point identification query in a B-family tree index based on the time condition to obtain an identification query result corresponding to the B-family tree index, and / or perform a trajectory point identification query in an R-family tree index based on the spatial condition to obtain an identification query result corresponding to the R-family tree index, wherein the B-family tree index and the R-family tree index are obtained according to the spatiotemporal index construction method according to any one of claims 1 to 10; The trajectory point query unit is configured to obtain a trajectory point query result from the vehicle trajectory point data according to the identification query result corresponding to the B-family tree index and / or the identification query result corresponding to the R-family tree index.

14. An electronic device, characterized in that: including memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the spatiotemporal index construction method according to any one of claims 1 to 10, or the trajectory point query method according to claim 11, by running the program in the memory.

15. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the spatiotemporal index construction method according to any one of claims 1 to 10, or implements the trajectory point query method according to claim 11.

Citation Information

Cited By

  • Method and system for matching mass agricultural machinery operation data with land four-arrival data

    CN120743909A

  • Video storage and retrieval method, device and equipment based on B + tree

    CN120804347A

  • Track data coding and query method and system, terminal equipment and medium

    CN121301495A