Mapping table management method of storage chip, electronic device and storage medium

By initializing and managing P2L submap tables in the memory chip and writing them to blank pages of the target data block, complex data operation problems caused by limited RAM space are solved, the performance and life of the memory chip are improved, and the physics is improved Resource utilization rate.

CN118689786BActive Publication Date: 2024-11-29ARTMEM TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411160040.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-29
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

When the memory chip manages the mapping table of data blocks, due to the limited RAM space, data reading and writing operations are complex, which affects performance and life. The garbage collection efficiency of the prior art is low, and physical space is wasted.

Method used

A mapping table management method for memory chips is proposed. By initializing the physical address to the logical address P2L submap table in the target data block, and when the storage upper limit is reached, it is stored in the temporary data block, and then the temporary data block is The address mapping information is written to the blank data page of the target data block, realizing centralized management and efficient utilization of the mapping table.

Benefits of technology

It improves the performance and life of the memory chip, while improving the utilization rate of physical resources, reducing the impact on reserved space, and improving garbage collection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689786B_ABST
    Figure CN118689786B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a mapping table management method for a storage chip, an electronic device and a storage medium, belonging to the field of memory technology; the storage chip includes multiple data blocks; the method includes: determining a target data block and a temporary data block from the multiple data blocks, and initializing a P2L sub-mapping table in a first cache area, the P2L sub-mapping table is used to record address mapping information of data stored in a preset number of data pages; during the data storage process of the target data block, performing a mapping table maintenance operation; the mapping table maintenance operation includes: when the P2L sub-mapping table has reached the storage upper limit, storing the address mapping information in the P2L sub-mapping table in the temporary data block and initializing the P2L sub-mapping table in the first cache area; according to the remaining blank data pages in the target data block, storing the address mapping information in the temporary data block in the remaining blank data pages, thereby improving the performance and extending the life of the storage chip through the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of memory technology, and in particular to a mapping table management method for a memory chip, an electronic device, and a storage medium. Background Art

[0002] Non-volatile memory (also known as falsh memory) such as Nand Flash usually sets a physical address to logical address P2L mapping table and a logical address to physical address L2P mapping table to implement data management for each data block in the memory. However, the RAM space of the application products corresponding to the storage chip (such as eMMC, UFS, SD card, USB flash drive and other storage products) is often limited. When the space occupied by the total address mapping information corresponding to the storage data that can be stored in each data block in the storage chip is larger than the RAM, the storage chip still uses a P2L mapping table to maintain the storage data for a data block, which will cause the application product to read and write data to the storage chip. The operation is very complicated. However, the method of saving a P2L sub-mapping table after writing several data pages will waste physical space and affect the efficiency of garbage collection, thereby affecting the performance and life of the storage chip. Therefore, how to improve the performance and extend the life of the storage chip while ensuring the normal operation of the storage chip is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a mapping table management method for a storage chip, an electronic device, and a storage medium, which can improve the performance and extend the life of the storage chip.

