CN-121979447-A - Logical address history mapping dictionary, construction method thereof and data rollback method
Abstract
The application discloses a logical address history mapping dictionary, a construction method thereof and a data rollback method, and relates to the technical field of storage. The construction method of the logical address history mapping dictionary comprises the steps of analyzing a logical mapping table to obtain at least one group of mapping information data, and constructing the logical address history mapping dictionary according to the physical addresses pointed by the same logical address at different time stamp nodes and the time stamp information according to the mapping information data of the logical address mapping table of the past version stored by the different time stamp nodes. The application can roll back data based on the logic address history mapping dictionary, and is stable and reliable.
Inventors
- LAI JIEMIN
- HUANG SHANYONG
- DENG HAIHUI
Assignees
- 深圳市时创意电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (15)
- 1. The construction method of the logical address history mapping dictionary is characterized by comprising the following steps: S1, analyzing a logic mapping table to obtain at least one group of mapping information data, wherein the mapping information data comprises logic address information, pointed physical address information and timestamp information; S2, according to the mapping information data of the logical address mapping tables of the past versions stored by different time stamp nodes, constructing a logical address history mapping dictionary according to the time stamp information by using the physical addresses pointed by the same logical address at different time stamp nodes.
- 2. The method of constructing a logical address history mapping dictionary according to claim 1, wherein the logical address history mapping dictionary includes at least one logical address history mapping unit including at least one logical address history mapping node; Wherein, the step S2 includes the following steps: S21, generating or updating a corresponding logic address history mapping unit in a logic address history mapping dictionary according to logic address information of the mapping information data; S22, constructing a logic address history mapping node in a corresponding logic address history mapping unit according to the physical address information pointed by the mapping information data and the time stamp information.
- 3. The method for constructing a logical address history mapping dictionary according to claim 2, further comprising the step S0 of scanning and reading all logical mapping tables in the disk before the step S1.
- 4. The method for constructing a logical address history mapping dictionary according to claim 3, further comprising a step Q of responding to a rollback request before the step S0.
- 5. The method for constructing a logical address history mapping dictionary according to claim 3, wherein the step S0 is followed by the step S1, and further comprising the step N of screening the logical address mapping table data, wherein all the logical address mapping tables are screened out by obtaining the labels corresponding to the table data.
- 6. The method for building a logical address history mapping dictionary according to claim 3, wherein in the step S2, physical addresses pointed by the same logical address at different time stamp nodes are classified according to the time stamp information according to mapping information data of the logical address mapping tables of the past versions stored at different time stamp nodes, and the logical address history mapping dictionary is built.
- 7. The method for constructing a logical address history mapping dictionary according to claim 6, wherein the step S21 comprises the steps of: s211, classifying at least one group of mapping information data corresponding to the same logical address information; S212, constructing a logic address history mapping unit corresponding to the logic address information according to the classified logic address information.
- 8. The method for constructing a logical address history mapping dictionary according to claim 7, further comprising, after the step S22, the steps of: And N2, arranging a plurality of logic address history mapping nodes according to the sequence of the time stamp information, wherein the logic address history mapping unit corresponding to each logic address is constructed to form a logic address history mapping dictionary structure.
- 9. The method for constructing a logical address history mapping dictionary according to claim 1, further comprising the step of, prior to the step of S1: s0, responding to a data writing request; The step S1 is to analyze a logic mapping table of the written data to obtain mapping information data corresponding to the written data, wherein the mapping information data comprises logic address information, pointed physical address information and timestamp information; In the step S2, according to the mapping information data of the writing data and the mapping information data of the logic address mapping table of the history version, the physical addresses pointed by the same logic address at different time stamp nodes are constructed, and according to the time stamp information, a logic address history mapping dictionary is constructed.
- 10. The method for constructing a logical address history mapping dictionary according to claim 2, further comprising the step of, after the step of S0, before the step of S1: S01, judging whether the logic address information of the written data has a corresponding historical logic address mapping table, if not, creating a logic address mapping table corresponding to the logic address information of the written data; in the step S21, a logic address history mapping unit is newly added in a logic address history mapping dictionary structure according to logic address information of mapping information data corresponding to the written data; In the step S22, a logic address history mapping node is newly built in an added logic address history mapping unit according to the time stamp information and the pointed physical address information of the written data, and a logic address history mapping dictionary structure is updated according to the added logic address history mapping unit.
- 11. The method for constructing a logical address history mapping dictionary according to claim 2, further comprising the step of, after the step of S0, before the step of S1: S01, judging whether the logic address information of the written data has a corresponding historical logic address mapping table, if so, finding the historical logic address mapping table corresponding to the logic address information of the written data; In the step S21, according to the logic address of the written data, a corresponding logic address history mapping unit is found from a logic address history mapping dictionary structure; In the step S22, a logic address history mapping node is newly added in a logic address history mapping unit according to the time stamp information and the pointed physical address information of the written data, and a logic address history mapping dictionary structure is updated according to the updated logic address history mapping unit.
- 12. A logical address history mapping dictionary constructed by a method of constructing a logical address history mapping dictionary according to any one of claims 1-11, the logical address history mapping dictionary comprising at least one logical address history mapping unit comprising at least one logical address history mapping node; The logical address history mapping node comprises pointed physical address information and time stamp information, and is constructed in the corresponding logical address history mapping unit according to the pointed physical address information and the time stamp information.
- 13. A method of data rollback, wherein the data rollback is performed using the logical address history mapping dictionary of claim 12, comprising the steps of: m1, responding to a rollback execution command, and acquiring a target logical address needing rollback and a target rollback history time node requirement; M2, searching physical addresses pointed by target logical addresses at different time stamp nodes from a logical address history mapping dictionary; And M3, reading the target physical address meeting the requirements of the target rollback history time node, and performing data rollback.
- 14. The data rollback method of claim 13 wherein the step of M3 comprises: M31, reading a target physical address meeting the requirements of a target rollback history time node from physical addresses pointed by target logical addresses in different time stamp nodes; M32, judging whether the data of the target physical address is destroyed, if not, directly rolling the data according to the data of the target physical address, if so, skipping the node, finding the physical address of a node as the target physical address, and rolling the data.
- 15. The data rollback method of claim 13 wherein said logical address history mapping dictionary comprises at least one logical address history mapping unit comprising at least one logical address history mapping node comprising pointed physical address information and timestamp information; The logical address history mapping unit generates or updates the logical address history mapping dictionary according to the corresponding logical address information, and the logical address history mapping node is constructed in the corresponding logical address history mapping unit according to the pointed physical address information and the timestamp information; In the step M2, the physical address pointed by the logical address history mapping node of the target logical address is searched from the logical address history mapping unit of the logical address history mapping dictionary; in the step M3, the target physical address of the logic address history mapping node meeting the requirements of the target rollback history time node is read, and data rollback is carried out.
Description
Logical address history mapping dictionary, construction method thereof and data rollback method Technical Field The present application relates to the field of storage technologies, and in particular, to a logical address history mapping dictionary, a construction method thereof, and a data rollback method. Background In nonvolatile memory chips such as NAND FLASH, data rollback is a critical operation to ensure the reliability and data consistency of the memory system. With the wide deployment of memory chips in the fields of consumer electronics, industrial control, cloud computing and the like, the situations of system power failure, firmware abnormality, misoperation and the like are very easy to cause data writing interruption or logic address mapping relation disorder, and at the moment, the memory chips need to be restored to a historical effective data state through a data rollback mechanism so as to avoid key business data loss or system breakdown. At present, the mainstream data rollback scheme in the industry is mostly realized by a log file system at the level of an operating system, and the log information needs to be scanned to locate the storage position of historical data during rollback, so that the validity of the existing data recovery completely depends on the integrity of metadata of the file system, if the file system itself is abnormal due to virus attack, medium damage and the like, the valid metadata cannot be extracted from dirty blocks, and the data rollback operation is completely invalid. Therefore, a more stable and reliable data rollback method is needed. Disclosure of Invention The application aims to provide a stable and reliable logical address history mapping dictionary, a construction method thereof and a data rollback method. The application discloses a construction method of a logic address history mapping dictionary, which comprises the following steps: S1, analyzing a logic mapping table to obtain at least one group of mapping information data, wherein the mapping information data comprises logic address information, pointed physical address information and timestamp information; S2, according to the mapping information data of the logical address mapping tables of the past versions stored by different time stamp nodes, constructing a logical address history mapping dictionary according to the time stamp information by using the physical addresses pointed by the same logical address at different time stamp nodes. Optionally, the logical address history mapping dictionary includes at least one logical address history mapping unit, and the logical address history mapping unit includes at least one logical address history mapping node; Wherein, the step S2 includes the following steps: S21, generating or updating a corresponding logic address history mapping unit in a logic address history mapping dictionary according to logic address information of the mapping information data; S22, constructing a logic address history mapping node in a corresponding logic address history mapping unit according to the physical address information pointed by the mapping information data and the time stamp information. Optionally, before the step S1, the method further includes the step of: s0, scanning and reading all logic mapping tables in the magnetic disk. Optionally, before the step S0, the method further comprises a step Q of responding to the rollback request. Optionally, after the step S0 and before the step S1, the method further comprises the step of screening the logic address mapping table data, namely screening all the logic address mapping tables by acquiring the labels corresponding to the table data. Optionally, in the step S2, the physical addresses pointed by the same logical address at different time stamp nodes are classified according to the time stamp information according to the mapping information data of the logical address mapping tables of the past version stored by the different time stamp nodes, and a logical address history mapping dictionary is constructed. Optionally, the step S21 includes the steps of: s211, classifying at least one group of mapping information data corresponding to the same logical address information; S212, constructing a logic address history mapping unit corresponding to the logic address information according to the classified logic address information. Optionally, after the step of S22, the method further includes the step of: And N2, arranging a plurality of logic address history mapping nodes according to the sequence of the time stamp information, wherein the logic address history mapping unit corresponding to each logic address is constructed to form a logic address history mapping dictionary structure. Optionally, before the step of S1, the method further includes the step of: s0, responding to a data writing request; The step S1 is to analyze a logic mapping table of the written data to obtain mapping information data corresp