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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com