Storage medium data rereading method, system, terminal device and storage medium

By monitoring the data page type and bit data of the nand flash storage medium, the voltage threshold offset direction is determined, and the default voltage threshold is directly offset for data rereading, which solves the problem of inefficient data rereading in the prior art and improves data reading Success rate and efficiency.

CN112634973BActive Publication Date: 2025-01-07HEFEI ZHICUN MICROELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011610482.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-01-07
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

Data rereading using nand flash storage media in the prior art is inefficient, especially for data pages of single voltage threshold type, need to be rereaded through tentative voltage offsets, resulting in high time consumption and may not be able to successfully reread.

Method used

When monitoring data page reading errors, determine the data page type as a single voltage threshold type, obtain the number of 0 bit values ​​in the bit data, determine the offset direction of the voltage threshold based on the bit data, and offset the default voltage threshold according to the direction Data reread.

Benefits of technology

Improves the efficiency of data rereading, reduces rereading time, avoids tentative offsets, and ensures successful rereading of data in read errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112634973B_ABST
    Figure CN112634973B_ABST
Patent Text Reader

Abstract

The present invention discloses a data rereading method, system, terminal device and computer storage medium of a storage medium. When a data reading error is detected from a data page of a storage medium, the data page type of the data page is determined; if the data page type is determined to be a single voltage threshold type, the bit data of the data page is obtained, wherein the bit data includes the number of 0 bit values; the offset direction of the voltage threshold of the data page is determined according to the bit data, and the default voltage threshold of the data page is offset according to the offset direction to reread the data for the data page. Compared with the prior art, the present invention does not need to reread data by tentatively offsetting the voltage left and right according to the offset value, which saves the data rereading time and improves the data rereading efficiency in the case of data reading error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage devices, and in particular to a data rereading method and system for a storage medium, a terminal device and a computer storage medium. Background Art

[0002] Nowadays, when using nand flash (a type of flash memory) for data storage, the number of electrons in the floating gate structure of nand flash is often easily changed due to the influence of factors such as Read Distrub read disturbance, Program Distrub write disturbance, high and low temperature, and the number of erase and write times. In this way, when reading data from nand flash, the wrong bit flip caused by the electron change will cause data reading failure, and then it is necessary to trigger data rereading to re-read the data.

[0003] However, when rereading data pages of a single voltage threshold (the voltage threshold is the basic voltage threshold for the NAND flash to offset the voltage when rereading data), the existing data rereading method usually rereads the data by first offsetting the voltage threshold to the left according to a series of predetermined offset values. If it fails, the data is reread again by offsetting the voltage threshold to the right, and the attempts are repeated until the data is finally successfully reread. In this way, data rereading not only takes a lot of time to try, but also easily fails to reread successfully.

[0004] In summary, the existing data re-reading efficiency of single voltage threshold type data pages using NAND flash is low. Summary of the invention

[0005] The main purpose of the present invention is to provide a data rereading method, system, terminal device and computer storage medium for a storage medium, aiming to solve the technical problem of low data rereading efficiency for single voltage threshold type data pages using NAND flash.

[0006] To achieve the above object, the present invention provides a method for rereading data from a storage medium, the method comprising:

[0007] When an error is detected in reading data from a data page of a storage medium, determining a data page type of the data page;

[0008] If it is determined that the data page type is a single voltage threshold type, then obtaining bit data of the data page, wherein the bit data includes the number of 0 bit values;

[0009] The shift direction of the voltage threshold of the data page is determined according to the bit data, and the default voltage threshold of the data page is shifted according to the shift direction to re-read data for the data page.

[0010] Furthermore, the bit data also includes the maximum number of bits of the data page.

[0011] The step of determining the offset direction of the voltage threshold of the data page according to the bit data includes:

[0012] Detecting whether the number of the 0-bit values ​​is greater than half of the maximum number of bits;

[0013] When it is detected that the number of the 0-bit values ​​is greater than half of the maximum number of bits, determining that the shift direction of the voltage threshold of the data page is rightward shift;

[0014] When it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits, it is determined that the shift direction of the voltage threshold of the data page is shifted to the left.

[0015] Furthermore, the bit data also includes the number of 1-bit values,

[0016] The step of determining the offset direction of the voltage threshold of the data page according to the bit data further includes:

[0017] Detecting whether the number of the 0-bit values ​​is greater than the number of the 1-bit values;

[0018] When it is detected that the number of the 0-bit values ​​is greater than the number of the 1-bit values, determining that the shift direction of the voltage threshold of the data page is rightward shift;

[0019] When it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values, it is determined that the shift direction of the voltage threshold of the data page is shifted to the left.

[0020] Furthermore, the data rereading method of the storage medium further includes:

