Data backup method and device, electronic equipment and storage medium

By dynamically allocating resources for RDS database backup using a predictive model, the problems of low backup efficiency and incomplete backup in existing technologies are solved, achieving efficient and flexible data backup.

CN115640167BActive Publication Date: 2026-04-07SANGFOR TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Current RDS database backup technology is inefficient, especially when the data volume is large, it takes several days to complete, and a full backup has to be restarted if it fails, resulting in incomplete backups.

Method used

By acquiring historical resource usage data from online services, predictive models are used to forecast resource usage, and resource usage is dynamically allocated to perform data backup tasks, including incremental backups and full backup data integration.

Benefits of technology

Data backup can be performed at any time without affecting online business, improving backup efficiency and flexibility, and avoiding incompleteness issues caused by backup failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115640167B_ABST
    Figure CN115640167B_ABST
Patent Text Reader

Abstract

The data backup method, apparatus, electronic device, and storage medium of the present invention obtain the historical resource usage of online services on the server during a target historical time period; obtain a first predicted resource usage of online services on the server within a preset time period based on the historical resource usage; obtain a second predicted resource usage within the preset time period based on the first predicted resource usage, a preset reserved resource usage, and the server's resource capacity; allocate the second predicted resource usage to at least one data backup task within the preset time period to execute the data backup task; through the above method, data backup can be performed at any time without occupying the resources of online services, improving the efficiency of data backup; and by predicting the first predicted resource usage of online services within a preset time period in advance and dynamically allocating resource usage to data backup tasks based on the prediction results, the flexibility of data backup is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer application, and in particular to a data backup method and device, electronic equipment and storage medium. BACKGROUND

[0002] A user deploys an RDS (Relation Data System) database on a service end such as a cloud platform, and in order to guarantee the security of the RDS database, the database needs to be backed up periodically to backup the data in the database to other storage media.

[0003] In the prior art, in order to not affect online business, most RDS databases of service ends choose a full backup mode in the early morning period. With the increasing amount of data in the RDS database, it is often necessary to perform backup in the early morning period for several days or even tens of days to complete a full backup, which is not conducive to improving the data backup efficiency. Moreover, if a fault occurs during the full backup process, resulting in backup failure, the full backup of the backup period needs to be restarted or skipped, resulting in incomplete data backup. SUMMARY

[0004] The present application aims to provide a data backup method, device, electronic equipment and storage medium to solve the technical problem of low data backup efficiency in the prior art.

[0005] The technical solution of the present application is as follows: a data backup method is provided, comprising:

[0006] obtaining a historical resource usage amount of an online business of a service end in a target historical time period;

[0007] obtaining a first predicted resource usage amount of the online business in a preset time period according to the historical resource usage amount, obtaining a second predicted resource usage amount in the preset time period according to the first predicted resource usage amount in the preset time period, a preset reserved resource usage amount and a resource amount of the service end, wherein the reserved resource usage amount comprises a dynamic reserved resource usage amount, and the dynamic reserved resource usage amount is obtained according to a prediction error of a second target historical time period;

[0008] allocating the second predicted resource usage amount to at least one data backup task in the preset time period to execute the data backup task.

[0009] Optionally, the reserved resource usage amount comprises a minimum reserved resource usage amount and the dynamic reserved resource usage amount.

[0010] The obtaining step of the dynamic reserved resource usage amount comprises:

[0011] obtaining a prediction error in the second target historical time period according to the real resource usage amount and the first predicted resource usage amount of the online service of the server in the second target historical time period;

[0012] obtaining the dynamic reserved resource usage amount according to the prediction error and the first predicted resource usage amount of the second target historical time period.

[0013] Optionally, the obtaining of the prediction error in the second target historical time period according to the real resource usage amount and the first predicted resource usage amount of the online service of the server in the second target historical time period comprises:

[0014] obtaining a unit real resource usage amount and a unit first predicted resource usage amount of each unit time period in the second target historical time period of the online service of the server;

[0015] obtaining a corresponding unit prediction error according to the unit real resource usage amount and the unit first predicted resource usage amount of each unit time period;