[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a mapping table management method for a storage chip, wherein the storage chip includes a plurality of data blocks; the method includes:

[0005] Determine a target data block and a temporary data block from the multiple data blocks, and initialize a physical address to logical address P2L sub-mapping table in the first buffer area, wherein the P2L sub-mapping table is used to record address mapping information of data stored in a preset number of data pages;

[0006] During the data storage process of the target data block, performing a mapping table maintenance operation;

[0007] The mapping table maintenance operation includes:

[0008] When the P2L sub-mapping table has reached the storage upper limit, storing the address mapping information in the P2L sub-mapping table into the temporary data block and initializing the P2L sub-mapping table in the first buffer area;

[0009] According to the remaining blank data pages in the target data block, the address mapping information in the temporary data block is stored in the remaining blank data pages.

[0010] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the mapping table management method of the storage chip described in the first aspect when executing the computer program.

[0011] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the mapping table management method of the storage chip described in any one of the first aspects.

[0012] The mapping table management method, electronic device and storage medium of the storage chip proposed in the present application store the P2L sub-mapping table in a temporary data block when the P2L sub-mapping table in the first cache area has reached the storage upper limit during the data storage process of the target data block, and write the address information stored in the P2L sub-mapping table corresponding to the target data block in the temporary data block into the target data block according to the remaining blank pages of the target data block, so that each P2L sub-mapping table of each target data block can be placed at the end of the target data block. At this time, there is a continuous data storage space before the P2L sub-mapping table, and the P2L sub-mapping table can be centrally managed. At this time, one data page can store multiple P2L sub-mapping tables at the same time, thereby improving the utilization rate of physical resources while reducing the impact on the reserved space. Therefore, the embodiment of the present application can improve the performance of the storage chip and extend its life. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of a method for managing a mapping table of a storage chip provided in an embodiment of the present application;

[0014] Figure 2 It is a P2L mapping table storage process of an embodiment of the mapping table management method of the storage chip provided in the embodiment of the present application;

[0015] Figure 3 It is a garbage collection schematic diagram of an embodiment of a mapping table management method for a memory chip provided in an embodiment of the present application;

[0016] Figure 4 It is a schematic diagram of a process of obtaining a P2L sub-mapping table in a garbage collection process in one embodiment of a mapping table management method for a memory chip provided in an embodiment of the present application;

[0017] Figure 5It is a schematic diagram of a P2L mapping table reconstruction process in a mapping table management method for a storage chip provided in an embodiment of the present application;

[0018] Figure 6 It is a structural diagram of the hardware structure corresponding to the mapping table management method of the storage chip provided in the embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0020] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0022] First, some nouns involved in this application are analyzed:

[0023] The full name of L2P table is Logical Address to Physical Address Mapping Table, which is the logical address to physical address mapping table.

[0024] The full name of P2L table is Physical to Logical Mapping Table, which is a physical to logical mapping table.

[0025] Over Provisioning is used for bad block mapping, garbage collection, wear leveling, etc. For example, if there is a bad block in an area of ​​the normal space, the bad block will be hidden and a part of the reserved space will be used to fill the gap.

[0026] Non-volatile memory (also known as falsh memory) such as Nand Flash usually sets a physical address to logical address P2L mapping table and a logical address to physical address L2P mapping table to implement data management of each data block in the memory, wherein each data block (hereinafter referred to as a data block) has a P2L mapping table. As the capacity of non-volatile memory increases, the storage capacity of data blocks increases. Using a P2L mapping table to record all the physical to logical mapping information of the data that can be stored in a data block requires tens of KB of RAM. In addition, a non-volatile memory has multiple data blocks being read and written and data blocks that serve as garbage collection sources, so the required RAM space is relatively large. However, the RAM space of the application products corresponding to the storage chip (such as eMMC, UFS, SD card, USB flash drive and other storage products) is often limited, which is not enough to support using a P2L to record all the physical to logical mapping information in a data block, so that when the P2L mapping table corresponding to the total address mapping information corresponding to the storage data that can be stored in each data block in the storage chip is larger than the RAM, the storage chip still uses a P2L mapping table to maintain the storage data of a data block, which will cause the application product to read and write data to the storage chip. Very complicated. Therefore, in the prior art, multiple P2L sub-mapping tables are set for each data block. According to the size of the P2L sub-mapping table, when the data corresponding to the size of the P2L sub-mapping table is written every several pages, that is, the space of the P2L sub-mapping table is full, this P2L sub-mapping table is written in the next blank page (that is, the data page below) immediately following the data, that is, a P2L sub-mapping table is written every several pages in a data block. The capacity of a page is generally 16KB. Limited by the RAM size, the P2L sub-mapping table is generally less than 16KB, such as 2KB or 4KB, etc. This results in a waste of physical storage space for writing pages, affecting the reserved space of the memory (i.e., OP space), causing the memory to do more garbage collection during operation, affecting performance and life. Therefore, how to improve the performance and extend the life of the memory chip while ensuring the normal operation of the memory chip is a technical problem that needs to be solved urgently. Based on this, the embodiment of the present application proposes a mapping table management method, electronic device, and storage medium for a memory chip, which can improve the performance and extend the life of the memory chip.

[0027] The mapping table management method of the storage chip, the electronic device and the storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the mapping table management method of the storage chip in the embodiments of the present application is described.

[0028] The mapping table management method of the memory chip of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0029] Refer to the following Figure 1 As shown, according to the mapping table management method of the storage chip provided in the embodiment of the present application, the storage chip includes multiple data blocks; the mapping table management method of the storage chip includes:

[0030] S100, determining a target data block and a temporary data block from a plurality of data blocks, and initializing a physical address to a logical address P2L sub-mapping table in a first buffer area, wherein the P2L sub-mapping table is used to record address mapping information of data stored in a preset number of data pages;

[0031] S200, performing a mapping table maintenance operation during data storage of the target data block;

[0032] The mapping table maintenance operations include:

[0033] S210, when the P2L sub-mapping table has reached the storage upper limit, storing the address mapping information in the P2L sub-mapping table into a temporary data block and initializing the P2L sub-mapping table in the first buffer area;

[0034] S220 . According to the remaining blank data pages in the target data block, store the address mapping information in the temporary data block in the remaining blank data pages.

[0035] Therefore, during the data storage process of the target data block, when the P2L sub-mapping table in the first cache area has reached the storage upper limit, the P2L sub-mapping table is stored in a temporary data block, and according to the remaining blank pages of the target data block, the address information stored in the P2L sub-mapping table corresponding to the target data block in the temporary data block is written into the target data block, so that each P2L sub-mapping table of each target data block can be placed at the end of the target data block. At this time, there is a continuous data storage space before the P2L sub-mapping table, and the P2L sub-mapping table can be centrally managed. At this time, one data page can store multiple P2L sub-mapping tables at the same time, thereby improving the utilization rate of physical resources while reducing the impact on the reserved space. Therefore, the embodiment of the present application can improve the performance of the storage chip and extend its life.

[0036] It can be understood that, taking the P2L sub-mapping table as 4KB, the total mapping information of a data block as 64KB, and the size of a data page as 16KB as an example, although storing the P2L sub-mapping table will consume additional OP space, in the related technology, each data page stores a P2L sub-mapping table, which will require 16 data pages to store the total mapping information, while the embodiment of the present application only needs 4 data pages to store, thereby improving the utilization rate of physical resources.

[0037] It is understandable that the target data block in step S100 is a blank data block into which storage data can be written. There may be multiple target data blocks, and the temporary data block is used to store temporary data generated in the storage chip.

[0038] The first buffer area is a buffer area applied in application products of storage chip applications such as eMMC, UFS, SD card, USB flash drive, etc. The preset number can be selectively set according to actual needs. The address mapping information is the mapping information from physical address to logical address.

[0039] The P2L sub-mapping table has reached the storage upper limit in step S210, which means that the capacity of the recorded address mapping information is equal to the capacity of the P2L sub-mapping table. For example, if the P2L sub-mapping table is set to 2KB, and the recorded address mapping information has reached 2KB, it means that the storage upper limit has been reached. In other embodiments, the P2L sub-mapping table has reached the storage upper limit, which may also mean that the remaining capacity is insufficient to store the address mapping information of the data in a data page. For example, if the P2L sub-mapping table is set to 2KB, then there is 1KB left to write the address mapping information, but the address mapping information of a data page is expected to require 1.1KB of storage space, then it can be determined that the storage upper limit has been reached.

[0040] It is understandable that the remaining blank data pages are used to store the P2L sub-mapping tables obtained in step S210. Initializing the P2L sub-mapping table is used to clear the address mapping information in the space of the size of the P2L sub-mapping table in the first buffer area.

[0041] It is understandable that according to the remaining blank data pages in the target data block, the address mapping information in the temporary data block is stored in the remaining blank data pages, including:

[0042] Obtaining a data page threshold, wherein the data page threshold is set to the number of data pages occupied by address mapping information of the maximum storage data supported by the target data block;

[0043] When the number of remaining blank data pages in the target data block is equal to the data page threshold, the address mapping information in the temporary data block is stored in the remaining blank data pages.

[0044] By setting the data page threshold, it is easy to determine whether to stop storing data for the target data block.

[0045] The data page threshold may be calculated in real time or may be preset, and this is not limited in the embodiments of the present application.

[0046] It is understood that the data page threshold is determined by the following steps:

[0047] Get the total number of data pages of the target data block;

[0048] Determine the address mapping information capacity corresponding to each data page according to the storage capacity of each data page;

