Method and device for preventing read interference of memory and server

By obtaining the block type of the block to be measured in the memory and the read and write counter record the number of times each block is read, combined with the macro switch and read interference discrimination conditions, the read interference detection and recycling process is solved, and the inability to effectively manage all blocks in the prior art is solved. It distinguishes and handles different types of Flash problems, significantly reduces data errors and improves read and write efficiency.

CN119479753APending Publication Date: 2025-02-18SHENZHEN CITY TECHWIN SEMICONDUCTOR COMPANY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411525293.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When preventing memory read interference, the prior art cannot effectively manage all blocks and fails to distinguish and process different types of Flash and block numbers, resulting in a greater risk of data errors.

Method used

By obtaining the block type of the block to be measured in the memory, the read interference judgment conditions corresponding to the preset macro switch are determined, and the number of times the blocks are read is recorded using the preset read and write counter. Read interference detection is performed based on the block type, working state, read interference discrimination conditions and count values ​​of read and write counters, and the read and write counters are collected and processed according to the detection results.

Benefits of technology

It significantly reduces data errors caused by read interference in memory, improves Flash's read and write efficiency, and differentiates and processes are carried out for different block types and working states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479753A_ABST
    Figure CN119479753A_ABST
Patent Text Reader

Abstract

The invention provides a memory read interference prevention method and device and a server, and relates to the technical field of computer control management, and the method comprises the steps: obtaining the block type of a to-be-tested block in a memory, and determining a preset read interference discrimination condition corresponding to a macro switch according to the block type, the block type comprises a data block and a table block, the data block comprises SLC and TLC, and the table block comprises SLC and TLC; the table block comprises a TAB, the macro switch is a condition compiling tool in computer programming, and the read interference judgment conditions comprise exceeding of a maximum error threshold value, error rereading and error soft solution; recording the read times corresponding to each block in the flash memory through a preset read-write counter; and performing read interference detection on the blocks by using the macro switch based on the block types, the working states of the blocks, the read interference discrimination conditions and the count values of the read-write counters corresponding to the blocks, and performing recovery processing on the blocks according to read interference detection results. According to the invention, the problem of data error caused by read interference in the memory can be obviously reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer control management, and in particular to a method, device and server for preventing memory read disturbance. Background Art

[0002] For a flash memory block, each time a flash memory page is read, a higher voltage needs to be applied to other word lines to ensure that the transistors are turned on. For these transistors, this is equivalent to doing a slight "program". Over time, this will cause too many electrons to enter the floating gate, causing a bit flip (i.e., 1→0). When the number of erroneous bits exceeds the error correction capability of ECC, the data will be lost. This is read interference.

[0003] At present, relevant technologies have proposed that new storage space can be opened up, and when the number of read times reaches a threshold, data can be moved to the storage space, and the data movement operation can be smoothed to avoid triggering the entire block data movement at a certain moment, thereby eliminating the impact of read interference on data. However, this solution only processes when an error is found in the read data or only performs a simple counting process. There is no overall management of all blocks, nor is there any distinction between various types of Flash and different types of block numbers in the Flash. In addition, the existing technical solution does not distinguish between special treatments under different working conditions. Therefore, the existing read interference prevention method has a greater risk of data errors. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a method, device and server for preventing memory read disturbance, which can significantly reduce the problem of data errors caused by read disturbance in the memory.

[0005] In a first aspect, an embodiment of the present invention provides a method for preventing memory read disturbance, the method comprising: obtaining a block type of a block to be tested in the memory, and determining a read disturbance judgment condition corresponding to a preset macro switch according to the block type, wherein the block type comprises: a data block and a table block, the data block comprises: SLC and TLC, the table block comprises: TAB, the macro switch is a conditional compilation tool in computer programming, and the read disturbance judgment condition comprises: exceeding a maximum error threshold, error rereading, and error soft resolution; recording the number of reads corresponding to each block in the flash memory by a preset read-write counter, wherein the flash memory comprises a plurality of zones, each zone comprises a plurality of blocks, each block comprises a plurality of LO pages, and the zones, blocks, and LO pages are all units for managing data of different sizes inside the flash; using the macro switch, based on the block type, the working status of the block, the read disturbance judgment condition, and the count value of the read-write counter corresponding to the block, the block is subjected to read disturbance detection, and the block is recycled according to the read disturbance detection result.

[0006] In one embodiment, a step of performing read interference detection on a block using a macro switch based on the block type, the working state of the block, the read interference judgment condition and the count value of the read-write counter corresponding to the block includes: when the block type is an SLC data block and the SLC data block is an operating data block, using the macro switch to judge whether the SLC data block exceeds the maximum error threshold and whether an error reread is performed, and when the SLC data block satisfies any one of exceeding the maximum error threshold, error rereading and exceeding the recycling threshold, the SLC data block is added to a recycling queue; when the block type is an SLC data block and the SLC data block is not an operating data block, using the macro switch to judge whether the SLC data block exceeds the maximum error threshold and whether an error reread is performed, and when the SLC data block satisfies any one of exceeding the maximum error threshold and error rereading, a fast recycling threshold is added to the read-write counter corresponding to the SLC data block, so that the SLC data block quickly reaches the SLC forced idle operation read threshold.

