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

Tree model-based complex natural language query-to-SQL method

A natural language and model technology, applied in the field of complex natural language query conversion to SQL, can solve problems such as performance degradation and inability to handle, and achieve the effect of improving stability

Active Publication Date: 2021-06-25
ZHEJIANG UNIV
View PDF11 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the deficiencies of the existing solutions for the complex query to SQL problem, the present invention provides a tree model-based natural language query to SQL technical framework, and the present invention will solve the complex and changeable Chinese spoken query to SQL problem As the core research point, a top-down dismantling of complex SQL statements into a multi-fork tree form is proposed, and a tree model that can grow is proposed; at the same time, its upgrade solves the new requirements for business intelligence-oriented computing queries; for cross- For the problem of performance degradation caused by changes in the domain query database structure, a table information enhancement algorithm is proposed to improve the stability of the model; for the problem that the model cannot handle databases of any size under low resource conditions, a pre-screening method for database tables is proposed. screening model

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
  • Tree model-based complex natural language query-to-SQL method
  • Tree model-based complex natural language query-to-SQL method
  • Tree model-based complex natural language query-to-SQL method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0062] The following natural language query "among the universities where celebrities graduated, which universities have no more than five celebrities, and give the categories of these universities" is converted into a SQL statement "select T2. category, T2. name from celebrity as T1 join university asT2 on celebrity.university id==university.entry id group by T1.university id having count(*)figure 1 , illustrating the complex natural language query-to-SQL method of the present invention.

[0063] (1) Preprocess the natural language query and convert it into "among the universities where celebrities graduated, which universities have no more than 5 celebrities, and give the categories of these universities";

[0064] (2) K=2 is set, and the screening database obtains the tables relevant to TOP K: colleges and universities, celebrity data tables;

[0065] (3) Input the natural language query "Among the colleges and universities where celebrities graduated, which colleges and un...

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 tree model-based complex natural language query-to-SQL method, which comprises the following steps: firstly, pre-screening an input database to obtain TOP K tables related to the natural language query, converting multi-table query into single-table query, so as to suit for the situation that information cannot be input into the natural language query-to-SQL model due to the fact that the database scale is large; secondly, disassembling the complex SQL statement into a multi-way tree form from top to bottom, each node representing a module, and therefore a tree-shaped model is constructed to predict output of each module of the complex SQL statement; and finally, aiming at an SQL statement value extraction task, separating value extraction from the tree model, and sharing weights to extract values of different clauses in the SQL at the same time. According to the tree model-based complex natural language query-to-SQL method framework, the problem of multi-table complex query in a natural language query-to-SQL task can be solved.

Description

technical field [0001] The invention belongs to the technical field of natural language processing, and in particular relates to a tree model-based complex natural language query-to-SQL technical method. Background technique [0002] A large amount of information in today's world is stored in databases. However, the acquisition and analysis of these data often requires proficiency in formal query languages ​​such as SQL, which limits the use of non-technical users. Natural language query to SQL technology can effectively break through the barriers between users and databases . This technology can understand the user's spoken language query and the structural information of the database, fuse and analyze it, generate SQL statements that the database can understand, and then perform queries on the database to return results, thereby realizing automatic question answering capabilities based on the database. [0003] At present, the research on the conversion of natural languag...

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/245
CPCG06F16/243G06F16/2433G06F16/245
Inventor 陈珂陈刚赵猛寿黎但胡天磊
Owner ZHEJIANG UNIV
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