Data backup method and device, computer equipment and storage medium

By fingerprint matching and segmenting the data slices, filtering and backing up sub-slicing of non-target slices, the problem of traditional data backup is solved and more efficient data backup and recovery is achieved.

CN119576646APending Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411665518.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Traditional data backup methods are inefficient and cannot effectively deal with the unforeseen risks of data in business systems.

Method used

By acquiring and segmenting data slices, determining the slice fingerprint and reference fingerprint, filtering the target slice and non-target slices, and segmenting when the non-target slices reach a certain data amount threshold, further filtering and backing up the data content and metadata of the sub-slices.

Benefits of technology

It improves the efficiency of data backup, reduces the amount of backup data and transmission time, and enhances the security and reliability of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576646A_ABST
    Figure CN119576646A_ABST
Patent Text Reader

Abstract

The invention relates to a data backup method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring a plurality of data slices, determining respective slice fingerprints of the data slices and respective reference fingerprints of a plurality of backed-up slices, determining a target slice of which the slice fingerprint is matched with any reference fingerprint and non-target slices except the target slice from the data slices, and under the condition that the data volume of the non-target slice is greater than a data volume threshold value, segmenting the non-target slice to obtain a plurality of sub-slices, and determining a target sub-slice matched with any reference fingerprint and non-target sub-slices except the target sub-slice from the sub-slices. According to the data backup method and device, the data content and the metadata of the non-target sub-slices are backed up, the metadata of the target sub-slices and the metadata of the target slices are backed up, the data volume of data backup is reduced, the data transmission duration is shortened, and the data backup efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a data backup method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the rapid development of the digital economy and digital society, cutting-edge technologies such as big data continue to prosper, and people's work and life are increasingly dependent on diversified business systems. In these systems, data has become an indispensable core asset of enterprises and organizations. However, business systems face various unforeseen risks during operation, such as hardware failure, ransomware attacks, human error in deleting data, and natural disasters. In order to effectively resist these threats and ensure data security, data backup has become a vital strategy.

[0003] In traditional technology, customized backup strategies are set to regularly back up all data in the business system to the cloud. Although this ensures data security to a certain extent, it also brings about the problem of low backup efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a data backup method, apparatus, computer device, computer-readable storage medium and computer program product that can improve backup efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a data backup method. The method comprises:

[0006] Acquire multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices; determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and a non-target slice other than the target slice; if the data volume of the non-target slice is greater than a data volume threshold, split the non-target slice to obtain multiple sub-slices; determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and a non-target sub-slice other than the target sub-slice; back up the data content and metadata of the non-target sub-slice, and back up the target sub-slice and the metadata of the target slice.

[0007] In one of the embodiments, the non-target slice is segmented to obtain a plurality of sub-slices, including: obtaining a slice window parameter and a preset segmentation condition; segmenting the non-target slice according to the slice window parameter to obtain a plurality of segmented slices; and in each of the segmented slices, screening a plurality of sub-slices that meet the preset segmentation condition.

[0008] In one of the embodiments, the slice window parameters include a slice window size and a slice window direction; the non-target slice is divided according to the slice window parameters to obtain a plurality of divided slices, including: determining the last data block in the slice window direction among the plurality of data blocks contained in the non-target slice as a non-target data block; for each target data block in the non-target slice except the non-target data block, the non-target slice is divided with the target data block as a division starting point, the slice window size as a division length, and the slice window direction as a division direction to obtain divided slices containing the target data block.

[0009] In one of the embodiments, the metadata includes an index, and the method further includes: determining that the metadata of the target sub-slice corresponds to the first data content of each of the backed-up slices; determining that the metadata of the target slice corresponds to the second data content of each of the backed-up slices; and constructing a data snapshot based on the metadata of the target sub-slice, the first data content, the metadata of the target slice, the second data content, and the metadata and data content of the non-target sub-slices.

[0010] In one of the embodiments, the method further includes: obtaining the snapshot generation time of each of a plurality of historical data snapshots, and a snapshot recovery period configured for each of the historical data snapshots; in each of the historical data snapshots, screening a target data snapshot whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period; and deleting the snapshot slice if the snapshot slice in the target data snapshot satisfies the slice recovery condition.

[0011] In one of the embodiments, when the snapshot slice in the target data snapshot meets the slice recycling condition, the snapshot slice is deleted, including: determining the first number of times the slice fingerprint of the snapshot slice is referenced in each of the historical data snapshots, and the second number of times the slice fingerprint of the snapshot slice is referenced in the real-time data snapshot; when the first number of times and the second number of times are both zero, the snapshot slice is deleted.

[0012] In a second aspect, the present application also provides a data backup device. The device comprises:

[0013] An acquisition module is used to acquire multiple data slices, determine the slice fingerprint of each of the data slices, and the reference fingerprint of each of the multiple backed-up slices; a slice determination module is used to determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and a non-target slice other than the target slice; a sub-slice determination module is used to divide the non-target slice into multiple sub-slices when the data volume of the non-target slice is greater than a data volume threshold; a processing module is used to determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and a non-target sub-slice other than the target sub-slice; a backup module is used to back up the data content and metadata of the non-target sub-slice, and back up the target sub-slice and the metadata of the target slice.

[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0015] Acquire multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices; determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and a non-target slice other than the target slice; if the data volume of the non-target slice is greater than a data volume threshold, split the non-target slice to obtain multiple sub-slices; determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and a non-target sub-slice other than the target sub-slice; back up the data content and metadata of the non-target sub-slice, and back up the target sub-slice and the metadata of the target slice.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0017] Acquire multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices; determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and a non-target slice other than the target slice; if the data volume of the non-target slice is greater than a data volume threshold, split the non-target slice to obtain multiple sub-slices; determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and a non-target sub-slice other than the target sub-slice; back up the data content and metadata of the non-target sub-slice, and back up the target sub-slice and the metadata of the target slice.

