Data backup method and device, electronic equipment and storage medium

By combining data backup trends and database operating load trends, the backup strategy is adjusted, solving the problem of low database backup efficiency in existing technologies and achieving reasonable resource allocation and efficient backup.

CN119025339APending Publication Date: 2024-11-26WUHAN STONE INFORMATION SERVICE CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411142120.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing database backup methods require a large amount of storage space, and the backup process is affected by database hardware resources, making it impossible to guarantee the efficiency of data backup.

Method used

By combining data backup trends and database operating load trends, the backup strategy is adjusted, including periodically querying load and backup data. Time series forecasting models and cluster analysis are used to determine the database's operating and backup trends, and the backup strategy is dynamically adjusted to optimize resource allocation.

Benefits of technology

It improves the efficiency of database backup, allocates resources rationally, avoids resource waste, and ensures the efficiency and reliability of the backup process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025339A_ABST
    Figure CN119025339A_ABST
Patent Text Reader

Abstract

The invention provides a data backup method and device, electronic equipment and a storage medium, and the method comprises the steps: periodically executing a load data query command and a backup data query command to obtain operation load data and backup data of a database, and obtaining a plurality of pieces of operation load data and a plurality of pieces of backup data; analyzing the plurality of operation load data by using a preset load data analysis model, and determining an operation load trend of the database; analyzing the plurality of pieces of backup data by utilizing a preset backup data analysis model, and determining a data backup trend of the database; according to the data backup trend and the operation load trend of the database, a backup strategy of the database is adjusted; and backing up the data in the database by using the new backup strategy. The backup strategy of the database is adjusted by combining the data backup trend of the database and the running load trend in the running process of the database, resource allocation can be more reasonably carried out, the backup efficiency is improved, and resource waste is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of databases, and in particular to a data backup method, device, electronic device and storage medium. Background Art

[0002] Databases are important components of data-centric applications that can store and process large amounts of data. With the rapid development of database technology, the security requirements for various types of data information stored in the database host are becoming increasingly higher. In order to prevent data loss or damage caused by failure of the database host, data information will be backed up. The database backup method in the prior art requires a large amount of storage space, and the backup process is affected by the database hardware resources, and the data backup efficiency cannot be guaranteed. Summary of the invention

[0003] The present application provides a data backup method, device, electronic device and storage medium, which adjust the database backup strategy by combining the data backup trend and the database operation load trend to improve the backup efficiency and database resource utilization.

[0004] In a first aspect, the present application provides a data backup method, the method comprising:

[0005] Periodically executing a load data query command and a backup data query command to obtain the running load data and the backup data of the database, and obtaining a plurality of running load data and a plurality of backup data;

[0006] Analyzing the plurality of operation load data to determine an operation load trend of the database;

[0007] Analyzing the plurality of backup data to determine a data backup trend of the database;

[0008] Adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database;

[0009] The data in the database is backed up using a new backup strategy.

[0010] In some possible embodiments, analyzing the plurality of operation load data to determine the operation load trend of the database includes:

[0011] Acquire an operation load data training sample set, wherein the operation load data training sample set includes a plurality of operation load data training sample subsets;

[0012] Using the plurality of operation load data training sample subsets to perform training respectively, to obtain a plurality of time series sub-models;

[0013] Obtaining a target time series prediction model according to the multiple time series sub-models;

[0014] The target time series prediction model is used to analyze the plurality of operation load data to determine the operation load trend of the database.

[0015] In some possible embodiments, analyzing the plurality of operation load data to determine the operation load trend of the database further includes:

[0016] Preprocessing the plurality of operating load data, removing outliers and performing normalization processing to obtain processed first load data;

[0017] Performing cluster analysis on the first load data using a target clustering model to obtain multiple clustering results;

[0018] Determining, according to the multiple clustering results, an operating load threshold of the database under different operating states;

[0019] A target operating load range of the database under different operating states is determined according to the operating load threshold, and the target operating load range is the operating load trend of the database.

[0020] In some possible embodiments, after analyzing the plurality of operation load data to determine the operation load trend of the database, the method further includes:

[0021] Predicting predicted load data of the database according to the operating load trend of the database;

[0022] Determining whether the predicted load data exceeds the target operating load range;

[0023] If the predicted load data exceeds the target operating load range, an alarm is generated.

[0024] In some possible embodiments, adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database to back up the data in the database using the new backup strategy includes:

[0025] Determining a trend correlation between the data backup trend and the operation load trend of the database;

[0026] Generating an adjustment strategy for the backup strategy of the database according to the trend correlation;

[0027] According to the adjustment strategy of the backup strategy, the backup strategy of the database is dynamically adjusted, and the data in the database is backed up using the new backup strategy.

[0028] In some possible embodiments, adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database to back up the data in the database using the new backup strategy includes:

[0029] Predicting a predicted load distribution strategy of the database according to an operating load trend of the database;

[0030] Predicting a predicted backup strategy for the database based on the database backup trend;

[0031] Adjusting the predicted backup strategy of the database according to the predicted load distribution strategy to obtain a new backup strategy;

