Risk block screening method and device, storage equipment and storage medium

By marking the memory blocks that failed aging test in the storage medium and dynamically adjusting the window range to detect risk blocks, the problem of insufficient analysis of flash media characteristics in the prior art is solved, efficient screening and comprehensive detection of potential risk blocks is achieved, and the reliability and performance of storage media are improved.

CN119724306AActive Publication Date: 2025-03-28BIWIN STORAGE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510229058.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-03-28
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The prior art lacks a deep analysis of the characteristics of flash memory media in the good product screening process of storage media, and cannot efficiently screen out potential risk weak blocks.

Method used

By obtaining the storage blocks in the storage medium that meet the aging test failure conditions and marking them as problem blocks, traverse and detect risk blocks within the window range based on the set window range and dynamically adjust the window range according to the set window range, and combine the distribution pattern of the risk blocks until all potential risk blocks are filtered out.

Benefits of technology

The comprehensive screening of risk blocks in storage media is achieved, screening efficiency is improved, and the existence of risk blocks in storage media is reduced, thereby reducing the failure rate and improving overall performance and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724306A_ABST
    Figure CN119724306A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of memorizers, and discloses a risk block screening method and device, storage equipment and a storage medium. According to the risk block screening method, a storage block meeting an aging test failure condition in the storage medium is marked as a problem block, and according to a set window range, the current problem block is taken as the center; traversing the storage blocks in the window range, detecting whether risk blocks exist in the window range or not, adjusting the window range when at least one risk block exists, and repeatedly executing the steps of traversing and risk block detection on the newly added storage blocks in the adjusted window range until all the risk blocks in the storage medium are screened out, according to the risk block screening method, hidden risk blocks can be accurately screened out, the screening efficiency is improved, the influence of the hidden risk blocks on the performance of the storage medium is reduced, and the reliability and performance of the storage medium are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of memory technology, and in particular to a risk block screening method, apparatus, storage device and storage medium. Background Art

[0002] With the continuous development of storage technology, flash storage products such as eMMC (embedded multimedia card) and UFS (universal flash storage) are widely used in smart phones, tablet computers, automotive electronics and other fields. These storage products usually use flash memory as the storage medium. In order to ensure product quality, the current mainstream storage products will undergo aging tests and good product screening in the production line during the production process. Specifically, the reliability of the product is tested by reading, writing, and erasing the memory. In these tests, the blocks or pages of the storage medium are the core test objects. For blocks or pages that fail in read, write, and erase operations, they are usually marked on the production line for further shielding or replacement.

[0003] However, although the current mainstream good product screening process can mark the blocks that fail in read, write and erase operations, it lacks in-depth analysis of the characteristics of flash media. For example, the current detection process usually only marks the problem blocks, without considering the impact of the flash media characteristics, and without further analysis and exploration of the neighboring storage blocks in the problem area.

[0004] Therefore, how to more effectively explore and analyze blocks that have failed to be read, written, or erased and their neighboring areas based on the characteristics of the medium, and improve the efficiency of screening out potential weak blocks, has become an important issue that needs to be solved urgently. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a risk block screening method, apparatus, storage device and storage medium, which can effectively solve the problem in the prior art of insufficient analysis of medium characteristics and inability to efficiently screen out potential risk weak blocks.

[0006] In a first aspect, an embodiment of the present application provides a risk block screening method, comprising: Obtaining storage blocks that meet the aging test failure condition in the storage medium and marking them as problem blocks; According to the set window range, taking the current problem block as the window center, traverse the storage blocks within the window range to detect whether there is a risk block within the window range based on the preset judgment condition; When there is at least one risk block, the current window range is adjusted to repeat the traversal and risk block detection steps for the newly added storage blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out.

[0007] In some embodiments, obtaining a storage block in the storage medium that meets the aging test failure condition and marking it as a problem block includes: Performing a read operation, a write operation or an erase operation on the storage block; When the storage block fails when performing any one of the read operation, the write operation or the erase operation, or if it is detected that the error correction code value of the storage block exceeds a preset threshold, the storage block is marked as a problem block.

[0008] In some embodiments, the setting of the window range includes: The current position of the problem block is taken as the window center, and the initial size of the window range is set based on preset parameters; the window range includes the problem block and several neighboring storage blocks close to the problem block.

