Block reading frequency optimization method and device, equipment and storage medium

By performing wear tests and read operations on the solid-state drive block, counting the number of read interferences and the number of failed bits, optimizing the number of reads, solving the data reliability problems caused by read interference, reducing garbage collection, and extending the service life of the solid-state drive.

CN118939187APending Publication Date: 2024-11-12WUHAN TAICUN TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410962575.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The prior art data reliability problems caused by read interference in solid-state drives lead to early triggering of garbage collection, introducing write amplification, and reducing disk service life and performance.

Method used

By performing wear tests and single-page reading operations on the target block, count the initial read interference times and the failed bit value, compare the maximum source data with the preset read interference threshold, correct the read interference times if it is less than the threshold, and if it is greater than or equal to the threshold, perform Garbage recycling, optimize the number of reads to reduce the number of garbage recycling.

Benefits of technology

By correcting the number of read interference, the number of garbage collections is reduced, the write amplification is reduced, the service life of the disk is extended, and the performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939187A_ABST
    Figure CN118939187A_ABST
Patent Text Reader

Abstract

The invention discloses a Block reading frequency optimization method and device, equipment and a storage medium. The method comprises the following steps: performing wear test and single-page reading operation on a target block to obtain a plurality of initial reading interference times; reading source data of the target block, counting a failure bit value under each initial read interference frequency according to the source data, and taking each failure bit value as a failure bit threshold under the corresponding initial read interference frequency; when the number of initial read interference times of the target block reaches a preset read interference threshold value, initiating a read operation on a specific page of the target block, counting all corresponding source data, and determining the maximum source data in all the corresponding source data; comparing the maximum source data with a failure bit threshold value corresponding to a preset read interference threshold value, if the former is smaller than the latter, calculating and searching the optimal read interference times, and correcting the initial read interference times of the target block through the optimal read interference times; and if the former is greater than or equal to the latter, garbage collection is initiated for the target block. Write amplification is reduced, and the service life of the disc is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a method, device, equipment and storage medium for optimizing block read times. Background Art

[0002] The way to read data in 3D NAND Flash is based on the page granularity. A block consists of multiple pages, and at most one page is allowed to be read simultaneously in a block. When reading the data of a certain page, it is necessary to add a Vpass voltage to the gate where other pages are located, which will cause a voltage difference between the gate and the source, resulting in a slight programming effect, so that the stored data is affected. This phenomenon is called read disturbance. If the data in a block is read too many times, the reliability of the data will be greatly disturbed. In order to ensure the reliability of the data, when the data in the block is read a certain number of times, the block needs to be garbage collected and the data transferred to a new block. The current SSD firmware records the number of times the block is read, that is, when a page in the block is read, the number of times the entire block is read is increased by 1.

[0003] Ideally, there are two extreme cases for the number of block reads. One is to read only a single page in the block N times, which is called SPRD (Single Page Read Disturb); the other is to read each page in the block once, with a total of N reads, which is called BLRD (Block Read Disturb). For the same number of reads, SPRD will produce greater read disturbance, resulting in more data errors, while BLRD will produce less read disturbance. In order to avoid the impact of the extreme case SPRD, the block read limit is usually set based on the SPRD number as the threshold.

[0004] In actual scenarios, there is almost no situation where a page is read all the time, and blocks with less wear can withstand more read disturbances. Therefore, although the number of reads of the block has reached the threshold, the reliability of the data in the block is not fatally affected, and the block can withstand more reads.

[0005] However, this solution is equivalent to triggering the read interference threshold in advance, forcing the data to be garbage collected, which will introduce additional write amplification, reduce the service life of the disk and affect the performance of the disk. Summary of the invention

[0006] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, equipment and storage medium for optimizing the number of block reads.

[0007] The present invention provides the following technical solutions:

[0008] In a first aspect, an embodiment of the present disclosure provides a method for optimizing the number of block reads, the method comprising:

[0009] Performing a wear test and a single page read operation on the target block respectively to obtain multiple initial read disturbance times;

[0010] Reading source data of the target block, counting the number of failure bits under each of the initial read disturbance times according to the source data, and using each of the failure bit values ​​as a failure bit threshold under the corresponding initial read disturbance times;