[0021] Bit data of a data page of a storage medium is counted, wherein the bit data at least includes the number of 0 bit values.

[0022] Furthermore, the step of counting the bit data of the data page of the storage medium includes:

[0023] When reading data from the data page of the storage medium, the number of 0-bit values ​​of the data read from the data page is counted in real time.

[0024] Furthermore, the step of shifting the default voltage threshold of the data page according to the shift direction to reread data for the data page includes:

[0025] Extracting preset reread parameters, wherein the reread parameters include one or more voltage offset values;

[0026] The default voltage threshold is offset according to the offset direction and the voltage offset value to re-read the data until the data is successfully read.

[0027] In addition, to achieve the above-mentioned purpose, the present invention further provides a data re-reading system for a storage medium, the data re-reading system for a storage medium comprising:

[0028] A determination module, configured to determine a data page type of the data page when an error is detected in reading data from a data page of a storage medium;

[0029] an acquisition module, configured to acquire bit data of the data page if it is determined that the data page type is a single voltage threshold type, wherein the bit data includes the number of 0 bit values;

[0030] The rereading module is used to determine the offset direction of the voltage threshold of the data page according to the bit data, and offset the default voltage threshold of the data page according to the offset direction to reread data for the data page.

[0031] Furthermore, the data re-reading system of the storage medium further comprises:

[0032] The statistical module is used to count the bit data of the data page of the storage medium, wherein the bit data at least includes the number of 0 bit values.

[0033] Each functional module of the data rereading system for storage medium of the present invention implements the steps of the data rereading method for storage medium as described above during operation.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a data rereading program for a storage medium stored on the memory and executable on the processor, wherein the data rereading program for the storage medium, when executed by the processor, implements the steps of the data rereading method for the storage medium as described above.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data rereading method of the storage medium as mentioned above are implemented.

[0036] The data rereading method and system for storage medium, terminal device and computer storage medium proposed in the present invention determine the data page type of the data page when an error is detected in reading data from a data page of the storage medium; if the data page type is determined to be a single voltage threshold type, the bit data of the data page is obtained, wherein the bit data includes the number of 0 bit values; the offset direction of the voltage threshold of the data page is determined according to the bit data, and the default voltage threshold of the data page is offset according to the offset direction to reread data for the data page.

[0037] The present invention, when a terminal device monitors that an error occurs when a master controller reads data from a data page of a storage medium, first determines the data page type of the data page, and then, when it is determined that the data page type is a single voltage threshold type containing only one voltage threshold, obtains bit data including the number of 0 bit values ​​in the data page, and finally, based on the bit data, determines the offset direction of the voltage threshold of the data page when the current trigger data reread is performed for the data page, thereby directly performing a data reread operation by offsetting the voltage threshold of the data page in the offset direction.

[0038] When an error occurs when reading data from a storage medium, the present invention obtains bit data including the number of 0 bit values ​​in the data page, and determines the offset direction of the voltage threshold of the data page according to the bit data, so that the data can be directly reread by offsetting the voltage threshold according to the determined offset direction. Compared with the prior art, the present invention does not need to reread data by tentatively offsetting the voltage left and right according to the offset value, which saves data rereading time and improves data rereading efficiency in the case of data reading errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the structure of the hardware operation of the terminal device involved in the embodiment of the present invention;

[0040] Figure 2 It is a flow chart of an embodiment of a method for rereading data from a storage medium according to the present invention;

[0041] Figure 3 It is a functional module schematic diagram of a data re-reading system for a storage medium of the present invention.

[0042] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0044] like Figure 1As shown, Figure 1 It is a structural diagram of the hardware operating environment of the terminal device involved in the embodiment of the present invention.

[0045] It should be noted that Figure 1 The terminal device of the embodiment of the present invention can be a device that uses nand flash for data storage, a data storage control terminal, a PC, a portable computer, a vehicle-mounted terminal, and other terminal devices.

[0046] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a non-volatile memory (such as a Flash memory), a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0047] Those skilled in the art will understand that Figure 1 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0048] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a distributed task processing program. The operating system is a program that manages and controls the hardware and software resources of the sample terminal device, and supports the operation of the distributed task processing program and other software or programs.

[0049] exist Figure 1 In the terminal device shown, the user interface 1003 is mainly used to communicate data with each terminal; the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; and the processor 1001 can be used to call the data rereading program of the storage medium stored in the memory 1005 and perform the following operations:

[0050] When an error is detected in reading data from a data page of a storage medium, determining a data page type of the data page;

[0051] If it is determined that the data page type is a single voltage threshold type, then obtaining bit data of the data page, wherein the bit data includes the number of 0 bit values;

