A database backup scheduling method and device

By constructing a backup duration prediction model and filtering rules, the optimal configuration data is selected, realizing the automation and intelligence of database backup, solving the problem of low efficiency in traditional database backup, and improving the reliability and accuracy of backup.

CN114625570BActive Publication Date: 2025-12-16CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210240678.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2025-12-16
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

Traditional database backup methods involve a lot of repetitive work in large-scale clusters, resulting in low backup efficiency and failing to meet the reliability, security, and accuracy requirements of data backup tasks.

Method used

By constructing a backup duration prediction model, a machine learning model is used to select multiple sets of configuration data to be predicted, filter out the optimal configuration data, and perform database backup according to the optimal configuration data. Combined with filtering rules, abnormal configurations are excluded, thus realizing an automated and intelligent backup process.

Benefits of technology

It improves the efficiency of database backup, ensures the reliability, security and accuracy of data backup tasks, and reduces the data processing time requiring manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625570B_ABST
    Figure CN114625570B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a database backup scheduling method and device, which can be used in the field of artificial intelligence technology, and the method comprises the following steps: training a machine learning model according to generated training data samples, and constructing a backup duration prediction model; selecting a plurality of obtained to-be-predicted configuration data through the backup duration prediction model and set filtering rules to obtain optimal configuration data; and performing database backup according to the optimal configuration data, so that the database backup can be intelligently and automatically performed, and the reliability, safety and accuracy of the data backup task are ensured, thereby improving the database backup efficiency. Another object of the present application is to provide a database backup scheduling device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of database management, in particular to the technical field of artificial intelligence, and especially to a database backup scheduling method and device. BACKGROUND

[0002] Under the background of the big data explosion era, the database (MySQL) gradually becomes the most mainstream technology to meet the data management needs of enterprise-level business, and further penetrates into the financial business field. In the MySQL database use scenario of financial-level business, multi-center, distributed, multi-live database technology solutions are applied more and more, and how to reasonably and efficiently schedule database backup becomes the last guarantee for system failure. The traditional data backup method needs engineers to manually connect the database instance. In the application scenario of large-scale cluster execution of MySQL database library level and table level backup, there is a lot of repetitive work, and manual data backup cannot meet the reliability, security and accuracy of data backup tasks, resulting in low efficiency of database backup. SUMMARY

[0003] One object of the present application is to provide a database backup scheduling method that can intelligently and automatically perform database backup while ensuring the reliability, security and accuracy of data backup tasks, thereby improving the efficiency of database backup. Another object of the present application is to provide a database backup scheduling device. Still another object of the present application is to provide a computer readable medium. Yet another object of the present application is to provide a computer device.

[0004] To achieve the above objects, the present application discloses a database backup scheduling method, comprising:

[0005] training the machine learning model according to the generated training data samples to build a backup duration prediction model;

[0006] selecting the optimal configuration data by the backup duration prediction model and the set filtering rules from the obtained multiple pieces of to-be-predicted configuration data;

[0007] performing database backup according to the optimal configuration data.

[0008] Preferably, before training the machine learning model according to the generated training data samples to build a backup duration prediction model, the method further comprises:

[0009] collecting the running parameters according to the specified period;

[0010] performing database backup according to the running parameters and recording the backup duration actual value;

[0011] According to the backup duration actual value corresponding to the operation parameter, a training data sample is generated.

[0012] Preferably, according to the generated training data sample, a machine learning model is trained to build a backup duration prediction model, including:

[0013] The training data sample is divided into a training set and a validation set;

[0014] According to the training set, the machine learning model is trained to build an initial prediction model;

[0015] According to the validation set, the initial prediction model is verified and optimized to generate a backup duration prediction model.

[0016] Preferably, through the backup duration prediction model and the set filtering rule, the obtained multiple pieces of to-be-predicted configuration data are selected to obtain optimal configuration data, including:

[0017] Each piece of to-be-predicted configuration data is predicted by the backup duration prediction model to obtain a corresponding backup duration prediction value;

[0018] Each piece of to-be-predicted configuration data is filtered and discriminated by the filtering rule to obtain candidate configuration data;

[0019] From the candidate configuration data, the optimal configuration data is selected according to the backup duration prediction value corresponding to each piece of to-be-predicted configuration data.

[0020] Preferably, the to-be-predicted configuration data includes a backup node central processor load, and the filtering rule is that the backup node central processor load is greater than a set load threshold;

[0021] Each piece of to-be-predicted configuration data is filtered and discriminated by the filtering rule to obtain candidate configuration data, including:

[0022] It is judged whether the backup node central processor load is greater than the load threshold;

[0023] If yes, the corresponding to-be-predicted configuration data is filtered out;

[0024] If not, the corresponding to-be-predicted configuration data is determined as candidate configuration data.

[0025] Preferably, the to-be-predicted configuration data includes a network packet loss rate, and the filtering rule is that the network packet loss rate is greater than a set packet loss rate threshold;

[0026] Each piece of to-be-predicted configuration data is filtered and discriminated by the filtering rule to obtain candidate configuration data, including:

[0027] It is judged whether the network packet loss rate is greater than the packet loss rate threshold;

[0028] If yes, filter out the corresponding to-be-predicted configuration data;

[0029] If no, determine the corresponding to-be-predicted configuration data as candidate configuration data.

[0030] Preferably, the optimal configuration data is screened out from the candidate configuration data according to the backup time length prediction value corresponding to each to-be-predicted configuration data, comprising:

[0031] Query the backup time length prediction value corresponding to the candidate configuration data;

[0032] Screen out the minimum backup time length prediction value from the queried backup time length prediction value;

[0033] Determine the candidate configuration data corresponding to the minimum backup time length prediction value as the optimal configuration data.

[0034] Preferably, the method further comprises:

[0035] Judge whether the number of candidate configuration data is zero;

[0036] If yes, generate configuration exception information;

[0037] If no, continue to execute the step of screening out the optimal configuration data from the candidate configuration data according to the backup time length prediction value corresponding to each to-be-predicted configuration data.

[0038] Preferably, the method further comprises:

[0039] If an exception signal is generated in the execution of the database backup process, filter out the current optimal configuration data;

[0040] Select the to-be-predicted configuration data except the current optimal configuration data through the backup time length prediction model and the set filtering rule, to obtain updated configuration data;

[0041] Execute the database backup according to the updated configuration data.

[0042] Preferably, after executing the database backup according to the optimal configuration data, the method further comprises:

[0043] Record the backup time length;

[0044] Update the backup time length prediction model according to the optimal configuration data and the backup time length, to obtain an updated backup time length prediction model.

[0045] The application also discloses a database backup scheduling device, comprising:

[0046] A construction unit is configured to train a machine learning model according to the generated training data sample, and construct a backup time length prediction model.

[0047] The selecting unit is configured to select the obtained multiple pieces of to-be-predicted configuration data according to the backup time prediction model and a set filtering rule, and obtain optimal configuration data.

[0048] The backup unit is configured to perform database backup according to the optimal configuration data.

[0049] Preferably, the apparatus further comprises:

[0050] The collecting unit is configured to collect the operation parameter according to a specified period.

[0051] The first recording unit is configured to record a backup time actual value according to the operation parameter and the database backup.

[0052] The generating unit is configured to generate a training data sample according to the backup time actual value corresponding to the operation parameter.

[0053] Preferably, the constructing unit is specifically configured to divide the training data sample into a training set and a verification set; train the machine learning model according to the training set to construct an initial prediction model; and verify and optimize the initial prediction model according to the verification set to generate the backup time prediction model.

[0054] Preferably, the selecting unit is specifically configured to predict each piece of to-be-predicted configuration data according to the backup time prediction model to obtain a corresponding backup time prediction value; filter and distinguish each piece of to-be-predicted configuration data according to the filtering rule to obtain candidate configuration data; and select the optimal configuration data from the candidate configuration data according to the backup time prediction value corresponding to each piece of to-be-predicted configuration data.

[0055] Preferably, the apparatus further comprises:

[0056] The judging unit is configured to judge whether the number of the candidate configuration data is zero; if yes, generate configuration exception information; and if no, trigger the selecting unit to continue to execute the step of selecting the optimal configuration data from the candidate configuration data according to the backup time prediction value corresponding to each piece of to-be-predicted configuration data.

[0057] Preferably, the apparatus further comprises:

[0058] The filtering unit is configured to filter out the current optimal configuration data if an exception signal is generated during the execution of the database backup process.

[0059] The first updating unit is configured to select to-be-predicted configuration data except the current optimal configuration data according to the backup time prediction model and the set filtering rule, and obtain updated configuration data.

[0060] The backup unit is further configured to perform database backup according to the updated configuration data.

[0061] Preferably, the apparatus further comprises:

[0062] a second recording unit configured to record the backup duration;

[0063] a second updating unit configured to update the backup duration prediction model according to the optimal configuration data and the backup duration, to obtain an updated backup duration prediction model.

[0064] The application further discloses a computer readable medium, which stores a computer program, and the program is executed by a processor to realize the method.

[0065] The application further discloses a computer device, which comprises a memory and a processor, the memory is used for storing information comprising program instructions, and the processor is used for controlling execution of the program instructions, and the processor realizes the method when executing the program.

[0066] The application further discloses a computer program product, which comprises computer program / instructions, and the computer program / instructions are executed by a processor to realize the method.

[0067] The application trains a machine learning model according to generated training data samples, constructs a backup duration prediction model, selects a plurality of pieces of to-be-predicted configuration data obtained by the backup duration prediction model and a set filtering rule, obtains optimal configuration data, and performs database backup according to the optimal configuration data, so that the database backup can be intelligently and automatically performed, and the reliability, safety and accuracy of the data backup task are ensured, thereby improving the database backup efficiency. Another object of the application is to provide a database backup scheduling device. BRIEF DESCRIPTION OF DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.

[0069] Figure 1 A flow chart of a database backup scheduling method provided by the application;

