Method, apparatus and computer program product for data recovery

By generating data recycling information rather than valid data blocks, the impact of junk data recycling on local storage performance is solved, and efficient data synchronization and recycling process is achieved.

CN120386742APending Publication Date: 2025-07-29DELL PROD LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410114405.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In data storage services, the prior art needs to copy a large number of valid data blocks to the remote storage site when performing spam data recycling, resulting in an impact on the storage performance and other tasks of the local data storage site.

Method used

By generating data recycling information at the local storage site, rather than valid data blocks, data recycling is synchronized to the remote storage site. The remote site performs data recycling based on the information, and performs data recycling at the local site after receiving the completion response.

Benefits of technology

It significantly reduces the amount of data sent by local data storage sites to remote sites, improves the execution efficiency of data recovery, and avoids the impact on local storage performance and other tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386742A_ABST
    Figure CN120386742A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method and equipment for data recovery and a computer program product. The method includes generating data recovery information based on a source data block and a target data block in a local data site. The method further includes sending data recovery information to the remote data site, data recovery of the remote data site being performed based on the data recovery information. Further, the method includes performing data recovery in the local data site based on the source data block and the target data block in response to receiving a recovery completion response from the remote data site. Therefore, in the scheme of the embodiment of the invention, the size of the data recovery information is far smaller than that of the effective data block, so that the data volume sent to other remote data sites by the local data site can be obviously reduced, and the execution efficiency of data recovery is improved; and meanwhile, the influence of data recovery on the storage performance of the local data site and other tasks is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computers, and more particularly, to methods, devices, and computer program products for data recovery. Background Art

[0002] Geo replication plays an important role in data storage services, improving service availability and resilience and effectively addressing regional failures. By replicating data geographically, copies of data can be maintained in different geographical regions. This redundancy enables the copies in other regions to remain available even when a failure occurs in one region, thus ensuring the continuous operation of the system.

[0003] In data storage services, garbage collection is also very important. Recycling garbage data can free up unused garbage data, thereby releasing storage space, improving the efficiency of read and write operations of the storage service, and garbage collection tasks help to maximize the utilization of storage resources, reduce unnecessary space waste, and thus ensure the stable and efficient operation of the storage service. Summary of the Invention

[0004] Embodiments of the present disclosure provide a method, a device, and a computer program product for data recovery.

[0005] In one aspect of the present disclosure, a method for data recovery is provided. The method includes generating data recovery information based on source data blocks and target data blocks in a local data site. The method further includes sending the data recovery information to a remote data site, wherein data recovery at the remote data site is performed based on the data recovery information. Additionally, the method further includes, in response to receiving a recovery completion response from the remote data site, performing data recovery in the local data site based on the source data blocks and the target data blocks.

[0006] In another aspect of the present disclosure, an electronic device is provided. The device includes a processing unit and a memory, wherein the memory is coupled to the processing unit and stores instructions. When the instructions are executed by the processing unit, the following operations are performed: generating data recovery information based on source data blocks and target data blocks in a local data site; sending the data recovery information to a remote data site, wherein data recovery at the remote data site is performed based on the data recovery information; and in response to receiving a recovery completion response from the remote data site, performing data recovery in the local data site based on the source data blocks and the target data blocks.

[0007] In another aspect of the present disclosure, there is provided a computer program product. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions that, when executed, cause a computer to perform a method or process according to an embodiment of the present disclosure.

[0008] The Summary of the Invention section is provided to introduce a selection of concepts in a simplified form that will be further described in the Detailed Description below. The Summary of the Invention section is not intended to identify key features or essential features of the present disclosure, nor is it intended to limit the scope of the various embodiments of the present disclosure. Brief Description of the Drawings

[0009] By describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent, where in the exemplary embodiments of the present disclosure, the same reference numerals generally represent the same elements.

[0010] Figure 1 A schematic diagram showing an exemplary environment of a storage system according to an embodiment of the present disclosure;

[0011] Figure 2 A flowchart showing a method for data recovery according to the present disclosure;

[0012] Figure 3A A schematic diagram showing the relationship between data blocks and objects at a data storage site according to an embodiment of the present disclosure;

[0013] Figure 3B A schematic diagram showing a process of partial garbage collection according to an embodiment of the present disclosure;

