Natural Language Query Transformation Method for Spatial Databases Based on Large Language Model
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    Text2SQL has evolved into a significant tool for data analysis and database management by reducing the technical barriers for non-expert users to interact with relational databases. The introduction of large language models (LLMs), represented by GPT, further improves the performance of Text2SQL systems. However, existing Text2SQL techniques are difficult to apply directly to the spatial database domain because spatial data involves complex geometric relationships, diverse query types, and the demand for high-precision semantic understanding. To address these issues and lower the threshold for interaction between non-experts and spatial databases, a natural language query (NLQ) transformation method for spatial databases is proposed. The method consists of two core phases: (1) natural language understanding; (2) executable language generation. In phase (1), an entity information extraction algorithm is employed to extract key query entities, and a spatial data query corpus is constructed based on large language models to determine the query type. In phase (2), a structured language model (SLM) is selected according to the query type, and the entities are then mapped into the structured language model to generate the final executable language for spatial databases. Experimental results on multiple real-world datasets demonstrate that the proposed method enables efficient transformation from natural language queries to executable languages of spatial databases.

    Reference
    Related
    Cited by
Get Citation

Mengyi Liu, Jianqiu Xu, Yongxin Tong. Natural Language Query Transformation Method for Spatial Databases Based on Large Language Model. International Journal of Software and Informatics, 2026,16(1):45~73

Copy
Related Videos

Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:May 06,2025
  • Revised:June 30,2025
  • Adopted:August 20,2025
  • Online: April 02,2026
  • Published:
Article QR Code