Data management method and device based on zero-reservation space solid state disk and readable medium

By using a hot management list for SLC-type flash blocks and a pseudo-programming-reprogramming strategy in the solid-state drive, zero-reservation space data management is achieved, solving the problem of reserved space affecting user space and performance, and providing stable and high-speed read and write performance and flash cell reliability.

CN119271569BActive Publication Date: 2025-11-18XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411305942.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-11-18
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

Existing solid-state drives (SSDs) require a certain amount of space to be reserved during manufacturing for garbage collection, which reduces the usable space for users or increases the purchase cost. Furthermore, both excessively large and small reserved space ratios can affect the stability of read and write performance.

Method used

A hot management linked list based on SLC type flash memory blocks is adopted. Through pseudo-programming and reprogramming strategies, data is separated according to hotness and coldness. Under the condition of meeting the threshold, SLC type flash memory cells are migrated to TLC type flash memory cells to generate additional reserved space.

Benefits of technology

It provides stable and high-speed read and write performance without reducing storage space, and optimizes garbage collection operations through hot and cold data separation to ensure the reliability of flash memory cells and the response speed of host requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271569B_ABST
    Figure CN119271569B_ABST
Patent Text Reader

Abstract

The application discloses a data management method and device based on a zero-reserved-space solid state disk and readable medium, and comprises the following steps: obtaining data to be written in a current period, a data volume of garbage collection and a remaining idle space capacity of a TLC type; programming the data to be written into a flash memory block of an SLC type corresponding to a heat type in a pseudo-programming manner according to a predicted heat degree of the data to be written; updating a heat management linked list to obtain an updated heat management linked list; if a threshold judgment condition is met, selecting an optimal SLC flash memory block in the updated heat management linked list as a re-programming target and programming into a flash memory unit of the TLC type in a re-programming manner, and taking the re-programming target as additional space as a reserved space; and if the threshold judgment condition is not met, taking the flash memory unit of the TLC type as the reserved space. The application can guarantee storage space while reserving a large reserved space, and provide stable and high-speed read-write performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage, and more specifically to a data management method, apparatus, and readable medium based on a zero-reservation solid-state drive. Background Technology

[0002] Due to the off-site update characteristic of NAND flash memory—that is, modifying data is written to other programmable flash pages and the original flash pages storing data are marked as invalid—manufacturers need to reserve a portion of disk space transparent to users when manufacturing solid-state drives (SSDs), known as reserve space, to perform internal operations such as garbage collection. Currently, mainstream SSDs on the market have a reserve space ratio of 7% to 50%. The larger the reserve space of an SSD, the more stable its read / write performance and the longer its lifespan. However, reserve space comes at the cost of user space; a larger reserve space ratio reduces the user's usable space or increases the purchase cost of the SSD, while a smaller reserve space ratio leads to frequent triggering of internal disk operations, failing to provide stable, high-speed read / write performance. Summary of the Invention

[0003] The purpose of this application is to provide a data management method, device, and readable medium based on a zero-reservation solid-state drive to address the aforementioned technical problems.

[0004] In a first aspect, the present invention provides a data management method based on a zero-reservation-space solid-state drive, comprising the following steps:

[0005] Construct a heat management linked list based on SLC type flash blocks. The heat management linked list includes a valid flash block linked list, a partially valid flash block linked list, and an invalid flash block linked list. The valid flash block linked list records SLC type flash blocks as valid flash blocks, and all flash pages in a valid flash block are valid flash pages. The partially valid flash block linked list records SLC type flash blocks as partially valid flash blocks, and the flash pages in a partially valid flash block include both valid flash blocks and invalid flash pages. The invalid flash block linked list records SLC type flash blocks as invalid flash blocks, and all flash pages in an invalid flash block are invalid flash pages.

[0006] Get the data to be written in the current period, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Get the predicted popularity of the data to be written based on the historical access count of the data to be written. Select the corresponding SLC type flash block based on the predicted popularity and program the data to be written into the corresponding SLC type flash block in a pseudo-programming manner. Update the popularity management list to get the updated popularity management list.