[0007] In one embodiment, after the step of adding a quick recovery threshold to the read-write counter corresponding to the SLC data block, the method includes: comparing the SLC data block after the quick recovery threshold is added to the read-write counter with the preset SLC idle read block threshold and the preset SLC forced idle operation read threshold through a macro switch; if the count value on the read-write counter is greater than the preset SLC forced idle operation read threshold, adding a forced idle process mark to the SLC data block; if the count value on the read-write counter is greater than the preset SLC idle read block threshold and less than the preset SLC forced idle operation read threshold, adding an idle process mark to the SLC data block.

[0008] In one embodiment, a macro switch is used to perform read interference detection on a block based on the block type, the working status of the block, the read interference judgment condition and the count value of the read-write counter corresponding to the block, including: when the block type is a TLC data block, the macro switch is used to determine whether the TLC data block has enabled soft error resolution, and when it is determined that the TLC data block has enabled soft error resolution, a fast recovery threshold is added to the read-write counter corresponding to the TLC data block, so that the TLC data block quickly reaches the TLC forced idle operation read threshold.

[0009] In one embodiment, after the step of adding a fast recovery threshold to the read-write counter corresponding to the TLC data block, the method includes: comparing the TLC data block after the fast recovery threshold is added to the read-write counter with the preset TLC idle read block threshold and the preset TLC forced idle operation read threshold through a macro switch; if the count value on the read-write counter is greater than the preset TLC forced idle operation read threshold, adding a forced idle process mark to the TLC data block; if the count value on the read-write counter is greater than the preset TLC idle read block threshold and less than the preset TLC forced idle operation read threshold, adding an idle process mark to the TLC data block.

[0010] In one embodiment, a step of performing read disturbance detection on a block by using a macro switch based on a block type, a working state of the block, a read disturbance judgment condition, and a count value of a read / write counter corresponding to the block includes: when the block type is a TAB table block and the TAB table block is a data block being operated, using the macro switch to judge whether the TAB table block exceeds a maximum error threshold and whether an error reread is performed, and when the TAB table block satisfies any one of exceeding the maximum error threshold, error rereading, and exceeding a recycling threshold, placing the page offset of the TAB table block to the last page to force replacement of the TAB table block; when the block type is a TAB table block and the TAB table block is not a data block being operated, using the macro switch to judge whether the TAB table block exceeds a maximum error threshold and whether an error reread is performed, and when the TAB table block satisfies any one of exceeding the maximum error threshold and error rereading, adding a fast recycling threshold to the read / write counter corresponding to the TAB table block to enable the TAB table block to quickly reach the TAB forced idle operation read threshold.

[0011] In one embodiment, after the step of adding a fast recovery threshold to the read-write counter corresponding to the TAB table block, the method includes: comparing the TAB table block after the fast recovery threshold is added to the read-write counter with a preset TAB entry idle read block threshold and a preset TAB entry forced idle operation read threshold through a macro switch; if the count value on the read-write counter is greater than the preset TAB entry forced idle operation read threshold, adding a forced idle process mark to the TAB table block; if the count value on the read-write counter is greater than the preset TAB entry idle read block threshold and less than the preset TAB entry forced idle operation read threshold, adding an idle process mark to the TAB table block.

[0012] In a second aspect, an embodiment of the present invention further provides a memory read disturbance prevention device, the device comprising: an information acquisition module, acquiring a block type of a block to be tested in the memory, and determining a read disturbance judgment condition corresponding to a preset macro switch according to the block type, wherein the block type comprises: a data block and a table block, the data block comprises SLC and TLC, the table block comprises: TAB, the macro switch is a conditional compilation tool in computer programming, and the read disturbance judgment condition comprises: exceeding a maximum error threshold, error rereading, and error soft resolution; a read-write recording module, recording the number of reads corresponding to each block in the flash memory through a preset read-write counter, wherein the flash memory comprises a plurality of zones, each zone comprises a plurality of blocks, each block comprises a plurality of LO pages, and the zones, blocks, and LO pages are all units for managing data of different sizes inside the flash; a read disturbance detection module, utilizing a macro switch, based on the block type, the working state of the block, the read disturbance judgment condition, and the count value of the read-write counter corresponding to the block, performs read disturbance detection on the block, and recycles the block according to the read disturbance detection result.

[0013] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement any one of the methods provided in the first aspect.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods provided in the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The embodiments of the present invention provide a method, device and server for preventing memory read disturbance. After obtaining the block type of a block to be tested in the memory and determining the read disturbance judgment condition corresponding to a preset macro switch according to the block type, the method records the number of times each block in the flash memory is read by a preset read-write counter, and uses the macro switch to perform read disturbance detection on the block based on the block type, the working state of the block, the read disturbance judgment condition and the count value of the read-write counter corresponding to the block, and recycles the block according to the read disturbance detection result. The embodiments of the present invention cover the ReadCnt counting table of all Flash blocks, and distinguish different block types. Different types of blocks correspond to different threshold settings and processing methods. In addition, by distinguishing between idle recovery and forced recovery, the problem of data errors caused by read disturbance in the memory can be significantly reduced.