[0032] The data in the database is backed up according to the new backup strategy.

[0033] In some possible embodiments, the method further includes:

[0034] Call the data recovery command;

[0035] Using the data recovery command to call the data recovery execution command;

[0036] Acquire data recovery parameters according to the data recovery command;

[0037] Data recovery is performed according to the data recovery execution command and the data recovery parameters.

[0038] In a second aspect, an embodiment of the present application provides a data backup device, the data backup device comprising:

[0039] A data acquisition module, used for periodically executing a load data query command and a backup data query command to obtain the running load data and the backup data of the database, to obtain a plurality of running load data and a plurality of backup data;

[0040] An operation load trend determination module, used for analyzing the plurality of operation load data to determine the operation load trend of the database;

[0041] A backup trend determination module, used to analyze the plurality of backup data to determine the data backup trend of the database;

[0042] A backup strategy adjustment module, used to adjust the backup strategy of the database according to the data backup trend and the operation load trend of the database, so as to back up the data in the database using the new backup strategy;

[0043] The backup module is used to back up the data in the database using a new backup strategy.

[0044] In a third aspect, the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the data backup method as described in any one of the first aspects.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the data backup method as described in any one of the first aspects.

[0046] The present application provides a data backup method, device, electronic device and storage medium, including: periodically executing a load data query command and a backup data query command to obtain the operation load data and backup data of a database, and obtaining multiple operation load data and multiple backup data; analyzing multiple operation load data to determine the operation load trend of the database; analyzing multiple backup data to determine the data backup trend of the database; adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database; backing up the data in the database using the new backup strategy. The present application combines the data backup trend of the database and the operation load trend of the database during operation to adjust the backup strategy of the database, which can more reasonably allocate resources, improve backup efficiency, and avoid waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 is a schematic diagram of a data backup system provided in an embodiment of the present application;

[0049] Figure 2 It is a flowchart of an embodiment of the data backup method provided in the embodiments of the present application;

[0050] Figure 3 A schematic diagram of a flow chart of an embodiment of determining an operating load trend provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of a flow chart of an embodiment of determining an operating load threshold provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of a flow chart of an embodiment of adjusting a data backup strategy provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of a process flow of an embodiment of data recovery provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of an embodiment of a data backup device provided in an embodiment of the present application;

[0055] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0056] Fig. 9 is a schematic diagram of the terminal structure provided in an embodiment of the present application;

[0057] Fig.10 It is a schematic diagram of a server structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0059] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise specified. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0060] The terms "module" or "unit" used herein may be considered as software objects executed on the computing system. The different components, modules, engines and services described herein may be considered as implementation objects on the computing system. The devices and methods described herein are preferably implemented in software, but may also be implemented in hardware, all within the scope of protection of this application.

[0061] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0062] Please refer to Figure 1 , the present application also provides a data backup system, such as Figure 1 As shown, the data backup system includes a computing device 100, and the data backup apparatus provided by the present application is integrated in the computing device 100. In the embodiment of the present application, the computing device 100 may be a terminal device or a server.

[0063] In the embodiment of the present application, when the computing device 100 is a server, the server can be an independent server, or a server network or server cluster composed of servers, for example, the server described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. Wherein, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing). In the embodiment of the present application, communication between the server and the client can be achieved by any communication mode, including but not limited to, mobile communication based on the third generation partnership project (3rd Generation Partnership Project, 3GPP), long term evolution (Long Term Evolution, LTE), Worldwide Interoperability for Microwave Access (Worldwide Interoperability for Microwave Access, WiMAX), or computer network communication based on TCP / IP protocol suite (TCP / IP Protocol Suite, TCP / IP), user datagram protocol (User Datagram Protocol, UDP) protocol, etc.

[0064] It is understood that when the computing device 100 used in the embodiments of the present application is a terminal device, the terminal device may be a device including both receiving hardware and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such terminal devices may include: cellular or other communication devices having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific computing device 100 may be a desktop terminal or a mobile terminal, and the computing device 100 may be one of a mobile phone, a tablet computer, a laptop computer, etc.

[0065] The terminal device involved in the embodiments of the present application may also refer to a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem. For example, a mobile phone (or "cellular" phone) and a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device, which exchanges voice and / or data with a wireless access network. For example, a personal communication service (English full name: Personal Communication Service, English abbreviation: PCS) phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (Wireless Local Loop, English abbreviation: WLL) station, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA) and other devices.

[0066] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer computing devices, or computing device network connection relationships, such as Figure 1 Only one computing device is shown. It can be understood that the data backup system may also include one or more other computing devices, or / and one or more other computing devices connected to the computing device 100 through a network, which is not specifically limited here.

[0067] In addition, if Figure 1 As shown, the data backup system may further include a memory 200 for storing backup data.

[0068] In the embodiment of the present application, the memory 200 can be a cloud storage. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0069] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0070] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0071] It should be noted that Figure 1 The scenario diagram of the data backup system shown is merely an example. The data backup system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the data backup system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0072] The solution provided in the embodiments of the present application involves technologies such as artificial intelligence (AI), computer vision (CV), and machine learning (ML), which are specifically described by the following embodiments:

[0073] Among them, AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0074] AI technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0075] CV is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision that uses cameras and computers to replace human eyes to identify, track and measure targets, and further performs graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes adversarial disturbance generation, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0076] The data backup method, device, server and storage medium provided in the embodiments of the present application are described in detail below. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0077] like Figure 2 FIG. 1 is a flow chart of an embodiment of a data backup method provided in an embodiment of the present application. Specifically, the data backup method may include the following steps:

[0078] 201. Periodically execute a load data query command and a backup data query command to obtain the running load data and the backup data of the database, and obtain a plurality of running load data and a plurality of backup data.

[0079] The data backup method provided by the present application is mainly applicable to backing up data in a database; more specifically, it is mainly applicable to backing up data in an OpenGauss database. At the same time, the present application can monitor the data in the backup process, including the running load data and the backup data, to adjust the data backup strategy, so as to better utilize and allocate backup-related resources and avoid resource waste or insufficient resources.

[0080] Therefore, the data backup method provided by the present application first needs to obtain the relevant operation load data when the database is running. Since the database is actually configured in a hardware device such as a computer, the relevant operation load data when the database is running in the present application is essentially to obtain the operation load data of the hardware device that configures the database, such as CPU usage, memory usage, disk space, I / O performance, number of connections, query execution time and other related data. The operation load data is not only affected by the data backup, but also by the services running in the database. When the data stored in the database is actually backed up, the backup data obtained each time is different due to the difference in information such as the size of the data to be backed up and the time of the backup. The multiple backup data obtained in the present application are essentially backup strategies for backing up different data, such as periodically backing up certain tables in full, or regularly backing up certain data in incremental form, etc.; usually, the content of the specific data that needs to be backed up is not paid attention to.

[0081] In the embodiments of the present application, some data query commands can be used to obtain the above-mentioned related data; for example, a load data query command is executed to obtain the running load data of the database, and a backup data query command is used to obtain the backup data of the database. In a specific embodiment, a Java language database connection interface (JavaDataBase Connectivity, JDBC) can be configured in the database, and the corresponding SQL query command can be executed through the JDBC interface to obtain the required data. In other embodiments, for system-level data such as CPU usage, memory usage, disk space and other data, the API provided by the operating system or other external tools can also be used to obtain relevant data.

[0082] At the same time, in the embodiments of the present application, it is usually necessary to set up a scheduled task framework to periodically execute the aforementioned data query command to periodically obtain relevant data so as to timely adjust the backup strategy according to the obtained data.

[0083] 202. Analyze multiple operation load data to determine the operation load trend of the database.

[0084] 203. Analyze multiple backup data to determine the data backup trend of the database.

[0085] 204. Adjust the database backup strategy according to the data backup trend and the database operation load trend.

[0086] 205. Use the new backup strategy to back up the data in the database.

[0087] The operation load data of the database is obtained in this application mainly to determine the operation load trend of the database, that is, how the CPU usage rate, memory usage rate and other data of the electronic device configured with the database change when the database is in normal use. Based on these data, the resource configuration of the electronic device can be more accurately grasped, so that the relevant resources can be more accurately allocated in different working states of the electronic device in the future, avoiding the problem of resource waste or insufficient resources. Similarly, the backup data is also obtained to analyze the backup data and determine the backup status of the data stored in the database, such as which data needs to be incrementally backed up or fully backed up regularly. If the backup data is large or the frequency is high, more resources usually need to be allocated to improve the backup efficiency.

[0088] In an embodiment of the present application, multiple operation load data may be analyzed to determine the operation load trend of the database; and changes in multiple backup data may be analyzed to determine the data backup trend of the database. The specific process of determining the operation load trend and the data backup trend is described in detail in the subsequent embodiments and is not limited here. After respectively obtaining the operation load trend and the data backup trend, the two may be combined to adjust the data backup strategy, and the adjusted backup strategy may be used to perform data backup, thereby improving backup efficiency and resource utilization.

[0089] The present application provides a data backup method, including: periodically executing a load data query command and a backup data query command to obtain the operation load data and backup data of a database, and obtaining multiple operation load data and multiple backup data; analyzing multiple operation load data to determine the operation load trend of the database; analyzing multiple backup data to determine the data backup trend of the database; adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database; and backing up the data in the database using the new backup strategy. The present application combines the data backup trend of the database and the operation load trend of the database during operation to adjust the backup strategy of the database, which can more reasonably allocate resources, improve backup efficiency, and avoid waste of resources.

[0090] like Figure 3 As shown, in some embodiments, analyzing multiple operation load data to determine the operation load trend of the database may include the following steps:

[0091] 301. Obtain an operation load data training sample set, where the operation load data training sample set includes multiple operation load data training sample subsets.

[0092] The operation load data training sample set in this application includes multiple operation load data training sample subsets, and each operation load data training sample subset includes multiple operation load data of the same type arranged in chronological order; for example, one operation load data training sample subset includes multiple CPU usage rates arranged in chronological order, or one operation load data training sample subset includes multiple disk usage rates arranged in chronological order. This is because the operation load data obtained in this application is multiple different types of data, such as CPU usage, disk usage, etc.; these operation load data are usually different at different times, so it is necessary to predict different types of data separately.

