CN112379839B - Data recovery method and device, computer equipment and storage medium - Google Patents

Data recovery method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112379839B
CN112379839B CN202011271664.3A CN202011271664A CN112379839B CN 112379839 B CN112379839 B CN 112379839B CN 202011271664 A CN202011271664 A CN 202011271664A CN 112379839 B CN112379839 B CN 112379839B
Authority
CN
China
Prior art keywords
folder
cluster
folders
module
information
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.)
Active
Application number
CN202011271664.3A
Other languages
Chinese (zh)
Other versions
CN112379839A (en
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.)
Wanxing Technology Group Co ltd
Original Assignee
Wanxing Technology Group 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 Wanxing Technology Group Co ltd filed Critical Wanxing Technology Group Co ltd
Priority to CN202011271664.3A priority Critical patent/CN112379839B/en
Publication of CN112379839A publication Critical patent/CN112379839A/en
Application granted granted Critical
Publication of CN112379839B publication Critical patent/CN112379839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks

Landscapes

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

Abstract

The invention relates to a data recovery method, a data recovery device, computer equipment and a storage medium; the method comprises the following steps: acquiring all folder information; calculating physical address information of all clusters meeting the requirements in all folder information; and calculating and acquiring the positions of the folders in the information of all the folders in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data. According to the invention, the physical address of the cluster meeting the requirements is accurately restored through the position offset information in all the folders and the cluster number information of the file folder, so that the problem of inaccurate physical address caused by calculating the cluster meeting the requirements through the changed DBR is solved, and when partition parameter adjustment occurs before and after the file system is formatted, the condition that the restored file data effect is failed to be restored due to parameter adjustment is avoided.

Description

