Fingerprint database recovery method, device, computer device, readable storage medium and program product

By obtaining and processing the fingerprint library at the backup time, adding data blocks and invalid fingerprints, and generating the target fingerprint library at the target time, the problem of inconsistency and invalid fingerprints after the fingerprint library is restored, and the recovery efficiency and consistency are improved.

CN119336543BActive Publication Date: 2025-07-04GUANGZHOU DINGJIA COMPUTER TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411435857.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-07-04
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

In the prior art, the data after the fingerprint library is restored is inconsistent with the target moment and may contain invalid fingerprints, resulting in the restored fingerprint library being unavailable.

Method used

By obtaining the backup fingerprint library closest to the backup time of the target moment, obtaining new data blocks and invalid fingerprints, processing the target backup fingerprint library to generate the target fingerprint library at the target moment.

Benefits of technology

The fingerprint library recovery efficiency is achieved. The restored target fingerprint library is consistent with the data file at the target moment and does not contain invalid fingerprints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336543B_ABST
    Figure CN119336543B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of deduplication storage, and provides a fingerprint library recovery method, apparatus, computer device, readable storage medium and program product. The method includes: obtaining a target backup fingerprint library according to the backup fingerprint library closest to the target time at the target time; obtaining newly added data blocks from the closest backup time to the target time; obtaining invalid fingerprints from the closest backup time to the target time according to the fingerprints of the data blocks reclaimed by space in the space reclamation redo log after the closest backup time; processing the target backup fingerprint library according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication. By adopting this method, it is possible to make the target fingerprint library at the target time after recovery consistent with the data file at the target time and not contain invalid fingerprints under the condition of relatively high fingerprint library recovery efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of deduplication storage, and particularly to a fingerprint database recovery method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art

[0002] In the practical application of deduplication storage technology, the fingerprint database may be damaged or lost due to various software and hardware failures, human factors, or external factors. Therefore, corresponding measures are needed to provide the ability to recover the fingerprint database.

[0003] Currently, the fingerprint database can be backed up regularly, and after the fingerprint database is damaged, the fingerprint database can be recovered according to the backup fingerprint database closest to the backup time.

[0004] According to the method of recovering the fingerprint database based on the backup fingerprint database closest to the backup time, the recovery efficiency of the fingerprint database is relatively high. However, there is a problem of inconsistency between the recovered fingerprint database and the data at the target time, and the recovered fingerprint database may contain invalid fingerprints, resulting in the unavailability of the recovered fingerprint database. Summary of the Invention

[0005] Based on this, it is necessary to provide a fingerprint database recovery method, apparatus, computer device, computer-readable storage medium, and computer program product for the above technical problems.

[0006] In a first aspect, this application provides a fingerprint database recovery method, including:

[0007] Obtaining a target backup fingerprint database according to the backup fingerprint database closest to the target time;

[0008] Obtaining the newly added data blocks from the closest backup time to the target time;

[0009] Obtaining the invalid fingerprints from the closest backup time to the target time according to the fingerprints of the data blocks reclaimed from the space reclaim redo log after the closest backup time;

[0010] Processing the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time; the target fingerprint database is used for deduplication.

[0011] In one of the embodiments, the obtaining the newly added data blocks from the closest backup time to the target time includes:

[0012] Obtaining the first type of data files according to the non-newly added data files with increased data volume from the closest backup time to the target time;

[0013] Determine the file scanning start position according to the data volume of the first type of data file at the closest backup time;

[0014] Scan the first type of data file according to the file scanning start position to obtain new data blocks.

[0015] In one embodiment, the scanning the first type of data file according to the scanning start position to obtain new data blocks includes:

[0016] Determine the file scanning end position according to the data volume of the first type of data file at the target time;

[0017] Scan the first type of data file according to the scanning start position and the scanning end position to obtain new data blocks.

[0018] In one embodiment, the obtaining the first type of data file according to the non-new and data volume increased data files from the closest backup time to the target time includes:

[0019] Determine the file numbers recorded in both the file record information at the closest backup time and the file record information at the target time;

[0020] Determine the non-new data files according to the file numbers;

[0021] Determine the non-new and data volume increased data files according to the data volume of the non-new data files at the closest backup time and the data volume of the non-new data files at the target time;

[0022] Use the non-new and data volume increased data files as the first type of data files.