[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

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

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a method for preventing memory read disturbance provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a specific flow chart of a method for preventing memory read disturbance provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a specific process of reading a Table block provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a flow chart of a method for reclaiming read data blocks by page provided by an embodiment of the present invention;

[0024] Figure 5 A schematic structural diagram of a memory read disturbance prevention device provided by an embodiment of the present invention;

[0025] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] At present, for a flash memory block, each time a flash memory page is read, a higher voltage needs to be applied to other word lines to ensure that the transistors are turned on. For these transistors, this is equivalent to doing a slight "write (Program)". In the long run, it will cause too many electrons to enter the floating gate, thereby causing bit flipping (i.e., 1 to 0). When the number of erroneous bits exceeds the error correction capability of ECC, the data will be lost. This is read interference. Related technologies propose that new storage space can be opened up, and when the number of reads reaches a threshold, the data can be moved to the storage space, and the data movement operation can be smoothed to avoid triggering the entire block data movement at a certain moment, thereby eliminating the impact of read interference on the data. However, this solution only processes when the data is read incorrectly or only performs simple counting processing. There is no overall management of all blocks, and there is no distinction between various types of Flash and different types of block numbers in Flash. In addition, the existing technical solution does not distinguish between special processing under different working conditions. Therefore, the existing read interference prevention method has a large risk of data error.

[0028] Based on this, the memory read interference prevention method, device and server provided by the embodiment of the present invention, compared with the prior art, covers the ReadCnt count table of all Flash blocks, and recycles the blocks that exceed the idle recovery threshold by traversing the entire table in the idle state, thereby playing a preventive role. Even if the ReadCnt value of some blocks exceeds the forced recovery threshold in the read and write working state, forced recovery will be performed at the first time, thereby greatly reducing the data error efficiency. In addition, the embodiment of the present invention also sets a ReadCnt count table covering all Flash blocks, and distinguishes each block type. When analyzing data errors, effective analysis can be performed with the help of this table, thereby significantly reducing the problem of data errors caused by read interference in the memory.

[0029] To facilitate understanding of this embodiment, the meaning of the symbols disclosed in the embodiment of the present invention is first explained: First, the macro switch includes the following Bit0-Bit7:

[0030] Bit0: Whether to enable the Read Disturb function (0: Disable 1: Enable).

[0031] Bit1: Whether to enable the OverFlow judgment function of the block being operated (0: Disable 1: Enable). Bit2: Whether to enable the OverFlow judgment function of the SLC block (0: Disable 1: Enable).

[0032] Bit3: Whether to enable the TLC block OverFlow judgment function (0: Disable 1: Enable).

[0033] Bit4: Whether to enable the retry judgment function of the block being operated (0: off 1: on).

[0034] Bit5: Whether to enable the SLC block retry judgment function (0: disable 1: enable).

[0035] Bit6: Whether to enable the TLC block retry judgment function (0: disable 1: enable).

[0036] Bit7: Whether to enable the TLC block Soft Read judgment function (0: Disable 1: Enable).

[0037] In addition, the ForceRead block Flag indicates whether the main loop enters the forced idle process mark, where bit0 indicates that the SLC DATA block read interference exceeds m_vd.SLCErrorThreshold, and forced read block recovery by page is required; bit1 indicates that the TLC DATA block read interference exceeds m_vd.SLCErrorThreshold, and forced read block recovery by page is required; bit2 indicates that the Tab DATA block read interference exceeds m_vd.SLCErrorThreshold, and forced read block recovery by page is required.

[0038] bIdleRead block Flag indicates whether the main loop enters the idle process mark, where bit0 indicates that the SLCDATA block read interference exceeds m_vd.SLCWarningThreshold, and the idle read block needs to be recycled by page; bit1 indicates that the TLC DATA block read interference exceeds m_vd.SLC WarningThreshold, and the idle read block needs to be recycled by page; bit2 indicates that the Tab DATA block read interference exceeds m_vd.SLCWarningThreshold, and the idle read block needs to be recycled by page.

[0039] Furthermore, SLCWarningThreshold indicates: SLC enters the idle read block threshold; TLCWarningThreshold indicates: TLC enters the idle read block threshold; SLCErrorThreshold indicates: SLC enters the forced idle operation read threshold; TLCErrorThreshold indicates: TLC enters the forced idle operation read threshold; OpErrorThreshold indicates: the threshold for determining whether to recycle when reading the block being operated; FastRecyleThreshold indicates: the threshold added to allow the block to enter recycling faster.

[0040] See also Figure 1The flowchart of a method for preventing memory read disturbance is shown in FIG. 1 , and the method mainly includes the following steps S102 to S106:

[0041] Step S102, obtaining the block type of the block to be tested in the memory, and determining the read interference judgment condition corresponding to the preset macro switch according to the block type, wherein the block type includes: data block and table block, the data block includes SLC and TLC, the table block includes: TAB, the macro switch is a conditional compilation tool in computer programming, and the read interference judgment condition includes: exceeding the maximum error threshold, error rereading and error soft solution. In one embodiment, a macro switch is used to control the read interference judgment standard according to different Flashes, and different setting conditions are configured (that is, read interference judgment conditions: exceeding the maximum error threshold OverFlow, error rereading Retry and error soft solution SoftRead) (OverFlow, Retry, SoftRead). The above read interference judgment conditions are different solutions made when read interference data errors occur. Different Flashes have different judgment conditions for read interference. The switches of these three conditions are set differently according to different Flashes, and then different threshold settings are performed according to different block types (SLC, TLC, TAB).

[0042] Step S104, recording the number of times each block in the flash memory is read by a preset read-write counter, wherein the flash memory includes multiple zones, each zone includes multiple blocks, each block includes multiple LO pages, and the zones, blocks and LO pages are all units for managing data of different sizes inside the flash. In one embodiment, for the processing of read interference, a special space is opened up in the memory to specifically record the ReadCnt table (i.e., the preset read-write counter) of each zone for each block to which it belongs. Each zone has a corresponding ReadCnt table, and the ReadCnt (how many times it has been read) of each block occupies 4 bytes in the table, and the highest 2 bits represent different block types (00: SLC 01: TLC 10: TAB). When a L0 page in a block is read, the corresponding LO block read cnt in the table is +1 (i.e., the number of times the corresponding block is read is increased by 1).

[0043] Step S106, using the macro switch, based on the block type, the working state of the block, the read interference judgment condition and the count value of the read-write counter corresponding to the block, the block is subjected to read interference detection, and the block is recycled according to the read interference detection result. In one embodiment, when the count value of a block in the table is greater than the corresponding set threshold, the block is recycled. Different types of block processing need to be distinguished. There are two priority states for the threshold processing of recycled blocks: an idle recycling threshold and a forced recycling threshold. The idle recycling threshold: when the table ReadCnt count of a block is greater than this value, it means that continuing to read the block is likely to cause a small data error, and the recycling process needs to be performed when the Flash is idle; the forced recycling threshold: when the table ReadCnt count of a block is greater than this value, it means that continuing to read the block is likely to cause a data error, so the recycling process cannot be performed after the Flash is idle, and the recycling process needs to be performed immediately; however, the ongoing reading and writing work of the Flash cannot be suspended immediately, and only one page of the block can be forced to be recycled each time, so that the recycling process can be performed without interfering with the current normal work of the Flash.

[0044] Since the prior art does not consider opening up a space in the memory to perform technical statistics on all blocks in the Flash, nor does it distinguish and process different block types, and even more so does not consider the different situations of forced recycling and idle recycling, the above-mentioned memory read disturbance prevention method provided in the embodiment of the present invention can significantly reduce the problem of data errors caused by read interference in the memory, and improve the read and write efficiency of the entire Flash.

[0045] See also Figure 2 The specific flow chart of a method for preventing memory read disturbance is shown in the figure. The embodiment of the present invention also provides an implementation method for preventing data block read disturbance. First, it is necessary to read an L0 page, determine whether the macro switch is enabled, and read cnt++ of the corresponding LO block after enabling. Then, the block type is determined according to the two high bits of the read disturbance, so as to prevent read disturbance. For details, see (1) to (3) as follows:

[0046] (1) First, determine whether it is a block being operated. If it is a block being operated, use bit 1 and bit 4 of the macro switch to determine whether the recycling process needs to be determined by the status of the page. If it is turned on, determine whether the OverFlow and Retry tags and read cnt++ exceed the OpErrorThreshold. If one of the conditions is met, set the update tag and add it to the recycling queue immediately. That is to say, when the block type is an SLC data block and the SLC data block is a data block being operated, use the macro switch to determine whether the SLC data block exceeds the maximum error threshold and whether it is reread due to error. If the SLC data block meets any of the conditions of exceeding the maximum error threshold, rereading due to error, and exceeding the recycling threshold, the SLC data block is added to the recycling queue.

[0047] (2) If it is not a block being operated, bit 1 and bit 4 of the macro switch are used to determine whether the recycling process needs to be determined by the status of the page; if it is turned on and one of the OverFlow and Retry flags is set, a FastRecyleThreshold value is added to the read cnt of the block so that it can reach the recycling threshold SLCErrorThreshold faster, and then it is determined whether the read cnt of the block exceeds the SLCWarningThreshold (or SLCErrorThreshold). If it exceeds, a mark is set on the corresponding bit of the bIdleRead block Flag (or ForceRead block Flag). That is to say, when the block type is an SLC data block and the SLC data block is not a data block being operated, the macro switch is used to determine whether the SLC data block exceeds the maximum error threshold and whether an error reread is required. When the SLC data block satisfies any of the conditions of exceeding the maximum error threshold and error reread, the read and write counter corresponding to the SLC data block is added. A fast recycling threshold is set to enable the SLC data block to quickly reach the SLC forced idle operation read threshold. Further, through the macro switch, the SLC data block after the fast recycling threshold is added to the read and write counter is compared with the preset SLC idle read block threshold and the preset SLC forced idle operation read threshold: if the count value on the read and write counter is greater than the preset SLC forced idle operation read threshold, a forced idle process mark is added to the SLC data block; if the count value on the read and write counter is greater than the preset SLC idle read block threshold and less than the preset SLC forced idle operation read threshold, an idle process mark is added to the SLC data block.