Data recovery method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data recovery, in particular to a data recovery method, a data recovery device, computer equipment and a storage medium.
Background
At present, for a data storage device, during formatting, formatting parameters of the device, including parameters such as adjusting a file system and a cluster size, may be adjusted. Once these parameters are adjusted, the location of the DBR of the formatted device is adjusted accordingly, and the location of the DBR affects the starting location of the cluster "0" of the file system, which in turn plays a crucial role in calculating the accurate physical address of the file in the storage medium.
At present, the main data recovery means in the market is to search a recording item of a file to obtain a related cluster number, and calculate a physical address of the file on a storage medium according to the position of the cluster number relative to a cluster with a number of '0', and the position of the cluster with the number of '0' adopts the physical address of the current storage medium, however, once the position of the current DBR and the position of the file system DBR in which data is originally stored have a deviation, an error occurs in the calculation of the physical address of the cluster with the number of '0', so that the data on the storage medium before formatting can hardly be completely recovered accurately.
Disclosure of Invention
Embodiments of the present invention provide a data recovery method, apparatus, computer device, and storage medium, to overcome the defects in the prior art.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme:
the data recovery method comprises the following steps:
acquiring all folder information;
calculating the physical address information of all clusters which meet the requirements in all folder information;
and calculating and acquiring the positions of the folders in the information of all the folders in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data.
The further technical scheme is as follows: the acquiring of all folder information includes:
traversing the whole disk to obtain all folders;
judging whether all folders have folder starting marks or not;
if not, returning to the execution step of traversing the whole disk to obtain all folders;
if so, recording the starting positions and cluster numbers of all the folders to form all-folder information.
The further technical scheme is as follows: the step of calculating the physical address information of all clusters meeting the requirements in all folder information comprises the following steps:
traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
judging whether the second folder is the last folder or not;
if not, acquiring the next folder of the first folder, and marking the next folder as a second folder;
calculating the cluster size according to the first folder and the second folder;
judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64KB;
if yes, calculating the position of the cluster meeting the requirement and storing the position to obtain the physical address information of the cluster meeting the requirement.
The further technical scheme is as follows: the step of calculating and acquiring the positions of the folders in all the folder information stored in the disk partitions according to the physical address information of the clusters meeting the requirements so as to recover the data comprises the following steps:
acquiring file cluster numbers of all folders needing to calculate specific physical address information;
and calculating and acquiring the storage positions of the file folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
A data recovery apparatus comprising: an acquisition unit, a calculation unit, and a calculation acquisition unit;
the acquisition unit is used for acquiring all folder information;
the computing unit is used for computing the physical address information of all clusters meeting the requirements in all the folder information;
and the calculation acquisition unit is used for calculating and acquiring the positions of the folders stored in the disk partitions in all the folder information according to the physical address information of the clusters meeting the requirements so as to recover the data.
The further technical scheme is as follows: the acquisition unit includes: the device comprises a traversing module, a first judging module and a recording module;
the traversal module is used for traversing the whole disk to obtain all folders;
the first judging module is used for judging whether all folders have folder starting marks or not;
the recording module is used for recording the initial positions and cluster numbers of all the folders to form all the folder information.
The further technical scheme is as follows: the computing unit includes: the device comprises a traversal acquisition module, a second judgment module, an acquisition marking module, a first calculation module, a third judgment module and a calculation storage module;
the traversal acquisition module is used for traversing all folder information, sequentially acquiring the starting positions and cluster numbers of two different folders and recording the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module is used for judging whether the second folder is the last folder or not;
the acquisition marking module is used for acquiring the next folder of the first folder and marking the next folder as a second folder;
the first calculation module is used for calculating the cluster size according to the first folder and the second folder;
the third determining module is configured to determine whether the cluster size is an integer multiple of 512B and is smaller than or equal to 64KB;
and the calculation and storage module is used for calculating and storing the positions of the clusters meeting the requirements so as to obtain the physical address information of the clusters meeting the requirements.
The further technical scheme is as follows: the calculation acquisition unit includes: the device comprises an acquisition module and a second calculation module;
the acquisition module is used for acquiring the file cluster numbers of all folders needing to calculate specific physical address information;
and the second calculation module is used for calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
A computer device comprising a memory having a computer program stored thereon and a processor that, when executed, implements a data recovery method as described above.
A storage medium storing a computer program comprising program instructions which, when executed by a processor, implement a data recovery method as described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the physical address of the cluster meeting the requirements is accurately restored through the position offset information in all the folders and the cluster number information of the file folder, so that the problem that the physical address is inaccurate due to the fact that the cluster meeting the requirements is calculated through the changed DBR is solved, and when partition parameter adjustment occurs before and after the file system is formatted, the situation that the restored file data effect is failed to be restored due to the fact that the parameter adjustment occurs is avoided.
Embodiments of the invention are further described below with reference to the drawings and the detailed description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first schematic flow chart of a data recovery method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a data recovery method according to an embodiment of the present invention;
fig. 3 is a third schematic flowchart of a data recovery method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a data recovery method according to an embodiment of the present invention;
FIG. 5 is a first schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 6 is a second schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 7 is a third schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without any creative efforts shall fall within the protection scope of the embodiments of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the description of embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to the specific embodiments shown in fig. 1 to 9, wherein, referring to fig. 1 to 4, the embodiment of the present invention discloses a data recovery method, including the following steps:
s1, acquiring information of all folders;
s2, calculating physical address information of all clusters meeting the requirements in all folder information;
and S3, calculating and acquiring the positions of the folders in the folder information in the disk partition according to the physical address information of the clusters meeting the requirements so as to recover the data.
In this embodiment, the satisfactory cluster is the "0" cluster, and the data recovery is for multi-DBR data recovery.
As shown in fig. 2, the acquiring of all folder information in step S1 includes:
s11, traversing the whole disk to obtain all folders;
s12, judging whether all folders have folder starting marks or not; if not, returning to execute the step S11, namely traversing the whole disk to obtain all folders;
and S13, if so, recording the starting positions and cluster numbers of all the folders to form all the folder information.
As shown in fig. 3, the step S2 of calculating the physical address information of all clusters meeting the requirement in all folder information includes the following steps:
s21, traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
in this embodiment, the first folder and the second folder are respectively marked as folders DIR1 and DIR2, the starting position corresponding to the folder DIR1 is DIR1_ POS, and the cluster number is DIR1_ ID;
s22, judging whether the second folder is the last folder or not; if yes, ending;
s23, if not, acquiring the next folder of the first folder, and marking the next folder as a second folder;
in this embodiment, the starting position corresponding to the second folder (folder DIR 2) is DIR2_ POS, and the cluster number is DIR2_ ID;
s24, calculating the cluster size according to the first folder and the second folder;
in this embodiment, the CLUSTER size is denoted as CLUSTER _ SZ, where the calculation formula is: CLUSTER _ SZ = (DIR 2_ POS-DIR1_ POS)/(DIR 2_ ID-DIR1_ ID);
s25, judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64KB; if not, returning to execute the step S21;
wherein, if the folder DIR1 and the folder DIR2 are exactly in the same file system environment, the calculated CLUSTER _ SZ should be an integer multiple satisfying 512B and less than or equal to the maximum CLUSTER size (64 KB) supported by the file system, and the calculated value satisfying this condition is assumed to be the physical address of the CLUSTER "0" of a certain existing history partition.
And S26, if yes, calculating the position of the cluster meeting the requirement and storing the position to obtain the physical address information of the cluster meeting the requirement.
In this embodiment, the cluster meeting the requirement is denoted as ROOT _ POS, and the calculation formula is as follows: ROOT _ POS = DIR2_ POS- (DIR 2_ ID × CLUSTER _ SZ).
In this embodiment, after step S26, the method further includes: the records of the folder DIR1 and the folder DIR2 are removed, and the step S21 is returned to be executed so as to acquire other folders.
As shown in fig. 4, the step S3 "calculating and obtaining the storage positions of the folders in the disk partition in all the folder information according to the physical address information of the clusters that meet the requirement, so as to recover the data" includes the following steps:
s31, acquiring file cluster numbers of all folders needing to calculate specific physical address information;
in this embodiment, the FILE CLUSTER number is denoted as FILE _ CLUSTER _ ID;
and S32, calculating and acquiring the storage positions of the file folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
In this embodiment, the storage location is denoted as FILE _ POS, and the calculation formula is: FILE _ POS = ROOT _ POS + (FILE _ timer _ ID _ timer _ SZ).
In this embodiment, since the storage medium may be formatted, when the file attribute information is obtained, it is unknown that the storage location of the file is specific to the file system, and may be before formatting or after formatting; at this time, all the possible clusters with 0 numbers are traversed, all the possibilities of the relative physical addresses of the current file in the file system environment can be obtained (if the previous and subsequent formatting is carried out three times, three possible cluster information with 0 numbers are calculated, and the file can obtain three stored physical address information of the data), wherein one of the possible results is correct, all the possible results are restored in sequence, and the correct file can be obtained with certainty.
The embodiment of the invention accurately restores the physical address of the 0 cluster through the position offset information in the related folder and the cluster number information of the embodiment, thereby offsetting the problem of inaccurate physical address caused by calculating the 0 cluster through the changed DBR, and avoiding the condition of restoration failure caused by parameter adjustment of the restored file data effect when the partition parameter adjustment occurs before and after the file system is formatted.
Wherein, the abbreviations and key terms to which the embodiments of the present invention apply define:
a DBR that partitions a boot sector; DIR, folder; DIR1_ POS \ DIR2_ POS, and the position address of the folder on the equipment; DIR1_ ID \ DIR2_ ID, the number of the cluster where the folder is located; CLUSTER _ SZ, the size of a CLUSTER is partitioned; FILE _ CLUSTER _ ID, a CLUSTER number corresponding to the position of the FILE data on the disk; ROOT _ POS, the position of the cluster corresponding to cluster No. 0 on the disk; and (5) FILE _ POS, calculating the accurate physical address of the FILE on the disk.
Referring to fig. 5 to 8, an embodiment of the present invention further discloses a data recovery apparatus, including: an acquisition unit 10, a calculation unit 20, and a calculation acquisition unit 30;
the acquiring unit 10 is configured to acquire all folder information;
the calculating unit 20 is configured to calculate physical address information of all clusters that meet the requirement in all folder information;
the calculation and acquisition unit 30 is configured to calculate and acquire the positions of the folders stored in the disk partition in all the folder information according to the physical address information of the cluster meeting the requirement, so as to restore the data.
Referring to fig. 6, the obtaining unit 10 includes: the device comprises a traversing module 11, a first judging module 12 and a recording module 13;
the traversal module 11 is configured to traverse the entire disk to obtain all folders;
the first judging module 12 is configured to judge whether all folders have folder start flags;
the recording module 13 is configured to record the start positions and cluster numbers of all folders to form all folder information.
Referring to fig. 7, the calculating unit 20 includes: a traversal obtaining module 21, a second judging module 22, a obtaining marking module 23, a first calculating module 24, a third judging module 25 and a calculating and storing module 26;
the traversal obtaining module 21 is configured to traverse information of all folders, sequentially obtain starting positions and cluster numbers of two different folders, and record the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module 22 is configured to judge whether the second folder is the last folder;
the acquiring and marking module 23 is configured to acquire a next folder of the first folder, and mark the next folder as a second folder;
the first calculating module 24 is configured to calculate a cluster size according to the first folder and the second folder;
the third determining module 25 is configured to determine whether the cluster size is an integer multiple of 512B and is less than or equal to 64KB;
the calculating and storing module 26 is configured to calculate and store the position of the cluster meeting the requirement, so as to obtain the physical address information of the cluster meeting the requirement.
Referring to fig. 8, the calculation acquiring unit 30 includes: an acquisition module 31 and a second calculation module 32;
the acquiring module 31 is configured to acquire file cluster numbers of all folders whose specific physical address information needs to be calculated;
the second calculating module 32 is configured to calculate and obtain the storage positions of the folders in the disk partition in all the folder information according to the cluster size, the cluster meeting the requirements, and the file cluster number.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the data recovery apparatus and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and conciseness of description, details are not repeated herein.
The data recovery apparatus described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 9.
Referring to fig. 9, fig. 9 is a schematic block diagram of a computer device according to an embodiment of the present application; the computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 9, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a data recovery method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a data recovery method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Therefore, the embodiment of the invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program comprises program instructions which, when executed by a processor, may implement the data recovery method described above.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present invention.
In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the embodiment of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method of the embodiment of the present invention.
The technical contents of the embodiments of the present invention are further described by the examples only, so as to facilitate the reader to understand more easily, but not to represent that the implementation manner of the embodiments of the present invention is limited thereto, and any technical extension or re-creation performed by the embodiments of the present invention is protected by the embodiments of the present invention. The protection scope of the embodiments of the present invention is subject to the claims.

