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

SQL statement construction method based on actor-reviewer network

A construction method and critic's technology, applied in neural learning methods, biological neural network models, artificial life, etc., can solve the problems of not supporting large data table input, training difficulties, large manual work and flexibility

Active Publication Date: 2019-07-26
GUANGDONG UNIV OF TECH
View PDF3 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The first is based on the idea of ​​pattern matching, through the one-to-one correspondence between natural language templates and SQL query templates to achieve the transformation function, which requires a lot of manual work and poor flexibility; the second is based on the idea of ​​machine translation, through sequence to The sequence model directly converts natural language sequences into SQL query language. The disadvantage is that the model can only be updated through sentence similarity during the training process; the third is based on the idea of ​​semantic analysis. The goal is to convert natural language into logical expressions and introduce enhanced Learn to manipulate the input table through logical expressions to get feedback. The disadvantage is that it is difficult to train and does not support large data table input.

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
  • SQL statement construction method based on actor-reviewer network
  • SQL statement construction method based on actor-reviewer network
  • SQL statement construction method based on actor-reviewer network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0045] The principle diagram of the present invention is as figure 1 Shown, the SQL statement construction method based on actor-critic network of the present invention, comprises the steps:

[0046] 1) For the parameter θ in the actor network and the parameter in the critic network respectively perform random initialization;

[0047] 2) Obtain the natural language sequence X={x from the data set 1 ,...,x n} and the corresponding SQL sequence Y real ={y 1 ,...,y m};

[0048] Geo is a data set from natural language questions to SQL query statements based on the US geographic fact database (Geobase), and the natural language sequence X={x can be obtained from Geo 1 ,...,x n} and the corresponding SQL sequence Y real ={y 1 ,...,y m};

[0049] In addition, the above-mentioned data set can also be commonly used Oracle, mysql, sqlserver, etc., as long as it supports SQL to perform management operations such as query, update, and deletion, because SQL is a standard mana...

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 method for determining and predicting the accuracy of an SQL sequence based on actor-reviewer network. The invention discloses an SQL statement construction method and devicebased on reinforcement learning. The method comprises the technical steps: initializing actor-reviewer network parameters; obtaining a natural language and a real SQL statement sequence pair from thedata set; inputting the natural language sequence into an actor network encoder, and inputting the real SQL sequence into a reviewer network encoder; taking the coded hidden state as an initial hidden state of the corresponding decoder; enabling the actor network decoder to predict SQL statement actions step by step and input the SQL statement actions to the reviewer network decoder and the environment to obtain corresponding rewards; updating the network parameters in a gradient mode, and obtaining a construction model from a natural language to an SQL statement after repeated iteration. According to the method, the syntax automaton is introduced into a reward mechanism based on reinforcement learning, so that the problem that a loss function and an evaluation index are not equal in SQLstatement construction through natural language conversion is solved, and the accuracy is effectively improved.

Description

technical field [0001] The invention relates to a SQL statement construction method, in particular to an actor-critic network-based SQL statement construction method, which belongs to the innovative technology of the actor-critic network-based SQL statement construction method. Background technique [0002] Structured Query Language (SQL) is a standard language commonly used in relational database systems, and the supported functions include data insertion, query, update, and deletion. A relational database program must be proficient in SQL and familiar with the corresponding database architecture in order to write high-quality queries for the application. Both tasks are challenging. Reducing the difficulty of SQL programming and the learning burden of complex database architecture has always been an important topic in the field of database research and industry. Among them, the research on how to build a natural language database interface (NLIDB) has been widely concerne...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/242G06F16/33G06N3/08
CPCG06F16/2433G06F16/3346G06N3/08G06F16/24522G06F16/243G06N3/006G06N3/045G06N3/044G06F16/284G06F16/25G06F9/3016
Inventor 蔡瑞初许柏炎梁智豪李梓健郝志峰温雯陈炳丰
Owner GUANGDONG UNIV OF 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