Hard disk bad block screening method and device, storage medium and electronic device

By conducting read and write tests on the hard drive under different temperature environments, comprehensively analyzing the characteristics of the flash memory, and determining the threshold for the number of bit flips, the problem of inaccurate screening of bad blocks in hard drives was solved, achieving higher screening accuracy and lower risk of missed screening.

CN115966237BActive Publication Date: 2026-04-28ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-12-19
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as missed or incorrect screening of hard drive bad blocks due to incomplete particle characteristic analysis, especially in terms of inaccurate screening under different temperature environments.

Method used

By performing read and write tests on the hard drive under target temperature conditions, the number of bit flips is obtained, the threshold of the number of bit flips is determined, and blocks that meet the preset conditions are screened as bad blocks. This includes tests under low temperature, low temperature cycle, high temperature and high temperature environments, and a comprehensive analysis of the characteristics of the hard drive.

Benefits of technology

It improves the accuracy of hard drive bad block screening, reduces the risk of missed or incorrect screening, and ensures that bad blocks screened under different temperature environments are accurately identified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115966237B_ABST
    Figure CN115966237B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a hard disk bad block screening method and device, a storage medium and an electronic device. The method comprises: obtaining a target hard disk to be tested, performing read-write testing on the target hard disk under a target temperature environment, obtaining a group of bit flip numbers, determining a bit flip number threshold according to the group of bit flip numbers, and determining a block corresponding to a bit flip number that meets a preset condition with the bit flip number threshold as a bad block in the target hard disk. Through the present application, the problem of bad block screening leakage or mis-screening caused by incomplete particle characteristic analysis in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for screening bad blocks on a hard disk. Background Technology

[0002] Solid-state drives (SSDs) are now widely used in various applications. Due to varying operating environments, the challenges to data security are becoming increasingly severe, especially when used under different ambient temperatures. This places greater demands on the temperature resistance and stability of the flash memory chips. Therefore, it is necessary to select flash memory chips that exhibit strong temperature resistance and stability across a wide temperature range.

[0003] Currently, in related technologies, a bad block screening threshold is determined by counting the number of error bits during data writing and reading at a specified temperature, and this threshold is used to filter bad blocks. However, simply counting the number of error bits by creating a temperature difference between the written and read data may result in blocks that perform poorly under low or high temperature environments not being completely filtered out, posing a risk of missing bad blocks.

[0004] There is currently no effective solution to the problem of missing or incorrectly screening defective particles due to incomplete particle characteristic analysis in related technologies. Summary of the Invention

[0005] This invention provides a method, apparatus, storage medium, and electronic device for screening bad blocks on a hard disk, in order to at least solve the problem of missed or incorrect screening of bad blocks due to incomplete particle characteristic analysis in related technologies.

[0006] According to an embodiment of the present invention, a method for screening bad blocks in a hard disk is provided, comprising: acquiring a target hard disk to be tested, wherein the target hard disk is composed of a plurality of blocks to be screened;

[0007] The target hard drive is subjected to read and write tests under the target temperature environment to obtain a set of bit flip counts. The target temperature environment is a temperature environment in which the temperature difference from the preset temperature always exceeds the preset value. One bit flip count in the set of bit flip counts corresponds to one block in the target hard drive. The bit flip count represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test.

[0008] A bit flip number threshold is determined based on the set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of the set of bit flip numbers;

[0009] The block corresponding to the number of bit flips that meets the preset condition with the bit flip number threshold is identified as a bad block in the target hard disk.

[0010] According to another embodiment of the present invention, a hard disk bad block screening device is provided, comprising: an acquisition module for acquiring a target hard disk to be tested, wherein the target hard disk is composed of a plurality of blocks to be screened;

[0011] The processing module is used to perform read and write tests on the target hard disk under a target temperature environment to obtain a set of bit flip counts. The target temperature environment is a temperature environment where the temperature difference from the preset temperature always exceeds a preset value. One bit flip count in the set of bit flip counts corresponds to one block in the target hard disk. The bit flip count represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test.

[0012] The first determining module is used to determine a bit flip number threshold based on the set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of the set of bit flip numbers;

[0013] The second determining module is used to determine the block corresponding to the number of bit flips that meets the preset condition with the bit flip number threshold as a bad block in the target hard disk.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0015] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0016] This invention solves the problem of missed or incorrect screening of bad blocks due to incomplete particle characteristic analysis in related technologies, thereby improving the accuracy of hard disk bad block screening and greatly reducing the risk of missed or incorrect screening of bad blocks. Attached Figure Description

[0017] Figure 1 This is a hardware structure block diagram of a mobile terminal for a hard disk bad block screening method according to an embodiment of the present invention.

[0018] Figure 2 This is a flowchart of a method for screening bad blocks on a hard disk according to an embodiment of the present invention;

[0019] Figure 3 This is a flowchart illustrating the model generation process of a method for screening bad blocks on a hard disk according to an embodiment of the present invention.

[0020] Figure 4 This is a structural block diagram of a hard disk bad block screening device according to an embodiment of the present invention. Detailed Implementation

[0021] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0023] The methods and embodiments provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a hard disk bad block screening method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0024] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the hard disk bad block screening method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0025] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0026] This embodiment provides a method for screening bad blocks on a hard disk. Figure 2 This is a flowchart of a hard disk bad block screening method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0027] S202, Obtain the target hard disk to be tested, wherein the target hard disk consists of multiple blocks to be filtered;