[0016] taking a maximum value of the unit prediction errors as the prediction error in the second target historical time period.

[0017] Optionally, the obtaining of the first predicted resource usage amount of the online service in the preset time period according to the historical resource usage amount comprises:

[0018] inputting the historical resource usage amount into a pre-trained regression model to obtain a first predicted resource benchmark value of the server in the preset time period, wherein the regression model is trained in advance according to historical resource usage data of the online service of the server and is used for predicting the resource usage amount of the online service of the server;

[0019] determining at least one influence factor of the preset time period;

[0020] obtaining an influence coefficient of the at least one influence factor;

[0021] obtaining the first predicted resource usage amount of the online service in the preset time period according to the first predicted resource benchmark value and the influence coefficient of the at least one influence factor.

[0022] Optionally, the at least one data backup task is an incremental backup task.

[0023] After the second predicted resource usage amount is allocated to the at least one data backup task to execute the data backup task in the preset time period, the method further comprises:

[0024] According to the data backup task, the modified data in each data node is captured in real time, corresponding incremental backup data is generated, and the incremental backup data is stored in an incremental storage medium;

[0025] At least one of the incremental backup data stored in the target backup period is integrated to obtain full backup data in the target backup period.

[0026] Another technical solution of the present application is as follows: a data backup device is provided, comprising:

[0027] The acquisition module is configured to acquire a historical resource usage amount of an online service of a server in a target historical time period.

[0028] The prediction module is configured to acquire a first predicted resource usage amount of the online service in a preset time period according to the historical resource usage amount.

[0029] The calculation module is configured to acquire a second predicted resource usage amount in the preset time period according to the first predicted resource usage amount in the preset time period, a preset reserved resource usage amount, and a resource amount of the server.

[0030] The backup module is configured to allocate the second predicted resource usage amount to at least one data backup task in the preset time period to execute the data backup task.

[0031] Another technical solution of the present application is as follows: an electronic device is provided, comprising a processor and a memory coupled with the processor, the memory storing program instructions executable by the processor; the processor executes the program instructions stored in the memory to implement the above-mentioned data backup method.

[0032] Another technical solution of the present application is as follows: a storage medium is provided, the storage medium storing program instructions, the program instructions being executed by a processor to implement the above-mentioned data backup method.

[0033] The data backup method, device, electronic equipment and storage medium of the present application obtain the historical resource usage of an online service of a server in a target historical time period; obtain the first predicted resource usage of the online service of the server in a preset time period according to the historical resource usage; obtain the second predicted resource usage in the preset time period according to the first predicted resource usage in the preset time period, a preset reserved resource usage and the resource amount of the server; allocate the second predicted resource usage to at least one data backup task in the preset time period to execute the data backup task; in the above manner, data backup can be performed in any time period without occupying the resource amount of the online service, improving the efficiency of data backup, and the first predicted resource usage of the online service in the preset time period is predicted in advance, the resource usage is dynamically allocated to the data backup task based on the prediction result, improving the flexibility of data backup. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 Flowchart of the data backup method of the first embodiment of the present application;

[0035] Figure 2 Flowchart of another data backup method of the first embodiment of the present application;

[0036] Figure 3 Flowchart of another data backup method of the first embodiment of the present application;

[0037] Figure 4 Flowchart of another data backup method of the first embodiment of the present application;

[0038] Figure 5 Flowchart of another data backup method of the first embodiment of the present application;

[0039] Figure 6 Structure diagram of the data backup device of the second embodiment of the present application;

[0040] Figure 7 Structure diagram of the electronic equipment of the third embodiment of the present application;

[0041] Figure 8 Structure diagram of the storage medium of the fourth embodiment of the present application. DETAILED DESCRIPTION

[0042] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. 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 those skilled in the art without creative efforts belong to the scope of the present application.

[0043] The terms "first", "second", "third" in the present application are only for descriptive purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", "third" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise explicitly and specifically limited. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0044] In this document, reference to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. Those skilled in the art will appreciate that embodiments described herein can be combined with other embodiments.