[0018] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0019] Acquire multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices; determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and a non-target slice other than the target slice; if the data volume of the non-target slice is greater than a data volume threshold, split the non-target slice to obtain multiple sub-slices; determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and a non-target sub-slice other than the target sub-slice; back up the data content and metadata of the non-target sub-slice, and back up the target sub-slice and the metadata of the target slice.

[0020] The above-mentioned data backup method, device, computer equipment, storage medium and computer program product obtain multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices, and determine the target slice whose slice fingerprint matches any reference fingerprint and the non-target slice other than the target slice from each data slice, and screen each data slice to obtain the non-target slice, so as to provide a basis for the subsequent processing of the non-target slice. When the data volume of the non-target slice is greater than the data volume threshold, the non-target slice is divided to obtain multiple sub-slices, and the target sub-slice matching any reference fingerprint and the non-target sub-slice other than the target sub-slice are determined from each sub-slice, and each sub-slice is screened to obtain the non-target sub-slice, so as to provide a basis for the subsequent data backup. The above-mentioned method is used to back up the data content and metadata of the non-target sub-slice, and to back up the target sub-slice and the metadata of the target slice, thereby reducing the data volume of the data backup, reducing the data transmission time, and improving the data backup efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 An application environment diagram of a data backup method in an embodiment;

[0022] Figure 2 A schematic diagram of a data backup method in one embodiment;

[0023] Figure 3 A schematic diagram of a process of a file incremental backup method based on fingerprint secondary deduplication in one embodiment;

[0024] Figure 4 A schematic diagram of identifying a file change fingerprint segment based on a CDC algorithm in one embodiment;

[0025] Figure 5 A schematic diagram of a fingerprint library metadata and slice data management method in one embodiment;

[0026] Figure 6 A schematic diagram of changing the secondary slicing of fingerprint segment data in one embodiment;

[0027] Figure 7 It is a flowchart of a method for incremental backup of double-slice fingerprint-deduplicated files in one embodiment;

[0028] Figure 8 An incremental backup data organizational structure diagram in one embodiment;

[0029] Fig. 9 is a structural block diagram of a data backup device in one embodiment;

[0030] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] The data backup method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0033] The terminal 102 can obtain multiple data slices, determine the slice fingerprint of each data slice, and the reference fingerprint of each of the multiple backed-up slices. The terminal 102 can determine the target slice whose slice fingerprint matches any reference fingerprint and the non-target slice other than the target slice from each data slice. The terminal 102 can divide the non-target slice into multiple sub-slices when the data volume of the non-target slice is greater than the data volume threshold. The terminal 102 can determine the target sub-slice that matches any reference fingerprint and the non-target sub-slice other than the target sub-slice from each sub-slice. The terminal 102 can back up the data content and metadata of the non-target sub-slice, back up the target sub-slice and the metadata of the target slice, and back up the data to the server 104.

[0034] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0035] In one embodiment, Figure 2 As shown, a data backup method is provided, which is applied to Figure 1 The terminal 102 in FIG. 1 is used as an example for explanation, including:

[0036] S202, obtaining a plurality of data slices, determining a slice fingerprint of each data slice, and a reference fingerprint of each of a plurality of backed-up slices.

[0037] Data slicing can refer to a data set obtained by slicing data. Specifically, in data analysis, slicing data refers to dividing a large data set according to specific dimensions or indicators to facilitate a deeper analysis of data characteristics and patterns. For example, data can be sliced ​​by time, geographic location, customer, and other dimensions to obtain a data set.

[0038] The slice fingerprint may represent a specific identifier of the data slice. The slice fingerprint may be a data feature of the data slice. For example, the slice fingerprint may include a hash value or a hash calculation value of the data slice. The hash value may represent a value obtained by performing a hash operation Hash on the data slice. The hash calculation value may represent a value obtained by performing a hash operation MD5 on the data slice. The slice fingerprint and the data slice may be in a one-to-one correspondence.

[0039] The backup slice may represent a data slice pre-stored in a backup database. Specifically, the backup slice may be stored in a backup database in a server.

[0040] The reference fingerprint may represent a specific identifier of the backup slice. The reference fingerprint may be a data feature of the backup slice. The reference fingerprint and the backup slice may be in a one-to-one correspondence.

[0041] There are many ways for a terminal to obtain data slices. Specifically, the terminal can directly obtain multiple data slices and slice fingerprints of each data slice in a memory.

[0042] In one embodiment, the terminal may slice the file to be backed up to obtain multiple data slices. The terminal may encrypt each data slice and determine a slice fingerprint of each data slice.

[0043] In one embodiment, the terminal may obtain a file slicing window parameter and a file partitioning condition. The terminal may partition the backup file according to the file slicing window parameter to obtain a plurality of file slices. The terminal may select a plurality of data slices that meet the file partitioning condition in each file slice.

[0044] In one embodiment, the file slicing window parameters may include a file slicing window size and a file slicing window direction. Specifically, the terminal may determine the last data block to be backed up in the file slicing window direction among the multiple data blocks to be backed up contained in the file to be backed up as the file data block. The terminal may divide the file to be backed up into data slices containing the file data blocks, with the file data block as the division starting point, the file slicing window size as the division length, and the file slicing window direction as the division direction for each data block to be backed up except the file data block in the file to be backed up.

