基于大模型的空间数据库自然语言查询转换方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP391

基金项目:

国家自然科学基金(62472217,U23A20296)


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

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    Text2SQL技术通过减少非专业用户与关系数据库交互的技术障碍,已发展为数据分析和数据库管理的重要工具.以GPT为代表的大语言模型的引入,进一步提升了Text2SQL系统的性能.然而,由于空间数据涉及复杂的几何关系、多样化的查询类型和对高精度语义理解的需求,现有的Text2SQL技术难以直接适用于空间数据库领域.为解决上述问题,降低普通用户与空间数据库的交互门槛,提出了面向空间数据库的自然语言查询转换方法.该方法有两个核心阶段:(i)自然语言理解和(ii)可执行语言生成.在阶段(i)中使用实体信息提取算法提取关键查询实体,并基于大语言模型构建空间数据查询语料库进而确定查询类型.在阶段(ii)中根据查询类型选择结构化语言模型,然后将实体映射到结构化语言模型中,得到最终的空间数据库可执行语言.在多组真实数据集上的实验结果表明,所提方法可以实现从用户的自然语言查询到空间数据库可执行语言的高效转换.

    Abstract:

    Text2SQL has evolved into a significant tool for data analysis and database management by reducing the technical barriers to non-expert users interacting with relational databases. The introduction of large language models, represented by GPT, further improves the performance of Text2SQL systems. However, the 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 need for high-precision semantic understanding. A natural language query transformation method for spatial databases is proposed to solve the above problems and reduce the threshold of interaction between non-experts and spatial databases. The method consists of two core phases: (i) natural language understanding and (ii) structured language generation. In phase (i), an entity information extraction algorithm is used to extract key entities, and a spatial data query corpus is constructed based on large language models to determine the query type. In phase (ii), the structured language model is selected according to the query type, and then the entities are mapped into the structured language model to generate executable database queries. Experimental results on several real-world datasets show that the proposed method achieves efficient translation from natural language queries to executable languages of spatial databases.

    参考文献
    相似文献
    引证文献
引用本文

刘孟怡,许建秋,童咏昕.基于大模型的空间数据库自然语言查询转换方法.软件学报,2026,37(3):0

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-05-06
  • 最后修改日期:2025-06-30
  • 录用日期:
  • 在线发布日期: 2025-09-02
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号