[0045] Please refer to Figure 1 As shown in the figure, it is a flowchart of a data backup method according to the first embodiment of the present application; the method can be applied to a database management platform (DMP) of a service end, and it should be noted that the method of the present application is not limited to the order of the flow shown as long as there is substantially the same result. Specifically, the cloud platform data backup method includes steps S101-S104: Figure 1

[0046] S101, obtaining the historical resource usage amount of online services of a service end in a target historical time period.

[0047] ​In an optional application scenario of the present application, the server can be a cloud platform. The present embodiment takes the cloud platform as an example for detailed description. Those skilled in the art should understand that the server can also be other servers or server clusters other than the cloud platform. The cloud computing technology can integrate the underlying distributed heterogeneous computing resources into a resource pool for unified management and on-demand allocation. The current mainstream cloud platforms all provide services by encapsulating application data and required resources into the form of virtual machines. The online service can have different resource requirements at different time periods on the cloud platform, and the resource usage of the online service is dynamically changed.

[0048] The resource usage is the usage of physical resources, and the physical resources include any one of central processing unit (CPU) resources, memory resources, disk storage resources and network bandwidth resources.

[0049] During the process of the online service, the cloud platform records the resource usage data of each cloud host in the process of the online service, wherein the resource usage data includes resource usage and usage time corresponding to each resource usage; the usage time in the above resource data is used to represent how much resource is occupied by the online service at the usage time, for example, the specific value or usage rate of the resource usage of A cloud host at a usage time a, or the specific value or usage rate of the resource usage of B cloud host at a usage time b. In the present embodiment, the historical resource usage of the usage time in the target historical time period is obtained as the prediction data of the preset time period. The target historical time period corresponds to the preset time period to be predicted, for example, the target historical time period can be within 3 days before the start time of the preset time period, or for example, the target historical time period can be within 1 month of the start time of the preset time period. The resource usage in the target historical time period is the time series data in the time period.

[0050] S102, obtaining a first predicted resource usage of the online service in a preset time period according to the historical resource usage.

[0051] The resource usage of the server can be predicted by using a pre-trained regression model or neural network model.

[0052] In an optional implementation, an ARIMA (Autoregressive Integrated Moving Average) model can be used to predict the resource usage of online services within a preset time period. The historical resource usage for the target historical time period is input into the ARIMA model, which outputs the first predicted resource usage for online services within the preset time period. Since resource usage changes periodically, using the ARIMA model to perform autocorrelation analysis on resource usage can fully uncover the patterns in online service resource usage changes. This allows for the acquisition of historical time periods within the target historical time period that exhibit similar trends to the preset time period to be predicted, indicating a strong correlation between the resource usage of these historical time periods and the predicted preset time period.

[0053] Furthermore, in addition to analyzing historical resource usage, the prediction results can be revised by incorporating various predictive influencing factors, including common year factors, leap year factors, weekly pattern factors, monthly pattern factors, holiday factors, special event factors, and summer / winter vacation factors. For example, if the preset time period is March 12, 2022, which is March, a Sunday, and a weekend, the prediction results need to be revised based on the corresponding monthly pattern factors, weekly pattern factors, and holiday factors.

[0054] Specifically, the influence coefficient of the weekly regularity factor can be obtained based on historical resource usage as follows: obtain the complete weekly historical resource usage for each month in the historical time period, remove holidays, and obtain multiple sets of complete weekly historical resource usage data. Calculate the coefficient of variation for each week based on the multiple sets of complete weekly historical resource usage data, and select the average resource usage of the week attribute (day of the week) with the smallest coefficient of variation as the benchmark. The influence coefficient of the weekly regularity factor, i.e., the influence coefficient of the week attribute, is the average resource usage of the week attribute divided by the benchmark.

[0055] The influence coefficient of the monthly pattern influence factor is obtained based on historical resource usage. This influence coefficient can be calculated as follows: Historical resource usage for different months within a historical time period is obtained. The historical resource usage is then corrected for the weekly pattern influence factor obtained in the previous steps to eliminate the influence of the weekly pattern. The daily average of the corrected historical resource usage is calculated. The average / daily average of historical resource usage for each month (different months) is then calculated separately. The number of days with monthly attributes serves as the influence coefficient of monthly regularity influencing factors.