[0045] S204: Determine, from each data slice, a target slice whose slice fingerprint matches any reference fingerprint, and non-target slices other than the target slice.

[0046] The target slice may represent a data slice that matches any reference fingerprint. Specifically, the slice fingerprint of the target slice matches the reference fingerprint of a backed-up slice. It is understandable that the target slice may be considered as a backed-up slice.

[0047] The non-target slices may represent data slices other than the target slice among the data slices.

[0048] Specifically, the terminal can match the slice fingerprint of the data slice with each reference fingerprint for each data slice to obtain a fingerprint matching result of the slice fingerprint corresponding to each reference fingerprint. The terminal can screen target slices whose fingerprint matching results are matched and non-target slices whose fingerprint matching results are not matched in each data slice.

[0049] S206: When the data volume of the non-target slice is greater than the data volume threshold, the non-target slice is segmented to obtain a plurality of sub-slices.

[0050] The data volume of the non-target slice may represent the data set size of the corresponding data slice. The data volume of the non-target slice may also represent the data scale size corresponding to the non-target slice. The larger the data volume, the more hardware resources are consumed when storing, transmitting and processing the non-target slice. For example, the larger the storage space, the slower the transmission rate and the longer the processing time.

[0051] The data volume threshold may indicate a pre-configured data volume threshold.

[0052] A sub-slice may refer to a slice obtained by splitting a non-target slice.

[0053] The data volume threshold may be determined first. Specifically, the terminal may obtain the system processing capability. The terminal may determine the data volume threshold that matches the system processing capability. The data volume threshold is positively correlated with the system processing capability.

[0054] In one embodiment, the terminal may obtain the terminal processing capacity and the server processing capacity of the server, select the smaller target processing capacity between the terminal processing capacity and the server processing capacity, and determine a data volume threshold that matches the target processing capacity.

[0055] Specifically, when the data amount of the non-target slice is greater than the data amount threshold, the terminal may segment the non-target slice to obtain multiple sub-slices.

[0056] In one embodiment, the terminal may evenly divide the non-target slice into a plurality of sub-slices, wherein the difference between the data amounts of the sub-slices is less than a preset value.

[0057] In one embodiment, a slice window parameter and a preset partitioning condition are obtained. The terminal may partition the non-target slice according to the slice window parameter to obtain a plurality of partitioned slices. The terminal may select a plurality of sub-slices that meet the preset partitioning condition in each partitioned slice.

[0058] S208: Determine, from each sub-slice, a target sub-slice that matches any reference fingerprint and non-target sub-slices other than the target sub-slice.

[0059] The target sub-slice may represent a sub-slice that matches any reference fingerprint. Specifically, the slice fingerprint of the target sub-slice matches the reference fingerprint of a backed-up slice. It is understandable that the target sub-slice may be considered as a backed-up slice.

[0060] The non-target sub-slice may represent a sub-slice other than the target sub-slice among the sub-slices.

[0061] Specifically, the terminal can match the slice fingerprint of the sub-slice with each reference fingerprint for each sub-slice to obtain a fingerprint matching result of the slice fingerprint corresponding to each reference fingerprint. The terminal can screen target sub-slices with matching fingerprint matching results and non-target sub-slices with mismatching fingerprint matching results in each data slice.

[0062] S210, backing up data content and metadata of non-target sub-slices, and backing up metadata of target sub-slices and target slices.

[0063] The data content represents the specific full amount of data in the slice.

[0064] Metadata can represent attribute data in a slice, such as the name, size, modification time, and index number of a file or data.

[0065] For the same slice, the amount of data corresponding to the data content is greater than the amount of data corresponding to the metadata.

[0066] Backup can mean copying and transmitting data from the production center to the disaster recovery center and storing the data at the disaster recovery center.

[0067] Specifically, the terminal may back up the data content and metadata of the non-target sub-slices to the server. The terminal may back up the metadata of the target sub-slices and the target slices to the server.

[0068] In the above data backup method, multiple data slices are obtained, the slice fingerprint of each data slice and the reference fingerprint of each backed up slice are determined, and from each data slice, the target slice whose slice fingerprint matches any reference fingerprint and the non-target slice other than the target slice are determined, and each data slice is screened to obtain the non-target slice, providing a basis for subsequent processing of the non-target slice. When the data volume of the non-target slice is greater than the data volume threshold, the non-target slice is segmented to obtain multiple sub-slices, and from each sub-slice, the target sub-slice matching any reference fingerprint and the non-target sub-slice other than the target sub-slice are determined, and each sub-slice is screened to obtain the non-target sub-slice, providing a basis for subsequent data backup. By adopting the above method, the data content and metadata of the non-target sub-slice are backed up, and the target sub-slice and the metadata of the target slice are backed up, which reduces the data volume of the data backup, reduces the data transmission time, and improves the data backup efficiency.

[0069] In one embodiment, a non-target slice is segmented to obtain a plurality of sub-slices, including: obtaining a slice window parameter and a preset segmentation condition, segmenting the non-target slice according to the slice window parameter to obtain a plurality of segmented slices, and in each segmented slice, screening a plurality of sub-slices that meet the preset segmentation condition.

[0070] Among them, the slice window parameters can represent parameters applied to the slice division process.

[0071] The preset partitioning condition may represent a filtering condition configured for the slice partitioning result.

[0072] The slice window parameters may include at least one of a slice window size and a slice window direction.

[0073] The slice window size may indicate the amount of data that the slice window can accommodate, and the slice window direction may indicate the moving direction of the slice window in the non-target slice.

