Unlock instant, AI-driven research and patent intelligence for your innovation.

Configurable method and system for converting natural language into sql

A natural language and semantic technology, applied in semantic analysis, special data processing applications, instruments, etc., can solve problems such as single database and business scenarios, fixed sql structure, and inability to advanced sql, so as to improve business scope, fast response, and maintenance simple effect

Pending Publication Date: 2021-02-09
JIANGSU DAWN INFORMATION TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The disadvantages of this mode mainly include the following two points: 1. The sql structure is fixed, and advanced sql generation such as aggregation and table association cannot be performed; 2. The applicable database and business scenarios are single. If a new table is added in the database, or If a new field is added to the table, it needs to be retrained

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
  • Configurable method and system for converting natural language into sql

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] In this embodiment, a configurable natural language to sql method is characterized in that it includes the following steps:

[0053] Step 1. Construct the sql structure to preprocess the question text;

[0054] Step 2. Discrimination of aggregation conditions through semantic component matching;

[0055] Step 3, using the time element to extract the text time period;

[0056] Step 4. Extract conditions other than the time element through the condition element.

[0057] In a further embodiment, to determine the sql structure in the step 1, firstly, the question text is preprocessed, unimportant words are removed, and some expressions are converted into vocabulary, and then, through the matching of semantic components, it is determined sql template;

[0058] The process steps of preprocessing the question text are as follows:

[0059] Step 11, segment and sentence the input text, and decompose the text into short sentences. The first step of the semantic-based preproc...

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 configurable method and system for converting a natural language into sql, and the method specifically comprises the steps: constructing an sql structure to carry out the preprocessing of a question text, removing unimportant words, carrying out the discrimination of an aggregation condition through semantic component matching, and determining an aggregation condition element needed in an sql template through semantic component matching judgment; extracting a text time period by utilizing time elements, then obtaining conditions except the time elements through a text, realizing data query and analysis requirements through a natural language interaction mode, providing comprehensive support for complex business logic, and quickly adjusting the system when a new data access questioning method exists; extracting conditions except the time elements through the condition elements, recording each data source and each piece of semantic component information to be matched under the data table, and helping a user to realize data query and analysis requirements through a natural language interaction mode.

Description

technical field [0001] The invention relates to a language processing technology, in particular to a configurable natural language-to-sql conversion method and system. Background technique [0002] At present, the machine natural language to sql method can only support the simple select F(A) from B where C D E structure, where A is the table result field you want to query; F is the function operation on this table field, such as sum, count etc.; B is the table name of the query; C is the field name in the condition; E is the value corresponding to the field in the condition; D is the relationship between the field and the value in the condition, such as greater than or less than. [0003] There are generally two types of element extraction algorithms in this structure: one is to determine the values ​​of A~F through the matching of keywords and regular expressions; the other is to train the training samples through machine learning algorithms, because A~F The value of the F...

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/242G06F40/30
CPCG06F16/2433G06F40/30
Inventor 叶恺翔吕晓宝王元兵王海荣
Owner JIANGSU DAWN INFORMATION TECH CO LTD