[0009] In some embodiments, traversing the storage blocks within the window range to detect whether there are risk blocks within the window range based on a preset judgment condition includes: Starting from the starting position of the window range, traverse all the neighboring storage blocks within the window range except the current problem block; For the traversed neighboring storage block, reading the error correction code value of the neighboring storage block; When the error correction code value exceeds a preset threshold, the neighborhood storage block is marked as the risk block.

[0010] In some embodiments, after detecting whether there is a risk block within the window range based on a preset judgment condition, the method further includes: Based on the distribution pattern of the risk blocks in the storage medium, the size and direction of the window range are dynamically adjusted.

[0011] In some embodiments, dynamically adjusting the size and direction of the window range based on the distribution pattern of the risk blocks in the storage medium further includes: Counting the average number of times the neighborhood storage blocks near the problem block are marked as risk blocks; The size and expansion direction of the window range are set according to the average number of times obtained by statistics.

[0012] In some embodiments, the steps of traversing and detecting risky blocks are repeated for the newly added problem blocks within the adjusted window range until all risky blocks adjacent to each of the problem blocks in the storage medium are screened out, including: Within the adjusted window range, performing the read operation, the write operation, the erase operation or reading the error correction code value on the newly added storage block to determine the attribute of the newly added storage block; When the newly added storage block is marked as a newly added problem block, the window range is adjusted with the current newly added problem block as the window center, and the newly added storage blocks within the adjusted window range are traversed to detect whether there is the risk block within the adjusted window range based on the preset judgment condition; The steps of traversing and detecting risky blocks are repeatedly performed until all the risky blocks adjacent to each of the problem blocks in the storage medium are screened out.

[0013] In a second aspect, an embodiment of the present application provides a risk block screening device, comprising: A storage block detection module is used to obtain storage blocks in the storage medium that meet the aging test failure conditions and mark them as problem blocks; A risk block judgment module is used to traverse the problem blocks within the window range according to the set window range, taking the current problem block as the window center, so as to detect whether there is a risk block within the window range based on preset judgment conditions; The risk block screening module is used to adjust the current window range when there is at least one risk block, so as to repeat the traversal and risk block detection steps for the newly added problem blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out.

[0014] In a third aspect, an embodiment of the present application provides a storage device, the storage device comprising a processor and a memory, the memory storing a computer program, and the processor being used to execute the computer program to implement the risk block screening method of the first aspect above.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and when the computer program is executed on a processor, the risk block screening method of the first aspect described above is implemented. The embodiments of the present application have the following beneficial effects: The risk block screening method of the present application marks the storage blocks that meet the aging test failure conditions in the storage medium as problem blocks, and traverses the storage blocks within the window range according to the set window range, with the current problem block as the center, judges its attributes, and screens out all potential risk blocks within the window range. Combined with the means of adjusting the window range, the detection area can be flexibly expanded according to the distribution law of the risk block, and the coverage of the risk block can be improved. For the newly added storage blocks in the adjusted window range, the steps of traversal and risk block detection are repeated until all risk blocks in the storage medium are screened out, which can ensure the comprehensive screening of all potential risk blocks in the storage medium to avoid missed detection. The present application can quickly and accurately identify the blocks with hidden dangers in the storage medium by adjusting the window range and the strategy of loop iteration, and significantly improves the efficiency of risk block screening. At the same time, by deeply detecting the problem block and its neighboring area, the existence of risk blocks in the storage medium is reduced, thereby effectively reducing the failure rate of the storage medium in subsequent use, and improving the overall performance and reliability of the storage medium. The risk block screening method of the present application can not only improve the accuracy and efficiency of risk block screening, but also provide an efficient and reliable technical means for quality control and performance optimization of storage media. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flow chart of a risk block screening method according to an embodiment of the present application is shown; Figure 2 A schematic diagram of risk judgment in a risk block screening method according to an embodiment of the present application is shown; Figure 3 A schematic diagram showing a setting window range of a risk block screening method according to an embodiment of the present application; Figure 4 A schematic diagram showing an extended window range of a risk block screening method according to an embodiment of the present application; Figure 5 Another schematic diagram showing an extended window range of a risk block screening method according to an embodiment of the present application; Figure 6 A schematic structural diagram of a risk block screening device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0019] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0020] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0021] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0022] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0023] Based on a large amount of actual production line data analysis, it is shown that in the storage medium, there are often hidden dangers in the area near the block or page where the read, write or erase fails. These hidden dangers are mainly manifested as significantly high ECC (error correction code) values, indicating that these neighborhood blocks may have the risk of unstable use, and these hidden danger blocks are more likely to evolve into bad blocks in subsequent use. This phenomenon is particularly obvious near weak blocks (blocks whose ECC values ​​exceed the set threshold but have not completely failed). Considering that the existing screening process in the prior art cannot effectively identify these potential problem blocks, it may cause unstable storage blocks to flow into the subsequent use link, thereby affecting the overall reliability of the storage medium. Therefore, a risk block screening method is proposed. By detecting whether the storage block meets the aging test conditions, the storage block that meets the aging test conditions is marked as a problem block; with the problem block as the window center, based on the set window range, the problem blocks within the window range are traversed, their attributes are judged and all risk blocks are screened out; at the same time, combined with the distribution law of the risk block, the window range is adjusted, and the steps of traversal and risk block detection are repeated for the newly added storage blocks until all risk blocks in the storage medium are screened out. The method of the present application can accurately screen out risk blocks, improve screening efficiency, reduce the impact of risk blocks on storage medium performance, and significantly improve the reliability and performance of storage media.