[0014] Figure 4A A schematic diagram showing the content of data recovery information according to an embodiment of the present disclosure;

[0015] Figure 4B A schematic diagram showing a process of data synchronization according to an embodiment of the present disclosure;

[0016] Figure 5 A schematic diagram showing a process of data recovery according to an embodiment of the present disclosure; and

[0017] Figure 6 A schematic block diagram of a device that can be used to implement the embodiments of the present disclosure. Detailed Description

[0018] Preferred embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. Although some specific embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0019] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless clearly indicated otherwise.

[0020] As mentioned above, garbage data recovery is very important for data storage services. In addition, data storage services often have multiple data storage sites, and changes in the local storage site need to be synchronized with multiple remote storage sites. Similarly, when performing garbage data recovery in the local data storage site, the data stored in the data blocks of the local storage site will be changed, so it also needs to be synchronized with multiple remote data storage sites. In the following description, garbage data recovery may be referred to as data recovery.

[0021] In the related art of data synchronization during data recovery, the valid data blocks obtained after the recovery is completed are usually copied to other remote data storage sites. Since the valid data blocks occupy a large amount of memory and need to be copied to many remote storage sites, and there are often many garbage collection tasks running in the local storage service, the above factors will cause the local data storage site to synchronize a large number of data blocks to many remote data storage sites, which will affect the storage performance of the local data storage site, block the garbage collection tasks, and even affect other tasks.

[0022] To this end, an embodiment of the present disclosure proposes a solution for data recovery. When performing garbage data recovery in the local storage site, data recovery information instead of valid data blocks is sent to other remote data storage sites to synchronize the source data blocks and target data blocks involved in the data recovery to other remote storage sites. Other remote storage sites will perform data recovery according to the data recovery information and notify the local storage site after the execution is completed. The local data storage site performs data recovery after receiving the completion response from other remote data storage sites.

[0023] Thus, in the data recovery solution proposed in the embodiments of the present disclosure, since the size of the data recovery information is much smaller than the valid data blocks, the amount of data sent by the local data storage site to other remote data storage sites can be significantly reduced, thereby improving the execution efficiency of data recovery, and at the same time avoiding affecting the storage performance of the local data storage site and other tasks.

[0024] The following refers to Figures 1 to 6 to illustrate the basic principles and several exemplary implementation manners of the present disclosure. It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and then implement the embodiments of the present disclosure, rather than limiting the scope of the present disclosure in any way.

[0025] Figure 1 FIG. shows a schematic diagram of an exemplary environment 100 of a storage system according to an embodiment of the present disclosure. The exemplary environment 100 shows a local data storage site 110-1 (hereinafter referred to as the local site), remote data storage sites 110-2 and 110-3 (hereinafter referred to as remote sites). It should be understood that only two remote sites are shown here as examples, and actually there may be fewer or more remote sites. As Figure 1 shown, the local site 110-1 includes local data 120-1, and the local data 120-1 includes source data blocks 130-1, 140-1, 150-1 and a target data block 160-1. It should be understood that three source data blocks are shown here as examples, and actually there may be fewer or more source data blocks. When the local site 110-1 performs data recovery, it can determine that the valid data 1301-1 in the source data block 130-1 needs to be retained, and the other part of the data is garbage data. It should be understood that only one valid data is shown on each source data block here as an example, and actually there may be more valid data on each source data block, or there may be more position ranges of valid data. The present disclosure does not limit this.

[0026] Similarly, the local site 110-1 can determine that the valid data 1401-1 in the source data block 140-1 and the valid data 1501-1 in the source data block 150-1 need to be retained, and can merge this valid data into the target data block 160. Since the target data block 160 stores valid data, it can be regarded as a valid data block. It can be understood that the size of the target data block 160 is usually relatively large (for example, 128 MB). Therefore, if the target data block 160 is directly copied to the remote site, it will consume a lot of storage resources and network resources, etc. In addition, the controller 170-1 in the local site 110-1 can generate reclaim information 180 (for example, with a size of 1495 bytes) based on these source data blocks and the target data block 160-1. The reclaim information 180 can record the location information of the valid data in the source data block and the target data block 160-1 to which the valid data is to be merged. The controller 170-1 can send the reclaim information 180 to the remote sites 110-2 and 110-3.