[0028] Optionally, in this embodiment, the target hard drive to be tested may include, but is not limited to, multiple hard drives that have not yet been tested but are about to be tested. The types of target hard drives may include, but are not limited to, solid-state drives, hard disk drives, and hybrid hard drives.

[0029] Optionally, in this embodiment, the target hard disk may include, but is not limited to, multiple blocks to be screened. The blocks to be screened include good blocks and bad blocks. The difference between good blocks and bad blocks may include, but is not limited to, whether they meet the requirements under the corresponding conditions. Bad blocks will be screened out during the screening process.

[0030] S204, Perform read and write tests on the target hard drive under the target temperature environment to obtain a set of bit flip counts. The target temperature environment is a temperature environment where the temperature difference from the preset temperature always exceeds the preset value. One bit flip count in the set of bit flip counts corresponds to one block in the target hard drive. One bit flip count represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test.

[0031] Optionally, in this embodiment, the target temperature environment may include, but is not limited to, a temperature environment preset by the screener. It may be a high-temperature environment, a low-temperature loop, or a temperature cycling environment. That is, it may be a high-temperature write-low-temperature read environment, a high-temperature write-high-temperature read environment, or a low-temperature write-low-temperature read environment, or a low-temperature write-high-temperature read environment, etc. The specific setting of the target temperature environment is not limited here.

[0032] Optionally, in this embodiment, the preset temperature and preset value in the above-mentioned "target temperature environment is a temperature environment where the temperature difference from the preset temperature always exceeds the preset value" may include, but are not limited to, settings pre-set by technicians and adjustable at any time according to actual needs. After multiple tests are completed, the preset temperature and preset value can also be adjusted according to actual needs. When the difference between the test temperature environment and the preset temperature always exceeds the preset value, this temperature environment is the target temperature environment.

[0033] Optionally, in this embodiment, the above-mentioned read / write test may be a test to check whether the data written to and read from the target hard disk are consistent, and the bit flip number may include, but is not limited to, the number of bits that are inconsistent between the written and read bits.

[0034] It should be noted that the block is divided into 2304 pages (configuration), and each page can store 16k of data, 16x1024 bytes. 1 byte equals 8 bits. Existing technology uses pages to determine bad blocks.

[0035] A bit is a unit of information. A bit is an abbreviation for binary unit or binary digit, representing the amount of information provided by selecting one element (0 or 1) from a binary array (if the two elements have equal probability of appearing). In practice, each binary digit is often referred to as a bit, regardless of whether the two symbols have equal probability of appearing. A bit is the smallest unit of information contained in one bit of a binary number, or the amount of information required to specifically specify one of two options. It has only two states: 0 and 1. These two values ​​can also be interpreted as logical values ​​(true / false, yes / no), algebraic symbols (+ / -), activation states (on / off), or any other two-valued attribute. A byte consists of 8 bits. An English letter typically occupies one byte, and a Chinese character typically occupies two bytes. Ordinary computer systems can read and locate the smallest unit of information at the byte level; that is, in reality, ordinary computer systems cannot precisely read and locate information at the bit level.

[0036] For example, if a binary number is read as 10001 and written as 01101, it is easy to see that the values ​​of the first, second, and third bits in the data have been flipped accordingly, so the number of bit flips is 3.

[0037] S206, determine the bit flip number threshold based on a set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of a set of bit flip numbers;

[0038] Optionally, in this embodiment, the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of a set of bit flip numbers. The average bit flip number is determined by adding a set of bit flip numbers and dividing by the number of data. The second largest bit flip number is the second largest bit flip number in this set of bit flip numbers.

[0039] For example, if the number of bit flips in a set of numbers is 5, 6, 7, 8, and 9, then the average number of bit flips in this set is 7, and the second largest number of bit flips is 8. In this case, the bit flip threshold is determined by 7 and 8.

[0040] The above is merely an example, and this application does not impose any specific limitations.

[0041] S208, the block corresponding to the number of bit flips that meets the preset condition with the number of bit flips threshold is identified as a bad block in the target hard disk.

[0042] Optionally, in this embodiment, the bit flip number threshold may include, but is not limited to, the judgment value for filtering good and bad blocks of the target hard disk to be screened. When the threshold meets the preset conditions, the block corresponding to the bit flip number is a bad block, and otherwise it is a good block.

[0043] It should be noted that the above-mentioned screening of bad blocks can use the RDT (Reliability Demonstration Test) method. This test can filter out some blocks that exceed the set ECC (Error Correcting Code) threshold during the test, and these blocks will be marked as bad blocks.

[0044] For example, Figure 3 This is a schematic flowchart illustrating a method for screening bad blocks on a hard disk according to an embodiment of the present invention, as shown below. Figure 3 As shown, the above-mentioned method for screening bad blocks on a hard drive includes, but is not limited to, the following steps:

[0045] S302, Filtering begins;

[0046] S304, perform particle analysis, analyze the particle characteristics exhibited by flash memory particles under high temperature, low temperature and temperature cycling environments, and analyze whether the particle characteristics are caused by changes in ambient temperature or by the particle's own process characteristics (whether the particle characteristics are caused solely by temperature changes).

[0047] S306, High and Low Temperature RDT Test;

[0048] S308, determine the high and low temperature RDT screening threshold;

[0049] S310, high and low temperature RDT screening;

[0050] S312, determine whether it passes the RDT filter. If the result is "yes", then execute S314; if the result is "no", then execute S320.