[0048] (3) Use bit 7 of the macro switch to determine whether the recycling process needs to be determined based on the status of the page; if it is enabled and the SoftRead flag is set, add a FastRecyleThreshold value to the read cnt of the block so that it can reach the recycling threshold TLCErrorThreshold faster; then determine the read cnt of the block. Whether cnt exceeds TLCWarningThreshold (or TLCErrorThreshold), if it exceeds, a mark is set on the corresponding bit of bIdleRead block Flag (or ForceRead block Flag), that is, when the block type is a TLC data block, the macro switch is used to determine whether the TLC data block has enabled error soft decoding, and when it is determined that the TLC data block is performing error soft decoding, a fast recovery threshold is added to the read-write counter corresponding to the TLC data block, so that the TLC data block quickly reaches the TLC forced idle operation read threshold. Further, through the macro switch, the TLC data block after the fast recovery threshold is added to the read-write counter is compared with the preset TLC idle read block threshold and the preset TLC forced idle operation read threshold: if the count value on the read-write counter is greater than the preset TLC forced idle operation read threshold, a forced idle process mark is added to the TLC data block; if the count value on the read-write counter is greater than the preset TLC idle read block threshold and less than the preset TLC forced idle operation read threshold, an idle process mark is added to the TLC data block.

[0049] See also Figure 3 The specific process diagram of reading a Table block is shown. The embodiment of the present invention also provides an implementation method of preventing table block read disturbance. For details, see (4) to (5) below:

[0050] (4) First, determine whether it is a block being operated. If it is a block being operated, use bit 1 and bit 4 of the macro switch to determine whether the recycling process needs to be determined by the status of the page; if it is turned on, determine the three conditions of OverFlow and Retry marks and whether read cnt++ exceeds OpErrorThreshold; if one of the conditions is met, set the page offset of the block being operated to the last page, and force the replacement of the block being operated. That is to say, when the block type is a TAB table block and the TAB table block is the data block being operated, use the macro switch to determine whether the TAB table block exceeds the maximum error threshold and whether it is reread due to error. When the TAB table block meets any of the conditions of exceeding the maximum error threshold, rereading due to error, and exceeding the recycling threshold, place the page offset of the TAB table block to the last page to force the replacement of the TAB table block.

[0051] (5) If it is not the block being operated, bit 1 and bit 4 of the macro switch are also used to determine whether the recycling process needs to be determined by the status of the page; if it is turned on and one of the OverFlow and Retry flags is set, a FastRecyleThreshold value is added to the read cnt of the block; so that it can reach the recycling threshold SLCErrorThreshold faster. Then determine whether the read cnt of the block exceeds the SLCWarningThreshold (or SLCErrorThreshold). If it exceeds, set a mark on the corresponding bit of the bIdleRead block Flag (or ForceRead block Flag). That is to say, when the block type is a TAB table block and the TAB table block is not a data block being operated, the macro switch is used to determine whether the TAB table block exceeds the maximum error threshold and whether an error reread is required. When the TAB table block satisfies any of the conditions of exceeding the maximum error threshold and error rereading, the read and write counter corresponding to the TAB table block is added. A fast recycling threshold is set to enable the TAB table block to quickly reach the TAB forced idle operation read threshold. Further, through the macro switch, the TAB table block after the fast recycling threshold is added to the read-write counter is compared with the preset TAB entry idle read block threshold and the preset TAB entry forced idle operation read threshold: if the count value on the read-write counter is greater than the preset TAB entry forced idle operation read threshold, a forced idle process mark is added to the TAB table block; if the count value on the read-write counter is greater than the preset TAB entry idle read block threshold and less than the preset TAB entry forced idle operation read threshold, an idle process mark is added to the TAB table block.

[0052] See also Figure 4 The flowchart of a method for reclaiming a read data block by page is shown in FIG. 1 . The embodiment of the present invention also provides an implementation method of the reclaiming operation, and the details are shown in (A) to (B) below:

[0053] (A) Idle recovery operation: First determine whether there is a block being recovered:

[0054] (a) If yes, then continue the recovery process from the offset according to the saved page offset and block number.

[0055] (b) If not, check whether the bIdleRead block Flag has a bit set:

[0056] (b1) If not, the read disturb idle operation process ends.

[0057] (b2) If yes, then use the hardware classification search maximum value function to search for the maximum effective read disturbance for the three types (SLC, TLC, TAB) respectively, and search for a maximum readcnt and put it in L2Pcache. (c) Then determine whether the maximum readcnt is greater than WarningThreshold:

[0058] (c1) If not, clear the bIdleRead block Flag Bit corresponding to the type and end the read disturb idle operation process.

[0059] (c2) If yes, determine whether the block is in the copy or in the recycling queue: if not, add the block with the largest read interference (SLC, TLC type) to the recycling queue or recycle the block immediately (TAB type) to complete the read interference idle operation process.