[0027] As Figure 1 shown, after receiving the reclaim information 180, the remote site 110-2 can perform data reclaim (i.e., garbage collection task) based on the reclaim information 180. For example, the controller 170-2 in the remote site 110-2 can determine the source data block 130-2, the source data block 140-2, and the source data block 150-2 according to the reclaim information 180, and determine the valid data 1301-2, the valid data 1401-2, and the valid data 1501-2, and then merge the valid data into the target data block 160-2. Since the remote data 120-2 in the remote site 110-2 is the backup data of the local data 120-1 in the local site 110-1, data reclaim can be completed based on the reclaim information 180. That is to say, the target data block 160-2 can be generated according to the reclaim information 180, and it does not need to directly receive the target data block 160-1 from the local site 110-1 for backup, which can ensure data consistency between the remote data 120-2 and the local data 120-1. Similarly, after receiving the reclaim information 180, the remote site 110-3 can perform data reclaim according to the reclaim information 180. For example, the controller 170-3 in the remote site 110-3 can determine the source data block 130-3, the source data block 140-3, and the source data block 150-3 according to the reclaim information 180, and determine the valid data 1301-3, the valid data 1401-3, and the valid data 1501-3, and then merge the valid data into the target data block 160-3.

[0028] Continue to refer to Figure 1, after the remote site 110-2 completes data recovery, a completion response 190-1 can be generated and sent to the controller 170-1. In addition, after the remote site 110-3 completes data recovery, a completion response 190-2 can be generated and sent to the controller 170-1. When the controller 170-1 in the local site 110-1 receives the completion responses sent by all remote sites, data recovery can be performed in the local site 110-1, that is, the valid data 1301-1, the valid data 1401-1, and the valid data 1501-1 are merged into the target data block 160-1, thereby completing data recovery and releasing the source data block.

[0029] Figure 2 A flowchart of a method 200 for data recovery according to the present disclosure is shown. Refer to Figure 2 , at block 202, data recovery information can be generated based on source data blocks and target data blocks in a local data site. For example, refer to Figure 1 , the controller 170-1 in the local site 110-1 can generate recovery information 180 based on the source data block 130-1, the source data block 140-1, the source data block 150-1, and the target data block 160-1.

[0030] At block 204, the data recovery information can be sent to a remote data site, and data recovery at the remote data site is performed based on the data recovery information. For example, refer to Figure 1 , the controller 170-1 in the local site 110-1 can send the recovery information 180 to the remote site 110-2, and data recovery at the remote site 110-2 can be performed based on the recovery information. In addition, the controller 170-1 in the local site 110-1 can send the recovery information 180 to the remote site 110-4, and data recovery at the remote site 110-3 can be performed based on the recovery information.

[0031] At block 206, in response to receiving a recovery completion response from the remote data site, data recovery can be performed in the local data site based on the source data block and the target data block. For example, refer to Figure 1 , the controller 170-1 in the local site 110-1 can, in response to receiving the completion response 190-1 from the remote site 110-2 and the completion response 190-2 from the remote site 110-3, perform data recovery based on the source data block 130-1, the source data block 140-1, the source data block 150-1, and the target data block 160-1.

[0032] Thus, in the method 200 according to an embodiment of the present disclosure, since the size of the recycled information is much smaller than the valid data block, it is possible to significantly reduce the amount of data sent from the local data storage site to other remote data storage sites during the data synchronization of the garbage collection task, thereby improving the efficiency of the garbage collection task and avoiding affecting the storage performance of the local data storage site and other program tasks.

[0033] Figure 3A FIG. 300A shows a schematic diagram of the relationship between data blocks and objects of a data storage site according to an embodiment of the present disclosure. As Figure 3A shown, in the storage site, data is written in the form of data blocks, such as data block 308, data block 310, and data block 312. In some embodiments, data block 308, data block 310, and data block 312 may be containers for a 128 MB logical space. The storage site may support replication between geographical sites to increase availability and resilience by preventing site-wide failures, for example, it may support replication between a local site and a remote site. Each data block in the data storage site may hold data from different objects. For example, data block 308, data block 310, and data block 312 may hold data from objects 302, 304, and 306, and the corresponding relationship may be referred to the dashed lines shown in Figure 3A . When objects 302, 304, and 306 are updated or deleted, the data in the data block that is no longer referenced is called garbage data.

