Supercharge Your Innovation With Domain-Expert AI Agents!

Graph structure generation method of database logic relationship and data query method and device

A logical relationship and data query technology, applied in the field of deep learning, can solve problems such as heavy manual workload, difficult to adapt to massive, complex implementation methods, etc.

Pending Publication Date: 2020-10-27
PING AN TECH (SHENZHEN) CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to solve the problems existing in existing data query schemes, such as complex implementation methods, large manual workload, and difficulty in adapting to massive databases and complex relationship scenarios, the present invention provides a method for generating a graph structure of database logical relationships, a data query method and a device

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
  • Graph structure generation method of database logic relationship and data query method and device
  • Graph structure generation method of database logic relationship and data query method and device
  • Graph structure generation method of database logic relationship and data query method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0023] Such as figure 1 , 2 As shown, this embodiment provides a method for generating a graph structure of database logical relationships, and the generating method is a method for organizing logical relationships in massive databases. The graph structure generation method may include but not limited to the following steps.

[0024] First, the fields, partition names and related attributes of each table are obtained by traversing all existing tables in the database. Related attributes include but not limited to type, explanation, connection relationship between tables and fields, and so on. In this embodiment, the above information is saved in the form of (table name, table name. field).

[0025] Second, collect historical query statements that have been executed, and extract external keys, connection relationships between tables, and connection relationships between tables and external keys in historical query statements. The historical query statement in this embodiment ...

Embodiment 2

[0028] Such as image 3 , 4 As shown, this embodiment is a data query method based on the first embodiment, and can implement a complex database natural language query solution based on the first embodiment. The data query method may include but not limited to the following steps.

[0029] Receive natural language text entered by a user through an interactive interface or otherwise. The user can input the natural language text to be retrieved on an interactive interface, and the natural language text can be, for example, keywords, codes, etc.

[0030] The natural language text used for the data query is encoded to form a first encoded result. In some embodiments of the present invention, the natural language text is encoded based on a bidirectional recurrent neural network with an attention mechanism. The natural language text is stored while encoding the natural language text.

[0031] Obtain the part of the subgraph most closely related to the natural language text in t...

Embodiment 3

[0039] Such as figure 1 , 2 As shown, based on the same inventive concept as Embodiment 1, this embodiment can provide a graph structure generating device for database logical relationships, which includes but is not limited to a data traversal module, a data extraction module, and a relationship generation module. The data traversal module is used to obtain the fields of each table by traversing all existing tables in the database, and to obtain the connection relationship between tables and fields; the data extraction module is used to collect historical query statements that have been executed and extract the historical query statements External keys, connection relationships between tables, and connection relationships between tables and external keys; the relationship generation module is used to use tables, fields, and external keys as nodes, and the connection relationship between tables and fields, the connection relationship between tables, and the connection relation...

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 graph structure generation method of a database logic relationship and a data query method and device. The graph structure generation method comprises the following steps: taking tables, fields and external keys as nodes, and taking a table and field connection relationship, an inter-table connection relationship and a table and external key connection relationship as edges for connecting different nodes to generate a graph structure for describing a database logic relationship. The data query method can comprise the following steps: encoding the natural language textto form a first encoding result, encoding the sub-graph part to form a second encoding result, stacking to form a final encoding result, decoding the final encoding result to generate a complete structured query statement, and querying a data result from a database by using the complete structured query statement; according to the invention, a corresponding method can be realized through a corresponding device. According to the invention, the data acquisition logic can become clearer and simpler, the data query result can be accurately and quickly acquired from the database, and the universality is very good.

Description

technical field [0001] The present invention relates to the technical field of deep learning, and more specifically, the present invention can provide a method for generating a graph structure of a database logical relationship, a data query method and a device. Background technique [0002] With the continuous advancement of computer technology, the scale of data is increasing, and the degree of openness of data is often also increasing. For users, how to accurately and quickly query the desired data is very important. The current mainstream solution is to improve on the basis of machine learning, but there are problems such as large manual workload, complex implementation methods, reduced efficiency as the amount of data increases, and high cost. Therefore, existing technologies cannot be used in massive databases and complex relational scenarios. Contents of the invention [0003] In order to solve the problems existing in existing data query schemes, such as complex ...

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/21G06F16/22G06F16/242G06F16/2458G06F40/126G06N3/02
CPCG06F16/21G06F16/2282G06F16/2433G06F40/126G06F16/2458G06N3/02
Inventor 樊忠睿吴振宇王建明
Owner PING AN TECH (SHENZHEN) 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