Data management method, storage device and storage medium
By determining the degree of interference of subblocks in the storage device and carrying out data relocation, the problem of inter-block reliability in Partial Block mode is solved, and the service life and performance of storage products are improved.
Patent Information
- Application Number
- CN202310970745.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-14
AI Technical Summary
In Partial Block mode, subblocks will have a reliability impact on other subblocks within the same storage block when erased separately or programmed, resulting in difficulty in data security management.
By determining the degree of interference of each subblock, data relocation is performed based on the cumulative number of interferences and the set threshold to reduce interference, including data refresh and garbage collection in power-off or power-on states.
On the premise of ensuring data reliability, the service life and performance of storage products are improved, interference between sub-blocks is reduced, and the reliability of data management is enhanced.
Smart Images

Figure CN119440385A_ABST
Abstract
Description
Technical Field
[0001] The present application mainly relates to the field of storage technology, and in particular to a data management method, a storage device and a storage medium. Background Art
[0002] With the continuous evolution of Flash (flash memory) technology, the number of stacked layers is getting higher and higher, the storage density is getting higher and higher, and the cost per bit is getting lower and lower. Currently, NOR Flash and NANA Flash are the main flash memory on the market. Taking NAND Flash as an example, this method of increasing storage density also makes the capacity of a single NAND block (storage block) larger and larger, making the write amplification larger and larger, and it may also reduce performance.
[0003] In order to reduce other negative effects caused by excessive Block Size, new NAND features such as Partial BLK Mode are proposed. Compared with the previous NAND Flash mode, the erase unit is Block, and the erase unit of Partial Block mode is the Sub-block divided into the storage block. However, these sub-blocks are not electrically independent of each other like traditional storage blocks. The erasing, programming, and reading operations of the Sub-blocks in the same storage block may interfere with each other. For example, if a storage block is divided into two Sub-Blocks, namely Sub-Block1 and Sub-Block2, the two sub-blocks can be erased and programmed separately as part of the Partial-Block, but when programming or erasing Sub-Block1, it will obviously affect the reliability of the existing data on Sub-Block2, thus making it difficult to manage data security. Summary of the invention
[0004] The main purpose of this application is to propose a data management method, a storage device and a storage medium to solve the reliability impact of a sub-block on other sub-blocks in the same storage block when the sub-block is erased or programmed individually, thereby improving the service life of the storage product while ensuring data reliability.
[0005] To solve the above problems, the present application provides a data management method, which includes the following steps: determining the interference degree of each sub-block, where the interference degree is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs; and performing data migration on the sub-blocks whose interference degree meets the preset requirements.
[0006] In one embodiment, the above method determines the degree of interference of each of the sub-blocks, and the degree of interference is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs, including: determining the cumulative number of interferences of each sub-block; wherein, when the target sub-block performs an erase operation, the cumulative number of interferences of the target sub-block is cleared to zero, and when the remaining sub-blocks in the storage block to which the target sub-block belongs perform an erase operation each time, the cumulative number of interferences of the target sub-block is increased by one.
[0007] In one embodiment, data is relocated for sub-blocks whose interference levels meet preset requirements, including: when the storage device is ready to be powered off, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set first threshold; or when the storage device is in a powered-on state, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set second threshold.
[0008] In one embodiment, when a storage device is ready to be powered off, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set first threshold, including: when the storage device is ready to be powered off, determining a power-off method for the storage device, the power-off method including a short-time power-off and a long-time power-off; if the power-off method of the storage device is a long-time power-off, data is relocated for sub-blocks whose cumulative number of interferences is greater than the set first threshold.
[0009] In one embodiment, the first threshold is set to be less than or equal to the first reference value, and the second threshold is set to be less than or equal to the second reference value. When the cumulative number of interferences of the subblock is less than or equal to the first reference value, the subblock has complete reliability; when the cumulative number of interferences of the subblock is greater than the first reference value and less than or equal to the second reference value, the subblock has partial reliability.
[0010] In one embodiment, the first threshold is set by the following formula: STG1≤TG1-n-2; wherein STG1 is the first threshold, TG1 is the first reference value, and n is the total number of sub-blocks in a storage block.
[0011] In one embodiment, the method further includes: during the data writing operation of the target compact, if the accumulated number of interferences to the target compact is greater than a set third threshold, stopping the data writing operation of the target compact and shutting down the target compact to prohibit data writing.
[0012] In one embodiment, the above method also includes: multiple sub-blocks in the same storage block all store hot data or all store cold data, wherein hot data is data with an erasure frequency greater than a set frequency threshold, and cold data is data with an erasure frequency less than the set frequency threshold.
[0013] To solve the above problems, another technical solution provided by the present application is: to provide a storage device, the device includes a memory and a controller, wherein the memory includes a storage block, the storage block includes multiple sub-blocks, wherein the controller is connected to the memory to control the execution of the above-mentioned method to manage the data in the storage block.
[0014] To solve the above problem, another technical solution provided by the present application is: providing a computer-readable storage medium, in which program data is stored, and when the program data is executed by a controller, it is used to implement the above method.
[0015] The storage device management method provided by the present application includes: determining the interference degree of each sub-block, the interference degree is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs; relocating data of the sub-blocks whose interference degree meets the preset requirements; and powering off the storage device. Through the above method, the number of interferences of the sub-blocks in the storage block is counted, and the management process of garbage collection and data refresh is performed, so as to improve the performance and life of the storage product under the premise of ensuring data reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0017] Figure 1 It is a flowchart of an embodiment of a data management method provided by the present application;
[0018] Figure 2 It is a schematic diagram of independently erasing and programming sub-blocks in a storage block in an embodiment of a data management method provided by the present application;
[0019] Figure 3 It is a schematic diagram of the influence of the erasing operation of invalid data of a sub-block in the same storage block on the reliability of valid data of other sub-blocks in one embodiment of the present application;
[0020] Figure 4 It is a statistical table and meaning example of the number of erasures and the number of disturbances of a sub-block in an embodiment of a data management method provided by the present application;
[0021] Figure 5 It is a schematic diagram of setting thresholds for reliability standards, garbage collection, and data refresh in an embodiment of a data management method provided by the present application;
[0022] Figure 6This is a flow chart of maintaining data reliability in a power-on state in an embodiment of a data management method provided by the present application;
[0023] Figure 7 It is a schematic diagram of the effects of data refresh, garbage collection and long-term high-reliability power-off process on sub-block GPE in the power-on state in an embodiment of the data management method provided by the present application;
[0024] Figure 8 This is a flowchart of a long-term power-off in an embodiment of a data management method provided by the present application;
[0025] Fig. 9 It is a flowchart of forcibly closing the writing of a sub-block in an embodiment of a data management method provided by the present application;
[0026] Fig.10 This is a flow chart of a method for managing cold and hot data flow separation in an embodiment of a data management method provided by the present application;
[0027] Fig.11 It is a schematic diagram of dynamic and static wear balancing in an embodiment of a data management method provided by the present application;
[0028] Fig.12 is a structural schematic diagram of an embodiment of a storage device provided by the present application;
[0029] Fig.13 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0031] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0032] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0033] See also Figure 1 As shown, Figure 1 : is a flow chart of an embodiment of a data management method provided by the present application, the method comprising:
[0034] Step S10: Determine the interference degree of each sub-block, where the interference degree is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs.
[0035] Among them, Flash is generally composed of blocks. Taking NAND Flash as an example, a NAND Flash is composed of many blocks. The size of a block is generally 128KB, 256KB, 512KB. Block is the basic / minimum unit of NAND Flash erase operation. Each block contains many pages. The size of each page is mostly 2KB, 4KB, 8KB, etc. for the current common NAND Flash. Page is the basic unit of read and write operations.
[0036] With the development of NAND Flash, the number of stacked layers is getting higher and higher, and the size of a single block is getting larger and larger, which will have a negative impact on the performance and life of storage products. Therefore, Partial Block Mode is proposed, that is, a block can be divided into several sub-blocks, each of which can be programmed and erased independently, instead of having to be erased and programmed as a whole block.
[0037] Optionally, in one embodiment, the storage block is divided into several sub-blocks in a WL (Word Line) manner, and the divided sub-blocks can be erased and programmed independently.
[0038] Optionally, in one embodiment, the memory block is divided into several sub-blocks in a TSG (Top Select Gate) or BSG (Bottom Select Gate) manner, and the divided sub-blocks can be erased and programmed independently, such as Figure 2 As shown, Figure 2It is a schematic diagram of independent erasing and programming of sub-blocks within a storage block in an embodiment of the data management method provided by the present application; wherein PE refers to the number of erase cycles, specifically the number of erasures of a sub-block; GPE (PE Gap) refers to the sum of the cumulative number of interferences of other sub-blocks in the same storage block after a sub-block is erased or programmed for the first time after erasure.
[0039] The degree of interference of a sub-block refers to that, within the same storage block, when any sub-block is erased or programmed individually, the reliability of data in other sub-blocks will be affected, and the degree of the impact is determined by the cumulative number of operations on other sub-blocks.
[0040] In the traditional mode, in order to update the invalid data in a sub-block, it is necessary to move all the data in other sub-blocks in the storage block to other storage blocks, and then erase the entire storage block, and then program it; erasing the invalid data of a single sub-block in the storage block and then editing the valid data can improve the efficiency of garbage collection and reduce amplification, but it will reduce the reliability of the valid data in other sub-blocks in the same storage block. Figure 3 As shown, Figure 3 It is a schematic diagram of the effect of an erase operation of invalid data in a sub-block in the same storage block on the reliability of valid data in other sub-blocks in one embodiment of the present application.
[0041] Depend on Figure 3 It can be seen that although the divided sub-blocks can be erased and programmed independently, the sub-blocks are not as independent as the storage blocks in electrical operation. The isolation between sub-blocks belonging to the same storage block is poor. Therefore, when a single sub-block is erased, programmed, etc., it will cause a non-negligible deterioration effect on other sub-blocks belonging to the same storage block, affecting the reliability of the data and bringing difficulties to the security management of the data. Therefore, this application proposes a data management method, introduces the concept of GPE, counts the number of GPEs, and uses the determination of the number of GPEs and the set threshold to perform garbage collection and data refresh management on the data.
[0042] See also Figure 4 , Figure 4 It is a statistical table and meaning example of the number of erasures and the number of disturbances of a subblock in an embodiment of the data management method provided by the present application. Among them, PE refers to the number of erase cycles, specifically the number of erasures of a subblock; GPE (PE Gap) refers to the sum of the cumulative number of disturbances of other subblocks in the same storage block after a subblock is erased or programmed for the first time after erasure. For example, in the same storage block, after a subblock completes an operation (after erasing or programming for the first time after erasing), the GPE number of the subblock is reset to 0, and the GPE number of other subblocks in the same storage block is increased by 1.
[0043] Optionally, in one embodiment, determining the interference degree of each subblock, the interference degree is determined by the number of operations of the remaining subblocks in the storage block to which the current subblock belongs, and further includes: determining the cumulative number of interferences of the target subblock; wherein, when the target subblock is erased, the cumulative number of interferences of the target subblock is reset to zero, and when the remaining subblocks in the storage block to which the target subblock belongs perform an operation each time, the cumulative number of interferences of the target subblock is increased by one. For example, Figure 4 As shown in FIG. 1 , when the data of a sub-block Sub-block1 in a storage block is invalid data, if its data is updated to valid data, the total number of PEs and GPEs (PE Gap) of other sub-blocks (Sub-blocks) before the update is as follows: Figure 4 As shown in the lower left corner, the PE count of sub-block Sub-block1 is increased by one. Since the data of sub-block Sub-block1 is refreshed, sub-block Sub-block1 is not disturbed by the erasing and programming operations of any other sub-blocks, so the total GPE count of sub-block Sub-block1 is refreshed to 0; other sub-blocks are affected by the erasing and programming interference of sub-block Sub-block1, so the GPE counts of other sub-blocks are increased by one.
[0044] Step S12: relocate data of sub-blocks whose interference degree meets preset requirements.
[0045] See also Figure 5 , Figure 5 This is a schematic diagram of the threshold setting of reliability standard, garbage collection and data refresh in the first embodiment of the data management method provided by the present application. Among them, TG1 refers to the first reference value, TG2 refers to the second reference value, STG1 refers to the first threshold value, and STG2 refers to the second threshold value.
[0046] Among them, data migration includes: data refresh and garbage collection.
[0047] Data refresh means that the data stored on the flash memory is not permanently stored. The electrons originally stored in the floating gate will slowly leak out. As time goes by, when a certain amount of electrons leak out, a bit flip will occur. In addition, with the improvement of chip production technology, the interval between transistors is constantly shrinking, making it easier for electrons to leak, and it is more likely for bit flips to occur. When bit flips accumulate over a long period of time and exceed the error correction capability of the error correcting code (ECC), data loss will occur, so data refresh is needed to prevent data loss and extend the reliable storage time of data.
[0048] Garbage Collection (GC) refers to the process of relocating existing data to other flash memory locations and completely deleting some useless data. For flash memory, it does not have the ability to directly overwrite old data like a mechanical hard disk. Instead, it needs to erase the contents of the storage blocks that store invalid data before writing new data. The goal of garbage collection is to retain as many empty blocks as possible so that when the flash memory needs to write data, it can do so while waiting for the blocks to be deleted, ensuring that the hard disk runs efficiently and maintains good performance throughout its life cycle.
[0049] Optionally, in one embodiment, data is relocated for sub-blocks whose interference levels meet preset requirements, including: when the storage device is ready to be powered off, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set first threshold; or when the storage device is in a powered-on state, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set second threshold.
[0050] That is, when the GPE number of a sub-block is too large, the sub-block is greatly interfered by other sub-blocks in the same storage block, so it needs to be garbage collected or data refreshed before the data reliability risk occurs.
[0051] Optionally, in one embodiment, if Figure 6 As shown, Figure 6 This is a flow chart of maintaining data reliability in a power-on state in an embodiment of a data management method provided by the present application. The method specifically includes:
[0052] Step S120: when the storage device is powered on, determine the cumulative number of interferences of each sub-block.
[0053] Since the background will continuously perform data security inspections when powered on, it is necessary to collect statistics on the GPE value (interference degree) of each sub-block to meet the need to execute corresponding steps when the corresponding threshold is exceeded.
[0054] Step S121: relocate data for sub-blocks whose cumulative number of interferences is greater than a set second threshold.
[0055] Optionally, in one embodiment, a first threshold and a second threshold for performing data migration under the premise of ensuring data reliability may be set according to the values of the first reference value and the second reference value.
[0056] Reliability refers to the complete reliability defined in the JESD standard, or the reliability labeling defined by the manufacturer, such as meeting the data retention requirements of 40C 3Months.
[0057] Optionally, in one embodiment, the first threshold is set to be less than or equal to the first reference value, and the second threshold is set to be less than or equal to the second reference value. When the cumulative number of interferences to the sub-block is less than or equal to the first reference value, the sub-block has complete reliability, and when the cumulative number of interferences to the sub-block is greater than the first reference value and less than or equal to the second reference value, the sub-block has partial reliability. That is, when the number of interferences to a sub-block in the same storage block by other sub-blocks is less than or equal to the first reference value, it will hardly affect the reliability standard, while when it is greater than the first reference value and less than or equal to the second reference value, it can only meet the partial reliability described in the first reference value; for example, meeting the first reference value can guarantee the 40C 3Month data retention characteristic, while meeting the second reference value can only meet the 40C 2Weeks data retention characteristic.
[0058] Optionally, in one embodiment, the second reference value at least needs to ensure that the UBER (uncorrectable bit error rate) of the disturbed storage block after the last disturbance is less than a threshold value specified in standards such as JESD.
[0059] Optionally, in one embodiment, the values of the first reference value and the second reference value may vary with the life of the storage block. For example, when the number of PEs in a sub-block is 10% of the maximum number of PEs, it may be 400; and when it is 100% of the maximum number of PEs, it may be 100.
[0060] Since the background will continuously perform data security inspections in the power-on state, once it is found that the number of GPEs of a certain sub-block exceeds a set threshold (for example, 90% of the hard decoding capacity), the data will be refreshed; therefore, in the power-on state, there is no need to maintain the power-off data retention characteristics specified by the JESD standard; for example, for enterprise-level SSDs, it is 40C3Month.
[0061] However, the power-off state is different from the power-on state process. After the storage device is powered off, it may experience a long power-off process without powering on. At this time, the storage device cannot pass the inspection, so the data is refreshed or garbage collected in time before the reliability risk occurs, so as to ensure the security and reliability of the data. Therefore, the power-off operation of the storage device is different from the power-on state process. Figure 7 As shown, Figure 7 This is a schematic diagram of the impact of data refresh, garbage collection, and long-term high-reliability power-off process on the sub-block GPE in the power-on state in an embodiment of the data management method provided by the present application.
[0062] Optionally, in one embodiment, see Figure 8 As shown, Figure 8The present invention provides a data management method for a data storage device that is powered off for a long time. When the storage device is ready to be powered off, data migration for sub-blocks whose cumulative number of interferences is greater than a set first threshold value also includes:
[0063] Step S140: when the storage device is ready to be powered off, determine a power-off mode for the storage device, where the power-off mode includes a short-time power-off and a long-time power-off.
[0064] Among them, short-term power outage refers to a short-term power outage process caused by a short-term computer room failure, equipment restart, etc.; long-term power outage means that the device will experience a long period of power-off with high reliability, resulting in a longer storage retention process for the data.
[0065] Step S141: if the storage device is powered off for a long time, data is migrated for sub-blocks whose cumulative number of interferences is greater than a set first threshold.
[0066] Among them, if it is determined that the power-off mode of the storage device is a short-term power-off, the normal power-off process is directly executed. This process can be interactively implemented through the setting function in the protocol, or by defining new commands; if it is determined that the power-off mode of the storage device is a long-term power-off, the above steps are executed to refresh the data of the storage device or perform garbage collection and then execute the normal power-off process.
[0067] Optionally, in one embodiment, to prevent data reliability problems caused by garbage collection and data refresh, the first threshold is set to be determined by the following formula:
[0068] STG1≤TG1-n-2;
[0069] Among them, STG1 is the set first threshold, TG1 is the first reference value, and n is the total number of sub-blocks in a storage block.
[0070] Optionally, in one embodiment, in order to prevent data reliability problems caused by garbage collection and data refresh, the value of the set first threshold may be less than or equal to the first reference value.
[0071] During the operation of the storage device, the logic layer tends to approximate the two sub-blocks as two independent storage blocks, so alternating writing and erasing may occur. Figure 2When the sub-block A is divided by the WL (Word Line) method, it is assumed that the sub-block A and the sub-block B are divided. When the sub-block A is programmed to WL1, the sub-block B has been edited, and all the data in the sub-block B are marked as invalid data and erased. After that, when the sub-block A is edited to WL2, the sub-block B has been programmed for the second time and needs to be erased again. The process is repeated in this way, which will cause the word line programmed first in the sub-block A to experience more interference from the sub-block B than the word line programmed later, resulting in poor consistency of data reliability in the sub-block A, which interferes with the background inspection. Therefore, in order to prevent this problem, a process of setting a threshold judgment and forcibly closing the sub-block writing data is adopted.
[0072] Optionally, in one embodiment, to solve the above problem, the present application also provides a method, such as Fig. 9 As shown, Fig. 9 This is a flow chart of forcibly closing the writing of a sub-block in an embodiment of the data management method provided by the present application. The operation steps include:
[0073] Step S20: During the data writing operation of the target compact, if the cumulative number of interferences of the target compact is greater than a set third threshold.
[0074] That is, a third threshold is set to forcibly close the Open Block (the writable Page is not full, and programming is allowed to continue); the third threshold can be represented by STG3.
[0075] Step S21: stopping the data writing operation of the target compact and closing the target compact to prohibit data writing.
[0076] That is, when a sub-block in a storage block has not completed programming and its GPE value exceeds the set third threshold, the sub-block is forcibly closed and data is not allowed to be written to the sub-block.
[0077] Since the method of refreshing and recycling data on the storage device by introducing the GPE number indicator in the present application may cause additional write amplification, thereby causing the GPE number to increase too quickly, the present application also provides a method.
[0078] Optionally, in one embodiment, to solve the above problem, the present application also provides a method, such as Fig.10 As shown, Fig.10 This is a flow chart of a method for managing cold and hot data flow separation in an embodiment of a data management method provided by the present application. The method steps include:
[0079] Step S30: Allocate data in the storage device according to cold data storage blocks and hot data storage blocks.
[0080] In order to prevent the number of GPEs from growing too quickly, data can be allocated and stored in the form of storage blocks according to cold data and hot data. Among them, since the data in the flash memory cannot be overwritten, if you want to modify the existing data, you need to erase the original data and write the new data. Therefore, data that is frequently programmed, written, erased and modified is called hot data, and data that has not been modified or edited for a long time or is rarely modified after being written is called cold data.
[0081] For example, if there are sub-blocks C and D in the same storage block, where the data in sub-block C is hot data and the data in sub-block D is cold data, the hot data in sub-block C is frequently updated and erased, while the data in sub-block D does not need to be written and erased for a long time, then the frequent erasure of sub-block C will interfere with the data in sub-block D, resulting in reduced reliability of the data in sub-block D, so it is necessary to perform garbage collection or data refresh on the data in sub-block D. To prevent the number of GPEs from increasing too quickly, cold data and hot data are stored in different storage blocks, rather than storing part of the data in the same storage block as cold data and part of the data as hot data, and are stored in different sub-blocks; for example, all the data in storage block 1 is hot data, and all the data in storage block 2 is cold data, so the sub-blocks in storage block 2 do not need to be erased frequently, and the sub-blocks in storage block 1 update data frequently, so the difference in the number of GPEs between the sub-blocks in storage block 1 will not be too large, reducing the risk.
[0082] Step S31: exchanging storage between the cold data storage block and the hot data storage block in dynamic wear balancing or static wear balancing.
[0083] However, the above steps may cause the number of erasure errors of sub-blocks in different storage blocks to be quite different between cold data storage blocks and hot data storage blocks. Therefore, the problem can be alleviated by exchanging cold data storage blocks and hot data storage blocks through dynamic wear balancing or static wear balancing in units of storage blocks, such as Fig.11 As shown, Fig.11 It is a schematic diagram of hot and cold data diversion management in an embodiment of a data management method provided by the present application.
[0084] See also Fig.12 , Fig.12 1 is a schematic diagram of a structure of an embodiment of a storage device provided by the present application. The storage device 110 includes a memory 111 and a controller 112. The memory 111 is used to store program data. The controller 112 is used to connect to the memory 111 to execute program data to implement the following method:
[0085] Determine the interference degree of each sub-block, which is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs; relocate data for the sub-blocks whose interference degree meets the preset requirements; and power off the storage device.
[0086] See also Fig.13 , Fig.13 2 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 220 stores program data 221. When the program data 221 is executed by a processor, it is used to implement the following method:
[0087] Determine the interference degree of each sub-block, which is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs; relocate data for the sub-blocks whose interference degree meets the preset requirements; and power off the storage device.
[0088] Through the above method, the number of times a sub-block in a storage block is disturbed is counted, and after reaching a certain threshold, a garbage collection and data refresh management process is performed, thereby improving the performance and life of the storage product while ensuring data reliability.
[0089] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data management method, applied to a storage device, wherein the storage device comprises a storage block, and the storage block comprises a plurality of sub-blocks, wherein: The method comprises: Determining the interference degree of each of the sub-blocks, wherein the interference degree is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs; Data is migrated for sub-blocks whose interference degree meets preset requirements.
2. The data management method according to claim 1, characterized in that: The determining of the interference degree of each sub-block, wherein the interference degree is determined by the number of operations of the remaining sub-blocks in the storage block to which the current sub-block belongs, comprises: Determine the cumulative number of interferences of each of the sub-blocks; wherein, when the target sub-block is erased, the cumulative number of interferences of the target sub-block is reset to zero, and when the remaining sub-blocks in the storage block to which the target sub-block belongs perform an erase operation each time, the cumulative number of interferences of the target sub-block is increased by one.
3. The data management method according to claim 2, characterized in that: The data migration of the sub-blocks whose interference degree meets the preset requirement includes: When the storage device is ready to be powered off, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set first threshold; or When the storage device is in a powered-on state, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set second threshold.
4. The data management method according to claim 3, characterized in that: When the storage device is ready to be powered off, data migration is performed on a sub-block whose cumulative number of interferences is greater than a set first threshold, including: When the storage device is ready to be powered off, determining a power-off mode of the storage device, wherein the power-off mode includes a short-time power-off and a long-time power-off; If the storage device is powered off in the long-term power-off mode, data is relocated for sub-blocks whose cumulative number of interferences is greater than a set first threshold.
5. The data management method according to claim 3, characterized in that: The first threshold is set to be less than or equal to a first reference value, and the second threshold is set to be less than or equal to a second reference value. When the cumulative number of interferences of the sub-block is less than or equal to the first reference value, the sub-block has complete reliability; when the cumulative number of interferences of the sub-block is greater than the first reference value and less than or equal to the second reference value, the sub-block has partial reliability.
6. The data management method according to claim 5, characterized in that: The first threshold is determined by the following formula: STG1≤TG1-n-2; Among them, STG1 is the set first threshold, TG1 is the first reference value, and n is the total number of sub-blocks in a storage block.
7. The data management method according to claim 3, characterized in that: The method further comprises: During the data writing operation of the target compact, if the cumulative number of interferences of the target compact is greater than a set third threshold, the data writing operation of the target compact is stopped, and the target compact is closed to prohibit data writing.
8. The data management method according to claim 1, characterized in that: Multiple sub-blocks in the same storage block all store hot data or all store cold data, wherein the hot data is data with an erasure frequency greater than a set frequency threshold, and the cold data is data with an erasure frequency less than the set frequency threshold.
9. A storage device, characterized in that: include: A memory, comprising a memory block, wherein the memory block comprises a plurality of sub-blocks; as well as A controller is connected to the memory, and is used to execute the method according to any one of claims 1 to 8 to manage the data in the storage block.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program data, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Non-volatile memory sub-block erasure disturb management scheme
CN109119120A
Method, device and equipment for read interference processing and readable storage medium
CN109976671A
Method and system for reducing erase interference and erase time, storage medium and terminal
CN111785315A
Method and system for overcoming erasing interference, storage medium and terminal
CN111785316A
Solid state disk garbage collection method, device and equipment and medium
CN115129262A