[0074] Specifically, the terminal may obtain a slice window size and a preset partitioning condition. The terminal may partition the non-target slice according to the slice window size to obtain multiple partitioned slices with the same or similar data volume. The terminal may screen multiple sub-slices that meet the preset partitioning condition in each partitioned slice. Among them, the sub-slice that meets the preset partitioning condition may be a slice fingerprint of the sub-slice that meets the slice boundary condition. That is, the sub-slice is at a preset boundary in the non-target slice.

[0075] The terminal may also obtain a slice window direction and a preset division condition. The terminal may randomly divide the non-target slice according to the slice window direction to obtain a plurality of divided slices. The terminal may select a plurality of sub-slices that meet the preset division condition in each divided slice. Among the plurality of sub-slices with the preset division condition, at least one sub-slice is simultaneously in the same preset boundary in the non-target slice.

[0076] The terminal may also obtain a slice window size, a slice window direction, and a preset division condition. The terminal may determine the last data block in the slice window direction among the multiple data blocks contained in the non-target slice as a non-target data block. The terminal may divide the non-target slice for each target data block other than the target data block in the non-target slice, using the target data block as the division starting point, the slice window size as the division length, and the slice window direction as the division direction, to obtain a divided slice containing the target data block. The terminal may screen multiple sub-slices that meet the preset division condition in each divided slice. Among them, the sub-slice that meets the preset division condition may be a sub-slice whose slice fingerprint meets the slice boundary condition.

[0077] In this embodiment, slice window parameters and preset division conditions are obtained, and non-target slices are divided according to the slice window parameters to obtain multiple divided slices. In each divided slice, multiple sub-slices that meet the preset division conditions are screened, and multiple sub-slices are screened out from the multiple divided slices, providing a basis for subsequently reducing the amount of data backup.

[0078] In one embodiment, the slice window parameters include a slice window size and a slice window direction. According to the slice window parameters, the non-target slice is divided to obtain multiple divided slices, including: determining the last data block in the slice window direction among the multiple data blocks contained in the non-target slice as the non-target data block, for each target data block other than the non-target data block in the non-target slice, taking the target data block as the division starting point, taking the slice window size as the division length, and taking the slice window direction as the division direction, the non-target slice is divided to obtain divided slices containing the target data block.

[0079] The slice window size may indicate the amount of data that the slice window can accommodate. The slice window direction may indicate the moving direction of the slice window in the non-target slice. The slice window size may also indicate the number of data blocks that can be accommodated in the slice window.

[0080] A data block can represent the basic unit of file storage. For example, in a disk storage scenario, each data block on the disk can be addressed by a logical block address (LBA), rather than relying on the old cylinder, track, and sector (CHS) method. File systems usually organize data at a higher level, called a cluster or block, rather than directly at the data block level.

[0081] The multiple data blocks included in the non-target slice may be in the form of multiple data blocks connected in sequence, such as ABR. A, B, and R may all be data blocks. Multiple data blocks constitute the non-target slice or other slices.

[0082] For example, the multiple data blocks included in the non-target slice include ABRACARAR. The last data block in the slice window direction is determined as the non-target data block (the last R). For each target data block (the first eight data blocks) other than the non-target data block in the non-target slice, the non-target slice is divided with the target data block as the starting point, the slice window size as the division length, and the slice window direction as the division direction to obtain the divided slices (ABR, ACAR, AR) containing the target data blocks. It should be noted that the data amounts corresponding to ABR, ACAR, and AR are the same or similar.

[0083] The partition start point may represent the edge of the partition window. For example, the partition start point in ABR is A. The partition length may be a reference length for partitioning each data block. For example, the partition length may be 2-4 data blocks. The partition direction may represent the arrangement direction of each target data block, such as from left to right.

[0084] In this embodiment, the last data block in the slice window direction among the multiple data blocks included in the non-target slice is determined as the non-target data block. For each target data block other than the non-target data block in the non-target slice, the non-target slice is divided with the target data block as the starting point of the division, the slice window size as the division length, and the slice window direction as the division direction, to obtain the divided slice containing the target data block, and then the sub-slice containing the target data block is screened out, which provides a basis for subsequently reducing the amount of data backup, thereby improving the efficiency of data backup.

[0085] In one embodiment, the metadata includes an index, and the data backup method further includes: determining that the index of the target sub-slice corresponds to the first data content of each backed up slice, determining that the index of the target slice corresponds to the second data content of each backed up slice, and constructing a data snapshot based on the index of the target sub-slice, the first data content, the index of the target slice, the second data content, and the index and data content of the non-target sub-slice.

[0086] The index may represent relevant information of a data structure in a database for improving query efficiency. According to the index, data content corresponding to the index may be queried in the database.

[0087] The index of the target sub-slice may represent relevant information for querying the data content corresponding to the target sub-slice. The first data content may represent the data content of the backed-up slice corresponding to the index of the target sub-slice.

[0088] The index of the target slice may represent relevant information for querying the data content corresponding to the target slice. The second data content may represent the data content of the backed-up slice corresponding to the index of the target slice.

[0089] A database snapshot is a read-only static view of a database created at a specific point in time, which is used to save the state of the database at a certain moment. This technology is mainly used in report generation, historical data maintenance, data protection, and test environments. It can quickly restore to the state when the snapshot was created, thereby avoiding the impact of management errors and user errors.

[0090] Specifically, after the data snapshot is constructed, the terminal can select the target data snapshot from the data snapshots in response to the data recovery operation. The terminal can perform data recovery according to the index and data content in the target data snapshot.