[0023] In one embodiment, the obtaining the new data blocks from the closest backup time to the target time includes:

[0024] Determine the new data files from the closest backup time to the target time according to the file record information at the closest backup time and the file record information at the target time;

[0025] Obtain new data blocks according to the new data files.

[0026] In one embodiment, the processing the target backup fingerprint library according to the fingerprints of the new data blocks and the invalid fingerprints to obtain the target fingerprint library at the target time includes:

[0027] Delete the invalid fingerprints from the target backup fingerprint database, and add the fingerprints of the newly added data blocks to the target backup fingerprint database to obtain the target fingerprint database at the target time.

[0028] In a second aspect, the present application further provides a fingerprint database recovery device, including:

[0029] A target backup fingerprint database acquisition module, configured to obtain a target backup fingerprint database according to the backup fingerprint database at the backup time closest to the target time;

[0030] A newly added data block acquisition module, configured to acquire the newly added data blocks from the time closest to the backup time to the target time;

[0031] An invalid fingerprint acquisition module, configured to obtain the invalid fingerprints from the time closest to the backup time to the target time according to the fingerprints of the data blocks reclaimed by space in the space reclamation redo log after the time closest to the backup time;

[0032] A target fingerprint database acquisition module, configured to process the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time; the target fingerprint database is used for deduplication.

[0033] 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 executes the above method.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to perform the above method.

[0035] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and the computer program is executed by a processor to perform the above method.

[0036] The above fingerprint database recovery method, device, computer device, computer-readable storage medium, and computer program product obtain a target backup fingerprint database according to the backup fingerprint database at the closest backup time to the target time; obtain the newly added data blocks from the closest backup time to the target time; obtain the invalid fingerprints from the closest backup time to the target time according to the fingerprints of the data blocks reclaimed by space in the space recovery redo log after the closest backup time; process the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time; the target fingerprint database is used for deduplication. This application obtains a target backup fingerprint database according to the backup fingerprint database at the closest backup time to the target time; processes the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time. The fingerprint database recovery efficiency is relatively high, and the recovered target fingerprint database at the target time is consistent with the data file at the target time and does not contain invalid fingerprints. Brief Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for describing the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 It is an application environment diagram of the fingerprint database recovery method in an embodiment;

[0039] Figure 2 It is a flowchart of the fingerprint database recovery method in an embodiment;

[0040] Figure 3 It is a flowchart of obtaining the newly added data blocks in an embodiment;

[0041] Figure 4 It is a structural block diagram of the fingerprint database recovery device in an embodiment;

[0042] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed Description of the Embodiments

[0043] In order to make the purpose, technical solutions, and advantages of the present application clearer, the following further details the present application in combination with the 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.

[0044] The embodiments of the present application provide a fingerprint database recovery method. This embodiment can be executed by a computer device, such as Figure 1As shown, the computer device can obtain the backup fingerprint database closest to the target time at the target time, obtain the target backup fingerprint database, and further obtain the target fingerprint database at the target time. It can be understood that the computer device can be implemented through a server, or through a terminal, or through an interaction system between the terminal and the server. In this embodiment, the method includes Figure 2 the steps shown:

[0045] Step S201: Obtain the target backup fingerprint database according to the backup fingerprint database closest to the target time at the target time.

[0046] The data deduplication storage technology deletes duplicate data blocks by dividing the stored data into chunks, calculating fingerprints, and deleting duplicate data blocks based on the duplicate fingerprints, so as to achieve the effect of only storing non-duplicate data blocks, thereby achieving the purpose of saving storage space. In the data deduplication storage technology, the technology of finding duplicate fingerprints is the key to affecting the deduplication efficiency. The general implementation method is to use a database or a hash table and other data structures with fast search capabilities to store the existing fingerprint information to achieve fast fingerprint search. This database or data structure is called a fingerprint database.

[0047] The fingerprint database can be backed up to the backup location regularly in a physical backup or logical backup manner to obtain the backup fingerprint database at each backup time. And the process of backing up the fingerprint database does not require suspending the read and write operations of the storage system. The snapshot backup of the fingerprint database can be obtained according to the snapshot mechanism provided by the fingerprint database itself. Taking the LevelDB as an example: A target database can be created at the backup location, denoted as T1-B; a snapshot object can be created through the GetSnapshot method of the LevelDB object. The LevelDB automatically generates a snapshot in the memory; an iterator object can be created through the NewIterator method of the same LevelDB object, and the returned snapshot object is specified in the parameters of the iterator; all records in the snapshot generated by the LevelDB can be traversed through the above returned snapshot object, and the traversal results are copied to the target database; finally, the iterator object and the snapshot object are released to complete the logical snapshot backup of the fingerprint database and obtain the backup fingerprint database.