[0024] Figure 1 A flow chart of a risk block screening method according to an embodiment of the present application is shown. Exemplarily, the risk block screening method includes the following steps: Step S100, obtaining storage blocks in the storage medium that meet the aging test failure condition and marking them as problem blocks.

[0025] Exemplarily, during the production process of eMMC (embedded multimedia card), the reliability and potential problems of the storage medium are detected by simulating the workload of the storage medium in actual use. That is, during the aging test, each storage block in the storage medium is tested, and the detection method may include read operation, write operation, erase operation, etc., to obtain the operating status and related parameters of the storage block. During the detection process, according to the pre-set aging test failure conditions (for example, too many read, write and erase operation failures, error correction code (ECC) value exceeds a certain threshold, etc.), the storage block is tested to determine whether it meets these conditions. If the storage block in the storage medium meets the aging test failure condition, the storage block is marked as a "problem block (also called a bad block)".

[0026] By classifying and marking abnormal conditions of storage blocks through production line aging tests, storage blocks in the storage medium that may cause data errors or equipment failures can be effectively identified and processed in advance, thereby improving the reliability of the storage medium and data security.

[0027] For example, in an eMMC storage medium, if it is detected that the error correction code (ECC) value of a storage block exceeds a set safety threshold when performing a read operation, the storage block is marked as a "problem block (also called a bad block)".

[0028] In an optional embodiment, in step S100, obtaining a storage block in the storage medium that meets the aging test failure condition and marking it as a problem block includes: Step S110, performing a read operation, a write operation or an erase operation on the storage block.

[0029] Exemplarily, a read operation is the process of reading stored data from a storage block of a storage medium. By sending a read instruction, data is obtained from a specified storage block for user access, operation, or other tasks. A write operation refers to the process of writing new data to a storage block in a storage medium. The write operation overwrites the original data to ensure that the storage medium stores the latest information. The success or failure of the write operation is usually confirmed by a verification mechanism (for example, error correction code ECC) to confirm the integrity of the data write. An erase operation is to clear the data in the storage block so that it can be written again. In NAND or eMMC, the storage block usually needs to be erased before writing data, which is part of the working mechanism of the storage medium.

[0030] In the detection or management of storage media, these operations can also be used to check the health status of storage blocks, where read operations ensure data access, write operations implement data storage, and erase operations prepare space for subsequent use of storage media.

[0031] Step S120, when a storage block fails in performing any of a read operation, a write operation or an erase operation, or when it is detected that an error correction code value of the storage block exceeds a preset threshold, the storage block is marked as a problem block.

[0032] Exemplarily, a read operation failure means that the data in the storage block cannot be read correctly, which may be due to damage to the storage block or data errors. A write operation failure means that the data cannot be written correctly to the storage block, which may be due to wear of the storage block or hardware defects. An erase operation failure means that the storage block cannot be cleared, which may be due to the end of the storage block life or hardware damage.