Claims (6)

1. A data recovery method, comprising the steps of:
acquiring all folder information;
calculating physical address information of all clusters meeting the requirements in all folder information;
calculating and acquiring the positions of folders in all folder information stored in the disk partitions according to the physical address information of the clusters meeting the requirements so as to recover data;
the acquiring of all folder information includes:
traversing the whole disk to obtain all folders;
judging whether all folders have folder starting marks or not;
if not, returning to the execution step of traversing the whole disk to obtain all folders;
if so, recording the initial positions and cluster numbers of all the folders to form all the folder information;
the step of calculating the physical address information of all clusters meeting the requirements in all folder information comprises the following steps:
traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
judging whether the second folder is the last folder or not;
if not, acquiring the next folder of the first folder, and marking the next folder as a second folder;
calculating the cluster size according to the first folder and the second folder;
judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64KB;
if yes, calculating the position of the cluster meeting the requirement and storing the position to obtain the physical address information of the cluster meeting the requirement.
2. The data recovery method of claim 1, wherein the step of calculating and acquiring the positions of folders stored in the disk partition in all folder information according to the physical address information of the clusters meeting the requirement to recover the data comprises the following steps:
acquiring file cluster numbers of all folders of which specific physical address information needs to be calculated;
and calculating and acquiring the storage positions of the file folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
3. A data recovery apparatus, comprising: an acquisition unit, a calculation unit, and a calculation acquisition unit;
the acquisition unit is used for acquiring all folder information;
the computing unit is used for computing the physical address information of all clusters meeting the requirements in all folder information;
the calculation acquisition unit is used for calculating and acquiring the positions of the folders in the folder information stored in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data;
the acquisition unit includes: the device comprises a traversing module, a first judging module and a recording module;
the traversal module is used for traversing the whole disk to obtain all folders;
the first judging module is used for judging whether all folders have folder starting marks or not;
the recording module is used for recording the initial positions and cluster numbers of all the folders to form all the folder information;
the calculation unit includes: the device comprises a traversal acquisition module, a second judgment module, an acquisition marking module, a first calculation module, a third judgment module and a calculation storage module;
the traversal acquisition module is used for traversing all folder information, sequentially acquiring the starting positions and cluster numbers of two different folders and recording the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module is used for judging whether the second folder is the last folder or not;
the acquisition marking module is used for acquiring the next folder of the first folder and marking the next folder as a second folder;
the first calculation module is used for calculating the cluster size according to the first folder and the second folder;
the third judging module is configured to judge whether the cluster size is an integer multiple of 512B and is less than or equal to 64KB;
and the calculation and storage module is used for calculating and storing the positions of the clusters meeting the requirements so as to obtain the physical address information of the clusters meeting the requirements.
4. The data recovery apparatus according to claim 3, wherein the calculation acquisition unit includes: the device comprises an acquisition module and a second calculation module;
the acquisition module is used for acquiring the file cluster numbers of all folders needing to calculate specific physical address information;
and the second calculation module is used for calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
5. A computer device, characterized in that the computer device comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program, implements the data recovery method according to any of claims 1-2.
6. A storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the data recovery method of any one of claims 1-2.
CN202011271664.3A 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium Active CN112379839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011271664.3A CN112379839B (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011271664.3A CN112379839B (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112379839A CN112379839A (en) 2021-02-19
CN112379839B true CN112379839B (en) 2022-12-02

Family

ID=74582418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011271664.3A Active CN112379839B (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112379839B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173291B1 (en) * 1997-09-26 2001-01-09 Powerquest Corporation Method and apparatus for recovering data from damaged or corrupted file storage media
CN102254048A (en) * 2011-08-24 2011-11-23 深圳市万兴软件有限公司 Data recovering method and system
CN105760244A (en) * 2016-02-02 2016-07-13 厦门市美亚柏科信息股份有限公司 exFAT formatting recovery method and device based on hypothesis and verification
CN105760473A (en) * 2016-02-11 2016-07-13 陈蔡峰 Recovery method and device used after exFAT file formatting
CN105786653A (en) * 2016-03-01 2016-07-20 厦门市美亚柏科信息股份有限公司 File recovery method and system based on FAT32 file system
CN107704341A (en) * 2017-08-31 2018-02-16 湖北灰科信息技术有限公司 File access pattern method, apparatus and electronic equipment
CN109582501A (en) * 2018-11-28 2019-04-05 万兴科技股份有限公司 File access pattern method, apparatus, computer equipment and storage medium
CN109710455A (en) * 2018-11-22 2019-05-03 厦门市美亚柏科信息股份有限公司 Deletion file access pattern method and system based on FAT32 file system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173291B1 (en) * 1997-09-26 2001-01-09 Powerquest Corporation Method and apparatus for recovering data from damaged or corrupted file storage media
CN102254048A (en) * 2011-08-24 2011-11-23 深圳市万兴软件有限公司 Data recovering method and system
CN105760244A (en) * 2016-02-02 2016-07-13 厦门市美亚柏科信息股份有限公司 exFAT formatting recovery method and device based on hypothesis and verification
CN105760473A (en) * 2016-02-11 2016-07-13 陈蔡峰 Recovery method and device used after exFAT file formatting
CN105786653A (en) * 2016-03-01 2016-07-20 厦门市美亚柏科信息股份有限公司 File recovery method and system based on FAT32 file system
CN107704341A (en) * 2017-08-31 2018-02-16 湖北灰科信息技术有限公司 File access pattern method, apparatus and electronic equipment
CN109710455A (en) * 2018-11-22 2019-05-03 厦门市美亚柏科信息股份有限公司 Deletion file access pattern method and system based on FAT32 file system
CN109582501A (en) * 2018-11-28 2019-04-05 万兴科技股份有限公司 File access pattern method, apparatus, computer equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
《NTFS格式存储设备数据恢复方法研究》;肖劲科;《电子制作》;20150403;全文 *
《一种基于Winhex 的FAT32系统误格式化数据恢复方法》;张珈铭,马昊;《电脑知识与技术》;20200505;全文 *
《数据恢复实战技术总结》;weixin_33814685;《CSDN》;20110425;全文 *
《计算机硬盘数据恢复的技术分析》;蒋敏;《电脑编程技巧与维护》;20170903;全文 *

Also Published As

Publication number Publication date
CN112379839A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN109828721B (en) Data deleting method and device, computer equipment and storage medium
US8688651B2 (en) Dynamic deduplication
CN111475105B (en) Monitoring data storage method, monitoring data storage device, monitoring data server and storage medium
US10606712B2 (en) Metadata recovery for de-duplicated data
WO2021093461A1 (en) Method and apparatus for aggregation calculation in blockchain-type ledger, and device
CN111078515A (en) SSD layered log recording method and device, computer equipment and storage medium
CN109614054B (en) data reading method and system
US8914325B2 (en) Change tracking for multiphase deduplication
CN113360322A (en) Method and equipment for recovering data based on backup system
CN112379839B (en) Data recovery method and device, computer equipment and storage medium
CN109614273B (en) Method and system for reading incremental data
CN103403709A (en) Method, device and system for data reading and writing
CN113918648A (en) Data synchronization method and device, electronic equipment and storage medium
CN113641309A (en) Weak block identification method and device of SSD, computer equipment and storage medium
CN112988880B (en) Data synchronization method, device, electronic equipment and computer storage medium
CN110471625B (en) Bad block information protection method and device, computer equipment and storage medium
CN110287164B (en) Data recovery method and device and computer equipment
CN115840753A (en) Data verification method and electronic equipment
NL2014199A (en) A computer implemented method for generating a variant call file.
CN107526656B (en) Cloud restoration method and device
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
EP2820548B1 (en) Versioned memories using a multi-level cell
CN112395256A (en) Data reading method, electronic equipment and computer storage medium
WO2017050029A1 (en) Method, device, and equipment for data block processing
CN112769961B (en) Node processing method and device of network system

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
GR01 Patent grant
GR01 Patent grant