[0051] S314, bad block inheritance, inherits bad blocks selected by each RDT, thus ensuring that bad blocks selected by RDT in low temperature and high temperature environments are not included in the product testing process, thus ensuring the product test yield.

[0052] S316, Conduct product testing;

[0053] S318, determine whether the product test has passed. If the result is "yes", then execute S322; if the result is "no", then execute S320.

[0054] S320, phased out;

[0055] S322, Filtering complete.

[0056] The above is merely an example, and this application does not impose any specific limitations.

[0057] This application's embodiments involve acquiring a target hard drive to be tested, performing read and write tests on the target hard drive under a target temperature environment to obtain a set of bit flip counts, determining a bit flip count threshold based on this set of bit flip counts, and identifying blocks corresponding to bit flip counts that meet preset conditions as bad blocks in the target hard drive. In addition to counting the number of erroneous bits under low-temperature write-high-temperature or high-temperature write-low-temperature read environments, it also counts the number of erroneous bits under low-temperature or high-temperature constant-temperature environments. This allows bad blocks under constant-temperature environments to be screened out, reducing the risk of missed bad blocks. This solves the problem of missed or falsely screened bad blocks due to incomplete particle characteristic analysis in related technologies, achieving the technical effect of improving the accuracy of hard drive bad block screening and greatly reducing the risk of missed or falsely screened bad blocks.

[0058] In an exemplary embodiment, a read / write test is performed on the target hard drive under a target temperature environment to obtain a set of bit flip numbers, including at least one of the following: When it is necessary to test the stability of the target hard drive in a low-temperature environment, a write test is performed on the target hard drive in a first low-temperature environment, and a read test is performed on the target hard drive in the same first low-temperature environment to obtain a first set of bit flip numbers. The first low-temperature environment is a temperature environment where the temperature is always lower than a preset temperature and the temperature difference is always greater than a preset value; the set of bit flip numbers includes the first set of bit flip numbers. When it is necessary to test the stability of the target hard drive under a temperature cycling environment, a write test is performed on the target hard drive in a first low-temperature environment, and a read test is performed on the target hard drive in a first high-temperature environment to obtain a second set of bit flip numbers. The bit flip count is calculated as follows: The first high-temperature environment is a temperature environment where the temperature is consistently higher than a preset temperature, and the temperature difference is consistently greater than a preset value. One set of bit flip counts includes the second set of bit flip counts. When testing the stability of the target hard drive under temperature cycling conditions, a write test is performed on the target hard drive under the first high-temperature environment, and a read test is performed on the target hard drive under the first low-temperature environment, resulting in a third set of bit flip counts. Similarly, when testing the stability of the target hard drive under high-temperature conditions, a write test is performed on the target hard drive under the first high-temperature environment, and a read test is performed on the target hard drive under the first high-temperature environment, resulting in a fourth set of bit flip counts.

[0059] Optionally, in this embodiment, the stability of the target hard disk in a low-temperature environment can be the stability of the target hard disk in a low-temperature write and low-temperature read environment. That is, the value of the bit flip number of the target hard disk during low-temperature write and low-temperature read is compared with the preset value. If the relevant conditions are met, it can be said that the target hard disk is relatively stable in a low-temperature environment; otherwise, if the relevant conditions are not met, it is not stable enough.

[0060] Optionally, in this embodiment, the first low-temperature environment may include, but is not limited to, a temperature environment in which the temperature is always lower than a preset temperature and the temperature difference between the temperature and the preset temperature is always greater than a preset value. The first set of bit flips may be the number of read and write data flipped after performing a write test on the target hard disk in the first low-temperature environment and a read test on the target hard disk in the first low-temperature environment.

[0061] For example, if the data written in the first low-temperature environment is 10001 and the data read in the first low-temperature environment is 11101, then the number of bit flips in the first group is 2.

[0062] Optionally, in this embodiment, the aforementioned temperature cycling environment can be a temperature environment where the temperatures for writing and reading data differ significantly, and can include high-temperature write, low-temperature read, and low-temperature write, high-temperature environments. The aforementioned first high-temperature environment is a temperature environment where the temperature is always higher than a preset temperature, and the difference between the temperature and the preset temperature is always greater than the preset value. The aforementioned second set of bit flip counts can be the number of read and write data flipped after performing a write test on the target hard drive in the first low-temperature environment and a read test on the target hard drive in the first high-temperature environment.

[0063] Optionally, in this embodiment, the third set of bit flips can be the number of read and write data flipped after performing a write test on the target hard disk in a first high temperature environment and a read test on the target hard disk in a first low temperature environment.

[0064] Optionally, in this embodiment, the stability under the aforementioned high-temperature environment can be the stability of the target hard drive under high-temperature write and high-temperature read environments. That is, it is a comparison between the value of the bit flip number of the target hard drive during high-temperature write and high-temperature read operations and a preset value. If the relevant conditions are met, it can be said that the target hard drive is relatively stable under high-temperature environments; otherwise, if the relevant conditions are not met, it is not stable enough.

[0065] It should be noted that the above set of bit flips includes the first set of bit flips for low-temperature write and low-temperature read, the second set of bit flips for low-temperature write and high-temperature read, the third set of bit flips for high-temperature write and low-temperature read, and the fourth set of bit flips for high-temperature write and high-temperature read.

