Method for improving automatic generation accuracy of SQL code

By combining semantic modeling and user intention recognition, and using big models to generate pseudo-SQL and replace it, the accuracy of SQL code automatic generation in the prior art is solved, and the accuracy of generating SQL is significantly improved.

CN119690986APending Publication Date: 2025-03-25HAOHAN DATA
6 Cites 0 Cited by

Patent Information

Application Number
CN202411768943.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing SQL code automatic generation technology has problems with user intention to understand limitations, accuracy issues, and inability to understand professional terms, resulting in inaccurate SQL code generated.

Method used

By combining semantic models for semantic modeling, the construction prompt words are handed over to the big model for processing, user intention recognition is performed, and pseudo-SQL is generated using the semantic understanding and text generation ability of the big model. Finally, the index information and dimension information are replaced through the Python program to generate the final SQL statement.

Benefits of technology

The accuracy of SQL automatic generation has been greatly improved. By semantic modeling and user intent recognition of the database in advance, the large model can better understand the database structure information and the intention of user questions.

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

Abstract

The invention provides a method for improving the accuracy rate of automatic generation of SQL codes. The method comprises the steps that semantic modeling is carried out according to questions proposed by a user in combination with a semantic model to construct cue words; the cue words are submitted to a large model to be processed, intention recognition is conducted on user questions through the combination of the large model and a semantic model, and finally recognized intention information is output; generating a pseudo SQL by utilizing semantic comprehension and text generation capability of the large model; and replacing and restoring the index information and the dimension information of the generated pseudo SQL into a final SQL statement through a Python program in a character string replacement manner. Semantic modeling and user intention recognition are carried out on the database in advance, a large model can better understand database structure information and user questioning intentions, and the accuracy of SQL automatic generation can be greatly improved.
Need to check novelty before this filing date? Find Prior Art