Search

CN-121996475-A - Data recovery method, device, electronic equipment and program product

CN121996475ACN 121996475 ACN121996475 ACN 121996475ACN-121996475-A

Abstract

The application belongs to the technical field of data processing, and provides a data recovery method, a device, electronic equipment and a program product. According to the embodiment of the application, the first target disk corresponding to the data recovery instruction is determined in response to the data recovery instruction, the target data interface is called, the original data is acquired from the first target disk, the user data and the metadata are processed based on the pre-trained network model, the target mapping relation table of the logical address and the physical block address is obtained, the target data is determined based on the target mapping relation table, and the target data is stored in the second target disk. Under the condition of the first target disk fault, original data in the first target disk is directly read through a target data interface, and a mapping relation table of a logical address and a physical block address is rebuilt based on a pre-trained network model, so that restored target data is obtained and stored, and the integrity rate of data restoration is improved.

Inventors

  • HU XIAOJUN
  • ZHANG WEI
  • GAO TIANYU
  • YU YUNFENG
  • WU DAWEI

Assignees

  • 深圳市硅格半导体有限公司

Dates

Publication Date
20260508
Application Date
20260108

Claims (10)

  1. 1. A method of data recovery, comprising: Determining a first target disk corresponding to a data recovery instruction in response to receiving the data recovery instruction, wherein the first target disk comprises a plurality of physical blocks; calling a target data interface to acquire original data from the first target disk, wherein the original data comprises at least one of user data, metadata and redundancy check data in each physical block; processing the user data and the metadata based on a pre-trained network model to obtain a target mapping relation table, wherein the target mapping relation table comprises a mapping relation between a logical address and a physical block address of the user data; determining target data based on the target mapping relation table; And storing the target data to a second target disk.
  2. 2. The method of claim 1, wherein the processing the user data and the metadata based on the pre-trained network model to obtain a target mapping table comprises: clustering the user data and the metadata to determine physical block addresses of the same logical address and constructing a first mapping relation, wherein the first mapping relation is a mapping relation between the logical address and the physical block address; identifying an error mapping relation in the first mapping relation, wherein the error mapping relation comprises a first error mapping relation of logic address errors and a second error mapping relation of logic address missing; inputting the error mapping relation, the user data and the metadata into the pre-trained network model for complement processing to obtain a target mapping relation; And constructing and obtaining the target mapping relation table based on the first mapping relation and the target mapping relation.
  3. 3. The method of claim 2, wherein the pre-trained network model comprises a pre-trained recurrent neural network model and a pre-trained sequence recognition model, wherein the inputting the error mapping relationship, the user data and the metadata into the pre-trained network model for completion processing to obtain a target mapping relationship comprises: Inputting the user data, the metadata and the first error mapping relation into the pre-trained cyclic neural network model for relation correction processing to obtain a second mapping relation; identifying the initial address of each user data and each metadata, wherein the initial address is used for indicating the initial position of the physical block address; And inputting the initial address, the user data, the metadata and the second error mapping relation into the pre-trained sequence identification model for logic address supplementing processing to obtain a third mapping relation.
  4. 4. The method of claim 3, wherein before the clustering process is performed on each of the user data and each of the metadata to determine the physical block addresses of the same logical address, and the first mapping relationship is constructed, further comprising: When the existence of encrypted data in the original data is detected, determining a corresponding key data set based on the historical key characteristic information; and decrypting the encrypted data based on the key data set to obtain decrypted data.
  5. 5. The method of claim 1, wherein the determining target data based on the target mapping table comprises: splicing the user data based on the target mapping relation table to obtain an initial data stream; detecting the initial data stream to obtain a detection result, wherein the detection result is used for indicating the integrity of the initial data stream; And adding a mark for the initial data stream based on the detection result to obtain target data.
  6. 6. The method according to any one of claims 1 to 5, wherein before processing the user data, the metadata based on the pre-trained network model to obtain a target mapping table, the method comprises: Acquiring data to be trained, wherein the data to be trained comprises a logic address to be trained and a physical block address to be trained, which is mapped with the logic address to be trained; inputting the data to be trained into a cyclic neural network model for training to obtain the pre-trained cyclic neural network model; And And inputting the data to be trained into a sequence recognition model for training to obtain the pre-trained sequence recognition model.
  7. 7. The method of any of claims 1 to 5, wherein the storing the target data to a second target disk comprises: determining a logic address corresponding to each user data in the target data; and storing the user data into the second target disk in turn according to the logic address.
  8. 8. A data recovery apparatus, comprising: The first determining module is used for determining a first target disk corresponding to the data recovery instruction in response to receiving the data recovery instruction, wherein the first target disk comprises a plurality of physical blocks; the data acquisition module is used for calling a target data interface and acquiring original data from the first target disk, wherein the original data comprises at least one of user data, metadata and redundancy check data in each physical block; The processing module is used for processing the user data and the metadata based on a pre-trained network model to obtain a target mapping relation table, wherein the target mapping relation table comprises a mapping relation between a logical address and a physical block address of the user data; the second determining module is used for determining target data based on the target mapping relation table; and the storage module is used for storing the target data to a second target disk.
  9. 9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the data recovery method of any one of claims 1 to 7 when the computer program is executed by the processor.
  10. 10. A computer program product, characterized in that the steps of the data recovery method according to any of claims 1 to 7 are implemented when the computer program product is run on an electronic device, causing the electronic device to execute.