[0056] The influence coefficient of the holiday factor is obtained based on historical resource usage. The influence coefficient of the holiday factor can be calculated as follows: obtain the historical resource usage of different holidays in historical time periods, and correct the obtained historical resource usage based on the influence coefficients of the weekly and monthly regularity influence factors obtained in the above steps to eliminate the influence of the weekly and monthly regularity. Obtain the daily historical resource usage for the two days before and after the holiday. For each holiday, the influence coefficient of the holiday factor is obtained by dividing the average historical resource usage of the holiday by the average daily historical resource usage before and after the holiday.

[0057] As the amount of historical resource usage data increases, the impact coefficients of each influencing factor are updated regularly to improve the accuracy of predictions.

[0058] In one optional implementation, the RDS databases deployed on each server may have different business types, resulting in differences in resource usage on different servers. When determining the influence coefficient of each influencing factor, the influence coefficient of other servers with similar business types can be used as an empirical value first. As the resource usage data of the server accumulates, the influence coefficient can be calculated based on the accumulated historical resource usage.

[0059] Therefore, please refer to Figure 2 As shown, step S102 specifically includes the following steps:

[0060] S201, the historical resource usage is input into a pre-trained regression model to predict the first predicted resource baseline value of the server during the preset time period, wherein the regression model is pre-trained based on the historical resource usage data of the server's online business and is used to predict the resource usage of the server's online business.

[0061] The regression model can be the ARIMA model mentioned above, as detailed above.

[0062] S202, determine at least one influencing factor for the preset time period;

[0063] S203, obtain the influence coefficient of the at least one influencing factor;

[0064] For details on the impact factors and their impact coefficients, please refer to the above.

[0065] S204, obtain the first predicted resource usage of online services within the preset time period based on the first predicted resource benchmark value and the influence coefficient of the at least one influencing factor.

[0066] In step S204, the first predicted resource usage is calculated based on the product of the first predicted resource benchmark value and the influence coefficients of multiple influencing factors.

[0067] In another alternative implementation, a neural network model can be used to predict the resource usage of online services during a preset time period.

[0068] S103, obtain the second predicted resource usage within the preset time period based on the first predicted resource usage within the preset time period, the preset reserved resource usage, and the resource quantity of the server.

[0069] The reserved resource usage includes dynamic reserved resource usage, which is obtained based on the prediction error of the second target's historical time period.

[0070] The reserved resource usage is pre-allocated for online server services to avoid fluctuations in online service resource usage and ensure that data backup tasks do not affect online services. The server's resource quantity is its total resource quantity. The sum of the first predicted resource usage, the reserved resource usage, and the second predicted resource quantity is the server's resource quantity. Server resource quantity - (first predicted resource usage + reserved resource usage) = second predicted resource usage.

[0071] In one optional implementation, the reserved resource usage includes a minimum reserved resource usage and a dynamic reserved resource usage. The minimum reserved resource usage can be set to a fixed value as a safety net to avoid impacting online services. The dynamic reserved resource usage can be set based on the prediction error and adjusted as the prediction error changes. The prediction error can be calculated based on the predicted and actual resource usage results for a period of time closest to the preset time period. For example, the prediction error can be calculated based on the predicted and actual results for the most recent month (within one month of the start of the preset time period), or based on the predicted and actual results for the most recent three months (within three months of the start of the preset time period).

[0072] Specifically, please refer to Figure 3 As shown, the steps for obtaining the dynamically reserved resource usage amount include:

[0073] S301, based on the actual resource usage of the online services of the server in the second target historical time period and the first predicted resource usage, obtain the prediction error in the second target historical time period.

[0074] Among them, the prediction error can be the root-mean-square error (RMSE), which is used to measure the deviation between the actual result and the predicted result.

[0075] In one optional implementation, the specific formula for the prediction error is:

[0076] RMSE model g= ,

[0077] in, For the second target historical period of the first One predicted value (first predicted resource usage). For the first The actual value (actual resource usage) corresponding to each predicted value. This represents the number of predicted or actual values ​​within the second historical time period. The smaller the RMSE value, the better the prediction effect and the smaller the deviation between the predicted and actual values.

