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

Complex multi-table SQL generation method and device based on bridging filling

A complex, bridging technology, applied in the field of complex multi-table SQL generation based on bridging filling, which can solve problems such as excessive input length, high multi-table SQL parsing task complexity, and complex SQL schema.

Active Publication Date: 2021-06-08
NAT UNIV OF DEFENSE TECH
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Compared with the single-table SQL parsing task, the multi-table SQL parsing task has a distinctive feature, that is, the database may contain multiple data tables, and there may be primary and foreign key relationships between the data tables. Compared with the single-table SQL parsing task, many The complexity of the table SQL parsing task is relatively high, which is mainly reflected in two aspects. First, as the number of data tables increases, the number of fields also increases, which may cause the input length to exceed the maximum length allowed by the pre-training model; On the one hand, the SQL mode in the multi-table SQL parsing task is more complex, adding a variety of components (Having, Order by, Group by), set operations (Union, Except, Intersect), nested SQL, etc.
At present, there is no technical solution for automatic generation of SQL statements for multiple tables

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
  • Complex multi-table SQL generation method and device based on bridging filling
  • Complex multi-table SQL generation method and device based on bridging filling
  • Complex multi-table SQL generation method and device based on bridging filling

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0054] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

[0055] In one embodiment, such as figure 1 As shown, a method for inputting natural text samples into an SQL parsing model is provided, including the following steps:

[0056] Step 102, input the natural language form sample into the multi-table SQL parsing model.

[0057] The multi-table SQL parsing model includes: semantic encoding module, SQL template generation module and SQL detail filling module; natural language form samples include: natural language questions, data table names and database table fields.

[0058] Specifically, the semantic encoding module model ma...

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 relates to a complex multi-table SQL generation method and device based on bridge filling. A two-layer decoding architecture is adopted, and three parts are a semantic coding layer, an SQL template generation layer and an SQL detail filling layer respectively. The SQL template generation layer is a first decoding layer. The SQL detail filling layer is a first decoding layer, the SQL detail filling layer is a second decoding layer, in addition, the SQL generation model based on bridge filling only uses a sequence generation technology in the first decoding layer, the length of the SQL template is short, and compared with an independent sequence generation model, the calculation efficiency is greatly improved, and the calculation resource consumption is remarkably reduced.

Description

technical field [0001] The present application relates to the technical field of natural language processing, in particular to a method and device for generating complex multi-table SQL based on bridge filling. Background technique [0002] In the actual application scenario of SQL parsing, the natural text input by the user is generally a single table. For a single table, SQL statements can be generated by full matching. [0003] Compared with the single-table SQL parsing task, the multi-table SQL parsing task has a distinctive feature, that is, the database may contain multiple data tables, and there may be primary and foreign key relationships between the data tables. Compared with the single-table SQL parsing task, many The complexity of the table SQL parsing task is relatively high, which is mainly reflected in two aspects. First, as the number of data tables increases, the number of fields also increases, which may cause the input length to exceed the maximum length al...

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/22G06F16/242G06F16/332G06F16/33G06F40/126G06F40/186G06F40/205G06F40/30
CPCG06F16/2282G06F16/2433G06F16/3329G06F16/3344G06F40/126G06F40/186G06F40/205G06F40/30
Inventor 谭真张啸宇赵翔王俞涵黄旭倩廖劲智肖卫东唐九阳
Owner NAT UNIV OF DEFENSE TECH