[0048] When it is detected that the space recovery operation is being executed, the upcoming fingerprint database backup operation is suspended through a preset mutex switch; when it is detected that the space recovery operation is completed, the fingerprint database backup operation is executed to obtain the backup fingerprint database at the corresponding time, and to avoid performing the space recovery during the fingerprint database backup. The start time of the fingerprint database recovery operation can be called the target time.

[0049] Step S202: Obtain the newly added data blocks from the closest backup time to the target time.

[0050] Generally, each data block is designed with a data structure at the head to store the metadata of the data block, which is called the block header and contains attributes such as fingerprints and data block sizes.

[0051] It is possible to obtain the newly added data blocks from the closest backup time to the target time based on whether the data volume of the data file has increased from the closest backup time to the target time and whether there are newly added data files at the target time.

[0052] Step S203: Obtain the invalid fingerprints from the closest backup time to the target time according to the fingerprints of the data blocks reclaimed from the space reclamation redo log after the closest backup time.

[0053] To save storage space, space reclamation can be performed on the unused fingerprints and their corresponding data blocks. During the space reclamation process, the unused fingerprints can be referred to as the fingerprints of the data blocks reclaimed from the space. While deleting the fingerprints of the data blocks reclaimed from the space from the fingerprint library, the fingerprints can be recorded in the space reclamation redo log, and the space reclamation redo log can be marked at the most recent backup time.

[0054] During the space reclamation process, if a data block has been reclaimed from the space while the fingerprint corresponding to the data block still exists in the fingerprint library, the fingerprint will become an invalid fingerprint.

[0055] The fingerprints of the data blocks reclaimed from the space deleted during the space reclamation operation after the closest backup time still exist in the target backup fingerprint library. To make the restored target fingerprint library consistent with the data files at the target time, it is possible to obtain the fingerprints of the data blocks reclaimed from the space from the closest backup time to the target time and delete the fingerprints from the target backup fingerprint library.

[0056] The fingerprints of the data blocks reclaimed from the space in the space reclamation redo log after the closest backup time can be used as the invalid fingerprints from the closest backup time to the target time. For example, if the space reclamation redo log after the closest backup time is R1 and the fingerprints of the data blocks reclaimed from the space in R1 are fingerprint A, fingerprint B, and fingerprint C, then the invalid fingerprints from the closest backup time to the target time are fingerprint A, fingerprint B, and fingerprint C; if the space reclamation redo log after the closest backup time is R2 and the fingerprints of the data blocks reclaimed from the space in R2 are fingerprint D and fingerprint E, then the invalid fingerprints from the closest backup time to the target time are fingerprint D and fingerprint E.

[0057] If no space reclamation operation has been performed after the most recent backup fingerprint library, there is no space reclamation redo log after the closest backup time, and this step can be skipped.

[0058] Step S204: Process the target backup fingerprint database based on the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time; the target fingerprint database is used for deduplication.

[0059] The target backup fingerprint database is consistent with the data files at the closest backup time. During the period from the closest backup time to the target time, there are newly added data and possibly space reclamation operations. To make the restored target fingerprint database consistent with the data files at the target time, the newly added data blocks from the closest backup time to the target time can be obtained based on whether the data volume of the data files from the closest backup time to the target time has increased and whether there are newly added data files at the target time; the invalid fingerprints from the closest backup time to the target time can be obtained based on the fingerprints of the data blocks reclaimed by space in the space reclamation redo log after the closest backup time. The target backup fingerprint database can be processed based on the fingerprints of the newly added data blocks and the invalid fingerprints to obtain a target fingerprint database that is consistent with the data files at the target time. The target fingerprint database is used for deduplication.

[0060] In the above fingerprint database restoration method, the target backup fingerprint database is obtained based on the backup fingerprint database at the closest backup time to the target time; the target fingerprint database at the target time is obtained by processing the target backup fingerprint database based on the fingerprints of the newly added data blocks and the invalid fingerprints. The fingerprint database restoration efficiency is relatively high, and the restored target fingerprint database at the target time is consistent with the data files at the target time and does not contain invalid fingerprints.