[0093] 302. Perform training using multiple operational load data training sample subsets to obtain multiple time series sub-models.

[0094] 303. Obtain a target time series model according to the multiple time series sub-models.

[0095] 304. Analyze multiple operation load data using the target time series prediction model to determine the operation load trend of the database.

[0096] After obtaining multiple subsets of operation load data training samples, the load data in the multiple subsets of operation load data training samples can be used to perform model training respectively to obtain multiple different time series sub-models; each time series sub-model corresponds to the operation trend of the same type of data. And because in the actual backup scenario, multiple types of operation load data affect each other, it is also necessary to combine multiple time series sub-models to obtain a target time series prediction model that can predict the operation trend of multiple types of operation load data. In some embodiments, multiple time series sub-models can be weighted to obtain a target time series prediction model; in other embodiments, the results predicted by multiple time series sub-models can be used as new features to re-train the model to obtain the target time series prediction model; in other embodiments, the target time series prediction model can also be obtained according to multiple time series sub-models using decision trees and other methods. In the embodiment of the present application, in the process of obtaining the target time series prediction model according to multiple time series sub-models, the parameters or weighted parameters in the multiple time series sub-models can also be continuously adjusted to improve the accuracy of the target time series prediction model. The specific method and steps for obtaining the target time series prediction model according to multiple time series sub-models can refer to the prior art and are not limited in this application. After obtaining the target time series prediction model, the target time series prediction model can be used to analyze multiple operation load data to determine the operation load trend of the database. Generally speaking, the fluctuation of the operation load trend obtained by the time series model is related to time, and the change trend of the database load data can be predicted based on the operation load trend.

[0097] like Figure 4 As shown, a schematic diagram of an embodiment of determining an operating load threshold provided in an embodiment of the present application may include the following steps:

[0098] 401. Preprocess a plurality of operation load data, remove abnormal values, and perform normalization processing to obtain processed first load data.

[0099] 402. Perform cluster analysis on the first load data using the target clustering model to obtain multiple clustering results.

[0100] 403. Determine an operation load threshold of the database under different operation states according to the multiple clustering results.

[0101] 404. Determine a target operating load range of the database under different operating states according to the operating load threshold, where the target operating load range is the operating load trend of the database.

[0102] Specifically, it is usually necessary to pre-process the plurality of operating load data, such as removing outliers and performing normalization processing, etc., to obtain the processed first load data for subsequent analysis. In other embodiments, the plurality of operating load data may also be processed in other ways, and the specific process may refer to the prior art and is not limited here.

[0103] After obtaining the processed first load data, the first load data can be analyzed and processed to determine the operating load trend. In some embodiments, the preset load data analysis model can be a clustering model, that is, the first load data is analyzed using the clustering model to determine the operating load trend. Specifically, the CPU utilization, memory usage, etc. in the first load data can be used as features, and combined with the clustering model to determine multiple clustering results; and each clustering result is essentially an operating load threshold value of different features under different operating conditions.

[0104] Specifically, multiple load data feature values ​​corresponding to the first load data can be determined, and multiple load data feature values ​​can be arbitrarily selected from the multiple load data feature values ​​as the initial centroids, and then the distances between other load data features and each initial centroid are calculated, so that other load data features are assigned to the cluster to which the nearest initial centroid belongs according to the distances; the average value of all load data features in each cluster is calculated to update the position of the centroid. Repeat the aforementioned steps of determining the centroid and updating the centroid until the position of the centroid no longer changes, at which point multiple determined clusters are obtained, each cluster corresponding to a determined centroid; and each centroid is a clustering result, and each clustering result is an operating load threshold value of different features under different operating conditions.

[0105] For example, one clustering result corresponds to the operating load threshold of the CPU usage during a full backup, and another clustering result corresponds to the operating load threshold of the CPU usage during an incremental backup. Therefore, multiple clustering results can be obtained using the clustering model to determine the operating load threshold of the database under different operating conditions; however, it should be noted that the operating load threshold of the database here is actually the operating load threshold of the electronic device configured with the database. After determining multiple operating load thresholds under different operating conditions, the target operating load range of the database under different operating conditions can be determined. Regardless of how the data is backed up and how the resources required for the backup are allocated, the operating load of the database can only fluctuate within the target operating load range and cannot exceed the target operating load range determined by the operating load threshold.

[0106] The aforementioned embodiment also determines the change of the operation load trend of the database, but no matter how the operation load trend changes, the operation load needs to fluctuate within the target operation load range determined in the aforementioned embodiment. If the predicted load data of the database in a certain period of time in the future predicted according to the operation load trend of the database exceeds the target operation load range, an alarm needs to be generated. Capacity expansion operations can also be further performed based on the alarm information.