[0033] When a read operation is performed on a storage block, an attempt is made to read the stored data from the storage block, while detecting the error correction code (ECC) value of the data. The ECC value is an important indicator used to reflect the data error situation in the storage block. The higher the value, the more errors have occurred in the storage block. Among them, the threshold of the ECC value is pre-set as a criterion for judging the health status of the storage block. If the ECC value is lower than the threshold, it means that the storage block is still in a healthy or correctable range; if the ECC value exceeds the threshold, it means that the error rate of the storage block is high and there is a potential risk of failure. When it is detected that the ECC value of a storage block exceeds the preset threshold, the storage block is marked as a "problem block". By detecting the ECC value, potential problems of the storage block can be identified in advance before serious errors or data loss occur. This method improves the reliability and data security of the storage medium and reduces the risk of equipment failure caused by problem blocks.

[0034] For example, in a NAND storage medium, when trying to read data of a storage block, it is detected that the ECC value of the block is 50, while the security threshold is 40. Since the ECC value exceeds the threshold, the storage block is marked as a "problem block".

[0035] That is, if Figure 2 As shown, when a storage block fails when performing any of the read, write or erase operations, or the error correction code value exceeds a preset threshold, the storage block is marked as a "problem block" so that a window detection can be triggered in subsequent steps to screen out all risky blocks.

[0036] Step S200, according to the set window range, with the current problem block as the window center, traverse the storage blocks within the window range to detect whether there is a risk block within the window range based on preset judgment conditions.

[0037] The window range is used to limit the range of storage blocks that need to be detected. Risky blocks refer to blocks when the value of the ECC exceeds a certain set threshold, sometimes also called weak blocks.

[0038] Exemplarily, with the current problem block as the center, the area that needs further inspection is determined according to the set window range. After the area is determined, all storage blocks are traversed one by one within the window range, and the properties of each storage block are analyzed and judged. According to the preset conditions (for example, the ECC value exceeds the threshold, etc.), it is judged whether each problem block has potential problems. All problem blocks within the window range that meet the judgment conditions are marked as risk blocks, so as to achieve the screening and comprehensive identification of risk blocks.

[0039] It can be understood that through the window screening mechanism centered on the problem block, the detection scope can be expanded to discover risk blocks that may have regional consistency problems, thereby avoiding missing potential risk blocks and further improving the reliability of the storage medium.

[0040] For example, in an eMMC, it is found through detection that storage block N has abnormal operation (for example, read failure, write failure, erase failure). Storage block N is marked as Error Block. With the problem block N as the center, a window range is set to further detect whether there are potential risk blocks, that is, weak blocks, in the storage blocks around the problem block. In this example, if Figure 3 As shown, the window size is set to 5 to cover the storage block range from N-2 to N+2. It is worth noting that because block N has been marked as a problem block, block N is skipped during the traversal process within the window range and does not need to be detected again. Starting from block N-2 at the left end of the window, risk detection is performed on the storage blocks within the window range in turn, and the ECC value is read: if the ECC value does not exceed the preset threshold, the next block is detected; if the ECC value exceeds the threshold, the block is marked as a risky weak block, and the window range is dynamically adjusted to further expand the detection (for example, to N-3 or N+3), and potential risky weak blocks that may exist after the window is expanded are continuously screened. The condition for the termination of the detection is that all storage blocks within the window range (except the marked problem blocks) meet the health condition, the ECC value does not exceed the preset threshold, or the window range no longer needs to be expanded.

[0041] In an optional embodiment, in step S200, the setting of the window range includes: taking the position of the current problem block as the window center, setting the initial size of the window range based on preset parameters; the window range includes the problem block and several neighboring storage blocks close to the problem block.

[0042] Exemplarily, the problem block is a storage block in the storage medium that meets the aging test failure condition. With the position of the current problem block as the window center and the starting point of the detection range, an initial window range is set according to preset parameters (for example, window size, expansion direction, detection strategy, etc.) to limit the storage block area that needs to be detected. Among them, the size of the initial window range can be a fixed value (for example, covering several blocks on both sides of the problem block) or dynamically adjusted (according to the storage block distribution or device characteristics). The window range includes not only the currently marked problem block, but also several adjacent storage blocks close to the problem block. So that in the subsequent steps, all neighboring storage blocks within the window range are traversed to determine whether these neighboring storage blocks have potential problems-whether they are risky weak blocks. By setting the initial window range with the problem block as the center, storage blocks with a high correlation with the problem block can be quickly traversed, reducing unnecessary full disk scanning and improving detection efficiency.

[0043] For example, in an eMMC, Block N is detected as a problem block. With Block N as the center, if the preset parameter is 2, the determined window range includes Block N and two adjacent neighboring storage blocks on the left and right ends, that is, covering the area from Block N-2 to Block N+2, and the total initial size of the window range is 5 storage blocks.

