Mapping table reconstruction method and device, electronic equipment and computer readable storage medium
By scanning, processing, and merging QLC and SLC data blocks, a reconstruction mapping table is constructed, which solves the write amplification problem during power-on reconstruction of QLC storage devices, extends the lifespan of storage devices, and improves data recovery efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ARTMEM TECHNOLOGY CO LTD
- Filing Date
- 2025-07-24
- Publication Date
- 2026-07-07
AI Technical Summary
When existing QLC storage devices are rebuilt upon power-up, the data from the L2P snapshot is not translated into logical addresses and is discarded, leading to write amplification and affecting the lifespan of the storage device.
By scanning the page data in the four-level cell (QLC) data block and the single-level cell (SLC) data block that do not record mapping snapshots, the first and second logical transformation physical information are obtained respectively, and then merged into the logical transformation physical temporary storage table to construct a reconstruction mapping table and avoid data loss.
It reduces write amplification issues, improves the lifespan of storage devices and data recovery efficiency, prevents data loss, and enhances the efficiency of data write operations.
Smart Images

Figure CN120973701B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of memory technology, and in particular to a mapping table reconstruction method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] QLC (Quad Level Cell) refers to a storage unit that can store 4 bits of data per cell, and one cell can represent 16 different states. This significantly increases storage density, allowing more data to be stored on the same chip area. Power-on reconstruction of a QLC NAND flash memory device refers to the process of restoring and rebuilding the data structures and mapping tables after the device is powered on again, ensuring the device can function normally and restore data integrity. Currently, when a QLC flash memory device powers on, all QLC destination block data that has not undergone a logical-to-physical (L2P) snapshot is discarded, which can cause write amplification issues. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0004] To address this issue, the present invention proposes a mapping table reconstruction method that can reduce write amplification problems and increase the lifespan of storage devices.
[0005] The present invention also proposes an apparatus for applying the above-described mapping table reconstruction method.
[0006] The present invention also proposes an electronic device that applies the above-described mapping table reconstruction method.
[0007] The present invention also proposes a computer-readable storage medium that applies the above-described mapping table reconstruction method.
[0008] A mapping table reconstruction method according to a first aspect of the present invention includes:
[0009] The first scan process is performed on the page data in the four-layer unit QLC data block that has not recorded the mapping snapshot to obtain the first logical transformation physical information;
[0010] The first logic conversion physical information is transferred to the front of the preset logic conversion physical temporary storage table;
[0011] A second scan is performed on the page data in the single-layer unit SLC data block that does not record a mapping snapshot to obtain the second logical transformation physical information;
[0012] The second logic conversion physical information is transferred to the end of the logic conversion physical temporary storage table;
[0013] In the logical transformation physical temporary storage table, the first logical transformation physical information and the second logical transformation physical information are merged sequentially to obtain the reconstructed mapping table.
[0014] According to some embodiments of the present invention, the first scan processing of page data in the four-layer unit QLC data block that has not recorded a mapping snapshot to obtain first logical transformation physical information includes:
[0015] Determine the first page of data from the QLC data block that was not recorded in the mapping snapshot;
[0016] The first page of data is subjected to a first scan process to obtain the first logical conversion physical information.
[0017] According to some embodiments of the present invention, the second scanning process of page data in a single-layer cell (SLC) data block for which no mapping snapshot has been recorded, to obtain second logical transformation physical information, includes:
[0018] Determine the second page of data from the SLC data block that did not record the mapping snapshot;
[0019] The second page of data is subjected to a second scan to obtain the second logical conversion physical information.
[0020] According to some embodiments of the present invention, the step of transferring the first logic-to-physical information to the front of a preset logic-to-physical temporary storage table includes:
[0021] Determine the header position information from the aforementioned logical transformation physical temporary storage table;
[0022] Based on the header position information, the first logical conversion physical information is transferred to the front of the logical conversion physical temporary storage table.
[0023] According to some embodiments of the present invention, the step of transferring the second logic translation physical information to the latter part of the logic translation physical temporary storage table includes:
[0024] Determine the end position information from the logical transformation physical temporary storage table;
[0025] The second logic conversion physical information is transferred to the end of the logic conversion physical temporary storage table based on the table tail position information.
[0026] According to some embodiments of the present invention, the step of merging the first logical transformation physical information and the second logical transformation physical information sequentially in the logical transformation physical temporary storage table to obtain a reconstructed mapping table includes:
[0027] In the logical-to-physical temporary storage table, the first logical-to-physical information and the second logical-to-physical information are merged according to logical address order to obtain the reconstructed mapping table.
[0028] According to some embodiments of the present invention, after sequentially merging the first logical transformation physical information and the second logical transformation physical information in the logical transformation physical temporary storage table to obtain a reconstructed mapping table, the method further includes:
[0029] Write a request to retrieve data;
[0030] Perform a data write operation based on the data write request and the reconstructed mapping table.
[0031] According to a second aspect of the present invention, a mapping table reconstruction apparatus is provided, the apparatus comprising:
[0032] The first scanning unit is used to perform a first scanning process on the page data in the four-layer unit QLC data block that has not recorded a mapping snapshot, and to obtain the first logical transformation physical information;
[0033] The first transfer unit is used to transfer the first logic conversion physical information to the front of the preset logic conversion physical temporary storage table;
[0034] The second scanning unit is used to perform a second scanning process on the page data in the single-layer unit SLC data block that has not recorded a mapping snapshot, so as to obtain the second logical transformation physical information;
[0035] The second transfer unit is used to transfer the second logic conversion physical information to the rear of the logic conversion physical temporary storage table;
[0036] The merging unit is used to sequentially merge the first logical transformation physical information and the second logical transformation physical information in the logical transformation physical temporary storage table to obtain a reconstructed mapping table.
[0037] An electronic device according to a third aspect of the present invention includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the mapping table reconstruction method as described above.
[0038] According to a fourth aspect of the present invention, a computer-readable storage medium stores computer-executable instructions that, when executed by a control processor, implement the mapping table reconstruction method as described above.
[0039] The mapping table reconstruction method according to embodiments of the present invention has at least the following beneficial effects: During the mapping table reconstruction process, a first logical transformation physical information is obtained by performing a first scan on the page data of the four-level cell (QLC) data block that has not recorded a mapping snapshot; then, the first logical transformation physical information is transferred to the front of a pre-set logical transformation physical temporary storage table; next, a second scan on the page data of the single-level cell (SLC) data block that has not recorded a mapping snapshot is obtained; then, the second logical transformation physical information is transferred to the back of the logical transformation physical temporary storage table; in the logical transformation physical temporary storage table, the first and second logical transformation physical information are merged sequentially to obtain the reconstructed mapping table. By using the above technical solution, the first logical transformation physical information is transferred to the front of the pre-set logical transformation physical temporary table, and the second logical transformation physical information is transferred to the back of the logical transformation physical temporary table. Subsequently, the first logical transformation physical information and the second logical transformation physical information are merged and processed to realize the reconstruction of the mapping table. It is not necessary to discard the page data in the QLC data block that has not recorded the mapping snapshot, thereby reducing the write amplification problem and increasing the life of the storage device.
[0040] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description
[0041] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.
[0042] Figure 1 This is a flowchart of a mapping table reconstruction method provided in one embodiment of the present invention;
[0043] Figure 2 This is a flowchart illustrating a mapping table reconstruction method provided in one embodiment of the present invention.
[0044] Figure 3 yes Figure 1 Method sub-flowchart for step S100;
[0045] Figure 4 yes Figure 1 Method sub-flowchart for step S300;
[0046] Figure 5 yes Figure 1 Method sub-flowchart for step S200;
[0047] Figure 6 yes Figure 1 Method sub-flowchart for step S400;
[0048] Figure 7 yes Figure 1 Method sub-flowchart for step S500;
[0049] Figure 8 Is it completed? Figure 1 Sub-flowchart of the method after step S500;
[0050] Figure 9 This is an example flowchart of a mapping table reconstruction method provided in one embodiment of the present invention;
[0051] Figure 10 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0053] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0054] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0055] This invention provides a mapping table reconstruction method, apparatus, electronic device, and computer-readable storage medium. The method includes: during the mapping table reconstruction process, firstly, performing a first scan on page data in a four-level cell (QLC) data block that has not recorded a mapping snapshot to obtain first logical translation physical information; then, transferring the first logical translation physical information to the front of a pre-set logical translation physical temporary storage table; next, performing a second scan on page data in a single-level cell (SLC) data block that has not recorded a mapping snapshot to obtain second logical translation physical information; then, transferring the second logical translation physical information to the back of the logical translation physical temporary storage table; and finally, sequentially merging the first and second logical translation physical information in the logical translation physical temporary storage table to obtain a reconstructed mapping table. By using the above technical solution, the first logical transformation physical information is transferred to the front of the pre-set logical transformation physical temporary table, and the second logical transformation physical information is transferred to the back of the logical transformation physical temporary table. Subsequently, the first logical transformation physical information and the second logical transformation physical information are merged and processed to realize the reconstruction of the mapping table. It is not necessary to discard the page data in the QLC data block that has not recorded the mapping snapshot, thereby reducing the write amplification problem and increasing the life of the storage device.
[0056] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0057] like Figure 1 As shown, Figure 1 This is a flowchart of a mapping table reconstruction method provided in an embodiment of the present invention. The method includes, but is not limited to, steps S100, S200, S300, S400, and S500:
[0058] Step S100: Perform a first scan on the page data in the four-layer cell QLC data block that has not recorded a mapping snapshot to obtain the first logical transformation physical information;
[0059] Step S200: Transfer the first logic conversion physical information to the front of the preset logic conversion physical temporary storage table;
[0060] Step S300: Perform a second scan on the page data in the single-layer unit SLC data block that has not recorded a mapping snapshot to obtain the second logical transformation physical information;
[0061] Step S400: Transfer the second logic conversion physical information to the end of the logic conversion physical temporary storage table;
[0062] Step S500: In the logical conversion physical temporary storage table, the first logical conversion physical information and the second logical conversion physical information are merged in sequence to obtain the reconstructed mapping table.
[0063] It should be noted that during the power-on reconstruction of the QLC storage device, the first step is to perform a first scan on the page data of the four-level cell QLC data block that has not recorded a mapping snapshot to obtain the first logical translation physical information. This first logical translation physical information is then transferred to the beginning of a pre-defined logical translation physical temporary storage table. Next, a second scan is performed on the page data of the single-level cell SLC data block that has not recorded a mapping snapshot to obtain the second logical translation physical information. This second logical translation physical information is then transferred to the end of the logical translation physical temporary storage table. Finally, the first and second logical translation physical information are sequentially merged in the logical translation physical temporary storage table to obtain the corresponding reconstruction mapping table. Based on this technical solution, the efficiency and accuracy of data recovery can be significantly improved, effectively preventing the complete discarding of QLC destination block data that has not undergone logical address to physical address translation (L2P) snapshots, and thus effectively preventing write amplification problems.
[0064] It should be noted that QLC storage devices include QLC data blocks and SLC data blocks; SLC data blocks act as a high-speed cache, first quickly absorbing and aggregating written data, and then migrating it in batches to QLC data blocks for long-term storage; SLC data blocks solve the shortcomings of write performance, endurance, and write amplification, while QLC data blocks provide advantages in capacity and cost.
[0065] It is worth noting that the embodiments of the present invention are based on the fact that QLC data blocks are only used as the target blocks for garbage collection. When writing data, the data in QLC blocks is always moved from SLC blocks. Therefore, for data with the same logical address, the data in the SLC block is always the latest. The latest data in the logical transformation physical information temporary storage table obtained by reconstructing according to the above method is always at the end of the table. After merging the logical transformation physical information temporary storage tables from beginning to end, accurate data can be obtained. This eliminates the need to judge the writing order of the previous page data in SLC blocks and QLC blocks, and also retains the valid data in QLC blocks, avoiding the problem of write amplification.
[0066] It is worth noting that each storage unit in a Level 4 Cell (QLC) data block can store 4 bits of data, achieving higher storage density. In a QLC data block, page data for which a mapping snapshot has not been recorded refers to logical address-to-physical address mapping information or data page content that has not been recorded in persistent storage in the event of a power outage or abnormal interruption of the storage device. Performing a first scan on the page data for which a mapping snapshot has not been recorded in the QLC data block yields the corresponding first logical-to-physical translation information. It is important to note that "first scan" and "second scan" are merely used to distinguish different objects being operated on and do not imply that the operations performed are different.
[0067] It is worth noting that, once the first logical translation physical information is obtained, it can be transferred to the beginning of a pre-defined logical translation physical temporary table to prepare for the subsequent reconstruction of the mapping table. After transferring the first logical translation physical information to the beginning of the pre-defined logical translation physical temporary table, a second scan can be performed on the page data in the single-level cell SLC data block that has not recorded a mapping snapshot to obtain the second logical translation physical information. Each storage cell in a single-level cell SLC data block can store 1 bit of data, exhibiting excellent write speed, durability, and reliability. A single-level cell SLC data block consists of multiple pages, each page being the basic unit for data writing and reading, while the data block is the basic unit for data erasure. After obtaining the second logical translation physical information, it can be transferred to the end of the physical temporary table. Finally, the first and second logical translation physical information are merged sequentially in the logical translation physical temporary table to obtain the corresponding reconstruction mapping table, enabling power-on reconstruction of the QLC storage device. This effectively prevents data loss and improves data recovery efficiency.
[0068] like Figure 2 As shown, in some embodiments of the present invention, when the QLC storage device performs power-on reconstruction, it first scans the pages of the QLC data blocks that have not been snapshotted, obtains the corresponding logical translation physical information from the backup area, and adds it to the front of the logical translation physical information temporary storage table. Then, it scans the pages of the SLC data blocks in the storage device that have not been snapshotted and adds them to the back of the logical translation physical information temporary storage table in the order of writing. Finally, in the logical translation physical temporary storage table, the first logical translation physical information and the second logical translation physical information are merged sequentially, that is, merged according to logical address information, to obtain the reconstruction mapping table. Here, L2P refers to the logical translation physical information.
[0069] Additionally, in one embodiment, such as Figure 3 As shown, the first scan process is performed on the page data in the four-layer unit QLC data block that has not recorded the mapping snapshot to obtain the first logical transformation physical information, which may include, but is not limited to, steps S110 to S120.
[0070] Step S110: Determine the first page of data from the QLC data block that has not recorded the mapping snapshot;
[0071] Step S120: Perform a first scan on the first page of data to obtain the first logical conversion physical information.
[0072] It should be noted that in the process of obtaining the first logical transformation physical information by performing the first scan processing on the page data of the four-layer unit QLC data block that has not recorded a mapping snapshot, the first page data of the QLC data block that has not recorded a mapping snapshot is first determined; then, the first page data is scanned to obtain the corresponding first logical transformation physical information; based on obtaining the first logical transformation physical information, the first logical transformation physical information can be transferred to the front of the pre-set logical transformation physical temporary storage table to prepare for the subsequent reconstruction of the mapping table.
[0073] It is worth noting that the data on the first page and the data on the second page are only used to distinguish different objects and do not indicate that they are different types of data. The distinction between the two is made to facilitate the explanation and description of the technical solution of the present invention.
[0074] Additionally, in one embodiment, such as Figure 4 As shown, a second scan process is performed on the page data in the single-layer unit SLC data block that has not recorded a mapping snapshot to obtain the second logical transformation physical information, which may include, but is not limited to, steps S310 to S320.
[0075] Step S310: Determine the second page of data from the SLC data block that has not recorded the mapping snapshot;
[0076] Step S320: Perform a second scan on the second page of data to obtain the second logical conversion physical information.
[0077] It should be noted that in the process of obtaining the second logical transformation physical information by performing a second scan on the page data of the single-layer unit SLC data block that has not recorded a mapping snapshot, the second page data that has not recorded a mapping snapshot is first determined from the SLC data block; then, the second page data is scanned to obtain the second logical transformation physical information; based on obtaining the second logical transformation physical information, the second logical transformation physical information can be transferred to the end of the pre-set logical transformation physical temporary storage table, which can also prepare for the subsequent reconstruction of the mapping table.
[0078] It is worth noting that the first logical conversion of physical information and the second logical conversion of physical information are only for distinguishing different objects, and do not indicate that the two are different types of data. Distinguishing between the two can also help to explain the technical solution of the present invention.
[0079] Additionally, in one embodiment, such as Figure 5 As shown, transferring the first logic conversion physical information to the front of the preset logic conversion physical temporary storage table may include, but is not limited to, steps S210 to S220.
[0080] Step S210: Determine the header position information from the logical conversion physical temporary storage table;
[0081] Step S220: Transfer the first logical conversion physical information to the front of the logical conversion physical temporary storage table according to the table header position information.
[0082] It should be noted that, in the process of transferring the first logical conversion physical information to the front of the pre-set logical conversion physical temporary table, the header position information is first determined from the logical conversion physical temporary table; then, the first logical conversion physical information is transferred to the front of the logical conversion physical temporary table according to the header position information; through the above technical solution, the first logical conversion physical information can be accurately transferred to the front of the logical conversion physical temporary table, in preparation for the subsequent mapping table reconstruction.
[0083] It is worth noting that in the process of determining the table header location information, it can be determined based on the storage address information of the logical translation physical temporary table. After determining the table header location information from the logical translation physical temporary table, the first logical translation physical information can be transferred to the front of the logical translation physical temporary table according to the table header location information, in order to prepare for the subsequent mapping table reconstruction process.
[0084] Additionally, in one embodiment, such as Figure 6 As shown, transferring the second logic conversion physical information to the latter part of the logic conversion physical temporary storage table may include, but is not limited to, steps S410 to S420.
[0085] Step S410: Determine the end position information from the logical conversion physical temporary storage table;
[0086] Step S420: Transfer the second logic conversion physical information to the end of the logic conversion physical temporary storage table according to the table tail position information.
[0087] It should be noted that, in the process of transferring the second logical conversion physical information to the end of the logical conversion physical temporary storage table, the end position information of the table is first determined from the logical conversion physical temporary storage table; then, the second logical conversion physical information is transferred to the end of the logical conversion physical temporary storage table according to the end position information; through the above technical solution, the second logical conversion physical information can be accurately transferred to the end of the logical conversion physical temporary storage table, which prepares for the subsequent mapping table reconstruction.
[0088] It is worth noting that the tail position information can also be determined based on the storage address information of the logical translation physical temporary table. After determining the tail position information from the logical translation physical temporary table, the second logical translation physical information can be transferred to the end of the logical translation physical temporary table according to the tail position information, in order to prepare for the subsequent mapping table reconstruction process.
[0089] Additionally, in one embodiment, such as Figure 7 As shown, in the logical transformation physical temporary storage table, the first logical transformation physical information and the second logical transformation physical information are merged in sequence to obtain the reconstructed mapping table, which may include, but is not limited to, step S510.
[0090] Step S510: In the logical translation physical temporary storage table, the first logical translation physical information and the second logical translation physical information are merged according to the logical address order to obtain the reconstructed mapping table.
[0091] It should be noted that in the process of merging the first and second logical translation physical information in the logical translation physical temporary storage table to obtain the reconstructed mapping table, the first and second logical translation physical information can be merged in the logical address order to obtain the reconstructed mapping table, making the construction of the reconstructed mapping table simpler and faster.
[0092] Additionally, in one embodiment, such as Figure 8 As shown, in the logical transformation physical temporary storage table, the first logical transformation physical information and the second logical transformation physical information are merged in sequence to obtain the reconstructed mapping table. This process may include, but is not limited to, steps S610 and S620.
[0093] Step S610: Obtain data write request;
[0094] Step S620: Perform data write operation based on data write request and rebuild mapping table.
[0095] It should be noted that in the logical transformation physical temporary table, after the first logical transformation physical information and the second logical transformation physical information are merged sequentially to obtain the reconstructed mapping table, a data write request can be obtained. Then, in response to the data write request, a data write operation is performed based on the data write request and the reconstructed mapping table. Based on the above technical solution, the efficiency of data write operation is greatly improved. Since the page data in the previous QLC data block that did not record the mapping snapshot is not discarded, write amplification is greatly reduced.
[0096] In one specific embodiment of the present invention, such as Figure 9As shown, during power-on reconstruction of a QLC storage device, the pages of QLC data blocks that have not been snapshotted are first scanned and reconstructed, and added to the beginning of the L2P temporary table, for example, the mapping relationship LBA0–PBA12. Next, the pages of SLC data blocks in the storage device that have not been snapshotted are scanned and added to the end of the L2P temporary table in the order they were written, for example, the mapping relationship LBA0–PBA96. Then, the L2P temporary table is merged sequentially from beginning to end, resulting in the final mapping relationship LBA0–PBA96.
[0097] In some embodiments of the present invention, one embodiment of the present invention also provides a mapping table reconstruction apparatus, the apparatus comprising:
[0098] The first scanning unit is used to perform a first scanning process on the page data in the four-layer unit QLC data block that has not recorded a mapping snapshot, and to obtain the first logical transformation physical information;
[0099] The first transfer unit is used to transfer the first logic conversion physical information to the front of the preset logic conversion physical temporary storage table;
[0100] The second scanning unit is used to perform a second scanning process on the page data in the single-layer unit SLC data block that has not recorded a mapping snapshot, so as to obtain the second logical transformation physical information;
[0101] The second transfer unit is used to transfer the second logic conversion physical information to the rear of the logic conversion physical temporary storage table;
[0102] The merging unit is used to sequentially merge the first logical transformation physical information and the second logical transformation physical information in the logical transformation physical temporary storage table to obtain a reconstructed mapping table.
[0103] It is worth noting that the specific implementation of this mapping table reconstruction device is basically the same as the specific implementation of the mapping table reconstruction method described above, and will not be repeated here.
[0104] In some embodiments of the present invention, such as Figure 10 As shown, an embodiment of the present invention also provides an electronic device 700, including: a memory 720, a processor 710, and a computer program stored in the memory 720 and executable on the processor 710. When the processor 710 executes the computer program, it implements the mapping table reconstruction method in the above embodiment.
[0105] In some embodiments of the present invention, one embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described device embodiments, such that the processor performs the mapping table reconstruction method in the above-described embodiments.
[0106] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0107] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A mapping table reconstruction method, characterized in that, The method includes: The first scan process is performed on the page data in the four-layer unit QLC data block that has not recorded the mapping snapshot to obtain the first logical transformation physical information; The first logic conversion physical information is transferred to the front of the preset logic conversion physical temporary storage table; A second scan is performed on the page data in the single-layer unit SLC data block that does not record a mapping snapshot to obtain the second logical transformation physical information; The second logic conversion physical information is transferred to the end of the logic conversion physical temporary storage table; In the logical transformation physical temporary storage table, the first logical transformation physical information and the second logical transformation physical information are merged in sequence to obtain the reconstructed mapping table; The step of transferring the first logical conversion physical information to the front of a preset logical conversion physical temporary storage table includes: Determine the header position information from the aforementioned logical transformation physical temporary storage table; Based on the header position information, the first logical conversion physical information is transferred to the front of the logical conversion physical temporary storage table; The step of transferring the second logical conversion physical information to the latter part of the logical conversion physical temporary storage table includes: Determine the end position information from the logical transformation physical temporary storage table; The second logic conversion physical information is transferred to the end of the logic conversion physical temporary storage table based on the table tail position information.
2. The mapping table reconstruction method according to claim 1, characterized in that, The first scan processing of page data in the four-layer unit QLC data block that has not recorded a mapping snapshot to obtain the first logical transformation physical information includes: Determine the first page of data from the QLC data block that was not recorded in the mapping snapshot; The first page of data is subjected to a first scan process to obtain the first logical conversion physical information.
3. The mapping table reconstruction method according to claim 1, characterized in that, The second scan processing of page data in the single-layer unit SLC data block that has not recorded a mapping snapshot to obtain the second logical transformation physical information includes: Determine the second page of data from the SLC data block that did not record the mapping snapshot; The second page of data is subjected to a second scan to obtain the second logical conversion physical information.
4. The mapping table reconstruction method according to claim 1, characterized in that, The process of merging the first logical transformation physical information and the second logical transformation physical information in the logical transformation physical temporary storage table in sequence to obtain a reconstructed mapping table includes: In the logical-to-physical temporary storage table, the first logical-to-physical information and the second logical-to-physical information are merged according to logical address order to obtain the reconstructed mapping table.
5. The mapping table reconstruction method according to claim 1, characterized in that, After merging the first logical transformation physical information and the second logical transformation physical information sequentially in the logical transformation physical temporary storage table to obtain the reconstructed mapping table, the method further includes: Write a request to retrieve data; Perform a data write operation based on the data write request and the reconstructed mapping table.
6. A mapping table reconstruction apparatus, characterized in that, The device includes: The first scanning unit is used to perform a first scanning process on the page data in the four-layer unit QLC data block that has not recorded a mapping snapshot, and to obtain the first logical transformation physical information; The first transfer unit is used to transfer the first logic conversion physical information to the front of the preset logic conversion physical temporary storage table; The second scanning unit is used to perform a second scanning process on the page data in the single-layer unit SLC data block that has not recorded a mapping snapshot, so as to obtain the second logical transformation physical information; The second transfer unit is used to transfer the second logic conversion physical information to the rear of the logic conversion physical temporary storage table; The merging unit is used to sequentially merge the first logical transformation physical information and the second logical transformation physical information in the logical transformation physical temporary storage table to obtain a reconstructed mapping table; The step of transferring the first logical conversion physical information to the front of a preset logical conversion physical temporary storage table includes: Determine the header position information from the aforementioned logical transformation physical temporary storage table; Based on the header position information, the first logical conversion physical information is transferred to the front of the logical conversion physical temporary storage table; The step of transferring the second logical conversion physical information to the latter part of the logical conversion physical temporary storage table includes: Determine the end position information from the logical transformation physical temporary storage table; The second logic conversion physical information is transferred to the end of the logic conversion physical temporary storage table based on the table tail position information.
7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the mapping table reconstruction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the control processor, they implement the mapping table reconstruction method as described in any one of claims 1 to 5.