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

Asynchronous SQL connection query optimization method based on reinforcement learning DQN algorithm

A technology of reinforcement learning and connection query, applied in the computer field, can solve problems such as forgetting and poor model training results, and achieve the effects of accelerated training speed, reduced training time, and fast convergence speed

Pending Publication Date: 2021-12-24
KUNMING UNIV OF SCI & TECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] (1) Although the LSTM network is a two-way neural network, when it is trained, each layer of the neural network cannot capture the specific characteristics of the nearest intermediate transfer value, and after the multi-layer neural network is trained, these characteristics will be forgotten, resulting in Model training results are poor

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
  • Asynchronous SQL connection query optimization method based on reinforcement learning DQN algorithm
  • Asynchronous SQL connection query optimization method based on reinforcement learning DQN algorithm
  • Asynchronous SQL connection query optimization method based on reinforcement learning DQN algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0076] Embodiment 1: as Figure 1-Figure 8 As shown, the asynchronous SQL connection query optimization method based on the reinforcement learning DQN algorithm, the specific steps of the method are as follows:

[0077] Step1. Analyze and decompose the SQL statement according to the query predicate, and use the abstract syntax tree AST algorithm to store the parsed SQL as a query tree structure;

[0078] Step2. Put the AST tree structure into the DQN optimizer in the DRL network to select the connection action; each time a connection selection is performed, the generated connection tree containing a new table is passed into the Tree-LSTM+Attention network , obtain a long-term reward signal after encoding and calculation, and finally generate a state representation State of a query tree containing the connection order of all tables that the Agent considers optimal;

[0079] Step3. Convert the final state representation State into an actual query tree, input it into the executi...

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 an asynchronous SQL connection query optimization method based on a reinforcement learning DQN algorithm, and belongs to the technical field of computers. According to the method, after the output of each layer of unit of the Tree-LSTM network, an attention layer is added, and weighting calculation is carried out on the output vector of each layer of the LSTM network again. Therefore, data features transmitted by left and right hidden layers nearby the hidden layer are highlighted; multi-thread programming of Python is utilized, multiple DRL deep reinforcement learning modules are constructed at the same time, and model training data are shared, so that asynchronous execution of multiple training modules is achieved, and the model training speed is greatly increased.

Description

technical field [0001] The invention relates to an asynchronous SQL connection query optimization method based on a reinforcement learning DQN algorithm, and belongs to the technical field of computers. Background technique [0002] In the traditional database field, a lot of efforts have been made in query optimization. Query optimization is the process of selecting the most efficient and least expensive query plan for computing SQL relational expressions. [0003] In relational databases, the choice of join order has a very important impact on query performance, and has been one of the widely researched issues in database systems. Traditional query optimizers typically use static join order enumeration algorithms that do not include feedback on whether the resulting query plan is good or bad, so the optimizer often repeatedly selects the same poor query plan. In addition, the method of exhaustive traversal, the space cost is too high. The ultimate goal of connection orde...

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/2453G06F16/22G06N3/04G06N3/08
CPCG06F16/2433G06F16/2453G06F16/2246G06N3/08G06N3/044G06N3/045Y02D10/00
Inventor 邹飞
Owner KUNMING UNIV OF SCI & TECH
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