Method for processing data retention capability and storage device

By grouping and cross-scanning the memory blocks and word lines of the storage device, the problem of data errors in NAND flash storage media after a long period of time is solved, and early detection and early processing of problematic memory blocks are realized, which improves the Data retention capability.

CN118796136BActive Publication Date: 2025-02-14MAXIO TECHNOLOGY (HANGZHOU) CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411287866.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-02-14
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

After NAND flash memory media does not perform read and write operations for a long time, the charge changes in the floating gate level lead to data errors, and the prior art is difficult to effectively solve this problem.

Method used

Through the controller, all memory blocks in the storage device are grouped and word line grouped. The cross-scan method is used to scan the word line group in the memory block one by one, and decide whether to move the data to the free memory block based on the scan results.

Benefits of technology

Effectively detect and process storage blocks in dangerous states, reducing the accumulation of problematic storage blocks caused by a single scan and improving data retention capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796136B_ABST
    Figure CN118796136B_ABST
Patent Text Reader

Abstract

Disclosed are a method for processing data retention capability and a storage device. The method includes: grouping storage blocks in all planes to obtain multiple storage block groups; grouping all word lines in each storage block to obtain multiple word line groups, each word line group also includes multiple storage pages; scanning inside each storage block group, the scanning includes multiple rounds of scanning, each round of scanning selects an unscanned word line from a word line group of a storage block of an initial chip as the initial scanning word line, and then sequentially determines the corresponding word line of the corresponding storage block in the next plane with a preset offset as the starting scanning word line of the next plane; and determines whether to move the data in the storage block to an idle storage block according to the scanning result after the scanning of each storage block is completed and executes accordingly. The method realizes early detection and early processing of problematic storage blocks through cross scanning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a method for processing data retention capability and a storage device. Background Art

[0002] Currently, many storage devices, such as USB flash memory, SD card, CF card, SSD, eMMC embedded storage card, UFS device, etc., use flash storage media, especially NAND flash storage media as the main storage media, and gradually become the mainstream form. Compared with the traditional magnetic media memory, the performance has made a qualitative leap. Flash storage media is composed of a large number of storage cells, each of which is composed of floating gate transistors. If no read or write operations are performed for a long time, the charge stored in the floating gate level of the transistor will change, causing the originally stored data to change, and then errors will occur. Therefore, keeping the data in the flash storage medium readable is an important capability of the storage device.

[0003] To solve this problem, the controller in the storage device will periodically or irregularly perform data inspection on the flash storage medium, and move the data in the storage block in a dangerous state to other free storage blocks according to the inspection result. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method for processing data retention capability and a storage device to improve the data retention capability of a storage device using a NAND flash memory as a main storage medium.

[0005] According to a first aspect of the present invention, a method for processing data retention capability is provided, the method is used for a storage device, the storage device includes a storage medium and a controller, the storage medium includes a plurality of flash memory chips, each flash memory chip includes a plurality of planes, each plane is sequentially divided into a plurality of storage block groups, each storage block includes a plurality of word lines arranged in sequence, each word line connects a plurality of storage pages, the method is executed by the controller, and includes the following steps:

[0006] Grouping all storage blocks to obtain a plurality of storage block groups, wherein one or more consecutive storage blocks in each plane are grouped in the same storage block group;

[0007] Grouping all word lines in each storage block to obtain a plurality of word line groups, wherein a plurality of continuous word lines in each storage block are grouped in one word line group, and each word line group further includes a plurality of storage pages;

[0008] Scanning is performed inside each storage block group, wherein the scanning includes multiple rounds of scanning, wherein each round of scanning selects a word line that has not been scanned from a word line group of a storage block in an initial plane as an initial scanning word line, and then sequentially determines a corresponding word line of a corresponding storage block in a next plane with a preset offset as a next scanning word line; and

[0009] According to the scanning result of each storage block, it is determined whether to move the data in the storage block to a free storage block and execute accordingly.

[0010] In some embodiments, the initial scan word lines of the multiple rounds of scanning are located in multiple word line groups in the same memory block.

[0011] In some embodiments, a fixed number of word lines are spaced between the initial scan word lines of the multiple rounds of scanning.

[0012] In some embodiments, the method further comprises:

[0013] Grouping the multiple storage block groups to obtain multiple storage block group groups;