[0091] In this embodiment, it is determined that the index of the target sub-slice corresponds to the first data content of each backed-up slice, and it is determined that the index of the target slice corresponds to the second data content of each backed-up slice. According to the index of the target sub-slice, the first data content, the index of the target slice, the second data content, the index and data content of the non-target sub-slice, a data snapshot is constructed. The traditional incremental snapshot is generally the data content of the incremental data, and the index is the previous snapshot table. In this embodiment, the data content of the incremental data and the non-incremental data are all in the snapshot table. And it is not coupled with the previous snapshot table. The coupling between data snapshots is reduced. In the scenario where data recovery is performed based on the data snapshot later, the data recovery efficiency is higher.

[0092] In one embodiment, the data backup method also includes: obtaining the snapshot generation time of each of the multiple historical data snapshots, and the snapshot recovery period configured for each historical data snapshot, and in each historical data snapshot, screening the target data snapshot whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period, and deleting the snapshot slice when the snapshot slice in the target data snapshot satisfies the slice recovery condition.

[0093] The historical data snapshot may be a data snapshot constructed within a historical period.

[0094] The snapshot generation time may indicate the construction completion time or construction start time corresponding to the historical data snapshot.

[0095] The snapshot recycling cycle may indicate the recycling cycle configured for snapshot maintenance in the system. The snapshot recycling cycle is positively correlated with the system storage capacity. For example, the snapshot recycling cycle may be set to 3 days.

[0096] The time difference between the snapshot generation time and the current time satisfies the target data snapshot of the snapshot recycling cycle, which can mean that the time difference between the snapshot generation time of the historical data snapshot and the current time is greater than or equal to the time in the snapshot recycling cycle. For example, the time difference is greater than 3 days, that is, the generation time of the historical data snapshot is 3 days ago.

[0097] The snapshot slice can represent a data slice in the target data snapshot. The snapshot slice includes a target sub-slice, a target slice, and a non-target slice.

[0098] The slice recycling conditions may include duplicate slices or free slices. For example, if the slice fingerprints of two data slices are the same, it can be indicated that the data slice meets the slice recycling conditions. For another example, if the data slice is not referenced by any data snapshot, it can be indicated that the data slice meets the slice recycling conditions.

[0099] In this embodiment, the snapshot generation time of each of the multiple historical data snapshots and the snapshot recovery period configured for each historical data snapshot are obtained. In each historical data snapshot, the target data snapshot whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period is screened. When the snapshot slices in the target data snapshot meet the slice recovery conditions, the snapshot slices are deleted. By deleting the snapshot slices that meet the slice recovery conditions, storage space is reduced, hardware resources are saved, and data recovery efficiency is improved.

[0100] In one embodiment, when a snapshot slice in a target data snapshot satisfies a slice recycling condition, the snapshot slice is deleted, including: determining a first number of citations of a slice fingerprint of the snapshot slice in each historical data snapshot, and a second number of citations of the slice fingerprint of the snapshot slice in a real-time data snapshot, and when the first number of citations and the second number of citations are both zero, the snapshot slice is deleted.

[0101] The first reference count may indicate the number of times the snapshot slice appears in each historical data snapshot, and the second reference count may indicate the number of times the snapshot slice appears in the real-time data snapshot.

[0102] A real-time data snapshot may represent a data snapshot that is being backed up or being restored.

[0103] Specifically, when the first reference count and the second reference count are both zero, it means that the snapshot slice has not been referenced. In order to reduce storage space, save hardware resources, and improve data recovery efficiency, the terminal can delete the snapshot photo.

[0104] Exemplarily, in a scenario where a data snapshot is recycled, the terminal checks the number of times the slice fingerprint of the snapshot slice is referenced in the historical data snapshot and the real-time data snapshot. If the number of times the slice fingerprint is referenced is zero, the terminal can delete the snapshot slice.

[0105] In one embodiment, if the deleted snapshot slices in the data snapshot meet a preset number condition, the terminal can delete the target data snapshot together. The preset number condition can be that the number of deleted snapshot slices exceeds a preset number, or that the number of deleted snapshot slices reaches the total number of snapshot slices of the target data snapshot.

[0106] In this embodiment, the first number of citations of the slice fingerprint of the snapshot slice in each historical data snapshot and the second number of citations of the slice fingerprint of the snapshot slice in the real-time data snapshot are determined. When the first number of citations and the second number of citations are both zero, deleting the snapshot slice reduces storage space and saves hardware resources, thereby improving data recovery efficiency.

[0107] In one embodiment, Figure 3 A method for incremental file backup based on fingerprint secondary deduplication is provided, including:

[0108] The first part, secondary slicing fingerprint and global deduplication, includes:

[0109] S301, obtaining a plurality of data slices, determining a slice fingerprint of each data slice, and a reference fingerprint of each of a plurality of backed-up slices.

[0110] For example, 1. File data difference identification includes: using the CDC algorithm to slice the changed file. The CDC algorithm uses a sliding window of fixed length L to traverse the file, setting two constants D and E. Assuming that the data in the window is W, if the current window data satisfies: Hash(W) mod D = E, then the tail of the current window is used as a slice boundary, and the fingerprint of the slice is calculated using MD5 or Hash function. Figure 4 The schematic diagram shown is for identifying file change fingerprint segments based on the CDC algorithm. When a file changes, a fingerprint of a re-slice after the change is obtained, in which FP1 and FP3 have not changed. This part of the data does not need to be backed up. The data that needs to be backed up is the data corresponding to the change FP2.