[0107] The above embodiments describe how to determine the operating load trend of the database, and it is also necessary to determine the data backup trend of the database, such as which data in the database is backed up more frequently, whether to perform a full backup or an incremental backup; or in which time periods the frequency of data backup is higher, in which time periods full backup is performed and in other time periods incremental backup is performed, etc. In the embodiments of the present application, the data changes in the database, such as the frequency of data updates, and the importance of the data in the database, such as the highest importance of system configuration data, can be regularly analyzed to determine the data backup trend of the database, such as which data is updated more frequently, which data is more important and must be fully backed up, etc. Generally speaking, frequently updated data can be incrementally backed up instead of fully backed up, while important data needs to be fully backed up even if it is frequently updated; for different data. The time for backing up different data is also different.

[0108] In other embodiments, the backup data analysis model can also be used to analyze the backup status of data in the database to determine the trend of data backup, including but not limited to the size of data to be backed up, full backup or incremental backup, backup period, backup frequency, etc. The specific process of determining the data backup trend using the backup data analysis model can refer to the prior art and is not limited in this application.

[0109] After determining the data backup trend, you can adjust the database backup trend based on the database operation load trend. Figure 5 As shown, it is a schematic diagram of an embodiment flow of adjusting the data backup strategy provided by an embodiment of the present application; specifically, according to the data backup trend and the operation load trend of the database, the backup strategy of the database is adjusted to back up the data in the database using the new backup data strategy, which may include the following steps:

[0110] 501. Determine a trend correlation between a data backup trend and a database operation load trend.

[0111] 502. Generate an adjustment strategy for the backup strategy of the database according to the trend correlation.

[0112] 503. According to the backup strategy adjustment strategy, dynamically adjust the database backup strategy, and use the new backup strategy to back up the data in the database.

[0113] Specifically, since the actual backup efficiency is affected by both the load resources and the actual backup data, and parameters such as the size and frequency of the actual backup data will also affect the allocation of load resources, that is, the two actually affect each other; therefore, the two can be combined to determine a new parameter. Specifically, the trend correlation between the data backup trend and the database's operating load trend can be determined. Among them, the trend correlation represents the degree of correlation between the data backup trend and the database's operating load trend, and also represents the degree of mutual influence between the two. According to the trend correlation, an adjustment strategy for the database backup strategy can be generated, and the backup strategy adjustment strategy can be used to dynamically adjust the database backup strategy to obtain a new backup strategy, and the new backup strategy is used to back up the data in the database.

[0114] In a specific embodiment, it is determined according to the data backup trend that data A of the database is fully backed up during the day and incrementally backed up at midnight; and according to the operating load trend of the database, it is determined that the database usually needs to release more cache during the day to ensure the normal operation of the database, and usually more cache can be released at midnight for data backup. However, since the load resources required for incremental backup are usually less than the load resources required for full backup, the trend correlation between the data backup trend and the operating load trend of the database can be determined to determine the correlation between the database load resources and the data backup situation of the database, so as to dynamically adjust the load resource allocation of the database during the day and adjust the backup strategy of the database. For example, more cache is released during the day to perform a full backup of data A, or the backup strategy of data A that originally performs a full backup in the first period is adjusted to a full backup of data A at the second time. In this way, the database backup strategy is adjusted to better allocate load resources and ensure the efficiency of data backup.

[0115] It should be noted that, in the aforementioned embodiment, what is generated according to the trend correlation is an adjustment strategy of the backup strategy, rather than directly generating a new backup strategy; and in the embodiment of the present application, the backup strategy can be dynamically adjusted to better match the actual data backup situation. In some embodiments, the trend correlation between the data backup trend and the operating load trend of the database can be determined by methods such as correlation analysis and regression analysis; the specific process can refer to the prior art and is not limited here.

[0116] In other embodiments, adjusting the backup strategy of the database according to the data backup trend and the operating load trend of the database to use the new backup data strategy to back up the data in the database may include the following steps: predicting the predicted load distribution strategy of the database according to the operating load trend of the database; predicting the predicted backup strategy of the database according to the database backup trend; adjusting the predicted backup strategy of the database according to the predicted load distribution strategy to obtain a new backup strategy; and backing up the data in the database according to the new backup strategy.

[0117] Specifically, since hardware support is required for data backup, appropriate resource allocation is required, such as memory size and connection pool size during backup. In this application, the database backup strategy is adjusted in combination with the database operation load trend and the database data backup trend to better allocate backup resources and improve backup efficiency. In the above embodiment, it is first necessary to predict the predicted load distribution strategy of the database according to the database operation load trend; wherein the predicted load distribution strategy can be the predicted load distribution of the database at different times or in different backup states. For example, according to the database operation load trend prediction, it is found that the database backup frequency is high during the period from zero to six o'clock, so it is usually necessary to allocate more load during the period from zero to six o'clock; such as by releasing more cache, reducing the frequency of interaction between the database and other electronic devices or systems, etc. to allocate more load for data backup. Or according to the database operation load trend prediction, when the database is incrementally backed up, 30% of the cache is usually required to be released to achieve backup, while when performing full backup, 80% of the memory needs to be released to achieve backup; therefore, different loads can be allocated according to the difference between incremental backup and full backup of the database.