[0014] In the grouping of each storage block group, initial storage blocks of different storage block groups are determined according to preset offsets.

[0015] In each grouping of the storage block group, for any storage block, as long as the proportion of erroneous data scanned exceeds a set threshold, the scanning is stopped, and the data in the storage block is moved to an idle storage block and executed accordingly.

[0016] In some embodiments, each storage block in the same storage block group has the same number on a corresponding plane of the flash memory chip to which it belongs.

[0017] In some embodiments, every eight memory blocks of each plane of each flash memory chip are grouped into the same memory block group.

[0018] In some embodiments, the method as described above is performed when the power is turned on but the storage device is not accessed for a long time.

[0019] In some embodiments, the method described above is performed under host idle or host low load conditions.

[0020] According to a second aspect of the present invention, a controller of a storage device is provided to execute the above method.

[0021] According to a third aspect of the present invention, there is provided a storage device, comprising: a coupled controller and a flash memory storage medium, wherein the controller executes the above method.

[0022] The method provided by the embodiment of the present invention solves the problem of an increasing number of problematic storage blocks caused by a single scan by cross-scanning between various physical components of the storage device (including chips, planes, storage blocks and word lines), and can achieve early detection and early processing of problematic storage blocks, thereby helping to maintain the data retention capability of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0024] Figure 1 A schematic block diagram of an exemplary host system is shown;

[0025] Figure 2 is a schematic diagram of the structure of an exemplary flash memory storage medium;

[0026] Figure 3 and Figure 4 is a flow chart of executing the first inspection strategy provided by an embodiment of the present invention;

[0027] Figure 5 and Figure 6 is a flow chart of executing the second inspection strategy provided by an embodiment of the present invention;

[0028] Figure 7 is a flow chart of a method for processing data retention capability provided by an embodiment of the present invention;

[0029] Figure 8 is a flow chart of a method for processing data retention capability provided by another embodiment of the present invention;

[0030] Fig. 9 Used to illustrate the relationship between the storage block groups, the grouping of the storage block groups and the storage blocks in the embodiment of the present invention;

[0031] Fig.10 Schematic diagram of the scanning order of the storage block group according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale. In addition, some well-known parts may not be shown.

[0033] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.

[0034] Unless the context clearly requires otherwise, the words "include", "comprising" and the like throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to". In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0035] Figure 1 1 is a schematic block diagram of an exemplary host system 100. The host system 100 is, for example, a personal computer, a notebook computer, or a server.

[0036] The host system 100 includes a host device 110 (e.g., a computer system including a main processor and a memory) and a storage device. The host device 110 may issue a host command to the storage device so that the storage device manages the host data stored in the storage device according to the command. For example, the host device 110 may be communicatively connected to the storage device (e.g., through a host interface 121) and issue various commands (e.g., READ, WRITE, UNMAP, REASSIGNBLOCK, TRIM, etc.) to the storage device. The storage device may store, update, read, and / or otherwise manage host data according to the address range prompted by the command. Once the command is executed, the storage device may transmit a response to the host device 110, indicating that the command has been successfully completed.

[0037] The storage device is composed of a controller 120 and a storage medium 130. The controller 120 includes a host interface 121, a processor 123, a cache unit 124 and a storage medium interface 128. The host interface 121 of the control system 120 is connected to the host device 110 for caching and transmitting host commands and host data. The processor 123 is connected to the host interface 121, the cache unit 124 and the storage medium interface 128, and the processor 123 parses the host command and performs corresponding operations. The cache unit 124 is, for example, an SRAM and / or a DRAM, which can be used to store the mapping relationship between the logical address and the physical address and some configuration data. The storage medium interface 128 includes an interface circuit for realizing data transmission between the controller 120 and the storage medium 130.

[0038] The controller 120 also has a core software layer composed of several programs, which are executed by the processor 123 to implement management functions, including, for example: data reading and writing, bad block management, wear leveling, garbage collection, power failure recovery, write balancing technology. The core software layer is usually formed as firmware.

[0039] The storage medium 130 stores host data. There are multiple channels between the storage medium 130 and the storage medium interface 128 for transmitting host data. In the embodiment of the present invention, the storage medium 130 is defined as a flash memory storage medium composed of a flash memory chip, especially the NAND flash memory mentioned in the background technology.