[0052] The shift direction of the voltage threshold of the data page is determined according to the bit data, and the default voltage threshold of the data page is shifted according to the shift direction to re-read data for the data page.

[0053] Furthermore, the bit data also includes the maximum bit number of the data page. The processor 1001 may call a data rereading program of the storage medium stored in the memory 1005, and further perform the following operations:

[0054] Detecting whether the number of the 0-bit values ​​is greater than half of the maximum number of bits;

[0055] When it is detected that the number of the 0-bit values ​​is greater than half of the maximum number of bits, determining that the shift direction of the voltage threshold of the data page is rightward shift;

[0056] When it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits, it is determined that the shift direction of the voltage threshold of the data page is shifted to the left.

[0057] Furthermore, the bit data also includes the number of 1-bit values, and the processor 1001 may call a data rereading program of a storage medium stored in the memory 1005, and further perform the following operations:

[0058] Detecting whether the number of the 0-bit values ​​is greater than the number of the 1-bit values;

[0059] When it is detected that the number of the 0-bit values ​​is greater than the number of the 1-bit values, determining that the shift direction of the voltage threshold of the data page is rightward shift;

[0060] When it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values, it is determined that the shift direction of the voltage threshold of the data page is shifted to the left.

[0061] Further, the processor 1001 may call a data rereading program of the storage medium stored in the memory 1005, and further perform the following operations:

[0062] Bit data of a data page of a storage medium is counted, wherein the bit data at least includes the number of 0 bit values.

[0063] Further, the processor 1001 may call a data rereading program of the storage medium stored in the memory 1005, and further perform the following operations:

[0064] When reading data from the data page of the storage medium, the number of 0-bit values ​​of the data read from the data page is counted in real time.

[0065] Further, the processor 1001 may call a data rereading program of the storage medium stored in the memory 1005, and further perform the following operations:

[0066] Extracting preset reread parameters, wherein the reread parameters include one or more voltage offset values;

[0067] The default voltage threshold is offset according to the offset direction and the voltage offset value to re-read the data until the data is successfully read.

[0068] Based on the above structure, various embodiments of the data re-reading method of the storage medium of the present invention are proposed.

[0069] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a method for rereading data from a storage medium according to the present invention.

[0070] The embodiments of the present invention provide embodiments of a method for rereading data from a storage medium. It should be noted that although a logical sequence is shown in the flow chart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0071] The data rereading method of the storage medium in the embodiment of the present invention is applied to the above-mentioned terminal device. The terminal device in the embodiment of the present invention can be a device using NAND flash for data storage, a data storage control terminal, a PC, a portable computer, a vehicle-mounted terminal and other terminal devices, without specific limitation here.

[0072] The data rereading method of the storage medium in this embodiment includes:

[0073] Step S100, when an error is detected in reading data from a data page of a storage medium, determining a data page type of the data page;

[0074] It should be noted that, in the present embodiment, the data page type includes a single voltage threshold type and a multiple voltage threshold type. The data page of the single voltage threshold type has only one decision line, and the data page of the single voltage threshold type may specifically be SLCPage, MLCLowPage, TLCLowPage, etc., while the data page of the multiple voltage threshold type has two or more decision lines, and the data page of the multiple voltage threshold type may specifically be MLCPage, TLCPage, etc. In addition, among all the data pages in the same storage medium, the data page types of all the data pages may be only a single voltage threshold type or a multiple voltage threshold type, or the data page types of all the data pages may also include a single voltage threshold type and a multiple voltage threshold type at the same time, that is, the same storage medium has both a single voltage threshold type data page and a multiple voltage threshold type data page.

[0075] During the process of reading data from a data page of a storage medium through the master control of the storage medium, the terminal device continuously monitors whether an error occurs in the data reading operation, and when the error is detected, determines the data page read by the master control to which the error points, and determines whether the data page is a single voltage threshold type or a multi-voltage threshold type.

[0076] Furthermore, in this embodiment, the terminal device continuously monitors whether an error occurs in the data reading operation of the master control on the data page: an error is triggered when the data error correction mechanism encapsulated by the storage medium itself cannot successfully correct the erroneous data.

[0077] Specifically, for example, a terminal device uses nand flash as a storage medium to store, write and read data. The storage medium contains both single-voltage threshold type data pages and multi-voltage threshold type data pages. Thus, when the terminal device self-controls the main control of the storage medium and reads data from the single-voltage threshold type data page or the multi-voltage threshold type data page, it starts to monitor the data error correction mechanism encapsulated in the storage medium itself—ecc (Error Correcting Code) to see whether an error prompt is triggered when the data read by the main control is erroneous and the ecc cannot successfully correct the erroneous data. Then, when the terminal device detects the error prompt triggered by the ecc, it immediately determines the data page—SLCPage1—to which the main control performs the data reading operation pointed to by the error prompt, and synchronously determines whether the data page type of the data page—SLCPage1 is a single-voltage threshold type or a multi-voltage threshold type.

