CN114153652A - Directory backup integrity detection method and device - Google Patents

Directory backup integrity detection method and device Download PDF

Info

Publication number
CN114153652A
CN114153652A CN202010929169.0A CN202010929169A CN114153652A CN 114153652 A CN114153652 A CN 114153652A CN 202010929169 A CN202010929169 A CN 202010929169A CN 114153652 A CN114153652 A CN 114153652A
Authority
CN
China
Prior art keywords
directory
information
information fingerprint
backup
fingerprint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010929169.0A
Other languages
Chinese (zh)
Inventor
唐德平
罗文敏
张洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to CN202010929169.0A priority Critical patent/CN114153652A/en
Publication of CN114153652A publication Critical patent/CN114153652A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of data backup, in particular to a directory backup integrity detection method and device. The method comprises the following steps: determining an object under a first directory, wherein the object comprises one or all of a file and a subdirectory; determining an information fingerprint of the first directory according to the characteristic information of the object; receiving an information fingerprint of a second directory from the target device, the second directory being generated by the target device in response to a backup operation initiated by the source device for the first directory; comparing the information fingerprint of the first directory with the information fingerprint of the second directory; when the information fingerprint of the first directory matches the information fingerprint of the second directory, it is determined that the first directory is backed up. The method can generate the information fingerprint of the directory according to the characteristic information of the object under the directory, and further can determine whether the directory is completely backed up or not by comparing the information fingerprint of the directory with the information fingerprint of the backup directory of the directory, thereby quickly detecting the backup integrity of the directory.

Description