[0070] Figure 2 A flow chart of another database backup scheduling method provided by the application;

[0071] Figure 3 A structural schematic diagram of a database backup scheduling device provided by the application;

[0072] Figure 4A structural schematic diagram of a computer device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0073] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0074] It should be noted that the database backup scheduling method and device disclosed in the present application can be used in the field of artificial intelligence technology, and can also be used in any field other than the field of artificial intelligence technology. The application field of the database backup scheduling method and device disclosed in the present application is not limited.

[0075] In order to facilitate understanding of the technical solutions provided by the present application, the related contents of the technical solutions of the present application will be described first. The database refers to a database management system, which is a relatively ideal data processing system developed to meet the needs of data processing, and is also a software system that provides data for an actual executable storage, maintenance and application system, and is a collection of storage media, processing objects and management systems. Database backup scheduling refers to a method or strategy for executing data backup for a database management system, evaluating and selecting database nodes and backup storage destinations that meet the conditions, using reasonable data backup methods (such as logical backup and physical backup), and realizing the process of copying data from the database management system to the dump device. With the continuous development and maturity of MySQL database technology, its application in financial business scenarios is gradually expanding. For all database businesses, backup is a core component of database management control systems and is the last barrier to achieving high reliability and data security of database systems. There is a strong demand for an automatic backup system with complete functions and advanced technology in the application of open source MySQL database clusters in financial scenarios. A new type of backup scheduling method for large-scale MySQL database cluster management tasks is needed, which realizes more intelligent, safer and more reliable automatic backup job scheduling on the basis of effective utilization of database instance resources.

[0076] The implementation process of the database backup scheduling method provided by the embodiments of the present application will be described below with the database backup scheduling device as an example. It can be understood that the execution subject of the database backup scheduling method provided by the embodiments of the present application includes but is not limited to the database backup scheduling device.

[0077] Figure 1 A flowchart of the database backup scheduling method provided by an embodiment of the present application is shown in the figure. Figure 1 The method comprises:

[0078] Step 101, training the machine learning model according to the generated training data samples, and constructing a backup duration prediction model.

[0079] Step 102, selecting the obtained multiple pieces of to-be-predicted configuration data through the backup duration prediction model and the set filtering rule, and obtaining optimal configuration data.

[0080] Step 103, performing database backup according to the optimal configuration data.

[0081] It is worth noting that the acquisition, storage, use, processing, etc. of data in the technical scheme of the present application comply with the relevant provisions of national laws and regulations.

[0082] In the technical scheme provided by the embodiment of the present application, the machine learning model is trained according to the generated training data samples, and the backup duration prediction model is constructed; the obtained multiple pieces of to-be-predicted configuration data are selected through the backup duration prediction model and the set filtering rule, and the optimal configuration data are obtained; and the database backup is performed according to the optimal configuration data, which can intelligently and automatically perform the database backup, and at the same time ensure the reliability, safety and accuracy of the data backup task, thereby improving the database backup efficiency. Another purpose of the present application is to provide a database backup scheduling device.

[0083] Figure 2 The flowchart of another database backup scheduling method provided by the embodiment of the present application is shown in Figure 2 The method comprises the following steps:

[0084] Step 201, collecting running parameters according to a specified period.

[0085] In the embodiment of the present application, each step is executed by the database backup scheduling device.

[0086] In the embodiment of the present application, the specified period can be set according to the actual situation, and the present application is not limited thereto. For example, the specified period can be 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours or 24 hours. The specified period can also take other values, and is not limited to the above examples.

[0087] In the embodiment of the present application, the operation parameters include, but are not limited to, central processing unit (CPU) related parameters, memory related parameters, storage related parameters, network related parameters and backup database related parameters. Among them, the CPU related parameters include, but are not limited to, the number of CPU cores, CPU idle rate, CPU usage rate and CPU load rate; the memory related parameters include, but are not limited to, the maximum memory capacity, the used memory capacity, the memory usage rate, the memory size shared by multiple processes, the size of the buffer and the size of the cache; the storage related parameters include, but are not limited to, the storage medium type (for example: file server, simple storage service S3, storage area network SAN), the total size of the hard disk, the remaining space size of the hard disk, the response time, the average input / output (IO) bandwidth, the random read IO, the random write IO, the random mixed read-write IO, the sequential read IO, the sequential write IO, the sequential mixed read-write IO; the network related parameters include, but are not limited to, the network uplink rate, the network downlink rate, the network packet loss rate per unit time and the routing forwarding times; the backup database related parameters include, but are not limited to, the backup library table physical size, the database connection number, the database master-slave delay, and the data center to which the database instance belongs.

[0088] In the embodiment of the present application, the database backup scheduling device includes a monitoring component, which can periodically collect operation parameters for subsequent use as model training parameters.

[0089] Further, the database backup scheduling device can further calculate the collected operation parameters to obtain actual demand indicators for subsequent use as model training parameters. For example, the growth rate and average value of a certain indicator can be calculated.

[0090] Step 202, performing database backup according to the operation parameters, and recording the actual value of the backup duration.