[0011] When the initial read disturbance times of the target block reaches a preset read disturbance threshold, a read operation is initiated on a specific page of the target block, and all corresponding source data are counted to determine the maximum source data among all corresponding source data;

[0012] Compare the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculate and find the optimal read interference number, and correct the initial read interference number of the target block by the optimal read interference number;

[0013] If the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read disturbance threshold, garbage collection is initiated for the target block.

[0014] Preferably, performing a wear test and a single page read operation on the target block respectively to obtain a plurality of initial read disturbance times includes:

[0015] Wearing out the target block to the end of its life by a wear test to obtain a worn block;

[0016] A single page read operation is performed on the worn block, and multiple read operations are performed respectively to obtain multiple initial read disturbance times.

[0017] Preferably, counting the number of failed bits at each of the initial read disturbance times according to the source data includes:

[0018] Acquire write data written into the target block, perform data comparison between the source data and the write data, and obtain failure bit data of a preset unit;

[0019] The failure bit data under each of the initial read disturbance times are counted, and each of the failure bit data is preprocessed to obtain a failure bit value under each of the initial read disturbance times.

[0020] Preferably, before comparing the maximum source data with the failure bit threshold corresponding to the preset read disturbance threshold, the method further includes:

[0021] The preset read disturbance threshold is set as a garbage collection start threshold.

[0022] Preferably, the calculating and searching for the optimal read disturb times includes:

[0023] Subtract all the failure bit thresholds from the maximum source data in sequence, and determine the failure bit threshold with the smallest difference as the target failure bit threshold;

[0024] An initial read disturb number corresponding to the target fail bit threshold is determined as the optimal read disturb number.

[0025] Preferably, the step of wearing out the target block until the number of times of erasing and writing the target block reaches the end of its life through a wear test to obtain a worn block comprises:

[0026] Acquire the erasure mode setting type of the target block, and determine the maximum erasure times of the target block according to the erasure mode setting type of the target block;

[0027] A wear test is performed on the target block according to the limit erasing times to obtain the worn block.

[0028] In a second aspect, an embodiment of the present disclosure provides a method and device for optimizing the number of block reads, the device comprising:

[0029] An operation module is used to perform a wear test and a single page read operation on a target block respectively to obtain a plurality of initial read disturbance times;

[0030] A statistical module, used for reading source data of the target block, counting the failure bit values ​​under each of the initial read disturbance times according to the source data, and using each of the failure bit values ​​as the failure bit threshold under the corresponding initial read disturbance times;

[0031] A determination module, configured to initiate a read operation on a specific page of the target block when the initial read disturbance count of the target block reaches a preset read disturbance threshold, and count all corresponding source data to determine the maximum source data among all corresponding source data;

[0032] Correction module for

[0033] Compare the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculate and find the optimal read interference number, and correct the initial read interference number of the target block by the optimal read interference number;

[0034] A recycling module is used to initiate garbage collection for the target block if the maximum source data is greater than or equal to a failure bit threshold corresponding to the preset read disturbance threshold.

[0035] Furthermore, the device also includes:

[0036] A wear operation submodule, used for wearing out the number of erasures and writes of the target block to the end of its life through a wear test, so as to obtain a worn block;

[0037] The single page read operation submodule is used to perform a single page read operation on the wear block, and perform multiple read operations respectively to obtain multiple initial read disturbance times.

[0038] In a third aspect, a computer device is provided in an embodiment of the present disclosure, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the block read times optimization method described in the first aspect when executing the computer program.

[0039] In a fourth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the block read times optimization method described in the first aspect are implemented.

[0040] Beneficial effects of this application:

[0041] The Block read count optimization method provided by the embodiment of the present application includes: performing a wear test and a single-page read operation on a target block respectively to obtain a plurality of initial read interference times; reading the source data of the target block, counting the failure bit values ​​under each of the initial read interference times according to the source data, and using each of the failure bit values ​​as the failure bit threshold under the corresponding initial read interference times; when the initial read interference times of the target block reaches a preset read interference threshold, initiating a read operation on a specific page of the target block, and counting all corresponding source data to determine the maximum source data among all corresponding source data; comparing the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculating and finding the optimal read interference times, and correcting the initial read interference times of the target block by the optimal read interference times; if the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read interference threshold, initiating garbage collection for the target block. The present application corrects the target block read disturbance times by the correspondence between the initial read disturbance times and the failure bit threshold, eliminates the influence of BLRD, increases the block read times, reduces the garbage collection times, reduces write amplification, and increases the disk service life.