[0044] In an optional embodiment, in step S200, traversing the storage blocks within the window range to detect whether there are risk blocks within the window range based on a preset judgment condition includes: Step S210, starting from the starting position of the window range, traverse all neighboring storage blocks within the window range except the current problem block.

[0045] Exemplarily, starting from the starting position (usually the leftmost storage block in the window range), the detection is performed in sequence. This sequential traversal method ensures that no storage block in the window range is missed. For each neighboring storage block in the window range, the error correction code value ECC is read one by one to determine whether the storage block has potential risk problems, so as to mark and take measures in time. At the same time, this one-by-one traversal method ensures the comprehensiveness and accuracy of the detection.

[0046] Step S220, for the traversed neighboring storage block, read the error correction code value of the neighboring storage block.

[0047] For example, error correction code (ECC) is a technology used to detect and repair data errors in storage blocks. The ECC value reflects the health of the storage block: a lower ECC value usually indicates higher data reliability; a higher ECC value indicates that the storage block has more data errors or potential risks. During the entire traversal process, the ECC value is read block by block to ensure that every neighboring storage block within the window range is detected and no potential problem blocks are missed.

[0048] Step S230: When the error correction code value exceeds a preset threshold, the neighboring storage block is marked as a risk block, that is, a weak block.

[0049] For example, suppose the window range is set to Block N-2 to Block N+2, and the starting position of the window is Block N-2. Starting from Block N-2, Block N-2, Block N-1, Block N, Block N+1, and Block N+2 are detected in sequence. Each time a storage block is detected, its attributes (for example, the error correction code ECC value) are read to determine whether it needs to be marked as a risky weak block. If the ECC value of a block is 40 and the preset safety threshold is 50, the block is considered healthy; if the ECC value of a block is 55, it exceeds the preset safety threshold, and the storage block will be marked as a risky weak block.

[0050] In an optional implementation, after step S210, the method further includes: Based on the distribution pattern of risk blocks in the storage medium, the size and direction of the window range are dynamically adjusted.

[0051] The distribution law refers to the distribution characteristics of risk blocks in the storage area recorded during the production or operation of the storage medium. These laws are obtained by statistically analyzing a large amount of data, such as whether risk blocks appear in certain specific areas, whether there is a trend of adjacent storage blocks being affected, and the average number of risk blocks near the problem blocks.

[0052] Exemplarily, according to the above distribution law, the window range, i.e., the size and direction of the detection area, can be dynamically adjusted. For example, if the data shows that there are usually multiple consecutive risk blocks near the problem block, the window range needs to be expanded to cover these adjacent areas. If the distribution of the problem blocks is more dispersed, the window range can be more flexibly adjusted in direction and size.

[0053] It can be understood that by reasonably expanding the window range, it is ensured that all areas where risk blocks may exist are covered. By adjusting the size of the window range according to the distribution law, invalid detection of irrelevant areas can be reduced and resources can be saved. That is, the dynamic adjustment of the window range depends on the statistical analysis of the data.

[0054] For example, in the production line data of storage media, it was found through analysis that: there are usually two risky weak blocks distributed continuously around the problem block. According to this rule, when a problem block is detected, the window range will be set to cover the storage blocks on both sides of the problem block (for example, 2 storage blocks are extended to the left with the problem block as the center). If new risky weak blocks are further detected, the window range will continue to be adjusted according to the actual detection results (for example, 2 storage blocks are extended to the left again).

[0055] By combining the distribution pattern of risk blocks and production line statistical data, the size and direction of the window range are determined to achieve comprehensive screening and marking of potential risk weak blocks in storage media.

[0056] For example, Figure 4 As shown in the figure, a problem block (Error Block, Block N) is detected in the storage medium, and the window range is set with this as the center. The initial size of the window is set to 5 (i.e., covering Block N-2 to Block N+2). Within this range, the error correction code (ECC) value of each storage block is read in turn to determine whether there is a weak block. First, starting from the left end of the window range (Block N-2), Block N-2, N-1, N+1 and N+2 are detected in turn (it is worth noting that Block N skips the detection because it has been marked as a problem block). When Block N-1 is detected as a weak block, according to the characteristics of the consistency of the medium area (i.e., the probability of a weak block appearing in adjacent blocks is high), it is necessary to expand the detection area to the left of the window range, and expand the window range from the original size N=5 to N=6, covering from Block N-3 to Block N+2. Continue to detect the ECC value of the newly added left end block (Block N-3). If Block N-3 is also determined to be a weak block, the window range is expanded again. The expansion detection process continues until the newly added storage block on the left side of the window range (for example, Block N-4) is no longer determined to be a weak block, and the expansion stops. At this point, the final size of the window range is determined to be N=7 (covering from Block N-3 to Block N+3), and the screening is completed. Figure 5 shown.

