CN114691641A - Database dynamic resource tuning system and method based on deep neural network - Google Patents
Database dynamic resource tuning system and method based on deep neural network Download PDFInfo
- Publication number
- CN114691641A CN114691641A CN202011611709.7A CN202011611709A CN114691641A CN 114691641 A CN114691641 A CN 114691641A CN 202011611709 A CN202011611709 A CN 202011611709A CN 114691641 A CN114691641 A CN 114691641A
- Authority
- CN
- China
- Prior art keywords
- tuning
- neural network
- module
- database
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/217—Database tuning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种基于深度神经网络的数据库动态资源调优系统与方法,所述系统包括:采集服务装置和调优服务装置,所述采集服务装置安装于数据库端,所述调优服务装置包括:规则模块、权限模块、分析模块、神经网络模块、决策模块、审核模块、任务模块和消息模块;所述方法包括:1)深度神经网络模型训练,2)数据库动态资源调优。本发明基于深度神经网络的数据库动态资源调优系统与方法,降低了数据库资源调优的人为干预度,可实现数据库资源的精准化控制,大大提高了调优响应效率和节约劳动成本。
The invention discloses a database dynamic resource tuning system and method based on a deep neural network. The system comprises: a collection service device and an tuning service device, the collection service device is installed on a database end, and the tuning service device It includes: a rule module, an authority module, an analysis module, a neural network module, a decision module, an audit module, a task module and a message module; the method includes: 1) deep neural network model training, 2) database dynamic resource tuning. The system and method for database dynamic resource tuning based on the deep neural network of the present invention reduces the degree of human intervention in database resource tuning, can achieve precise control of database resources, greatly improves tuning response efficiency and saves labor costs.
Description
技术领域technical field
本发明涉及数据库技术领域,具体涉及一种基于深度神经网络的数据库动态资源调优系统与方法。The invention relates to the technical field of databases, in particular to a database dynamic resource tuning system and method based on a deep neural network.
背景技术Background technique
数据是企业重要的资源和财产。数据存放在数据库内,数据库资源一直被视为紧缺资源,因此将数据库管理好尤为重要。数据库厂商提供了数据库动态可管理功能,例如DB2可配置数据库系统的内存、各种参数等;Oracle数据库系统也提供了内存管理、实例参数配置等。Data is an important resource and property of an enterprise. Data is stored in the database, and database resources have always been regarded as scarce resources, so it is particularly important to manage the database well. Database vendors provide database dynamic management functions, such as DB2 configurable database system memory, various parameters, etc.; Oracle database system also provides memory management, instance parameter configuration, etc.
通过对数据库资源调优可降低故障发生的概率,减少损失。数据库资源调优较为复杂,一直以来几乎都是在人工干预下才能完成,对数据库管理员依赖高,调优的好坏与数据库管理员的经验息息相关,在复杂的维护调优环境中,难以做到实时响应以及对资源的精准化控制,维护和调优成本较高。By optimizing database resources, the probability of failure can be reduced and losses can be reduced. Database resource tuning is relatively complex, and it has always been completed under manual intervention. It is highly dependent on database administrators. The quality of tuning is closely related to the experience of database administrators. In a complex maintenance and tuning environment, it is difficult to do To real-time response and precise control of resources, maintenance and tuning costs are high.
发明内容SUMMARY OF THE INVENTION
本发明所要解决的技术问题是针对现有技术中存在的上述不足,提供一种基于深度神经网络的数据库动态资源调优系统与方法,降低数据库资源调优的人为干预度,实现数据库资源的精准化控制,提高调优响应效率和节约劳动成本。The technical problem to be solved by the present invention is to aim at the above-mentioned deficiencies in the prior art, and to provide a database dynamic resource tuning system and method based on a deep neural network, which reduces the degree of human intervention in database resource tuning and realizes the accuracy of database resources. Improve the efficiency of tuning response and save labor costs.
为实现以上发明目的,采用的技术方案是:In order to achieve the above purpose of the invention, the technical scheme adopted is:
一种基于深度神经网络的数据库动态资源调优系统,包括:采集服务装置和调优服务装置,所述调优服务装置包括:规则模块、权限模块、分析模块、神经网络模块、决策模块、审核模块、任务模块和消息模块;A database dynamic resource tuning system based on a deep neural network, comprising: a collection service device and a tuning service device, the tuning service device includes: a rule module, an authority module, an analysis module, a neural network module, a decision-making module, an auditing module modules, task modules and message modules;
所述采集服务装置安装于数据库端,主要负责实时采集数据库运行状态数据,并按照约定格式汇总采集的数据,以及将汇总数据报送调优服务装置;所述规则模块主要负责设置调优规则、任务等级、审核规则和消息规则;所述权限模块主要负责设置登录用户权限;所述分析模块用于缓存所述采集服务装置报送的汇总数据,并解析和分析所述汇总数据,判断是否需要对数据库进行调优;所述神经网络模块主要负责业务模型训练,以及预测优化调整参数,并将所述优化调整参数传送给决策模块;所述决策模块主要负责生成调优任务,并将所述调优任务发送给审核模块;所述审核模块主要负责审核调优任务,将调优任务归为自动审核或人工审核类别;所述任务模块主要负责管理和执行审核通过的调优任务;所述消息模块主要负责消息管理。The collection service device is installed on the database end, and is mainly responsible for collecting database running status data in real time, summarizing the collected data according to the agreed format, and submitting the summary data to the tuning service device; the rule module is mainly responsible for setting tuning rules, Task level, audit rules and message rules; the authority module is mainly responsible for setting login user authority; the analysis module is used to cache the summary data submitted by the collection service device, and parse and analyze the summary data to determine whether it is necessary Tuning the database; the neural network module is mainly responsible for training the business model, predicting and optimizing the adjustment parameters, and transmitting the optimization and adjustment parameters to the decision-making module; the decision-making module is mainly responsible for generating the tuning task, and assigning the The tuning task is sent to the auditing module; the auditing module is mainly responsible for auditing the tuning task, and classifies the tuning task as automatic auditing or manual auditing; the task module is mainly responsible for managing and executing the audited tuning tasks; the The message module is mainly responsible for message management.
进一步的,还包括:DATA模块,所述DATA模块用于存储规则信息、权限信息、任务信息和消息信息。Further, it also includes: a DATA module, where the DATA module is used to store rule information, authority information, task information and message information.
进一步的,所述分析模块前置kafka。Further, the analysis module is pre-installed with kafka.
进一步的,所述权限模块还用于web访问模块标签控制。Further, the permission module is also used for web access module label control.
进一步的,所述数据库运行状态数据包括:机型配置、数据库配置、数据量和读写访问量。Further, the database running state data includes: model configuration, database configuration, data volume and read and write access volume.
进一步的,所述神经网络模块为BP神经网络、RNN神经网络、LSTM神经网络中的一种。Further, the neural network module is one of BP neural network, RNN neural network, and LSTM neural network.
一种基于深度神经网络的数据库动态资源调优方法,包括:A database dynamic resource tuning method based on deep neural network, comprising:
1)深度神经网络模型训练:1) Deep neural network model training:
11)准备深度神经网络的训练样本数据和测试样本数据;11) Prepare the training sample data and test sample data of the deep neural network;
12)构造深度神经网络模型;12) Construct a deep neural network model;
13)初始化深度神经网络模型的参数;13) Initialize the parameters of the deep neural network model;
14)对深度神经网络模型进行训练,并进行优化;14) Train and optimize the deep neural network model;
15)验证并保存模型训练结果;15) Verify and save the model training results;
2)数据库动态资源调优:2) Database dynamic resource tuning:
21)采集数据库运行状态数据,按照约定格式整理数据;21) Collect database operating status data, and organize the data according to the agreed format;
22)分析采集的数据库运行状态数据,按调优规则判断是否需要对数据库进行调优,如需调优,则进行步骤23);如无需调优,则记录判断信息,本次任务结束;22) Analyze the collected database operating status data, and judge whether the database needs to be tuned according to the tuning rules. If tuning is required, go to step 23); if tuning is not required, record the judgment information, and the task ends;
23)对采集的数据库运行状态数据进行归一化;23) Normalize the collected database operating status data;
24)将归一化后的数据送入训练好的深度神经网络预测优化调整参数;24) Send the normalized data into the trained deep neural network to predict and optimize the adjustment parameters;
25)将预测的优化调整参数送入调优任务队列;25) Send the predicted optimization adjustment parameters to the optimization task queue;
26)将调优任务归类为自动审核或人工审核,若为自动审核,则将调优任务调度到自调优任务队列;若为人工审核,则将调优任务放入人工审核队列,并发消息通知相关人员,若人工审核通过则放入自调优任务队列,若人工审核不通过则该任务终止;26) Classify the tuning task as automatic review or manual review. If it is automatic review, the tuning task will be scheduled to the self-tuning task queue; if it is manually reviewed, the tuning task will be placed in the manual review queue and concurrently The message notifies the relevant personnel. If the manual review is passed, it will be placed in the self-tuning task queue. If the manual review fails, the task will be terminated;
27)自动执行调优任务,将执行情况发消息通知相关人员,并登记任务信息。27) Automatically execute the tuning task, send a message to notify the relevant personnel of the execution status, and register the task information.
进一步的,所述深度神经网络为BP神经网络、RNN神经网络、LSTM神经网络中的一种。Further, the deep neural network is one of BP neural network, RNN neural network and LSTM neural network.
进一步的,所述训练样本数据和测试样本数据为数据库历史运行的机型配置、数据库配置、数据量、读写访问量数据和访问时数据库指标状态。Further, the training sample data and the test sample data are the model configuration, database configuration, data volume, read and write access volume data, and database index status during access to the database.
本发明的基于深度神经网络的数据库动态资源调优系统与方法,具有以下有益效果:The deep neural network-based database dynamic resource tuning system and method of the present invention has the following beneficial effects:
(1)采用本发明的基于深度神经网络的数据库动态资源调优系统与方法,降低了数据库资源调优的人为干预度,从而大大降低了人为因素出错的可能性,对数据库性能和负载的定位更加准确;同时降低了数据库管理员对工作经验的依赖,在多版本环境下,通过规则化和流程化提高了调优系统的透明度。(1) Using the system and method for database dynamic resource tuning based on the deep neural network of the present invention, the degree of human intervention in database resource tuning is reduced, thereby greatly reducing the possibility of errors by human factors, and positioning the database performance and load. It is more accurate; at the same time, it reduces the dependence of database administrators on work experience, and in a multi-version environment, the transparency of the tuning system is improved through regularization and processization.
(2)采用本发明的基于深度神经网络的数据库动态资源调优系统与方法,可实现数据库资源精准化控制,大大增加群集管理能力,实现规模拓展,用极少人力管理大规模集群,从而提供更稳定的数据库服务,并可基于业务需求制定个性化流程,及时响应调优需求,提高调优工作效率,节约劳动成本。(2) The system and method for dynamic database resource tuning based on the deep neural network of the present invention can realize precise control of database resources, greatly increase the cluster management capability, realize scale expansion, and manage large-scale clusters with very little manpower, thereby providing More stable database services, and can formulate personalized processes based on business needs, respond to tuning needs in a timely manner, improve tuning efficiency, and save labor costs.
附图说明Description of drawings
图1是本发明一实施例基于深度神经网络的数据库动态资源调优系统结构图。FIG. 1 is a structural diagram of a database dynamic resource tuning system based on a deep neural network according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
本发明的目的在于提供一种基于深度神经网络的数据库动态资源调优系统与方法,降低数据库资源调优的人为干预度,实现数据库资源的精准化控制,提高调优响应效率和节约劳动成本。以下将详细阐述本发明的基于深度神经网络的数据库动态资源调优系统与方法的原理及实施方式,使本领域技术人员不需要创造性劳动即可理解本发明的技术内容。The purpose of the present invention is to provide a database dynamic resource tuning system and method based on a deep neural network, which reduces the degree of human intervention in database resource tuning, realizes precise control of database resources, improves tuning response efficiency and saves labor costs. The principles and implementations of the deep neural network-based database dynamic resource tuning system and method of the present invention will be described in detail below, so that those skilled in the art can understand the technical content of the present invention without creative work.
图1是本发明一实施例基于深度神经网络的数据库动态资源调优系统结构图。如图1所示,本发明基于深度神经网络的数据库动态资源调优系统包括:采集服务装置和调优服务装置,采集服务装置安装于数据库端,主要负责实时采集数据库运行状态数据,并按照约定格式汇总采集的数据,以及将汇总数据报送调优服务装置,采集的数据库运行状态数据包括:机型配置、数据库配置、数据量和读写访问量等;调优服务装置包括:规则模块、权限模块、分析模块、神经网络模块、决策模块、审核模块、任务模块和消息模块。规则模块主要负责设置调优规则、任务等级、审核规则和消息规则。权限模块主要负责设置登录用户权限、用户角色和web访问模块标签控制等。FIG. 1 is a structural diagram of a database dynamic resource tuning system based on a deep neural network according to an embodiment of the present invention. As shown in FIG. 1 , the database dynamic resource tuning system based on the deep neural network of the present invention includes: a collection service device and an tuning service device. The collection service device is installed on the database end, and is mainly responsible for collecting database operating status data in real time, and according to the agreement The format summarizes the collected data, and submits the summary data to the tuning service device. The collected database running status data includes: model configuration, database configuration, data volume, and read and write access volume, etc. The tuning service device includes: rule module, Permission module, analysis module, neural network module, decision module, audit module, task module and message module. The rules module is mainly responsible for setting tuning rules, task levels, audit rules and message rules. The permission module is mainly responsible for setting login user permissions, user roles, and web access module label control.
具体的,调优规则如下:Specifically, the tuning rules are as follows:
1)系统级:改变数据库OS,CPU,存储等优化,为数据库运行提供良好的环境。1) System level: Change database OS, CPU, storage and other optimizations to provide a good environment for database operation.
2)参数级:改变配置文件,修改配置文件参数,让数据库作为一个软件,运行到最佳状态。2) Parameter level: Change the configuration file, modify the parameters of the configuration file, and let the database run to the best state as a software.
具体的,任务等级按风险划分如下:Specifically, the task levels are divided according to risk as follows:
S级:此类任务风险高危,一般是关乎公司直接利益的任务,通常不被使用。S-Class: This type of mission is high-risk, generally related to the direct interests of the company, and is usually not used.
A级:通常涉及数据库核心调优或者间接与系统相关,使用较为频繁。Level A: Usually involves database core tuning or is indirectly related to the system, and is used more frequently.
B级:常见的一类数据库高级调优任务,使用最为频繁。Level B: A common class of advanced database tuning tasks that are used most frequently.
C级:较为简单的任务,一般处于业务层级,调优局部不影响整体。C-level: relatively simple tasks, generally at the business level, and tuning the part does not affect the whole.
D级:最简单的任务,也即边缘休闲任务。Class D: The simplest tasks, ie fringe casual tasks.
具体的,审核规则如下:Specifically, the audit rules are as follows:
审核模块根据调优规则、任务等级等给予风险小、业务安全性高的调优任务(如B、C、D级)自动审核通过,将风险高、业务安全性低的调优任务(如A、S级)转入人工审核,并以消息形式通知相应审核人员。任务审核状态分为以下几类:The audit module automatically approves the tuning tasks with low risk and high business security (such as B, C, and D levels) according to the tuning rules, task levels, etc., and automatically approves the tuning tasks with high risk and low business security (such as A , S grade) will be transferred to manual review, and the corresponding reviewers will be notified in the form of a message. Task review status is divided into the following categories:
待审核:优化任务创建之后,状态都为“待审核”状态,即还在审核阶段,审核通过之后变成“通过审核”状态,高风险和疑难任务将转入人工审核。Pending review: After the optimization task is created, the status is "pending review", that is, it is still in the review stage. After the review is passed, it becomes the "passed review" status, and high-risk and difficult tasks will be transferred to manual review.
通过审核:是指调优任务正常审核通过,通过审核的调优任务将安排在约定时间段内执行,可在任务审核页面进行搜索。在任务执行调优之前点“任务下架”后该任务即变成“任务下架”状态。Approved: It means that the tuning task has passed the normal review, and the tuning task that has passed the review will be scheduled to be executed within the specified time period, and can be searched on the task review page. Before the task is tuned, click "Delete the task" and the task becomes the "Delete the task" state.
人工审核:高风险或疑难类调优任务将归入人工审核。人工执行审核调优任务,通过之后变成“通过审核”状态,不通过则变成“任务下架”状态。Manual review: High-risk or difficult tuning tasks will be classified as manual review. Manually perform the auditing and tuning task, and after passing the audit, it becomes the "passed audit" status, and if it does not pass, it becomes the "task removed" status.
任务下架:是指不在正常审核通过中,点击“任务上架”后该任务变为“通过审核”状态。The task is removed from the shelf: It means that the task is not in the normal review and approval process, and the task becomes the "approved" status after clicking "task listed".
具体的,消息规则如下:Specifically, the message rules are as follows:
由消息模块统一管理各类消息、配置业务消息渠道,主要负责发送调优任务信息和调优审核信息,以及调优任务执行情况信息。消息发送状态分为以下几种:The message module manages various messages and configures business message channels in a unified manner, and is mainly responsible for sending tuning task information, tuning audit information, and tuning task execution information. The message sending status is divided into the following types:
待发送:消息即将发送阶段,开始发送之后会变成“发送中”状态,可在消息管理查询页面搜索到。To be sent: The message is about to be sent, and it will become "Sending" status after starting to send, which can be searched on the message management query page.
发送中:消息正在执行发送动作,可在消息管理查询页面搜索到。Sending: The message is being sent, which can be searched on the message management query page.
已发送:消息成功发送到联系人处,可在消息管理查询页面搜索到。Sent: The message has been successfully sent to the contact, which can be searched on the message management query page.
发送失败:特殊原因消息发送失败,可在消息管理查询页面搜索到。Failed to send: The message failed to be sent for special reasons, which can be found on the message management query page.
分析模块前置kafka,用于缓存采集服务装置报送的汇总数据,并解析和分析汇总数据,根据调优规则判断是否需要对数据库进行调优。The analysis module is prefaced with kafka, which is used to cache the summary data submitted by the collection service device, parse and analyze the summary data, and judge whether the database needs to be tuned according to the tuning rules.
神经网络模块主要负责业务模型训练,预测数据库优化调整参数,并将优化调整参数传送给决策模块;优选的,神经网络模块为BP神经网络、RNN神经网络、LSTM神经网络中的一种。The neural network module is mainly responsible for training the business model, predicting database optimization and adjustment parameters, and transmitting the optimization and adjustment parameters to the decision-making module; preferably, the neural network module is one of BP neural network, RNN neural network, and LSTM neural network.
决策模块主要负责生成调优任务,并将调优任务发送给审核模块。具体的,决策模块接收到优化调整参数后,根据调优规则、任务等级、消息规则等信息生成调优任务,并以消息形式通知审核模块。The decision module is mainly responsible for generating tuning tasks and sending the tuning tasks to the review module. Specifically, after receiving the optimization and adjustment parameters, the decision-making module generates an optimization task according to information such as the optimization rules, task levels, and message rules, and notifies the audit module in the form of a message.
审核模块主要负责审核调优任务,将调优任务归为自动审核或人工审核类别。具体的,审核模块根据调优规则、任务等级、审核规则等信息将风险小、业务安全性高的调优任务归为自动审核类别,这类调优任务将设置自动审核通过;将风险高、业务安全性低的调优任务归为人工审核类别,并以消息形式通知相应审核人员进行人工审核。The auditing module is mainly responsible for auditing and tuning tasks, and categorizes tuning tasks as automatic auditing or manual auditing. Specifically, the audit module classifies the tuning tasks with low risk and high business security into the automatic review category according to the tuning rules, task levels, review rules and other information. Such tuning tasks will be set to be automatically reviewed and approved; Tuning tasks with low business security are classified as manual review, and the corresponding reviewers are notified in the form of messages for manual review.
任务模块主要负责管理和执行审核通过的调优任务。待执行的任务可以被召回,重新回到审核评估状态。调优任务完成后,任务模块将完成状态信息以消息形式通知项目组相关人员。The task module is mainly responsible for managing and executing audited tuning tasks. Pending tasks can be recalled and returned to review evaluation status. After the tuning task is completed, the task module will notify the relevant personnel of the project team in the form of a message of the completion status information.
消息模块主要负责消息管理,包括但不限于:消息渠道选择,发送调优任务信息、调优审核信息、调优任务完成状态信息等。The message module is mainly responsible for message management, including but not limited to: message channel selection, sending tuning task information, tuning audit information, and tuning task completion status information.
在另一实施例中还包括:DATA模块,DATA模块用于存储规则信息、权限信息、任务信息和消息信息。Another embodiment further includes: a DATA module, where the DATA module is used to store rule information, authority information, task information and message information.
本发明实施例还提供一种基于深度神经网络的数据库动态资源调优方法,包括以下步骤:An embodiment of the present invention also provides a method for optimizing database dynamic resources based on a deep neural network, comprising the following steps:
1)深度神经网络模型训练:1) Deep neural network model training:
11)准备深度神经网络的训练样本数据和测试样本数据。选取适量正常合规的数据库历史运行数据作为训练样本数据和测试样本数据,包括:机型配置(CPU/RAM/hard disk/bandwidth)、数据库配置(类型、规格、版本、指标值、关联指标值)、数据量、读写访问量、访问时数据库指标状态等指标数据,并对这些数据进行归一化处理,避免原始数据过大或过小对深度神经网络造成不良影响。11) Prepare training sample data and test sample data for the deep neural network. Select an appropriate amount of normal and compliant historical database operation data as training sample data and test sample data, including: model configuration (CPU/RAM/hard disk/bandwidth), database configuration (type, specification, version, indicator value, associated indicator value) ), data volume, read and write access volume, database indicator status at the time of access and other indicator data, and normalize these data to prevent the original data from being too large or too small to cause adverse effects on the deep neural network.
12)构造深度神经网络模型。具体的,深度神经网络模型可选择构建BP神经网络、RNN神经网络、LSTM神经网络等模型。本实施例优选构造三层的BP神经网络模型。12) Construct a deep neural network model. Specifically, the deep neural network model can be selected to construct models such as BP neural network, RNN neural network, LSTM neural network, etc. In this embodiment, a three-layer BP neural network model is preferably constructed.
13)初始化深度神经网络模型的参数。具体的,可随机设定深度神经网络模型的权重、偏置值等参数,也可以按一定的规则生成权重、偏置值等参数。13) Initialize the parameters of the deep neural network model. Specifically, parameters such as weights and bias values of the deep neural network model can be randomly set, or parameters such as weights and bias values can be generated according to certain rules.
14)对深度神经网络模型进行训练,并进行优化。将训练样本数据输入构建好的三层BP神经网络模型,根据损失函数计算出误差,再根据误差反向传播调整每层神经网络的权重、偏置值等参数。反复训练,直到损失函数计算出的误差小于预定的值,或者误差的变化不再减小。14) Train and optimize the deep neural network model. Input the training sample data into the constructed three-layer BP neural network model, calculate the error according to the loss function, and then adjust the weight, bias value and other parameters of each layer of neural network according to the error back propagation. The training is repeated until the error calculated by the loss function is less than a predetermined value, or the change in the error no longer decreases.
15)验证并保存模型训练结果。深度神经网络模型训练完成后,使用测试样本数据验证其准确度,并保存模型训练结果。15) Verify and save the model training results. After the training of the deep neural network model is completed, use the test sample data to verify its accuracy, and save the model training results.
2)数据库动态资源调优:2) Database dynamic resource tuning:
21)采集服务装置采集数据库运行状态数据,包括:机型配置、数据库配置、数据量和读写访问量、访问时数据库指标状态等,并按照约定格式整理数据;21) The collection service device collects database operating status data, including: model configuration, database configuration, data volume, read and write access volume, database indicator status during access, etc., and organizes the data according to the agreed format;
22)分析模块分析采集整理好的数据库运行状态数据,根据调优规则判断是否需要对数据库进行调优,如需调优,则进行步骤23);如无需调优,则记录判断信息,本次任务结束。具体的,分析模块根据调优规则总体评估分析,将各个指标数据以约定格式分类,判断出需要调优的指标,进行步骤23)。更为具体的,随着业务数据的积累查询变慢,分析模块经评估分析到join指标设置不合理,需要优化join指标的一应机型配置(CPU/RAM/hard disk/bandwidth)及机型剩余资源、数据库配置(类型、规格、版本、关联指标值)、数据量、读写访问量、访问时数据库指标状态等指标数据,进行步骤23)。22) The analysis module analyzes and collects the database running status data, and judges whether the database needs to be tuned according to the tuning rules. If tuning is required, go to step 23); Mission over. Specifically, according to the overall evaluation and analysis of the tuning rules, the analysis module classifies each indicator data in an agreed format, determines the indicators that need to be tuned, and proceeds to step 23). More specifically, as business data accumulates and queries become slower, the analysis module finds that the join indicator setting is unreasonable after evaluation and analysis, and it is necessary to optimize the configuration (CPU/RAM/hard disk/bandwidth) and model of the join indicator. Index data such as remaining resources, database configuration (type, specification, version, associated index value), data volume, read and write access volume, and database index status during access, go to step 23).
23)对采集的数据库运行状态数据进行归一化。在上述具体实施例中,将采集的机型配置(CPU/RAM/hard disk/bandwidth)、数据库配置(类型、规格、版本、关联指标值)、数据量、读写访问量、访问时数据库指标状态等指标数据进行归一化。23) Normalize the collected database running state data. In the above specific embodiment, the collected model configuration (CPU/RAM/hard disk/bandwidth), database configuration (type, specification, version, associated indicator value), data volume, read and write access volume, and database indicators during access Status and other indicator data are normalized.
24)将归一化后的数据送入训练好的深度神经网络,预测优化调整参数。具体的,将步骤23)归一化处理的数据,输入三层BP神经网络模型,更为具体的,以join指标和相关配置信息作为输入层每一神经元的输入数据,输出层仅设置唯一神经元,预测输出目标调优值,得到优化调整参数。24) Send the normalized data into the trained deep neural network to predict and optimize the adjustment parameters. Specifically, the data normalized in step 23) is input into the three-layer BP neural network model. More specifically, the join index and related configuration information are used as the input data of each neuron in the input layer, and the output layer only sets the unique The neuron predicts the output target tuning value and obtains the optimized tuning parameters.
25)决策模块将预测的优化调整参数送入调优任务队列。具体的,决策模块接收到优化调整参数后,根据调优规则、任务等级、消息规则等信息生成调优任务,并以消息形式通知审核模块。25) The decision-making module sends the predicted optimization adjustment parameters to the optimization task queue. Specifically, after receiving the optimization and adjustment parameters, the decision-making module generates an optimization task according to information such as the optimization rules, task levels, and message rules, and notifies the audit module in the form of a message.
26)审核模块审核调优任务,根据审核规则将调优任务归为自动审核或人工审核类别。若为自动审核类别,则将调优任务调度到自调优任务队列;若为人工审核类别,则将调优任务放入人工审核队列,并发消息通知相关人员,若人工审核通过则放入自调优任务队列,若人工审核不通过则该任务终止。26) The audit module audits the tuning tasks, and classifies the tuning tasks as automatic audit or manual audit according to the audit rules. If it is in the automatic review category, the tuning task will be scheduled to the self-tuning task queue; if it is in the manual review category, the tuning task will be placed in the manual review queue, and a message will be sent to the relevant personnel. Tuning the task queue, if the manual review fails, the task will be terminated.
27)任务模块自动执行自调优任务队列中的任务,将执行情况通过消息模块发消息通知相关人员,并登记任务信息。27) The task module automatically executes the tasks in the self-tuning task queue, notifies the relevant personnel of the execution status through the message module, and registers the task information.
本发明的基于深度神经网络的数据库动态资源调优系统与方法,采用深度神经网络模型预测优化调整参数,降低了数据库资源调优的人为干预度,从而大大降低了人为因素出错的可能性,对数据库性能和负载的定位更加准确;同时也降低了数据库管理员对工作经验的依赖,在多版本环境下,通过规则化和流程化提高了调优系统的透明度。The system and method for database dynamic resource tuning based on the deep neural network of the present invention adopts the deep neural network model to predict and optimize the adjustment parameters, which reduces the degree of human intervention in database resource tuning, thereby greatly reducing the possibility of errors caused by human factors. The positioning of database performance and load is more accurate; at the same time, the dependence of database administrators on work experience is reduced, and the transparency of the tuning system is improved through regularization and processization in a multi-version environment.
采用本发明的基于深度神经网络的数据库动态资源调优系统与方法,可实现数据库资源精准化控制,大大增加群集管理能力,实现规模拓展,用极少人力管理大规模集群,从而提供更稳定的数据库服务,并可基于业务需求制定个性化流程,及时响应调优需求,提高调优工作效率,节约劳动成本。By adopting the system and method for database dynamic resource tuning based on the deep neural network of the present invention, the precise control of database resources can be realized, the cluster management capability can be greatly increased, the scale expansion can be realized, and a large-scale cluster can be managed with very little manpower, thereby providing a more stable Database services, and can formulate personalized processes based on business needs, respond to tuning needs in a timely manner, improve tuning efficiency, and save labor costs.
可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。凡在本发明的精神和原则之内,所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围内。It can be understood that the above embodiments are only exemplary embodiments adopted to illustrate the principle of the present invention, but the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011611709.7A CN114691641A (en) | 2020-12-31 | 2020-12-31 | Database dynamic resource tuning system and method based on deep neural network |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011611709.7A CN114691641A (en) | 2020-12-31 | 2020-12-31 | Database dynamic resource tuning system and method based on deep neural network |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114691641A true CN114691641A (en) | 2022-07-01 |
Family
ID=82132372
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011611709.7A Pending CN114691641A (en) | 2020-12-31 | 2020-12-31 | Database dynamic resource tuning system and method based on deep neural network |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114691641A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119127852A (en) * | 2024-08-19 | 2024-12-13 | 深圳市钛锋智能有限公司 | High-performance real-time market record information review and entry system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060122975A1 (en) * | 2004-12-03 | 2006-06-08 | Taylor Paul S | System and method for query management in a database management system |
| US8332857B1 (en) * | 2008-12-30 | 2012-12-11 | Teradota Us, Inc. | Database system having a regulator that performs workload regulation based on optimizer estimates |
| WO2018175551A1 (en) * | 2017-03-22 | 2018-09-27 | Circadence Corporation | Mission-based, game-implemented cyber training system and method |
| US20190102411A1 (en) * | 2017-09-29 | 2019-04-04 | Oracle International Corporation | Rule-based autonomous database cloud service framework |
| US20200125568A1 (en) * | 2018-10-18 | 2020-04-23 | Oracle International Corporation | Automated provisioning for database performance |
-
2020
- 2020-12-31 CN CN202011611709.7A patent/CN114691641A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060122975A1 (en) * | 2004-12-03 | 2006-06-08 | Taylor Paul S | System and method for query management in a database management system |
| US8332857B1 (en) * | 2008-12-30 | 2012-12-11 | Teradota Us, Inc. | Database system having a regulator that performs workload regulation based on optimizer estimates |
| WO2018175551A1 (en) * | 2017-03-22 | 2018-09-27 | Circadence Corporation | Mission-based, game-implemented cyber training system and method |
| US20190102411A1 (en) * | 2017-09-29 | 2019-04-04 | Oracle International Corporation | Rule-based autonomous database cloud service framework |
| US20200125568A1 (en) * | 2018-10-18 | 2020-04-23 | Oracle International Corporation | Automated provisioning for database performance |
Non-Patent Citations (1)
| Title |
|---|
| 唐守军;: "基于数学建模方法的数据库系统性能调优研究", 现代计算机, no. 12, 25 April 2013 (2013-04-25) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119127852A (en) * | 2024-08-19 | 2024-12-13 | 深圳市钛锋智能有限公司 | High-performance real-time market record information review and entry system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10592386B2 (en) | Fully automated machine learning system which generates and optimizes solutions given a dataset and a desired outcome | |
| US11449506B2 (en) | Recommendation model generation and use in a hybrid multi-cloud database environment | |
| US20210097343A1 (en) | Method and apparatus for managing artificial intelligence systems | |
| EP3591586A1 (en) | Data model generation using generative adversarial networks and fully automated machine learning system which generates and optimizes solutions given a dataset and a desired outcome | |
| US7526508B2 (en) | Self-managing database architecture | |
| US9367601B2 (en) | Cost-based optimization of configuration parameters and cluster sizing for hadoop | |
| CN118761745B (en) | OA collaborative workflow optimization method applied to enterprise | |
| CN119201620B (en) | Cloud computing analysis method, device and equipment of SaaS system and storage medium | |
| CN101311898B (en) | Software component reliability evaluation method and system | |
| CN118689639A (en) | A cloud resource intelligent recovery method, system and terminal device | |
| CN118467465A (en) | File information data management method based on digitization | |
| CN109685315A (en) | A kind of enterprise information system evaluation method based on quantizating index | |
| CN119806992B (en) | Intelligent inspection method and device for database | |
| CN118819483A (en) | A method for launching an ERP system | |
| CN120255824A (en) | Data management method based on distributed storage system | |
| CN119719077A (en) | Database optimization method, system, device, medium and program product | |
| CN118708593B (en) | A data processing method and system in a high-concurrency scenario of a data center | |
| CN114691641A (en) | Database dynamic resource tuning system and method based on deep neural network | |
| CN117235041A (en) | Database migration method, device, terminal equipment and storage medium | |
| US12299550B1 (en) | Model driven configuration of software installation operating states | |
| CN111597097B (en) | Big data processing method and system | |
| CN118964446B (en) | Experimental data management system based on network platform | |
| CN120491935B (en) | Software development upstream and downstream task parameter transfer and optimization method based on artificial intelligence | |
| CN119441563B (en) | AI intelligent decision-making method for unstructured data processing | |
| US9244955B1 (en) | Methods and apparatus for generating a database layout |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| AD01 | Patent right deemed abandoned | ||
| AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20250221 |