[0040] Figure 2 This is a schematic diagram of the structure of an exemplary flash storage medium. The storage medium 130 has two flash chips (die), which are marked as die 0 to die 1 in the figure. According to the physical characteristics of the chip, each chip includes four planes (plane), which are marked as plane0 to plane3 in the figure. Each plane includes a number of storage blocks (blocks). 8N +X is used to mark each storage block in the figure, and each 8 storage blocks are exemplarily divided into a group. Each storage block consists of a number of word lines (WordLine), each word line includes a number of storage pages, and each storage can store 16KB of valid data.

[0041] The connection channels between the storage medium interface 128 and the storage medium 130 are channel0 and channel1. The chip die0 uses channel channel0, so the storage medium interface 128 needs to access the storage blocks on the respective planes plane0 to plane3 of the chip die0 through channel channel0, and needs to access the storage blocks on the respective planes plane0 to plane3 of the chip die1 through channel channel1. Relying on channels channel0 to channel1, the storage medium interface 128 can access the corresponding storage blocks on the storage medium 130 in parallel, for example, the storage medium interface 128 writes or reads data to the corresponding storage blocks on the storage medium 130 in parallel through channels channel0 and channel11.

[0042] Referring to the background technology, data inspection and data migration of flash memory storage media are important means to keep the data in the flash memory storage media readable. To this end, the embodiments of the present invention provide two inspection strategies: the first inspection strategy only scans specific storage pages and / or specific storage blocks; the second inspection strategy scans all storage blocks. The first inspection strategy is usually used to quickly identify which storage blocks or storage pages are in a dangerous state when the flash memory storage medium is powered on again after being powered off for a long time. The second inspection strategy is mainly aimed at situations where data is not accessed for a long time when the power is on after being written, such as video storage devices, photos stored in mobile phones, etc. If the duration of power-on inaccessibility is long enough and there is no response strategy, abnormal situations such as data loss and storage device access jams will occur.

[0043] Figure 3 and Figure 4 This is a flow chart of executing the first inspection strategy provided by an embodiment of the present invention. Figure 3 The following steps are included.

[0044] In step S301, a first inspection strategy is started for the flash storage medium.

[0045] In step S302, whether the time interval with the last start time is greater than or equal to the set threshold, if yes, execute step S303, if not, wait for a period of time and then execute step S302.

[0046] In step S303, the first inspection strategy is executed.

[0047] The first inspection strategy can be carried out in multiple times. Figure 3 A flowchart of each execution process is given, which specifically includes: first starting the process of the first inspection strategy based on user instructions or timer, and after the process is started, checking whether the time interval with the last startup time is greater than or equal to the set threshold. If so, the first inspection strategy is executed. If not, wait for a period of time and then check whether the time interval with the last startup time is greater than or equal to the set threshold.

[0048] Figure 4 A specific implementation of step S303 is given, which includes the following steps.

[0049] In step S401, i=0, j=0 is initialized.

[0050] In step S402, it is determined whether i is less than N. If so, step S402 is executed; if not, the process ends.

[0051] In step S403, the i-th storage page of storage block j is scanned.

[0052] In step S404, it is determined whether the error ratio exceeds a set threshold, if yes, step S404 is executed, if no, step S405 is executed.

[0053] In step S405, the data of storage block j is moved to other free storage blocks.

[0054] In step S406, j++.

[0055] In step S407, it is determined whether the scanning of the M storage blocks is completed. If yes, step S408 is executed, otherwise step S403 is executed.

[0056] In step S408, i++.

[0057] According to this embodiment, the number of scan pages N and the number of storage blocks M (N and M are constants) are first set, and then multiple rounds of scanning are started. In each round of scanning, the i-th storage page of each storage block in the M storage blocks is scanned in turn. If the proportion of error data in the i-th storage page exceeds the set threshold, the data in the corresponding storage block is moved to other idle storage blocks. Here, i is a variable, which increases in turn in multiple rounds of scanning. When i increases to N, the scanning ends. In this way, the scanning of a limited number of storage pages under the first inspection strategy is realized.

[0058] Figure 5 and Figure 6 It is a flow chart of executing the second inspection strategy provided by an embodiment of the present invention. Figure 5 The following steps are included.

[0059] In step S501, the progress of the second inspection strategy of the storage device is obtained.

[0060] In step S502, it is checked whether the execution progress of the second inspection strategy meets expectations. If yes, step S503 is executed; otherwise, step S504 is executed.