[0066] This application's embodiments employ various methods to test the stability of a target hard drive in different temperature environments. These methods involve performing write tests on the target hard drive in a first low-temperature environment and then read tests in the same environment to obtain a first set of bit flip numbers. Alternatively, when testing the stability of the target hard drive in a temperature-cycled environment, the methods involve performing write tests in a first low-temperature environment and then read tests in a first high-temperature environment to obtain a second set of bit flip numbers. Furthermore, when testing the stability of the target hard drive in a temperature-cycled environment, the methods involve performing write tests in a first high-temperature environment and then read tests in the same environment to obtain a third set of bit flip numbers. Finally, when testing the stability of the target hard drive in a high-temperature environment, the methods involve performing write tests in a first high-temperature environment and then read tests in the same environment to obtain a fourth set of bit flip numbers. This allows for read and write tests on the target hard drive based on different temperature environments, solving the problem of missed or incorrect bad block screening due to incomplete particle characteristic analysis in related technologies. This achieves the technical effect of improving the accuracy of hard drive bad block screening and significantly reducing the risk of missed or incorrect bad block screening.

[0067] In an exemplary embodiment, the method further includes: performing particle analysis on the read and write processes of the target hard disk under different temperature environments to determine the target particle characteristics of the target hard disk, wherein the target particle characteristics include particle characteristics caused by changes in ambient temperature or particle characteristics caused by the particle's own manufacturing process; and when the target particle characteristics indicate particle characteristics caused by changes in ambient temperature, testing the stability of the target hard disk in low-temperature environments, high-temperature environments, and temperature cycling environments respectively.

[0068] Optionally, in this embodiment, the aforementioned particle analysis may include, but is not limited to, statistically analyzing the number of read / write error bit flips of the target hard drive under low-temperature write-low-temperature read, low-temperature write-high-temperature read, high-temperature write-high-temperature read, and high-temperature write-low-temperature read conditions, and determining whether the relationship is solely caused by temperature changes by analyzing the relationship between the number of bit flips. The aforementioned particle characteristics of the target hard drive may include, but are not limited to, the relationship between the number of read / write error bits of the target hard drive under low-temperature write-low-temperature read, low-temperature write-high-temperature read, high-temperature write-high-temperature read, and high-temperature write-low-temperature conditions, wherein the target particle characteristics include particle characteristics caused by changes in ambient temperature or particle characteristics caused by the particle's own manufacturing process.

[0069] For example, if 10011 is written in a high-temperature environment, 10011 is read in a low-temperature environment, and 11011 is read in a high-temperature environment, then the bit flip number for high-temperature write and low-temperature read is 0, while the bit flip number for high-temperature write and high-temperature read is 1. This indicates that the difference in bit flip number is caused by the change in ambient temperature. Therefore, the stability of the target hard drive in low-temperature, high-temperature, and temperature cycling environments can be tested separately. If 10011 and 11000 are written in a high-temperature environment, and the read numbers are 10011 and 11111 respectively, it shows that although the two sets of read tests were performed at the same ambient temperature, the bit flip numbers are different. Therefore, this characteristic of the NAND flash memory may not be caused by changes in ambient temperature, but rather by the NAND flash memory's inherent manufacturing process.

[0070] In an exemplary embodiment, determining a bit flip number threshold based on a set of bit flip numbers includes: determining the average bit flip number, the second largest bit flip number, and the minimum bit flip number of the target hard disk under a target temperature environment based on a set of bit flip numbers; determining a first bit flip number interval and a second bit flip number interval based on the average bit flip number, the second largest bit flip number, and the minimum bit flip number, wherein the lower limit of the first bit flip number interval is the minimum bit flip number and the upper limit is the average bit flip number, the lower limit of the second bit flip number interval is the average bit flip number, and the upper limit is the second largest bit flip number; and determining the bit flip number threshold based on a first number of bit flip numbers falling within the first bit flip number interval and a second number of bit flip numbers falling within the second bit flip number interval.

[0071] Optionally, in this embodiment, the average bit flip number can be the average of a set of bit flip numbers, the second largest bit flip number can be the second largest bit flip number in a set of bit flip numbers, and the minimum bit flip number can be the smallest bit flip number in a set of bit flip numbers.

[0072] Optionally, in this embodiment, the first bit-flip interval and the second bit-flip interval can be determined by the average bit-flip number, the second largest bit-flip number, and the minimum bit-flip number. The first quantity can be the number of a set of bit-flip numbers falling within the first bit-flip interval, and the second quantity can be the number of a set of bit-flip numbers falling within the second bit-flip interval.

[0073] Optionally, in this embodiment, the bit flip number threshold can be determined by a first quantity and a second quantity.

[0074] For example, if a set of bit flips has numbers of 1, 5, 6, 7, 8, and 9, then the average bit flip number is 6, the second largest bit flip number is 8, and the smallest bit flip number is 1. In this case, the first bit flip interval is [1, 6), and the second bit flip interval is [6, 8]. The number of blocks in the first bit flip interval (corresponding to the first quantity mentioned above) is 2, and the proportion of the number of blocks in the first bit flip interval to the total number of blocks is 1 / 3. The number of blocks in the second bit flip interval (corresponding to the second quantity mentioned above) is 4, and the proportion of the number of blocks in the second bit flip interval to the total number of blocks is 2 / 3.