[0078] Step S200, if it is determined that the data page type is a single voltage threshold type, then obtaining bit data of the data page, wherein the bit data includes the number of 0 bit values;

[0079] It should be noted that, in this embodiment, the master control of the storage medium stores data on any data page by filling the corresponding bits with the values ​​​​"0" and "1". In this way, the terminal device uses the number of all 0 bit values ​​​​on the data page of the storage medium as one of the bit data of the data page.

[0080] When the terminal device detects that an error occurs in the data reading operation performed by the master control on the data page in the storage medium, and determines that the data page type of the data page pointed to by the error phenomenon is a single voltage threshold type, it immediately obtains the bit data that has been counted and includes at least the number of 0 bit values ​​on the data page.

[0081] Specifically, for example, when the terminal device monitors the main control that controls the storage medium and reads data from the data page of the storage medium, the data error correction mechanism encapsulated by the storage medium itself - ecc triggers an error prompt, and then determines that the data page - SLCPage1 on which the main control points to the error prompt to perform the data reading operation, and simultaneously determines that the data page type of the data page - SLCPage1 is a single voltage threshold type, the terminal device further extracts the number of all 0 bit values ​​- number a that have been counted on the data page - SLCPage1.

[0082] Furthermore, in a feasible embodiment, the data re-reading method of the storage medium of the present invention may further include:

[0083] Step A: counting bit data of a data page of a storage medium, wherein the bit data at least includes the number of 0 bit values.

[0084] The terminal device continuously monitors the process of the master controller reading data from the storage medium, and synchronously counts the bit data of each data page read by the master controller, and the terminal device at least counts the number of all 0 bit values ​​of each data page as the bit data.

[0085] It should be noted that, in this embodiment, since each data page of the storage medium contains a 1-bit value in addition to a 0-bit value, the terminal device can, while continuously monitoring the process of the master control reading data from the storage medium, of course, synchronously count the number of all 1-bit values ​​of each data page read by the master control as the bit data of the data page.

[0086] Furthermore, in a feasible embodiment, the above step A may include:

[0087] Step A1: when reading data from the data page of the storage medium, count the number of 0-bit values ​​of the data read from the data page in real time.

[0088] When the terminal device monitors the process of the master controller reading data from the storage medium, while the master controller reads data on a data page, the terminal device counts the number of all 0-bit values ​​of the data page in real time.

[0089] Furthermore, in another feasible embodiment, after the terminal device has counted the number of 0-bit values ​​of the data page, it can also store the number of 0-bit values ​​directly in the running memory, so that when it is detected that the data error correction mechanism of the storage medium triggers an error prompt, the number of 0-bit values ​​of the corresponding data page can be immediately extracted from the running memory, thereby improving the subsequent data rereading time for the data page and further improving the data rereading efficiency.

[0090] Specifically, for example, when the terminal device monitors the master control that controls the storage medium and reads data from the data page of the storage medium, when the master control reads data from the data page - SLCPage1, the terminal device counts the number a of all 0-bit values ​​possessed by the data page - SLCPage1 in real time, and then temporarily stores the number a in the running memory for call.

[0091] Furthermore, in another feasible embodiment, if the data error correction mechanism of the storage medium itself does not trigger an error during the entire process of the terminal device monitoring the master control reading data from the data page of the storage medium, then after the terminal device monitors that the master control has finished reading the data, it will automatically clear the number of all 0-bit values ​​​​in the data page stored in the running memory.

[0092] It should be noted that, in this embodiment, the data rereading method of the storage medium of the present invention only rereads data for the data page type of the single voltage threshold type in the storage medium. Therefore, when the terminal device determines that the data page read by the master control pointed to by the data error report has a data page type of multiple voltage threshold type, the terminal device immediately abandons obtaining the bit data of the data page and continues to monitor the process of the master control reading data from the data page of the storage medium.

[0093] Step S300 , determining a shift direction of a voltage threshold of the data page according to the bit data, and shifting a default voltage threshold of the data page according to the shift direction to re-read data for the data page.

[0094] After the terminal device obtains the bit data of the data page of the single voltage threshold type indicating an error phenomenon, it immediately determines the direction in which the default voltage threshold of the data page should be shifted to the left or right when performing a data reread operation on the data page, based on the number of all 0 bit values ​​of the data page included in the bit data. After determining the offset direction, the default voltage threshold of the data page can be directly offset in the offset direction, and the data page can be re-read to extract data.