[0060] In one embodiment, for a block with a large read interference value recovered through an idle operation, the read interference value of the block needs to be set to 1 / 3 of the SLC / TLCWarningThreshold after recovery. During the idle read interference processing operation, there is a command to respond to the command, otherwise the idle operation will be terminated after traversing all types (SLC, TLC, TAB).

[0061] (B) Forced recycling operation: First determine whether there is a block being marked for recycling:

[0062] (d) If yes, continue to recycle from the offset according to the saved page offset and block number;

[0063] (e) If not, determine whether the ForceRead block Flag has a bit set:

[0064] (e1) If not, the read disturb idle operation process ends.

[0065] (e2) If yes, then use the hardware classification search maximum value function to search for the maximum effective read disturbance for the three types (SLC, TLC, TAB) respectively, and search for a maximum readcnt and put it in L2Pcache (an internal memory space that can be used to store some search results); (f) Then determine whether the maximum readcnt is greater than ErrorThreshold:

[0066] (f1) If not, clear the ForceRead block Flag Bit corresponding to the type, and end the read disturbance idle operation process.

[0067] (f2) If yes, finally determine whether the block is in the copy or in the recycling queue: if not, add the block with the largest read interference (SLC, TLC type) to the recycling queue or recycle the block immediately (TAB type) to complete the read interference idle operation process.

[0068] In one embodiment, for a block with a large read interference value that is recovered through a forced operation, the read interference value of the block needs to be set to 1 / 3 of the SLC / TLCErrorThreshold after recovery. During the idle read interference processing operation, there is a command to respond to the command, otherwise the idle operation is terminated only after traversing all types (SLC, TLC, TAB).

[0069] Furthermore, an embodiment of the present invention also provides a Copyback operation. The Copyback operation refers to copying and moving the data of several SLC blocks to a TLC block. Naturally, it is necessary to accumulate the number of read times of each SLC block and inherit it to the moved TLC block. After the Copyback, the read cnt of the SLC needs to be inherited to the new TLC block. In other words, the existing recycling can only recycle one SLC block at a time, while the Copyback operation can recycle three SLC blocks at a time.

[0070] In summary, the present invention performs different conditional processing on different Flashes; performs counting processing on all blocks in the Flash, thereby realizing effective and timely preventive processing; performs differentiated processing on different types of blocks (SLC, TLC, TAB) in the Flash, so that different types of blocks correspond to different threshold settings; and distinguishes different processing situations under different working states. Therefore, the present invention can significantly reduce the problem of data errors caused by read interference in the memory.

[0071] For the memory read disturbance prevention method provided in the above embodiment, the present invention provides a memory read disturbance prevention device, see Figure 5 A schematic diagram of the structure of a memory read disturbance prevention device is shown, the device comprises the following parts:

[0072] The information acquisition module 502 acquires the block type of the block to be tested in the memory, and determines the read disturbance judgment condition corresponding to the preset macro switch according to the block type, wherein the block type includes: data block and table block, the data block includes SLC and TLC, the table block includes: TAB, the macro switch is a conditional compilation tool in computer programming, and the read disturbance judgment condition includes: exceeding the maximum error threshold, error rereading and error soft solution;

[0073] The read / write recording module 504 records the number of reads corresponding to each block in the flash memory by using a preset read / write counter, wherein the flash memory includes multiple zones, each zone includes multiple blocks, each block includes multiple LO pages, and the zones, blocks, and LO pages are all units for managing data of different sizes inside the flash;

[0074] The read disturbance detection module 506 uses a macro switch to perform read disturbance detection on the block based on the block type, the working state of the block, the read disturbance judgment condition and the count value of the read / write counter corresponding to the block, and recycles the block according to the read disturbance detection result.

[0075] The memory read disturbance prevention device provided in the embodiment of the present application can significantly reduce the problem of data errors caused by read disturbance in the memory.

[0076] In one embodiment, when performing the step of performing read interference detection on a block by using a macro switch based on the block type, the working status of the block, the read interference judgment condition and the count value of the read-write counter corresponding to the block, the read interference detection module 506 is further used to: when the block type is an SLC data block and the SLC data block is an operating data block, use the macro switch to judge whether the SLC data block exceeds the maximum error threshold and whether an error reread is performed, and when the SLC data block satisfies any one of exceeding the maximum error threshold, error rereading and exceeding the recycling threshold, add the SLC data block to the recycling queue; when the block type is an SLC data block and the SLC data block is not an operating data block, use the macro switch to judge whether the SLC data block exceeds the maximum error threshold and whether an error reread is performed, and when the SLC data block satisfies any one of exceeding the maximum error threshold and error rereading, add a fast recycling threshold to the read-write counter corresponding to the SLC data block, so that the SLC data block quickly reaches the SLC forced idle operation read threshold.