[0075] In an exemplary embodiment, determining a bit flip number threshold based on a first number of bit flip numbers falling within a first bit flip number interval and a second number of bit flip numbers falling within a second bit flip number interval includes: determining a pre-screening yield corresponding to the average bit flip number based on the first number and the second number, wherein the pre-screening yield represents the proportion of hard drives with no more than a preset number of bad blocks to the total number of hard drives when there are multiple target hard drives; and determining the bit flip number threshold based on the pre-screening yield.

[0076] Optionally, in this embodiment, the pre-screening yield rate refers to the proportion of the number of hard drives with no more than a preset number of bad blocks when there are multiple target hard drives. The pre-screening yield rate corresponding to the average bit flip number determined according to the first quantity and the second quantity can refer to using the average bit flip number as a pre-screening threshold. If the bit flip number is greater than the pre-screening threshold, the block is called a bad block. When the number of bad blocks in a hard drive exceeds the preset value, the hard drive is a bad drive. The proportion of the number of bad drives to the total number of hard drives is the bad drive rate. Then, the pre-screening yield rate is 1 minus the bad drive rate.

[0077] For example, a set of bit flip numbers are 1, 5, 6, 7, 8, and 9, with the first number being 2 and the second number being 4. The pre-screening threshold corresponding to the average bit flip number of 6 is 6, and the pre-screening yield is 40%.

[0078] This application's embodiments employ a method that determines the pre-screening yield corresponding to the average number of bit flips based on a first quantity and a second quantity, and then determines the bit flip number threshold based on the pre-screening yield. This allows for a more comprehensive analysis method and a more stringent screening scheme to determine the appropriate bad block screening threshold and complete the bad block screening process. This solves the problem of missed or incorrect screening of bad blocks due to incomplete particle characteristic analysis in related technologies, achieving the technical effect of improving the accuracy of hard drive bad block screening and significantly reducing the risk of missed or incorrect screening of bad blocks.

[0079] In an exemplary embodiment, determining the bit-flipping number threshold based on the pre-screening yield includes: when the pre-screening yield is less than or equal to a preset screening yield, determining the bit-flipping number threshold based on the average bit-flipping number, the second largest bit-flipping number, and a first quantity; when the pre-screening yield is greater than the preset screening yield, determining the bit-flipping number threshold based on the average bit-flipping number, the second largest bit-flipping number, and a second quantity.

[0080] Optionally, in this embodiment, the preset screening yield can be a value set in advance by relevant technical personnel based on their technical experience, or it can be a value specified by the industry, such as 50%, 0.8, etc. There are no specific limitations on the setting and representation of the preset screening yield.

[0081] For example, in the above example, the average number of bit flips is used as the pre-screening threshold. If the pre-screening yield of RDT with the average number of bit flips as the threshold is 40%, which is less than the preset screening yield of 50%, then the bit flip number threshold is determined by the following formula:

[0082] ThrECC die = AgvECC block + (MaxECC block - AgvECC block ) * K (Formula 1)

[0083] Wherein the coefficient screening coefficient K = MAX(X1, X2), the maximum value of X1 (the proportion of the number of blocks in the first bit flip interval to the total number of blocks) and X2 (the proportion of the number of blocks in the second bit flip interval to the total number of blocks) is taken, ThrECCdie is the bad block screening threshold, AgvECCblock is the average number of bit flips in the RDT test, and MaxECCblock is the second largest number of bit flips in the RDT test.

[0084] If the pre-screening yield of RDT with a recorded threshold of the average number of bit flips is 60%, which is greater than the preset screening yield of 50%, then the bit flip number threshold is determined by the following formula:

[0085] ThrECC die =AgvECC block +(MaxECC block -AgvECC block )*K (Formula 2)

[0086] Wherein the coefficient screening coefficient K = MAX(X1, X2), the minimum value of X1 (the proportion of the number of blocks in the first bit flip interval to the total number of blocks) and X2 (the proportion of the number of blocks in the second bit flip interval to the total number of blocks) is taken, ThrECCdie is the bad block screening threshold, AgvECCblock is the average number of bit flips in the RDT test, and MaxECCblock is the second largest number of bit flips in the RDT test.

[0087] This application's embodiments employ a method where, when the pre-screening yield is less than or equal to a preset screening yield, a bit-flip number threshold is determined based on the average bit-flip number, the second largest bit-flip number, and a first quantity. Then, when the pre-screening yield is greater than the preset screening yield, the bit-flip number threshold is determined based on the average bit-flip number, the second largest bit-flip number, and a second quantity. This solves the problem in related technologies where incomplete particle characteristic analysis leads to missed or incorrect screening of bad blocks, achieving the technical effect of improving the accuracy of hard drive bad block screening and significantly reducing the risk of missed or incorrect screening of bad blocks.

[0088] In an exemplary embodiment, after determining the block corresponding to the number of bit flips that meets the preset condition of the bit flip number threshold as a bad block in the target hard disk, the method further includes: marking the bad blocks in the target hard disk during the current test of the target hard disk; and canceling the test of the marked bad blocks during the next test of the target hard disk under different ambient temperatures.

[0089] Optionally, in this embodiment, the process of marking bad blocks in the target hard disk is called bad block inheritance. This allows the marked bad blocks to be skipped directly during the test. Bad blocks in low temperature, high temperature, and temperature cycling environments will be marked. Bad blocks marked in one environment will not be tested in other environments.

