一种基于混合视图检索的Text2SQL生成方法及系统
By generating enhanced schema description documents through hybrid view retrieval technology and combining vector similarity and graph structure propagation algorithms, the recall and accuracy problems of existing Text-to-SQL technologies in complex databases are solved, achieving efficient and accurate SQL generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-17
AI Technical Summary
Existing Text-to-SQL technologies struggle to understand the complex structures of real-world industrial databases, exhibiting issues such as ambiguous column names, undefined implicit foreign keys, noise introduced by expanding the search scope, and errors in generative models during multi-table joins and nested queries.
A hybrid view-based retrieval method is adopted, which generates enhanced schema description documents through data profiling and mining, obtains candidate schema elements by combining vector similarity retrieval and graph structure propagation algorithms, constructs multiple candidate SQL statements, executes and verifies them in the database environment, and makes corrections based on the consistency of execution results.
It reduces the illusion of selecting table columns in large language models, improves the recall rate of schema elements and the accuracy of SQL generation, enhances robustness, and reduces the illusion risk of generative models.
Smart Images

Figure CN121996663B_ABST