[0078] In another optional implementation, the second historical time period can be further divided into multiple unit time periods, and the prediction error can be calculated based on the different unit time periods. Step S301 can specifically include the following steps:

[0079] S3011, obtain the actual resource usage and the first predicted resource usage of the online service of the server in each unit time period within the second target historical time period.

[0080] S3012, obtain the corresponding unit prediction error based on the actual resource usage of the unit in each time period and the first predicted resource usage of the unit.

[0081] For each unit time period, g 单元 = ,

[0082] in, For the second target historical time period, the first unit time period within that time period One predicted value (first predicted resource usage). For the first The actual value (actual resource usage) corresponding to each predicted value. This refers to the number of predicted or actual values ​​within the given time period in the historical timeframe of the second target.

[0083] S3013, the maximum value of the unit prediction error is taken as the prediction error within the historical time period of the second target.

[0084] In this process, multiple prediction errors are calculated, and the maximum value is taken as the prediction error within the historical time period of the second target, which is then used to calculate the dynamic reserved resource usage.

[0085] S302, obtain the dynamic reserved resource usage based on the prediction error and the first predicted resource usage for the second target historical time period.

[0086] In this step, the dynamic reserved resource usage can be calculated by multiplying the average value of the first predicted resource usage over the second target historical period with the prediction error.

[0087] In this embodiment, as the amount of data increases, the prediction error gradually decreases, the dynamic reserved resource usage continuously approaches zero, and the reserved resource usage continuously approaches the minimum reserved resource usage.

[0088] S104, the second predicted resource usage is allocated to at least one data backup task during the preset time period to execute the data backup task.

[0089] In this embodiment, the second predicted resource usage is used to perform data backup tasks. Different preset time periods correspond to different second predicted resource usages. Without affecting online services, the remaining resources on the server are fully utilized for data backup, thereby improving the efficiency of data backup.

[0090] In one optional implementation, please refer to Figure 4 As shown, after step S104, the following steps are also included:

[0091] S401, detect the first current resource usage of the online service within the preset time period.

[0092] During the execution of online services, the actual resource usage of online services is monitored in real time. The first current resource usage obtained from the monitoring is the actual resource usage of online services at the monitoring time. When the actual resource usage differs significantly from the predicted results for a preset period, the allocated resources of the data backup task are adjusted or released in a timely manner to avoid affecting online services.

[0093] S402, when the first current resource usage is greater than a preset first resource limit value and less than a preset second resource limit value, the allocated resources of the data backup task are reduced according to the difference between the first current resource usage and the first predicted resource usage.

[0094] The first resource limit and the second resource limit are two warning thresholds. If the first resource limit is less than the second resource limit, and the current resource usage of the online service is greater than the first resource limit but less than the second resource limit, it indicates that the allocated resources of the data backup task need to be reduced. Specifically, the allocated resources of the data backup task are reduced by the difference to release some resources for online services.

[0095] Furthermore, after step S401, the method further includes:

[0096] S403, when the first current resource usage exceeds the preset second resource limit value, the data backup task is interrupted to release the resources occupied by the data backup task.

[0097] If the first current resource usage of online services exceeds the second resource limit, it indicates that the actual resource usage of online services has surged. In this case, in order to ensure that online services are not affected, all data backup tasks are interrupted, and the resources of the data backup tasks are released for online services.

[0098] In another alternative implementation, please refer to Figure 5 As shown, in step S104, the at least one data backup task is an incremental backup task. After step S104, the following steps are also included:

[0099] S501, according to the data backup task, the modified data in each data node is captured in real time, the corresponding incremental backup data is generated, and the incremental backup data is stored in the incremental storage medium.

[0100] The server uses distributed storage for data storage. For each data node, the modified data is treated as incremental data and incremental backup is performed to obtain incremental backup data. The obtained incremental backup data is stored in an incremental storage medium outside the server.

[0101] S502, integrate at least one of the incremental backup data stored within the target backup period to obtain the full backup data within the target backup period.