[0049] The data page threshold is determined according to the address mapping information capacity, the storage capacity of a single data page, the RAM capacity, and the total number of pages.

[0050] It is understandable that the address mapping information capacity is the total capacity occupied by the address mapping information of each storage data in a data page; the length of the address information of each storage data stored in each data page is fixed, therefore, the address mapping information capacity required for the address mapping information corresponding to each data page can be determined according to the storage data capacity that can be stored in the data page. The minimum unit of the memory when writing and reading data is the data page, therefore, the number of data pages corresponding to the address mapping information in the P2L sub-mapping table that meets the requirement of being less than the RAM capacity can be determined. Then, the data page threshold can be determined.

[0051] For example, assuming that the storage capacity of a single data page is 16KB, when a 4KB data is stored in the data page, its address mapping information needs to occupy 4B, then a data page needs to occupy 16B of address mapping information capacity, assuming that the capacity of the preset P2L sub-mapping table is 4KB according to the RAM capacity, then a P2L sub-mapping table can store 1024 address mapping information, which can cover the range of 256 data pages. A data page can store 4 P2L sub-mapping tables. At this time, when the total number of pages is determined, the optimal data page threshold can be obtained by repeatedly adjusting the capacity of the P2L sub-mapping table.

[0052] It is understandable that the address mapping information in the temporary data block is stored in the remaining blank data page, including:

[0053] Write the address mapping information in the temporary data block into the second buffer area in sequence according to the order in which the P2L sub-mapping table is written into the temporary data block;

[0054] The address mapping information in the second buffer area is sequentially written into the remaining blank data pages.

[0055] By setting the second buffer area, all P2L sub-mapping tables of a data block can be written at one time.

[0056] The second buffer area is a storage space outside the storage chip.

[0057] Each data page can store N P2L sub-mapping tables, where N is a positive integer greater than or equal to 1. After the address information in the temporary data block is sequentially written into the second buffer area, continuous address mapping information can be formed. At this time, the address mapping information can be written with the data page as the writing unit, so that multiple P2L sub-mapping tables can be written to the end of the target data block.

[0058] It is understandable that when the target data block is a garbage collection source data block, the method further includes:

[0059] Selecting a blank data block from multiple data blocks as a garbage collection target data block;

[0060] Get the logical address to physical address L2P mapping table;

[0061] Determine the valid data page according to the address mapping information stored in the garbage collection source data block and the L2P mapping table;

[0062] Migrate valid data pages to garbage collection destination data blocks.

[0063] It is understandable that one L2P mapping table may correspond to at least one data block, each data block corresponds to one P2L general mapping table, and one P2L general mapping table may be divided into multiple P2L sub-mapping tables.

[0064] After the migration of valid data pages of the garbage collection source data block is completed, it will become a free block, waiting to be reused later.

[0065] It is understandable that determining the valid data page according to the address mapping information stored in the garbage collection source data block and the L2P mapping table includes:

[0066] Writing the address mapping information into the RAM in batches starting from the starting position of the address mapping information stored in the garbage collection source data block, so as to read the P2L sub-mapping table one by one;

[0067] Compare the physical addresses of the P2L sub-mapping table formed by the address mapping information written each time with the L2P mapping table;

[0068] When the comparison result indicates that the physical address in the P2L sub-mapping table is consistent with the physical address recorded in the L2P mapping table, it is determined that the data page corresponding to the P2L sub-mapping table is a valid data page.

[0069] When the RAM capacity is insufficient to store all address mapping information of a data block at one time, it is necessary to read the P2L sub-mapping tables one by one, that is, read one P2L sub-mapping table at a time starting from the starting data page storing the address mapping information.

[0070] It is understandable that the address mapping information is written into the RAM in batches starting from the starting position of the address mapping information stored in the garbage collection source data block, including:

[0071] Get the storage capacity of a single P2L sub-mapping table;

[0072] Starting from the starting position of the address mapping information stored in the garbage collection source data block, taking the storage capacity as the range of a single traversal, traversing the address mapping information stored in the garbage collection source data block multiple times;

[0073] The address mapping information of the storage capacity obtained by a single traversal is updated into the RAM to obtain a P2L sub-mapping table.

[0074] It is understandable that when the storage chip reads data with a data page as the minimum unit, the storage capacity of the P2L sub-mapping table represents the number of occupied data pages.