[0091] In the embodiment of the present application, the obtained operation parameters are used as the configuration data of the database backup, the database backup is performed in the real environment, and the actual value of the backup duration is recorded for subsequent use as the model training parameter.

[0092] Step 203, generating a training data sample according to the actual value of the backup duration corresponding to the operation parameter.

[0093] In the embodiment of the present application, the operation parameters that cause backup exceptions in the database backup process and the corresponding actual values of the backup duration are filtered; the operation parameters that can normally perform database backup and the corresponding actual values of the backup duration are used as training data samples. It should be noted that the amount of data in the training data sample needs to meet a predetermined quantity requirement. As an optional solution, the quantity requirement is that the amount of data in the training data sample is greater than or equal to 1000, so as to ensure that there are enough training data samples for training the backup duration prediction model, thereby ensuring the accuracy of the backup duration prediction model.

[0094] Step 204, training the machine learning model according to the generated training data sample, and constructing a backup duration prediction model.

[0095] In the embodiment of the present application, step 204 specifically comprises:

[0096] Step 2041, dividing the training data sample into a training set and a validation set.

[0097] In the embodiment of the present application, the training data sample is divided into the training set and the validation set according to the set division ratio. The division ratio can be set according to actual conditions, and the embodiment of the present application does not limit this. As an optional solution, the division ratio is 7:3, that is, the proportions of the training set and the validation set in the training data sample are 7 and 3 respectively. The training set is used for training the initial prediction model, and the validation set is used for verifying and evaluating the initial prediction model.

[0098] Step 2042, training the machine learning model according to the training set, and constructing an initial prediction model.

[0099] In the embodiment of the present application, the machine learning model is an XGBoost model, which is set as a regression prediction model. The basic idea of the XGBoost model is to continuously train and adjust the model parameters to continuously reduce the value of the loss function, and to construct the initial prediction model. Specifically, the training set is input into the XGBoost model for training, and the initial prediction model is output.

[0100] Step 2042, verifying and optimizing the initial prediction model according to the validation set, and generating a backup duration prediction model.

[0101] In the embodiment of the present application, the initial prediction model is verified and evaluated by a model evaluation index. As an optional solution, the model evaluation index is the root mean square error. Specifically, the running parameters in the validation set are input into the initial prediction model to output corresponding verification prediction values; the square of the difference between the actual value of the backup duration in the validation set and the output verification prediction value is calculated to obtain a first result; the sum of a plurality of first results is calculated, and the average value of the sum result is taken to obtain a second result; the second result is taken to the power of 1 / 2 to obtain the root mean square error. The smaller the value of the root mean square error, the better the fitting result of the initial prediction model; the larger the value of the root mean square error, the worse the fitting result of the initial prediction model.

[0102] Further, according to the root mean square error, the hyperparameters of the initial prediction model are adjusted, and the initial prediction model is repeatedly trained until the obtained root mean square error meets the preset error requirement, and the backup duration prediction model is output. It should be noted that the error requirement can be set according to actual conditions. The embodiment of the present application does not limit this.

[0103] Further, in the process of verifying and optimizing the initial prediction model, it is necessary to prevent model overfitting. There are various methods to prevent overfitting, and the embodiments of the present application do not limit the selection of specific ways to prevent overfitting.

[0104] In the embodiments of the present application, since the combination of factors in the operating parameters is various and very complex, it is difficult to describe the relationship between various factors by ordinary rule formula. The XGBoost model is trained to construct a backup duration prediction model, which provides a data basis for selecting the optimal configuration data in the subsequent area.

[0105] In the embodiments of the present application, the backup duration prediction model is obtained by training a large number of training data samples on a machine learning algorithm, which can more accurately predict the load overhead trend of future data backup, and dynamically adapt to the external environment based on gradient changes; and the training data samples integrate various operating parameters, and the backup duration prediction model obtained by training various operating parameters has high accuracy, and the prediction value obtained by the backup duration prediction model has reliability.

[0106] In the embodiments of the present application, after generating the backup duration prediction model, the backup duration prediction model is saved for subsequent execution of database backup according to a database backup request. The database backup request can be externally initiated.

[0107] Step 205, selecting the optimal configuration data by the backup duration prediction model and the set filtering rule from the obtained multiple pieces of to-be-predicted configuration data.

[0108] In the embodiments of the present application, step 205 specifically includes:

[0109] Step 2051, predicting each piece of to-be-predicted configuration data by the backup duration prediction model to obtain a corresponding backup duration prediction value.

[0110] In the embodiments of the present application, the to-be-predicted configuration data is obtained by the monitoring component, and includes but is not limited to central processing unit (CPU) related parameters, memory related parameters, storage related parameters, network related parameters and backup database related parameters.

[0111] Further, the to-be-predicted configuration data further includes optional backup nodes and optional backup target addresses for subsequent selection of candidate configuration data according to the filtering rule.

[0112] Specifically, the to-be-predicted configuration data is input into the backup duration prediction model to predict the backup duration, and generate a backup duration prediction value corresponding to each piece of to-be-predicted configuration data.