Directory backup integrity detection method and device
Technical Field
The application relates to the technical field of data backup, in particular to a directory backup integrity detection method and device.
Background
With the popularity of cloud services, a user may perform cloud backup (cloud backup and recovery) on data in a local file system (file system), that is, synchronously archive local data in a Cloud Storage Service (CSS).
In order to avoid missing of cloud backup, whether a backed-up directory in the local file system is consistent with a backup directory in the cloud storage service needs to be detected. Therefore, a method for rapidly detecting the integrity of the directory backup is needed.
Disclosure of Invention
The embodiment of the application provides a directory backup integrity detection method and device, which can be used for rapidly detecting the integrity of a target backup.
In a first aspect, an embodiment of the present application provides a directory backup integrity detection method, which is applied to a source device having a file system, where the file system includes a first directory; the method comprises the following steps: determining an object under a first directory, wherein the object comprises one or all of a file and a subdirectory; determining an information fingerprint of the first directory according to the characteristic information of the object; receiving an information fingerprint of a second directory from the target device, the second directory being generated by the target device in response to a backup operation initiated by the source device for the first directory; comparing the information fingerprint of the first directory with the information fingerprint of the second directory; when the information fingerprint of the first directory matches the information fingerprint of the second directory, it is determined that the first directory is backed up.
That is to say, the information fingerprint of the directory may be generated according to the characteristic information of the object under the directory, and then whether the directory has been completely backed up may be determined by comparing the information fingerprint of the directory with the information fingerprint of the backup directory of the directory, so as to quickly detect the integrity of the backup of the directory.
In one possible implementation, the method further includes: comparing the information fingerprint of the third directory with the information fingerprint of the fourth directory; the third directory is a subdirectory of the first directory, and the information fingerprint of the third directory is determined by the characteristic information of the object under the third directory; the fourth directory is a subdirectory of the second directory; when the information fingerprint of the third directory matches the information fingerprint of the fourth directory, it is determined that the third directory is backed up.
That is to say, in the implementation manner, the integrity detection of the directories and the sub-directories of the directories can be independently performed, and further the integrity detection of each directory can be concurrently performed, so that the detection efficiency of the integrity of the directory backup is improved.
In one possible implementation, determining the information fingerprint of the first directory according to the feature information of the object includes: performing hash operation on the characteristic information of the object to obtain at least one hash value; setting the bit value of at least one bit in the bloom filter according to the at least one hash value; the at least one hash value and the at least one bit value are in one-to-one correspondence.
In a possible implementation manner, the object under the first directory includes n layers of child nodes of the first directory; performing a hash operation on the feature information of the object to obtain at least one hash value includes: performing hash operation on the characteristic information of a first layer of sub-nodes in the n layers of sub-nodes to obtain k hash values corresponding to the first layer of sub-nodes; setting the bit value of at least one bit in the bloom filter according to the at least one hash value comprises: setting bit values of n x k bits in the bloom filter according to the n x k hash values to obtain an information fingerprint of the first directory; the n × k hash values are formed by k hash values corresponding to each layer of sub-nodes in the n layers of sub-nodes, and the positions of the n × k bits in the bloom filter correspond to the n × k hash values one by one.
In a possible implementation manner, performing hash operation on feature information of a first layer of child nodes in n layers of child nodes to obtain k hash values corresponding to the first layer of child nodes includes: converting the characteristic information of the first layer of sub-nodes into a first array; and performing hash operation on the first array by using k independent hash functions to obtain k hash values, wherein the hash functions in the k independent hash functions correspond to the hash values in the k hash values one by one.
In one possible implementation, the feature information of the first layer child node includes at least one feature; converting the feature information of the first layer of child nodes into a first array comprises: converting a first feature of the at least one feature into a first bit string by using character encoding; converting the first bit string into a first integer; wherein the first integer is used as an element in the first array.
In one possible implementation, the characteristic information of the object includes one or more of the following:
name of object, data size of object, type of object.
In a possible implementation manner, the object includes a first sub-directory of the first directory, and the data size of the first sub-directory is a preset fixed value.
In a possible implementation manner, the object includes a first file under the first directory, and the data size of the first file is the size of the first file.
In one possible implementation, the method further includes: when the information fingerprint of the first directory is not matched with the information fingerprint of the second directory, determining that the first directory has no complete backup; a prompt is provided to the user indicating that the first directory has not been fully backed up.
That is to say, in this implementation manner, when it is determined that the first directory does not have a complete backup, the user may be prompted, so that the user performs a backup of the first directory again, and the experience of the user backup operation is improved.
In one possible implementation, the method further includes: when the information fingerprint of the first directory is not matched with the information fingerprint of the second directory, determining that the first directory has no complete backup; the backup operation for the first directory is performed again.
That is, in this implementation manner, when it is determined that the first directory has not been completely backed up, the source device may automatically perform the backup operation for the first directory again, so that the complete backup for the first directory may be completed as soon as possible.
In one possible implementation, the source device may set the information fingerprint of the first directory as a file under the first directory.
Illustratively, the file does not participate in the updating or generation of the information fingerprint of the first directory, and is not sent to the target device at the time of the backup of the first directory. In one example, the file may be a hidden file under the first directory. In one example, the file name of the file is a preset private name. Wherein the source device may treat the file having the private name as a file not participating in the information fingerprint update and a file not backed up.
In a second aspect, an embodiment of the present application provides a directory backup integrity detection method, which is applied to a target device, and the method includes: responding to a backup operation initiated by the source equipment and aiming at a first directory of the source equipment, and generating a second directory according to the first directory; determining an object under a second directory, wherein the object comprises one or all of a file and a subdirectory; determining an information fingerprint of the second directory according to the characteristic information of the object; and sending the information fingerprint of the second directory to the source device, so that the source device determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory.
That is to say, the target device may generate the information fingerprint of the backup directory according to the feature information of the object in the backup directory, and send the information fingerprint of the backup directory to the source device, so that the source device may determine whether the source directory has been completely backed up by comparing the information fingerprint of the backup directory with the information fingerprint of the source directory of the backup directory, thereby quickly detecting the integrity of the directory backup.
In one possible implementation, the target device may set the information fingerprint of the second directory as a file under the second directory. The source device may set the information fingerprint of the first directory as a file under the first directory.
Illustratively, the file does not participate in the updating or generation of the information fingerprint of the second directory. In one example, the file may be a hidden file under the first directory. In one example, the file name of the file is a preset private name. Wherein the source device may treat the file having the private name as a file not participating in the information fingerprint update.
In a third aspect, an embodiment of the present application provides a directory backup integrity detection apparatus, configured to a source device having a file system, where the file system includes a first directory; the device comprises: the first determining unit is used for determining an object under the first directory, wherein the object comprises one or all of a file and a subdirectory; a second determining unit configured to determine an information fingerprint of the first directory based on the feature information of the object; a receiving unit, configured to receive an information fingerprint of a second directory from a target device, where the second directory is generated by the target device in response to a backup operation initiated by a source device for a first directory; a comparison unit for comparing the information fingerprint of the first directory with the information fingerprint of the second directory; and a third determining unit for determining that the first directory is backed up when the information fingerprint of the first directory and the information fingerprint of the second directory match.
In a possible implementation manner, the comparison unit is further configured to compare the information fingerprint of the third directory with the information fingerprint of the fourth directory; the third directory is a subdirectory of the first directory, and the information fingerprint of the third directory is determined by the characteristic information of the object under the third directory; the fourth directory is a subdirectory of the second directory; and the third determining unit is further used for determining that the third catalogue is backed up when the information fingerprint of the third catalogue is matched with the information fingerprint of the fourth catalogue.
In one possible implementation, the characteristic information of the object includes any one or more of the following:
name of object, data size of object, type of object.
In a possible implementation, the apparatus further includes a providing unit; the third determining unit is further used for determining that the first directory has no complete backup when the information fingerprint of the first directory is not matched with the information fingerprint of the second directory; and the providing unit is used for providing prompt information for the user, and the prompt information is used for indicating that the first directory has no complete backup.
In one possible implementation, the apparatus further includes an execution unit; the third determining unit is further used for determining that the first directory has no complete backup when the information fingerprint of the first directory is not matched with the information fingerprint of the second directory; and the execution unit is used for executing the backup operation aiming at the first directory again.
In a possible implementation manner, the second determining unit is further configured to set the information fingerprint of the first directory as a file under the first directory.
It will be appreciated that the apparatus provided by the third aspect is arranged to perform the method provided by the first aspect, and therefore, reference is made to the corresponding advantages described above.
In a fourth aspect, an embodiment of the present application provides an apparatus for detecting integrity of a directory backup, where the apparatus is configured on a target device, and the apparatus includes: the generating unit is used for responding to the backup operation of the first catalog initiated by the source equipment and generating a second catalog; the first determining unit is used for determining an object under the second directory, wherein the object comprises one or all of a file and a subdirectory; a second determining unit configured to determine an information fingerprint of the second directory based on the feature information of the object; and the sending unit is used for sending the information fingerprint of the second directory to the source equipment so that the source equipment determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory.
In a possible implementation manner, the second determining unit is further configured to set the information fingerprint of the second directory as a file in the second directory.
It will be appreciated that the apparatus provided by the fourth aspect is arranged to perform the method provided by the second aspect, and therefore, reference can be made to the corresponding advantages described above.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the electronic device is running, the processor executes the computer instructions, so that the electronic device performs the method provided by the first aspect.
In a sixth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a transceiver; the memory is used for storing computer instructions; when the electronic device is running, the processor executes the computer instructions, so that the electronic device performs the method provided by the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method provided in the first aspect or the method provided in the second aspect.
In an eighth aspect, the present application provides a computer program product, where the computer program product includes program code for implementing the method provided in the first aspect or the method provided in the second aspect when the program code is executed by a processor in an electronic device.
The directory backup integrity detection method and device provided by the embodiment of the application can judge whether the directory in the source device is consistent with the directory in the target device according to the information fingerprint of the directory in the source device and the information fingerprint of the directory in the target device. Therefore, the directory backup integrity detection can be realized without traversing files in the directory, and the efficiency of the directory backup integrity detection is improved.
Drawings
FIG. 1 is a schematic diagram of a network architecture;
FIG. 2 is a schematic diagram of a directory structure provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a network architecture to which embodiments of the present application are applicable;
FIG. 4 is a schematic diagram illustrating a directory information fingerprint generation according to an embodiment of the present disclosure;
FIG. 5A is a diagram illustrating a directory structure provided by an embodiment of the present application;
FIG. 5B is a diagram illustrating a directory structure according to an embodiment of the present application;
fig. 6 is a flowchart of a directory backup integrity detection method according to an embodiment of the present application;
fig. 7 is a flowchart of a directory backup integrity detection method according to an embodiment of the present application;
fig. 8 is a schematic diagram of a directory backup integrity detection apparatus according to an embodiment of the present application;
fig. 9 is a schematic diagram of a directory backup integrity detection apparatus according to an embodiment of the present application;
fig. 10 is a schematic block diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be described below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the specification. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise.
Wherein in the description of the present specification, "/" indicates a meaning, for example, a/B may indicate a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present specification, "a plurality" means two or more.
In the description of the present specification, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
For full backup in data backup, when performing data backup operation, the source device needs to traverse the directory to be backed up to upload files of the subdirectory under the directory, i.e. the files under the directory, to the backup target device. When the data backup is finished, it is necessary to determine whether the files in the backed-up directory and the files in each level of subdirectory under the backed-up directory are missing.
The source device may refer to a local device, and data in a file system thereof may be backed up to the backup target device. The backup target device is a target device for data backup, and can receive and store data of the source device. The backup target device may be referred to as a target device in the embodiments of the present application. The data that needs to be backed up in the source device may be referred to as backed up data. Generally, the data to be backed up is a directory and files in subdirectories of various levels below the directory. Thus, the backed-up data may also become a backed-up directory. Accordingly, the directory generated by the target device in response to the operation of data backup for the backed-up directory may be referred to as a backup directory.
When the directory which is backed up on the source device side changes such as adding files newly, modifying files or deleting files, the changed backed-up directory can be subjected to incremental backup. After performing the incremental backup, it is also necessary to determine whether there is a file missing in the directory (which may also be referred to as a backup directory) in which the incremental backup has occurred.
Referring to fig. 1, according to one scheme, when detecting whether a file in a backed-up directory is missing, a backup filing application (backup app) traverses files in the backed-up directory and files in sub-files at different levels of the backed-up directory, and determines whether the traversed files and the files in the target device have a corresponding mapping relationship. If one or more traversed files are not mapped in the target equipment, the backup directory can be judged to be inconsistent with the corresponding directory in the target equipment, which indicates that file omission occurs in the backup process and the directory backup is incomplete.
The embodiment of the present application provides a directory backup integrity detection method, which can determine whether a directory in a source device and a directory in a target device are consistent according to an information fingerprint (information fingerprint) of the directory in the source device and an information fingerprint of the directory in the target device. Therefore, the directory backup integrity detection can be realized without traversing files in the directory, and the efficiency of the directory backup integrity detection is improved.
First, concepts to which embodiments of the present application may relate will be described.
A directory (directory) may be understood as a container that may hold one or more objects. Illustratively, in
Figure BDA0002669577250000051
A directory may also be understood as a folder under the operating system. An object in a directory may be a file (file) or a directory. Among them, the directory B of the object located under the directory a may be referred to as a subdirectory of the directory a. A directory directly below directory a may be referred to as a first level subdirectory of directory a. That is, the first level subdirectory of directory a is located only in directory a, and not in the other subdirectories of directory a. For convenience of description, the files directly under the directory a and the first-level subdirectory of the directory a may be collectively referred to as a level of child nodes of the directory a or child nodes directly under the directory a. A file directly under directory a is a file that is located only under directory a1 and not under a sub-directory of directory a.
For example, fig. 2 shows a schematic diagram of a directory structure. Among them, the file a1, the file a2, the file A3 and the directory B are directly under the directory a1, and thus the file a1, the file a2, the file A3 and the directory B are one layer of child nodes of the directory a. Since the files B1, B2, and B3 are located directly under the directory B and not directly under the directory a, the files B1, B2, and B3 are not children of the directory a.
Fig. 3 illustrates a network architecture to which the directory backup integrity detection method provided in the embodiment of the present application is applicable.
As shown in fig. 3, the network architecture may include a source device and a target device connected by a network.
In some embodiments, the source device may be a local device and the target device may be a remote device. The source device and the target device may be connected via a network (e.g., the internet). For example, the source device may be a terminal device such as a mobile phone, a personal computer, a tablet computer, and a wearable device, and the source device may also be a local Virtual Machine (VM). The target device may be a cloud device, e.g., a cloud storage service. The cloud storage service can store user data, and specifically, the cloud storage service can coordinate a large number of storage hardware nodes through a distributed storage system, provide data storage service externally in parallel, and provide a service-level aggregation (SLA) with high reliability and high availability for users.
In some embodiments, the source device may be a remote device, such as a device that may be a user-remotely controllable virtual machine, cell phone, personal computer, server, or the like. The target device may be a local device or a remote device. For example, the target device may be a local terminal device or a server, and the target device may also be a cloud device, for example, a cloud storage service.
In some other embodiments, the source device and the target device may both be remote devices, for example, the source device is a virtual machine of a public cloud and the target device is a network disk of the public cloud.
The source device may provide a file system to store the user's files. In particular, the file system may include one or more directories, such as directory a. Different files may be located under different directories or the same directory in the one or more directories. The source device may initiate a backup operation for one or more directories in its file system, e.g., a backup operation for directory a to send files under directory a to the target device, and files under directory a hierarchical subdirectories to the target device (if directory a has subdirectories and there are files under subdirectories).
The source device may be configured with an information fingerprint generation module. The information fingerprint generation module may generate an information fingerprint for a directory in the file system. Illustratively, the source device may run a backup archive application (backup app) to enable the backup of files in the source device file system. Wherein the information fingerprint generation module may be a module in a backup archiving application. For example, when the backup archiving application runs and backs up the directory a, that is, when the source device sends a backup operation on the directory a, the information fingerprint generation module may generate the information fingerprint of the directory a according to a layer of sub-nodes of the directory a, and may also generate the information fingerprint of a subdirectory of the directory a (if the directory a has a subdirectory) according to a layer of sub-nodes of the subdirectory of the directory a. The information fingerprint generation process of the directory a and the sub-directories of the directory a will be specifically described below, and will not be described herein again.
When the source device initiates a backup operation for directory a, the target device may generate a backup directory for directory a in response to the backup operation, and receive files under directory a and files under each level of subdirectories of directory a (if directory a has subdirectories and there are files under subdirectories) sent by the source device. This backup directory may be referred to as directory a'.
When the target device can be set with an information fingerprint generation module. The information fingerprint generating module can generate the information fingerprint of the directory a ' according to the child nodes of the directory a ', and can also generate the information fingerprint of the subdirectory of the directory a ' according to the child nodes of the subdirectory of the directory a ' (if the directory a ' has the child directories). The information fingerprint generation process of the directory a 'and the sub-directories of the directory a' will be described in detail below, and will not be described herein again.
The target device may send the information fingerprint of directory a 'and the information fingerprints of the subdirectories of directory a' to the source device. The source device may compare the information fingerprint of directory a' to the information fingerprint of directory a. If the information fingerprint of the directory a 'is the same as the information fingerprint of the directory a, it can be determined that the directory a is consistent with the directory a', that is, it is determined that one layer of child nodes of the directory a has completed backup. The comparison of the information fingerprints of the subdirectories of directory a and the information fingerprints of the subdirectories of directory a' may then proceed. If so, it may be determined that a child node of a level of a child directory of directory a has completed backup. Thus, the backup integrity of directory a may be detected.
Next, taking directory a as an example, an information fingerprint generation scheme of a directory on the source device side is described.
Returning to FIG. 2, one of directory AThe tier children have file A1, file A2, file A3, and directory B. In the implementation of the algorithm, for any directory, the source device may define a set of one-layer child nodes S ═ { p } for that directory1,…,pi… } in which piRepresenting the ith level child node of the directory. For directory a, its tier child node S ═ { p ═ p1,p2,p3,p4In which p is1Can represent the file A1, p2Can represent the file A2, p3Can represent the file A3, p4Directory B may be represented.
The source device may determine characteristic information for each layer of child nodes of the directory. For example, the characteristic information of a level of child nodes may include one or more of a name, a data size, a type, and a modification time of the level of child nodes. The name, data size, type and modification time of a layer of child nodes can be referred to as the characteristics of the layer of child nodes. That is, the characteristic information of a layer of child nodes may include one or more characteristics of the layer of child nodes. In the embodiment of the present application, the characteristics of a layer of child nodes may also be referred to as information factors.
When a layer of child nodes is a file, the data size of the file is the size of the file, and the type of the file is the format of the file (for example, the format TXT of a text file, the format JPG of an image file, the format AVI of a video file, etc.). When a child node of one layer is a directory, the data size of the directory is a preset fixed value, for example, 0. The directory type is a folder. Specifically, taking a layer of child nodes of the directory a as an example, the file a1 may be set as a text file of TXT, the file size is 1kb, and the modification time is XX month XX day 10: 12. the characteristic information of the file a1 may be: TXT, 1kb, XX year XX month XX day 10: 12. The modification time of catalog B can be set to XX year XX month XX day 10: 15. the characteristic information of directory B is: folder, 0kb, XX month XX day 10 of XX year: 15.
in this manner, the source device may determine characteristic information for each layer of child nodes of the directory.
The information fingerprint of the directory may be generated based on characteristic information of a level of child nodes of the directory.
For example, the information fingerprint of the directory may be generated according to the feature information of all the sub-nodes of one layer of the directory. Taking directory a shown in fig. 2 as an example, the information fingerprint of directory a may be generated from the characteristic information of file a1, file a2, file A3, and directory B.
Next, an example introduces a process of generating an information fingerprint of a directory based on feature information of a level of child nodes of the directory.
As described above, the characteristic information of one layer of child nodes may include one or more information factors (characteristics). Each information factor may be converted to a number. Illustratively, the information factor may be represented by a character, and thus, the information factor may be converted into a bit string according to character encoding (character encoding). The bit string may then be converted to numbers in a binary and decimal conversion rule. For example, "0010" converts to the number 2 and "0110" converts to the number 6. In one example, the character code may be American Standard code for information exchange (ASCII).
Referring to fig. 4, if the feature information of a level of child nodes includes a plurality of information factors, a plurality of numbers can be obtained, and the plurality of numbers can form an array I. That is, the numbers are elements of the number I. In addition, if the feature information of a layer of child nodes includes 1 information factor, an array may also be obtained, and the elements in the array are the numbers converted by the information factor. Illustratively, array I may be represented as: i ═ a1,…,ai,…]Wherein a isiIs the number of the ith information factor conversion of the characteristic information of a layer of word nodes. Specifically, taking the file a1 as an example, the characteristic information of the file a1 may be: TXT, 1kb, XX year XX month XX day 10: 12. wherein "TXT", "1 kb", "XX year XX month XX day 10: 12 "are different information factors. "TXT" may be converted to a1"1 kb" can be converted to a2"XX year XX month XX day 10: 12' can be converted into a3. Thus, the document A1 is obtainedThe array I ═ a1,a2,a3,a4]. In the manner described above, an array of files a2 can be obtained.
A bloom filter C may be provided. Bloom filter C has m bits, m being a natural number. In the initial state of the bloom filter, the bit value of each bit of the bloom filter C is 0. A hash function (hash function) group may be provided, which includes k independent hash functions, k being a natural number. The hash value of each of the k independent hash functions is gamma, gamma is an integer, and gamma belongs to [1, m ]. The hash value may also be referred to as an output value.
It should be noted that the bloom filter has a certain false positive rate (FPP), where the false positive rate formula is:
Figure BDA0002669577250000071
wherein n is the number of child nodes in one layer of a directory, k represents the number of hash functions, and m represents the length of bits of the bloom filter.
The maximum number of child nodes on one layer of the directory (generally, the number n of child nodes on one layer of the directory is less than or equal to 65535) and the formula (1) can be considered, and the value of m can be flexibly set so as to reduce the false positive rate to a tolerable range.
When the information fingerprint is generated, one hash function of k independent hash functions is used for hashing an array I to obtain a hash value. Thus, the k independent hash functions respectively hash the array I to obtain k hash values. That is, one level of child nodes may correspond to k hash values. Then, based on the k hash values, the bit value of k bits in the bloom filter C (the bit value of each bit in the bloom filter in the initial state is 0) is set to 1. And the positions of the bits in the k bits in the bloom filter correspond to the hash values in the k hash values one by one. If a directory has n one-level child nodes, each one-level child node in the n one-level child nodes corresponds to k hash values. Thus, the bit values of the bits in the bloom filter may be set according to the k hash values of each one-tier child node. That is, the n one-layer child nodes of the directory correspond to n × k hash values, and the bit value of n × k bits in the bloom filter C may be set to 1 according to the n × k hash values, where the bits in the n × k bits correspond to the hash values in the n × k hash values in one-to-one correspondence with the positions in the bloom filter C.
Specifically, taking directory a as an example, referring to fig. 4, an array of file a1 is hashed by using k independent hash functions, so as to obtain k hash values, i.e., f1, f2, …, and fk. Thus, the bit value of the f1 th bit, the f2 th bit, … th bit and the fkth bit in the bloom filter C can be set to 1. The arrays of the file A2 are respectively hashed by using k independent hash functions to obtain k hash values, namely g1, g2, … and gk. Thus, the bit value of the g1 th bit, g2 th bit, … th bit and gk th bit in the bloom filter C may be set to 1. And respectively hashing the arrays of the file A3 by using k independent hash functions to obtain k hash values, namely h1, h2, … and hk. Thus, the bit values of the h1 th bit, the h2 th bit, … th bit and the hk th bit in the bloom filter C can be set to 1. And respectively hashing the arrays of the file B by using k independent hash functions to obtain k hash values, namely j1, j2, … and jk. Thus, the bit value of the j1 th bit, the j2 th bit, … th bit and the jk th bit in the bloom filter C may be set to 1. The bloom filter C having passed through the aforementioned setting is used as the information fingerprint of the directory a.
Referring to the above-described process for generating information fingerprints for directory a, information fingerprints for other directories may be generated, for example, information fingerprints for directory B may be generated.
The source device may monitor a level of a directory for changes, such as additions, deletions, modifications (e.g., modifying names, formats, etc.). When the change occurs, the information fingerprint of the directory can be regenerated according to a layer of child nodes of the directory after the change occurs. For example, if a file a4 is added to the directory a, and the file a1, the file a2, the file A3, the directory B, and the file a4 are located in a layer of child nodes of the directory a, the information fingerprint may be regenerated according to the characteristic information of the file a1, the file a2, the file A3, the directory B, and the file a4, and the original information fingerprint may be replaced with the regenerated information fingerprint.
In some embodiments, after obtaining the information fingerprint for a directory, the information fingerprint for the directory may be stored under the directory. Referring to fig. 5A, taking directory a and directory B as an example, the information fingerprint of directory a may be stored under directory a, and the information fingerprint of directory B may be stored under directory B. In one example, the information fingerprint of the directory may be stored in the form of a binary file. The binary file may be named with a preset file name C1. In one example, the file name C1 may be ". bitmap". For example, the file name C1 may be a preset file name dedicated to naming information fingerprint of this file. For files generated by other operations (operations other than the above-described directory information fingerprint generation operation, such as a file new operation, etc.), the use of the file name C1 is prohibited; also, the file renaming operation is prohibited from modifying the file name of the file to the file name C1.
It should be noted that the information fingerprint of the directory stored under the directory is not a child node of a layer of the directory. That is, when a file recording an information fingerprint of a directory is stored under the directory, the file does not participate in generation of the information fingerprint of the directory. Illustratively, as described above, the file name of the storage file of the information fingerprint is file name C1, and file name C1 is unique to the storage file of the information fingerprint. At the time of information fingerprint generation, a file having a file name of file name C1 may be identified, and the file may be set not to participate in the generation of the information fingerprint.
In some embodiments, referring to fig. 5B, the source device may be configured with a directory and an information fingerprint correspondence table, which may be used to record the correspondence between the directory and the information fingerprint of the directory. The correspondence between the identity of the directory and the information fingerprint of the directory may be recorded. Wherein the identification of the directory may be represented by the name of the directory and the storage path. For example, directory a may be set as a folder named "patent application" in source device cd, and the identification of directory a may be "C disc-patent application". For example, the directory and the information fingerprint correspondence table may be stored in a directory D, which may be a specially configured directory and is different from the conventional directories of the source devices such as directory a and directory B.
The source device may initiate a backup operation of one or more directories in its file system. A backup operation of a directory may be understood as sending a backup request of the directory to a target device. Taking the backup operation of initiating the directory a as an example, the source device may respond to the selection operation input by the user to place the directory a in a selected state, then respond to the upload operation input by the user to send a backup request of the directory a to the target device, and transmit files under the directory a and files under each level of subdirectory of the directory a, so as to implement manual backup. Or, the source device may send a backup request to the target device at preset time intervals, and transmit files under the directory a and files under each level of subdirectory of the directory a, so as to implement automatic backup. The operation of sending a backup request of the directory a to the target device and transmitting the files under the directory a and the files under each level of subdirectory of the directory a may be referred to as a backup operation of the directory a. For the backup operation, reference may be made to the introduction of the data backup technology in the prior art, and details are not described herein.
Returning to fig. 2, the target device may generate a backup directory of the directory in response to the backup operation of the directory a, and may store the files under the directory a that it receives in the directory a 'and store the files under the sub-directories of each level of the directory a that it receives in the corresponding sub-directories of the directory a', respectively. Reference may be made to the introduction of the data backup technology in the prior art, and details are not described herein.
In the embodiment shown in fig. 5A, that is, in the case where the information fingerprint of directory a is stored in directory a, the information fingerprint of directory a is not backed up when directory a is backed up. That is, while backing up directory a, the source device does not send directory a's information fingerprint to the target device. Illustratively, as described above, the filename of the information fingerprint is the private filename C1. In performing a backup operation, a file having a file name of C1 may be identified so that the file is not sent to the target device.
In some embodiments, the target device may determine whether the backup operation of directory a between the target device and the source device is finished. For example, the target device may determine whether the transmission of the file under the directory a and the file under each level of the subdirectory of the directory a between the target device and the source device is finished, that is, may determine whether the transmission of the data between the target device and the source device is finished. Reference may be made to the introduction of the data backup technology in the prior art, and details are not described herein.
When the backup operation of directory a is finished, the target device may generate information fingerprints of the backup directory of directory a (i.e., directory a '), and generate information fingerprints of the various levels of subdirectories of directory a'. For a specific generation process, reference may be made to the above description of the information fingerprint generation process of the directory a, which is not described herein again.
In some embodiments, each time a file is received and placed under a corresponding directory (i.e., the file is used as a layer of child node of the directory), the target device may generate or update a bloom filter corresponding to the directory according to the feature information of the file. Specifically, the feature information of the file may be converted into an array, the array may be converted into k hash values, and then the bit values of k bits in the bloom filter may be set according to the k hash values. Therefore, each time a new layer of child nodes is added to the directory, the bloom filter corresponding to the directory can be updated according to the new layer of child nodes. When the backup operation is over, the last updated bloom filter may be used as the information fingerprint for the directory.
When the backup operation is finished and the information fingerprints of the backup directories of the directory a and the directory a levels are generated, the target device may send the information fingerprints of the backup directories of the directory a and the directory a levels to the source device.
After receiving the information fingerprints of the directory a and the backup directories of the subdirectories at each level of the directory a, the source device can compare the information fingerprints with the information fingerprints of the corresponding directories in the local file system to judge whether the directories are consistent. It is understood that the source device may record the correspondence between the directory a and its backup directory (i.e., directory a'), or may record the correspondence between the child node of the directory a and the backup directory of the child node. Specifically, the data backup technology can be introduced in the prior art, and is not described herein again.
Still taking directory a as an example, the source device may compare the information fingerprint of directory a with the information fingerprint of directory a'. If they are consistent, it can be determined that directory a and directory a' are consistent, i.e. a layer of child nodes of directory a has been successfully backed up. Thereafter, or at the same time, it may be compared whether the information fingerprint of one layer of the subdirectory of the directory a (directory B) is identical or matches with the information fingerprint of the backup directory of the one layer of the subdirectory. If the directory B and the backup directory of the directory B are consistent or matched, it may be determined that the backup directory of the directory B is consistent, that is, a layer of child nodes of the directory B have been successfully backed up. By analogy, information comparison between each level of subdirectories of the directory A and the corresponding backup directories can be completed, comparison results are consistent or matched, and the files under the directory A and the files under each level of subdirectories of the directory A can be determined to be successfully backed up. For example, the matching here may mean the same, or may mean that the similarity is higher than a preset threshold. In one example, the predetermined threshold may be 99% or 95% or 90%, etc., which are not listed here.
It should be noted that, for the backup of a single file, the cloud storage service may provide a data integrity check mechanism, which may ensure that a file received by the target device is consistent with a file sent by the source device. Therefore, when a directory is consistent with its backup directory, it can be determined that a layer of child nodes under the directory has been successfully backed up.
In one illustrative example, the information fingerprint that may be compared to the information fingerprint of a backup directory for the directory may specifically be: and carrying out bitwise XOR operation on the information fingerprint of the directory and the information fingerprint of the backup directory of the directory. If the result of the bitwise XOR operation is 0, indicating that the directory is consistent with the backup directory of the directory; otherwise, it indicates inconsistency.
In one illustrative example, the information fingerprint that may be compared to the information fingerprint of a backup directory for the directory may specifically be: and carrying out bitwise exclusive OR operation on the information fingerprint of the directory and the information fingerprint of the backup directory of the directory. If the results of the bitwise exclusive OR operation are not 0, indicating that the directory is consistent with the backup directory of the directory; otherwise, it indicates inconsistency.
For example, when the information fingerprint of directory a and the information fingerprint of directory a' are inconsistent, the source device may provide a prompt indicating that directory a and the backup directory of directory a are inconsistent, so that the user may decide whether to re-backup directory a or tolerate the backup directory inconsistency of directory a and directory a. The prompt message may be a voice prompt message or a pop-up window including information indicating that directory a and the backup directory of directory a are inconsistent.
For example, when the information fingerprint of directory a and the information fingerprint of directory a' are not consistent, the source device may automatically reinitiate a backup operation for directory a.
If the information fingerprint of the subdirectory A is inconsistent with the information fingerprint of the backup directory of the subdirectory, it indicates that one or more of the layer of sub-nodes in the subdirectory is not successfully backed up. The source device may provide a prompt indicating that the subdirectory information fingerprint is inconsistent with the backup directory for that subdirectory. Alternatively, the source device may automatically reinitiate the backup operation for the subdirectory.
Therefore, the consistency of the directory and the backup directory can be rapidly detected by the directory backup integrity detection method provided by the embodiment of the application. Specific advantages are as follows.
a, improving the integrity checking performance of the directory backup: for a file system, there are n directories, with m files under each directory. The conventional inspection method traverses the file time complexity of O (n) under all directories^2) (ii) a According to the directory backup integrity detection method provided by the embodiment of the application, because the directory only needs to be traversed, the file under the directory does not need to be traversed, and the time complexity is O (n).
b, the reusability of the directory information fingerprint is high: once the directory information fingerprint is generated, the directory information fingerprint can be read for multiple times, and reusability is high. If the operation of adding and deleting the modified file exists in the directory, only the information fingerprint of the directory needs to be updated, and the information fingerprint of the ancestor directory or the descendant directory cannot be influenced.
Referring to fig. 6, an embodiment of the present application provides a directory backup integrity detection method, which is applicable to a source device having a file system, where the file system includes a first directory. As shown in fig. 6, the method includes the following steps.
Step 601, determining an object under the first directory, wherein the object comprises one or all of a file and a subdirectory. Specifically, reference may be made to the above description of the embodiment shown in fig. 2, which is not described herein again.
Step 602, determining the information fingerprint of the first directory according to the characteristic information of the object. Specifically, reference may be made to the above description of the embodiments shown in fig. 3 or fig. 4, which is not described herein again.
Step 603, receiving an information fingerprint of a second directory from the target device, wherein the second directory is generated by the target device in response to the backup operation initiated by the source device for the first directory. Specifically, reference may be made to the above description of the embodiments shown in fig. 3 or fig. 4, which is not described herein again.
Step 604, comparing the information fingerprint of the first directory with the information fingerprint of the second directory. Specifically, reference may be made to the descriptions of the above embodiments, which are not described herein again.
Step 605, when the information fingerprint of the first directory matches the information fingerprint of the second directory, determining that the first directory is backed up. Specifically, reference may be made to the descriptions of the above embodiments, which are not described herein again.
In some embodiments, the method further comprises: comparing the information fingerprint of the third directory with the information fingerprint of the fourth directory; the third directory is a subdirectory of the first directory, and the information fingerprint of the third directory is determined by the characteristic information of an object under the third directory; the fourth directory is a subdirectory of the second directory and corresponds to the third directory; determining that the third directory is backed up when the information fingerprint of the third directory and the information fingerprint of the fourth directory match. Specifically, reference may be made to the descriptions of the above embodiments, which are not described herein again.
In some embodiments, the characteristic information of the object includes one or more of:
name of the object, data size of the object, type of the object.
In some embodiments, the method further comprises: determining that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match; providing prompt information, wherein the prompt information is used for indicating that the first directory has no complete backup.
In some embodiments, the method further comprises: determining that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match; and executing the backup operation aiming at the first directory again.
In some embodiments, the source device may set the information fingerprint of the first directory as a file under the first directory. Illustratively, the file does not participate in the updating or generation of the information fingerprint of the first directory, and is not sent to the target device at the time of the backup of the first directory. In one example, the file may be a hidden file under the first directory. In one example, the file name of the file is a preset private name. Wherein the source device may treat the file having the private name as a file not participating in the information fingerprint update and a file not backed up. Specifically, reference may be made to the above description, which is not repeated herein.
The directory backup integrity detection method provided by the embodiment of the application can judge whether the directory in the source device is consistent with the directory in the target device according to the information fingerprint of the directory in the source device and the information fingerprint of the directory in the target device. Therefore, the directory backup integrity detection can be realized without traversing files in the directory, and the efficiency of the directory backup integrity detection is improved.
Referring to fig. 7, an embodiment of the present application provides a directory backup integrity detection method, which can be applied to a target device. The method comprises the following steps.
Step 701, in response to a backup operation initiated by a source device for a first directory of the source device, a second directory is generated according to the first directory. Specifically, reference may be made to the above description of the embodiment shown in fig. 3, which is not described herein again.
Step 702, determining an object under the second directory, where the object includes one or all of a file and a subdirectory.
Step 703, determining the information fingerprint of the second directory according to the feature information of the object. Specifically, reference may be made to the above description of the embodiment shown in fig. 2, which is not described herein again.
Step 704, sending the information fingerprint of the second directory to the source device, so that the source device determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory. Specifically, reference may be made to the descriptions of the above embodiments, which are not described herein again.
In some embodiments, the target device may set the information fingerprint of the second directory as a file under the second directory. The source device may set the information fingerprint of the first directory as a file under the first directory.
By the directory backup integrity detection method provided by the embodiment of the application, the target device can generate the information fingerprint of the backup directory according to the characteristic information of the object under the backup directory and send the information fingerprint of the backup directory to the source device, so that the source device can determine whether the source directory is completely backed up by comparing the information fingerprint of the backup directory with the information fingerprint of the source directory of the backup directory.
Referring to fig. 8, an embodiment of the present application provides a directory backup integrity detection apparatus 800, which may be configured on a source device having a file system, where the file system may include a first directory. As shown in fig. 8, the apparatus 800 includes:
a first determining unit 810, configured to determine an object under the first directory, where the object includes one or all of a file and a sub-directory;
a second determining unit 820, configured to determine an information fingerprint of the first directory according to the feature information of the object;
a receiving unit 830, configured to receive an information fingerprint of a second directory from a target device, where the second directory is generated by the target device in response to a backup operation initiated by the source device for the first directory;
a comparing unit 840 configured to compare the information fingerprint of the first directory with the information fingerprint of the second directory;
a third determining unit 850, configured to determine that the first directory is backed up when the information fingerprint of the first directory and the information fingerprint of the second directory match.
The functions of each functional unit of the directory backup integrity detection apparatus provided in the embodiment of the present application may refer to the function implementation of the source device in each method embodiment shown in fig. 6 or each embodiment shown in fig. 1 to 5B, and are not described herein again.
The directory backup integrity detection device provided by the embodiment of the application can judge whether the directory in the source device is consistent with the directory in the target device according to the information fingerprint of the directory in the source device and the information fingerprint of the directory in the target device. Therefore, the directory backup integrity detection can be realized without traversing files in the directory, and the efficiency of the directory backup integrity detection is improved.
Referring to fig. 9, an embodiment of the present application provides a directory backup integrity detection apparatus 900, which may be configured in a target device, and the apparatus includes:
a generating unit 910, configured to generate a second directory according to a first directory of a source device in response to a backup operation initiated by the source device for the first directory of the source device;
a first determining unit 920, configured to determine an object under the second directory, where the object includes one or all of a file and a sub-directory;
a second determining unit 930, configured to determine an information fingerprint of the second directory according to the feature information of the object;
a sending unit 940, configured to send the information fingerprint of the second directory to the source device, so that the source device determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory.
The functions of each functional unit of the directory backup integrity detection apparatus provided in the embodiment of the present application may refer to the function implementation of the target device in each method embodiment shown in fig. 7 or each embodiment shown in fig. 2 to 5B, and are not described herein again.
By the directory backup integrity detection device provided by the embodiment of the application, the target device can generate the information fingerprint of the backup directory according to the characteristic information of the object under the backup directory and send the information fingerprint of the backup directory to the source device, so that the source device can determine whether the source directory is completely backed up by comparing the information fingerprint of the backup directory with the information fingerprint of the source directory of the backup directory.
The embodiment of the application provides electronic equipment. Referring to fig. 10, the electronic device includes a processor 1010, a memory 1020, and a transceiver 1030. Memory 1020 stores instructions that are executable by processor 1010. When executed by processor 1010, the instructions may perform the operations performed by the source device in the method embodiments described above. In particular, processor 1010 may perform data processing operations and transceiver 1030 may perform data transmission and/or reception operations.
Specific implementation of each component/device of the electronic device in the embodiment of the present application can be implemented by referring to each method embodiment shown in fig. 6, and details are not described here.
The electronic device provided by the embodiment of the application can be used as a source device, and whether the directory in the source device is consistent with the directory in the target device can be judged according to the information fingerprint of the directory in the source device and the information fingerprint of the directory in the target device. Therefore, the directory backup integrity detection can be realized without traversing files in the directory, and the efficiency of the directory backup integrity detection is improved.
The embodiment of the application provides electronic equipment. Still referring to fig. 10, the electronic device includes a processor 1010, a memory 1020, and a transceiver 1030. Memory 1020 stores instructions that are executable by processor 1010. When executed by processor 1010, the instructions may perform the operations performed by the target device in the method embodiments described above. In particular, processor 1010 may perform data processing operations and transceiver 1030 may perform data transmission and/or reception operations.
Specific implementation of each component/device of the electronic device in the embodiment of the present application can be implemented by referring to each method embodiment shown in fig. 7, and details are not described here.
The electronic device provided by the embodiment of the application can be used as a target device, can generate the information fingerprint of the backup catalog according to the characteristic information of the object in the backup catalog, and sends the information fingerprint of the backup catalog to the source device, so that the source device can determine whether the source catalog is completely backed up by comparing the information fingerprint of the backup catalog with the information fingerprint of the source catalog of the backup catalog.
It is understood that the processor in the embodiments of the present application may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general purpose processor may be a microprocessor, but may be any conventional processor.
The method steps in the embodiments of the present application may be implemented by hardware, or may be implemented by software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in Random Access Memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.

Claims (19)

1. The directory backup integrity detection method is applied to a source device with a file system, wherein the file system comprises a first directory; the method comprises the following steps:
determining an object under the first directory, wherein the object comprises one or all of a file and a subdirectory;
determining an information fingerprint of the first directory according to the characteristic information of the object;
receiving an information fingerprint of a second directory from a target device, the second directory generated by the target device in response to a backup operation initiated by the source device for the first directory;
comparing the information fingerprint of the first directory with the information fingerprint of the second directory;
determining that the first directory is backed up when the information fingerprint of the first directory and the information fingerprint of the second directory match.
2. The method of claim 1, further comprising:
comparing the information fingerprint of the third directory with the information fingerprint of the fourth directory; the third directory is a subdirectory of the first directory, and the information fingerprint of the third directory is determined by the characteristic information of an object under the third directory; the fourth directory is a subdirectory of the second directory;
determining that the third directory is backed up when the information fingerprint of the third directory and the information fingerprint of the fourth directory match.
3. The method according to claim 1 or 2, wherein the characteristic information of the object comprises one or more of:
name of the object, data size of the object, type of the object.
4. The method according to any one of claims 1 to 3, further comprising:
determining that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match;
and providing prompt information for a user, wherein the prompt information is used for indicating that the first directory has no complete backup.
5. The method according to any one of claims 1 to 4, further comprising:
determining that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match;
and executing the backup operation aiming at the first directory again.
6. The method according to any one of claims 1 to 5, wherein the source device places the information fingerprint of the first directory as a file under the first directory.
7. A directory backup integrity detection method is applied to a target device, and comprises the following steps:
responding to a backup operation initiated by a source device and aiming at a first directory of the source device, and generating a second directory according to the first directory;
determining an object under the second directory, wherein the object comprises one or all of a file and a subdirectory;
determining an information fingerprint of the second directory according to the characteristic information of the object;
and sending the information fingerprint of the second directory to the source device, so that the source device determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory.
8. The method of claim 7, wherein the target device places the information fingerprint of the second directory as a file under the second directory.
9. The directory backup integrity detection device is characterized by being configured on a source device with a file system, wherein the file system comprises a first directory; the device comprises:
a first determining unit, configured to determine an object under the first directory, where the object includes one or all of a file and a sub-directory;
a second determining unit, configured to determine an information fingerprint of the first directory according to feature information of the object;
a receiving unit, configured to receive an information fingerprint of a second directory from a target device, where the second directory is generated by the target device in response to a backup operation initiated by the source device for the first directory;
a comparison unit for comparing the information fingerprint of the first directory with the information fingerprint of the second directory;
a third determining unit configured to determine that the first directory is backed up when the information fingerprint of the first directory and the information fingerprint of the second directory match.
10. The apparatus of claim 9,
the comparison unit is also used for comparing the information fingerprint of the third catalogue with the information fingerprint of the fourth catalogue; the third directory is a subdirectory of the first directory, and the information fingerprint of the third directory is determined by the characteristic information of an object under the third directory; the fourth directory is a subdirectory of the second directory;
the third determining unit is further configured to determine that the third directory is backed up when the information fingerprint of the third directory and the information fingerprint of the fourth directory match.
11. The apparatus of claim 9 or 10, wherein the characteristic information of the object comprises one or more of:
name of the object, data size of the object, type of the object.
12. The apparatus according to any one of claims 9-11, wherein the apparatus further comprises a providing unit;
the third determining unit is further configured to determine that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match;
the providing unit is used for providing prompt information for a user, and the prompt information is used for indicating that the first directory has no complete backup.
13. The apparatus according to any of claims 9-12, wherein the apparatus further comprises an execution unit;
the third determining unit is further configured to determine that the first directory has no full backup when the information fingerprint of the first directory and the information fingerprint of the second directory do not match;
the execution unit is configured to execute the backup operation for the first directory again.
14. The apparatus according to any one of claims 9 to 13, wherein the second determining unit is further configured to set the information fingerprint of the first directory as a file under the first directory.
15. A directory backup integrity detection apparatus, configured to a target device, the apparatus comprising:
the generating unit is used for responding to a backup operation initiated by a source device and aiming at a first catalogue of the source device, and generating a second catalogue according to the first catalogue;
a first determining unit, configured to determine an object under the second directory, where the object includes one or all of a file and a sub-directory;
a second determining unit, configured to determine an information fingerprint of the second directory according to the feature information of the object;
and the sending unit is used for sending the information fingerprint of the second directory to the source equipment so that the source equipment determines the backup integrity of the first directory by comparing the information fingerprint of the first directory with the information fingerprint of the second directory.
16. The method of claim 15, wherein the second determining unit is further configured to set the information fingerprint of the second directory as a file in the second directory.
17. An electronic device, comprising a processor, a memory, a transceiver;
the memory is to store computer instructions;
the processor executes the computer instructions, when the electronic device is running, to cause the electronic device to perform the method of any of claims 1-6.
18. An electronic device, comprising a processor, a memory, a transceiver;
the memory is to store computer instructions;
when the electronic device is running, the processor executes the computer instructions, causing the electronic device to perform the method of claim 7 or 8.
19. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-6 or the method of claim 7 or 8.
CN202010929169.0A 2020-09-07 2020-09-07 Directory backup integrity detection method and device Pending CN114153652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010929169.0A CN114153652A (en) 2020-09-07 2020-09-07 Directory backup integrity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010929169.0A CN114153652A (en) 2020-09-07 2020-09-07 Directory backup integrity detection method and device

Publications (1)

Publication Number Publication Date
CN114153652A true CN114153652A (en) 2022-03-08

Family

ID=80460859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010929169.0A Pending CN114153652A (en) 2020-09-07 2020-09-07 Directory backup integrity detection method and device

Country Status (1)

Country Link
CN (1) CN114153652A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115437849A (en) * 2022-09-21 2022-12-06 梁力 Data processing method, device, equipment and computer readable storage medium
CN115543688A (en) * 2022-09-29 2022-12-30 广州鼎甲计算机科技有限公司 Backup method, backup device, proxy side and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115437849A (en) * 2022-09-21 2022-12-06 梁力 Data processing method, device, equipment and computer readable storage medium
CN115543688A (en) * 2022-09-29 2022-12-30 广州鼎甲计算机科技有限公司 Backup method, backup device, proxy side and storage medium

Similar Documents

Publication Publication Date Title
US7478113B1 (en) Boundaries
US9792306B1 (en) Data transfer between dissimilar deduplication systems
US10496494B1 (en) Multilayer manifest for data storage systems
US8634947B1 (en) System and method for identifying digital files
US9195666B2 (en) Location independent files
JP2006344231A (en) Content addressable information encapsulation, representation, and transfer
WO2018233630A1 (en) Fault discovery
US8335900B2 (en) Converting backup copies of objects created using a first backup program to backup copies created using a second backup program
US11221921B2 (en) Method, electronic device and computer readable storage medium for data backup and recovery
WO2021237467A1 (en) File uploading method, file downloading method and file management apparatus
CN111262822B (en) File storage method, device, block link point and system
US11361110B2 (en) File verification method, file verification system and file verification server
CN114153652A (en) Directory backup integrity detection method and device
US10120875B1 (en) Method and system for detecting boundaries of data blocks for deduplication
JP2011215835A (en) Storage device having full-text search function
CN111339551A (en) Data verification method and related device and equipment
CN112738249B (en) File uploading method, device, equipment and storage medium based on quantitative transaction
EP3432168A1 (en) Metadata separated container format
US9020902B1 (en) Reducing head and tail duplication in stored data
CN110019056B (en) Container metadata separation for cloud layer
JP6113816B1 (en) Information processing system, information processing apparatus, and program
US8463871B1 (en) Method and system for data backup with capacity and traffic optimization
CN115757280A (en) Cloud document management system based on distributed document storage
CN113505153A (en) Memorandum backup method based on iOS system and related equipment
CN109525649B (en) Data processing method and device for zookeeper client

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination