Trajectory similarity measures act as query predicates in trajectory databases, making them the key player in determining the query results. They also have a heavy impact on the query efficiency. An ideal measure should have the capability to accurately evaluate the similarity between any two trajectories in a very short amount of time. Towards this aim, we propose a contrastive learning-based trajectory modeling method named TrajCL. We present four trajectory augmentation methods and a novel dual-feature self-attention-based trajectory backbone encoder. The resultant model can jointly learn both the spatial and the structural patterns of trajectories. Our model does not involve any recurrent structures and thus has a high efficiency. Besides, our pre-trained backbone encoder can be fine-tuned towards other computationally expensive measures with minimal supervision data. Experimental results show that TrajCL is consistently and significantly more accurate than the state-of-the-art trajectory similarity measures. After fine-tuning, i.e., to serve as an estimator for heuristic measures, TrajCL can even outperform the state-of-the-art supervised method by up to 56% in the accuracy for processing trajectory similarity queries.
翻译:轨迹相似性度量作为轨迹数据库中的查询谓词,是决定查询结果的关键因素,同时也对查询效率产生重大影响。理想的度量方法应具备在极短时间内准确评估任意两条轨迹相似性的能力。为此,我们提出了一种基于对比学习的轨迹建模方法TrajCL,该方法包含四种轨迹增强策略与一种新颖的双特征自注意力轨迹主干编码器。该模型能够联合学习轨迹的空间模式与结构模式,且不涉及任何递归结构,因而具有较高的计算效率。此外,预训练的主干编码器可通过极少量监督数据针对其他高计算开销的度量方法进行微调。实验结果表明,TrajCL在精度上始终显著优于当前最先进的轨迹相似性度量方法;经微调后(即作为启发式度量的估计器),其在处理轨迹相似性查询时的精度甚至可超越最先进的有监督方法高达56%。