[0061] In step S503, the second inspection strategy continues to be executed on the storage device according to the normal progress.

[0062] In step S504, the second inspection strategy is executed on the storage device at an accelerated speed.

[0063] The second inspection strategy can be carried out in multiple times. Figure 3 A flowchart of each execution process is given, which specifically includes: first checking the execution progress, if it meets the expected progress, executing it according to the normal progress, if it does not meet the normal progress, accelerating the execution progress. For example, according to the second strategy, multiple storage pages are scanned at intervals. If the execution progress is not as expected due to entering low power mode or other reasons, the lost progress will be continuously compensated until it reaches the expected progress.

[0064] Figure 6 A specific implementation of steps S503 and S504 is given, which includes the following steps.

[0065] In step S601, the starting position of the last scan is obtained. The starting position of the last scan points to the scanning position in the first storage block of the first plane of the first flash memory chip.

[0066] In step S602, i=0.

[0067] In step S603, it is determined whether storage block x needs to be scanned, and if so, step S604 is executed.

[0068] In step S604, the scanning position of the storage block x is calculated according to the rule.

[0069] In step S605, scanning is performed.

[0070] In step S606, it is determined whether the proportion of erroneous data in storage block x exceeds a set threshold, if yes, step S607 is executed, if no, step S608 is executed.

[0071] In step S607, the storage block x is moved.

[0072] In step S608, x++.

[0073] In step S609, all storage blocks are scanned.

[0074] In step S611, the scanning progress is as expected.

[0075] In step S612, this scan ends.

[0076] According to this embodiment, the scanning position of the storage block x to be scanned this time is determined according to the starting position of the previous scan and the set rules, and the scan is performed. If it is determined according to the scanning results that the proportion of erroneous data in the storage block x exceeds the set threshold, the data of the storage block x is moved to other free storage blocks, where x is a variable and increases sequentially. When all the storage blocks to be scanned this time have completed the scan, it is determined whether the current scanning progress meets expectations. If so, the scan is terminated. If not, the scan is continued.

[0077] It should be understood that the two inspection strategies can be executed independently, but the second inspection strategy generally takes more time than the first inspection strategy. Correspondingly, the execution result of the second inspection strategy is more accurate and less likely to miss inspections. In order to take into account the advantages and disadvantages of the two inspection strategies, the embodiment of the present invention also provides a method for combining the two inspection strategies. The flowchart thereof is shown in FIG. Figure 7As shown in FIG. 1 , and the method for scanning in the preferred scanning order in the second inspection strategy, the flowchart of which is referenced Figure 8 shown.

[0078] Figure 7 Detailed description of the invention The invention is a flowchart of a method for processing data retention capability provided in an embodiment of the invention. The method comprises the following steps.

[0079] In step S701 , one or more specific storage pages are scanned.

[0080] In step S702, it is determined whether the error data ratio of one or more specific storage pages exceeds a first set threshold. If yes, step S707 is executed; if no, the current scan is terminated.

[0081] In step S703, the storage blocks where one or more specific storage pages are located are scanned.

[0082] In step S704, it is determined whether the proportion of error data in the storage block where one or more specific storage pages are located exceeds a second set threshold. If yes, step S706 is executed; if not, step S705 is executed.

[0083] In step S705, the storage block where the one or more specific storage pages are located is moved to a free storage block.

[0084] In step S706, all storage blocks are scanned.

[0085] In step S707 , a decision is made based on the error data ratio of each storage block whether to move the data in the storage block to a free storage block and the process is executed accordingly.

[0086] According to this embodiment, one or more storage pages are first determined, and these storage pages are scanned. If the scanning results show that the error data ratio of these storage pages (or the maximum error data ratio of these storage pages) exceeds the first set threshold, the storage blocks where these storage pages are located continue to be scanned. If the error data ratio of the storage blocks where these storage pages are located (or the maximum error data ratio of the storage blocks where these storage pages are located) is less than or equal to the second set threshold, the data of the storage blocks where one or more specific storage pages are located are moved to the free storage blocks, and the current scan is terminated. If the error data ratio of the storage blocks where these storage pages are located (or the maximum error data ratio of the storage blocks where these storage pages are located) exceeds the second set threshold, all storage blocks are scanned, and after each storage block is scanned, it is determined whether to move the data in the storage block to a free storage block according to the error data ratio of the storage block and execute accordingly.

