Supercharge Your Innovation With Domain-Expert AI Agents!

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 missing grammatical logic information, semantic mismatch, etc.

Active Publication Date: 2020-12-11
ZHEJIANG UNIV
View PDF4 Cites 1 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
  • Multi-round natural language to SQL method based on intermediate syntax tree
  • Multi-round natural language to SQL method based on intermediate syntax tree
  • 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 multi-round question answering scenario in the simulated intelligent database as an example, and introduces the process of multi-round natural language conversion to SQL as a supplement to the specific implementation mode.

[0110] Assume that 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 columns, such as: weather, region (foreign key), time, maximum temperature, minimum temperature, etc. The area table also includes many column names, such as: area (primary key), latitude and longitude, population, dialect, and so on. Among them, the area field and the 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 gives the th...

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 problems that a traditional end-to-end method has a semantic substitution ditch between natural language and SQL, ignores grammatical logic in SQL and the like, the invention designs an SQL-like intermediate grammatical tree text method, adopts a grammatical neural network of a coding and decoding architecture in a non-end-to-end mode, and iterates in round dimension to obtain a syntax tree text. An intermediate syntax tree of each round is generated according to twostages of syntax tree logic from coarse to fine, and reasoning is performed in a post-processing stage to generate SQL. In response to the local overlapping phenomenon of the generated SQL caused bysemantic dependence among multiple rounds of sessions, the invention provides a reuse strategy for the historical generated SQL, and the conversion accuracy is further improved. The method has a wideapplication prospect in scenes such as an intelligent database system and the like.

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 scene, 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 analysis and semantic understanding. In a single-round conversation scenario, given a natural question text and a set of database table column names as input, the purpose of NL2SQL is to analyze the semantics of the question, establish a mapping between the question, the database schema, and SQL, and generate the SQL corresponding to the question . For example, a given question: "How is the weather in Shanghai today?" and database schema: {weather table: {weather, area (foreign key), time, temperature, ...}, area table: {area (primary key), latitude and longitude, population , diale...

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/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