Skip to main content
Log in

NALMO: Transforming Queries in Natural Language for Moving Objects Databases

  • Published:
GeoInformatica Aims and scope Submit manuscript

Abstract

Moving objects databases (MODs) have been extensively studied due to their wide variety of applications including traffic management, tourist service and mobile commerce. However, queries in natural languages are still not supported in MODs. Since most users are not familiar with structured query languages, it is essentially important to bridge the gap between natural languages and the underlying MODs system commands. Motivated by this, we design a natural language interface for moving objects, named NALMO. In general, we use semantic parsing in combination with a location knowledge base and domain-specific rules to interpret natural language queries. We design a corpus of moving objects queries for model training, which is later used to determine the query type. Extracted entities from parsing are mapped through deterministic rules to perform query composition. NALMO is able to well translate moving objects queries into structured (executable) languages. We support five kinds of queries including time interval queries, range queries, nearest neighbor queries, trajectory similarity queries and join queries. We develop the system in a prototype system SECONDO and evaluate our approach using 280 natural language queries extracted from popular conference and journal papers in the domain of moving objects. Four volunteers give the system satisfaction and related suggestions through three rounds of independent tests. Experimental results show that (i) NALMO achieves accuracy and precision 96.8% and 81.1%, respectively, (ii) the average time cost of translating a query is 1.49s, and (iii) the average satisfaction is 95.5%.

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
Algorithm 1
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Data Availability

The datasets generated and analysed during this study are available at: https://pan.nuaa.edu.cn/share/3208e9a270de8389f9477d1cda or https://pan.baidu.com/s/1TVTPPZmDQ4nT8E7wXOXaAA?pwd=3qjc.