[0057] That is, by dynamically adjusting the size and direction of the window range, potentially high-risk storage blocks in the neighborhood can be covered to avoid the accumulation of data errors caused by read fail, write fail, erase fail, and weak block to surrounding storage blocks, thereby reducing the risk of uncorrectable errors (UNC).

[0058] In an optional implementation, the average number of times that the neighborhood storage blocks near the problem block are marked as risky blocks is counted.

[0059] Exemplarily, by counting the number of times that the neighborhood storage blocks near the problem block are marked as risk blocks, the distribution pattern of risk blocks in the storage medium and the health status of the adjacent areas can be understood. The average number of times refers to the frequency of calculating the neighborhood storage blocks being marked as problem blocks after counting the data of multiple risk blocks. For example: If it is found during the statistical process that an average of 2 storage blocks in the neighborhood of the problem block are also marked as risk blocks, this value can be used as a basis for subsequent analysis and detection. By calculating this average value, the system can be helped to more scientifically predict the distribution of potential problem blocks and optimize the detection range.

[0060] For example, suppose that in a storage medium, the data of 100 problem blocks are counted and the number of times the neighboring storage blocks of these problem blocks are marked as risk blocks is as follows: There are two storage blocks in the neighborhood of problem block 1 that are marked as risk blocks; There are 4 storage blocks in the neighborhood of problem block 2 that are marked as risk blocks; There are three storage blocks in the neighborhood of problem block 3 that are marked as risk blocks; By counting the data of all problem blocks, it is calculated that the average number of times the storage blocks in the neighborhood of the problem blocks are marked as risk blocks is 3.

[0061] According to the average number of times obtained by statistics, the size and expansion direction of the window range are set.

[0062] Exemplarily, by counting the average number of times that storage blocks in the neighborhood of problem blocks in the storage medium on the production line are marked as risk blocks, the distribution pattern of risk blocks can be quantified, thereby scientifically setting the initial size of the detection window so that the window range can cover the high-risk area around the problem block.

[0063] For example, if the number of statistical averages is N, the size of the window range can be set to 2N to ensure that the neighboring storage blocks on both sides of the problem block are covered, thereby comprehensively screening potential weak blocks. Furthermore, according to the distribution law, the window expansion direction can be dynamically adjusted: unidirectional expansion (e.g., left, right), bidirectional expansion, etc.

[0064] For example, suppose that through statistical analysis of the production line, it is found that the average number of times the neighboring storage blocks of the problem block are marked as risk blocks is 3 (N=3): the initial window range is set to 2N, that is, covering Block N-3 to Block N+3, a total of 7 storage blocks. If Block N-4 on the left side of the window range is also detected as a risk block, then according to statistical laws, the window range is expanded to the left to Block N-4. If Block N+4 on the right side is also detected as a risk block, the window range is expanded to the right at the same time.

[0065] Step S300, when there is at least one risk block, adjust the current window range to repeat the steps of traversal and risk block detection for the newly added storage blocks within the adjusted window range until all risk blocks adjacent to each problem block in the storage medium are screened out.

[0066] Exemplarily, after at least one risk block is detected, the window range is dynamically adjusted according to the distribution characteristics to cover more blocks. In the adjusted window range, the newly added storage blocks are detected one by one, their relevant attributes (for example, error correction code ECC value) are read, and it is determined whether these storage blocks meet the judgment conditions of risk blocks. If there are risk blocks in the newly added storage blocks, the window range is further adjusted and the steps of traversal and risk block detection are repeated. This operation will be iterated continuously to ensure that the newly added storage blocks can be detected after each adjustment of the window range. When all storage blocks in the adjusted window range are detected and no new problem blocks exist, the detection stops. At this point, it can be confirmed that all potential risk blocks in the storage medium have been marked and the detection process is over.