[0087] According to this embodiment, on the one hand, a limited number of storage pages are scanned first, and when the scanning results indicate that the storage blocks where each storage page is located are in a dangerous state, the storage blocks where each storage page is located are scanned; on the other hand, when the storage data proportion of the storage blocks where each storage page is located exceeds a set threshold, all storage blocks are scanned, thereby avoiding the waste of resources and time caused by unnecessary execution of the second inspection strategy. At the same time, the effective execution of the second inspection strategy makes up for the possible missed detection of storage blocks in a dangerous state by the first inspection strategy.

[0088] In some embodiments, the specific memory page of step S701 is obtained from Figure 2 The storage pages selected from each plane of the storage medium 130 are selected, for example, from Figure 2 Select a storage page on a word line from each of the eight planes. Figure 2 There are 8 planes, and a storage page on a word line is selected in sequence from the first plane to the eighth plane according to the offset of N word lines, where N is an integer greater than or equal to 1.

[0089] In some embodiments, the specific storage page of step S701 is a storage page determined based on experience or statistical data, and the charge number of its storage unit is easily changed. For example, when the controller writes data to the storage medium, it usually writes according to the super block, which is a storage block set that logically includes multiple storage blocks. The full super block is in a stable state, but the unfilled storage pages of the unfilled storage blocks in the unfilled super block are in an unstable state, and the charge number is easily changed.

[0090] In some embodiments, the specific memory page in step S701 is a memory page determined based on experience or statistical data, where the charge number of its memory cells is not likely to change. For example, several memory pages are selected from a full super block.

[0091] In some embodiments, the first set threshold and the second set threshold used in step S702 and step S704 are related to the selection of the specific storage page in step S701. If the specific storage page in step S701 is a storage page in which the charge number of the storage cells contained therein is easily changed, the first set threshold is greater than the second set threshold. If the specific storage page in step S701 is a storage page in which the charge number of the storage cells contained therein is relatively not easy to change, the first set threshold is less than the second set threshold.

[0092] In some embodiments, the specific storage pages of step S701 include several storage pages whose charge numbers of storage units are easily changed and several storage pages whose charge numbers are not easily changed, which are determined based on experience or statistical data, and two first set thresholds are set for the several storage pages whose charge numbers are easily changed and the several storage pages whose charge numbers are not easily changed, and then it is determined whether to execute step S703 based on the two comparison results.

[0093] In some embodiments, the specific storage page of step S701 is a combination of the following options: a storage page connected to a starting word line in a specific storage block; a storage page connected to an ending word line of a specific storage block; a storage page connected to an optional word line between a starting word line and an ending word line of a specific storage block. The specific storage block is an arbitrarily selected storage block, a storage block in different planes, a storage block separated by a certain plane, and so on.

[0094] It should be understood that steps S701 and S703 of this embodiment execute the first inspection strategy, and step S706 executes the second inspection strategy. For step S706, the flash memory chips, planes, storage blocks and word lines can be scanned in sequence, or the flash memory chips, planes, storage blocks and word lines can be cross-scanned. For example, the first plane of the first chip is scanned first, and then the second plane of the second chip is scanned, and then the second plane of the first chip is scanned again, and then the first plane of the second chip is scanned, and so on.

[0095] In order to find and process the storage block in a dangerous state as early as possible during the execution of the second inspection strategy, the present invention also provides a method for processing data retention capability in another embodiment. The storage device used in the method has Figure 2 Moreover, the method can also be formed into a computer program, Figure 1 The processor 123 in the controller 120 in the embodiment of the present invention is processed, and the formed computer program can be formed as follows: Figure 1 The firmware of the controller 120 in the storage device is a computer program that starts running when the storage device is powered on. Figure 8 A flow chart of the method is shown.

[0096] In step S801, storage blocks are grouped to obtain a plurality of storage block groups, wherein one or more continuous storage blocks in each plane of each flash memory chip are grouped in the same storage block group.

[0097] In step S802, the word lines in each storage block are grouped to obtain a plurality of word line groups. A plurality of continuous word lines in each storage block are grouped into a word line group, and each word line group further includes a plurality of storage pages.