References

  1. Affolter K, Stockinger K, Bernstein A (2019) A comparative survey of recent natural language interfaces for databases. VLDB J 28(5):793–819

    Article  Google Scholar 

  2. Amsterdamer Y, Kukliansky A, Milo T (2015) Nl2cm: A natural language interface to crowd mining. In: ACM SIGMOD, pp 1433–1438

  3. Artzi Y, Zettlemoyer LS (2011) Bootstrapping semantic parsers from conversations. EMNLP 2011:421–432

    Google Scholar 

  4. Baik C, Jagadish HV, Li Y (2019) Bridging the semantic gap with SQL query logs in natural language interfaces to databases. ICDE 2019:374–385

    Google Scholar 

  5. Booth J, Eugenio BD, Cruz IF, Wolfson O (2015) Robust natural language processing for urban trip planning. Appl Artif Intell 29(9):859–903

    Article  Google Scholar 

  6. Chakka VP, Everspaugh A, Patel JM (2003) Indexing large trajectory data sets with SETI. In: CIDR

  7. Cheng J, Reddy S, Saraswat VA, Lapata M (2017) Learning structured natural language representations for semantic parsing. ACL 2017:44–55

    Google Scholar 

  8. Chon HD, Agrawal D, Abbadi AE (2003) Range and knn query processing for moving objects in grid model. Mob Networks Appl 8(4):401–412

    Article  Google Scholar 

  9. Damljanovic D, Agatonovic M, Cunningham H (2011) Freya: An interactive way of querying linked data using natural language. ESWC, Lecture Notes in Computer Science 7117:125–138

    Article  Google Scholar 

  10. Deutch D, Frost N, Gilad A, Haimovich T (2018) Nlprovenans: Natural language provenance for non-answers. Proc VLDB Endow 11(12):1986–1989

    Article  Google Scholar 

  11. Deutch D, Frost N, Gilad A (2020) Explaining natural language query results. VLDB J 29(1):485–508

    Article  Google Scholar 

  12. Dong L, Lapata M (2018) Coarse-to-fine decoding for neural semantic parsing. ACL 2018:731–742

    Google Scholar 

  13. Ferré S (2017) Sparklis: An expressive query builder for SPARQL endpoints with guidance in natural language. Semantic Web 8(3):405–418

    Article  Google Scholar 

  14. Giordani A, Moschitti A (2012) Translating questions to SQL queries with generative parsers discriminatively reranked. In: COLING, pp 401–410

  15. Gur I, Yavuz S, Su Y, Yan X (2018) Dialsql: Dialogue based structured query generation. In: ACL, pp 1339–1349

  16. Gü R, Almeida Vd, Ding Z (2006) Modeling and querying moving objects in networks. VLDB Journal 15(2):165–190

    Article  Google Scholar 

  17. Güting RH, Schneider M (2005) Moving Objects Databases. Elsevier

  18. Güting RH, Behr T, Düntgen C (2010) SECONDO: A platform for moving objects database research and for publishing and integrating research implementations. IEEE Data Eng Bull 33(2):56–63

    Google Scholar 

  19. Güting RH, Behr T, Xu J (2010) Efficient k-nearest neighbor search on moving object trajectories. VLDB J 19(5):687–714

    Article  Google Scholar 

  20. Iyer S, Konstas I, Cheung A, Krishnamurthy J, Zettlemoyer L (2017) Learning a neural semantic parser from user feedback. In: ACL, pp 963–973

  21. Jensen C, Lu H, Yang B (2009) Graph model based indoor tracking. In: MDM, pp 122-131

  22. Jia Z, Abujabal A, Roy RS, Strötgen J, Weikum G (2018) TEQUILA: temporal question answering over knowledge bases. In: ACM CIKM, pp 1807–1810

  23. Jia Z, Pramanik S, Roy RS, Weikum G (2021) Complex temporal question answering on knowledge graphs. In: CIKM ’21, pp 792–802

  24. Kamath A, Das R (2019) A survey on semantic parsing. In: AKBC

  25. Kim J, Hong D, Kang H, Han K (2006) TMOM: A moving object main memory-based DBMS for telematics services. In: W2GIS 2006, Lecture Notes in Computer Science, vol 4295, pp 259–268

  26. Klein D, Manning CD (2003) Accurate unlexicalized parsing. In: ACL, pp 423–430

  27. Li F, Jagadish HV (2014) Constructing an interactive natural language interface for relational databases. Proc VLDB Endow 8(1):73–84

    Article  Google Scholar 

  28. Li J, Wang W, Ku W, Tian Y, Wang H (2019) Spatialnli: A spatial domain natural language interface to databases using spatial comprehension. In: ACM SIGSPATIAL, pp 339–348

  29. Li Y, Rafiei D (2017) Natural language data management and interfaces: Recent development and open challenges. SIGMOD 2017:1765–1770

    Google Scholar 

  30. Li Y, Rafiei D (2018) Natural Language Data Management and Interfaces. Synthesis Lectures on Data Management 10(2): 1-156

  31. Li Y, Yang H, Jagadish HV (2007) Nalix: A generic natural language search environment for XML data. ACM Trans Database Syst 32(4):30

    Article  Google Scholar 

  32. Liu P, Wang M, Cui J, Li H (2021) Top-k competitive location selection over moving objects. Data Sci Eng 6(4):392–401

    Article  Google Scholar 

  33. Mikolov T, Sutskever I, Chen K, Corrado GS, Dean J (2013) Distributed representations of words and phrases and their compositionality. In: NIPS, pp 3111–3119

  34. Miller GA (1995) Wordnet: A lexical database for english. Commun ACM 38(11):39–41

    Article  Google Scholar 

  35. Mokbel MF, Sakr MA, Xiong L, Züfle A et al (2022) Mobility data science (dagstuhl seminar 22021). Dagstuhl Reports 12(1):1–34

    Google Scholar 

  36. Pasupat P, Liang P (2015) Compositional semantic parsing on semi-structured tables. ACL 2015:1470–1480

    Google Scholar 

  37. Pelekis N, Frentzos E, Giatrakos N, Theodoridis Y (2008) HERMES: aggregative LBS via a trajectory DB engine. pp 1255–1258

  38. Pfoser D, Jensen CS, Theodoridis Y (2000) Novel approaches in query processing for moving object trajectories. In: VLDB, pp 395–406

  39. Poon H, Domingos PM (2009) Unsupervised semantic parsing. In: EMNLP 2009:1–10

    Google Scholar 

  40. Popescu A, Etzioni O, Kautz HA (2003) Towards a theory of natural language interfaces to databases. In: IUI, pp 149–157

  41. Popescu A, Armanasu A, Etzioni O, Ko D, Yates A (2004) Modern natural language interfaces to databases: Composing statistical parsing with semantic tractability. In: COLING, pp 141-147

  42. Price PJ (1990) Evaluation of spoken language systems: the ATIS domain. In: Speech and Natural Language, pp 91–95

  43. Saha D, Floratou A, Sankaranarayanan K, Minhas UF, Mittal AR, Özcan F (2016) ATHENA: an ontology-driven system for natural language querying over relational data stores. Proc VLDB Endow 9(12):1209–1220

    Article  Google Scholar 

  44. Sen J, Lei C, Quamar A, Ozcan F, Efthymiou V, Dalmia A, Stager G, Mittal A.R., Saha D, Sankaranarayanan, K (2020) ATHENA++: natural language querying for complex nested SQL queries. Proc. VLDB Endow 13(11): 2747–2759

  45. Stratica N, Kosseim L, Desai BC (2005) Using semantic templates for a natural language interface to the CINDI virtual library. Data Knowl Eng 55(1):4–19

    Article  Google Scholar 

  46. Suhr A, Iyer S, Artzi Y (2018) Learning to map context-dependent sentences to executable formal queries. In: NAACL-HLT, pp 2238–2249

  47. Tang LR, Mooney RJ (2001) Using multiple clause constructors in inductive logic programming for semantic parsing. EMCL, Lecture Notes in Computer Science 2167:466–477

    Article  MATH  Google Scholar 

  48. Tao Y, Papadias D (2001) Mv3r-tree: A spatio-temporal access method for timestamp and interval queries. In: VLDB, pp 431–440

  49. Ulm G, Smith S, Nilsson A, Gustavsson E, Jirstrand M (2021) OODIDA: on-board/off-board distributed real-time data analytics for connected vehicles. Data Sci Eng 6(1):102–117

    Article  Google Scholar 

  50. Vazirgiannis M, Theodoridis Y, Sellis TK (1998) Spatio-temporal composition and indexing for large multimedia applications. Multim Syst 6(4):284–298

    Article  Google Scholar 

  51. Wang X, Xu J, Wang Y (2020) NLMO: towards a natural language tool for querying moving objects. MDM 2020:228–229

    Google Scholar 

  52. Wang X, Xu J, Lu H (2021) NALMO: A natural language interface for moving objects databases. SSTD 2021:1–11

    Google Scholar 

  53. Wang Y, Berant J, Liang P (2015) Building a semantic parser overnight. ACL 2015:1332–1342

    Google Scholar 

  54. Wong YW, Mooney RJ (2006) Learning for semantic parsing with statistical machine translation. In: HLT-NAACL, pp 439-446

  55. Xiong X, Elmongui HG, Chai X, Aref WG (2007) Place: A distributed spatio-temporal data stream management system for moving objects. MDM 2007:44–51

    Google Scholar 

  56. Xu J, Güting RH (2013) A generic data model for moving objects. GeoInformatica 17(1):125–172

    Article  Google Scholar 

  57. Yaghmazadeh N, Wang Y, Dillig I, Dillig T (2017) Sqlizer: query synthesis from natural language. Proc ACM Program Lang 1(OOPSLA):63:1–63:26

  58. Yin P, Neubig G (2017) A syntactic neural model for general-purpose code generation. ACL 2017:440–450

    Google Scholar 

  59. Yuan H, Li G (2021) A survey of traffic prediction: from spatio-temporal data to intelligent transportation. Data Sci Eng 6(1):63–85

    Article  Google Scholar 

  60. Zenz G, Zhou X, Minack E, Siberski W, Nejdl W (2009) From keywords to semantic queries - incremental query construction on the semantic web. J Web Semant 7(3):166–176

    Article  Google Scholar 

  61. Zheng W, Cheng H, Zou L, Yu JX, Zhao K (2017) Natural language question/answering: Let users talk with the knowledge graph. CIKM 2017:217–226

    Google Scholar 

  62. Zheng Z, Li F, Huang M, Zhu X (2010) Learning to link entities with knowledge base. In: HLT-NAACL, pp 483–491