[0077] In one embodiment, after performing the step of adding a fast recovery threshold to the read / write counter corresponding to the SLC data block, the read interference detection module 506 is further used to: compare the SLC data block after adding the fast recovery threshold to the read / write counter with the preset SLC entry idle read block threshold and the preset SLC entry forced idle operation read threshold through a macro switch; if the count value on the read / write counter is greater than the preset SLC entry forced idle operation read threshold, then add a forced idle process mark to the SLC data block; if the count value on the read / write counter is greater than the preset SLC entry idle read block threshold and less than the preset SLC entry forced idle operation read threshold, then add an idle process mark to the SLC data block.

[0078] In one embodiment, when performing the step of performing read interference detection on a block using a macro switch based on the block type, the working status of the block, the read interference judgment condition and the count value of the read-write counter corresponding to the block, the above-mentioned read interference detection module 506 is also used for: when the block type is a TLC data block, using the macro switch to judge whether the TLC data block has enabled error soft resolution, and when it is determined that the TLC data block has enabled error soft resolution, adding a fast recovery threshold to the read-write counter corresponding to the TLC data block, so that the TLC data block quickly reaches the TLC forced idle operation read threshold.

[0079] In one embodiment, after performing the step of adding a fast recovery threshold to the read / write counter corresponding to the TLC data block, the read interference detection module 506 is further used to: compare the TLC data block after adding the fast recovery threshold to the read / write counter with the preset TLC entry idle read block threshold and the preset TLC entry forced idle operation read threshold through a macro switch; if the count value on the read / write counter is greater than the preset TLC entry forced idle operation read threshold, then add a forced idle process mark to the TLC data block; if the count value on the read / write counter is greater than the preset TLC entry idle read block threshold and less than the preset TLC entry forced idle operation read threshold, then add an idle process mark to the TLC data block.

[0080] In one embodiment, when performing the step of performing read disturbance detection on a block by using a macro switch based on the block type, the working state of the block, the read disturbance judgment condition and the count value of the read / write counter corresponding to the block, the read disturbance detection module 506 is further used to: when the block type is a TAB table block and the TAB table block is a data block being operated, use the macro switch to judge whether the TAB table block exceeds the maximum error threshold and whether an error reread is performed, and when the TAB table block satisfies any one of exceeding the maximum error threshold, error rereading and exceeding the recycling threshold, place the page offset of the TAB table block to the last page to force replacement of the TAB table block; when the block type is a TAB table block and the TAB table block is not a data block being operated, use the macro switch to judge whether the TAB table block exceeds the maximum error threshold and whether an error reread is performed, and when the TAB table block satisfies any one of exceeding the maximum error threshold and error rereading, add a fast recycling threshold to the read / write counter corresponding to the TAB table block to enable the TAB table block to quickly reach the TAB forced idle operation read threshold.

[0081] In one embodiment, after performing the step of adding a fast recovery threshold to the read-write counter corresponding to the TAB table block, the read interference detection module 506 is further used to: compare the TAB table block after adding the fast recovery threshold to the read-write counter with the preset TAB entry idle read block threshold and the preset TAB entry forced idle operation read threshold through a macro switch; if the count value on the read-write counter is greater than the preset TAB entry forced idle operation read threshold, then add a forced idle process mark to the TAB table block; if the count value on the read-write counter is greater than the preset TAB entry idle read block threshold and less than the preset TAB entry forced idle operation read threshold, then add an idle process mark to the TAB table block.

[0082] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0083] An embodiment of the present invention provides a server. Specifically, the server includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned embodiments.

[0084] Figure 6 A structural diagram of a server provided in an embodiment of the present invention, the server 100 includes: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected via the bus 62; the processor 60 is used to execute an executable module stored in the memory 61, such as a computer program.

[0085] The memory 61 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0086] The bus 62 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0087] Among them, the memory 61 is used to store programs, and the processor 60 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0088] The processor 60 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 60. The above processor 60 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 61, and the processor 60 reads the information in the memory 61 and completes the steps of the above method in combination with its hardware.

[0089] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0090] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0091] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for preventing memory read disturbance, characterized in that: The method comprises: Obtaining a block type of a block to be tested in a memory, and determining a read disturbance judgment condition corresponding to a preset macro switch according to the block type, wherein the block type includes: a data block and a table block, the data block includes SLC and TLC, the table block includes: TAB, the macro switch is a conditional compilation tool in computer programming, and the read disturbance judgment condition includes: exceeding a maximum error threshold, error rereading, and error soft resolution; The read count of each block in the flash memory is recorded by a preset read / write counter, wherein the flash memory includes multiple zones, each zone includes multiple blocks, each block includes multiple LO pages, and the zones, blocks, and LO pages are all units for managing data of different sizes inside the flash; The macro switch is used to perform read disturbance detection on the block based on the block type, the working state of the block, the read disturbance determination condition and the count value of the read / write counter corresponding to the block, and the block is recycled according to the read disturbance detection result.

