A vehicle trajectory stream data space-time hybrid index and query method, system and storage medium
By constructing a spatiotemporal T-SP-TL learning index, the problems of dynamic and massive nature of trajectory flow data are solved, enabling efficient real-time updates and queries, and making it suitable for trajectory flow data management in road network environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI UNIV OF SCI & TECH
- Filing Date
- 2025-05-21
- Publication Date
- 2026-04-21
AI Technical Summary
Existing indexing methods struggle to effectively handle trajectory flow data because the dynamic and massive nature of trajectory flow data leads to frequent changes in the index structure, resulting in decreased access efficiency and failing to meet the needs of real-time updates and efficient spatiotemporal queries.
A spatiotemporal hybrid indexing and querying method is adopted. By mathematically representing the road network and constructing a spatiotemporal T-SP-TL learning index, combined with a neural network model for data expression and updating, a spatiotemporal learning index for multi-objective tasks is established to achieve dynamic updates and efficient queries.
It improves the efficiency of real-time updates and spatiotemporal queries of trajectory flow data, reduces the number of I/O operations, enhances the adaptability of the index and the accuracy of queries, and adapts to high-time-efficiency applications in road network environments.
Smart Images

Figure CN120508600B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information retrieval technology, specifically relating to a spatiotemporal hybrid indexing and querying method, system, and storage medium for vehicle trajectory stream data. Background Technology
[0002] The era of spatiotemporal big data has driven the transformation of spatiotemporal intelligence towards a "data-intensive paradigm," but it has also exacerbated the problems of "massive data, information explosion, and difficulty in acquiring knowledge." Efficient and effective access is fundamental to the efficient transformation of spatiotemporal "big data" into "big knowledge," and spatiotemporal indexing is key to improving access efficiency. Due to the rapid growth in data volume, existing indexing methods are insufficient to meet current access demands. To address the problems in existing index structures, scholars have applied machine learning methods to indexing, proposing the concept of learning indexes. The main idea is to replace traditional indexes with learning methods, transforming queries into model predictions and leveraging the computational advantages of computers to improve access efficiency.
[0003] Trajectory flow data is a sequence of locations generated by the movement of mobile objects in geographic space. It contains not only spatial information of the location points at various times but also attribute information of the flow sequence itself. Furthermore, the data volume continuously increases over time, making it a core component of geographic big data. Trajectory flow data contains rich, timely information; real-time analysis, immediate discovery, and rapid response are fundamental to efficiently leveraging its value (e.g., collision detection for autonomous vehicles). Compared to other types of big data, trajectory flow data is characterized by real-time arrival, rapid growth, and large volume. When considering the rapid growth of trajectory flow data, the importance of indexing methods becomes even more pronounced. Existing spatiotemporal indexing methods can well meet the spatiotemporal query needs of historical data, but they neglect the dynamic spatiotemporal distribution characteristics of trajectory flows, making it difficult to support real-time updates and efficient spatiotemporal query processing of trajectory flow data.
[0004] A learned index treats the index itself as a learning model. It trains and learns the relationship between data and physical locations to obtain an adaptive mapping function f(key)->pos. Given a key to query, it returns the position (pos) of the record containing that key. While existing tree-structured indexes perform queries through a series of comparisons, learned indexes use direct computation, thus reducing data access time and saving memory resources. Learned indexes require relatively static and one-dimensionally ordered data, but trajectory flow data is not naturally ordered and continuously grows dynamically, making direct application to trajectory flow data impossible.
[0005] Therefore, existing indexing methods are difficult to effectively handle trajectory stream data because when the new trajectory data stream exceeds the capacity of the spatiotemporal index expansion, its access efficiency drops sharply; trajectory stream data is continuously updated and is huge in scale, causing drastic changes in the index structure. Summary of the Invention
[0006] This invention aims to address the shortcomings of existing technologies by proposing a spatiotemporal hybrid indexing and querying method, system, and storage medium for vehicle trajectory flow data. By integrating innovative ideas and methods such as big data, graph network analysis, and learning indexes, it addresses the need for efficient management of trajectory flow data. It provides a mathematically quantitative expression of the spatiotemporal proximity, heterogeneity, similarity, dynamic processes, and interactions of trajectory flow data within a road network space. It establishes a spatiotemporally adaptive partitioning method for trajectory flow data and constructs a spatiotemporal learning index oriented towards multi-objective tasks. It implements a dynamic update and maintenance algorithm as well as a spatiotemporal access algorithm adapted to multiple levels and objectives. Based on learning index theory and methods, the retrieval problem is transformed into a prediction problem, constructing a spatiotemporal learning index method capable of self-balancing access and update efficiency. This supports a novel engine for real-time mining, scheduling, and geographic knowledge discovery of trajectory flow data in a road network environment, enabling highly efficient geoscientific applications.
[0007] To achieve the above objectives, the present invention provides the following solution: a spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data, comprising the following steps:
[0008] S1. Collect vehicle trajectory flow data and perform spatiotemporal representation and modeling of the vehicle trajectory flow data;
[0009] S2. Divide the vehicle trajectory flow data into time partitions to obtain time zones; and divide the trajectory flow data of each time partition into spatial partitions to obtain the partitioning results.
[0010] S3. Based on the partitioning results, construct a spatiotemporal T-SP-TL learning index;
[0011] S4. Based on the new input data, maintain and update the constructed T-SP-TL learning index;
[0012] S5. Complete the spatiotemporal integrated query based on the T-SP-TL learning index.
[0013] Furthermore, S1 includes the following steps:
[0014] S11. Use mathematical representation methods to express the road network and assign a unique code to each road segment;
[0015] S12. Determine the correlation between road segments based on road segment topology information and establish a comprehensive correlation model;
[0016] S13. Analyze the local similarity of trajectory flow data and obtain local similarity measurement index;
[0017] S14. Based on the comprehensive correlation model, spatiotemporal correlation and heterogeneity index, construct a spatiotemporal comprehensive similarity measurement model.
[0018] Furthermore, in S2, the method for obtaining the time partition includes:
[0019] S21. Based on the time series distribution curve and data volume of trajectory flow data, and combined with time series analysis methods, solve for the time division nodes;
[0020] S22. Based on the time division node, construct a time partition table to obtain the time partition; the time partition table contains a time period attribute and a pointer.
[0021] Furthermore, the method for obtaining the partitioning result includes:
[0022] S23. Set termination conditions based on the number of trajectory point objects;
[0023] S24. Construct a linear graph based on the road network map and trajectory flow object set;
[0024] S25. Decompose the linear graph into several subgraphs and add each subgraph to the hierarchical partitioning result set until the termination condition is met; otherwise, repeat S25.
[0025] Furthermore, S3 includes the following steps:
[0026] S31. Based on the characteristics of the time partition, divide it into historical time partition and current time partition;
[0027] S32. Construct a T-SP-TL learning index for the historical time partition and the current time partition.
[0028] Furthermore, the method for constructing an index for the historical time partition includes:
[0029] S321. Convert the linear graph into a road network graph, with the sub-networks of the road network graph serving as child nodes of the root node;
[0030] S322. Identify bridging points for each sub-network and add them to the corresponding tree nodes; and calculate the distance matrix from the leaf nodes to the root node.
[0031] S323. Encode each trajectory object in the trajectory dataset of the leaf nodes, and divide the trajectory dataset of the leaf nodes into several subsets according to the time attribute; generate a second-layer model for each subset; use a neural network model for learning, with the input of the model being the key of the data record and the training label being the position of the key;
[0032] S324. After the second-layer model is constructed, the first-layer model is constructed; the query key of the first-layer model is the independent variable, and the dependent variable is the number of the second-layer model, thus completing the index construction of the historical time partition.
[0033] Furthermore, the method for constructing an index for the current time partition includes:
[0034] S325. Perform spatial distribution feature analysis on historical trajectory flow data, and based on the analysis results, perform the spatial division step in S2 to obtain the division result;
[0035] S326. Based on the division result, execute step S321;
[0036] S327. Perform a similarity measurement on the results of the spatial distribution characteristic analysis, and select the spatial division region that is most similar to the historical time partition.
[0037] S328. Using the second-layer model corresponding to the spatial division region selected in S327 as the initial network, a two-layer learning index is constructed based on the initial network and the trajectory flow data of the current time partition.
[0038] Furthermore, S4 includes the following steps:
[0039] S41. Connect a buffer page to the last second-layer model in each time partition. When the data is updated, save the updated data in the buffer page until the buffer page overflows. When the buffer page overflows, directly input the updated data into the second-layer model and retrain the second-layer model.
[0040] S42. When the updated data distribution changes and the error of the second-layer model is greater than the preset error, the updated data is split into two, and a second-layer model is added; the second-layer model is used to learn the split data.
[0041] S43. Optimize the parameters of the first layer model and complete the maintenance and update of the T-SP-TL learning index.
[0042] The present invention also provides a spatiotemporal hybrid indexing and querying system for vehicle trajectory stream data. The system is used to implement the method and includes: a modeling unit, a partitioning unit, a construction unit, an update unit, and an application unit.
[0043] The modeling unit is used to collect vehicle trajectory flow data and to perform spatiotemporal representation and modeling of the vehicle trajectory flow data;
[0044] The partitioning unit is used to divide the vehicle trajectory flow data into time partitions to obtain time partitions; and to divide the trajectory flow data of each time partition into spatial partitions to obtain partitioning results.
[0045] The construction unit is used to construct a spatiotemporal T-SP-TL learning index based on the partitioning results;
[0046] The update unit is used to maintain and update the constructed T-SP-TL learning index based on the new input data;
[0047] The application unit is used to complete spatiotemporal integrated queries based on the T-SP-TL learning index.
[0048] The present invention also provides a spatiotemporal hybrid indexing and query storage medium for vehicle trajectory stream data, wherein the storage medium stores a computer program, which is executed by a processor to implement the above-described method.
[0049] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0050] This invention is based on a multi-objective driven spatiotemporal adaptive data partitioning method. Addressing the massive and dynamic nature of trajectory flow data, it designs a highly adaptable spatiotemporal learning index structure, constructs a spatiotemporal integrated access algorithm, and establishes a collaborative update and maintenance method involving both internal and external memory, as well as global-local data. This reduces the number of I / O operations and frequent internal and external memory interactions of index nodes, improving the efficiency and timeliness of real-time updates and spatiotemporal queries for trajectory flow data. Successfully applied to the dynamic management of trajectory flow data, it accurately and efficiently obtains the required results while maintaining effectiveness, demonstrating significant technical advantages. Attached Figure Description
[0051] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart illustrating the spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data according to an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram illustrating the main process of converting a road network map into a linear map according to an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of a road network map division result according to an embodiment of the present invention;
[0055] Figure 4This is a diagram illustrating the T-SP-TL learning index structure framework of an embodiment of the present invention.
[0056] Figure 5 This is a schematic diagram of the TL learning index in an embodiment of the present invention. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0059] Example 1:
[0060] like Figure 1 As shown, this embodiment provides a spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data, including the following steps:
[0061] S1. Collect vehicle trajectory flow data and perform spatiotemporal representation and modeling of the vehicle trajectory flow data.
[0062] Specifically, it includes the following steps:
[0063] S11. Use mathematical representation methods for complex networks to digitally represent the road network and assign a unique code to each road segment.
[0064] in,
[0065] Road network diagram: A real road network can be represented as G = (V, E), where V represents a series of road vertices, V = {v1, v2, v3, ..., v...}. n E represents a road segment and connects the road vertices, E = {e1, e2, e3, ..., e}. n}
[0066] Trajectory: Trajectory Tra = (moid, [pos1, pos2, ..., pos n ],[t1,t2...,t n ]); is a triple, where moid is the unique identifier of the trajectory object, and pos n It is the location of the trajectory point object (including the identifier of the road segment where the object is located), t n It is the trajectory point pos n The time.
[0067] Linear graph: Given a road network graph G = (V, E), its linear graph can be represented as The construction method is as follows: convert the road segments in G into If the vertices in G are interconnected, then construct... The edges connecting them are defined. Each vertex has a weight, which is the number of spatial objects on the segment.
[0068] Bridge point: Given a road network graph G =<V,E> Its subgraph is subG ik and subG ij If a vertex v is simultaneously in subG ik and subG ij In the case of subG, vertex v is called the bridging point. ij The set of bridging points is B(subG) ij )express,
[0069] Joint bridging point: a subnet subG of a given G ij The set of bridging points of all its sub-networks is called the joint bridging point set, where each element in the joint bridging point set is unique. Therefore, the joint bridging point set of a non-leaf node is the union of the bridging points of all its child nodes, and the joint bridging point set of a leaf node is equivalent to the set of its bridging points. The set of joint bridging points is denoted as UB(subG). ij ).
[0070] Distance Matrix: Each tree node has a distance matrix. For non-leaf nodes, the rows and columns of the distance matrix represent the joint bridge points of the non-leaf nodes, and each value is the shortest path distance between two vertices. For leaf nodes, the rows in the distance matrix represent bridge points, the columns represent vertices in the leaf node, and each value represents the shortest path distance between a bridge point and its vertex.
[0071] Valid partition / partially valid partition / invalid partition: Given a subnetwork subG i A query point q, with a range distance d r If the distance between the bridging point and the query point of the partition is less than d r (SPDis(bi, q)≤d) r ), subG i This is called a valid partition; if the distance between the bridge point and the query point is both greater than d. r (SPDis(bi, q)>d r A partition that contains a query point is called an ineffective partition. Specifically, if the partition contains a query point, it is called a partially effective partition; if the distance between the bridge point and the query point is not all less than d... rThis is referred to as a partially valid partition.
[0072] S12. Based on the road segment topology information, combined with indicators such as road segment level and traffic flow ratio, determine the correlation between road segments and establish a comprehensive correlation model.
[0073] The correlation model RM = (N, J, S) represents the correlation between road segments, where N represents a road segment in the road network; J indicates whether corresponding road segments are directly adjacent (i.e., there is a common endpoint between road segments); and the correlation set S represents the degree of correlation between adjacent road segments. For each road segment abstracted as a node, the weight set S can be further defined using the traffic conditions (such as average flow) representing the road segment itself. The dimension of S is equal to the number of road segments associated with it.
[0074] S13. Analyze the local similarity of trajectory flow data to obtain a local similarity measurement index. In a specific example, Euclidean distance and Pearson correlation coefficient are used together to measure the similarity. The similarity index matrix ST is obtained by weighted combination of Pearson correlation coefficient and Euclidean distance.
[0075] ST = ω1D + ω2P,
[0076] In the formula, ω1 and ω2 are weight coefficients; D is the Euclidean distance matrix, and P is the Pearson correlation coefficient matrix.
[0077] S14. Based on the comprehensive correlation model, spatiotemporal correlation, and heterogeneity indicators, a spatiotemporal comprehensive similarity measurement model is constructed to analyze spatiotemporal comprehensive similarity. In a specific example, the similarity between road segments is defined by combining the road network correlation model RM, the similarity index matrix ST, and the Gaussian similarity function:
[0078]
[0079] In the formula, μ is the parameter of the Gaussian similarity function; st ij This represents the data in the i-th row and j-th column of the similarity index matrix.
[0080] S2. Divide the vehicle trajectory flow data into time partitions to obtain time zones; and divide the trajectory flow data of each time partition into spatial partitions to obtain the partitioning results.
[0081] The methods for obtaining time partitions include:
[0082] S21. Based on the time series distribution curve and data volume, and combined with time series analysis methods, solve for the time division nodes.
[0083] S22. Based on the time partitioning nodes, construct a time partition table (TP) to obtain time partitions; the time partition table records the index of the corresponding time interval, which includes a time period attribute and a pointer to a sub-index.
[0084] The methods for obtaining the partitioning results include:
[0085] S23. Set termination conditions based on the number of trajectory point objects.
[0086] For a given road network graph G and trajectory object set Trans, the termination condition is that the number of trajectory point objects contained in the leaf partition does not exceed β.
[0087] S24. Construct a linear graph based on the road network graph G and the trajectory flow object set Trans. like Figure 2 The diagram shows the main process of converting a road network map into a linear map.
[0088] S25, Linear graph Decompose into several subgraphs with equal weights. Each subgraph is then added to a spatial partitioning result set until the termination condition is met, as shown in the partitioning result. Figure 3 As shown. That is, if any bottom-level subgraph in the hierarchical partitioning result set contains more than β objects, then loop S25; otherwise, loop S25. During the hierarchical partitioning process, the partitioning criterion is to minimize the number of associated edges in the edge cut while ensuring a relatively balanced number of spatial objects in each partition.
[0089] S3. Based on the partitioning results, construct a spatiotemporal T-SP-TL learning index.
[0090] In this embodiment, the learning index has the same meaning as the second-layer model and the first-layer model described below. In specific implementations, different terminology is used at different stages. Specifically, S3 includes the following steps:
[0091] S31. Based on the characteristics of time partitioning, it is divided into historical time partitioning and current time partitioning.
[0092] S32. Construct a T-SP-TL learning index for the historical time partition and the current time partition. For example... Figure 4 The diagram shown is a framework diagram of the T-SP-TL learning index structure.
[0093] Methods for building indexes on historical time partitions include:
[0094] S321, Sub-linear graph Convert to sub-path network diagram subG iThe root node corresponds to the entire road network graph G, which is a single leaf node and initially does not contain any other tree nodes. Subnetworks of the road network graph become children of the root node, and the root node becomes a non-leaf node. Each subnetwork corresponds to an SP tree node, and the relationship between tree nodes is equal to the relationship between subnetworks. Subnetworks without subnetworks are leaf nodes.
[0095] S322. Identify bridging points for each sub-network and add them to the corresponding tree node.
[0096] S323. Encode each trajectory object in the trajectory dataset of the leaf nodes using the time feature of the trajectory point: year-month-day-hour-minute-second. Divide the trajectory dataset TraD of the leaf nodes into n subsets {TraD1, TraD2, ..., TraD...} according to the time attribute. n (e.g., time granularity is set to 1 hour); the data regions are disjoint and ordered in size, meaning the time attribute of the data in the (i+1)th data region is larger than the time attribute of the data in the ith data region; each subset corresponds to a second-layer model f. i (x); For each subset, a neural network model is used for learning, where the input of the model is the key (encoded value) of the data record, and the training label is the position of the key.
[0097] To ensure the second-layer model's prediction accuracy after training, a threshold, denoted as Maxerror, is set for its average error. When the error exceeds Maxerror, the data region corresponding to the second-layer model is further divided into two parts. Simultaneously, another second-layer model is added, increasing the number of dataset partitions to n+1. The number of second-layer models is also increased by one. The model is then relearned from the split subsets until the prediction error is less than Maxerror.
[0098] S324. After constructing the second-level model, construct the first-level model F(x); the query key (encoded value) of the first-level model is the independent variable, and the dependent variable is the corresponding number of the second-level model, thus completing the construction of the historical time partition index. A schematic diagram of the TL learning index (two-level learning index) structure is shown below. Figure 5 As shown, model 0 is the first-layer model, and models 1 to K are the second-layer models.
[0099] Methods for building an index on the current time partition include:
[0100] S325. In the case of continuous trajectory flow data, since the spatial distribution characteristics of the data within the current time interval are unknown, in order to reduce the frequent adjustments of the spatial partitions of the current dataset, the spatial distribution characteristics of the data within the current time interval can be detected and predicted based on historical datasets. Spatial distribution characteristic analysis is performed on historical trajectory flow data, and the spatial partitioning steps in S2 are carried out based on the analysis results to obtain the partitioning results.
[0101] S326. Based on the partitioning results, proceed to step S321.
[0102] S327. Measure the similarity between the spatial distribution characteristics of the current time partition data and the historical time partition data, and select the spatial division region that is most similar to the historical time partition.
[0103] S328. Use the second-layer model corresponding to the spatial division region selected in S327 as the initial network to avoid frequent training of the neural network model. Based on the initial network and the trajectory flow data of the current time partition, construct a two-layer learning index.
[0104] S4. Based on the new input data, maintain and update the constructed T-SP-TL learning index.
[0105] Specifically, S4 includes the following steps:
[0106] S41. Index updates mainly involve the current index structure, and updates typically only involve the learned index portion. To address the issue of large-scale data movement caused by new data insertion, a buffer page is connected to the last second-level model in each time partition to store the newly inserted data.<key,pos> Yes, key refers to the encoded value of the trajectory object, and pos is the location of the data. When the data is updated, the updated data is saved in the buffer page until the buffer page overflows. When the buffer page overflows, the updated data is directly input into the corresponding second-layer model to retrain the second-layer model so that it can fit the new data distribution, thereby avoiding frequent training of the neural network.
[0107] S42. When the updated data distribution changes and the amount of data handled by each second-layer model increases, causing the model to be unable to learn the data distribution well, in order to ensure that the retrained model makes the prediction as accurate as possible, when the error of the retrained model is greater than Maxerror, the data region corresponding to the model is split; the updated data is divided into two, and a second-layer model is added at the same time; at this time, the number of dataset divisions becomes n+1, and the number of second-layer models is also increased by one, and the second-layer model is used to learn the split data.
[0108] S43. Optimize and adjust the parameters of the first-layer model, and complete the maintenance and update of the T-SP-TL learning index.
[0109] S5. Complete spatiotemporal integrated query based on T-SP-TL learning index.
[0110] Spatiotemporal integrated query is: given a spatiotemporal range, query Q = (Q s Q t ), where Q s =(q, d) r ), Q t =[t s , t e Q represents the query where the shortest path distance between all valid objects and q is not greater than d. r And the object's time is within a given Q t Within the range.
[0111] Calculate Q t The intersection of this time interval with the time intervals in the TP table yields a set of time intervals Q. 1t Q 2t Q kt The initial query is mapped to a set of k queries, where Q i =(Q s Q it ), i = 1, ..., k, each query Q i By using the corresponding spatiotemporal query method, the shortest path distance between the query point q and the bridging point of the leaf node leaf(q) containing the query point q is calculated. If leaf(q) is identified as a non-valid leaf node, leaf(q) will be inserted into the set of valid tree nodes (EN). If leaf(q) is a partially valid node, the nearest neighbor partition expansion method is executed, which can search for tree nodes that may contain valid data within the query range and add valid or partially valid nodes to the set of valid nodes EN; for leaf partitions that may be valid in the set EN, according to Q... t Calculate the corresponding encoded values key1, key2, ..., key n The first-level model determines the number of the second-level model; from the corresponding second-level model, the storage location of the data record that meets the conditions is predicted, thus enabling the retrieval of data that meets the conditions and inputting it into P. obj In the data set; for the object P that meets the criteria... obj Refine the data to identify those that meet the query criteria.
[0112] Example 2:
[0113] This embodiment provides a spatiotemporal hybrid indexing and querying system for vehicle trajectory stream data, including: a modeling unit, a partitioning unit, a construction unit, an update unit, and an application unit.
[0114] The modeling unit is used to collect vehicle trajectory flow data and to perform spatiotemporal representation and modeling of the vehicle trajectory flow data.
[0115] The partitioning unit is used to divide the vehicle trajectory flow data into time partitions to obtain time partitions; and to divide the trajectory flow data of each time partition into spatial partitions to obtain the partitioning results.
[0116] The building unit is used to construct a spatiotemporal T-SP-TL learning index based on the partitioning results.
[0117] The update unit is used to maintain and update the constructed T-SP-TL learning index based on new input data.
[0118] The application unit is used to complete spatiotemporal integrated queries based on the T-SP-TL learning index.
[0119] A spatiotemporal hybrid indexing and query storage medium for vehicle trajectory stream data is also provided. The storage medium stores a computer program, which is executed by a processor to implement the above-mentioned method.
[0120] Example 3:
[0121] The query performance of the T-SP-TL learned index was tested using real trajectory flow datasets and artificially generated datasets. For the synthetic datasets, the Brinkhoff data generator was used to generate trajectory flow datasets based on the urban road networks of Oldenburg (Germany) and San Joaquin (USA). Oldenburg contains 6,105 road vertices and 7,034 road segments; the San Joaquin road network is approximately three times larger than Oldenburg, containing 18,496 road vertices and 24,123 road segments. Spatiotemporal query performance was evaluated. For the real datasets, urban taxi trajectory datasets from Nanjing and Suzhou, China, were used. The Nanjing trajectory flow dataset contains approximately 480,000 records, and the Suzhou trajectory flow dataset contains approximately 1,020,000 records. Index update performance and query performance were evaluated.
[0122] For query performance, a spatial range of 1% of the city area and a time range of 1% were selected, and 20 random queries were performed to evaluate the query time. The experimental results are as follows: for the Oldenburg dataset, the query time is 10.34 ms; for the San Joaquin dataset, the query time is 11.63 ms; for the Suzhou dataset, the query time is 66.87 ms; and for the Nanjing dataset, the query time is 44.47 ms. For update performance, only the data update performance within a single time partition was evaluated. For the Oldenburg dataset, the update time is 402.07 s; for the San Joaquin dataset, the update time is 807.79 s; for the Nanjing dataset, the update time is 996.04 s; and for the Suzhou dataset, the update time is 2034.13 s.
[0123] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data, characterized in that, Includes the following steps: S1. Collect vehicle trajectory flow data and perform spatiotemporal representation and modeling of the vehicle trajectory flow data; S2. Divide the vehicle trajectory stream data into time partitions to obtain time zones; The trajectory stream data for each time partition is spatially divided to obtain the partitioning results; the methods include: S23. Set termination conditions based on the number of trajectory point objects; S24. Construct a linear graph based on the road network map and trajectory flow object set; S25. Decompose the linear graph into several sub-linear graphs. and each sub-linear graph Add to the hierarchical partitioning result set until the termination condition is met; otherwise, loop through S25. S3. Based on the partitioning results, construct a spatiotemporal T-SP-TL learning index; S3 includes the following steps: S31. Based on the characteristics of the time partition, divide it into historical time partition and current time partition; S32. Construct a T-SP-TL learning index for the historical time partition and the current time partition; The method for building an index on the historical time partition includes: S321, Sub-linear graph Convert to sub-path network diagram Gi The root node corresponds to the entire road network diagram. G The root node is a single-leaf node that initially contains no other tree nodes; sub-networks of the road network become children of the root node, the root node becomes a non-leaf node, and each sub-network corresponds to a... SP Tree nodes, the relationships between tree nodes are equal to the relationships between subnetworks, and subnetworks without subnetworks are leaf nodes; S322. Identify bridging points for each sub-network and add them to the corresponding tree node; S323. Encode each trajectory object in the trajectory dataset of the leaf nodes using the time feature of the trajectory point: year-month-day-hour-minute-second. Divide the trajectory dataset TraD of the leaf nodes into n subsets {TraD1, TraD2, ..., TraDn} according to the time attribute. The data regions are disjoint and ordered in size, i.e., the nth subset... i The time attribute of the data in the +1 data area is compared with the first i The time attribute must be large in each data region; a second-level model is generated for each subset. fi ( x For each subset, a neural network model is used for learning, where the input to the model is the key of the data record, and the training label is the position of the key. A threshold, denoted as Maxerror, is set for the average error of the second-layer model. When the error is greater than Maxerror, the data region corresponding to the second-layer model is divided into two parts, and a second-layer model is added. At this time, the number of dataset divisions becomes n+1, and the number of second-layer models is also increased by 1. The split data subsets are relearned until the prediction error is less than Maxerror. S324. After constructing the second-layer model, construct the first-layer model. F ( x The query key of the first-level model is the independent variable, and the dependent variable is the number of the corresponding second-level model, thus completing the index construction for historical time partitioning. Methods for building an index on the current time partition include: S325. Based on the historical dataset, detect and predict the spatial distribution characteristics of the data within the current time interval; analyze the spatial distribution characteristics of the historical trajectory flow data, and perform the spatial partitioning step in S2 based on the analysis results to obtain the partitioning results. S4. Based on the new input data, maintain and update the constructed T-SP-TL learning index; S5. Complete the spatiotemporal integrated query based on the T-SP-TL learning index.
2. The spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data according to claim 1, characterized in that, In S2, the method for obtaining the time partition includes: S21. Based on the time series distribution curve and data volume of trajectory flow data, and combined with time series analysis methods, solve for the time division nodes; S22. Based on the time division node, construct a time partition table to obtain the time partition; the time partition table contains a time period attribute and a pointer.
3. The spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data according to claim 1, characterized in that, The method for building an index on the current time partition includes: S325. Perform spatial distribution feature analysis on historical trajectory flow data, and based on the analysis results, perform the spatial division step in S2 to obtain the division result; S326. Based on the division result, execute step S321; S327. Perform a similarity measurement on the results of the spatial distribution characteristic analysis, and select the spatial division region that is most similar to the historical time partition. S328. Using the second-layer model corresponding to the spatial division region selected in S327 as the initial network, a two-layer learning index is constructed based on the initial network and the trajectory flow data of the current time partition.
4. The spatiotemporal hybrid indexing and querying method for vehicle trajectory stream data according to claim 1, characterized in that, S4 includes the following steps: S41. Connect a buffer page to the last second-layer model in each time partition. When the data is updated, save the updated data in the buffer page until the buffer page overflows. When the buffer page overflows, directly input the updated data into the second-layer model and retrain the second-layer model. S42. When the updated data distribution changes and the error of the second-layer model is greater than the preset error, the updated data is split into two, and a second-layer model is added; the second-layer model is used to learn the split data. S43. Optimize the parameters of the first layer model and complete the maintenance and update of the T-SP-TL learning index.
5. A spatiotemporal hybrid indexing and querying system for vehicle trajectory stream data, the system being used to implement the method described in any one of claims 1-4, characterized in that, include: Modeling unit, partitioning unit, construction unit, update unit, and application unit; The modeling unit is used to collect vehicle trajectory flow data and to perform spatiotemporal representation and modeling of the vehicle trajectory flow data; The partitioning unit is used to divide the vehicle trajectory flow data into time partitions to obtain time partitions; and to divide the trajectory flow data of each time partition into spatial partitions to obtain partitioning results. The building unit is used to learn the index in spatiotemporal T-SP-TL based on the partitioning results; The update unit is used to maintain and update the constructed T-SP-TL learning index based on the new input data; The application unit is used to complete spatiotemporal integrated queries based on the T-SP-TL learning index.
6. A spatiotemporal hybrid indexing and query storage medium for vehicle trajectory stream data, characterized in that, The storage medium stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Learning type track indexing and querying method based on homogeneous region division on directed road network
CN117194434A
Hybrid multi-level spatio-temporal index construction method for large-scale GPS (global positioning system) trajectory data
CN117909436A