Data backup and recovery method and device, electronic equipment and storage medium
By using preset backup strategies and backup snapshot technology, the problems of large storage space consumption and long recovery time in existing data backup solutions are solved, achieving efficient and flexible data recovery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing data backup solutions consume a large amount of storage space and have long data recovery times, making it difficult to achieve efficient data recovery at any point in time.
Full and incremental backups are performed using preset backup strategies. Combined with backup snapshots, storage locations and mappings are determined by estimating data recovery frequency, thus optimizing the data recovery process.
It reduces the storage space occupied by backup data, improves the efficiency and flexibility of data recovery, and achieves near real-time data protection.
Smart Images

Figure CN121144109B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data backup, specifically to a data backup and recovery method, apparatus, electronic device, and storage medium. Background Technology
[0002] Databases are crucial components of data-centric applications, capable of storing and processing massive amounts of data. With the rapid development of database technology, the security requirements for various types of data stored on the database host are also increasing. To prevent data loss or corruption due to database host failure, data backups are performed. Existing data backup solutions consume significant data resources during full backups, significantly impacting system performance, and the backed-up data occupies substantial storage space. Incremental backups require merging multiple incremental backups during data recovery, which is time-consuming and makes it difficult to restore data to any point in time. Summary of the Invention
[0003] This application provides a data backup and recovery method, apparatus, electronic device, and storage medium, aiming to solve the problems of data backup occupying a large amount of storage space and data recovery time being long in the prior art.
[0004] In a first aspect, this application provides a data backup and recovery method, applied to a data backup program, the method comprising:
[0005] The data to be backed up is backed up using a preset backup strategy to obtain the backup data.
[0006] Determine the estimated data recovery frequency of the backup data, and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data;
[0007] Based on the estimated data recovery frequency, a backup snapshot corresponding to the backup data is generated to determine the mapping between the backup data and the backup snapshot;
[0008] Data recovery is performed based on the mapping between the backup data and the backup snapshot.
[0009] In some possible embodiments, the step of backing up the data to be backed up using a preset backup strategy to obtain the backup data includes:
[0010] Obtain the preset backup strategy;
[0011] According to the preset backup strategy, the data to be backed up is periodically backed up in full according to the preset backup cycle;
[0012] According to the preset backup strategy, incremental backups are performed on the data to be backed up within the time period corresponding to the preset backup cycle.
[0013] The backup data includes full backup data and incremental backup data.
[0014] In some possible embodiments, determining the estimated data recovery frequency of the backup data and determining the storage location of the backup data based on the estimated data recovery frequency to store the backup data includes:
[0015] Determine the data type and data level of the backup data in order to determine the estimated data recovery frequency of the backup data;
[0016] Obtain the mapping relationship between the preset data recovery frequency and the data storage location;
[0017] Based on the mapping relationship between the preset data recovery frequency and the data storage location, and the estimated data recovery frequency, the storage location of the backup data is determined to store the backup data.
[0018] In some possible embodiments, determining the data type and data level of the backup data, and determining the estimated data recovery frequency of the data to be backed up, includes:
[0019] Obtain the preset data recovery frequency prediction model;
[0020] The data type and data level of the backup data are input into the data recovery frequency prediction model to determine the estimated data recovery frequency of the backup data.
[0021] In some possible embodiments, obtaining the preset data recovery frequency prediction model includes:
[0022] Obtain the training data type, training data level, and training data recovery frequency of the training backup data;
[0023] The training data type and the training data level are input into the initial data recovery frequency prediction model to obtain the predicted training data recovery frequency corresponding to the training backup data;
[0024] The loss value between the training data recovery frequency and the estimated training data recovery frequency is calculated using a preset loss function;
[0025] The parameters in the initial data recovery frequency prediction model are adjusted according to the loss value until the loss value meets the preset loss value condition, thus obtaining the data recovery frequency prediction model.
[0026] In some possible embodiments, determining the data type and data level of the backup data, and determining the estimated data recovery frequency of the backup data, includes:
[0027] Obtain historical backup data and its corresponding historical data recovery frequency;
[0028] Determine the historical data type and historical data level of the historical backup data;
[0029] Clustering is performed on the historical data type and historical data level of the historical backup data, and on the data type and data level of the backup data, to obtain multiple clusters;
[0030] Determine the cluster in which the backup data belongs, and then determine the estimated data recovery frequency of the backup data based on the historical data recovery frequency.
[0031] In some possible embodiments, the data recovery based on the mapping between the backup data and the backup snapshot includes:
[0032] Obtain and parse data recovery instructions to determine the backup snapshot and host information of the host that needs data recovery;
[0033] Based on the mapping between the backup data and the backup snapshot, the backup snapshot determines the data to be recovered that needs to be recovered.
[0034] Determine the data recovery strategy for the host based on the host information;
[0035] Data recovery is performed on the host according to the data recovery strategy and the data to be recovered.
[0036] Secondly, this application provides a data backup and recovery device, comprising:
[0037] The data backup module is used to back up the data to be backed up using a preset backup strategy, thereby obtaining the backup data.
[0038] A storage location determination module is used to determine the estimated data recovery frequency of the backup data, and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data;
[0039] The backup snapshot generation module is used to generate a backup snapshot corresponding to the backup data based on the estimated data recovery frequency, so as to determine the mapping between the backup data and the backup snapshot;
[0040] The data recovery module is used to perform data recovery based on the mapping between the backup data and the backup snapshot.
[0041] Thirdly, this application provides an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the data backup and recovery method as described in any of the first aspects.
[0042] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps of the data backup and recovery method as described in any of the first aspects.
[0043] This application provides a data backup and recovery method, apparatus, electronic device, and storage medium, applied to a data backup program. The method includes: backing up data to be backed up using a preset backup strategy to obtain backup data; determining the estimated data recovery frequency of the backup data and determining the storage location of the backup data based on the estimated data recovery frequency, and storing the backup data; generating a backup snapshot corresponding to the backup data based on the estimated data recovery frequency to determine the mapping between the backup data and the backup snapshot; and performing data recovery based on the mapping between the backup data and the backup snapshot. This application combines full backup with incremental backup of the data to be backed up, reducing the storage space occupied by the backup data while improving the efficiency of data recovery by using backup snapshots. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the data backup and recovery system provided in an embodiment of this application;
[0046] Figure 2 This is a schematic flowchart of an embodiment of the data backup and recovery method provided in this application.
[0047] Figure 3 A flowchart illustrating an embodiment of determining the estimated data recovery frequency provided in this application;
[0048] Figure 4 A flowchart illustrating another embodiment of determining the estimated data recovery frequency provided in this application;
[0049] Figure 5 A schematic diagram of a data recovery process provided in this application embodiment;
[0050] Figure 6 A flowchart illustrating the data backup process provided in this application embodiment;
[0051] Figure 7 A flowchart illustrating the data recovery process provided in this application embodiment;
[0052] Figure 8 A schematic diagram of the system architecture for data backup and recovery provided in the embodiments of this application;
[0053] Figure 9 A schematic diagram of an embodiment of the data backup and recovery apparatus provided in this application;
[0054] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0055] Figure 11 This is a schematic diagram of the terminal structure provided in an embodiment of this application;
[0056] Figure 12 This is a schematic diagram of a server structure provided in an embodiment of this application. Detailed Implementation
[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] In the following description, specific embodiments of this application will be illustrated with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be referred to several times as being performed by a computer, and computer execution as referred to herein includes operations by a computer processing unit representing electronic signals of data in a structured format. This operation transforms the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of this application are described in the foregoing text, which is not intended to be limiting, and those skilled in the art will understand that many of the steps and operations described below can also be implemented in hardware.
[0059] The terms "module" or "unit" as used herein can be considered as software objects executing on the computing system. The different components, modules, engines, and services described herein can be considered as implementation objects on the computing system. The apparatus and methods described herein are preferably implemented in software, but can also be implemented in hardware, both of which are within the scope of this application.
[0060] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated 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 say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0061] Please refer to Figure 1 This application also provides a data backup and recovery system, such as Figure 1 As shown, the data backup and recovery system includes a computing device 100, which integrates the data backup and recovery apparatus provided in this application. In this embodiment, the computing device 100 may be a terminal device or a server.
[0062] In this embodiment, when the computing device 100 is a server, the server can be an independent server, a server network, or a server cluster. For example, the server described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing. In this embodiment, communication between the server and the client can be achieved through any communication method, including but not limited to mobile communication based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP / IP Protocol Suite (TCP / IP) and User Datagram Protocol (UDP).
[0063] It is understood that when the computing device 100 used in the embodiments of this application is a terminal device, the terminal device can be a device that includes both receiving hardware and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a terminal device may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. Specifically, the computing device 100 may be a desktop terminal or a mobile terminal, and may specifically be one of a mobile phone, tablet computer, laptop computer, etc.
[0064] The terminal devices involved in the embodiments of this application can also be devices that provide voice and / or data connectivity to users, handheld devices with wireless connectivity, or other processing devices connected to a wireless modem. Examples include mobile phones (or "cellular" phones) and computers with mobile terminals, such as portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices that exchange voice and / or data with a wireless access network. Examples include Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), and other devices.
[0065] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of computing devices shown, or the network connectivity of computing devices, for example... Figure 1 Only one computing device is shown in the diagram. It is understood that the data backup and recovery system may also include one or more other computing devices, and / or one or more other computing devices that are network-connected to computing device 100, without being limited here.
[0066] In addition, such as Figure 1 As shown, the data backup and recovery system may also include a memory 200 for storing backup data.
[0067] In this embodiment, the memory 200 can be a cloud memory. Cloud storage is a new concept that is extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology and distributed storage file system functions to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) through application software or application interfaces to work together and jointly provide data storage and business access functions to the outside world.
[0068] Currently, the storage method in storage systems is as follows: Logical volumes are created, and during creation, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.
[0069] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate 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 Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.
[0070] It should be noted that, Figure 1 The schematic diagram of the data backup and recovery system shown is merely an example. The data backup and recovery system and scenario described in this application embodiment are for the purpose of more clearly illustrating the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of data backup and recovery systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0071] The solutions provided in this application involve technologies such as Artificial Intelligence (AI), Computer Vision (CV), and Machine Learning (ML), which are specifically illustrated through the following embodiments:
[0072] AI, or Artificial Intelligence, refers to the theories, methods, technologies, and application systems that utilize digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, Artificial Intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine capable of reacting in a manner similar to human intelligence. Artificial Intelligence studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0073] AI technology is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0074] Computer vision (CV) is the science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes for target recognition, tracking, and measurement, and then performs image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include adversarial perturbation generation, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0075] The data backup and recovery method, apparatus, server, and storage medium provided in the embodiments of this application will be described in detail below. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0076] like Figure 2 The diagram shown is a flowchart of an embodiment of the data backup and recovery method provided in this application, which may include the following steps:
[0077] 201. Use the preset backup strategy to back up the data to be backed up, and obtain the backup data.
[0078] The data backup and recovery method provided in this application primarily utilizes relatively intensive incremental backups combined with backup snapshots for data recovery, thereby achieving near-real-time data protection (CDP) recovery capabilities without consuming excessive storage space. Prior to this, the data to be backed up must first be backed up to obtain backup data. In some embodiments, a preset backup strategy can be obtained to back up the data to be backed up; specifically, a preset backup strategy can be obtained, and according to the preset backup strategy, periodic full backups of the backup data are performed according to a preset backup cycle; according to the preset backup strategy, a full backup of the data to be backed up is performed within the time corresponding to the preset backup cycle, and the backup data includes full backup data and incremental backup data. Considering the actual backup situation and scenario, it is usually necessary to perform both full and incremental backups of the data; neither full backup nor incremental backup alone is sufficient. Therefore, in this application, periodic full backups of the data to be backed up can be performed according to a preset backup cycle to ensure data integrity; however, since full backups require significant resources and time, incremental backups are also necessary to balance backup efficiency and storage costs. In this application, incremental backups of the data to be backed up can be performed within the time frame corresponding to each backup cycle, and the backup cycle can be set to a relatively long period. For example, if the backup cycle is one month or one quarter, the data to be backed up can be periodically backed up to a full amount on a monthly or quarterly basis to ensure data integrity; simultaneously, incremental backups are performed within the time frame corresponding to each month or quarter, backing up only the data that has changed, thereby reducing the resources required for backup and the storage space occupied. The backup data in this application includes full backup data and incremental backup data.
[0079] 202. Determine the estimated data recovery frequency of the backup data, and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data.
[0080] The location where the backup data needs to be stored depends on the frequency of data recovery; for example, it can be stored in local storage or other third-party storage. When data recovery is required, storing the data locally can reduce recovery time and improve efficiency compared to storing it in third-party storage. Therefore, in this application, the location where the backup data needs to be stored can be determined based on the frequency of backup data recovery; the specific process will be detailed in subsequent embodiments and is not limited here.
[0081] 203. Based on the estimated data recovery frequency, determine the backup snapshots corresponding to the backup data to establish the mapping between backup data and backup snapshots.
[0082] 204. Perform data recovery based on the mapping between backup data and backup snapshots.
[0083] While determining the storage location of backup data based on the estimated data recovery frequency, the corresponding backup snapshots can also be determined to map the backup data to their corresponding snapshots. Typically, the size of a backup snapshot is much smaller than the size of the backup data. After establishing the mapping between backup data and backup snapshots, the corresponding backup data can be located by examining the backup snapshots, thus enabling data recovery. Since the backup data can be found through backup snapshots, most backup data can be stored on third-party storage, without requiring a large amount of storage space.
[0084] In some embodiments of this application, determining the storage location based on the estimated data recovery frequency may include: determining the data type and data level of the backup data to determine the estimated data recovery frequency of the backup data; obtaining the mapping relationship between the estimated data recovery frequency and the data storage location; and determining the storage location of the backup data based on the preset mapping relationship between the data recovery frequency and the data storage, and the estimated data recovery frequency, so as to store the backup data.
[0085] Specifically, the storage location of backup data is primarily determined by the estimated frequency of data recovery. For example, if the data recovery frequency is high, it can be stored in local storage; if the data recovery frequency is low, it can be stored in a third-party storage device. The estimated data recovery frequency is determined by the data type and data priority of the backup data. The data type primarily determines whether the backup data is configuration data or operational data generated normally during system or program operation, while the data priority refers to the importance level of the data. Based on the data type and data priority of the backup data, the estimated data recovery frequency can be determined.
[0086] like Figure 3 The diagram shown is a flowchart illustrating an embodiment of determining the estimated data recovery frequency provided in this application, which may include:
[0087] 301. Obtain the training data type, training data level, and training data recovery frequency of the training backup data.
[0088] 302. Input the training data type and training data level into the initial data recovery frequency prediction model to obtain the predicted training data recovery frequency corresponding to the training backup data.
[0089] 303. Calculate the loss value between the frequency of recovery of training data and the frequency of recovery of predicted training data using a preset loss function.
[0090] 304. Adjust the parameters in the initial data recovery frequency prediction model according to the loss value until the loss value meets the preset loss value condition to obtain the data recovery frequency prediction model.
[0091] 305. Input the data type and data level of the backup data into the data recovery frequency prediction model to determine the estimated data recovery frequency of the backup data.
[0092] Specifically, in some embodiments, a neural network model can be trained based on the data type, data level, and data recovery frequency of historical backup data to obtain a data recovery frequency prediction model capable of predicting data recovery frequency. This model can then be used to predict the estimated data recovery frequency of the current backup data. The specific model training process can refer to existing technologies and is not limited thereto in this application.
[0093] In other embodiments, other methods can also be used to determine the estimated data recovery frequency of the backup data. For example... Figure 4 The diagram shown is a flowchart illustrating another embodiment of the method for determining the estimated data recovery frequency provided in this application, which may include:
[0094] 401. Obtain historical backup data and its corresponding historical data recovery frequency.
[0095] 402. Determine the historical data type and historical data level of the historical backup data.
[0096] 403. Cluster the historical data types and historical data levels of the historical backup data, as well as the data types and data levels of the backup data, to obtain multiple clusters.
[0097] 404. Determine the cluster in which the backup data is located, and determine the estimated data recovery frequency of the backup data based on the historical data recovery frequency.
[0098] Specifically, it is also necessary to obtain historical backup data and its corresponding historical data recovery frequency over a certain period of time, and further determine the historical data type and historical data level of the historical backup data. Then, the historical data type and historical data level of the historical backup data, as well as the historical data type and data level of the backup data, are clustered to obtain multiple clusters. The clustering process is actually a process of confirming the similarity between the current backup data and the historical backup data; if the current backup data and the historical backup data belong to the same cluster, it means that the current backup data and the historical backup data are highly similar, and the historical data recovery frequency corresponding to the historical backup data is likely to be the frequency of data recovery for the current backup data in the future. Therefore, based on the cluster where the backup data belongs, the historical data recovery frequency corresponding to the historical backup data in the cluster where the backup data belongs can be used as the estimated data recovery frequency corresponding to the current backup data. The specific process of clustering can refer to the existing technology, and is not limited in this application. It should also be noted that the historical backup data obtained in the above embodiments is historical backup data over a certain period of time; otherwise, it is impossible to obtain accurate historical data recovery frequencies.
[0099] Once the estimated data recovery frequency of the backup data is determined, the storage location of the backup data can be determined based on this frequency. In some embodiments, the estimated data recovery frequency and data priority may also be considered when determining the storage location. For example, if the estimated data recovery frequency of the backup data is not less than a preset data recovery frequency threshold, indicating that the backup data is high-frequency data, and it is also determined to be important data with a high priority, then the backup data can be stored in local storage to ensure fast data recovery speed when using the backup data on the local machine. Conversely, if the estimated data recovery frequency of the backup data is less than the preset data recovery frequency, and the data priority of the backup data is determined to be low, then less important data that will not be frequently recovered can be stored in a third-party storage device to avoid occupying too much local storage space and reduce storage costs.
[0100] In the above embodiments, when storing backup data, since the backup data contains both incremental and full data, it can be stored according to a preset storage format. Specifically, the backup data can be stored in a defined storage location according to the following storage format:
[0101] ├─192.168.34.90# Working Machine 1
[0102] WindowsImageBackup / #The latest backup set for each backup
[0103] ├─ FullBackup1 / #Full Backup Chain Snapshot
[0104] │└─WindowsImageBackup# Includes full and incremental backups
[0105] ├─ FullBackup2 / #Full Backup Chain Snapshot
[0106] │└─WindowsImageBackup# Includes full and incremental backups
[0107] In this application, 192.168.34.90 is the identifier for worker machine 1. Since this application performs periodic full backups and incremental backups within a backup cycle, the backup data within a backup cycle includes both full and incremental data. Full and incremental data from different backup cycles are stored in different storage directories; however, full and incremental data within the same backup cycle are stored in the same storage directory. Furthermore, backup snapshots generated after each backup within the same backup cycle are also stored in the same storage directory, while backup snapshots generated in different backup cycles are stored in different storage directories.
[0108] This application can also generate backup snapshots corresponding to the backup data based on the estimated data recovery frequency. Specifically, this application can use backup snapshots to find the corresponding backup data for data recovery, and a corresponding backup snapshot is generated each time a backup is performed. If the estimated data recovery frequency of the backup data is high, it means that the corresponding backup data needs to be found frequently, so a backup snapshot corresponding to the backup data needs to be generated after the data backup so that the backup data can be found later using the backup snapshot. If the estimated data recovery frequency of the backup data is low, it means that this type of backup data will not be found frequently, so there is no need to generate the corresponding backup snapshot immediately after the backup is completed; in some embodiments, backup snapshots can be generated periodically. That is, this application can generate backup snapshots asynchronously, without needing to generate the corresponding backup snapshot immediately after the backup is completed.
[0109] like Figure 5 The diagram shown is a schematic flowchart of an embodiment of data recovery provided in this application, which may include:
[0110] 501. Obtain and parse the data recovery command to determine the backup snapshot and the host information of the host that needs to be recovered.
[0111] 502. Based on the mapping between backup data and backup snapshots, determine the data to be recovered that needs to be restored.
[0112] 503. Determine the data recovery strategy for the host based on the host information.
[0113] 504. Perform data recovery on the host according to the data recovery strategy and the data to be recovered.
[0114] When data recovery is required, the first step is to obtain a data recovery instruction. This instruction can be entered by the operator or generated periodically. The instruction typically includes a backup snapshot, which can be obtained by parsing the instruction. A mapping relationship exists between the backup snapshot and the backup data; after obtaining the snapshot, this mapping relationship can be used to determine the data to be recovered. Furthermore, since the data backup and recovery method provided in this application can be performed on different hosts, parsing the data recovery instruction can also identify the host requiring data recovery, allowing for further acquisition of host information. Different hosts employ different recovery strategies. This application can determine the corresponding data recovery strategy for the host requiring recovery based on the host information, and then perform data recovery on the host according to the recovery strategy and the data to be recovered corresponding to the backup snapshot. In one specific embodiment, acquiring host information mainly involves acquiring the host's hardware information, such as disk size, memory size, and interface type. The specific process of data recovery on the host can refer to existing methods and is not limited in this application.
[0115] The following provides a detailed description of the data backup and recovery process provided in this application: Figure 6 As shown, data backup also involves a data backup command. After receiving and parsing the command, the system can back up the data according to a specific backup strategy, resulting in a backup set containing at least one backup data. Simultaneously, a snapshot is generated after each backup according to a snapshot generation strategy, resulting in a snapshot set containing at least one backup snapshot. Each backup corresponds to one backup snapshot. The backup snapshots preserve the state of the backup set at multiple historical points in time, allowing for the retrieval of corresponding backup data later. After obtaining the backup set, a snapshot ID is generated for each backup snapshot as a unique identifier. This snapshot ID is then mapped to the backup time to determine the backup time of the backup data.
[0116] like Figure 7 As shown, when data recovery is needed, the user can select a specific point in time for data recovery, corresponding to a snapshot ID. The user can then use this snapshot ID to locate the data to be recovered within the backup set of the backup storage, and perform the recovery process. The data recovery operation can be performed on the source machine or a different machine; that is, the data backup and recovery process can be conducted on different hosts.
[0117] like Figure 8 The diagram shown illustrates the system architecture for data backup and recovery provided in this application. Figure 8 The illustrated embodiment mainly comprises three parts: a recovery engine, worker nodes, and backup control. For the worker nodes, the data backup and recovery method provided in this application is deployed within a Windows application. Once the application is launched, the data backup and recovery process can be executed. Specifically, the worker node can call its own services or engine to determine the changed incremental data and back it up. Simultaneously, this application also periodically performs full backups; therefore, the backup set includes both full and incremental data. The backup set manager can call a snapshot service to asynchronously generate snapshots. The generated snapshots and backup data need to be stored on different storage media using a software layer called the Storage Media Abstraction Layer (SML). Specifically, the Storage Media Abstraction Layer is a software layer that shields the differences between different storage media, providing a unified interface to access different storage media such as local disks, shared folders, iSCSI LUNs, and S3-compatible storage, and supports dynamic switching of storage media. Therefore, backup data and snapshots can be stored on different storage media. When data recovery is required, the backup server can call the recovery engine and communicate with the worker nodes to control the worker nodes to call their own applications for data recovery. Simultaneously, the backup server needs to utilize the storage media abstraction layer to determine the data to be restored, so that data recovery can be performed on the worker nodes. It should be noted that the worker nodes used for data backup and the worker nodes used for data recovery can be different worker nodes. Figure 8 The embodiments shown are merely illustrative of Windows applications deployed on a host machine that have both data backup and data recovery capabilities.
[0118] To facilitate better implementation of the data backup and recovery method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the above-described data backup and recovery method. The meanings of the terms used are the same as in the above-described data backup and recovery method, and specific implementation details can be found in the descriptions in the method embodiments. Figure 9 The diagram shown is a schematic representation of an embodiment of the data backup and recovery device provided in this application, which may include:
[0119] The data backup module 901 is used to back up the data to be backed up using a preset backup strategy to obtain the backup data.
[0120] The storage location determination module 902 is used to determine the estimated data recovery frequency of the backup data and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data.
[0121] The backup snapshot generation module 903 is used to generate backup snapshots corresponding to backup data based on the estimated data recovery frequency, so as to determine the mapping between backup data and backup snapshots.
[0122] Data recovery module 904 is used to perform data recovery based on the mapping between backup data and backup snapshots.
[0123] In some embodiments, the data backup module 901 may be specifically used to: obtain a preset backup strategy; perform periodic full backups of the data to be backed up according to the preset backup strategy and a preset backup cycle; and perform incremental backups of the data to be backed up within the time corresponding to the preset backup cycle according to the preset backup strategy; the backup data includes full backup data and incremental backup data.
[0124] In some embodiments, the storage location determination module 902 may be specifically used to: determine the data type and data level of the backup data to determine the estimated data recovery frequency of the backup data; obtain the mapping relationship between the preset data recovery frequency and the data storage location; and determine the storage location of the backup data according to the mapping relationship between the preset data recovery frequency and the data storage location and the estimated data recovery frequency, so as to store the backup data.
[0125] In some embodiments, the storage location determination module 902 may be used to: obtain a preset data recovery frequency prediction model; input the data type and data level of the backup data into the data recovery frequency prediction model to determine the estimated data recovery frequency of the backup data.
[0126] In some embodiments, the storage location determination module 902 may be specifically used to: obtain the training data type, training data level, and training data recovery frequency of the training backup data; input the training data type and training data level into the initial data recovery frequency prediction model to obtain the estimated training data recovery frequency corresponding to the training backup data;
[0127] The loss value between the training data recovery frequency and the estimated training data recovery frequency is calculated using a preset loss function. The parameters in the initial data recovery frequency prediction model are adjusted according to the loss value until the loss value meets the preset loss value condition, thus obtaining the data recovery frequency prediction model.
[0128] In some embodiments, the storage location determination module 902 may be specifically used to: obtain historical backup data and its corresponding historical data recovery frequency; determine the historical data type and historical data level of the historical backup data; cluster the historical data type and historical data level of the historical backup data, and the data type and data level of the backup data to obtain multiple clusters; determine the cluster in which the backup data is located, so as to determine the estimated data recovery frequency of the backup data based on the historical data recovery frequency.
[0129] In some embodiments, the data recovery module 904 may be specifically used to: acquire and parse data recovery instructions, determine backup snapshots and host information of the host to be recovered; determine the data to be recovered based on the mapping between backup data and backup snapshots and the backup snapshots; determine the data recovery strategy of the host based on the host information; and perform data recovery on the host based on the data recovery strategy and the data to be recovered.
[0130] This application also provides an electronic device, such as... Figure 10 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0131] The electronic device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will understand that... Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0132] The processor 1001 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1002, and by calling data stored in the memory 1002, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor. The application processor mainly handles the operation of the storage medium, user interface, and application programs, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1001.
[0133] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area. The program storage area may store applications required for operating the storage medium and at least one function (such as sound playback function, image playback function, etc.); the data storage area may store data created according to the use of the electronic device. In addition, the memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0134] The electronic device also includes a power supply 1003 that supplies power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management storage medium, thereby enabling functions such as charging, discharging, and power consumption management through the power management storage medium. The power supply 1003 may also include one or more DC or AC power supplies, recharge storage media, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0135] The electronic device may also include an input unit 1004, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0136] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 1002 according to the following instructions, and the processor 1001 runs the applications stored in the memory 1002, thereby realizing the steps in the above-described data backup and recovery method embodiment.
[0137] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0138] Therefore, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in any of the data backup and recovery methods provided in embodiments of this application.
[0139] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0140] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc. Since the computer program stored in the computer-readable storage medium can execute the steps of any of the data backup and recovery methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the data backup and recovery methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.
[0141] When the computing device in this application embodiment is a terminal device, this application embodiment also provides a terminal device, such as... Figure 11 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal device can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a mobile phone as an example:
[0142] Figure 10 This diagram illustrates a partial structure of a mobile phone related to the terminal device provided in the embodiments of this application. (Reference) Figure 11 The mobile phone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. Those skilled in the art will understand that... Figure 11 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0143] The following is combined Figure 11 A detailed introduction to each component of a mobile phone:
[0144] RF circuit 1110 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 1180; additionally, it transmits uplink data to the base station. Typically, RF circuit 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 1110 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0145] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0146] Input unit 1130 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile phone. Specifically, input unit 1030 may include touch panel 1131 and other input devices 1132. Touch panel 1131, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1131), and drive corresponding connection devices according to a pre-set program. Optionally, touch panel 1131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 1180, and can receive and execute commands sent by processor 1180. In addition, touch panel 1131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1131, the input unit 1130 may also include other input devices 1132. Specifically, other input devices 1132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0147] Display unit 1140 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. Display unit 1140 may include display panel 1141, optionally configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar display panel 1141. Further, touch panel 1131 may cover display panel 1141. When touch panel 1131 detects a touch operation on or near it, it transmits the information to processor 1080 to determine the type of touch event. Subsequently, processor 1180 provides corresponding visual output on display panel 1141 based on the type of touch event. Although in Figure 11 In this embodiment, the touch panel 1131 and the display panel 1141 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated to realize the input and output functions of the mobile phone.
[0148] The mobile phone may also include at least one sensor 1150, 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. The ambient light sensor can adjust the brightness of the display panel 1141 according to the ambient light level, and the proximity sensor can turn off the display panel 1141 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0149] Audio circuit 1160, speaker 1161, and microphone 1162 provide an audio interface between the user and the mobile phone. Audio circuit 1160 converts received audio data into electrical signals and transmits them to speaker 1161, where speaker 1161 converts them into sound signals for output. On the other hand, microphone 1162 converts collected sound signals into electrical signals, which are received by audio circuit 1160, converted into audio data, and then processed by processor 1180 before being transmitted via RF circuit 1110 to, for example, another mobile phone, or the audio data can be output to memory 1120 for further processing.
[0150] Wi-Fi is a short-range wireless transmission technology. Through the Wi-Fi module 1170, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 11 Wi-Fi module 1170 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the nature of the invention.
[0151] The processor 1180 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1120, and calls data stored in the memory 1120 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1180 may include one or more processing units; optionally, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 1180.
[0152] The mobile phone also includes a power supply 1190 (such as a battery) to power various components. Optionally, the power supply can be logically connected to the processor 1180 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Although not shown, the mobile phone may also include a camera, Bluetooth module, etc., which will not be described in detail here. In this embodiment, the processor 1180 included in the mobile phone also has the function of controlling the execution of the data backup and recovery method flow performed by the data backup and recovery device.
[0153] This application also provides a server; please refer to [link / reference]. Figure 12 , Figure 12 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1200 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1222 (e.g., one or more processors) and memory 1232, and one or more storage media 1230 (e.g., one or more mass storage devices) for storing application programs 1242 or data 1244. The memory 1232 and storage media 1230 can be temporary or persistent storage. The program stored in the storage media 1230 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 1222 may be configured to communicate with the storage media 1230 and execute the series of instruction operations in the storage media 1230 on the server 1200.
[0154] Server 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
[0155] The steps in the data backup and recovery method in the above embodiments can be based on this. Figure 12 The structure of server 1200 is shown. For example, the central processing unit 1222 performs the following operations by calling instructions from memory 1232:
[0156] The backup process involves backing up the data to be backed up using a preset backup strategy to obtain backup data; determining the estimated data recovery frequency of the backup data and the storage location of the backup data based on the estimated data recovery frequency; generating a backup snapshot corresponding to the backup data based on the estimated data recovery frequency to determine the mapping between the backup data and the backup snapshot; and performing data recovery based on the mapping between the backup data and the backup snapshot.
[0157] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0158] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0159] In the embodiments provided in this application, 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 modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules 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 indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.
[0160] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0161] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0162] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0163] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0164] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.
Claims
1. A data backup and recovery method, characterized in that, Applied to a data backup program, the method includes: The data to be backed up is backed up using a preset backup strategy to obtain the backup data. Determine the estimated data recovery frequency of the backup data, and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data; Based on the estimated data recovery frequency, a backup snapshot corresponding to the backup data is generated to determine the mapping between the backup data and the backup snapshot; Data recovery is performed based on the mapping between the backup data and the backup snapshot; The step of determining the estimated data recovery frequency of the backup data and determining the storage location of the backup data based on the estimated data recovery frequency to store the backup data includes: Determine the data type and data level of the backup data in order to determine the estimated data recovery frequency of the backup data; Obtain the mapping relationship between the preset data recovery frequency and the data storage location; Based on the mapping relationship between the preset data recovery frequency and the data storage location, and the estimated data recovery frequency, the storage location of the backup data is determined to store the backup data.
2. The data backup and recovery method according to claim 1, characterized in that, The backup of the data to be backed up using a preset backup strategy includes the following: Obtain the preset backup strategy; According to the preset backup strategy, the data to be backed up is periodically backed up in full according to the preset backup cycle; According to the preset backup strategy, incremental backups are performed on the data to be backed up within the time period corresponding to the preset backup cycle. The backup data includes full backup data and incremental backup data.
3. The data backup and recovery method according to claim 1, characterized in that, Determining the data type and data level of the backup data, and determining the estimated data recovery frequency of the data to be backed up, includes: Obtain the preset data recovery frequency prediction model; The data type and data level of the backup data are input into the data recovery frequency prediction model to determine the estimated data recovery frequency of the backup data.
4. The data backup and recovery method according to claim 3, characterized in that, The method for obtaining the preset data recovery frequency prediction model includes: Obtain the training data type, training data level, and training data recovery frequency of the training backup data; The training data type and the training data level are input into the initial data recovery frequency prediction model to obtain the predicted training data recovery frequency corresponding to the training backup data; The loss value between the training data recovery frequency and the estimated training data recovery frequency is calculated using a preset loss function; The parameters in the initial data recovery frequency prediction model are adjusted according to the loss value until the loss value meets the preset loss value condition, thus obtaining the data recovery frequency prediction model.
5. The data backup and recovery method according to claim 1, characterized in that, Determining the data type and data level of the backup data, and determining the estimated data recovery frequency of the backup data, includes: Obtain historical backup data and its corresponding historical data recovery frequency; Determine the historical data type and historical data level of the historical backup data; Clustering is performed on the historical data type and historical data level of the historical backup data, and on the data type and data level of the backup data, to obtain multiple clusters; Determine the cluster in which the backup data belongs, and then determine the estimated data recovery frequency of the backup data based on the historical data recovery frequency.
6. The data backup and recovery method according to claim 1, characterized in that, The data recovery based on the mapping between the backup data and the backup snapshot includes: Obtain and parse data recovery instructions to determine the backup snapshot and host information of the host that needs data recovery; Based on the mapping between the backup data and the backup snapshot, the backup snapshot determines the data to be recovered that needs to be recovered. Determine the data recovery strategy for the host based on the host information; Data recovery is performed on the host according to the data recovery strategy and the data to be recovered.
7. A data backup and recovery device, characterized in that, include: The data backup module is used to back up the data to be backed up using a preset backup strategy, thereby obtaining the backup data. A storage location determination module is used to determine the estimated data recovery frequency of the backup data, and determine the storage location of the backup data based on the estimated data recovery frequency, so as to store the backup data; The backup snapshot generation module is used to generate a backup snapshot corresponding to the backup data based on the estimated data recovery frequency, so as to determine the mapping between the backup data and the backup snapshot; The data recovery module is used to perform data recovery based on the mapping between the backup data and the backup snapshot; The step of determining the estimated data recovery frequency of the backup data and determining the storage location of the backup data based on the estimated data recovery frequency to store the backup data includes: Determine the data type and data level of the backup data in order to determine the estimated data recovery frequency of the backup data; Obtain the mapping relationship between the preset data recovery frequency and the data storage location; Based on the mapping relationship between the preset data recovery frequency and the data storage location, and the estimated data recovery frequency, the storage location of the backup data is determined to store the backup data.
8. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps in the data backup as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps in the data backup and recovery method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data storage backup method and system, electronic equipment and storage medium
CN118193292A
Data backup recovery method and device based on data merging
CN119292828A