[0034] In some embodiments, the space can be reclaimed by using a full garbage collection method. The full garbage collection can recycle the entire data block, that is, when all the data in the entire data block is marked as garbage data, a recycling operation is performed to release the memory space of the data block. For example, when all the data in data block 308 is garbage data, a full recycling operation is performed on data block 308 to release the memory space of data block 308.

[0035] In some embodiments, the space can be reclaimed by using a partial garbage collection method. The partial garbage collection can detect the proportion of garbage data in the source data block. When the garbage data occupies a certain proportion of the source data block (for example, 2 / 3 or more than 66.67%), the partial garbage collection can be started to merge the valid data part in the source data block into the target data block, thereby releasing the memory space of the source data block. For example, when a certain proportion of the data in data block 308 is garbage data, a partial recycling operation can be performed on data block 308 to merge the valid data part in data block 308 into the target data block, thereby releasing the memory space of data block 308.

[0036] Figure 3BFIG. 300B shows a schematic diagram of a partial garbage collection process according to an embodiment of the present disclosure. As Figure 3B shown, the valid data 314-1 in the source data block 314 can be moved to the target data block 320, and the garbage data 314-2 in the source data block 314 can be removed to recycle and release the storage space of the source data block 314. In some embodiments, performing data recycling at the local data site may include obtaining valid data from the source data block; and merging the valid data into the target data block. In some embodiments, performing data recycling at the local data site may further include recycling the storage space of the source data block in response to the valid data being merged into the target data block.

[0037] Similarly, the valid data 316-2 in the source data block 316 can be moved to the target data block 320, and the garbage data 316-1 and garbage data 316-3 in the source data block 316 can be removed to release the storage space of the source data block 316; the valid data 318-2 in the source data block 318 is moved to the target data block 320, and the garbage data 318-1 in the source data block 314 can be removed to release the storage space of the source data block 318. Since the target data block 320 is generated in the data storage node, it is necessary to copy the target data block to other data storage sites.

[0038] Figure 4A FIG. 400A shows a schematic diagram of the content of data recycling information according to an embodiment of the present disclosure. As Figure 4A shown, the data recycling information 402 may include a task identifier 404, and the task identifier 404 can be used to identify which data recycling task this data recycling information 402 belongs to. For example, multiple data recycling tasks can be run simultaneously at the local site, so a task identifier in the data recycling information 402 is required to identify the data recycling task. The data recycling information 402 may include a target identifier 406, and the target identifier 406 can indicate which target data block (e.g., Figure 3B the target data block 320 in) the valid data is merged into.

[0039] The data recovery information 402 may include valid locations 406, and the valid locations 406 may include valid ranges 408, 410, and 412. Each of the multiple valid ranges corresponds to a source identifier of a source data block. For example, the valid range 408 corresponds to the source identifier 416, the valid range 410 corresponds to the source identifier 418, and the valid range 412 corresponds to the source identifier 420. It should be understood that three valid ranges and source data blocks are shown here for illustrative purposes only, and other embodiments of the present disclosure may include fewer or more valid ranges and source data blocks. In some embodiments, generating the data recovery information may include obtaining the data location of the valid data in the source data block; and generating the data recovery information based on the data location, the source identifier, and the target identifier, where the source identifier is the identifier of the source data block and the target identifier is the identifier of the target data block.

[0040] Each source identifier may include multiple physical ranges. For example, the source identifier 416 may include physical ranges 416-1 to 416-4, the source identifier 418 may include physical ranges 418-1 to 418-2, and the source identifier 420 may include physical ranges 420-1 to 420-3. For example, the physical ranges 416-1 to 416-4 may indicate that the data in four ranges on the source data block corresponding to the source identifier 416 is valid data, and these valid data may be merged into the target data block corresponding to the target identifier 406. In addition, the data recovery information 402 may further include a local site identifier 408 to notify the remote site from which data storage site the data recovery information comes. It should be understood that the content of the recovery information shown here is for illustrative purposes only, and the embodiments of the present disclosure do not limit the content of the recovery information.