[0007] The amount of data to be migrated in SLC is calculated based on the data of all valid flash pages in the SLC type flash cell. If the amount of data to be migrated in SLC, the amount of data collected from garbage collection, and the remaining free space capacity of the TLC type meet the threshold criteria, then the best SLC flash block is selected as the reprogramming target in the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash cell, and the SLC type flash cell obtained from the reprogramming target is used as additional space as reserved space. If the amount of data to be migrated in SLC, the amount of data collected from garbage collection, and the remaining free space capacity of the TLC type do not meet the threshold criteria, then the TLC type flash cell is used as reserved space. The reserved space is used to receive data generated by garbage collection and the data of all valid flash pages in the SLC type flash cell, or the data of valid flash pages in other SLC type flash cells besides the reprogramming target.

[0008] As a preferred option, the threshold determination condition is:

[0009] The amount of data migrated from SLC plus the amount of data collected from garbage collection is greater than or equal to the remaining free space capacity of TLC types.

[0010] Preferably, the predicted popularity of the data to be written is obtained based on the historical access frequency of the data, and an SLC type flash memory block corresponding to the predicted popularity type is selected based on the predicted popularity, specifically including:

[0011] In response to the determination that the number of historical accesses to the data to be written in the two busy cycles prior to the current cycle is not zero, the predicted heat of the data to be written is hot data, and the data to be written is programmed into the SLC type flash memory block with the heat type of hot data in a pseudo-programming manner.

[0012] In response to the determination that the historical access count of the data to be written in the two busy cycles prior to the current cycle is 0, the predicted heat of the data to be written is cold data, and the data to be written is programmed into the SLC type flash memory block with cold data heat type in a pseudo-programming manner.

[0013] Preferably, the data stored in the valid flash page is data that has not been updated after being written to the SLC type flash block; the data stored in the invalid flash page is data that has been updated after being written to the SLC type flash block, and the invalid flash block can be erased to become an idle flash block.

[0014] Preferably, the SLC type flash memory cell divides the voltage range into two different voltage windows to represent 1 bit of data; the TLC type flash memory cell divides the voltage range into eight different voltage windows to represent 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell. The reprogramming method is to increase the voltage to the range of eight voltage windows, so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.

[0015] As a preferred option, the process for selecting the reprogramming target is as follows:

[0016] If a valid flash block is found in the updated heat management list, then the valid flash block is used as the reprogramming target.

[0017] In response to the determination that there are no valid flash blocks in the updated heat management list but there are some valid flash blocks, the valid flash block containing the most valid flash pages is selected as the reprogramming target.

[0018] If it is determined that there are no valid flash blocks or some valid flash blocks in the updated heat management list, then invalid flash blocks are used as reprogramming targets.

[0019] Preferably, the garbage collection process involves selecting a flash memory block and migrating the data of the valid flash pages within the block, then erasing the data in the flash memory block. Multiple flash memory cells constitute one flash page, and multiple flash pages constitute one flash memory block. Data read and write operations are performed at the flash page level, while erasure operations are performed at the flash block level.

[0020] Secondly, the present invention provides a data management device based on a zero-reservation-space solid-state drive, comprising:

[0021] The linked list construction module is configured to construct a heat management linked list based on SLC type flash blocks. The heat management linked list includes a valid flash block linked list, a partially valid flash block linked list, and an invalid flash block linked list. The valid flash block linked list records SLC type flash blocks as valid flash blocks, and all flash pages in the valid flash blocks are valid flash pages. The partially valid flash block linked list records SLC type flash blocks as partially valid flash blocks, and the flash pages in the partially valid flash blocks include both valid flash blocks and invalid flash pages. The invalid flash block linked list records SLC type flash blocks as invalid flash blocks, and all flash pages in the invalid flash blocks are invalid flash pages.

[0022] The pseudo-programming module is configured to obtain the data to be written in the current cycle, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Based on the historical access count of the data to be written, it obtains the predicted popularity of the data to be written. Based on the predicted popularity, it selects the corresponding SLC type flash block and programs the data to be written into the corresponding SLC type flash block in a pseudo-programming manner. It also updates the popularity management list to obtain the updated popularity management list.

[0023] The selection module is configured to calculate the amount of SLC migration data based on the data of all valid flash pages in the SLC type flash cell. In response to determining that the amount of SLC migration data, the amount of garbage collection data, and the remaining free space capacity of the TLC type meet the threshold judgment conditions, the best SLC flash block is selected as the reprogramming target from the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash cell, and the SLC type flash cell obtained from the reprogramming target is used as additional space as reserved space. In response to determining that the amount of SLC migration data, the amount of garbage collection data, and the remaining free space capacity of the TLC type do not meet the threshold judgment conditions, the TLC type flash cell is used as reserved space. The reserved space is used to receive data generated by garbage collection and the data of all valid flash pages in the SLC type flash cell, or the data of valid flash pages in other SLC type flash cells besides the reprogramming target.