[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and 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 creative work. In each of the drawings, similar components are numbered similarly.

[0044] Figure 1 A flowchart of a method for optimizing the number of block reads provided by an embodiment of the present application is shown;

[0045] Figure 2 A flowchart of another method for optimizing the number of block reads provided in an embodiment of the present application is shown;

[0046] Figure 3 A schematic diagram of the structure of a method and device for optimizing the number of block reads provided in an embodiment of the present application is shown;

[0047] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0048] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0049] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. In contrast, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0050] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of the template are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0053] Example 1

[0054] like Figure 1 FIG. 1 is a flowchart of a method for optimizing the number of block reads in an embodiment of the present application. The method for optimizing the number of block reads provided in an embodiment of the present application includes the following steps:

[0055] Step S110 , performing a wear test and a single page read operation on the target block respectively to obtain a plurality of initial read disturbance times.

[0056] In an alternative embodiment, Figure 2 As shown, step S110 also includes:

[0057] Step S111, wearing out the target block until the end of its life through a wear test, thereby obtaining a worn block;

[0058] Step S112, performing a single page read operation on the worn block, and performing multiple read operations respectively to obtain multiple initial read disturbance times.

[0059] In this embodiment, the erase mode setting type of the target block is first obtained, such as SLC (Single-Level Cell, each storage cell stores 1 bit of data, the erase and write times are high, up to 100,000 times or more), MLC (Multi-Level Cell, each storage cell stores 2 bits of data, the erase and write times are lower than SLC, usually between 3,000 and 10,000 times), TLC (Triple-Level Cell, each storage cell stores 3 bits of data, the erase and write times are even lower, generally between 1,000 and 3,000 times), QLC (Quad-Level Cell, each storage cell stores 4 bits of data, the erase and write times are the lowest, which may be only a few hundred to a few thousand times), etc. Once the erase mode setting type is determined, the maximum erase and write times of the target block can be determined according to the characteristics of the mode setting type. This can usually be found in the specification of the storage device, or queried through the API provided by the manufacturer, and this embodiment does not limit this.

[0060] Then, through the wear test, the erase and write times of the target block are worn to the limit erase and write times, and the wear block at the end of its life is obtained. Then, the single page read operation (SPRD) is performed on the wear block, and different read times, such as 0.3M, 0.6M, 0.9M, 1.2M, and 1.5M (M is the abbreviation of Million) read operations are tested to obtain multiple initial read disturbance times, which are recorded as RDC (Read Disturb Count) times.

[0061] Step S120, reading the source data of the target block, counting the failure bit values ​​under each of the initial read disturbance times according to the source data, and using each of the failure bit values ​​as the failure bit threshold under the corresponding initial read disturbance times.

[0062] Furthermore, after obtaining multiple initial read disturbance times, the source data of the target block is read, and the write data written into the target block is obtained, the source data is compared with the write data, and the failure bit data of the preset unit is counted, such as FBC / 4KB (Fail Bit Count per 4KB, failure bit data per 4KB).

[0063] Next, the failed bit data under each initial read disturbance number is counted, and each failed bit data is preprocessed using the 3Sigma principle to obtain the failed bit value under each initial read disturbance number, and each failed bit value is used as the failed bit threshold under the corresponding initial read disturbance number. Exemplarily, the corresponding relationship between the initial read disturbance number and the failed bit threshold is shown in Table 1 below:

[0064] Table 1

[0065]

[0066] It should be noted that the grouping in Table 1 is only an example. In actual situations, more groups can be used, with FBC0 to FBC4 increasing in sequence, with FBC4 being the largest.

[0067] Step S130, when the initial read disturbance times of the target block reaches a preset read disturbance threshold, a read operation is initiated on a specific page of the target block, and all corresponding source data are counted to determine the maximum source data among all corresponding source data.