[0118] At the same time, the efficiency of the actual backup is not only affected by the load resources, but also by the actual backup data; for example, the size of the actual backup data, or the backup frequency of the actual backup data, etc. will affect the backup efficiency. Therefore, in this application, it is also necessary to predict a predicted backup strategy for a database based on the database backup trend; wherein, the predicted backup strategy can be a predicted backup strategy for different data of the database, including but not limited to the actual backup data size, incremental backup or full backup, backup time and frequency and other information. For example, the predicted backup strategy is that data A is incrementally backed up in the first period. Generally speaking, the predicted backup strategy is for a single data, without considering the backup of the overall data and the need to occupy a certain load to maintain the normal operation of the database, while the operation load trend of the database considers the overall load resource allocation. Therefore, in this application, it is necessary to adjust the predicted backup strategy of the database according to the operation load trend, so as to better allocate load resources and improve data backup efficiency under the premise of ensuring normal data backup. In a specific embodiment, the predicted backup strategy is that data A needs to perform incremental backups with a higher frequency, but the database predicted according to the operation load trend will have more services running in the first period that require more load resources. Therefore, the frequency of incremental backup of data A can be appropriately reduced, or the backup time of data A can be moved to other idle time. This can ensure the operation of the original database service and the efficiency of data A backup.

[0119] In the above embodiment, during the actual data backup process, the gs_probackup command line tool can be called in Java to perform the backup operation; at the same time, Runtime.getRuntime().exec() or ProcessBuilder class is used to execute the gs_probackup command. The backup parameters (such as backup directory, backup name, compression level, etc.) can be configured through the Java program and passed to the gs_probackup command, so that the gs_probackup command can be used to read the backup parameters for backup. After the backup is completed, the metadata of the backup file can be stored in the database for subsequent management. In the data backup process, the compression algorithm can also be used to compress the backup data to reduce the storage space occupied; at the same time, the deduplication technology can be used to identify and remove duplicate databases to further reduce the size of the backup data.

[0120] After backing up the data, you can restore the data when needed. Figure 6 As shown, the method for data recovery may include:

[0121] 601. Call a data recovery command.

[0122] 602. Use the data recovery command to call the data recovery execution command.

[0123] 603. Obtain data recovery parameters according to the data recovery command.

[0124] 604. Perform data recovery according to the data recovery execution command and the data recovery parameters.

[0125] Specifically, when data recovery is required, it is necessary to first generate and call a data recovery command, and then use the data recovery command to call the data recovery execution command; that is, the data recovery execution command is not directly called or executed. At the same time, it is also necessary to use the data recovery command to obtain data recovery parameters, such as the name of the data to be recovered and the storage location light information; finally, the data recovery execution command and the data recovery parameters are used to perform data recovery. In an embodiment of the present application, after calling the data recovery command, the data recovery command must first be verified to determine whether the data recovery command is applicable to the current environment and to avoid malicious commands. Specifically, the preset key characters in the data recovery command can be checked to determine whether the data recovery command can pass the verification. Similarly, after calling the data recovery execution command, the data recovery execution command also needs to be verified. Only after passing the verification can the subsequent data recovery process be performed.

[0126] In a specific embodiment, the gs_probackup command line tool can be called in Java to perform a recovery operation; Runtime.getRuntime().exec() or the ProcessBuilder class is also used to execute the gs_probackup command; and the recovery parameters (such as backup directory, backup name, target data directory, etc.) can be configured through the Java program and passed to the gs_probackup command. The gs_probackup command will find the data that needs to be recovered based on the recovery parameters and perform data recovery.

[0127] During the above data recovery process, some other operations need to be performed, such as suspending ongoing database services and data backups, deleting existing data directories after data recovery, or configuring the restored database, etc. The specific process can refer to the existing technology and is not limited here.

[0128] In order to facilitate better implementation of the data backup method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above data backup method. The meanings of the terms are the same as those in the above data backup method, and the specific implementation details can refer to the description in the method embodiment. Figure 7 As shown, a schematic diagram of an embodiment of a data backup device provided in an embodiment of the present application may include:

[0129] The data acquisition module 701 is used to periodically execute the load data query command and the backup data query command to obtain the running load data and the backup data of the database, that is, multiple running load data and multiple backup data.

[0130] The operation load trend determination module 702 is used to analyze a plurality of operation load data using a preset load data analysis model to determine the operation load trend of the database.

[0131] The backup trend determination module 703 is used to analyze the multiple backup data using a preset backup data analysis model to determine the data backup trend of the database.

[0132] The backup strategy adjustment module 704 is used to adjust the backup strategy of the database according to the data backup trend and the operation load trend of the database, so as to back up the data in the database using the new backup strategy.

[0133] The backup module 705 is used to back up the data in the database using the new backup strategy.