[0098] In step S803, scanning is performed inside each storage block group. In each round of scanning, a word line that has not been scanned is selected from a word line group of a storage block in the initial plane as the initial scanning word line, and then the corresponding word line of the corresponding storage block in the next plane is determined in turn with a preset offset as the next scanning word line.

[0099] In step S804, the data in each storage block is moved to a free storage block according to the scanning result of each storage block. After each storage block is scanned, it is decided whether to move its data, rather than waiting for all storage blocks to be scanned before centralized data movement.

[0100] by Fig. 9 and Fig.10 This embodiment is explained in detail by taking this as an example. Fig. 9 It is used to illustrate the relationship between the storage block groups, the grouping of storage block groups and the storage blocks in the embodiment of the present invention. Fig.10 It is used to illustrate the scanning order of the storage block group in the embodiment of the present invention.

[0101] exist Fig. 9 In the figure, the flash storage medium includes 2 chips (die), each chip has four planes (planes) from plane0 to plane3, each plane has multiple storage blocks, and every 8 storage blocks are divided into a group in the figure, and 8N +X is used to represent the identification of each storage block.

[0102] According to this embodiment, one or more storage blocks in each plane are grouped in the same storage block group, e.g. Fig. 9 In the example, the first memory blocks in each plane of the flash memory chips die0 and die1 are placed in the same memory block group. The figure shows the memory block group A1. At this time, each memory block in A1 has the number 8N+0. For another example, the memory blocks numbered 8N+0 and 8N+1 in each plane are placed in the same memory block group. It should be noted that the memory blocks with the same number on each plane of each flash memory chip have the physical characteristic of data consistency.

[0103] exist Fig.10 In, A1 and Fig. 9 The storage block group A1 in points to the same storage block group. For simplicity, Fig.10 Only a portion of the memory blocks and a portion of the word lines are shown, and word lines 8Y+X (X is 0 to 7) are used to represent each word line.

[0104] According to this embodiment, a plurality of word lines in each memory block are divided into a plurality of word line groups, for example Fig. 9 The word line groups are divided into 8 word lines. Then, each memory block group is scanned, and the scanning includes multiple rounds of scanning. Fig.10 As shown by the yellow dotted line, for the storage block group A1, each round of scanning uses an unscanned word line of plane plane0 as the initial scanning word line. The first round of scanning starts from the word line WordLine 8Y+0 in the word line group (y=0) of the first storage block of plane plane0, and then locates to the word line WordLine 8Y+i (i<7) in the word line group (y=0) of the corresponding storage block of plane plane1 of the storage block group A1 through a preset offset, and then locates to the word line WordLine 8Y+ 0 in the word line group (y=1) of the corresponding storage block of plane plane2 of the storage block group A1 according to the preset offset, and so on; as shown by the green dotted line in the reference figure, the second round of scanning starts from the word line WordLine 8Y+0 in another word line group (y=1) of plane plane0, and then locates to the corresponding word line in the word line group (y=1) of the corresponding storage block of plane plane1 of the storage block group A1 through a preset offset, and so on. Optionally, in each round of scanning, the start scanning word lines of adjacent rounds of scanning are always located in different word line groups and may be spaced apart by a fixed number of word lines.

[0105] The above-mentioned multiple rounds of scanning can be used as the first cycle. When it is completed, the second cycle can be started. The scanning order of the second cycle is consistent with the scanning order of the first cycle, that is, the first round of scanning of the second cycle starts from the word line WordLine 8Y+1 in the word line group (y=0) of plane plane0 of the storage block group A1, and then locates to the corresponding word line in the corresponding word line group of plane plane1 of the storage block group A1 through the preset offset, and then locates to the corresponding word line in the corresponding word line group of plane plane2 of the storage block group A1 according to the preset offset, and so on. The other cycles are similar.

[0106] The embodiment of the present invention realizes that the order of directly scanning word lines in storage blocks of different planes in the same storage block group is different. Such processing can quickly find storage blocks in a dangerous state, and reduce the situation where the scanned storage pages gradually deteriorate during the process of scanning each storage block from the smallest storage page to the largest storage page. Furthermore, the cross scanning between various physical components (including chips, planes, storage blocks and word lines) can solve the problem of more and more problematic storage blocks scanned due to a single scan, and realize early detection and early processing of problematic storage blocks.