[0095] It should be noted that, in this embodiment, the default voltage threshold of the data page is a voltage value determined by the storage medium based on the voltage when writing and storing data on the data page and used by default when reading data from the data page.

[0096] Furthermore, in a feasible embodiment, the bit data further includes the maximum bit number of the data page. In the above step S300, the step of “determining the offset direction of the voltage threshold of the data page according to the bit data” may include:

[0097] Step S301, detecting whether the number of the 0-bit values ​​is greater than half of the maximum number of bits;

[0098] It should be noted that, in this embodiment, the maximum number of bits of a data page is the total number of bits contained in data pages of different sizes. For example, the total number of bits of a data page of 16KB is: 16*1024*8. The terminal device obtains the size of the data page and calculates to obtain the maximum number of bits, and also uses the maximum number of bits as one of the bit data of the data page.

[0099] After obtaining the number of all 0-bit values ​​of the data page with the error phenomenon pointing to the single voltage threshold type, the terminal device further obtains the maximum bit number of the data page, and compares and detects the size relationship between the number of 0-bit values ​​and half of the maximum bit number.

[0100] Step S302, when it is detected that the number of the 0-bit values ​​is greater than half of the maximum number of bits, determining that the offset direction of the voltage threshold of the data page is rightward offset;

[0101] The terminal device compares the number of detected 0-bit values ​​with half of the maximum number of bits, and when it detects that the number of 0-bit values ​​is greater than half of the maximum number of bits, it determines that the default voltage threshold of the data page should be shifted to the right when performing a data reread operation on the data page.

[0102] Specifically, for example, when the terminal device monitors that the master of the storage medium reads data from the data page of the storage medium, the data error correction mechanism encapsulated in the storage medium itself - ecc triggers an error prompt, and determines that the data page - SLCPage1 on which the master performs a data reading operation pointed to by the error prompt, and simultaneously determines that the data page type of the data page - SLCPage1 is a single voltage threshold type, and further extracts the number of all 0-bit values ​​currently counted on the data page - SLCPage1 - the number a, and obtains the size of the data page - SLCPage1 - 16KB to calculate and determine that the maximum number of bits of the data page - SLCPage1 is: 16*1024*8. After that, the terminal device further detects the size relationship between the number a and half of the maximum number of bits 16*1024*8: 16*1024*8 / 2, so that when it is detected that the number a is greater than 16*1024*8 / 2, the terminal device immediately determines that when the data reread operation is currently being performed on the data page - SLCPage1, the data page - The default voltage threshold of SLCPage1 is shifted to the right.

[0103] Step S303 : when it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits, determining that the shift direction of the voltage threshold of the data page is shifted to the left.

[0104] The terminal device compares the number of detected 0-bit values ​​with half of the maximum number of bits, and when it detects that the number of 0-bit values ​​is less than half of the maximum number of bits, it determines that the default voltage threshold of the data page should be shifted to the right when performing a data reread operation on the data page.

[0105] Specifically, for example, when the terminal device further detects the size relationship between the number a and half of the maximum bit number 16*1024*8: 16*1024*8 / 2, if it is detected that the number a is less than 16*1024*8 / 2, the terminal device immediately determines that when performing a data reread operation on the data page - SLCPage1, the default voltage threshold of the data page - SLCPage1 should be shifted to the left.

[0106] Further, in another feasible embodiment, the bit data further includes the number of 1-bit values. In the above step S300, the step of “determining the offset direction of the voltage threshold of the data page according to the bit data” may further include:

[0107] Step S304, detecting whether the number of the 0-bit values ​​is greater than the number of the 1-bit values;

[0108] It should be noted that, in this embodiment, in addition to counting the number of all 1-bit values ​​of the data page in real time when the master reads the data page to extract data based on the same method as counting the number of all 0-bit values ​​of the data page, the terminal device can also calculate the number of all 1-bit values ​​of the data page by subtracting the number of 0-bit values ​​from the maximum number of bits through the number of all 0-bit values ​​of the data page obtained and the maximum number of bits of the data page. In addition, after obtaining the number of all 1-bit values ​​of the data page through statistics or calculation, the terminal device also uses the number of 1-bit values ​​as one of the bit data of the data page.

[0109] After obtaining the number of all 0-bit values ​​possessed by the data page of the single voltage threshold type whose error phenomenon points to the number of all 1-bit values ​​possessed by the data page, the terminal device further obtains the number of all 1-bit values ​​possessed by the data page, and compares and detects the relationship between the number of 0-bit values ​​and the number of 1-bit values.

[0110] Step S305, when it is detected that the number of the 0-bit values ​​is greater than the number of the 1-bit values, determining that the shift direction of the voltage threshold of the data page is rightward shift;