[0041] Figure 4B A schematic diagram of a data synchronization process 400B according to an embodiment of the present disclosure is shown. As Figure 4B shown, the local site 430 includes source data blocks 432, 434, and 436. The data in the remote site 440 is consistent with the data in the local site 430, that is, the data in the source data blocks 442, 444, and 446 is consistent with the source data blocks 432, 434, and 436 included in the local site 430. That is to say, these data blocks have been synchronized previously. Therefore, when it is necessary to synchronize the target data block 438, instead of directly synchronizing the data block 438 itself, the location of the valid data in the source data block can be obtained by using the data recovery information (for example, Figure 4A the data recovery information shown), and the valid data is merged into the target data block 448.

[0042] Figure 5A schematic diagram of a data recovery process 500 according to an embodiment of the present disclosure is shown. As Figure 5 shown, at block 502, a data recovery task can be started. At block 504, data recovery information can be generated. For example, data recovery information as shown in Figure 4A can be generated, which can indicate the local site, the target data block, the recovery task identifier, the location of valid data, and so on. At block 506, data recovery can be performed at the remote site according to the data recovery information. At block 508, a target data block can be generated. For example, as shown in Figure 4B the valid data can be obtained according to the location of the valid data indicated in the data recovery information, and these valid data can be merged into the target data block, thereby releasing the storage space of the source data block. At block 510, a completion response can be generated and sent to the local site. For example, the completion response can be used to notify the local site that the data recovery at the remote site has been completed. At block 512, verification data can be generated. For example, a hash value of the target data block can be generated as the verification data, and the verification data can be sent to the local site. In some embodiments, verification data can be received from a remote data site; and based on the verification data, the consistency between the local data site and the remote data site can be determined.

[0043] At block 514, the target data block can be updated. For example, after the local site receives the completion responses from all remote sites, the target data block can be updated at the local site. At block 516, the consistency of the target data block can be verified. Since the target data block at the remote site is not directly obtained from the target data block at the local site, verification is required to ensure data consistency. For example, a hash value of the target data block at the local site can be generated and compared with the hash value from the remote site to determine the consistency of the target data block. In some embodiments, when the verification data is a hash value, determining the consistency between the local data site and the remote data site includes generating a target hash value based on the target data block in the local data site; and determining the consistency between the local data site and the remote data site based on the target hash value and the verification data.

[0044] Figure 6 A schematic block diagram of a device 600 that can be used to implement an embodiment of the present disclosure is shown. The device 600 can be the device or apparatus described in the embodiment of the present disclosure. As Figure 6As shown, device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or computer program instructions loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0045] Multiple components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0046] Each of the methods or processes described above can be executed by the processing unit 601. For example, in some embodiments, the method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more steps or actions of the methods or processes described above can be performed.

[0047] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product can include a computer-readable storage medium having thereon computer-readable program instructions for performing various aspects of the present disclosure.

[0048] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium used herein is not construed as an instantaneous signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0049] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0050] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages and conventional procedural programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN)-or, alternatively, may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.

[0051] These computer - readable program instructions can be provided to a processing unit of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that, when the instructions are executed by the processing unit of the computer or other programmable data - processing apparatus, a means is produced for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, and the instructions cause a computer, a programmable data - processing apparatus, and / or other devices to work in a particular manner, so that the computer - readable medium storing the instructions includes a manufactured article that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0052] The computer - readable program instructions can be loaded onto a computer, other programmable data - processing apparatus, or other devices so that a series of operational steps are performed on the computer, other programmable data - processing apparatus, or other devices to produce a computer - implemented process, and thus the instructions executed on the computer, other programmable data - processing apparatus, or other devices implement the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0053] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0054] The embodiments of the present disclosure have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the market, or to enable other ordinary skill in the art in the technical field to understand the embodiments disclosed herein.

Claims

1. A method for data recovery, comprising: Generating data recovery information based on source data blocks and target data blocks in a local data site; Sending the data recovery information to a remote data site, wherein data recovery at the remote data site is performed based on the data recovery information; And In response to receiving a recovery completion response from the remote data site, performing data recovery in the local data site based on the source data blocks and the target data blocks.

2. The method according to claim 1, wherein generating the data recovery information comprises: Obtaining the data positions of valid data in the source data blocks; And Generating the data recovery information based on the data positions, source identifiers, and target identifiers, wherein the source identifier is an identifier of the source data block and the target identifier is an identifier of the target data block.