[0068] The background periodically detects the cumulative initial read disturbance times, i.e., RDC times, after data is written to all target blocks. When the initial read disturbance times of the target block reaches the preset read disturbance threshold (e.g., 1.5M), a read operation is first initiated on a specific page of the entire target block (usually the page with the largest corresponding read voltage), and all corresponding source data are counted. After traversing all corresponding source data, the maximum source data among all corresponding source data is determined, recorded as maxFBC.

[0069] Step S140, compare the maximum source data with the failure bit threshold corresponding to the preset read interference threshold. If the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculate and find the optimal read interference number, and correct the initial read interference number of the target block according to the optimal read interference number.

[0070] Finally, by querying the correspondence between the initial read disturbance times and the failure bit threshold (ie, the above table), the maximum source data maxFBC is compared with the failure bit threshold (FBC4 corresponding to 1.5M) corresponding to the preset read disturbance threshold (eg, 1.5M).

[0071] If the maximum source data is smaller than the failure bit threshold corresponding to the preset read interference threshold, all failure bit thresholds are subtracted from the maximum source data in turn, and the failure bit threshold with the smallest difference is determined as the target failure bit threshold. Finally, the initial read interference number corresponding to the target failure bit threshold is determined as the optimal read interference number, and the optimal read interference number is corrected to the initial read interference number of the target block.

[0072] In an optional implementation manner, the code logic for calculating the optimal read disturb times is as follows, and the returned temp[1] is the optimal read disturb times:

[0073] gap0=[0.3M,FBC0-maxFBC]

[0074] gap1=[0.6M,FBC1-maxFBC]

[0075] gap2=[0.9M,FBC2-maxFBC]

[0076] gap3=[1.2M,FBC3-maxFBC]

[0077] gap4=[1.5M,FBC4-maxFBC]

[0078] gaps=[gap0,gap1,gap2,gap3,gap4]

[0079] temp=[0,0]

[0080] for i in range 5:

[0081] if i=0:

[0082] temp=gaps[i][1]

[0083] else(gaps[i][1]>0)&(temp[1]-gaps[i][1]>0):

[0084] temp=gaps[i][1]

[0085] return temp[1]

[0086] Step S150: If the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read disturbance threshold, garbage collection is initiated for the target block.

[0087] It is understandable that garbage collection is a common technology used in flash storage devices to recycle invalid or no longer used data blocks so that these spaces can be reused. In flash memory, when part of the data in a block becomes invalid, garbage collection is needed to sort out these blocks and migrate valid data to new blocks.

[0088] In this embodiment, before comparing the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, the preset read interference threshold is set as the garbage collection start threshold. Therefore, when the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read interference threshold, that is, the maximum source data is greater than or equal to the failure bit threshold corresponding to the garbage collection start threshold, it means that the data quality has deteriorated and garbage collection needs to be initiated for the target block. The specific steps of garbage collection are as follows:

[0089] (1) Mark the valid data in the target block;

[0090] (2) Select or allocate new data blocks to store these valid data;

[0091] (3) Copy valid data from the old block (target block) to the new block;

[0092] (4) Erase the old block and mark it as free space.

[0093] The above-mentioned step of performing garbage collection on the target block is only taken as an example, and the specific implementation method is not limited in the embodiment of the present application.

[0094] The Block read times optimization method provided in the embodiment of the present application performs a wear test and a single-page read operation on the target block respectively to obtain multiple initial read interference times; reads the source data of the target block, and counts the failure bit values ​​under each of the initial read interference times according to the source data, and uses each of the failure bit values ​​as the failure bit threshold under the corresponding initial read interference times; when the initial read interference times of the target block reaches a preset read interference threshold, initiates a read operation on a specific page of the target block, and counts all corresponding source data to determine the maximum source data among all corresponding source data; compares the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, and if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculates and searches for the optimal read interference times, and corrects the initial read interference times of the target block by the optimal read interference times; if the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read interference threshold, initiates garbage collection for the target block. The present application corrects the target block read disturbance times by the correspondence between the initial read disturbance times and the failure bit threshold, eliminates the influence of BLRD, increases the block read times, reduces the garbage collection times, reduces write amplification, and increases the disk service life.