[0134] The present application provides a data backup device that can realize the following functions: periodically execute load data query commands and backup data query commands to obtain the operation load data and backup data of the database, and obtain multiple operation load data and multiple backup data; use a preset load data analysis model to analyze multiple operation load data to determine the operation load trend of the database; use a preset backup data analysis model to analyze multiple backup data to determine the data backup trend of the database; adjust the backup strategy of the database according to the data backup trend and the operation load trend of the database; use the new backup strategy to back up the data in the database. The present application combines the data backup trend of the database and the operation load trend of the database during operation to adjust the backup strategy of the database, which can more reasonably allocate resources, improve backup efficiency, and avoid resource waste.

[0135] In some implementations of the present application, the operation load trend determination module 702 may be specifically used to: obtain an operation load data training sample set, wherein the operation load data training sample set includes a plurality of operation load data training sample subsets;

[0136] Using the plurality of operation load data training sample subsets to perform training respectively, to obtain a plurality of time series sub-models;

[0137] Obtaining a target time series prediction model according to the multiple time series sub-models;

[0138] The target time series prediction model is used to analyze the plurality of operation load data to determine the operation load trend of the database.

[0139] In some embodiments of the present application, the operation load trend determination module 702 may be specifically used to: pre-process the plurality of operation load data, remove abnormal values ​​and perform normalization processing to obtain processed first load data;

[0140] Performing cluster analysis on the first load data using a target clustering model to obtain multiple clustering results;

[0141] Determining, according to the multiple clustering results, an operating load threshold of the database under different operating states;

[0142] A target operating load range of the database under different operating states is determined according to the operating load threshold, and the target operating load range is the operating load trend of the database.

[0143] In some implementations of the present application, the backup strategy adjustment module 704 may be specifically used to:

[0144] Predicting a predicted load distribution strategy of the database according to an operating load trend of the database;

[0145] Predicting a predicted backup strategy for the database based on the database backup trend;

[0146] Adjusting the predicted backup strategy of the database according to the predicted load distribution strategy to obtain a new backup strategy;

[0147] The data in the database is backed up according to the new backup strategy.

[0148] In some implementations of the present application, the backup strategy adjustment module 704 may be specifically used to:

[0149] Determining a trend correlation between the data backup trend and the operation load trend of the database;

[0150] Generating an adjustment strategy for the backup strategy of the database according to the trend correlation;

[0151] According to the adjustment strategy of the backup strategy, the backup strategy of the database is dynamically adjusted, and the data in the database is backed up using the new backup strategy.

[0152] The present application also provides an electronic device, such as Figure 8 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0153] The electronic device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0154] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operation storage medium, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.

[0155] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating storage medium, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0156] The electronic device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management storage medium, so as to manage charging, discharging, and power consumption management through the power management storage medium. The power supply 803 can also include any components such as one or more DC or AC power supplies, recharge storage media, power failure detection circuits, power converters or inverters, and power status indicators.

[0157] The electronic device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0158] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application program stored in the memory 802, thereby implementing the steps in the above data backup method embodiment.

[0159] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0160] To this end, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in any data backup method provided in the embodiment of the present application.

[0161] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0162] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. Since the computer program stored in the computer-readable storage medium can execute the steps in any data backup method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data backup method provided in the embodiments of the present application can be achieved, as detailed in the previous embodiments, which will not be repeated here.

[0163] When the computing device in the embodiment of the present application is a terminal device, the embodiment of the present application also provides a terminal device, such as Fig. 9 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal device can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a car computer, etc., taking the mobile phone as an example:

[0164] Fig. 9 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Fig. 9 The mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, a processor 980, and a power supply 990. Those skilled in the art will understand that Figure 8 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0165] Combine the following Figure 8 A detailed introduction to the various components of the mobile phone:

[0166] The RF circuit 910 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 980 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 910 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 910 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0167] The memory 920 can be used to store software programs and modules. The processor 980 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 920. The memory 920 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 920 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0168] The input unit 930 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 931 or near the touch panel 931 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 931 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may further include other input devices 932. Specifically, the other input devices 932 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0169] The display unit 940 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. Optionally, the display panel 941 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 931 may cover the display panel 941. When the touch panel 931 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event. Subsequently, the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in Figure 8 In the embodiment, the touch panel 931 and the display panel 941 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 931 and the display panel 941 can be integrated to realize the input and output functions of the mobile phone.

[0170] The mobile phone may also include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 941 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0171] The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the received audio data to the speaker 961 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which is received by the audio circuit 960 and converted into audio data, and then the audio data is output to the processor 980 for processing, and then sent to another mobile phone through the RF circuit 910, or the audio data is output to the memory 920 for further processing.

[0172] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 970. It provides users with wireless broadband Internet access. Fig. 9A Wi-Fi module 970 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0173] The processor 980 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 920, and calling data stored in the memory 920, so as to monitor the mobile phone as a whole. Optionally, the processor 980 may include one or more processing units; optionally, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 980.

[0174] The mobile phone also includes a power supply 990 (such as a battery) for supplying power to each component. Optionally, the power supply can be logically connected to the processor 980 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here. In the embodiment of the present application, the processor 980 included in the mobile phone also has a function of controlling and executing the data backup method flow executed by the data backup device.

