Skip to main content
Log in

Towards robust trajectory similarity computation: Representation-based spatio-temporal similarity quantification

  • Published:
World Wide Web Aims and scope Submit manuscript

Abstract

Quantifying the trajectory similarity is a fundamental functionality in analysis tasks of spatio-temporal data. Existing classic methods compute the trajectory similarity based on point matching, which are unable to cope with low-quality trajectories (e.g., have non-uniform sampling rates or noise points), especially when we take both spatial coordinates and the time components into account. While some studies with deep learning methods exist, they did not consider the time components of trajectories and the robustness of similarity measure simultaneously, thus they fail to retrieve similarity-based queries in spatio-temporal databases where time components of trajectories are also important. In practice, the time-aware trajectory similarity computation can be better applied to diverse scenarios, yet the time complexity also heavily increases. To enable efficient and robust similarity computation on massive-scale trajectories, we developed a novel RSTS model based on deep representation learning, in which we take the time components into account. Extensive experiments show that our proposal constantly outperforms another two methods, and the similarity measure based on our RSTS model is robust to low-quality trajectories.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Data availability

All datasets used in this paper are open datasets.

Notes

  1. For simplicity, hereon we will use token and cell interchangeably to refer to a spatio-temporal cell where the context is clear.

    Fig. 2
    figure 2

    Space partition and token generation

  2. https://www.microsoft.com/en-us/research/publication/t-drive-trajectory-data-sample/

  3. https://www.kaggle.com/c/pkdd-15-predict-taxi-service-trajectory-i/data