[0075] It is understood that the method further comprises:

[0076] When the address mapping information stored in the target data block does not match the stored data, starting from the first data page of the target data block, a preset number of data pages are used as the range of a single traversal, and the address mapping information is traversed multiple times on the data pages;

[0077] The address mapping information obtained in each traversal is used as a P2L sub-mapping table;

[0078] Update the target data block according to the P2L sub-mapping table;

[0079] According to the P2L sub-mapping table and the L2P mapping table, valid data pages are determined and data migration processing is performed on the valid data pages.

[0080] It is understandable that in some embodiments, if the P2L table of the garbage collection source data block is lost, such as if the P2L sub-mapping table is partially lost or completely lost, it is necessary to rebuild the P2L sub-mapping table in the above manner. During the reconstruction process, all P2L sub-mapping tables stored in the data block are updated to ensure the accuracy of the P2L sub-mapping table.

[0081] Below, refer to Figures 2 to 4 Taking NAND Flash as a memory chip as an example, the mapping table management method of the memory chip of the embodiment of the present application is described, wherein NAND Flash is composed of multiple data blocks (i.e., data blocks), wherein the basic unit of a data block is a page, i.e., a data page. Each data block is composed of multiple pages, and each page contains a data area (data storage area) and an extended spare area (spare area).

[0082] Refer to Figure 2 As shown, the P2L table of the data block is divided into several P2L sub-mapping tables. For a blank data block that is determined to perform data operation, that is, the target data block, the first cache is applied for the target data block to store the P2L sub-mapping table. The size of this first cache is N KB (commonly 2KB or 4KB, generally smaller than the storage capacity of the page). This P2L sub-mapping table can store the physical to logical mapping information corresponding to the data stored in M ​​pages. For each target data block, when writing data to the target data block, the address mapping information will be updated to the P2L sub-mapping table in the first cache area. Every time M pages are written, the single P2L sub-mapping table reaches the storage limit, and the P2L sub-mapping table needs to be written to a temporary block (SLC block) until the number of remaining pages of the target data block reaches the number of pages required to store the complete P2L table. At this time, the P2L sub-mapping table is read out from the temporary data block (such as the SLC block) in sequence, and then accumulated into a complete P2L table and written into the last empty packet page of the target data block.

[0083] When garbage collection occurs, refer to Figure 3As shown, the garbage collection source data block needs to read the complete P2L table, obtain the logical address corresponding to the physical address recorded in the P2L table, and find the physical address corresponding to this logical address in the L2P table. If the physical address of the L2P table is consistent with the physical address corresponding to the mapping item (that is, the address mapping information) detected in the garbage collection source data block, it indicates that this data is valid data and needs to be moved to the garbage collection destination data block.

[0084] Reference Figure 4 As shown, the complete P2L table of the garbage collection source data block cannot be stored in RAM, so each time it is necessary to read the P2L sub-mapping table in sequence from the complete P2L table in several pages at the end of the garbage collection source data block, such as Figure 4 As shown, check the address mapping information recorded in the P2L sub-mapping table one by one, and then refer to Figure 3 As shown, the valid data is moved to the garbage collection destination data block.

[0085] Reference Figure 5 As shown, when the P2L table stored in the garbage collection source data block is lost, refer to Figure 5 As shown, it is necessary to read the logical address information corresponding to the data recorded in each page in sequence to rebuild the P2L table. Specifically, refer to Figure 5 As shown, according to the page range covered by the P2L sub-mapping table, the address mapping information is read for the data in the page range covered by each P2L sub-mapping table, and the reconstruction of the information of each P2L sub-mapping table is completed.

[0086] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the mapping table management method of the storage chip when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0087] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0088] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0089] The memory 602 may be a NAND flash, and the relevant program code is stored in the memory 602, and the processor 601 calls and executes the mapping table management method of the memory chip according to the embodiment of the present application;

[0090] Input / output interface 603, used to implement information input and output;

[0091] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0092] A bus 605 that transmits information between the various components of the device (e.g., the processor 601, the memory 602, the input / output interface 603, and the communication interface 604);

[0093] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0094] An embodiment of the present application also provides a computer-readable storage medium, which is a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, it implements the mapping table management method of the above-mentioned storage chip.