[0113] Step 2052, filtering each piece of to-be-predicted configuration data by the filtering rule to obtain candidate configuration data.

[0114] In the embodiment of the present application, the filtering rule is set according to actual conditions, and the embodiment of the present application does not limit the specific setting of the filtering rule. The configuration data required to be filtered by the filtering rule has a high failure rate and / or low backup efficiency in the data backup process, and therefore, the configuration data with abnormal hidden dangers needs to be filtered out to ensure the efficiency and success rate of data backup.

[0115] As an optional solution, the to-be-predicted configuration data includes a backup target address disk remaining space, and the filtering rule is that the backup target address disk remaining space is less than a specified multiple of a physical space corresponding to backup data. It should be noted that the physical space corresponding to the backup data can be obtained according to the position of the backup data in the database; the specified multiple can be set according to actual conditions, and the embodiment of the present application does not limit this. For example, the specified multiple is 2 times. Specifically, it is judged whether the backup target address disk remaining space is less than 2 times of the physical space corresponding to the backup data. If yes, it indicates that the current to-be-predicted configuration data is an unusable configuration, and the corresponding to-be-predicted configuration data is filtered out; if not, it indicates that the current to-be-predicted configuration data is a usable configuration, and the corresponding to-be-predicted configuration data is determined as candidate configuration data.

[0116] As another optional solution, the to-be-predicted configuration data includes a backup node CPU load, and the filtering rule is that the backup node CPU load is greater than a set load threshold. Specifically, it is judged whether the backup node CPU load is greater than the load threshold; if yes, it indicates that the current to-be-predicted configuration data is an unusable configuration, and the corresponding to-be-predicted configuration data is filtered out; if not, it indicates that the current to-be-predicted configuration data is a usable configuration, and the corresponding to-be-predicted configuration data is determined as candidate configuration data. It should be noted that the load threshold can be set according to actual conditions, and the embodiment of the present application does not limit this. For example, the load threshold is 70%.

[0117] As another optional solution, the to-be-predicted configuration data includes a network packet loss rate, and the filtering rule is that the network packet loss rate is greater than a set packet loss rate threshold. Specifically, it is judged whether the network packet loss rate is greater than the packet loss rate threshold; if yes, it indicates that the current to-be-predicted configuration data is an unusable configuration, and the corresponding to-be-predicted configuration data is filtered out; if not, it indicates that the current to-be-predicted configuration data is a usable configuration, and the corresponding to-be-predicted configuration data is determined as candidate configuration data. It should be noted that the packet loss rate threshold can be set according to actual conditions, and the embodiment of the present application does not limit this. For example, the packet loss rate threshold is 5%.

[0118] As another alternative, the filtering rule is that the backup duration prediction value is greater than the specified period of the collection operation parameter. Specifically, it is judged whether the backup duration prediction value is greater than the specified period of the collection operation parameter. If yes, it indicates that the current to-be-predicted configuration data is unusable configuration, and the corresponding to-be-predicted configuration data is filtered out. If no, it indicates that the current to-be-predicted configuration data is usable configuration, and the corresponding to-be-predicted configuration data is determined as candidate configuration data.

[0119] Further, it is judged whether the number of candidate configuration data is zero. If yes, configuration exception information is generated. If no, step 2053 is continuously executed. The candidate configuration data is the configuration data remaining after the unusable configuration is filtered out. If the number of candidate configuration data is zero, it indicates that there is no usable configuration data, and the configuration exception information is generated, and the flow ends. If the number of candidate configuration data is not zero, it indicates that there is usable configuration data, and step 2053 is continuously executed.

[0120] Step 2053, the optimal configuration data is selected from the candidate configuration data according to the backup duration prediction value corresponding to each to-be-predicted configuration data.

[0121] Specifically, the backup duration prediction value corresponding to the candidate configuration data is queried. The minimum backup duration prediction value is selected from the queried backup duration prediction value. The candidate configuration data corresponding to the minimum backup duration prediction value is determined as the optimal configuration data.

[0122] In the embodiment of the application, the candidate configuration data corresponding to the minimum backup duration prediction value is selected from the usable configuration data as the optimal configuration data, so that the duration of data backup is the shortest, the time cost of data backup is saved on the basis of ensuring the success rate of data backup as much as possible, and the data backup efficiency is improved.

[0123] In the embodiment of the application, the filtering of configuration data is performed through the filtering rule, which can assist in quickly excluding abnormal configuration combinations, avoids abnormal situations, and makes the database backup scheduling method have stronger stability.

[0124] Step 206, the database backup is performed according to the optimal configuration data.

[0125] In the embodiment of the application, the database backup environment is configured according to the optimal configuration data, the database backup is performed in a real environment, and it is detected whether an abnormal signal is generated in the backup process. If the abnormal signal is generated, it indicates that the database backup is abnormal. If the abnormal signal is not generated, it indicates that the database backup is successful.