2. The memory read disturbance prevention method according to claim 1, characterized in that: The step of performing read disturbance detection on a block by using the macro switch based on the block type, the working state of the block, the read disturbance determination condition and the count value of the read / write counter corresponding to the block comprises: When the block type is an SLC data block and the SLC data block is an operating data block, the macro switch is used to determine whether the SLC data block exceeds a maximum error threshold and whether an error reread is required, and when the SLC data block satisfies any one of exceeding a maximum error threshold, error rereading, and exceeding a recycling threshold, the SLC data block is added to a recycling queue; When the block type is an SLC data block and the SLC data block is not a data block being operated, the macro switch is used to determine whether the SLC data block exceeds a maximum error threshold and whether an error reread is required. When the SLC data block satisfies any one of exceeding the maximum error threshold and error rereading, a fast recovery threshold is added to the read-write counter corresponding to the SLC data block so that the SLC data block quickly reaches the SLC forced idle operation read threshold.

3. The memory read disturbance prevention method according to claim 2, characterized in that: After the step of adding a fast recycling threshold to the read / write counter corresponding to the SLC data block, the method further includes: By means of the macro switch, the SLC data block after the fast recycling threshold is added to the read / write counter is compared with a preset SLC entering idle read block threshold and a preset SLC entering forced idle operation read threshold; If the count value on the read / write counter is greater than the preset SLC forced idle operation read threshold, adding a forced idle process mark to the SLC data block; If the count value on the read / write counter is greater than the preset SLC entering idle read block threshold and less than the preset SLC entering forced idle operation read threshold, an idle process mark is added to the SLC data block.

4. The memory read disturbance prevention method according to claim 1, characterized in that: The step of performing read disturbance detection on the block by using the macro switch based on the block type, the working state of the block, the read disturbance determination condition and the count value of the read / write counter corresponding to the block also includes: When the block type is a TLC data block, the macro switch is used to determine whether the TLC data block has enabled soft error resolution, and when it is determined that the TLC data block has enabled soft error resolution, a fast recovery threshold is added to the read and write counter corresponding to the TLC data block so that the TLC data block quickly reaches the TLC forced idle operation read threshold.

5. The method for preventing memory read disturbance according to claim 4, characterized in that: After the step of adding a fast recycling threshold to the read / write counter corresponding to the TLC data block, the method further comprises: By means of the macro switch, the TLC data block after the fast recycling threshold is added to the read / write counter is compared with a preset TLC entering idle read block threshold and a preset TLC entering forced idle operation read threshold; If the count value on the read / write counter is greater than the preset TLC forced idle operation read threshold, adding a forced idle process mark to the TLC data block; If the count value on the read / write counter is greater than the preset TLC entering idle read block threshold and less than the preset TLC entering forced idle operation read threshold, an idle process entry mark is added to the TLC data block.

6. The memory read disturbance prevention method according to claim 1, characterized in that: The step of performing read disturbance detection on the block by using the macro switch based on the block type, the working state of the block, the read disturbance determination condition and the count value of the read / write counter corresponding to the block also includes: When the block type is a TAB table block, and the TAB table block is a data block being operated, the macro switch is used to judge whether the TAB table block exceeds the maximum error threshold and whether an error reread is required, and when the TAB table block satisfies any one of exceeding the maximum error threshold, error rereading, and exceeding the recycling threshold, the page offset of the TAB table block is placed to the last page to forcibly replace the TAB table block; When the block type is a TAB table block and the TAB table block is not a data block being operated, the macro switch is used to determine whether the TAB table block exceeds a maximum error threshold and whether an error reread is required. When the TAB table block satisfies any one of exceeding the maximum error threshold and error rereading, a fast recovery threshold is added to the read-write counter corresponding to the TAB table block so that the TAB table block quickly reaches the TAB forced idle operation read threshold.

7. The method for preventing memory read disturbance according to claim 6, characterized in that: After the step of adding a fast recycling threshold to the read / write counter corresponding to the TAB table block, the method further comprises: By means of the macro switch, the TAB table block after the fast recycling threshold is added to the read / write counter is compared with a preset TAB entry idle read block threshold and a preset TAB entry forced idle operation read threshold; If the count value on the read / write counter is greater than the preset TAB entry forced idle operation read threshold, then adding an entry forced idle process mark to the TAB table block; If the count value on the read / write counter is greater than the preset TAB entry idle read block threshold and less than the preset TAB entry forced idle operation read threshold, an idle process entry mark is added to the TAB table block.

8. A memory read disturbance prevention device, characterized in that: The device comprises: An information acquisition module is used to acquire the block type of the block to be tested in the memory, and determine the read interference judgment condition corresponding to the preset macro switch according to the block type, wherein the block type includes: data block and table block, the data block includes SLC and TLC, the table block includes: TAB, the macro switch is a conditional compilation tool in computer programming, and the read interference judgment condition includes: exceeding the maximum error threshold, error rereading and error soft solution; The read / write record module records the number of reads corresponding to each block in the flash memory through a preset read / write counter, wherein the flash memory includes multiple zones, each zone includes multiple blocks, each block includes multiple LO pages, and the zones, blocks and LO pages are all units for managing data of different sizes inside the flash; The read disturbance detection module uses the macro switch to perform read disturbance detection on the block based on the block type, the working state of the block, the read disturbance judgment condition and the count value of the read / write counter corresponding to the block, and recycles the block according to the read disturbance detection result.

9. A server, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.