[0175] The present application also provides a server. Fig.10 , Fig.10 1 is a schematic diagram of a server structure provided in an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (full name in English: central processing units, abbreviated in English: CPU) 1022 (for example, one or more processors) and a memory 1032, and one or more storage media 1030 (for example, one or more mass storage devices) storing application programs 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 can be short-term storage or permanent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1022 can be configured to communicate with the storage medium 930 to execute a series of instruction operations in the storage medium 1030 on the server 1000.

[0176] The server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.

[0177] The steps in the data backup method in the above embodiment can be based on the Fig.10 The structure of the server 1000 is shown. For example, the central processor 1022 performs the following operations by calling the instructions in the memory 1032:

[0178] Periodically executing a load data query command and a backup data query command to obtain the running load data and the backup data of the database, and obtaining a plurality of running load data and a plurality of backup data;

[0179] Analyze multiple operation load data using a preset load data analysis model to determine the operation load trend of the database; analyze multiple backup data using a preset backup data analysis model to determine the data backup trend of the database;

[0180] Adjust the database backup strategy based on the data backup trend and the database operation load trend; use the new backup strategy to back up the data in the database.

[0181] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0182] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0183] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0184] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0186] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0187] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0188] The technical solutions provided in the embodiments of the present application are introduced in detail above. The principles and implementation methods of the embodiments of the present application are explained by using specific examples in the embodiments of the present application. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of the present application. At the same time, for those skilled in the art, according to the ideas of the embodiments of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.

Claims

1. A data backup method, characterized in that: The method comprises: Periodically executing a load data query command and a backup data query command to obtain the running load data and the backup data of the database, and obtaining a plurality of running load data and a plurality of backup data; Analyzing the plurality of operation load data to determine an operation load trend of the database; Analyzing the plurality of backup data to determine a data backup trend of the database; Adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database; The data in the database is backed up using a new backup strategy.

2. The data backup method according to claim 1, characterized in that: The analyzing the plurality of operation load data to determine the operation load trend of the database includes: Acquire an operation load data training sample set, wherein the operation load data training sample set includes a plurality of operation load data training sample subsets; Using the plurality of operation load data training sample subsets to perform training respectively, to obtain a plurality of time series sub-models; Obtaining a target time series prediction model according to the multiple time series sub-models; The target time series prediction model is used to analyze the plurality of operation load data to determine the operation load trend of the database.

3. The data backup method according to claim 2, characterized in that: The analyzing the plurality of operation load data to determine the operation load trend of the database further includes: Preprocessing the plurality of operating load data, removing outliers and performing normalization processing to obtain processed first load data; Performing cluster analysis on the first load data using a target clustering model to obtain multiple clustering results; Determining, according to the multiple clustering results, an operating load threshold of the database under different operating states; A target operating load range of the database under different operating states is determined according to the operating load threshold, and the target operating load range is the operating load trend of the database.

4. The data backup method according to claim 3, characterized in that: After analyzing the plurality of operation load data to determine the operation load trend of the database, the method further includes: Predicting predicted load data of the database according to the operating load trend of the database; Determining whether the predicted load data exceeds the target operating load range; If the predicted load data exceeds the target operating load range, an alarm is generated.

5. The data backup method according to claim 1, characterized in that: The step of adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database to back up the data in the database using the new backup strategy includes: Determining a trend correlation between the data backup trend and the operation load trend of the database; Generating an adjustment strategy for the backup strategy of the database according to the trend correlation; According to the adjustment strategy of the backup strategy, the backup strategy of the database is dynamically adjusted, and the data in the database is backed up using the new backup strategy.

6. The data backup method according to claim 1, characterized in that: The step of adjusting the backup strategy of the database according to the data backup trend and the operation load trend of the database to back up the data in the database using the new backup strategy includes: Predicting a predicted load distribution strategy of the database according to an operating load trend of the database; Predicting a predicted backup strategy for the database based on the database backup trend; Adjusting the predicted backup strategy of the database according to the predicted load distribution strategy to obtain a new backup strategy; The data in the database is backed up according to the new backup strategy.

7. The data backup method according to claim 1, characterized in that: The method further comprises: Call the data recovery command; Using the data recovery command to call the data recovery execution command; Acquire data recovery parameters according to the data recovery command; Data recovery is performed according to the data recovery execution command and the data recovery parameters.

8. A data backup device, characterized in that: The data backup device comprises: A data acquisition module, used for periodically executing a load data query command and a backup data query command to obtain the running load data and the backup data of the database, to obtain a plurality of running load data and a plurality of backup data; An operation load trend determination module, used for analyzing the plurality of operation load data to determine the operation load trend of the database; A backup trend determination module, used to analyze the plurality of backup data to determine the data backup trend of the database; A backup strategy adjustment module, used to adjust the backup strategy of the database according to the data backup trend and the operation load trend of the database, so as to back up the data in the database using the new backup strategy; The backup module is used to back up the data in the database using a new backup strategy.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the data backup as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data backup method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Non-intrusive screen data backup and recovery system for display screen

    CN119759663A

  • Non-invasive Screen Data Backup and Recovery System for Display Screens

    CN119759663B

  • Data backup scheduling method, device and system, server and program product

    CN120872691A