[0111] The terminal device compares the size relationship between the number of detected 0-bit values ​​and the number of 1-bit values, and when it detects that the number of 0-bit values ​​is greater than the number of 1-bit values, it determines that when performing a data reread operation on the data page, the default voltage threshold of the data page should be shifted to the right.

[0112] Specifically, for example, when the terminal device monitors that the master of the storage medium reads data from the data page of the storage medium, the data error correction mechanism encapsulated in the storage medium itself - ecc triggers an error prompt, and determines that the data page - SLCPage1 on which the master performs the data reading operation pointed to by the error prompt, and synchronously determines that the data page type of the data page - SLCPage1 is a single voltage threshold type, and further extracts the number of all 0-bit values ​​- number a that has been counted on the data page - SLCPage1, and obtains the size of the data page - SLCPage1 - 16KB to calculate and determine that the maximum bit number of the data page - SLCPage1 is: 16*1024*8, and uses the maximum bit number 16*1024*8 to subtract the number of all 0-bit values ​​- number a, to obtain the number of all 1-bit values ​​- number b on the data page - SLCPage1, the terminal device further detects the size relationship between the number a and the number b, so that when it is detected that the number a is greater than the number b When the terminal device immediately determines that when performing a data reread operation on the data page SLCPage1, the default voltage threshold of the data page SLCPage1 should be shifted to the right.

[0113] Step S306 : when it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values, determining that the shift direction of the voltage threshold of the data page is shifted to the left.

[0114] The terminal device compares the size relationship between the number of detected 0-bit values ​​and the number of 1-bit values, and when it detects that the number of 0-bit values ​​is less than the number of 1-bit values, it determines that when performing a data reread operation on the data page, the default voltage threshold of the data page should be shifted to the right.

[0115] Specifically, for example, when the terminal device further detects the size relationship between the number a and the number b, if it detects that the number a is smaller than the number b, the terminal device immediately determines that when performing a data reread operation on the data page - SLCPage1, the default voltage threshold of the data page - SLCPage1 should be shifted to the left.

[0116] Further, in a feasible embodiment, in the above step S300, the step of “shifting the default voltage threshold of the data page according to the shift direction to re-read data for the data page” may include:

[0117] Step S307, extracting preset re-read parameters, wherein the re-read parameters include one or more voltage offset values;

[0118] It should be noted that, in the present embodiment, the preset reread parameter is a voltage offset value of the default voltage threshold of the data page that should be offset to the left or right when the terminal device pre-configures the data reread operation for the data page. The voltage offset value may be one or more, that is, the reread parameter may only include a single voltage offset value indicating that the master control should offset the default voltage threshold to the left or right, or the reread parameter may also include multiple voltage offset values ​​to indicate that the master control sequentially offsets the default voltage threshold to the left or right. It should be understood that the voltage offset value may specifically be an empirical value determined by the production and development staff of the storage medium based on continuous test operations, or the voltage offset value may also be a data value automatically determined based on other feasible automatic algorithms. The data rereading method of the storage medium of the present invention does not limit the specific configuration and numerical value of the voltage offset value.

[0119] When the terminal device determines that a data reread operation is to be performed on the data page of the single voltage threshold type pointed to by the storage medium error correction mechanism error report, the default voltage threshold of the data page should be shifted to the left or right. The terminal device then further obtains a pre-configured reread parameter containing a voltage offset value indicating the default voltage threshold of the master control offset data page.

[0120] Step S308 , rereading data by offsetting the default voltage threshold according to the offset direction and the voltage offset value until the data is successfully read.

[0121] After the terminal device obtains the pre-configured reread parameters that instruct the master to offset the default voltage threshold of the data page when performing a data reread operation on the data page, if the reread parameters include multiple voltage offset values, the terminal device can read each voltage offset value in turn according to the determined offset direction to offset the default voltage threshold of the data page, and then re-read the data on the data page until the data is successfully read; or, if the reread parameters include a voltage offset value, the terminal device can read the voltage offset value in the determined offset direction to offset the default voltage threshold of the data page, and then re-read the data on the data page until the data is successfully read.

[0122] Specifically, for example, when the terminal device determines that a data reread operation is currently being performed on a data page - SLCPage1, the default voltage threshold of the data page - SLCPage1 should be shifted to the left, and after further obtaining the voltage offset value 1, voltage offset value 2...voltage offset value n configured in advance by the production developer based on the storage medium, the terminal device directly controls the master control of the storage medium to shift the default voltage threshold of the data page - SLCPage1 to the left by the voltage offset value 1, and then performs a data reread operation on the data page - SLCPage1 according to the voltage after the shift, and in the event of data reading failure, shifts the default voltage threshold to the left again by the voltage offset value 2, and then continues to perform a data reread operation on the data page - SLCPage1 according to the voltage after the shift, and repeats this cycle until the data reread operation is successful and the correct data is read.