[0107] In some embodiments, on the basis of the memory block group, multiple memory block groups are further grouped to obtain multiple memory block group groups. In different memory block group groups, the scanning order of the memory blocks is the same, but the scanning order of the word lines may be different. Fig. 9As shown, the scanning order of the memory blocks in the memory block groups A1 and A2 is the same, but the scanning of the word lines is positioned according to a preset offset.

[0108] In some embodiments, for any memory block, it is not necessary to complete the scanning of all word lines. As long as the proportion of scanned error data exceeds a set threshold, it can be decided to move the data of the memory block to an idle memory block and execute accordingly.

[0109] In some embodiments, the execution condition of the above embodiment is that the host is idle or the host is underloaded. Host idle means: the host has no interaction with the storage device for a certain period of time, such as 3s; host underload means: the host has only a small amount of interaction with the storage device, such as read and write loads are both less than 6MB / s; at this time, the bandwidth inside the NAND flash memory is sufficient to ensure interaction with the host, and there are still enough resources to perform the scanning task based on the above embodiment. Optionally, the resource usage of the storage device is continuously monitored by the monitoring module, and the host idle or host underload is used as the trigger condition of the above embodiment, and the host load is higher than the set threshold as the stop condition of the above embodiment.

[0110] In some embodiments, the number of accesses to the storage device is continuously accumulated, and when the number of accesses is lower than a set threshold, it is determined whether the execution condition of any one of the above embodiments is met, and if so, the corresponding embodiment is executed.

[0111] In some embodiments, one or more flash memory chips included in the storage device targeted by the above embodiments communicate with the controller through a unique channel. Under this condition, each storage page in each storage block can only be scanned serially through the unique channel, so the overall time consumed will be longer, so it is more necessary to scan by adopting a hybrid patrol strategy and cross scanning.

[0112] In summary, the embodiments of the present invention provide two methods and devices for processing data retention capabilities for storage devices. The two methods can be used in combination or independently, and both can improve the data retention capabilities of storage devices to a certain extent.

[0113] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for processing data retention capability, the method is used for a storage device, the storage device includes a storage medium and a controller, the storage medium includes a plurality of planes, each plane is divided into a plurality of storage blocks in sequence, each storage block includes a plurality of word lines arranged in sequence, each word line includes a plurality of storage pages, the method is executed by the controller, and includes the following steps: Grouping all storage blocks to obtain a plurality of storage block groups, wherein one storage block group includes one or more continuous storage blocks in all planes of all chips; Grouping all word lines in each storage block to obtain a plurality of word line groups, wherein a plurality of continuous word lines in each storage block are grouped in one word line group, and each word line group further includes a plurality of storage pages; Scanning is performed inside each storage block group, wherein the scanning includes multiple rounds of scanning, wherein in each round of scanning, a word line that has not been scanned is selected from a word line group in an initial plane as an initial scanning word line, and then a corresponding word line in a next plane is sequentially determined with a preset offset as a next scanning word line; and After each storage block is scanned, it is determined whether to move the data in the storage block to a free storage block according to the scanning result of the storage block and executed accordingly.

2. The method according to claim 1, wherein: The initial scan word lines of the multiple rounds of scanning are located in multiple word line groups in the same storage block.

3. The method according to claim 1, wherein: A fixed number of word lines are spaced between the initial scan word lines of the multiple rounds of scanning.

4. The method according to claim 1, further comprising: Grouping the multiple storage block groups to obtain multiple storage block group groups; In each grouping of memory block groups, the first word lines scanned by different memory block groups are determined according to a preset offset.

5. The method according to claim 1, wherein: For any storage block, as long as the proportion of erroneous data scanned exceeds a set threshold, the scan is stopped, and the data in the storage block is moved to a free storage block and executed accordingly.

6. The method according to claim 1, wherein: Each storage block in the same storage block group has the same number on a corresponding plane of the flash memory chip to which it belongs.

7. The method according to claim 4, wherein: Every eight storage blocks of each plane of each flash memory chip are grouped into the same storage block group.

8. The method according to claim 1, wherein: When the storage device is powered on but has not been accessed for a long time, the method according to any one of claims 1 to 7 is executed.

9. A controller of a storage device, configured to execute the method according to any one of claims 1 to 8.

10. A storage device comprising: A coupled controller and a flash storage medium, wherein the controller executes the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for testing internal memory in memory chip

    KR1020000003933A

  • Method for reducing impact of surface texture in an optical scan and devices thereof

    US20190005663A1