Trajectory Data Query via Spatial-Temporal Index Sampling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current trajectory data query methods in spatial-temporal databases are inefficient, requiring a long time to scan large spatial-temporal areas, especially when dealing with vast amounts of data, leading to prolonged query times and resource usage.
Innovation Solution
Establishing a spatial-temporal index and an inverted index, with the inverted index forming a correspondence table between trajectories and index leaf nodes, allowing for sampling-based query processing that avoids scanning all trajectory data in the query-related area, using an unbiased estimation operator for accurate results.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If all trajectory data in a query-related spatial-temporal area is scanned to obtain accurate query results, then query accuracy is improved, but query time increases significantly
Solution Approach 1:
The patent applies partial action by sampling a subset of index leaf nodes rather than scanning all leaf nodes in the spatial-temporal area. The sampling process selects a representative subset that provides sufficient statistical information to estimate query results without examining every possible data point, thus reducing query time while maintaining acceptable accuracy.
Solution Approach 2:
The patent creates a sampling copy of the index leaf nodes instead of working with the complete dataset. By constructing a sampled representation that mirrors the structure of the full index, the system can perform queries on this smaller copy, achieving faster response times while the statistical properties of the sample ensure result accuracy.
2Productivity
If a spatial-temporal index is established to enable efficient querying, then query efficiency is improved, but system complexity increases
Solution Approach 1:
The patent segments the spatial-temporal database into index leaf nodes, which are further segmented into sampling units. This hierarchical segmentation allows the complex index structure to be managed through modular components, where each leaf node can be independently sampled and processed, reducing the complexity of handling the overall index during query operations.
Solution Approach 2:
The patent introduces a sampling mechanism as an intermediary between the complex spatial-temporal index and the query processing system. This intermediary layer abstracts the complexity of the full index structure, providing a simplified sampled representation that can be efficiently processed while maintaining the benefits of the comprehensive index structure.
3Loss of time
If sampling is performed on index leaf nodes to reduce query time, then query time is shortened, but query result accuracy may be compromised
Solution Approach 1:
The patent incorporates feedback mechanisms in the sampling process by statistically evaluating the sampled leaf nodes to ensure they represent the overall data distribution accurately. The sampling strategy adjusts based on feedback from the data characteristics, selecting samples that maximize representativeness, thus ensuring query result accuracy is maintained despite the reduced scope of examination.
Solution Approach 2:
The patent changes parameters related to sampling size, selection criteria, and statistical methods to optimize the balance between query time and result accuracy. By adjusting these parameters dynamically based on query requirements and data characteristics, the system can achieve faster query times while maintaining the necessary accuracy thresholds for reliable results.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention discloses a trajectory data query method and apparatus, which relate to the field of database technologies, and can shorten a trajectory data query time. The method includes: establishing a spatial-temporal index and an inverted index for trajectory data in a spatial-temporal database, where the inverted index is used to form a first relationship correspondence table that includes a correspondence between each trajectory and its associated index leaf node; performing sampling for an index leaf node included in a space area specified by a user, where a quantity of index leaf nodes in the space area and a quantity of index leaf nodes obtained by sampling are determined; determining, according to the index leaf nodes obtained by sampling and the first relationship correspondence table, a correspondence between each trajectory included in the index leaf nodes obtained by sampling and an index leaf node associated with the trajectory, to form a second relationship correspondence table; and determining an unbiased estimation operator according to the quantity of index leaf nodes in the space area, the quantity of index leaf nodes obtained by sampling, and data in the second relationship correspondence table, and determining a query result by means of calculation.