[0126] Further, if an exception signal is generated in the execution of the database backup process, the current optimal configuration data is filtered out from the to-be-predicted configuration data to obtain other to-be-predicted configuration data; the backup time prediction model and the set filtering rule are used to select the other to-be-predicted configuration data except the current optimal configuration data to obtain updated configuration data; and the database backup is re-executed according to the updated configuration data.

[0127] In step 207, the backup time is recorded.

[0128] In the embodiment of the application, the time length consumed for successfully executing the database backup is recorded to update the backup time prediction model and improve the prediction accuracy.

[0129] In step 208, the backup time prediction model is updated according to the optimal configuration data and the backup time to obtain an updated backup time prediction model.

[0130] Specifically, the optimal configuration data and the backup time are input into the backup time prediction model for training, and the initial prediction model is evaluated and optimized through a model evaluation index to obtain the updated backup time prediction model.

[0131] In the embodiment of the application, the backup time prediction model is updated according to the optimal configuration data and the backup time to improve the prediction accuracy.

[0132] It should be noted that the acquisition, storage, use, processing and the like of data in the technical scheme of the application comply with relevant provisions of national laws and regulations.

[0133] In the technical scheme of the database backup scheduling method provided by the embodiment of the application, the machine learning model is trained according to the generated training data sample to construct the backup time prediction model; the optimal configuration data is obtained by selecting the obtained multiple to-be-predicted configuration data through the backup time prediction model and the set filtering rule; and the database backup is executed according to the optimal configuration data, which can intelligently and automatically perform the database backup while ensuring the reliability, safety and accuracy of the data backup task, thereby improving the database backup efficiency. Another object of the application is to provide a database backup scheduling device.

[0134] Figure 3 A structural schematic diagram of a database backup scheduling device provided by the embodiment of the application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the device comprises a construction unit 11, a selection unit 12 and a backup unit 13.

[0135] The construction unit 11 is configured to train the machine learning model according to the generated training data sample to construct the backup time prediction model.

[0136] The selecting unit 12 is configured to select the obtained multiple pieces of to-be-predicted configuration data by the backup time length prediction model and the set filtering rule, and obtain optimal configuration data.

[0137] The backup unit 13 is configured to perform database backup according to the optimal configuration data.

[0138] In the embodiment of the application, the device further comprises a collecting unit 14, a first recording unit 15 and a generating unit 16.

[0139] The collecting unit 14 is configured to collect the running parameter according to a specified period.

[0140] The first recording unit 15 is configured to perform database backup according to the running parameter, and record a backup time length actual value.

[0141] The generating unit 16 is configured to generate a training data sample according to the backup time length actual value corresponding to the running parameter.

[0142] In the embodiment of the application, the constructing unit 11 is specifically configured to divide the training data sample into a training set and a verification set; train the machine learning model according to the training set, and construct an initial prediction model; verify and optimize the initial prediction model according to the verification set, and generate the backup time length prediction model.

[0143] In the embodiment of the application, the selecting unit 12 is specifically configured to predict each piece of to-be-predicted configuration data by the backup time length prediction model, obtain a corresponding backup time length prediction value, filter and distinguish each piece of to-be-predicted configuration data by the filtering rule, obtain candidate configuration data, and select the optimal configuration data from the candidate configuration data according to the backup time length prediction value corresponding to each piece of to-be-predicted configuration data.

[0144] In the embodiment of the application, the to-be-predicted configuration data comprises a backup node central processing unit load, and the filtering rule is that the backup node central processing unit load is greater than a set load threshold; the selecting unit 12 is specifically configured to judge whether the backup node central processing unit load is greater than the load threshold; if yes, the corresponding to-be-predicted configuration data is filtered out; and if no, the corresponding to-be-predicted configuration data is determined as the candidate configuration data.

[0145] In the embodiment of the application, the to-be-predicted configuration data comprises a network packet loss rate, and the filtering rule is that the network packet loss rate is greater than a set packet loss rate threshold; the selecting unit 12 is specifically configured to judge whether the network packet loss rate is greater than the packet loss rate threshold; if yes, the corresponding to-be-predicted configuration data is filtered out; and if no, the corresponding to-be-predicted configuration data is determined as the candidate configuration data.

[0146] In the embodiment of the present application, the selecting unit 12 is specifically further used for querying backup time prediction values corresponding to the candidate configuration data; selecting a minimum backup time prediction value from the queried backup time prediction values; and determining the candidate configuration data corresponding to the minimum backup time prediction value as the optimal configuration data.

[0147] In the embodiment of the present application, the device further comprises a judging unit 17.

[0148] The judging unit 17 is used for judging whether the number of candidate configuration data is zero; if yes, generating configuration exception information; and if no, triggering the selecting unit to continue to execute the step of selecting the optimal configuration data from the candidate configuration data according to the backup time prediction value corresponding to each piece of to-be-predicted configuration data.

[0149] In the embodiment of the present application, the device further comprises a filtering unit 18 and a first updating unit 19.

[0150] The filtering unit 18 is used for filtering out the current optimal configuration data if an exception signal is generated in the execution of the database backup process.

[0151] The first updating unit 19 is used for selecting, by means of the backup time prediction model and the set filtering rule, to-be-predicted configuration data other than the current optimal configuration data, to obtain updated configuration data.