[0095] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0096] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0097] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0098] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0099] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0100] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0101] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0102] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0103] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0106] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for managing a mapping table of a storage chip, characterized in that: The storage chip includes a plurality of data blocks; the method includes: Determine a target data block and a temporary data block from the multiple data blocks, and initialize a physical address to logical address P2L sub-mapping table in the first buffer area, wherein the P2L sub-mapping table is used to record address mapping information of data stored in a preset number of data pages; During the data storage process of the target data block, performing a mapping table maintenance operation; The mapping table maintenance operation includes: When the P2L sub-mapping table has reached the storage upper limit, storing the address mapping information in the P2L sub-mapping table into the temporary data block and initializing the P2L sub-mapping table in the first buffer area; According to the remaining blank data pages in the target data block, storing the address mapping information in the temporary data block in the remaining blank data pages; The step of storing the address mapping information in the temporary data block in the remaining blank data pages in the target data block includes: Acquire a data page threshold, wherein the data page threshold is set to the number of data pages occupied by address mapping information of the maximum storage data supported by the target data block; When the number of remaining blank data pages in the target data block is equal to the data page threshold, the address mapping information in the temporary data block is stored in the remaining blank data pages.

2. The method for managing a mapping table of a memory chip according to claim 1, characterized in that: The storing the address mapping information in the temporary data block into the remaining blank data page comprises: Sequentially write the address mapping information in the temporary data block into the second cache area according to the order in which the P2L sub-mapping table is written into the temporary data block; The address mapping information in the second buffer area is sequentially written into the remaining blank data pages.

3. The method for managing a mapping table of a memory chip according to claim 1, characterized in that: When the target data block is a garbage collection source data block, the method further includes: Selecting a blank data block from the plurality of data blocks as a garbage collection target data block; Get the logical address to physical address L2P mapping table; Determine a valid data page according to the address mapping information stored in the garbage collection source data block and the L2P mapping table; The valid data page is migrated to the garbage collection target data block.

4. The method for managing a mapping table of a memory chip according to claim 3, characterized in that: The determining of the valid data page according to the address mapping information stored in the garbage collection source data block and the L2P mapping table includes: Writing the address mapping information into the RAM in batches starting from the starting position of the address mapping information stored in the garbage collection source data block; Compare the physical addresses of the P2L sub-mapping table formed by the address mapping information written each time with the L2P mapping table; When the comparison result indicates that the physical address in the P2L sub-mapping table is consistent with the physical address recorded in the L2P mapping table, it is determined that the data page corresponding to the P2L sub-mapping table is the valid data page.

5. The method for managing a mapping table of a memory chip according to claim 4, characterized in that: The step of writing the address mapping information into the RAM in batches starting from the starting position of the address mapping information stored in the garbage collection source data block includes: Obtaining the storage capacity of a single P2L sub-mapping table; Starting from the starting position of the address mapping information stored in the garbage collection source data block, taking the storage capacity as the range of a single traversal, traversing the address mapping information stored in the garbage collection source data block multiple times; The address mapping information of the storage capacity obtained by a single traversal is updated into the RAM.

6. The method for managing a mapping table of a memory chip according to claim 3, characterized in that: The method further comprises: When the address mapping information stored in the target data block does not match the stored data, starting from the first data page of the target data block, a preset number of data pages are used as the range of a single traversal, and the address mapping information is traversed multiple times on the data pages; The address mapping information obtained in each traversal is used as a P2L sub-mapping table; Updating the target data block according to the P2L sub-mapping table; According to the P2L sub-mapping table and the L2P mapping table, a valid data page is determined and data migration processing is performed on the valid data page.

7. The method for managing a mapping table of a memory chip according to claim 1, characterized in that: The data page threshold is determined by the following steps: Obtaining the total number of data pages of the target data block; Determining the address mapping information capacity corresponding to each of the data pages according to the storage capacity of each of the data pages; A data page threshold is determined according to the address mapping information capacity, the storage capacity of a single data page, the capacity of the RAM and the total number of pages.

8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the mapping table management method of the memory chip according to any one of claims 1 to 7 when executing the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the mapping table management method of the storage chip according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Semiconductor memory device

    JP2014106718A