Intelligent SQL (Structured Query Language) generation system based on multistage intention recognition and generation method thereof

The intelligent SQL generation system, which utilizes multi-level intent recognition and combines vector matching with a large language model, solves the problems of field ambiguity and insufficient semantic understanding in complex database queries. It achieves efficient and accurate database operations and is suitable for database queries in complex business scenarios.

CN120910240AActive Publication Date: 2025-11-07SICHUAN ZHONGLI JIAHUA INFORMATION TECH CO LTD
6 Cites 4 Cited by

Patent Information

Application Number
CN202511024383.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-07
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as field ambiguity, insufficient semantic understanding, difficulty in understanding the entire database, and poor interpretability in complex database queries, making it difficult for users to perform accurate database operations.

Method used

An intelligent SQL generation system based on multi-level intent recognition is adopted. Through vector matching, multi-layer structured knowledge base, dual-tower model and large language model, combined with the natural language query input by the user, the system dynamically configures the database table and field information to generate SQL statements that conform to the syntax rules, and optimizes the model through self-learning.

Benefits of technology

It improves the accuracy and efficiency of database queries, enabling non-technical personnel to easily perform database operations, ensuring the correctness of generated SQL statements, and providing a transparent query process.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses an intelligent SQL (Structured Query Language) generation method and system based on multistage intention recognition. The method comprises the following steps: receiving a natural language query of a user; vector matching: carrying out vector matching based on a knowledge base to obtain Top-K candidate query objects, the knowledge base containing multilayer structure description information; a large language model intention understanding step: determining a final query object in combination with the candidate query object description; loading a branch workflow, analyzing a field and a table structure, and dynamically configuring a database table and field information; sQL generation: generating SQL statements conforming to grammatical rules, including automatic field addition, time condition conversion and field priority matching operation; and executing the SQL statement and returning a result, and if the result fails, recording a log to prompt correction. By combining a natural language processing technology with a database knowledge base, an efficient, accurate and user-friendly database query solution is provided.
Need to check novelty before this filing date? Find Prior Art