[0090] This application's embodiments employ a method where, during the current test of the target hard drive, bad blocks are marked. In subsequent tests conducted at different ambient temperatures, these marked bad blocks are removed from the test. By inheriting bad blocks from each RDT (Real-Time Determination) screening, the bad blocks are retained, ensuring that bad blocks selected by the RDT in low-temperature and high-temperature environments are not included in the product testing process. This guarantees product yield and solves the problem of missed or incorrect bad blocks due to incomplete particle characteristic analysis in related technologies. This achieves the technical effect of improving the accuracy of hard drive bad block screening and significantly reducing the risk of missed or incorrect bad blocks.

[0091] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments.

[0092] The present application will be described in detail below with reference to specific embodiments:

[0093] To address the problem of missing bad blocks in constant-temperature environments (low or high temperatures), this application proposes a method for screening solid-state drive (SSD) chips, which includes the following four parts:

[0094] 1. Flash Memory Analysis. Statistical analysis of the number of read / write error bit flips for flash memory chips under low-temperature write / low-temperature read, low-temperature write / high-temperature read, high-temperature write / high-temperature read, and high-temperature write / low-temperature read conditions. By analyzing the chip characteristics exhibited by the flash memory chips in a wide temperature range (the relationship between the number of read / write error bit flips for different pages in any of the four scenarios), and analyzing whether these characteristics are due to changes in ambient temperature or to inherent chip manufacturing processes (whether the characteristics are solely due to temperature changes), further analysis is needed for these environmentally vulnerable blocks. This analysis primarily focuses on whether the number of read / write error bit flips under high-temperature, low-temperature, and temperature cycling environments (low-temperature write / high-temperature read or high-temperature write / low-temperature read) meets subsequent product requirements. If not, these blocks should be filtered out during later flash memory chip selection. Conversely, if they meet the requirements, further wear testing is needed, such as performing a certain number of wear tests (PE) cycles on these blocks and then re-analyzing the number of read / write error bit flips under low-temperature, high-temperature, and temperature cycling environments to see if they meet subsequent product requirements. If the product does not meet the requirements for wide-temperature products, we should try our best to filter out these blocks in the later stages of the exposure process. Conversely, if the product meets the requirements for wide-temperature products, there is no need to pay too much attention to these blocks in the RDT screening.

[0095] 2. Determine the ECC thresholds for low-temperature and high-temperature RDT screening. By analyzing RDT ECC data under low-temperature and high-temperature environments, determine the ECC thresholds (read / write error bit flips) for RDT screening at low and high temperatures. The threshold determination method is as follows:

[0096] A. First, calculate the mean AgvECC (mean AgvECC for low temperature and agvEcc for high temperature), the second largest MaxECC (second largest value for high temperature and second largest value for low temperature), and the minimum MinECC for the ECC data in the low temperature and high temperature RDT tests. Divide the data into two intervals: [MinECC, AgvECC] and [AgvECC, MaxEcc]. Calculate the percentage of blocks in the intervals [MinECC, AgvECC] and [AgvECC, MaxECC], respectively, as X1 and X2, and then calculate the distribution. Use the mean AgvECC (blocks less than agvECC are considered bad blocks) as the pre-screening threshold and record the RDT screening yield (3 disks, 5 blocks per disk, bad disk rate; a disk is considered bad if the number of bad blocks in each disk does not exceed a preset value) when the threshold is AgvECC. In the pre-screening process, if the pre-screening yield is less than 50%, the pre-screening yield is too low, and the final screening threshold is determined by Formula 1; otherwise, the final screening threshold is determined by Formula 2.

[0097] B. Formula for calculating the screening threshold of low-temperature or high-temperature RDT:

[0098] a) Formula 1:

[0099] ThrECCdie = AgvECCblock + (MaxECCblock - AgvECCblock) * K, where the coefficient selection factor K = MAX(X1, X2), taking the maximum value between X1 and X2, ThrECCdie is the bad block selection threshold, AgvECCblock is the average value of all Page ECC values ​​within a Block in the RDT test, and MaxECCblock is the second maximum value of all Page ECC values ​​within a Block in the RDT test.

[0100] b) Formula 2:

[0101] ThrECCdie = AgvECCblock + (MaxECCblock - AgvECCblock) * K, where the coefficient selection coefficient K = MIN(X1, X2), taking the minimum value between X1 and X2, ThrECCdie is the ECC threshold for RDT bad block selection, AgvECCblock is the mean of all Page ECC values ​​in a Block in the RDT test, and MaxECCblock is the second maximum value of all Page ECC values ​​in a Block in the RDT test.

[0102] 3. Bad Block Inheritance. After determining the screening thresholds for low-temperature and high-temperature RDTs, bad blocks selected in subsequent RDT screenings or product testing and verification must be inherited. By inheriting bad blocks from each RDT screening, it is ensured that bad blocks selected in low-temperature and high-temperature environments are not included in the product testing process, thus guaranteeing product yield.

[0103] 4. Product Testing. After inheriting the defective blocks screened out by low-temperature and high-temperature RDT, product testing is carried out at different ambient temperatures according to product requirements.

[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0105] This embodiment also provides a hard disk bad block screening device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0106] Figure 4 This is a structural block diagram of a hard disk bad block screening device according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes:

[0107] The acquisition module 402 is used to acquire the target hard disk to be tested, wherein the target hard disk consists of multiple blocks to be filtered;

[0108] The processing module 404 is used to perform read and write tests on the target hard disk under the target temperature environment to obtain a set of bit flip numbers. The target temperature environment is a temperature environment where the temperature difference from the preset temperature always exceeds the preset value. One bit flip number in the set of bit flip numbers corresponds to one block in the target hard disk. One bit flip number represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test.