[0111] 2. The changed data is deduplicated based on the backup library, including: the new fingerprint FP2 generated by the changed data. According to the traditional backup software practice, theoretically all the changed data needs to be uploaded to the backup library. However, this solution introduces a source-side deduplication solution based on the fingerprint library. The next step will be to compare whether the fingerprint of the change exists in the backup library. If the new fingerprint of FP2 exists, the incremental change data will not upload any data to the backup library, and only the metadata of the file needs to be updated. Figure 5 The schematic diagram of the fingerprint library metadata and slice data management method shown in the figure introduces the index file index fingerprint library. The index file stores the pack file ID, offset and length of the fingerprint corresponding data. In the incremental backup, for the changed fingerprint, a sequential or binary search is performed in the index fingerprint library file. If a match is found, there is no need to upload the data. If it cannot be found, the next step is taken, that is, secondary cutting of the changed fingerprint data.

[0112] 3. Change data secondary slicing fingerprint deduplication, including: Figure 4 and Figure 5 As shown, a new slicing condition can be selected. If the hash function remains unchanged and the check window length remains unchanged, only two constants of the slicing setting need to be changed to D and E. If Hash(W) mod D′ = E′, it can be considered as a new data boundary. Figure 6 The schematic diagram of the secondary slicing of the changed fingerprint segment data is shown. In the changed data, the new slice C becomes the new slice boundary. At this time, the changed data is cut into FP3 and FP4. Obviously, FP3 has already been deleted and does not need to be uploaded. Only FP4 needs to be processed, thereby reducing the amount of data uploaded as a whole.

[0113] In summary, the incremental file backup process can be as follows: Figure 7The flowchart of the method for incremental backup of files with double-slicing fingerprint deduplication is shown. First, identify whether there is a historical backup of the file, and judge whether the file metadata can be found by the parent snapshot of the last backup. If it cannot be found, it is considered to be a new file, and the file is backed up this time as a full backup; if the metadata is found, compare whether the file metadata has changed at the current moment. If the file has not changed, you only need to copy the file metadata to the current backup snapshot to complete the backup; if the file has changed, first change the length of the slice and compare it with the last file fingerprint slice, and only dedupe the changed fingerprint. If there is no new fingerprint after deduplication, the file metadata is directly updated; if the changed fingerprint does not exist in the fingerprint library, the data block corresponding to the changed fingerprint is cut twice, and deduplication is attempted again. Similarly, if the secondary deduplication is successful, only the file metadata information needs to be updated; if it is partially successful, the non-deduplicated fingerprint is uploaded to the backup library and the metadata is updated at the same time; if the secondary deduplication does not find a duplicated fingerprint, the first slicing result is directly used to upload the changed fingerprint and the corresponding data, and the metadata is updated.

[0114] S302: Determine, from each data slice, a target slice whose slice fingerprint matches any reference fingerprint, and non-target slices other than the target slice.

[0115] S303: When the data volume of the non-target slice is greater than the data volume threshold, obtain slice window parameters and preset division conditions.

[0116] S304: Determine the last data block in the slice window direction among the multiple data blocks included in the non-target slice as a non-target data block.

[0117] The slice window parameters include the slice window size and the slice window direction.

[0118] S305, for each target data block except the non-target data block in the non-target slice, the non-target slice is divided with the target data block as the starting point of the division, the slice window size as the division length, and the slice window direction as the division direction to obtain a divided slice containing the target data block.

[0119] S306: In each divided slice, select multiple sub-slices that meet the preset division condition.

[0120] S307 : Determine, from each sub-slice, a target sub-slice that matches any reference fingerprint and non-target sub-slices other than the target sub-slice.

[0121] S308, backing up the data content and metadata of non-target sub-slices, and backing up the metadata of target sub-slices and target slices.

[0122] The second part, metadata design and breaking chain relationships, includes:

[0123] S309: Determine that the index of the target sub-slice corresponds to the first data content of each backed-up slice.

[0124] For example, during the incremental process, regardless of whether the file has changed, all the referenced fingerprint information needs to be recorded in the file metadata, such as Figure 8 In the incremental backup data organization structure diagram shown, whether it is a file or a directory, it can be regarded as a node. The metadata of the corresponding backup snapshot can be found through the treeID at the top of the snapshot, and all directory and file information of this backup can be found through the metadata of the snapshot. The content under the node data of each file stores the fingerprint ID according to the file slice order, that is, an array that stores fingerprints in the order of file content. Through the index record stored in the fingerprint library index file, the data location of the pack file corresponding to the fingerprint can be found, so that the file can be restored at one time, without recursively searching the location and content of the last snapshot file. The following process is simplified:

[0125] 1. The snapshot metadata needs to record all the information of the backup copy, regardless of whether the files have changed. It needs to include all the files of this backup, and record the directory information of this backup at the same time, and save it in the treeID data file;

[0126] 2. Regardless of whether the file has changed or not, the content of the file needs to completely record the fingerprint ID of the slice referenced by the file in the order of the file slices. When restoring, the pack file is found through the index file in the order of the fingerprint ID. Because the information recorded in the file metadata is complete each time, the file restoration does not depend on the snapshot information of the last backup;

[0127] 3. Each time a backup is performed, the record of the fingerprint used in this snapshot needs to be updated. If a fingerprint is referenced multiple times by multiple snapshots, the expiration of a snapshot cannot delete these fingerprints together. It is necessary to check the number of references of the fingerprint during the GC snapshot. Only the data corresponding to the fingerprint with a reference count of 0 can be deleted. At the same time, consider whether there is a task referencing the current backup. In addition, technologies such as delay can be used to ensure the security of fingerprint and data deletion.

[0128] S310: Determine that the index of the target slice corresponds to the second data content of each backed up slice.