[0152] The backup unit 13 is further used for executing database backup according to the updated configuration data.

[0153] In the embodiment of the present application, the device further comprises a second recording unit 20 and a second updating unit 21.

[0154] The second recording unit 20 is used for recording backup time.

[0155] The second updating unit 21 is used for updating the backup time prediction model according to the optimal configuration data and the backup time, to obtain an updated backup time prediction model.

[0156] In the scheme of the embodiment of the present application, the machine learning model is trained according to the generated training data sample, to construct a backup time prediction model; the obtained multiple pieces of to-be-predicted configuration data are selected by means of the backup time prediction model and the set filtering rule, to obtain the optimal configuration data; and the database backup is executed according to the optimal configuration data, which can intelligently and automatically perform the database backup, while ensuring the reliability, safety and accuracy of the data backup task, thereby improving the database backup efficiency. Another object of the present application is to provide a database backup scheduling device.

[0157] The systems, apparatuses, modules or units illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer device, and specifically, the computer device can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0158] The embodiment of the present application provides a computer device, including a memory and a processor, the memory is used for storing information including program instructions, the processor is used for controlling execution of the program instructions, the program instructions are loaded and executed by the processor to implement each step of the embodiment of the database backup scheduling method, and specific description can be referred to the above embodiment of the database backup scheduling method.

[0159] Reference is made below to Figure 4 which shows a structural schematic diagram of a computer device 600 suitable for being used to implement the embodiments of the present application.

[0160] As shown in Figure 4 , the computer device 600 includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage portion 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer device 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0161] The following components are connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 608 including a hard disk, and the like; and a communication portion 609 including a network interface card such as a LAN card, a modem, and the like. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as necessary. A removable recording medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 610 as necessary, so that a computer program read therefrom is installed in the storage portion 608 as necessary.

[0162] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with embodiments of the application. For example, embodiments of the application include a computer program product which includes a computer program tangibly embodied on a machine readable medium, the computer program including program code for executing the methods illustrated by the flow charts. In such embodiments, the computer program can be downloaded and installed from a network via the communications portion 609 and / or installed from the removable media 611.

[0163] Computer readable media includes permanent and non-permanent, removable and non-removable media which can be implemented by any method or technology for storing information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carriers.

[0164] For the convenience of description, the above device is described as various units respectively described in function. Of course, in the implementation of the present application, the functions of each unit can be implemented in the same or more software and / or hardware.

[0165] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The device specified in a flow or multiple flows and / or blocks

[0166] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flow or block diagrams. Figure 1 one or more flow or block diagrams.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flow or block diagrams. Figure 1 one or more flow or block diagrams.

[0168] It is also noted that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0169] The acquisition, storage, use, processing, etc. of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations.

[0170] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.

[0171] The present application can be described in the general context of computer- executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0172] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, the description is relatively simple because the system embodiments are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiments.

[0173] The above only describes the embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

1. A database backup scheduling method, characterized by, The method comprises: According to the generated training data sample, the machine learning model is trained, and a backup duration prediction model is constructed; Through the backup duration prediction model and the set filtering rule, the obtained multiple pieces of to-be-predicted configuration data are selected to obtain optimal configuration data; According to the optimal configuration data, database backup is performed; The backup duration prediction model and the set filtering rule are used to select the obtained multiple pieces of to-be-predicted configuration data to obtain optimal configuration data, comprising: Through the backup duration prediction model, each piece of to-be-predicted configuration data is predicted to obtain a corresponding backup duration prediction value; Each piece of to-be-predicted configuration data is filtered and distinguished through the filtering rule to obtain candidate configuration data. The configuration data required to be filtered by the filtering rule has an abnormal hidden danger in the data backup process. The configuration data represents the running parameters of database backup; According to the backup duration prediction value corresponding to each piece of to-be-predicted configuration data, the optimal configuration data is selected from the candidate configuration data, specifically comprising: Query the backup duration prediction value corresponding to the candidate configuration data; Select the minimum backup duration prediction value from the queried backup duration prediction value; The candidate configuration data corresponding to the minimum backup duration prediction value is determined as the optimal configuration data.

2. The database backup scheduling method of claim 1, wherein, Before the training of the machine learning model according to the generated training data sample and the construction of the backup duration prediction model, it further comprises: According to the specified period, the running parameters are collected; According to the running parameters, database backup is performed, and the backup duration actual value is recorded; According to the backup duration actual value corresponding to the running parameters, the training data sample is generated.

3. The database backup scheduling method of claim 1, wherein, According to the generated training data sample, the machine learning model is trained, and a backup duration prediction model is constructed, comprising: The training data sample is divided into a training set and a validation set; According to the training set, the machine learning model is trained to construct an initial prediction model; According to the validation set, the initial prediction model is verified and optimized to generate the backup duration prediction model.

