Supercharge Your Innovation With Domain-Expert AI Agents!

Method and system for converting graph of SQL to text into natural language statement

A natural language and sentence technology, applied in the field of intelligent speech, can solve problems such as ignoring node correlation, and achieve the effect of improving the conversion effect

Active Publication Date: 2021-03-12
AISPEECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] In order to at least solve the problem of ignoring the correlation between nodes in the prior art

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
  • Method and system for converting graph of SQL to text into natural language statement
  • Method and system for converting graph of SQL to text into natural language statement
  • Method and system for converting graph of SQL to text into natural language statement

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0045] As an embodiment, the tree constructing SQL includes:

[0046] The SQL is divided into multiple clauses based on the data operation language and / or data definition language;

[0047] Create an abstract node to represent a table or row in the subsee;

[0048] A structural diagram of the tree of SQL is constructed based on the abstract node and the binary operator in the clause as the non-leaves node.

[0049] In the present embodiment, starting from the root node SQL, we first add subsequent nodes as their sub-nodes, specific content such as figure 2 Indicated. Conceptual abstract nodes, tables, and columns, and related operator nodes are attached to their parent nodes. Next, for Column and Table, we attach all raw words, aggregators, and Distinct flags as leaf nodes.

[0050] Further refine the construction, such as image 3 As shown, the SQL tree of the method consists of three levels: clause level, mode level, and token level.

[0051] First, SQL is divided into some c...

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 embodiment of the invention provides a method for converting a graph of SQL to text into a natural language statement. The method comprises the steps of: constructing an SQL tree, and representingthe level of each node and various relations between the nodes in a structure diagram of the tree; and inputting the structure diagram of the tree into a conversion model based on a graphic attentionnetwork, identifying the structural features and the sequence relationship of the SQL, and generating a natural language statement. The embodiment of the invention further provides a system for converting the graph of the SQL to the natural language statement. According to the embodiment of the invention, structured representation is carried out on the tree graph of the SQL, the correlation amongall nodes in the tree is ensured, and meanwhile, an identification relational graph converter for SQL-to-text generation is also provided. Based on the representation form of the token in each node in the SQL, various relationships of the nodes are considered, so that the conversion effect of natural language statements is improved.

Description

Technical field [0001] The present invention relates to the field of intelligent speech, and more particularly to the conversion method and system of diagrams to the natural language statement of SQL TO TEXT. Background technique [0002] The purpose of SQL (Structured Query Language) to text is to convert structured SQL into natural language issues. This task is built for interactive quotation systems for connecting natural languages ​​to the relational database. [0003] In order to encourage surface forms and ensure the correctness of the semantics, the neural network-based approach is proposed to solve this problem. Advanced Graph-To-Sequence Models consider SQL queries with different units (such as columns, operators, cell values), by SQL keywords, compared to traditional sequences. Nodes (such as SELECT and AND). By collecting information, each node is embedded in each node, which will be retrieved in the decoder. [0004] In implementing the present invention, the inventor...

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/22G06F16/28
CPCG06F16/2433G06F16/2246G06F16/284
Inventor 俞凯马达陈露曹瑞升
Owner AISPEECH CO LTD
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