Download references

Acknowledgements

This work is supported by National Natural Science Foundation of China (61972198), Natural Science Foundation of Jiangsu Province of China (BK20191273).

Author information

Authors and Affiliations

Authors

Contributions

Conflicts of reviewers: Ralf Hartmut Güting, rhg@fernuni-hagen.de is the Ph.D advisor of Author Jianqiu Xu. Hua Lu, luhua@ruc.dk, Roskilde University is the co-author of the paper. Zhifeng Bao, zhifeng.bao@rmit.edu.au, RMIT University has the co-authorship with Jianqiu Xu. Ouri E. Wolfson, wolfson@uic.dot.edu, University of Illinois at Chicago has the co-authorship with Jianqiu Xu. Yu Zheng, msyuzheng@outlook.com, JD Finance has the co-authorship with Jianqiu Xu. Bin Yao yaobin@cs.sjtu.edu.cn, Shanghai Jiao Tong University has the co-authorship with Jianqiu Xu.

Corresponding author

Correspondence to Jianqiu Xu.

Additional information

Publisher's Note

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

Appendix

Appendix

Table 9 Moving objects queries in natural language

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wang, X., Liu, M., Xu, J. et al. NALMO: Transforming Queries in Natural Language for Moving Objects Databases. Geoinformatica 27, 427–460 (2023). https://doi.org/10.1007/s10707-023-00494-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10707-023-00494-5

Keywords

Navigation