Description

Data recovery method, device, electronic equipment and program product Technical Field The present application relates to the field of data processing technologies, and in particular, to a data recovery method, a data recovery device, an electronic device, and a program product. Background A Solid-state disk (Solid STATE DRIVE, SSD) is a hard disk device for storing data based on NAND flash technology, and has the advantages of high-speed reading and writing and low power consumption. Under the condition that the controller is faulty, firmware is damaged or physically damaged, the data recovery processing is required to be carried out on the stored data in the SSD, and the data are stored in the non-faulty storage device, so that the data loss is avoided. Related data recovery methods are generally based on a working interface of an SSD controller to directly acquire data in the SSD. However, since the dynamic mapping table is usually stored in the volatile memory of the solid state disk SSD or in a vulnerable firmware area, there is a problem that the mapping relationship between the physical block address and the logical address is lost in the acquired data, and it is difficult to implement data recovery. Disclosure of Invention In view of this, the embodiments of the present application provide a data recovery method, apparatus, electronic device, and program product, which can directly read original data in a disk through a target data interface, and reconstruct a mapping relationship table of a logical address and a physical block address based on a pre-trained network model, so as to obtain and store recovered target data, thereby improving the integrity rate of data recovery. A first aspect of an embodiment of the present application provides a data recovery method, including: Determining a first target disk corresponding to a data recovery instruction in response to receiving the data recovery instruction, wherein the first target disk comprises a plurality of physical blocks; calling a target data interface to acquire original data from the first target disk, wherein the original data comprises at least one of user data, metadata and redundancy check data in each physical block; processing the user data and the metadata based on a pre-trained network model to obtain a target mapping relation table, wherein the target mapping relation table comprises a mapping relation between a logical address and a physical block address of the user data; determining target data based on the target mapping relation table; And storing the target data to a second target disk. A second aspect of an embodiment of the present application provides a data recovery apparatus, including: The first determining module is used for determining a first target disk corresponding to the data recovery instruction in response to receiving the data recovery instruction, wherein the first target disk comprises a plurality of physical blocks; the data acquisition module is used for calling a target data interface and acquiring original data from the first target disk, wherein the original data comprises at least one of user data, metadata and redundancy check data in each physical block; The processing module is used for processing the user data and the metadata based on a pre-trained network model to obtain a target mapping relation table, wherein the target mapping relation table comprises a mapping relation between a logical address and a physical block address of the user data; the second determining module is used for determining target data based on the target mapping relation table; and the storage module is used for storing the target data to a second target disk. A third aspect of an embodiment of the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the data recovery method provided in the first aspect when executing the computer program. A fourth aspect of an embodiment of the application provides a computer program product, characterized in that the steps of the data recovery method provided in the first aspect are implemented when the computer program product is run on an electronic device, causing the electronic device to execute. According to the data recovery method provided by the first aspect of the embodiment of the application, the first target disk corresponding to the data recovery instruction is determined by responding to the received data recovery instruction, the target data interface is called, the original data is acquired from the first target disk, the user data and the metadata are processed based on the pre-trained network model, the target mapping relation table of the logical address and the physical block address is obtained, the target data is determined based on the target mapping relation table, and the target data is stored in the second target disk