[0102] In this embodiment, a backup cycle can be set, and the corresponding incremental backup data can be integrated according to the backup cycle. The integrated data is then used as the full backup data for that backup cycle. Therefore, in this embodiment, there is no need to perform a full backup separately, which further improves the efficiency of data backup.

[0103] Figure 6 This is a schematic diagram of the data backup device according to the second embodiment of the present invention. The data backup device of this embodiment and the data backup method of the first embodiment are based on the same inventive concept; the same parts are described in the first embodiment. Figure 6As shown, the data backup device 20 includes: an acquisition module 21, a prediction module 22, a calculation module 23, and a backup module 24. The acquisition module 21 is used to acquire the historical resource usage of the online services on the server during a target historical time period. The prediction module 22 is used to acquire a first predicted resource usage of the online services within a preset time period based on the historical resource usage. The calculation module 23 is used to acquire a second predicted resource usage within the preset time period based on the first predicted resource usage, a preset reserved resource usage, and the server's resource quantity. The reserved resource usage includes a dynamically reserved resource usage, which is acquired based on the prediction error of the second target historical time period. The backup module 24 is used to allocate the second predicted resource usage to at least one data backup task during the preset time period to execute the data backup task.

[0104] In an optional implementation, the calculation module 23 is further configured to: detect the first current resource usage of the online service within the preset time period; and when the first current resource usage is greater than a preset first resource limit and less than a preset second resource limit, reduce the allocated resources of the data backup task according to the difference between the first current resource usage and the first predicted resource usage.

[0105] Furthermore, the calculation module 23 is also used to: interrupt the data backup task when the first current resource usage exceeds the preset second resource limit value, so as to release the resources occupied by the data backup task.

[0106] In an optional implementation, the reserved resource usage includes minimum reserved resource usage and dynamic reserved resource usage; correspondingly, the calculation module 23 is further configured to: obtain the prediction error in the second target historical time period based on the actual resource usage and the first predicted resource usage of the online service of the server in the second target historical time period; and obtain the dynamic reserved resource usage based on the prediction error and the first predicted resource usage in the second target historical time period.

[0107] Furthermore, the calculation module 23 is also used to: obtain the actual resource usage and the first predicted resource usage of the unit for each unit time period of the online service of the server within the second target historical time period; obtain the corresponding unit prediction error based on the actual resource usage and the first predicted resource usage of the unit for each unit time period; and take the maximum value of the unit prediction error as the prediction error within the second target historical time period.

[0108] In an optional implementation, the prediction module 22 is further configured to: input the historical resource usage into a pre-trained regression model to predict a first predicted resource baseline value for the server during the preset time period, wherein the regression model is pre-trained based on the historical resource usage data of the server's online services and is used to predict the resource usage of the server's online services; determine at least one influencing factor for the preset time period; obtain the influence coefficient of the at least one influencing factor; and obtain the first predicted resource usage of the online services during the preset time period based on the first predicted resource baseline value and the influence coefficient of the at least one influencing factor.

[0109] Furthermore, the at least one data backup task is an incremental backup task; correspondingly, the backup module 24 is also used to: capture the modified data in each data node in real time according to the data backup task, generate corresponding incremental backup data, store the incremental backup data in the incremental storage medium; and integrate at least one of the incremental backup data with a storage time within the target backup period to obtain the full backup data within the target backup period.

[0110] Figure 7 This is a schematic diagram of the structure of an electronic device according to the third embodiment of the present invention. Figure 7 As shown, the electronic device 30 includes a processor 31 and a memory 32 coupled to the processor 31.

[0111] The memory 32 stores program instructions for implementing the data backup method of any of the above embodiments.

[0112] The processor 31 is used to execute program instructions stored in the memory 32 for data backup.

[0113] The processor 31 can also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0114] See Figure 8 , Figure 8This is a schematic diagram of the structure of a storage medium according to the fourth embodiment of the present invention. The storage medium of this embodiment stores program instructions 41 capable of implementing all the above methods. The storage medium can be non-volatile or volatile. The program instructions 41 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0115] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0116] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