[0024] Thirdly, the present invention provides an electronic device including one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.

[0025] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.

[0026] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in any of the implementations in the first aspect.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] (1) The data management method based on zero-reservation space solid-state drive proposed in this invention adopts a pseudo-programming-reprogramming strategy for all flash cells of SLC type flash blocks. While ensuring the reliability of flash cells, it also ensures the response speed of host requests. Furthermore, it reprograms the data of SLC type flash cells into TLC type flash cells to generate more additional space as reserved space.

[0029] (2) The data management method based on zero-reservation solid-state drive proposed in this invention realizes the separation of hot and cold data of SLC type flash memory cells through heat management linked list, which makes it easier to select the data of SLC type flash memory cell with the most effective flash memory pages as the reprogramming target in the subsequent reprogramming target selection process, while the data of the remaining SLC type flash memory cells are garbage collected.

[0030] (3) The data management method based on zero-reservation solid-state drive proposed in this invention can select to perform reprogramming operation when the sum of the amount of data migrated by SLC and the amount of data collected by garbage collection is greater than or equal to the remaining free space capacity of TLC type according to the threshold judgment condition. Since there is a lack of sufficient free TLC type space, the data of some SLC type flash memory cells are reprogrammed to generate additional space as reserved space. This can retain a large reserved space without reducing the storage space and provide stable and high-speed read and write performance. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic flowchart illustrating a data management method based on a zero-reservation solid-state drive, as an embodiment of this application.

[0033] Figure 2 This is a schematic diagram of the system architecture of a data management method based on a zero-reservation solid-state drive, as an embodiment of this application;

[0034] Figure 3 This is a schematic diagram illustrating the reprogramming target selection for a data management method based on a zero-reservation solid-state drive according to an embodiment of this application.

[0035] Figure 4 The threshold voltage distribution diagram of the pseudo-programming-reprogramming strategy of the data management method based on a zero-reservation solid-state drive according to an embodiment of this application;

[0036] Figure 5 This is a schematic diagram illustrating the selection of reserved space in the data management method based on a zero-reservation solid-state drive according to an embodiment of this application.

[0037] Figure 6 This is a schematic diagram of an entity relationship recognition device according to an embodiment of this application;

[0038] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0039] 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. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0040] Figure 1 The present application illustrates a data management method based on a zero-reservation solid-state drive, comprising the following steps:

[0041] S1. Construct a heat management linked list based on SLC type flash blocks. The heat management linked list includes a valid flash block linked list, a partially valid flash block linked list, and an invalid flash block linked list. The valid flash block linked list records SLC type flash blocks as valid flash blocks, and all flash pages in a valid flash block are valid flash pages. The partially valid flash block linked list records SLC type flash blocks as partially valid flash blocks, and the flash pages in a partially valid flash block include both valid flash blocks and invalid flash pages. The invalid flash block linked list records SLC type flash blocks as invalid flash blocks, and all flash pages in an invalid flash block are invalid flash pages.

[0042] In a specific embodiment, the data stored in a valid flash page is data that has not been updated after being written to an SLC type flash block; the data stored in an invalid flash page is data that has been updated after being written to an SLC type flash block, and invalid flash blocks can be erased to become idle flash blocks.

[0043] Specifically, the SLC / TLC hybrid flash memory architecture consists of SLC and TLC flash memory cells. Each SLC flash cell can store one bit of data, offering high read / write performance but low storage density; while each TLC flash cell can store three bits of data, offering higher storage density but lower read / write performance. Therefore, data requested by the host is preferentially written to SLC flash cells to improve response speed. In idle states without host requests, the SSD performs internal operations: migrating data from SLC flash cells to TLC flash cells, erasing data from the SLC flash cells, and performing garbage collection on the TLC flash cells.

[0044] SLC and TLC flash memory cells use the same physical medium, differing only in their programming methods. In other words, a flash memory cell in an idle state after erasure is an SLC type flash memory cell if programmed with SLC, capable of storing 1 bit of data; while a TLC type flash memory cell is a TLC type flash memory cell if programmed with TLC, capable of storing 3 bits of data.

