World Wide Web

, Volume 22, Issue 4, pp 1765–1797 | Cite as

Direction-aware KNN queries for moving objects in a road network

  • Dong Tianyang
  • Yuan Lulu
  • Cheng Qiang
  • Cao Bin
  • Fan JingEmail author


Recently more and more people focus on k-nearest neighbor (KNN) query processing over moving objects in road networks, e.g., taxi hailing and ride sharing. However, as far as we know, the existing k-nearest neighbor (KNN) queries take distance as the major criteria for nearest neighbor objects, even without taking direction into consideration. The main issue with existing methods is that moving objects change their locations and directions frequently over time, so the information updates cannot be processed in time and they run the risk of retrieving the incorrect KNN results. They may fail to meet users’ needs in certain scenarios, especially in the case of querying k-nearest neighbors for moving objects in a road network. In order to find the top k-nearest objects moving toward a query point, this paper presents a novel algorithm for direction-aware KNN (DAKNN) queries for moving objects in a road network. In this method, R-tree and simple grid are firstly used as the underlying index structure, where the R-tree is used for indexing the static road network and the simple grid is used for indexing the moving objects. Then, it introduces the notion of “azimuth” to represent the moving direction of objects in a road network, and presents a novel local network expansion method to quickly judge the direction of the moving objects. By considering whether a moving object is moving farther away from or getting closer to a query point, the object that is definitely not in the KNN result set is effectively excluded. Thus, we can reduce the communication cost, meanwhile simplify the computation of moving direction between moving objects and query point. Comprehensive experiments are conducted and the results show that our algorithm can achieve real-time and efficient queries in retrieving objects moving toward query point in a road network.


direction-aware road network moving objects k-nearest neighbor query 