[0095] Example 2

[0096] like Figure 3 FIG. 1 is a schematic diagram of a block read times optimization method device 300 according to an embodiment of the present application, wherein the device comprises:

[0097] An operation module 310 is used to perform a wear test and a single page read operation on a target block to obtain a plurality of initial read disturbance times;

[0098] A statistics module 320 is used to read the source data of the target block, count the failure bit values ​​under each of the initial read disturbance times according to the source data, and use each of the failure bit values ​​as the failure bit threshold under the corresponding initial read disturbance times;

[0099] A determination module 330 is used to initiate a read operation on a specific page of the target block when the initial read disturbance number of the target block reaches a preset read disturbance threshold, and count all corresponding source data to determine the maximum source data among all corresponding source data;

[0100] A correction module 340 is used to compare the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, and if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculate and find the optimal read interference number, and correct the initial read interference number of the target block by the optimal read interference number;

[0101] The recycling module 350 is configured to initiate garbage collection on the target block if the maximum source data is greater than or equal to a failure bit threshold corresponding to the preset read disturbance threshold.

[0102] Optionally, the above-mentioned Block read times optimization method device further includes:

[0103] A wear module, used for wearing out the number of erasures and writes of the target block to the end of its life through a wear test, thereby obtaining a worn block;

[0104] The single page read operation module is used to perform a single page read operation on the wear block, and perform multiple read operations respectively to obtain multiple initial read interference times.

[0105] Optionally, the above-mentioned Block read times optimization method device further includes:

[0106] A comparison module, used for acquiring the write data written into the target block, performing data comparison between the source data and the write data, and obtaining the failure bit data of a preset unit;

[0107] The preprocessing module is used to count the failure bit data under each of the initial read disturbance times, and preprocess each of the failure bit data to obtain the failure bit value under each of the initial read disturbance times.

[0108] Optionally, the above-mentioned Block read times optimization method device further includes:

[0109] A setting module is used to set the preset read disturbance threshold as a garbage collection start threshold.

[0110] Optionally, the above-mentioned Block read times optimization method device further includes:

[0111] A calculation module, used for subtracting all the failure bit thresholds from the maximum source data in sequence, and determining the failure bit threshold with the smallest difference as the target failure bit threshold;

[0112] A determination submodule is used to determine that the initial read disturbance number corresponding to the target failure bit threshold is the optimal read disturbance number.

[0113] Optionally, the above-mentioned Block read times optimization method device further includes:

[0114] An acquisition module, used for acquiring the erasing mode setting type of the target block, and determining the maximum erasing times of the target block according to the erasing mode setting type of the target block;

[0115] The testing module is used to perform a wear test on the target block according to the limit erasing times to obtain the worn block.

[0116] The block read times optimization method and device provided in the embodiment of the present application corrects the target block read disturbance times through the correspondence between the initial read disturbance times and the failure bit threshold, eliminates the influence of BLRD, increases the block read times, reduces the garbage collection times, reduces write amplification, and increases the service life of the disk.

[0117] Example 3

[0118] The present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0119] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 having a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0120] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0121] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D slot compatibility test memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the slot compatibility test method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0122] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other block read times optimization method chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for running the slot compatibility test method.

[0123] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0124] The computer device provided in this embodiment can execute the above-mentioned block read number optimization method. Here, the block read number optimization method can be the block read number optimization method of each of the above-mentioned embodiments.

[0125] Example 4

[0126] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the block read times optimization method in the embodiment are implemented.

[0127] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, referred to as SMC), a secure digital (Secure Digital, referred to as SD) card, a flash card, etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.

[0128] 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 invention. 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 chart, and the combination of boxes in the structure diagram and / or the flow chart, 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.

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

[0130] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium can be a non-volatile storage medium or a volatile storage medium. For example, the storage medium can be: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes.