[0045] refer to Figure 2The zero-reservation-space solid-state drive of this application adds three functional modules to the flash memory controller: a programming / reprogramming module, a reserved space selection module, and a reprogramming target selection module. In addition, the flash memory controller also includes a basic address mapping module and a garbage collection module. These modules perform the same functions as conventional solid-state drives. The flash memory chips in the solid-state drive are composed of SLC-type flash memory cells and TLC-type flash memory cells. An SLC-type flash memory cell can store 1 bit of data, and a TLC-type flash memory cell can store 3 bits of data. The flash memory can perform basic read, write, and erase operations. Read and write operations are performed at the flash page level, while erase operations are performed at the flash block level. The programming / reprogramming module is used to execute a pseudo-programming-reprogramming strategy, applying this strategy to all flash memory cells in an SLC-type flash memory block. This ensures the reliability of the flash memory cells while allowing data to be written to the flash memory cells twice. The reserved space selection module can dynamically select space as reserved space based on the unused space capacity of the solid-state drive. When sufficient unused TLC flash memory blocks are available, the SSD selects TLC flash memory blocks as reserved space. When sufficient unused TLC flash memory blocks are lacking, the SSD uses reprogramming technology to convert data in programmed SLC flash memory cells to TLC flash memory cells. Since SLC flash memory cells can only store 1 bit of data while TLC flash memory cells store 3 bits, each TLC flash memory cell can hold an additional 2 bits of data during the conversion process, with the extra space created by the conversion being reserved space. The reprogramming target selection module is used for hot and cold data separation and implements the function of the SLC flash memory block selector through a heat management linked list. The embodiments of this application are designed based on a heat management linked list for SLC flash memory blocks to achieve hot and cold data separation operations on SLC flash memory blocks. The optimal (coldest, with the most effective flash pages, i.e., lowest access frequency) SLC flash memory block is selected as the reprogramming target, while the data in the hottest (highest access frequency) SLC flash memory block is migrated and erased.

[0046] refer to Figure 3This application's embodiments divide programmed SLC-type flash memory blocks into three different types: invalid flash memory blocks, partially valid flash memory blocks, and valid flash memory blocks. Invalid flash memory blocks consist entirely of invalid flash pages (i.e., data updated after being written to SLC-type flash memory cells) and can be directly erased to a free state. Partially valid flash memory blocks consist of valid and invalid flash pages; valid flash memory blocks consist entirely of valid flash pages (i.e., data not updated after being written to SLC-type flash memory cells). This application's embodiments implement the function of an SLC flash memory block selector by constructing a heat management linked list based on SLC-type flash memory blocks. This heat management linked list is a three-level linked list structure, maintaining a valid flash memory block linked list, a partially valid flash memory block linked list, and an invalid flash memory block linked list. The valid flash memory block linked list records valid flash memory blocks, the partially valid flash memory block linked list records partially valid flash memory blocks, and the invalid flash memory block linked list records invalid flash memory blocks.

[0047] S2: Obtain the data to be written in the current period, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Based on the historical access count of the data to be written, obtain the predicted popularity of the data to be written. Select the corresponding SLC type flash block according to the predicted popularity and program the data to be written into the corresponding SLC type flash block in a pseudo-programming manner. Update the popularity management list to obtain the updated popularity management list.

[0048] In a specific embodiment, the predicted popularity of the data to be written is obtained based on the historical access count of the data to be written, and an SLC type flash memory block corresponding to the predicted popularity type is selected based on the predicted popularity, specifically including:

[0049] In response to the determination that the number of historical accesses to the data to be written in the two busy cycles prior to the current cycle is not zero, the predicted heat of the data to be written is hot data, and the data to be written is programmed into the SLC type flash memory block with the heat type of hot data in a pseudo-programming manner.

[0050] In response to the determination that the historical access count of the data to be written in the two busy cycles prior to the current cycle is 0, the predicted heat of the data to be written is cold data, and the data to be written is programmed into the SLC type flash memory block with cold data heat type in a pseudo-programming manner.

[0051] Specifically, the embodiments of this application first perform cold and hot data separation on the data to be written. That is, SLC-type flash memory blocks with a cold data type store data predicted to be cold data, and SLC-type flash memory blocks with a hot data type store data predicted to be hot data. Since garbage collection migration data is usually cold data that has not been accessed for a long time, storing this type of data in SLC-type flash memory blocks with a cold data type can effectively reduce the triggering frequency of garbage collection operations. The method for determining whether the data to be written is cold or hot data is as follows: the time period is classified into busy periods (with read / write requests within the time window) and idle periods (without read / write requests within the time window) based on whether there are host read / write requests within the time window, and the logical addresses of all updated data in the previous two busy periods of the current period are recorded. If the data to be written in the current period has been accessed in the previous two busy periods, then the data to be written is considered hot data, meaning it will be frequently accessed in the future; otherwise, the data to be written is considered cold data. After the data to be written is pseudo-programmed and the predicted popularity is determined, and the corresponding SLC type flash memory block is stored, the flash memory controller will update whether each flash memory page is a valid flash memory page or an invalid flash memory page. Therefore, the popularity management list will also be updated to obtain the updated popularity management list.