[0061] In one embodiment, the specific steps for obtaining the newly added data blocks from the closest backup time to the target time are as Figure 3 shown: Step S301: Obtain the first type of data files based on the non-newly added data files with increased data volume from the closest backup time to the target time; Step S302: Determine the file scan start position based on the data volume of the first type of data files at the closest backup time; Step S303: Scan the first type of data files according to the file scan start position to obtain the newly added data blocks.

[0062] When performing a backup operation on the fingerprint database, the data volumes of all data files at the backup time can be recorded.

[0063] Data files that are not newly added and have increased data volume from the moment closest to the backup time to the target time can be used as the first type of data files; the file offset position corresponding to the data volume of the first type of data files at the moment closest to the backup time can be used as the file scanning starting position. For example, if the data volume of the first type of data file T at the moment closest to the backup time is 7GB, then the file offset position of 7GB of the first type of data file T is used as the file scanning starting position. The file offset position of 7GB refers to the position starting from the file header of the first type of data file T, which is 0GB, and skipping the file position of 7GB of data volume.

[0064] Scan the first type of data files according to the file scanning starting position to obtain newly added data blocks.

[0065] In this embodiment, according to the data volume of the first type of data files at the moment closest to the backup time, the file scanning starting position is determined; scanning the first type of data files according to the file scanning starting position to obtain newly added data blocks does not require scanning the entire first type of data files, only the newly added data area of the first type of data files needs to be scanned, which can improve the scanning efficiency and thus improve the efficiency of fingerprint database recovery.

[0066] In one of the embodiments, scanning the first type of data files according to the scanning starting position to obtain newly added data blocks, the specific steps are as follows: determine the file scanning ending position according to the data volume of the first type of data files at the target time; scan the first type of data files according to the scanning starting position and the scanning ending position to obtain newly added data blocks.

[0067] The file offset position corresponding to the data volume of the first type of data files at the target time can be used as the file scanning ending position. For example, if the data volume of the first type of data file T at the target backup time is 10GB, then the file offset position of 10GB of the first type of data file T is used as the file scanning ending position. The file offset position of 10GB refers to the position starting from the file header of the first type of data file T, which is 0GB, and skipping the file position of 10GB of data volume.

[0068] Scan the first type of data files according to the scanning starting position and the scanning ending position to obtain newly added data blocks.

[0069] In this embodiment, according to the data volume of the first type of data files at the target time, the file scanning ending position is determined, and scanning the first type of data files according to the scanning starting position and the scanning ending position can quickly and accurately obtain newly added data blocks.

[0070] In one embodiment, the first type of data files is obtained based on the data files that are not newly added and have an increase in data volume from the closest backup time to the target time. The specific steps are as follows: Determine the file numbers recorded in both the file record information at the closest backup time and the file record information at the target time; Based on the file numbers, determine the non-newly added data files; Based on the data volume of the non-newly added data files at the closest backup time and the data volume of the non-newly added data files at the target time, determine the non-newly added data files with an increase in data volume; Use the non-newly added data files with an increase in data volume as the first type of data files.

[0071] Each data file can be numbered, and the file numbers of different data files are different. The file number of each data file is unique. It is possible to determine whether there are newly added data files at the target time based on the file record information at the closest backup time and the file record information at the target time. The data files corresponding to the file numbers recorded in both the file record information at the closest backup time and the file record information at the target time can be determined as non-newly added data files.

[0072] When the data volume of a non-newly added data file at the closest backup time is less than the data volume at the target time, it is determined that the data volume of the non-newly added data file has increased; Use the non-newly added data files with an increase in data volume as the first type of data files.

[0073] In this embodiment, the first type of data files is determined quickly and accurately based on the file numbers and data volume.

[0074] In one embodiment, the newly added data blocks from the closest backup time to the target time are obtained. The specific steps are as follows: Based on the file record information at the closest backup time and the file record information at the target time, determine the newly added data files from the closest backup time to the target time; Based on the newly added data files, obtain the newly added data blocks.

[0075] The data files corresponding to the file numbers not recorded in the file record information at the closest backup time but recorded in the file record information at the target time can be determined as newly added data files.