[0109] The first determining module 406 is used to determine a bit flip number threshold based on a set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number of a set of bit flip numbers and the second largest bit flip number.

[0110] The second determining module 408 is used to determine the block corresponding to the bit flip number that meets the preset condition with the bit flip number threshold as a bad block in the target hard disk.

[0111] In one exemplary embodiment, the above-described apparatus further includes:

[0112] The first processing unit is used to perform write tests on the target hard drive and read tests on the target hard drive in the first low temperature environment when it is necessary to test the stability of the target hard drive in the low temperature environment, and to obtain the first set of bit flip counts. The first low temperature environment is a temperature environment in which the temperature is always lower than the preset temperature and the temperature difference is always greater than the preset value. The set of bit flip counts includes the first set of bit flip counts.

[0113] The second processing unit is used to perform a write test on the target hard drive in a first low temperature environment and a read test on the target hard drive in a first high temperature environment when it is necessary to test the stability of the target hard drive in a temperature cycling environment, and to obtain a second set of bit flip numbers. The first high temperature environment is a temperature environment in which the temperature is always higher than the preset temperature and the temperature difference is always greater than the preset value. A set of bit flip numbers includes the second set of bit flip numbers.

[0114] The third processing unit is used to perform a write test on the target hard drive in a first high temperature environment and a read test on the target hard drive in a first low temperature environment when it is necessary to test the stability of the target hard drive in a temperature cycling environment, and to obtain a third set of bit flip numbers, wherein a set of bit flip numbers includes the third set of bit flip numbers.

[0115] The fourth processing unit is used to perform a write test on the target hard drive under the first high temperature environment and a read test on the target hard drive under the first high temperature environment when it is necessary to test the stability of the target hard drive under high temperature environment, and to obtain a fourth set of bit flip numbers, wherein a set of bit flip numbers includes the fourth set of bit flip numbers.

[0116] In one exemplary embodiment, the above-described apparatus further includes:

[0117] The fifth processing unit is used to perform particle analysis on the read and write process of the target hard disk under different temperature environments to determine the target particle characteristics of the target hard disk. The target particle characteristics include particle characteristics caused by changes in ambient temperature or particle characteristics caused by the particle's own manufacturing process.

[0118] The test unit is used to test the stability of the target hard drive in low-temperature, high-temperature, and temperature cycling environments, respectively, given that the target particle characteristics are affected by changes in ambient temperature.

[0119] In one exemplary embodiment, the above-described apparatus further includes:

[0120] The first determining unit is used to determine the average bit flip number, the second largest bit flip number, and the minimum bit flip number of the target hard disk under the target temperature environment based on a set of bit flip numbers.

[0121] The second determining unit is used to determine a first bit-flipping interval and a second bit-flipping interval based on the average bit-flipping number, the second largest bit-flipping number, and the minimum bit-flipping number. The lower limit of the first bit-flipping interval is the minimum bit-flipping number, and the upper limit is the average bit-flipping number. The lower limit of the second bit-flipping interval is the average bit-flipping number, and the upper limit is the second largest bit-flipping number.

[0122] The third determining unit is used to determine the bit flip number threshold based on a first number of a set of bit flip numbers falling within a first bit flip number interval and a second number of a set of bit flip numbers falling within a second bit flip number interval.

[0123] In one exemplary embodiment, the above-described apparatus further includes:

[0124] The fourth determining unit is used to determine the pre-screening yield corresponding to the average number of bit flips based on the first quantity and the second quantity, wherein the pre-screening yield represents the proportion of the number of hard disks with no more than the preset number of bad blocks when there are multiple hard disks as the target hard disks;

[0125] The fifth determining unit is used to determine the bit flipping threshold based on the pre-screening yield.

[0126] In one exemplary embodiment, the above-described apparatus further includes:

[0127] The sixth determining unit is used to determine the bit flip number threshold based on the average bit flip number, the second largest bit flip number, and the first quantity when the pre-screening yield is less than or equal to the preset screening yield.

[0128] The seventh determining unit is used to determine the bit flip number threshold based on the average bit flip number, the second largest bit flip number, and the second quantity when the pre-screening yield is greater than the preset screening yield.

[0129] In one exemplary embodiment, the above-described apparatus further includes:

[0130] The marking unit is used to mark bad blocks in the target hard drive during the current test of the target hard drive;

[0131] The cancellation unit is used to cancel the testing of marked bad blocks during the next test of the target hard drive under different ambient temperatures.

[0132] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0133] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0134] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0135] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0136] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0137] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0138] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0139] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for screening bad blocks on a hard disk, characterized in that, include: Obtain the target hard disk to be tested, wherein the target hard disk consists of multiple blocks to be screened; The target hard drive is subjected to read and write tests under the target temperature environment to obtain a set of bit flip counts. The target temperature environment is a temperature environment in which the temperature difference from the preset temperature always exceeds the preset value. One bit flip count in the set of bit flip counts corresponds to one block in the target hard drive. The bit flip count represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test. A bit flip number threshold is determined based on the set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of the set of bit flip numbers, including: determining the average bit flip number, the second largest bit flip number, and the minimum bit flip number of the target hard drive under the target temperature environment based on the set of bit flip numbers; determining a first bit flip number interval and a second bit flip number interval based on the average bit flip number, the second largest bit flip number, and the minimum bit flip number, wherein the lower limit of the first bit flip number interval is the minimum bit flip number, and the upper limit is the average bit flip number. The lower limit of the second bit-flip number interval is the average bit-flip number, and the upper limit is the second largest bit-flip number. A bit-flip number threshold is determined based on a first number of bit-flip numbers falling within the first bit-flip number interval and a second number of bit-flip numbers falling within the second bit-flip number interval. A pre-screening yield corresponding to the average bit-flip number is determined based on the first and second numbers, wherein the pre-screening yield represents the proportion of hard drives with no more than a preset number of bad blocks when the target hard drive consists of multiple hard drives. The bit-flip number threshold is determined based on the pre-screening yield. The block corresponding to the number of bit flips that meets the preset condition with the bit flip number threshold is identified as a bad block in the target hard disk.