[0067] In an optional embodiment, in step S300, the steps of traversal and risk block detection are repeatedly performed for the newly added storage blocks within the adjusted window range until all risk blocks adjacent to each problem block in the storage medium are screened out, including: Step S310 , within the adjusted window range, performing a read operation, a write operation or an erase operation on the newly added storage block, or reading an error correction code value of the newly added storage block, to determine the attribute of the newly added storage block.

[0068] Exemplarily, a newly added storage block refers to a storage block that is newly included in the detection within the window range after the window range is adjusted. The following operations are performed on the newly added storage block to determine whether its properties are normal: Read operation: read the data in the storage block to check whether the data can be read correctly. Write operation: try to write data to the storage block to verify whether the write operation is successful and correct. Erase operation: try to clear the data in the storage block to ensure that the erase operation can be completed successfully. Read the error correction code (ECC) value: when performing a read operation, obtain the error correction code (ECC) value of the storage block. The ECC value is an important indicator to measure the health of the storage block. If the ECC value exceeds a preset threshold, it may indicate that the storage block is abnormal.

[0069] Step S320, when a newly added storage block is marked as a newly added problem block, the window range is adjusted with the storage position of the current newly added problem block as the window center, and the newly added storage blocks within the adjusted window range are traversed to detect whether there is a risk block within the adjusted window range based on preset judgment conditions.

[0070] Exemplarily, the appearance of a new problem block indicates that there may be more potential risk blocks within the current detection range. After a new problem block is detected, the window range will be readjusted with the storage location of the problem block as the center. This means that the detection focus of the window range will move from the previous center position (for example, the previous problem block) to the current location of the new problem block. According to the location where the new storage block appears, the size and direction of the window range are dynamically adjusted, which may include: Expanding the window range: increasing the number of storage blocks within the window range, for example, from Block N-1 to Block N+2 to Block N-2 to Block N+3. Changing the detection direction: If the problem blocks appear on one side (for example, the left side, right side, or both sides), the window range can be expanded in that direction first. The purpose of dynamic adjustment is to ensure that the window covers the storage blocks in the neighborhood of the new problem block, so as to detect more potential risk blocks.

[0071] Step S330, repeating the steps of traversal and risk block detection until all risk blocks adjacent to each problem block in the storage medium are screened out.

[0072] Exemplarily, the error correction code value (ECC) of the newly added storage block within the window range is read to determine the status of the newly added storage block. If the newly added storage block meets the judgment conditions of the risk block (for example, read failure, ECC value exceeds the standard), it is marked as a risk block. Then continue to dynamically adjust the window range to expand the detection area to cover more possible potential risk blocks. Among them, the adjustment range may include increasing the size of the detection window or changing the detection direction (for example, expanding to the left, expanding to the right, or expanding on both sides). After each adjustment of the window range, repeat the above-mentioned "traversal" and "risk block detection" steps for the storage blocks newly included in the window range.

[0073] It is worth noting that this process is a recursive loop that requires continuous detection and expansion of the window to ensure that all potential risk blocks are covered. When the newly added storage blocks within the window range are no longer found to have problem blocks and risk blocks, and no problem blocks and risk blocks are found in the entire storage medium, the loop operation ends and the window size for the storage medium is determined.

[0074] The risk block screening method of the embodiment of the present application marks the storage block that meets the aging test failure condition as a problem block, and judges whether there is a risk block based on the set window range and the problem block as the center, and gradually covers the potential risk area in combination with the distribution law of the risk block, and screens out all potential risk blocks within the window range, thereby realizing efficient screening of risk blocks in the storage medium. The present application can optimize the window range during the detection process to ensure the comprehensiveness of the screening, while reducing invalid detection of normal areas. By iteratively judging the properties and adjustment range of the storage block for multiple times, the problem block and the risk block can be effectively identified and marked, thereby improving the stability and reliability of the storage medium and reducing the risk of storage failure caused by the risk block.

[0075] Figure 6 A schematic diagram of the structure of a risk block screening device according to an embodiment of the present application is shown. Exemplarily, the device includes: The storage block detection module 61 is used to obtain storage blocks in the storage medium that meet the aging test failure condition and mark them as problem blocks; The risk block judgment module 62 is used to traverse the problem blocks within the window range according to the set window range, taking the current problem block as the window center, to detect whether there is a risk block within the window range based on the preset judgment conditions; The risk block screening module 63 is used to adjust the current window range when there is at least one risk block, so as to repeat the traversal and risk block detection steps for the newly added problem blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out.