[0129] S311, construct a data snapshot according to the index of the target sub-slice, the first data content, the index of the target slice, the second data content, and the index and data content of the non-target sub-slice.

[0130] S312, obtaining snapshot generation time of each of the plurality of historical data snapshots and a snapshot recovery period configured for each of the historical data snapshots.

[0131] S313, among the historical data snapshots, select the target data snapshots whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period.

[0132] S314, determining a first number of times the slice fingerprint of the snapshot slice is referenced in each historical data snapshot, and a second number of times the slice fingerprint of the snapshot slice is referenced in the real-time data snapshot.

[0133] S315 , when the first reference count and the second reference count are both zero, delete the snapshot slice.

[0134] In this embodiment, multiple data slices are obtained, slice fingerprints of each data slice and reference fingerprints of each backed-up slice are determined, and from each data slice, a target slice whose slice fingerprint matches any reference fingerprint and a non-target slice other than the target slice are determined, and each data slice is screened to obtain a non-target slice, providing a basis for subsequent processing of the non-target slice. When the data volume of the non-target slice is greater than the data volume threshold, the non-target slice is segmented to obtain multiple sub-slices, and from each sub-slice, a target sub-slice matching any reference fingerprint and a non-target sub-slice other than the target sub-slice are determined, and each sub-slice is screened to obtain a non-target sub-slice, providing a basis for subsequent data backup. By adopting the above method, the data content and metadata of the non-target sub-slice are backed up, and the metadata of the target sub-slice and the target slice are backed up, which reduces the data volume of the data backup, reduces the data transmission time, and improves the data backup efficiency.

[0135] In the backup and recovery system, backup copies are often generated regularly according to the backup strategy configured by the user to protect data at different times, and users are also allowed to select snapshot copies at any time point for recovery. However, if a full backup is used for each backup, a large amount of redundant data will be generated, resulting in a waste of storage space, which is not only costly but also inefficient. However, if the traditional incremental backup technology is used, only differential data needs to be backed up each time. Although the backup efficiency is improved and the cost is reduced, there will be problems such as too deep coupling between backup copies, too long backup links, and affected data recovery efficiency. In particular, when restoring, each copy needs to be recursively searched sequentially, which is too inefficient. Even if some existing differential merging methods are used, it is still quite complicated to implement.

[0136] The above method can also bring the following beneficial effects:

[0137] 1. Realize fast search for file differences: Use variable-length CDC slicing algorithm to calculate data fingerprints, quickly find the area where the file has changed, and find the file difference part; at the same time, try to globally delete the difference part of the file, then try to modify the boundary conditions, and then delete it again through secondary CDC slicing, and continuously narrow the range of data blocks that need to be uploaded again for the difference part;

[0138] 2. Reduce the cost of using the backup library and improve the performance of incremental backup: For changed data, secondary slicing and deduplication screening are used to reduce the size of uploaded data blocks, reduce the cost of the backup library, and improve the overall performance of incremental backup;

[0139] 3. Guarantee recovery performance and achieve decoupling between incremental snapshots: Each time a snapshot is generated, the complete file metadata is recorded, so that all files and all data block information of the backup can be found based on the snapshot information, breaking the traditional chain incremental backup process; at the same time, when restoring files, there is no need to search for unchanged data blocks in historical backups, nor to merge differential data, which improves the overall performance of data recovery and user experience;

[0140] 4. Ensure data deletion performance and reduce snapshot GC complexity: The incremental backup solution of this application, because the metadata of the files in each snapshot is complete, therefore when the snapshot copy is recovered, there is no need to transfer the data blocks in the historical snapshot. Only the reference relationship of the fingerprint needs to be considered, which reduces the complexity of the GC process. For fingerprint data with a reference count of 0, it can be deleted without considering the incremental relationship of the entire backup file, thereby improving the efficiency of data recovery.

[0141] 5. File incremental backup usage scenario: This patent proposes a multiple-slice deduplication solution for the first time. That is, during the incremental backup process, the first CDC slice is used to find the difference position, and the fingerprint data comparison and source-side deduplication technology are used to reduce the data transmission size. At the same time, the second slicing deduplication process is used to further reduce the scope of data upload and improve the overall efficiency of incremental backup.

[0142] 6. Chain problem in incremental backup: This patent proposes a backup metadata management solution, that is, each backup retains complete file information, thereby avoiding the dependencies between snapshot copies in incremental backup. Although there is a redundancy problem in metadata information, such as if the file has never changed, the fingerprint ID information referenced by the file needs to be recorded each time, but the benefits brought by this are far greater than the metadata storage cost: breaking the chain relationship between incremental backups, improving the performance of snapshot recovery, and greatly simplifying the recovery process of subsequent snapshot copies.

[0143] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0144] Based on the same inventive concept, the embodiment of the present application also provides a data backup device for implementing the data backup method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data backup device embodiments provided below can refer to the limitations on the data backup method above, and will not be repeated here.

[0145] In one embodiment, Fig. 9 As shown, a data backup device is provided, including: an acquisition module 901, a slice determination module 902, a sub-slice determination module 903, a processing module 904 and a backup module 905, wherein:

[0146] An acquisition module 901 is used to acquire multiple data slices, determine a slice fingerprint of each of the data slices, and a reference fingerprint of each of the multiple backed-up slices;

[0147] A slice determination module 902 is used to determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and non-target slices other than the target slice;

[0148] A sub-slice determination module 903, configured to divide the non-target slice into multiple sub-slices when the data amount of the non-target slice is greater than a data amount threshold;