[0076] Use the file header of the newly added data file as the starting position for file scanning; Use the file tail of the newly added data file as the ending position for file scanning; Scan the newly added data file according to the starting position and ending position for scanning to obtain the newly added data blocks.

[0077] In this embodiment, based on the file record information at the closest backup time and the file record information at the target time, the newly added data files from the closest backup time to the target time are determined to obtain the newly added data blocks.

[0078] In one embodiment, the target fingerprint database is processed according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time. The specific steps are as follows: Delete the invalid fingerprints from the target fingerprint database, and add the fingerprints of the newly added data blocks to the target fingerprint database to obtain the target fingerprint database at the target time.

[0079] The target backup fingerprint database is consistent with the data file at the closest backup time. However, during the period from the closest backup time to the target time, there are newly added data and possibly space reclamation operations.

[0080] To make the restored target fingerprint database consistent with the data file at the target time, the newly added data blocks from the closest backup time to the target time can be obtained according to whether the data volume of the data file from the closest backup time to the target time has increased and whether there are newly added data files at the target time; the invalid fingerprints from the closest backup time to the target time can be obtained according to the fingerprints of the data blocks reclaimed by space reclamation in the space reclamation redo log after the closest backup time.

[0081] The space reclamation redo log records the storage locations of the data blocks corresponding to the fingerprints of the data blocks reclaimed by space reclamation. Therefore, the storage locations of the data blocks corresponding to the invalid fingerprints can be obtained. The invalid fingerprints can be deleted from the target fingerprint database according to the storage locations of the data blocks corresponding to the invalid fingerprints.

[0082] By deleting the invalid fingerprints from the target fingerprint database and adding the fingerprints corresponding to the newly added data blocks and other metadata information to the target fingerprint database in the fingerprint database format, a target fingerprint database consistent with the data file at the target time can be obtained.

[0083] In this embodiment, by deleting the invalid fingerprints from the target fingerprint database and adding the fingerprints of the newly added data blocks to the target fingerprint database, the target fingerprint database can be obtained quickly and accurately.

[0084] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0085] Based on the same inventive concept, an embodiment of the present application further provides a fingerprint database recovery device for implementing the fingerprint database recovery method involved above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the fingerprint database recovery device provided below can refer to the limitations on the fingerprint database recovery method in the foregoing, and will not be elaborated here.

[0086] In an exemplary embodiment, as Figure 4 shown, a fingerprint database recovery device is provided, where:

[0087] A target backup fingerprint database acquisition module 401, configured to obtain a target backup fingerprint database according to the backup fingerprint database closest to the target time at the target time;

[0088] A new data block acquisition module 402, configured to acquire new data blocks from the closest backup time to the target time;

[0089] An invalid fingerprint acquisition module 403, configured to obtain invalid fingerprints from the closest backup time to the target time according to the fingerprints of the data blocks reclaimed by space in the space reclamation redo log after the closest backup time;

[0090] A target fingerprint database acquisition module 404, configured to process the target backup fingerprint database according to the fingerprints of the new data blocks and the invalid fingerprints to obtain the target fingerprint database at the target time; the target fingerprint database is used for deduplication.

[0091] In one embodiment, the new data block acquisition module 402 is further configured to: obtain a first type of data files according to the non-new and data volume-increased data files from the closest backup time to the target time; determine a file scan start position according to the data volume of the first type of data files at the closest backup time; scan the first type of data files according to the file scan start position to obtain new data blocks.

[0092] In one embodiment, the new data block acquisition module 402 is further configured to: determine a file scan end position according to the data volume of the first type of data files at the target time; scan the first type of data files according to the scan start position and the scan end position to obtain new data blocks.

[0093] In one embodiment, the new data block acquisition module 402 is further configured to: determine the file numbers recorded in both the file record information at the closest backup moment and the file record information at the target moment; determine the non-new data files according to the file numbers; determine the data files that are non-new and have increased in data volume according to the data volume of the non-new data files at the closest backup moment and the data volume of the non-new data files at the target moment; and use the data files that are non-new and have increased in data volume as the first type of data files.

[0094] In one embodiment, the new data block acquisition module 402 is further configured to: determine the new data files from the closest backup moment to the target moment according to the file record information at the closest backup moment and the file record information at the target moment; and obtain new data blocks according to the new data files.