[0123] In this embodiment, during the process of reading data from a data page of a storage medium through a master control of the storage medium, the terminal device continuously monitors whether an error occurs in the data reading operation, and when the error is detected, determines the data page read by the master control to which the error refers, and determines whether the data page is of a single voltage threshold type or a multiple voltage threshold type; when the terminal device monitors that an error occurs in the data reading operation performed by the master control on a data page in the storage medium, and determines that the data page type of the data page to which the error refers is of a single voltage threshold type, the terminal device immediately obtains bit data that has been counted and includes at least the number of 0 bit values ​​on the data page; after obtaining the bit data of the data page of the single voltage threshold type pointed to by the error, the terminal device immediately determines, according to the number of all 0 bit values ​​of the data page included in the bit data, the direction in which the default voltage threshold of the data page should be shifted to the left or right when a data reread operation is currently performed on the data page, so that after determining the shift direction, the default voltage threshold of the data page can be directly shifted according to the shift direction, and then the data page can be re-read to extract data.

[0124] When an error occurs when reading data from a storage medium, the present invention obtains bit data including the number of 0 bit values ​​in the data page, and determines the offset direction of the voltage threshold of the data page according to the bit data, so that the data can be directly reread by offsetting the voltage threshold according to the determined offset direction. Compared with the prior art, the present invention does not need to reread data by tentatively offsetting the voltage left and right according to the offset value, which saves data rereading time and improves data rereading efficiency in the case of data reading errors.

[0125] In addition, please refer to Figure 3The embodiment of the present invention further provides a data re-reading system for a storage medium. The data re-reading system for a storage medium of the present invention comprises:

[0126] A determination module, configured to determine a data page type of the data page when an error is detected in reading data from a data page of a storage medium;

[0127] an acquisition module, configured to acquire bit data of the data page if it is determined that the data page type is a single voltage threshold type, wherein the bit data includes the number of 0 bit values;

[0128] The rereading module is used to determine the offset direction of the voltage threshold of the data page according to the bit data, and offset the default voltage threshold of the data page according to the offset direction to reread data for the data page.

[0129] Preferably, the data re-reading system of the storage medium further comprises:

[0130] The statistical module is used to count the bit data of the data page of the storage medium, wherein the bit data at least includes the number of 0 bit values.

[0131] Preferably, the bit data further includes the maximum number of bits of the data page, and the re-read module includes:

[0132] A first detection unit, used to detect whether the number of the 0 bit values ​​is greater than half of the maximum number of bits;

[0133] A first determining unit, configured to determine that the shift direction of the voltage threshold of the data page is rightward when detecting that the number of the 0-bit values ​​is greater than half of the maximum number of bits;

[0134] The second determining unit is configured to determine that the shift direction of the voltage threshold of the data page is leftward when it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits.

[0135] Preferably, the bit data further includes the number of 1-bit values, and the re-read module further includes:

[0136] A second detection unit, configured to detect whether the number of the 0-bit values ​​is greater than the number of the 1-bit values;

[0137] a third determining unit, configured to determine that the shift direction of the voltage threshold of the data page is rightward when detecting that the number of the 0-bit values ​​is greater than the number of the 1-bit values;

[0138] The fourth determining unit is configured to determine that the shift direction of the voltage threshold of the data page is a leftward shift when it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values.

[0139] Preferably, the statistical module is further used for counting the number of 0-bit values ​​of the data read from the data page of the storage medium in real time when reading data from the data page.

[0140] Preferably, the rereading module further includes:

[0141] An extraction unit, configured to extract a preset reread parameter, wherein the reread parameter includes one or more voltage offset values;

[0142] The rereading unit is used to reread the data by offsetting the default voltage threshold according to the offset direction and the voltage offset value until the data is successfully read.

[0143] The steps implemented by the functional modules of the data rereading system of the storage medium of the present invention during operation can refer to the above-mentioned embodiment of the data rereading method of the storage medium of the present invention, and will not be described in detail here.

[0144] In addition, an embodiment of the present invention also proposes a terminal device, which includes: a memory, a processor, and a data rereading program for a storage medium stored on the memory and executable on the processor, wherein the data rereading program for the storage medium implements the steps of the data rereading method for the storage medium as described above when executed by the processor.

[0145] The steps implemented when the data rereading program of the storage medium running on the processor is executed can refer to the various embodiments of the data rereading method of the storage medium of the present invention, and will not be described in detail here.