This work is supported by following foundations: National Natural Science Foundation of China (No.61672464, No.61572437), Key Research and Development Project of Zhejiang Province (No.2015C01034, No.2017C01013), and Major Science and Technology Innovation Project of Hangzhou (No.20152011A03). Corresponding authors are Fan Jing ( and Cao Bin (


  1. 1.
    Papadias, D., Zhang, J., Mamoulis, N., et al.: Query processing in spatial network databases[J]. VLDB. 29, 802–813 (2003)Google Scholar
  2. 2.
    Kolahdouzan, M.: Shahabi C.Voronoi-based k nearest neighbor search for spatial network databases[C].proceedings of the thirtieth international conference on very large data bases-volume 30. VLDB Endowment. 840–851 (2004)Google Scholar
  3. 3.
    Huang, X., Jensen, C.S., Šaltenis, S.: The islands approach to nearest neighbor querying in spatial networks[J]. Lect. Notes Comput. Sci. 3633, 73–90 (2006)CrossRefGoogle Scholar
  4. 4.
    Zhang, P.F., Lin, H.Z., Gao, Y.J., et al.: Aggregate keyword nearest neighbor queries on road networks [J]. GeoInformatica. 22, 237–268 (2018)CrossRefGoogle Scholar
  5. 5.
    Lee, K., Lee, W.-C., Zheng, B., Tian, Y.: Road: a new spatial object search framework for road networks. TKDE. 24(3), 547–560 (2012)Google Scholar
  6. 6.
    R. Zhong, G. Li, K.-L. Tan, and L. Zhou. G-tree: an efficient index for knn search on road networks. In CIKM, pages 39–48, 2013Google Scholar
  7. 7.
    Zhong, R., Li, G., Tan, K., Zhou, L., Gong, Z.: G-tree: an efficient and scalable index for spatial search on road networks. TKDE. 27(8), 2175–2189 (2015)Google Scholar
  8. 8.
    Guttman A. R-Trees: a Dynamic Index Structure for Spatial Searching[M]. ACM, 1984Google Scholar
  9. 9.
    Beckmann N, Kriegel H P, Schneider R, et al. The R*-Tree: an Efficient and Robust Access Method for Points and Rectangles[M]. ACM, 1990Google Scholar
  10. 10.
    Frentzos, E.: Indexing objects moving on fixed networks.[J]. Lect. Notes Comput. Sci. 2750, 289–305 (2003)CrossRefGoogle Scholar
  11. 11.
    Tao Y, Faloutsos C, Papadias D, et al. Prediction and indexing of moving objects with unknown motion patterns[C].Proceedings of the 2004 ACM SIGMOD international conference on Management of data. ACM, 2004: 611–622Google Scholar
  12. 12.
    Jensen C S, Lu H, Yang B. Indexing the trajectories of moving objects in symbolic indoor space[M]. Advances in Spatial and Temporal Databases. Springer Berlin Heidelberg, 2009: 208–227Google Scholar
  13. 13.
    Huang X, Jensen C S, Lu H, et al. S-GRID: A versatile approach to efficient query processing in spatial networks[M]. Advances in Spatial and Temporal Databases. Springer Berlin Heidelberg, 2007: 93–111Google Scholar
  14. 14.
    Chen, J., Meng, X.: Update-efficient indexing of moving objects in road networks[J]. GeoInformatica. 13(4), 397–424 (2009)CrossRefGoogle Scholar
  15. 15.
    Gu, Y., Zhang, H., Wang, Z.G., et al.: Efficient moving k nearest neighbor queries over line segment objects[J]. World Wide Web. 19, 653–677 (2016)CrossRefGoogle Scholar
  16. 16.
    Xu, X.J., Bao, J.S., Yao, B., Zhou, J.Y., Tang, F.L., Guo, M.Y., Xu, J.Q.: Reverse furthest neighbors query in road networks. J. Comput. Sci. Technol. 32(1), 155–167 (2017)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Wang H, Zimmermann R. location-based query processing on moving objects in road networks[C].proc. Intl. Conf. on Very Large Data Bases (VLDB 2007). 2007: 321–332Google Scholar
  18. 18.
    Hendawi A M, Bao J, Mokbel M F, et al. Predictive tree: an efficient index for predictive queries on road networks. International Conference on Data Engineering, 2015Google Scholar
  19. 19.
    Li G, Feng J, Xu J. Desks: direction-aware spatial keyword search[C]. IEEE 28th International Conference on Data Engineering (ICDE), 2012: 474–485Google Scholar
  20. 20.
    Lee, M.J., Choi, D.W., Kim, S.Y., Park, H.M., Choi, S., Chung, C.W.: The direction-constrained k nearest neighbor query[J]. GeoInformatica. 20(3), 471–502 (2016)CrossRefGoogle Scholar
  21. 21.
    Lee K W, Choi D W, Chung C W. Dart: an Efficient Method for Direction-Aware Bichromatic Reverse K Nearest Neighbor Queries[M]. Advances in Spatial and Temporal Databases. Springer Berlin Heidelberg, 2013: 295–311Google Scholar
  22. 22.
    Sharifzadeh M, Shahabi C. VoR-tree: R-trees with Voronoi diagrams for efficient processing of spatial nearest neighbor queries.[J]. Proceedings of the Vldb Endowment, 2010:1231–1242, 3Google Scholar
  23. 23.
    Cary A, Wolfson O, Rishe N. Efficient and scalable method for processing top-k spatial boolean queries[C].Scientific and Statistical Database Management. Springer Berlin Heidelberg, 2010: 87–95Google Scholar
  24. 24.
    Zheng K, Shang S, Yuan N J, et al. Toward efficient search for activity trajectories[C]. 2013 IEEE 29th international conference on data engineering (ICDE). IEEE, 2013: 230–241Google Scholar
  25. 25.
    Yu X, Pu K Q, Koudas N. monitoring k-nearest neighbor queries over moving objects[C]. 2014 IEEE 30th international conference on data engineering IEEE computer Society, 2005:631–642Google Scholar
  26. 26.
    Brinkhoff, T.: A framework for generating network-based moving objects[J]. GeoInformatica. 6(2), 153–180 (2002)CrossRefzbMATHGoogle Scholar
  27. 27.
    Dong, T., Cheng, Q., Cao, B., Shi, J.: A novel approach to distributed rule matching and multiple firing based on MapReduce[J]. J. Database Manag. 29(2), 62–84 (2018)CrossRefGoogle Scholar
  28. 28.
    Huang, S.-C., Jiau, M.-K., Lin, C.-H.: Optimization of the carpool service problem via a fuzzy-controlled genetic algorithm[C]. IEEE Trans. Fuzzy Syst. 23, 1698–1712 (2015)CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.College of ComputerZhejiang University of TechnologyHangzhouChina

Personalised recommendations