[0052] Solid-state drives (SSDs) consist of a flash memory controller and flash memory chips. The flash memory controller records whether each flash page is valid or invalid, and also records the number of flash pages migrated from TLC-type flash blocks during garbage collection. Flash memory chips are composed of many flash memory cells; many flash memory cells form a flash page, multiple flash pages form a flash block, and many flash blocks ultimately form a flash memory chip. In the embodiments of this application, 16KB flash memory cells constitute one flash page, and 1024 flash pages constitute one flash block. In other embodiments, different values ​​can be used for this division. The reason for dividing flash pages and flash blocks is that read and write operations are performed at the flash page level, while erase operations are performed at the flash block level. When the available space of TLC-type flash blocks is insufficient, garbage collection is performed on the TLC-type flash blocks. This involves selecting the flash block containing the most valid flash pages, migrating the valid flash pages to other locations (at which point all the pages are invalid), and then erasing this flash block, thus freeing up more usable space.

[0053] S3. Calculate the amount of data to be migrated in the SLC type flash memory cell based on the data of all valid flash pages in the SLC type flash memory cell. If the amount of data to be migrated in the SLC type, the amount of data collected from garbage collection, and the remaining free space capacity of the TLC type meet the threshold judgment conditions, then select the best SLC flash memory block as the reprogramming target in the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash memory cell, and the SLC type flash memory cell obtained from the reprogramming of the reprogramming target is used as reserved space. If the amount of data to be migrated in the SLC type, the amount of data collected from garbage collection, and the remaining free space capacity of the TLC type do not meet the threshold judgment conditions, then the TLC type flash memory cell is used as reserved space. The reserved space is used to receive data generated by garbage collection and the data of all valid flash pages in the SLC type flash memory cell, or the data of valid flash pages in other SLC type flash memory cells besides the reprogramming target.

[0054] In a specific embodiment, the threshold determination condition is: the amount of data migrated by SLC + the amount of data collected by garbage collection ≥

[0055] Remaining free space capacity of TLC type.

[0056] In a specific embodiment, the SLC type flash memory cell divides the voltage range into two different voltage windows to represent 1 bit of data; the TLC type flash memory cell divides the voltage range into eight different voltage windows to represent 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell. The reprogramming method is to increase the voltage to the range of eight voltage windows, so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.

[0057] Specifically, SLC flash memory cells divide the voltage range into two different voltage windows, while TLC flash memory cells divide the voltage range into eight different voltage windows. The flash memory controller maps the eight different values ​​that 3 bits of data can represent to the eight voltage windows one-to-one. This application proposes a pseudo-programming-reprogramming strategy. The pseudo-programming strategy uses only the first two voltage windows to represent 1 bit of data, while the reprogramming strategy increases the voltage to represent 3 bits of data within the eight voltage windows, thus achieving the conversion from SLC to TLC flash memory cells. First, all data to be written needs to be programmed into SLC flash memory cells using pseudo-programming. When the amount of data migrated from SLC, the amount of data collected from garbage collection, and the remaining free space capacity of TLC type meet the threshold judgment condition, the data in the SLC type flash memory cells is reprogrammed (increasing the threshold voltage) according to the bit value of the data, so that the threshold voltage is within the target voltage window. The remaining free space capacity of TLC type is the number of TLC type flash memory blocks in an idle state, which can be recorded and obtained in real time. (Reference) Figure 4 The pseudo-programming-reprogramming strategy first programs the target flash memory cell into the P1 voltage window range. At this time, the target flash memory cell represents 1 bit of data, which is an SLC type flash memory cell. During reprogramming, the voltage of the target flash memory cell is increased from the P1 voltage window range to the P6 voltage window range by continuing to fill electrons, so that the target flash memory cell represents 3 bits of data, which is a TLC type flash memory cell.