2. The method according to claim 1, characterized in that, The read / write test performed on the target hard disk under the target temperature environment yields a set of bit flip numbers, including at least one of the following: When it is necessary to test the stability of the target hard disk in a low-temperature environment, a write test is performed on the target hard disk in a first low-temperature environment, and a read test is performed on the target hard disk in the first low-temperature environment to obtain a first set of bit flip counts. The first low-temperature environment is a temperature environment in which the temperature is always lower than the preset temperature and the temperature difference is always greater than the preset value. The set of bit flip counts includes the first set of bit flip counts. When it is necessary to test the stability of the target hard disk under temperature cycling environment, the target hard disk is written under the first low temperature environment and read under the first high temperature environment to obtain the second set of bit flip counts. The first high temperature environment is a temperature environment in which the temperature is always higher than the preset temperature and the temperature difference is always greater than the preset value. The set of bit flip counts includes the second set of bit flip counts. When it is necessary to test the stability of the target hard disk under the temperature cycling environment, a write test is performed on the target hard disk under the first high temperature environment, and a read test is performed on the target hard disk under the first low temperature environment to obtain a third set of bit flip counts, wherein the set of bit flip counts includes the third set of bit flip counts. When it is necessary to test the stability of the target hard disk under high temperature environment, a write test is performed on the target hard disk under the first high temperature environment, and a read test is performed on the target hard disk under the first high temperature environment to obtain a fourth set of bit flip counts, wherein the set of bit flip counts includes the fourth set of bit flip counts.

3. The method according to claim 2, characterized in that, The method further includes: Granularity analysis is performed on the read and write processes of the target hard disk under different temperature environments to determine the target granular characteristics of the target hard disk. The target granular characteristics include granular characteristics caused by changes in ambient temperature or granular characteristics caused by the granular process itself. When the target particle characteristics are indicated by changes in ambient temperature, the stability of the target hard disk is tested in the low-temperature environment, the high-temperature environment, and the temperature cycling environment.

4. The method according to claim 1, characterized in that, Determining the bit flip number threshold based on the pre-screening yield includes: If the pre-screening yield is less than or equal to the preset screening yield, the bit flip number threshold is determined based on the average bit flip number, the second largest bit flip number, and the first quantity. If the pre-screening yield is greater than the preset screening yield, the bit-flipping threshold is determined based on the average bit-flipping number, the second largest bit-flipping number, and the second quantity.

5. The method according to claim 1, characterized in that, After determining the block corresponding to the bit flip number that satisfies the preset condition with the bit flip number threshold as a bad block in the target hard disk, the method further includes: During the current test of the target hard drive, bad blocks in the target hard drive are marked; During the next test of the target hard drive at different ambient temperatures, the marked bad blocks will be removed from the test.

6. A device for screening bad blocks on a hard disk, characterized in that, include: An acquisition module is used to acquire the target hard disk to be tested, wherein the target hard disk consists of multiple blocks to be screened; The processing module is used to perform read and write tests on the target hard disk under a target temperature environment to obtain a set of bit flip counts. The target temperature environment is a temperature environment where the temperature difference from the preset temperature always exceeds a preset value. One bit flip count in the set of bit flip counts corresponds to one block in the target hard disk. The bit flip count represents the cumulative value of the number of bits 0 flipped to bits 1 and the number of bits 1 flipped to bits 0 during the read and write test. The first determining module is configured to determine a bit flip number threshold based on the set of bit flip numbers, wherein the bit flip number threshold is determined by the average bit flip number and the second largest bit flip number of the set of bit flip numbers, including: determining the average bit flip number, the second largest bit flip number, and the minimum bit flip number of the target hard disk under the target temperature environment based on the set of bit flip numbers; determining a first bit flip number interval and a second bit flip number interval based on the average bit flip number, the second largest bit flip number, and the minimum bit flip number, wherein the lower limit of the first bit flip number interval is the minimum bit flip number, and the upper limit is the bit flip number... The lower limit of the second bit-flip number interval is the mean bit-flip number, and the upper limit is the second largest bit-flip number. A bit-flip number threshold is determined based on a first number of bit-flip numbers falling within the first bit-flip number interval and a second number of bit-flip numbers falling within the second bit-flip number interval. A pre-screening yield corresponding to the mean bit-flip number is determined based on the first and second numbers, wherein the pre-screening yield represents the proportion of hard drives with no more than a preset number of bad blocks when the target hard drive consists of multiple hard drives. The bit-flip number threshold is determined based on the pre-screening yield. The second determining module is used to determine the block corresponding to the number of bit flips that meets the preset condition with the bit flip number threshold as a bad block in the target hard disk.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 5.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Solid state disk, bad block screening method and computer readable storage medium

    CN114416443A