[0095] In one embodiment, the target fingerprint database acquisition module 404 is further configured to: delete the invalid fingerprints from the target backup fingerprint database, and add the fingerprints of the new data blocks to the target backup fingerprint database to obtain the target fingerprint database at the target moment.

[0096] Each module in the above fingerprint database recovery device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0097] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated 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 the data of the embodiments of the fingerprint database recovery method. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a fingerprint database recovery method.

[0098] Those skilled in the art can understand that Figure 5 The structure shown in Figure 5 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

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

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

[0101] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0103] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory 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. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0104] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as within the scope recorded in this application.

[0105] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A fingerprint database restoration method, characterized in that, The method includes: Obtaining a target backup fingerprint database according to the backup fingerprint database of the closest backup moment to the target moment; the target moment is the start moment of the operation of restoring the fingerprint database, and the fingerprint database is the damaged or lost fingerprint database; Determining the file numbers recorded in both the file record information at the closest backup moment and the file record information at the target moment; Determining non-new data files according to the file numbers; Determining non-new data files with increased data volume according to the data volume of the non-new data files at the closest backup moment and the data volume of the non-new data files at the target moment; Regarding the non-new data files with increased data volume as the first type of data files; Determining the starting position of file scanning according to the data volume of the first type of data files at the closest backup moment; Scanning the first type of data files at the starting position of file scanning to obtain the newly added data blocks from the closest backup moment to the target moment; Obtaining the invalid fingerprints from the closest backup moment to the target moment according to the fingerprints of the data blocks reclaimed by the space reclamation redo log after the closest backup moment; Processing the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target moment; the target fingerprint database is used for deduplication.

2. The method according to claim 1, characterized in that, The scanning the first type of data files at the starting position of scanning to obtain the newly added data blocks from the closest backup moment to the target moment includes: Determining the ending position of file scanning according to the data volume of the first type of data files at the target moment; Scanning the first type of data files at the starting position of scanning and the ending position of scanning to obtain the newly added data blocks from the closest backup moment to the target moment.

3. The method according to any one of claims 1 to 2, characterized in that, Obtaining the newly added data blocks from the closest backup moment to the target moment includes: Determining the newly added data files from the closest backup moment to the target moment according to the file record information at the closest backup moment and the file record information at the target moment; Obtaining the newly added data blocks according to the newly added data files.

4. The method according to claim 1, wherein The processing the target backup fingerprint database according to the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint database at the target moment includes: Deleting the invalid fingerprints from the target backup fingerprint database and adding the fingerprints of the newly added data blocks to the target backup fingerprint database to obtain the target fingerprint database at the target moment.

5. A fingerprint database restoration device, characterized in that, The device includes: A target backup fingerprint database obtaining module, configured to obtain a target backup fingerprint database according to the backup fingerprint database of the closest backup moment to the target moment; the target moment is the start moment of the operation of restoring the fingerprint database, and the fingerprint database is the damaged or lost fingerprint database; A new data block acquisition module is used to determine the file numbers recorded in both the file record information at the time closest to the backup time and the file record information at the target time; determine non-new data files according to the file numbers; determine non-new data files with increased data volume according to the data volume of the non-new data files at the time closest to the backup time and the data volume of the non-new data files at the target time; use the non-new data files with increased data volume as the first type of data files; determine the file scan start position according to the data volume of the first type of data files at the time closest to the backup time; scan the first type of data files at the file scan start position to obtain the new data blocks from the time closest to the backup time to the target time. An invalid fingerprint acquisition module is used to obtain the invalid fingerprints from the time closest to the backup time to the target time according to the fingerprints of the data blocks reclaimed by space in the space reclamation redo log after the time closest to the backup time. A target fingerprint library acquisition module is used to process the target backup fingerprint library according to the fingerprints of the new data blocks and the invalid fingerprints to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication.

6. The device according to claim 5, characterized in that The new data block acquisition module is further used to determine the file scan end position according to the data volume of the first type of data files at the target time; scan the first type of data files at the scan start position and the scan end position to obtain the new data blocks from the time closest to the backup time to the target time.

7. The device according to claim 5, characterized in that, The target fingerprint library acquisition module is further used to delete the invalid fingerprints from the target backup fingerprint library and add the fingerprints of the new data blocks to the target backup fingerprint library to obtain the target fingerprint library at the target time.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

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

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

Citation Information

Patent Citations

  • Method for deleting repeated data on line during data backup

    CN112698990A