[0076] It can be understood that the device of this embodiment corresponds to the risk block screening method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.

[0077] The present application also provides a storage device. Exemplarily, the storage device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the storage device to execute the functions of each module in the above-mentioned risk block screening method or the above-mentioned risk block screening device.

[0078] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0079] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0080] The present application also provides a computer-readable storage medium for storing the computer program used in the above storage device. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0081] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0082] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0083] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a storage device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0084] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A risk block screening method, characterized in that: The method comprises: Obtaining storage blocks that meet the aging test failure condition in the storage medium and marking them as problem blocks; According to the set window range, taking the current problem block as the window center, traverse the storage blocks within the window range to detect whether there is a risk block within the window range based on the preset judgment condition; When there is at least one risk block, the current window range is adjusted to repeat the traversal and risk block detection steps for the newly added storage blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out.

2. The risk block screening method according to claim 1, characterized in that: The step of obtaining a storage block in the storage medium that meets the aging test failure condition and marking the storage block as a problem block includes: Performing a read operation, a write operation or an erase operation on the storage block; When the storage block fails when performing any one of the read operation, the write operation or the erase operation, or if it is detected that the error correction code value of the storage block exceeds a preset threshold, the storage block is marked as a problem block.

3. The risk block screening method according to claim 1, characterized in that: The setting of the window range includes: The current position of the problem block is taken as the window center, and the initial size of the window range is set based on preset parameters; the window range includes the problem block and several neighboring storage blocks close to the problem block.

4. The risk block screening method according to claim 1 or 3, characterized in that: The traversing of the storage blocks within the window range to detect whether there is a risk block within the window range based on a preset judgment condition includes: Starting from the starting position of the window range, traverse all the neighboring storage blocks within the window range except the current problem block; For the traversed neighboring storage block, reading the error correction code value of the neighboring storage block; When the error correction code value exceeds a preset threshold, the neighborhood storage block is marked as the risk block.

5. The risk block screening method according to claim 1, characterized in that: After detecting whether there is a risk block within the window range based on the preset judgment condition, the method further includes: Based on the distribution pattern of the risk blocks in the storage medium, the size and direction of the window range are dynamically adjusted.

6. The risk block screening method according to claim 5, characterized in that: The dynamically adjusting the size and direction of the window range based on the distribution law of the risk blocks in the storage medium further includes: Counting the average number of times the neighborhood storage blocks near the problem block are marked as risk blocks; The size and expansion direction of the window range are set according to the average number of times obtained by statistics.

7. The risk block screening method according to claim 1, characterized in that: The step of repeatedly performing the traversal and risk block detection steps for the newly added problem blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out includes: Within the adjusted window range, performing the read operation, the write operation, the erase operation or reading the error correction code value on the newly added storage block to determine the attribute of the newly added storage block; When the newly added storage block is marked as a newly added problem block, the window range is adjusted with the current newly added problem block as the window center, and the newly added storage blocks within the adjusted window range are traversed to detect whether there is the risk block within the adjusted window range based on the preset judgment condition; The steps of traversing and detecting risky blocks are repeatedly performed until all the risky blocks adjacent to each of the problem blocks in the storage medium are screened out.

8. A risk block screening device, characterized in that: The device comprises: A storage block detection module is used to obtain storage blocks in the storage medium that meet the aging test failure conditions and mark them as problem blocks; A risk block judgment module is used to traverse the problem blocks within the window range according to the set window range, taking the current problem block as the window center, so as to detect whether there is a risk block within the window range based on preset judgment conditions; The risk block screening module is used to adjust the current window range when there is at least one risk block, so as to repeat the traversal and risk block detection steps for the newly added problem blocks within the adjusted window range until all risk blocks adjacent to each of the problem blocks in the storage medium are screened out.

9. A storage device, characterized in that: The storage device comprises a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the risk block screening method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The device stores a computer program, which, when executed on a processor, implements the risk block screening method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method and a system for real-time discovery of weak blocks by a solid-state hard disk device

    CN109545265A

  • Firmware-based SSD block failure prediction and avoidance scheme

    CN112711492A

  • Weak block screening method of storage device

    CN115116527A

  • Defect detection method and device, equipment and storage medium

    CN117197134A

  • Solid state disk fault prediction method and system based on artificial intelligence

    CN119179598A