4. The database backup scheduling method of claim 1, wherein, The to-be-predicted configuration data includes backup node central processor load, and the filtering rule is that the backup node central processor load is greater than the set load threshold; The filtering rule is used to filter and distinguish each piece of to-be-predicted configuration data to obtain candidate configuration data, comprising: Determine whether the backup node central processor load is greater than the load threshold; If yes, filter out the corresponding to-be-predicted configuration data; If not, the corresponding to-be-predicted configuration data is determined as the candidate configuration data.

5. The database backup scheduling method of claim 1, wherein, The to-be-predicted configuration data includes network packet loss rate, and the filtering rule is that the network packet loss rate is greater than the set packet loss rate threshold; The filtering rule is used to filter and distinguish each piece of to-be-predicted configuration data to obtain candidate configuration data, comprising: Determine whether the network packet loss rate is greater than the packet loss rate threshold; If yes, filter out the corresponding to-be-predicted configuration data; If not, the corresponding to-be-predicted configuration data is determined as the candidate configuration data.

6. The database backup scheduling method of claim 1, wherein, The method further comprises: determining whether the number of the candidate configuration data is zero; if yes, generating configuration exception information; if no, continuing to perform the step of filtering the optimal configuration data from the candidate configuration data according to a backup duration prediction value corresponding to each of the to-be-predicted configuration data.

7. The database backup scheduling method of claim 1, wherein, The method further comprises: if an exception signal is generated during execution of the database backup process, filtering out the current optimal configuration data; selecting, by the backup duration prediction model and a set filter rule, to-be-predicted configuration data except the current optimal configuration data, to obtain updated configuration data; performing database backup according to the updated configuration data.

8. The database backup scheduling method of claim 1, wherein, After performing database backup according to the optimal configuration data, the method further comprises: recording backup duration; updating the backup duration prediction model according to the optimal configuration data and the backup duration, to obtain an updated backup duration prediction model.

9. A database backup scheduling apparatus characterized by comprising: The apparatus comprises: a construction unit configured to train a machine learning model according to generated training data samples, to construct a backup duration prediction model; a selection unit configured to select, by the backup duration prediction model and a set filter rule, to-be-predicted configuration data, to obtain optimal configuration data; a backup unit configured to perform database backup according to the optimal configuration data. The selection unit is specifically configured to predict, by the backup duration prediction model, each of the to-be-predicted configuration data, to obtain a corresponding backup duration prediction value; filter, by the filter rule, each of the to-be-predicted configuration data, to obtain candidate configuration data, wherein the filter rule specifies that configuration data that needs to be filtered has an exception risk in a database backup process; and filter, according to a backup duration prediction value corresponding to each of the to-be-predicted configuration data, the candidate configuration data, to obtain the optimal configuration data, wherein the configuration data represents a running parameter of database backup. The selection unit is specifically configured to query the backup duration prediction value corresponding to the candidate configuration data; filter a minimum backup duration prediction value from the queried backup duration prediction values; and determine the candidate configuration data corresponding to the minimum backup duration prediction value as the optimal configuration data.

10. The database backup scheduling apparatus according to claim 9, wherein The apparatus further comprises: an acquisition unit configured to acquire a running parameter according to a specified period; a first recording unit configured to perform database backup according to the running parameter, and record a backup duration actual value; a generation unit configured to generate the training data sample according to the backup duration actual value corresponding to the running parameter.

11. The database backup scheduling apparatus according to claim 9, wherein the construction unit is specifically configured to divide the training data sample into a training set and a verification set; train a machine learning model according to the training set, to construct an initial prediction model; and verify and optimize the initial prediction model according to the verification set, to generate the backup duration prediction model.

12. The database backup scheduling apparatus according to claim 9, wherein The apparatus further comprises: The judging unit is configured to judge whether the number of the candidate configuration data is zero; if yes, generate configuration exception information; if no, trigger the selecting unit to continue to execute the step of selecting the optimal configuration data from the candidate configuration data according to the backup time length prediction value corresponding to each of the to-be-predicted configuration data.

13. The database backup scheduling apparatus according to claim 9, wherein The device further comprises: The filtering unit is configured to filter out the current optimal configuration data if an exception signal is generated during execution of the database backup process. The first updating unit is configured to select to-be-predicted configuration data except the current optimal configuration data by using the backup time length prediction model and a set filtering rule, and obtain updated configuration data. The backup unit is further configured to execute database backup according to the updated configuration data.

14. The database backup scheduling apparatus according to claim 9, wherein The device further comprises: The second recording unit is configured to record backup time length. The second updating unit is configured to update the backup time length prediction model according to the optimal configuration data and the backup time length, and obtain an updated backup time length prediction model.

15. A computer readable medium having stored thereon a computer program, characterized in that, The program is executed by a processor to implement the database backup scheduling method of any one of claims 1 to 8.

16. A computer device comprising a memory for storing information including program instructions, and a processor for controlling execution of the program instructions, characterized in that, The program instruction is loaded and executed by a processor to implement the database backup scheduling method of any one of claims 1 to 8.

17. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction is executed by a processor to implement the database backup scheduling method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Prediction of a data protection activity time for a backup environment

    US20210150383A1