[0146] In addition, an embodiment of the present invention further proposes a computer storage medium, which is applied to a computer. The computer storage medium can be a non-volatile computer-readable computer storage medium, and a data rereading program of the storage medium is stored on the computer storage medium. When the data rereading program of the storage medium is executed by a processor, the steps of the data rereading method of the storage medium as described above are implemented.

[0147] The steps implemented when the data rereading program of the storage medium running on the processor is executed can refer to the various embodiments of the data rereading method of the storage medium of the present invention, and will not be described in detail here.

[0148] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0149] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer storage medium (such as Flash memory, ROM / RAM, disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0151] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for rereading data from a storage medium, characterized in that: The data rereading method of the storage medium comprises: When an error is detected in reading data from a data page of a storage medium, determining a data page type of the data page; If it is determined that the data page type is a single voltage threshold type, then obtaining bit data of the data page, wherein the bit data includes the number of 0 bit values; Determining a shift direction of a voltage threshold of the data page according to the bit data, and shifting a default voltage threshold of the data page according to the shift direction to reread data for the data page; The bit data further includes the maximum bit number of the data page, and the step of determining the offset direction of the voltage threshold of the data page according to the bit data includes: Detecting whether the number of the 0-bit values ​​is greater than half of the maximum number of bits; When it is detected that the number of the 0-bit values ​​is greater than half of the maximum number of bits, determining that the shift direction of the voltage threshold of the data page is rightward shift; When it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits, determining that the shift direction of the voltage threshold of the data page is shifted to the left; The bit data further includes the number of 1-bit values, and the step of determining the offset direction of the voltage threshold of the data page according to the bit data further includes: Detecting whether the number of the 0-bit values ​​is greater than the number of the 1-bit values; When it is detected that the number of the 0-bit values ​​is greater than the number of the 1-bit values, determining that the shift direction of the voltage threshold of the data page is rightward shift; When it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values, it is determined that the shift direction of the voltage threshold of the data page is shifted to the left.

2. The method for rereading data from a storage medium according to claim 1, wherein: The data rereading method of the storage medium also includes: Bit data of a data page of a storage medium is counted, wherein the bit data at least includes the number of 0 bit values.

3. The method for rereading data from a storage medium according to claim 2, wherein: The step of counting the bit data of the data page of the storage medium includes: When reading data from the data page of the storage medium, the number of 0-bit values ​​of the data read from the data page is counted in real time.

4. The method for rereading data from a storage medium according to claim 1, wherein: The step of shifting the default voltage threshold of the data page according to the shift direction to re-read data for the data page includes: Extracting preset reread parameters, wherein the reread parameters include one or more voltage offset values; The default voltage threshold is offset according to the offset direction and the voltage offset value to re-read the data until the data is successfully read.

5. A data re-reading system for a storage medium, characterized in that: The data re-reading system of the storage medium comprises: A determination module, configured to determine a data page type of the data page when an error is detected in reading data from a data page of a storage medium; an acquisition module, configured to acquire bit data of the data page if it is determined that the data page type is a single voltage threshold type, wherein the bit data includes the number of 0 bit values; a rereading module, configured to determine a shift direction of a voltage threshold of the data page according to the bit data, and shift a default voltage threshold of the data page according to the shift direction to reread data for the data page; The bit data also includes the maximum number of bits of the data page, and the reread module includes: A first detection unit, used to detect whether the number of the 0 bit values ​​is greater than half of the maximum number of bits; A first determining unit, configured to determine that the shift direction of the voltage threshold of the data page is rightward when detecting that the number of the 0-bit values ​​is greater than half of the maximum number of bits; A second determining unit is configured to determine that the shift direction of the voltage threshold of the data page is a leftward shift when it is detected that the number of the 0-bit values ​​is not greater than half of the maximum number of bits; The bit data further includes the number of 1-bit values, and the re-read module further includes: A second detection unit, configured to detect whether the number of the 0-bit values ​​is greater than the number of the 1-bit values; a third determining unit, configured to determine that the shift direction of the voltage threshold of the data page is rightward when detecting that the number of the 0-bit values ​​is greater than the number of the 1-bit values; The fourth determining unit is configured to determine that the shift direction of the voltage threshold of the data page is a leftward shift when it is detected that the number of the 0-bit values ​​is not greater than the number of the 1-bit values.

6. The data re-reading system for a storage medium according to claim 5, characterized in that: The data re-reading system of the storage medium further comprises: The statistical module is used to count the bit data of the data page of the storage medium, wherein the bit data at least includes the number of 0 bit values.

7. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a data rereading program for a storage medium stored in the memory and executable on the processor. When the data rereading program for the storage medium is executed by the processor, the steps of the data rereading method for the storage medium as described in any one of claims 1 to 4 are implemented.

8. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data rereading method of the storage medium according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Data reading method and device, storage medium and equipment

    CN111145820A