[0117] The above description is merely an embodiment of the present invention. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of the present invention, but these improvements all fall within the protection scope of the present invention.

Claims

1. A data backup method, characterized in that, include: Obtain the historical resource usage of the server's online services within the target historical time period; Based on the historical resource usage, obtain the first predicted resource usage of the online service within a preset time period; The second predicted resource usage within the preset time period is obtained based on the first predicted resource usage within the preset time period, the preset reserved resource usage, and the resource quantity of the server. The reserved resource usage includes dynamic reserved resource usage, which is obtained based on the prediction error of the second target historical time period. The second predicted resource usage is allocated to at least one data backup task during the preset time period to execute the data backup task; The steps for obtaining the dynamically reserved resource usage include: The prediction error for the second target historical period is obtained based on the actual resource usage of the online business of the server within the second target historical period and the first predicted resource usage. The dynamic reserved resource usage is obtained based on the prediction error and the first predicted resource usage for the second target historical time period. Wherein, the second predicted resource usage within the preset time period is the difference between the server's resource usage within the preset time period and the sum of the first predicted resource usage and the reserved resource usage within the preset time period.

2. The data backup method according to claim 1, characterized in that, The reserved resource usage includes the minimum reserved resource usage and the dynamic reserved resource usage.

3. The data backup method according to claim 2, characterized in that, The step of obtaining the prediction error for the second target historical time period based on the actual resource usage of the online business on the server within the second target historical time period and the first predicted resource usage includes: Obtain the actual resource usage and the first predicted resource usage of the online service on the server for each unit time period within the second target historical time period; The corresponding unit prediction error is obtained based on the actual resource usage of the unit and the first predicted resource usage of the unit for each unit time period. The maximum value of the unit prediction error is taken as the prediction error within the historical time period of the second target.

4. The data backup method according to claim 1, characterized in that, The step of obtaining the first predicted resource usage of the online service within a preset time period based on the historical resource usage includes: The historical resource usage is input into a pre-trained regression model to predict the first predicted resource baseline value of the server during the preset time period. The regression model is pre-trained based on the historical resource usage data of the server's online business and is used to predict the resource usage of the server's online business. Determine at least one influencing factor for the preset time period; Obtain the influence coefficient of the at least one influencing factor; The first predicted resource usage of online services within the preset time period is obtained based on the first predicted resource benchmark value and the influence coefficient of the at least one influencing factor.

5. The data backup method according to claim 1, characterized in that, The at least one data backup task is an incremental backup task; After allocating the second predicted resource usage to at least one data backup task within the preset time period to execute the data backup task, the method further includes: The modified data in each data node is captured in real time according to the data backup task, corresponding incremental backup data is generated, and the incremental backup data is stored in the incremental storage medium. Integrate at least one of the incremental backup data stored within the target backup period to obtain the full backup data within the target backup period.

6. A data backup device, characterized in that, include: The acquisition module is used to acquire the historical resource usage of online services on the server within a target historical time period; The prediction module is used to obtain the first predicted resource usage of the online service within a preset time period based on the historical resource usage. The calculation module is used to obtain the second predicted resource usage within the preset time period based on the first predicted resource usage within the preset time period, the preset reserved resource usage, and the resource amount of the server. The reserved resource usage includes dynamic reserved resource usage, which is obtained based on the prediction error of the second target historical time period. A backup module is configured to allocate the second predicted resource usage to at least one data backup task during the preset time period to execute the data backup task; The steps for obtaining the dynamically reserved resource usage include: The prediction error for the second target historical period is obtained based on the actual resource usage of the online business of the server within the second target historical period and the first predicted resource usage. The dynamic reserved resource usage is obtained based on the prediction error and the first predicted resource usage for the second target historical time period. Wherein, the second predicted resource usage within the preset time period is the difference between the server's resource usage within the preset time period and the sum of the first predicted resource usage and the reserved resource usage within the preset time period.

7. An electronic device, characterized in that, The system includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the data backup method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores program instructions, which, when executed by a processor, implement the data backup method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data backup device and method

    CN105938447A

  • Data backup method, data backup system, electronic device and readable storage medium

    CN113076224A