[0058] Specifically, embodiments of this application select suitable idle hard disk space as reserved space based on threshold judgment conditions. The migration strategy for a conventional SLC / TLC hybrid architecture is as follows: all valid flash pages in an SLC flash block are migrated to TLC flash cells, while data generated during garbage collection in the TLC flash block is migrated to reserved space transparent to the user. (Reference) Figure 5In embodiments of this application, when the threshold judgment condition is not met, since there are sufficient free TLC type flash memory blocks (enough erased TLC type flash memory cells) to receive all the data of valid flash memory pages in SLC type flash memory cells and data generated by garbage collection, TLC type flash memory blocks are selected as reserved space. In embodiments of this application, when the threshold judgment condition is met, since there is a lack of sufficient free TLC type space, the data of the programmed SLC type flash memory cell containing the most valid flash memory pages is selected as the reprogramming target and migrated to the TLC type flash memory cell. The additional space obtained from reprogramming the data of the SLC type flash memory cell is used as reserved space to receive the data of valid flash memory pages in all remaining SLC type flash memory blocks other than those used as reprogramming targets and data generated by garbage collection.

[0059] In a specific embodiment, the process for selecting the reprogramming target is as follows:

[0060] If a valid flash block is found in the updated heat management list, then the valid flash block is used as the reprogramming target.

[0061] In response to the determination that there are no valid flash blocks in the updated heat management list but there are some valid flash blocks, the valid flash block containing the most valid flash pages is selected as the reprogramming target.

[0062] If it is determined that there are no valid flash blocks or some valid flash blocks in the updated heat management list, then invalid flash blocks are used as reprogramming targets.

[0063] Specifically, valid flash blocks are the preferred target for reprogramming, and the valid flash block with the most valid flash pages is selected as the reprogramming target. If no valid flash blocks are available, the portion of valid flash blocks with the most valid flash pages is selected as the reprogramming target. If there are no valid flash blocks or only a portion of valid flash blocks, free flash blocks are selected as the reprogramming target.

[0064] In a specific embodiment, the garbage collection process involves selecting a flash memory block and migrating the data of the valid flash pages within the flash memory block, and then erasing the data in the flash memory block. Multiple flash memory cells constitute one flash page, and multiple flash pages constitute one flash memory block. Data read and write operations are performed at the flash page level, while erasure operations are performed at the flash block level.

[0065] Specifically, for write operations, data is programmed into SLC-type flash memory cells using a pseudo-programming method. Before programming, a hot / cold data separation is performed by a reprogramming target selection module. Based on the predicted popularity of data (inferring the probability of future access based on the historical access frequency), data with similar popularity is written into the same SLC-type flash memory block. When there are no read / write requests from the host, the SSD migrates data from SLC-type flash memory cells to TLC-type flash memory blocks and performs garbage collection on the TLC-type flash memory blocks. At this point, suitable free disk space needs to be selected as reserved space. If there are enough free TLC-type flash memory blocks (enough programmable TLC-type flash memory blocks), then the TLC-type flash memory blocks are selected as reserved space, and data generated during garbage collection is also migrated to this reserved space. The garbage collection process involves migrating data from TLC-type flash memory blocks to this reserved space while simultaneously erasing the TLC-type flash memory blocks. If there are insufficient free TLC flash blocks, the SLC flash block selector in the reprogramming target selection module will select the best SLC flash block (the SLC flash block containing the most valid flash pages) as the reprogramming target, reserving the extra space generated by the reprogramming operation as pre-allocated space to receive migration data generated by garbage collection. For read operations, the embodiments of this application adopt the same approach as other solid-state drives.

[0066] Further reference Figure 6 As an implementation of the methods shown in the above figures, this application provides an embodiment of an entity relationship recognition device, which is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0067] This application provides a data management device based on a zero-reservation solid-state drive, including:

[0068] The linked list construction module 1 is configured to construct a heat management linked list based on SLC type flash blocks. The heat management linked list includes a valid flash block linked list, a partially valid flash block linked list, and an invalid flash block linked list. The valid flash block linked list records SLC type flash blocks as valid flash blocks, and all flash pages in the valid flash blocks are valid flash pages. The partially valid flash block linked list records SLC type flash blocks as partially valid flash blocks, and the flash pages in the partially valid flash blocks include valid flash blocks and invalid flash pages. The invalid flash block linked list records SLC type flash blocks as invalid flash blocks, and all flash pages in the invalid flash blocks are invalid flash pages.

