Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Construction method and application of SQL statement generation model of natural Chinese language

A technology for generating models and natural language, applied in the field of semantic analysis of natural language processing, can solve the problem of low accuracy of SQL statements, achieve the effect of enhancing relationship judgment and improving accuracy

Pending Publication Date: 2022-02-08
HUAZHONG UNIV OF SCI & TECH
View PDF0 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a construction method and application of a Chinese natural language SQL statement generation model to solve the technical problem of low accuracy in generating SQL statements in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Construction method and application of SQL statement generation model of natural Chinese language
  • Construction method and application of SQL statement generation model of natural Chinese language
  • Construction method and application of SQL statement generation model of natural Chinese language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] A method for building a Chinese natural language SQL statement generation model, such as figure 1 shown, including the following steps:

[0052] S1. Build a SQL statement generation model; wherein, the SQL statement generation model includes: a word segmentation splicing module, a semantic coding module, a relational representation module, a relational coding module and a SOL decoding module.

[0053] Word segmentation splicing module:

[0054] The word segmentation splicing module is used to perform word segmentation operations on Chinese natural language problems and data table naming and data column naming in related database schemas, and combine data column type information for splicing. The splicing data column type information can add the above column types during the encoding process information, express the nature of the column in more detail, obtain the fusion representation vector of the Chinese natural language problem of unstructured data and the database s...

Embodiment 2

[0131] A method for generating SQL statements in Chinese natural language, comprising: inputting Chinese natural language questions and related database patterns into the SQL statement generation model constructed by the construction method of the SQL statement generation model in Chinese natural language provided by Embodiment 1 , to get the SQL statement.

[0132] The relevant technical solutions are the same as those in Embodiment 1, and will not be repeated here.

Embodiment 3

[0134] A database retrieval method based on Chinese natural language, comprising: inputting Chinese natural language questions and related database patterns into the SQL statement generation model constructed by the construction method of the SQL statement generation model of Chinese natural language provided by Embodiment 1 After obtaining the SQL statement, the database execution engine executes the SQL statement for information retrieval.

[0135] Specifically, apply the above-mentioned trained SQL statement generation model, accept the user's Chinese natural language question and the database schema related to the question, extract the text features and relational features, and use the syntax tree structure to decode into the corresponding SQL statement, The database execution engine executes the SQL statement, obtains the SQL query result queried by the user, and finally returns the SQL query result. The invention converts the natural language questions raised by users in...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a construction method and application of an SQL statement generation model of a natural Chinese language. The construction method comprises the following steps: S1, constructing the SQL statement generation model; and S2, taking the Chinese natural language question collected in the training set and the related database mode as input, taking the corresponding correct SQL statement as output, and training the SQL statement generation model by minimizing the difference between the SQL statement generated by the SQL statement generation model and the correct SQL statement. According to the invention, by combining type information of different data columns, an alignment relation and an implicit anaphora relation between a Chinese natural language question and a database mode are captured, and an explicit definition relation of the database mode and a link relation between the natural language question and the database mode are expressed in a directed graph mode; and by comprehensively considering the characteristics between the unstructured data and the structured data, the semantic features and the relationship features are combined for joint coding, so that the accuracy of the SQL statement generation model is greatly improved.

Description

technical field [0001] The invention belongs to the technical field of semantic analysis of natural language processing, and more specifically relates to a construction method and application of a Chinese natural language SQL statement generation model. Background technique [0002] With the rapid development of database technology and information technology, in all walks of life, massive amounts of digital data are being generated all the time, and the data may be independent of each other, or there may be certain dependencies. Therefore, in order to facilitate data query and update, unified management and maintenance, these data are usually structured and stored in the database, and the unified database query language SQL is required to retrieve data that meets specific requirements from the database. The structured database query language SQL has strict grammatical constraints. For non-professional users who do not have database and SQL-related knowledge, there are certai...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/242G06F40/289G06F40/30G06K9/62G06N3/04
CPCG06F16/2433G06F40/30G06F40/289G06N3/044G06F18/214
Inventor 李瑞轩林毅炜辜希武李玉华马学旭
Owner HUAZHONG UNIV OF SCI & TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products