[0131] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for optimizing the number of block reads, characterized in that: The method comprises: Performing a wear test and a single page read operation on the target block respectively to obtain multiple initial read disturbance times; Reading source data of the target block, counting the number of failure bits under each of the initial read disturbance times according to the source data, and using each of the failure bit values ​​as a failure bit threshold under the corresponding initial read disturbance times; When the initial read disturbance times of the target block reaches a preset read disturbance threshold, a read operation is initiated on a specific page of the target block, and all corresponding source data are counted to determine the maximum source data among all corresponding source data; Compare the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, calculate and find the optimal read interference number, and correct the initial read interference number of the target block by the optimal read interference number; If the maximum source data is greater than or equal to the failure bit threshold corresponding to the preset read disturbance threshold, garbage collection is initiated for the target block.

2. The method for optimizing the number of block reads according to claim 1, characterized in that: The wear test and the single page read operation are respectively performed on the target block to obtain a plurality of initial read disturbance times, including: Wearing out the target block to the end of its life by a wear test to obtain a worn block; A single page read operation is performed on the worn block, and multiple read operations are performed respectively to obtain multiple initial read disturbance times.

3. The method for optimizing the number of block reads according to claim 1, characterized in that: The counting of the number of failed bits at each of the initial read disturbance times according to the source data includes: Acquire write data written into the target block, perform data comparison between the source data and the write data, and obtain failure bit data of a preset unit; The failure bit data under each of the initial read disturbance times are counted, and each of the failure bit data is preprocessed to obtain a failure bit value under each of the initial read disturbance times.

4. The method for optimizing the number of block reads according to claim 1, characterized in that: Before comparing the maximum source data with the failure bit threshold corresponding to the preset read disturbance threshold, the method further includes: The preset read disturbance threshold is set as a garbage collection start threshold.

5. The method for optimizing the number of block reads according to claim 1, characterized in that: The calculating and searching for the optimal read disturbance times includes: Subtract all the failure bit thresholds from the maximum source data in sequence, and determine the failure bit threshold with the smallest difference as the target failure bit threshold; An initial read disturb number corresponding to the target failure bit threshold is determined as the optimal read disturb number.

6. The method for optimizing the number of block reads according to claim 2, characterized in that: The step of wearing out the target block by a wear test until the number of times of erasing and writing the target block reaches the end of its life to obtain a worn block comprises: Acquire the erasing mode setting type of the target block, and determine the maximum erasing times of the target block according to the erasing mode setting type of the target block; A wear test is performed on the target block according to the limit erasing times to obtain the worn block.

7. A device for optimizing the number of block reads, characterized in that: The device comprises: An operation module is used to perform a wear test and a single page read operation on a target block respectively to obtain a plurality of initial read disturbance times; A statistical module, used for reading source data of the target block, counting the failure bit values ​​under each of the initial read disturbance times according to the source data, and using each of the failure bit values ​​as the failure bit threshold under the corresponding initial read disturbance times; A determination module, configured to initiate a read operation on a specific page of the target block when the initial read disturbance count of the target block reaches a preset read disturbance threshold, and count all corresponding source data to determine the maximum source data among all corresponding source data; A correction module, used for comparing the maximum source data with the failure bit threshold corresponding to the preset read interference threshold, if the maximum source data is less than the failure bit threshold corresponding to the preset read interference threshold, then calculating and finding the optimal read interference number, and correcting the initial read interference number of the target block by the optimal read interference number; A recycling module is used to initiate garbage collection for the target block if the maximum source data is greater than or equal to a failure bit threshold corresponding to the preset read disturbance threshold.

8. The device for optimizing the number of block reads according to claim 7, characterized in that: The device also includes: A wear operation submodule, used for wearing out the number of erasures and writes of the target block to the end of its life through a wear test, so as to obtain a worn block; The single page read operation submodule is used to perform a single page read operation on the wear block, and perform multiple read operations respectively to obtain multiple initial read disturbance times.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the block read times optimization method according to any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the block read times optimization method described in any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Read interference processing method and device, computer storage medium and terminal

    CN119473154A

  • Read interference function test method and device, readable storage medium and electronic equipment

    CN120048326A

  • Read disturb function test method and device, readable storage medium and electronic equipment

    CN120048326B

  • Block reading frequency threshold adjustment method and device, storage equipment and storage medium

    CN121300696A

  • Differential wordline scan in a memory sub-system

    US20260140644A1