References

  1. Vlachos, M., Gunopulos, D., Kollios, G.: Discovering similar multidimensional trajectories. In: Agrawal, R., Dittrich, K.R. (eds.) Proceedings of the 18th International Conference on Data Engineering. https://doi.org/10.1109/ICDE.2002.994784. IEEE Computer Society (2002)

  2. Chen, L., Özsu, M.T., Oria, V.: Robust and fast similarity search for moving object trajectories. In: Özcan, F. (ed.) Proceedings of the ACM SIGMOD International Conference on Management of Data. https://doi.org/10.1145/1066157.1066213, pp 491–502. ACM (2005)

  3. Ranu, S., P, D., Telang, A.D., Deshpande, P., Raghavan, S.: Indexing and matching trajectories under inconsistent sampling rates. In: Gehrke, J., Lehner, W., Shim, K., Cha, S.K., Lohman, G.M. (eds.) 31st IEEE International Conference on Data Engineering, ICDE 2015. https://doi.org/10.1109/ICDE.2015.7113351, pp 999–1010. IEEE Computer Society (2015)

  4. Chen, L., Ng, R.T.: On the marriage of lp-norms and edit distance. In: Nascimento, M.A., Özsu, M.T., Kossmann, D., Miller, R.J., Blakeley, J.A., Schiefer, K.B. (eds.) (e)Proceedings of the Thirtieth International Conference on Very Large Data Bases, VLDB 2004. https://doi.org/10.1016/B978-012088469-8.50070-X, http://www.vldb.org/conf/2004/RS21P2.PDF, pp 792–803. Morgan Kaufmann (2004)

  5. Zheng, K., Zheng, Y., Xie, X., Zhou, X.: Reducing uncertainty of low-sampling-rate trajectories. In: IEEE 28th International Conference on Data Engineering (ICDE 2012). https://doi.org/10.1109/ICDE.2012.42, pp 1144–1155. IEEE Computer Society (2012)

  6. Li, X., Zhao, K., Cong, G., Jensen, C.S., Wei, W.: Deep representation learning for trajectory similarity computation. In: 34th IEEE International Conference on Data Engineering, ICDE. https://doi.org/10.1109/ICDE.2018.00062, pp 617–628 (2018)

  7. Pfoser, D., Jensen, C.S., Theodoridis, Y.: Novel approaches to the indexing of moving object trajectories. In: VLDB 2000, Proceedings of 26th International Conference on Very Large Data Bases. http://www.vldb.org/conf/2000/P395.pdf, pp 395–406. Morgan Kaufmann (2000)

  8. Sun, S., Chen, J., Sun, J.: Traffic congestion prediction based on GPS trajectory data. Int. J. Distributed Sens Netw. 15(5). https://doi.org/10.1177/1550147719847440(2019)

  9. Gomes, G.A.M., dos Santos, E.M., Vidal, C.A, da Silva, T.L.C., de Macêdo, J.A.F.: Real-time discovery of hot routes on trajectory data streams using interactive visualization based on GPU. Comput. Graph. 76, 129–141 (2018). https://doi.org/10.1016/j.cag.2018.09.008

    Article  Google Scholar 

  10. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. In: ICLR (Workshop Poster) (2013)

  11. Bütepage, J., Black, M.J., Kragic, D., Kjellström, H.: Deep representation learning for human motion prediction and classification. In: 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR. https://doi.org/10.1109/CVPR.2017.173, pp 1591–1599 (2017)

  12. Yao, H., Zhang, S., Hong, R., Zhang, Y., Xu, C., Tian, Q.: Deep representation learning with part loss for person re-identification. IEEE Trans. Image Process. 28(6), 2860–2871 (2019). https://doi.org/10.1109/TIP.2019.2891888

    Article  MathSciNet  MATH  Google Scholar 

  13. Rumhar, D., offry. Hnon‡, Wams, R.: Learning representations by back-propagating errors. Nature (1986)

  14. Werbos, P.J.: Backpropagation through time: what it does and how to do it. Proc. IEEE 78(10), 1550–1560 (1990)

    Article  Google Scholar 

  15. Zhang, Y., Dai, H., Xu, C., Feng, J., Wang, T., Bian, J., Wang, B., Liu, T.: Sequential click prediction for sponsored search with recurrent neural networks. In: Brodley, C. E., Stone, P (eds.) Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence. http://www.aaai.org/ocs/index.php/AAAI/AAAI14/paper/view/8529, pp 1369–1375. AAAI Press, Québec City (2014)

  16. Gao, Q., Zhou, F., Zhang, K., Trajcevski, G., Luo, X., Zhang, F.: Identifying human mobility via trajectory embeddings. In: Sierra, C. (ed.) Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI. ijcai.org. https://doi.org/10.24963/ijcai.2017/234, pp 1689–1695 (2017)

  17. Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. In: Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems. http://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks, pp 3104–3112 (2014)

  18. Wang, H., Su, H., Zheng, K., Sadiq, S.W., Zhou, X.: An effectiveness study on trajectory similarity measures. In: ADC. CRPIT, vol. 137, pp 13–22 (2013)

  19. Cancela, B., Ortega, M., Fernández, A., Penedo, M.G.: Trajectory similarity measures using minimal paths. In: Image Analysis and Processing - ICIAP 2013 - 17th International Conference, Naples, Italy, September 9-13, 2013. Proceedings, Part I. Lecture Notes in Computer Science. https://doi.org/10.1007/978-3-642-41181-6∖_41, vol. 8156, pp 400–409 (2013)

  20. Frentzos, E., Gratsias, K., Theodoridis, Y.: Index-based most similar trajectory search. In: Chirkova, R., Dogac, A., Özsu, M.T., Sellis, T.K. (eds.) Proceedings of the 23rd International Conference on Data Engineering, ICDE 2007. https://doi.org/10.1109/ICDE.2007.367927, pp 816–825. IEEE Computer Society (2007)

  21. Chen, L., Shang, S., Jensen, C.S., Yao, B., Zhang, Z., Shao, L.: Effective and efficient reuse of past travel behavior for route recommendation. In: Teredesai, A, Kumar, V., Li, Y., Rosales, R., Terzi, E., Karypis, G. (eds.) Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD. https://doi.org/10.1145/3292500.3330835, pp 488–498. ACM (2019)

  22. Shang, S., Chen, L., Wei, Z., Jensen, C. S., Zheng, K., Kalnis, P.: Trajectory similarity join in spatial networks. Proc. VLDB Endow. 10(11), 1178–1189 (2017). https://doi.org/10.14778/3137628.3137630

    Article  Google Scholar 

  23. Shang, S., Chen, L., Jensen, C.S., Wen, J., Kalnis, P.: Searching trajectories by regions of interest. IEEE Trans. Knowl. Data Eng. 29(7), 1549–1562 (2017). https://doi.org/10.1109/TKDE.2017.2685504

    Article  Google Scholar 

  24. Shang, S., Ding, R., Zheng, K., Jensen, C.S., Kalnis, P., Zhou, X.: Personalized trajectory matching in spatial networks. VLDB J. 23 (3), 449–468 (2014). https://doi.org/10.1007/s00778-013-0331-0

    Article  Google Scholar 

  25. Chen, L., Shang, S., Guo, T.: Real-time route search by locations. In: The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020. https://ojs.aaai.org/index.php/AAAI/article/view/5396, pp 574–581. AAAI Press (2020)

  26. Zhang, C., Han, J., Shou, L., Lu, J., Porta, T.L.: Splitter: Mining fine-grained sequential patterns in semantic trajectories. Proc. VLDB Endow. 7(9), 769–780 (2014). https://doi.org/10.14778/2732939.2732949

    Article  Google Scholar 

  27. Agrawal, R., Faloutsos, C., Swami, A.N.: Efficient similarity search in sequence databases. In: Lomet, D.B. (ed.) Foundations of Data Organization and Algorithms, 4th International Conference, FODO’93, Chicago, Illinois, USA, October 13-15, 1993, Proceedings. Lecture Notes in Computer Science. https://doi.org/10.1007/3-540-57301-1∖_5, vol. 730, pp 69–84 (1993)

  28. Yi, B., Jagadish, H. V., Faloutsos, C.: Efficient retrieval of similar time sequences under time warping. In: Proceedings of the Fourteenth International Conference on Data Engineering. https://doi.org/10.1109/ICDE.1998.655778, pp 201–208. IEEE Computer Society (1998)

  29. Cai, Y., Ng, R. T.: Indexing spatio-temporal trajectories with chebyshev polynomials. In: Weikum, G., König, A.C., Deßloch, S. (eds.) Proceedings of the ACM SIGMOD International Conference on Management of Data. https://doi.org/10.1145/1007568.1007636, pp 599–610. ACM (2004)

  30. Shang, S., Ding, R., Yuan, B., Xie, K., Zheng, K., Kalnis, P.: User oriented trajectory search for trip recommendation. In: Rundensteiner, E.A., Markl, V., Manolescu, I., Amer-Yahia, S., Naumann, F., Ari, I. (eds.) 15th International Conference on Extending Database Technology. https://doi.org/10.1145/2247596.2247616, pp 156–167. ACM (2012)

  31. Zheng, K., Shang, S., Yuan, N. J., Yang, Y.: Towards efficient search for activity trajectories. In: Jensen, C.S., Jermaine, C.M., Zhou, X. (eds.) 29th IEEE International Conference on Data Engineering. https://doi.org/10.1109/ICDE.2013.6544828, pp 230–241. IEEE Computer Society (2013)

  32. Chen, L., Shang, S., Jensen, C. S., Yao, B., Kalnis, P.: Parallel semantic trajectory similarity join. In: 36th IEEE International Conference on Data Engineering, ICDE 2020. https://doi.org/10.1109/ICDE48307.2020.00091, pp 997–1008. IEEE (2020)

  33. Shang, S., Chen, L., Wei, Z., Jensen, C.S., Zheng, K., Kalnis, P.: Parallel trajectory similarity joins in spatial networks. VLDB J. 27(3), 395–420 (2018). https://doi.org/10.1007/s00778-018-0502-0

    Article  Google Scholar 

  34. Chen, L., Shang, S., Feng, S., Kalnis, P.: Parallel subtrajectory alignment over massive-scale trajectory data. In: Zhou, Z. (ed.) Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021. https://doi.org/10.24963/ijcai.2021/497, pp 3613–3619 (2021)

  35. Shang, S., Chen, L., Zheng, K., Jensen, C.S., Wei, Z., Kalnis, P.: Parallel trajectory-to-location join. IEEE Trans. Knowl. Data Eng. 31(6), 1194–1207 (2019). https://doi.org/10.1109/TKDE.2018.2854705

    Article  Google Scholar 

  36. Yao, D., Zhang, C., Zhu, Z., Huang, J., Bi, J.: Trajectory clustering via deep representation learning. In: 2017 International Joint Conference on Neural Networks, IJCNN. https://doi.org/10.1109/IJCNN.2017.7966345, pp 3880–3887. IEEE (2017)

  37. Liu, Y., Zhao, K., Cong, G., Bao, Z.: Online anomalous trajectory detection with deep generative sequence modeling. In: 36th IEEE International Conference on Data Engineering, ICDE. https://doi.org/10.1109/ICDE48307.2020.00087, pp 949–960 (2020)

  38. Zhang, Y., Liu, A., Liu, G., Li, Z., Li, Q.: Deep representation learning of activity trajectory similarity computation. In: 2019 IEEE International Conference on Web Services, ICWS. https://doi.org/10.1109/ICWS.2019.00059, pp 312–319 (2019)

  39. Yao, D., Cong, G., Zhang, C., Bi, J.: Computing trajectory similarity in linear time: A generic seed-guided neural metric learning approach. In: 35th IEEE International Conference on Data Engineering, ICDE. https://doi.org/10.1109/ICDE.2019.00123, vol. 730, pp 1358–1369 (2019)

  40. Zhang, H., Zhang, X., Jiang, Q., Zheng, B., Sun, Z., Sun, W., Wang, C.: Trajectory similarity learning with auxiliary supervision and optimal matching. In: Bessiere, C. (ed.) Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020. https://doi.org/10.24963/ijcai.2020/444, pp 3209–3215 (2020)

  41. Yang, C., Chen, L., Wang, H., Shang, S.: Towards efficient selection of activity trajectories based on diversity and coverage. In: Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021. https://ojs.aaai.org/index.php/AAAI/article/view/16149, pp 689–696 (2021)

  42. Zhao, Y., Chen, Q., Cao, W., Yang, J., Xiong, J., Gui, G.: Deep learning for risk detection and trajectory tracking at construction sites. IEEE Access 7, 30905–30912 (2019). https://doi.org/10.1109/ACCESS.2019.2902658

    Article  Google Scholar 

  43. Fan, Z., Chen, Q., Jiang, R., Shibasaki, R., Song, X., Tsubouchi, K.: Deep multiple instance learning for human trajectory identification. In: Kashani, F.B., Trajcevski, G., Güting, R.H., Kulik, L., Newsam, S.D. (eds.) Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. https://doi.org/10.1145/3347146.3359342, pp 512–515 (2019)

  44. Han, P., Wang, J., Yao, D., Shang, S., Zhang, X.: A graph-based approach for trajectory similarity computation in spatial networks. In: Zhu, F., Ooi, B.C., Miao, C. (eds.) KDD ’21: The 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. https://doi.org/10.1145/3447548.3467337, pp 556–564. ACM (2021)

  45. Bengio, Y., Courville, A.C., Vincent, P.: Representation learning: A review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell. 35(8), 1798–1828 (2013). https://doi.org/10.1109/TPAMI.2013.50

    Article  Google Scholar 

  46. Miao, C., Wang, J., Yu, H., Zhang, W., Qi, Y.: Trajectory-user linking with attentive recurrent network. In: Seghrouchni, A.E.F., Sukthankar, G., An, B., Yorke-Smith, N. (eds.) Proceedings of the 19th International Conference on Autonomous Agents and Multiagent Systems, AAMAS. https://dl.acm.org/doi/abs/10.5555/3398761.3398864, pp 878–886. International Foundation for Autonomous Agents and Multiagent Systems (2020)

  47. Wang, S., Bao, Z., Culpepper, J.S., Xie, Z., Liu, Q., Qin, X.: Torch: A search engine for trajectory data. In: Collins-Thompson, K., Mei, Q., Davison, B.D., Liu, Y., Yilmaz, E. (eds.) The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR. https://doi.org/10.1145/3209978.3209989, pp 535–544. ACM (2018)

  48. Xia, Y., Wang, G., Zhang, X., Kim, G. B., Bae, H.: Spatio-temporal similarity measure for network constrained trajectory data. Int. J. Comput. Intell. Syst. 4(5), 1070–1079 (2011). https://doi.org/10.1080/18756891.2011.9727855

    Google Scholar 

  49. Fu, T., Lee, W.: Trembr: Exploring road networks for trajectory representation learning. ACM Trans. Intell. Syst. Technol. 11(1), 10–11025 (2020). https://doi.org/10.1145/3361741

    Article  Google Scholar 

  50. Yuan, H., Li, G.: Distributed in-memory trajectory similarity search and join on road network. In: 35th IEEE International Conference on Data Engineering, ICDE. https://doi.org/10.1109/ICDE.2019.00115, pp 1262–1273. IEEE (2019)

  51. Newson, P., Krumm, J.: Hidden markov map matching through noise and sparseness. In: Agrawal, D., Aref, W.G., Lu, C., Mokbel, M.F., Scheuermann, P., Shahabi, C., Wolfson, O. (eds.) 17th ACM SIGSPATIAL International Symposium on Advances in Geographic Information Systems, ACM-GIS, 2009. https://doi.org/10.1145/1653771.1653818, pp 336–343. ACM (2009)

  52. Lou, Y., Zhang, C., Zheng, Y., Xie, X., Wang, W., Huang, Y.: Map-matching for low-sampling-rate GPS trajectories. In: Agrawal, D., Aref, W.G., Lu, C., Mokbel, M.F., Scheuermann, P., Shahabi, C., Wolfson, O. (eds.) 17th ACM SIGSPATIAL International Symposium on Advances in Geographic Information Systems, ACM-GIS. https://doi.org/10.1145/1653771.1653820, pp 352–361. ACM (2009)

  53. Brakatsoulas, S., Pfoser, D., Salas, R., Wenk, C.: On map-matching vehicle tracking data. In: Böhm, K., Jensen, C.S., Haas, L.M., Kersten, M.L., Larson, P., Ooi, B.C. (eds.) Proceedings of the 31st International Conference on Very Large Data Bases. http://www.vldb.org/archives/website/2005/program/paper/fri/p853-brakatsoulas.pdf, pp 853–864. ACM (2005)

  54. Yuan, J., Zheng, Y., Zhang, C., Xie, X., Sun, G.: An interactive-voting based map matching algorithm. In: Hara, T., Jensen, C.S., Kumar, V., Madria, S., Zeinalipour-Yazti, D. (eds.) Eleventh International Conference on Mobile Data Management, MDM. https://doi.org/10.1109/MDM.2010.14, pp 43–52. IEEE Computer Society (2010)

  55. Su, H., Zheng, K., Wang, H., Huang, J., Zhou, X.: Calibrating trajectory data for similarity-based analysis. In: Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD. https://doi.org/10.1145/2463676.2465303, pp 833–844 (2013)

  56. Güting, R.H., Schneider, M.: Realm-based spatial data types: The ROSE algebra. VLDB J. 4(2), 243–286 (1995)

    Article  Google Scholar 

  57. Schroff, F., Kalenichenko, D., Philbin, J.: Facenet: A unified embedding for face recognition and clustering. In: CVPR, pp 815–823 (2015)

  58. Yuan, J., Zheng, Y., Xie, X., Sun, G.: Driving with knowledge from the physical world. In: Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. https://doi.org/10.1145/2020408.2020462, pp 316–324 (2011)

  59. Yuan, J., Zheng, Y., Zhang, C., Xie, W., Xie, X., Sun, G., Huang, Y.: T-drive: driving directions based on taxi trajectories. In: 18th ACM SIGSPATIAL International Symposium on Advances in Geographic Information Systems, ACM-GIS 2010. https://doi.org/10.1145/1869790.1869807, pp 99–108 (2010)

  60. Su, H., Liu, S., Zheng, B., Zhou, X., Zheng, K.: A survey of trajectory distance measures and performance evaluation. VLDB J. 29(1), 3–32 (2020). https://doi.org/10.1007/s00778-019-00574-9

    Article  Google Scholar 

Download references

Acknowledgements

We also acknowledge the editorial committee’s support and all anonymous reviewers for their insightful comments and suggestions, which improved the content and presentation of this manuscript.

Funding

This work was supported by the NSFC (U2001212, U21B2046, 62032001, and 61932004).

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the study conception and model design. Ziwen Chen and Ke Li worked on the full manuscript. The first draft of the manuscript was written by Ziwen Chen and Ke Li. Lisi Chen and Shuo Shang wrote the Section 1–2. Ziwen Chen and Ke Li prepared the Section 3–5. The expermental study was conducted by Silin Zhou. All authors commented on previous versions of the manuscript. All authors proof-read and approved the final manuscript.

Corresponding author

Correspondence to Ke Li.

Ethics declarations

Competing interests

We declare that authors have no known competing interests or personal relationships that might be perceived to determine the discussion report in this paper.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Ke Li is the contact author.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chen, Z., Li, K., Zhou, S. et al. Towards robust trajectory similarity computation: Representation-based spatio-temporal similarity quantification. World Wide Web 26, 1271–1294 (2023). https://doi.org/10.1007/s11280-022-01085-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11280-022-01085-4

Keywords

Navigation