3. The method according to claim 2, wherein the data recovery information is used by the remote data site to obtain the data positions, the source identifiers, and the target identifiers, and the data recovery is performed at the remote data site based on the data positions, the source identifiers, and the target identifiers.

4. The method according to claim 3, wherein the data positions are used to obtain remote valid data from the data positions of the remote source data blocks corresponding to the source identifiers, and the target identifiers are used to merge the remote valid data into the remote target data blocks corresponding to the target identifiers.

5. The method according to claim 1, wherein performing the data recovery in the local data site comprises: Obtaining valid data from the source data blocks; And Merging the valid data into the target data blocks.

6. The method according to claim 5, further comprising: Recycling the storage space of the source data blocks in response to the valid data being merged into the target data blocks.

7. The method according to claim 1, further comprising: Receiving verification data from the remote data site; And Determining the consistency between the local data site and the remote data site based on the verification data.

8. The method according to claim 7, wherein the verification data is a hash value, and wherein determining the consistency between the local data site and the remote data site comprises: Generating a target hash value based on the target data blocks in the local data site; And Determining the consistency between the local data site and the remote data site based on the target hash value and the verification data.

9. An electronic device, comprising: A processing unit; And A memory coupled to the processing unit and storing instructions that, when executed by the processing unit, perform the following actions: Generating data recovery information based on source data blocks and target data blocks in a local data site; Sending the data recovery information to a remote data site, wherein data recovery at the remote data site is performed based on the data recovery information; And In response to receiving a recovery completion response from the remote data site, perform data recovery in the local data site based on the source data block and the target data block.

10. The electronic device according to claim 9, wherein generating the data recovery information includes: Obtain the data position of valid data in the source data block; And Based on the data position, source identifier, and target identifier, generate the data recovery information, where the source identifier is the identifier of the source data block and the target identifier is the identifier of the target data block.

11. The electronic device according to claim 10, wherein the data recovery information is used by the remote data site to obtain the data position, the source identifier, and the target identifier, and the data recovery is performed at the remote data site based on the data position, the source identifier, and the target identifier.

12. The electronic device according to claim 11, wherein the data position is used to obtain remote valid data from the data position of the remote source data block corresponding to the source identifier, and the target identifier is used to merge the remote valid data into the remote target data block corresponding to the target identifier.

13. The electronic device according to claim 9, wherein performing the data recovery in the local data site includes: Obtain valid data from the source data block; And Merge the valid data into the target data block.

14. The electronic device according to claim 13, the action further includes: In response to the valid data being merged into the target data block, reclaim the storage space of the source data block.

15. The electronic device according to claim 9, the action further includes: Receive verification data from the remote data site; And Based on the verification data, determine the consistency between the local data site and the remote data site.

16. The electronic device according to claim 15, wherein the verification data is a hash value, and wherein determining the consistency between the local data site and the remote data site includes: Generate a target hash value based on the target data block in the local data site; And Based on the target hash value and the verification data, determine the consistency between the local data site and the remote data site.

17. A computer program product, the computer program product being tangibly stored on a non - volatile computer - readable medium and including machine - executable instructions that, when executed, cause the machine to perform the following actions: Generate data recovery information based on a source data block and a target data block in a local data site; Send the data recovery information to a remote data site, where the data recovery at the remote data site is performed based on the data recovery information; and In response to receiving a recovery completion response from the remote data site, perform data recovery in the local data site based on the source data block and the target data block.

18. The computer program product according to claim 17, wherein generating the data recovery information includes: Obtain the data position of the valid data in the source data block; and Generate the data recovery information based on the data position, the source identifier, and the target identifier, where the source identifier is the identifier of the source data block and the target identifier is the identifier of the target data block.

19. The computer program product according to claim 18, wherein the data recovery information is used by a remote data site to obtain the data position, the source identifier, and the target identifier, and the data recovery is performed at the remote data site based on the data position, the source identifier, and the target identifier.

20. The computer program product according to claim 19, wherein the data position is used to obtain remote valid data from the data position of the remote source data block corresponding to the source identifier, and the target identifier is used to merge the remote valid data into the remote target data block corresponding to the target identifier.