Supercharge Your Innovation With Domain-Expert AI Agents!

A multi-round natural language to sql method based on intermediate syntax tree

A natural language and syntax tree technology, applied in neural learning methods, instruments, biological neural network models, etc., can solve problems such as semantic mismatch, loss of grammatical logic information, etc., to improve the conversion accuracy.

Active Publication Date: 2022-08-05
ZHEJIANG UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the existing end-to-end multi-round NL2SQL method that has semantic mismatch and loses grammatical logic information, the present invention provides a multi-round natural language to SQL method based on an intermediate syntax tree

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
  • A multi-round natural language to sql method based on intermediate syntax tree
  • A multi-round natural language to sql method based on intermediate syntax tree
  • A multi-round natural language to sql method based on intermediate syntax tree

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0109] The following takes a simulation of a multi-round question-and-answer scenario in an intelligent database as an example, as a supplement to the specific implementation manner, to introduce the process of converting multiple rounds of natural language to SQL.

[0110] Suppose there is a regional information database schema in the database, which contains many tables, including weather tables, regional tables, and so on. The weather table contains many column names, such as: weather, region (foreign key), time, maximum temperature, minimum temperature, etc. The region table also includes many column names, such as: region (primary key), latitude and longitude, population, dialect, and so on. The area field and area field of the weather table belong to the primary foreign key relationship.

[0111] Assuming that the user initiates an interactive question and answer to the intelligent database system and conducts three rounds of conversations, the following table shows the...

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 multi-round natural language-to-SQL method based on an intermediate syntax tree. In order to solve the problem of the semantic generation gap between natural language and SQL in the traditional end-to-end method, ignoring the inherent grammatical logic of SQL, etc., the present invention designs an intermediate syntax tree grammar of a kind of SQL, in a non-end-to-end manner, using coding- The grammar neural network of the decoding architecture iterates in the round dimension, generates the intermediate grammar tree of each round in two stages from coarse to fine according to the logic of the grammar tree, and generates SQL by reasoning in the post-processing stage. In response to the phenomenon of partial overlap of generated SQL caused by semantic dependencies between multiple rounds of sessions, the present invention proposes a reuse strategy for historically generated SQL, which further improves the conversion accuracy. The present invention has wide application prospects in scenarios such as intelligent database systems.

Description

technical field [0001] The invention belongs to the technical field of natural language processing, and relates to a natural language-to-SQL method in a multi-round conversation scenario, in particular to a multi-round natural language-to-SQL method based on an intermediate syntax tree. Background technique [0002] Natural Language to SQL (Natural Language to SQL) is an important task in semantic parsing and semantic understanding. In the single-round conversation scenario, given the natural question text and the set of database table column names as input, the purpose of NL2SQL is to parse the question semantics, establish the mapping between the question, database schema and SQL, and generate the SQL corresponding to the question. . For example, given the question: "How is the weather in Shanghai today?" and the database schema: {weather table: {weather, area (foreign key), time, temperature, ...}, area table: {area (primary key), latitude and longitude, population , di...

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 Patents(China)
IPC IPC(8): G06F16/242G06N3/04G06N3/08
CPCG06F16/2433G06F16/243G06N3/049G06N3/08G06N3/044G06N3/045
Inventor 陈刚王侠侠伍赛陈珂寿黎但江大伟宋明黎
Owner ZHEJIANG UNIV
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More