[0069] The pseudo-programming module 2 is configured to obtain the data to be written in the current cycle, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Based on the historical access count of the data to be written, the predicted popularity of the data to be written is obtained. Based on the predicted popularity, the corresponding SLC type flash block is selected, and the data to be written is programmed into the corresponding SLC type flash block in a pseudo-programming manner. The popularity management list is then updated to obtain the updated popularity management list.

[0070] Select module 3 is configured to calculate the amount of SLC migration data based on the data of all valid flash pages in the SLC type flash cell. In response to determining that the amount of SLC migration data, the amount of garbage collection data, and the remaining free space capacity of the TLC type meet the threshold judgment conditions, the best SLC flash block is selected as the reprogramming target from the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash cell, and the SLC type flash cell obtained from the reprogramming target is used as additional space as reserved space. In response to determining that the amount of SLC migration data, the amount of garbage collection data, and the remaining free space capacity of the TLC type do not meet the threshold judgment conditions, the TLC type flash cell is used as reserved space. The reserved space is used to receive data generated by garbage collection and the data of all valid flash pages in the SLC type flash cell, or the data of valid flash pages in other SLC type flash cells besides the reprogramming target.

[0071] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. For example... Figure 7 As shown, the electronic device of this embodiment includes a processor 701 and a memory 702; wherein the memory 702 is used to store computer execution instructions; and the processor 701 is used to execute the computer execution instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant descriptions in the foregoing method embodiments.

[0072] Alternatively, the memory 702 can be either standalone or integrated with the processor 701.

[0073] When the memory 702 is set up independently, the electronic device also includes a bus 703 for connecting the memory 702 and the processor 701.

[0074] This invention also provides a computer storage medium storing computer execution instructions, which, when executed by processor 701, implement the above method.

[0075] This invention also provides a computer program product, including a computer program that, when executed by a processor 701, implements the above-described method.

[0076] In the embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0077] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0078] Furthermore, the functional modules in the various embodiments of this invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit formed by the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0079] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor 701 to execute some steps of the methods of the various embodiments of this application.

[0080] It should be understood that the processor 701 described above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor, or the processor 701 can be any conventional processor 701. The steps of the method disclosed in this invention can be directly manifested as the hardware processor 701 executing the steps, or as a combination of hardware and software modules within the processor 701 executing the steps.

[0081] The memory 702 may include high-speed RAM memory, and may also include non-volatile memory NVM, such as at least one disk storage device, and may also be a USB flash drive, portable hard drive, read-only memory, disk or optical disc, etc.

[0082] Bus 703 can be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 703 can be divided into address bus, data bus, control bus, etc. For ease of illustration, the bus 703 in the accompanying drawings of this application is not limited to only one bus 703 or one type of bus 703.

[0083] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0084] An exemplary storage medium is coupled to a processor 701, enabling the processor 701 to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor 701. The processor 701 and the storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor 701 and the storage medium can exist as discrete components in an electronic device or a host device.

[0085] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data management method based on a zero-reservation-space solid-state drive, characterized in that, Includes the following steps: A heat management linked list based on SLC type flash memory blocks is constructed. The heat management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list, and an invalid flash memory block linked list. The valid flash memory block linked list records SLC type flash memory blocks as valid flash memory blocks, and all flash pages in the valid flash memory blocks are valid flash pages. The partially valid flash memory block linked list records SLC type flash memory blocks as partially valid flash memory blocks, and the flash pages in the partially valid flash memory blocks include both valid flash memory blocks and invalid flash pages. The invalid flash memory block linked list records SLC type flash memory blocks as invalid flash memory blocks, and all flash pages in the invalid flash memory blocks are invalid flash pages. The system obtains the data to be written in the current period, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Based on the historical access count of the data to be written, it obtains the predicted popularity of the data to be written. Based on the predicted popularity, it selects the SLC type flash memory block corresponding to the popularity type and programs the data to be written into the corresponding SLC type flash memory block in a pseudo-programming manner. The system then updates the popularity management list to obtain the updated popularity management list. The amount of data for SLC migration is calculated based on the data of all valid flash pages in the SLC type flash cell. In response to determining that the amount of data for SLC migration, the amount of data for garbage collection, and the remaining free space capacity of TLC type meet the threshold judgment condition, the best SLC flash block is selected as the reprogramming target in the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash cell. The SLC type flash cell obtained by reprogramming the reprogramming target is used as the extra space as the reserved space. In response to the determination that the amount of data migrated by SLC, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type do not meet the threshold judgment conditions, the flash memory cell of TLC type is used as reserved space; The reserved space is used to receive data generated by garbage collection and data from all valid flash pages in SLC type flash memory, or data from valid flash pages in other SLC type flash memory cells except for the reprogramming target.

2. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The threshold determination condition is: The amount of data migrated from SLC plus the amount of data collected from garbage collection is greater than or equal to the remaining free space capacity of TLC types.

3. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The predicted popularity of the data to be written is obtained based on the historical access count of the data to be written, and an SLC type flash memory block corresponding to the predicted popularity type is selected based on the predicted popularity, specifically including: In response to determining that the number of historical accesses to the data to be written in the two busy cycles prior to the current cycle is not zero, the predicted heat of the data to be written is hot data, and the data to be written is programmed into an SLC type flash memory block with hot data in a pseudo-programming manner. In response to determining that the historical access count of the data to be written in the two busy cycles prior to the current cycle is 0, the predicted heat of the data to be written is cold data, and the data to be written is programmed into an SLC type flash memory block with cold data heat type in a pseudo-programming manner.

4. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The data stored in the valid flash memory page is data that has not been updated after being written to the SLC type flash memory block; the data stored in the invalid flash memory page is data that has been updated after being written to the SLC type flash memory block, and the invalid flash memory block can be erased to become an idle flash memory block.

5. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The SLC type flash memory cell divides the voltage range into two different voltage windows to represent 1 bit of data; the TLC type flash memory cell divides the voltage range into eight different voltage windows to represent 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell. The reprogramming method is to increase the voltage to the range of eight voltage windows, so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.

6. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The process for selecting the reprogramming target is as follows: In response to determining that a valid flash block exists in the updated heat management list, the valid flash block is taken as the reprogramming target; In response to determining that there are no valid flash blocks in the updated heat management list but there are some valid flash blocks, the valid flash block containing the most valid flash pages is taken as the reprogramming target; In response to the determination that there are no valid flash blocks or some valid flash blocks in the updated heat management list, invalid flash blocks are selected as the reprogramming target.

7. The data management method based on a zero-reservation-space solid-state drive according to claim 1, characterized in that, The garbage collection process involves selecting a flash memory block, migrating the data of valid flash pages within the block, and then erasing the data in the block. Multiple flash memory cells constitute one flash page, and multiple flash pages constitute one flash memory block. Data read and write operations are performed at the flash page level, while erasure operations are performed at the flash block level.

8. A data management device based on a zero-reservation-space solid-state drive, characterized in that, include: The linked list construction module is configured to construct a heat management linked list based on SLC type flash blocks. The heat management linked list includes a valid flash block linked list, a partially valid flash block linked list, and an invalid flash block linked list. The valid flash block linked list records SLC type flash blocks as valid flash blocks, and all flash pages in the valid flash blocks are valid flash pages. The partially valid flash block linked list records SLC type flash blocks as partially valid flash blocks, and the flash pages in the partially valid flash blocks include both valid flash blocks and invalid flash pages. The invalid flash block linked list records SLC type flash blocks as invalid flash blocks, and all flash pages in the invalid flash blocks are invalid flash pages. The pseudo-programming module is configured to obtain the data to be written in the current cycle, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type. Based on the historical access count of the data to be written, the module obtains the predicted popularity of the data to be written. Based on the predicted popularity, the module selects the corresponding SLC type flash memory block and programs the data to be written into the corresponding SLC type flash memory block in a pseudo-programming manner. The module also updates the popularity management list to obtain the updated popularity management list. The selection module is configured to calculate the amount of SLC migration data based on the data of all valid flash pages in the SLC type flash cell. In response to determining that the amount of SLC migration data, the amount of garbage collection data, and the remaining free space capacity of the TLC type meet the threshold judgment condition, the best SLC flash block is selected as the reprogramming target in the updated heat management list. The data in the reprogramming target is reprogrammed into the TLC type flash cell. The SLC type flash cell obtained by reprogramming the reprogramming target is used as the extra space as the reserved space. In response to the determination that the amount of data migrated by SLC, the amount of data collected by garbage collection, and the remaining free space capacity of TLC type do not meet the threshold judgment conditions, the flash memory cell of TLC type is used as reserved space; The reserved space is used to receive data generated by garbage collection and data from all valid flash pages in SLC type flash memory, or data from valid flash pages in other SLC type flash memory cells except for the reprogramming target.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Data distribution and reprogramming optimization method for 3D TLC flash memory

    CN114281251A

  • Managing data storage caching and tiering

    US11061814B1