[0149] A processing module 904 is configured to determine, from the sub-slices, a target sub-slice that matches any of the reference fingerprints and non-target sub-slices other than the target sub-slice;

[0150] The backup module 905 is used to back up the data content and metadata of the non-target sub-slices, and to back up the metadata of the target sub-slices and the target slices.

[0151] In one embodiment, the sub-slice determination module 903 is also used to obtain slice window parameters and preset division conditions; divide the non-target slice according to the slice window parameters to obtain multiple divided slices; and in each divided slice, screen multiple sub-slices that meet the preset division conditions.

[0152] In one of the embodiments, the slice window parameters include a slice window size and a slice window direction; the sub-slice determination module 903 is further used to determine the last data block in the slice window direction among the multiple data blocks included in the non-target slice as a non-target data block; for each target data block other than the non-target data block in the non-target slice, the non-target slice is divided with the target data block as the starting point of the division, the slice window size as the division length, and the slice window direction as the division direction to obtain a divided slice containing the target data block.

[0153] In one of the embodiments, the metadata includes an index; the data backup device also includes: a snapshot construction module, used to determine that the index of the target sub-slice corresponds to the first data content of each backed up slice; determine that the index of the target slice corresponds to the second data content of each backed up slice; and construct a data snapshot based on the index of the target sub-slice, the first data content, the index of the target slice, the second data content, and the index and data content of the non-target sub-slice.

[0154] In one of the embodiments, the data backup device also includes: a slice deletion module, which is used to obtain the snapshot generation time of each of multiple historical data snapshots, and the snapshot recovery period configured for each historical data snapshot; in each historical data snapshot, filter the target data snapshot whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period; if the snapshot slice in the target data snapshot meets the slice recovery condition, delete the snapshot slice.

[0155] In one of the embodiments, the slice deletion module is also used to determine the first number of citations of the slice fingerprint of the snapshot slice in each historical data snapshot, and the second number of citations of the slice fingerprint of the snapshot slice in the real-time data snapshot; when the first number of citations and the second number of citations are both zero, the snapshot slice is deleted.

[0156] Each module in the above data backup device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0157] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data slice data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data backup method is implemented.

[0158] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0159] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.

[0160] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.

[0161] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.

[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0163] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0164] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data backup method, characterized in that: The method comprises: Acquire multiple data slices, determine a slice fingerprint of each of the data slices, and a reference fingerprint of each of the multiple backed-up slices; Determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and non-target slices other than the target slice; When the data amount of the non-target slice is greater than a data amount threshold, segmenting the non-target slice to obtain a plurality of sub-slices; Determine, from each of the sub-slices, a target sub-slice that matches any of the reference fingerprints, and non-target sub-slices other than the target sub-slice; The data content and metadata of the non-target sub-slice are backed up, and the metadata of the target sub-slice and the target slice are backed up.

2. The method according to claim 1, characterized in that The non-target slice is segmented to obtain a plurality of sub-slices, including: Get slice window parameters and preset segmentation conditions; Dividing the non-target slice according to the slice window parameter to obtain a plurality of divided slices; In each of the divided slices, multiple sub-slices that meet the preset division conditions are screened.

3. The method according to claim 2, characterized in that The slice window parameters include slice window size and slice window direction; The step of dividing the non-target slice according to the slice window parameter to obtain a plurality of divided slices includes: Determine the last data block in the slice window direction among the multiple data blocks included in the non-target slice as a non-target data block; For each target data block in the non-target slice except the non-target data block, the non-target slice is divided with the target data block as the starting point of the division, the slice window size as the division length, and the slice window direction as the division direction to obtain a divided slice containing the target data block.

4. The method according to claim 1, characterized in that: The metadata includes an index, and the method further includes: Determine that the index of the target sub-slice corresponds to the first data content of each of the backed-up slices; Determine that the index of the target slice corresponds to the second data content of each of the backed-up slices; A data snapshot is constructed according to the index of the target sub-slice, the first data content, the index of the target slice, the second data content, and the index and data content of the non-target sub-slice.

5. The method according to claim 4, characterized in that The method further comprises: Obtaining snapshot generation times of respective ones of a plurality of historical data snapshots and snapshot recovery periods configured for respective ones of the historical data snapshots; In each of the historical data snapshots, a target data snapshot whose time difference between the snapshot generation time and the current time satisfies the snapshot recovery period is selected; When the snapshot slice in the target data snapshot meets the slice recycling condition, the snapshot slice is deleted.

6. The method according to claim 5, characterized in that When the snapshot slice in the target data snapshot meets the slice recycling condition, deleting the snapshot slice includes: Determine a first number of times a slice fingerprint of the snapshot slice is referenced in each of the historical data snapshots, and a second number of times the slice fingerprint of the snapshot slice is referenced in the real-time data snapshot; When the first reference count and the second reference count are both zero, the snapshot slice is deleted.

7. A data backup device, characterized in that: The device comprises: An acquisition module, configured to acquire a plurality of data slices, and determine a slice fingerprint of each of the data slices, and a reference fingerprint of each of the plurality of backed-up slices; a slice determination module, configured to determine, from each of the data slices, a target slice whose slice fingerprint matches any of the reference fingerprints, and non-target slices other than the target slice; a sub-slice determination module, configured to segment the non-target slice to obtain a plurality of sub-slices when the data amount of the non-target slice is greater than a data amount threshold; A processing module, configured to determine, from the sub-slices, a target sub-slice that matches any of the reference fingerprints and non-target sub-slices other than the target sub-slice; A backup module is used to back up the data content and metadata of the non-target sub-slices, and to back up the metadata of the target sub-slices and the target slices.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.