TANG Na, LI Hao, LI Jing-Jing, CHEN Wei-Qi, TANG Yong
Accepted: 2025-12-12
With the development of mobile terminal positioning technology, the scale of trajectory data has increased dramatically. The storage and rapid query of massive trajectory data have become research hotspots. The distributed framework can provide efficient data processing capabilities. This paper first proposes a local trajectory index TRindex, which effectively preserves the proximity of temporal and spatial data and supports spatiotemporal queries. This paper also designs a multi-layer range circle mapping method in TRindex, maps the spatial minimum bounding rectangle (MBR) to a one-dimensional axis, establishes an order of the distance from the trajectory to the center of the range circle, and builds a spatial range tree based on this order. This design ensures spatial proximity, providing spatial proximity for range queries. It also forms an ordered relationship between the distances from trajectories to reference points, enabling efficient pruning of K-nearest neighbor queries and effectively reducing the problem of duplicate calculations in K-nearest neighbor queries. Finally, based on TRindex, this paper constructs a distributed trajectory index (DTRindex), which consists of three main components: data partitioning, local indexing, and global indexing. The global index is a modified R*-tree with a Bloom filter applied to each node, effectively improving query efficiency.The DTRindex effectively supports three spatiotemporal query algorithms: spatiotemporal range queries, K-nearest neighbor queries, and mobile object trajectory queries. Finally, the Hadoop-based distributed trajectory index HadoopTrajectory, the single-machine index PM-tree, and the NoSQL-based distributed trajectory index TMan were selected as experimental counterparts for comparison. Through simulation experiments, DTRindex has been demonstrated to exhibit superior performance across multiple metrics: in spatio-temporal range query efficiency, it achieves average improvements of approximately 57%, 74%, and 25% compared to HadoopTrajectory, PM-tree, and TMan respectively; For k-nearest neighbour queries, performance improved by 40%, 48%, and 20% on average; for mobile object trajectory queries, efficiency increased by 50%, 53%, and 30%. Furthermore, ablation experiments validated the effectiveness of each core module. The spatial range tree layer contributed most significantly, achieving an overall average performance improvement of 2.5times. The temporal index layer contributed secondarily, yielding an average performance improvement of 1.2 times. The moving object double linked list contributed approximately 90% to the average performance improvement, making its contribution most substantial in moving object trajectory queries, where efficiency increased nearly fourfold.