Flash memory-based data processing method, data processing equipment and storage medium
By obtaining the error correction data of the flash memory's error correction success page for soft decoding, the problem of limited ECC error correction capability is solved and the reliability of data error correction is improved.
Patent Information
- Application Number
- CN202411988766.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, ECC has limited error correction capabilities and cannot effectively process flash memory pages whose number of errors exceeds the error correction capabilities, resulting in low reliability of data error correction.
By obtaining the error correction data of the error correction successful page adjacent to the error correction failure page of the flash memory, soft decoding process is performed to identify and correct the error data bits of the error correction failure page, reduce the number of errors in bits, and thus improve the error correction ability of ECC.
It effectively reduces the number of errors that ECC needs to correct, so that the flash memory page with error information exceeding the ECC error correction capability can perform ECC error correction processing, thereby improving the reliability of data error correction.
Smart Images

Figure CN119806890A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of flash memory technology, and in particular to a data processing method, data processing device, and storage medium based on flash memory. Background Art
[0002] In the field of data storage, Error Checking and Correction (ECC), as an important error correction technology, is widely used in various storage systems to improve data integrity and reliability. ECC adds redundant information to detect and correct errors that may occur during data storage or transmission, thereby ensuring data accuracy.
[0003] However, ECC's error correction capability depends on the number of redundant bits implemented in its algorithm design. Different ECC algorithms and configurations have different error correction capabilities. Regardless of the algorithm and configuration, ECC's error correction range is limited. When the number of errors exceeds this range, ECC cannot correct them and can only report an error, resulting in low data error correction reliability.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a data processing method, data processing device and storage medium based on flash memory, aiming to solve the technical problem of low reliability of data error correction.
[0006] To achieve the above objectives, the present application proposes a data processing method based on flash memory, comprising:
[0007] Acquire an error correction failure page of the flash memory after error detection and correction processing is performed, and acquire an error correction success page adjacent to the error correction failure page;
[0008] Determine the corrected data of the corrected page is the corresponding target data in the failed correction page;
[0009] Perform soft decoding on the target data based on the corrected data and a preset decoding algorithm to identify and correct the erroneous data bits of the error-correction-failed pages, thereby reducing the number of bit errors in the error-correction-failed pages.
[0010] Error detection and correction processing is performed based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page.
[0011] In one embodiment, before determining the target data corresponding to the corrected data of the corrected page in the failed page, the method further includes:
[0012] Obtain the corrected page data of the successfully corrected page and the uncorrected page data before correction;
[0013] Based on the error-corrected page data and the uncorrected page data, the error-corrected data of the page with successful error correction is determined.
[0014] In one embodiment, the step of determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data includes:
[0015] Determine an exclusive OR result of the error-corrected page data and the uncorrected page data;
[0016] Generate error bit information of the error-corrected page based on the XOR result, and set the error bit information as error-corrected data; or
[0017] The error-corrected page data and the uncorrected page data are input into a preset error correction model to obtain error bit information of the error-corrected page, and the error bit information is set as the error-corrected data.
[0018] In one embodiment, before the step of determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data, the method further includes:
[0019] Writing the error-corrected page data and the uncorrected page data into a temporary storage area;
[0020] The step of determining the corrected data of the corrected page based on the corrected page data and the uncorrected page data is performed based on the temporary storage area.
[0021] In one embodiment, the steps of obtaining an error correction failure page of a flash memory after error detection and correction processing is performed, and obtaining an error correction success page adjacent to the error correction failure page include:
[0022] Obtaining storage page error correction information generated by an error correction module of the flash memory;
[0023] Determining a page where error correction fails based on an error correction result of the stored page error correction information;
[0024] At least one successful error correction page adjacent to the failed error correction page is obtained.
[0025] In one embodiment, the step of obtaining at least one corrected page adjacent to a corrected page includes:
[0026] Determine the storage block where the page failing error correction is located;
[0027] At least one error correction successful page adjacent to the error correction failed page is obtained in the storage block.
[0028] In one embodiment, after the step of performing soft decoding processing on the target data according to the error-corrected data and a preset decoding algorithm, the method further includes:
[0029] Get the number of errors on the page where error correction failed;
[0030] If the number of errors is less than or equal to the preset number associated with the error detection and correction process, the step of performing error detection and correction based on the error correction failure page after the soft decoding process to obtain a corrected target error correction success page is performed.
[0031] In one embodiment, after performing error detection and correction based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page, the following steps are further included:
[0032] Get the verification information of the target error correction success page;
[0033] If the verification information indicates that the verification is passed, the target error correction success page is updated to the flash memory, or the error correction status corresponding to the target error correction success page in the flash memory is updated.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a data processing device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the flash memory-based data processing method as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the flash memory-based data processing method as described above are implemented.
[0036] One or more technical solutions proposed in this application have at least the following technical effects:
[0037] When there is a failed correction page in the flash memory storage page whose number of errors exceeds the ECC error correction capability, the successful correction page adjacent to the failed correction page with successful error correction is obtained, and the corrected data of the successful correction page is read, so that the failed correction page is soft-decoded by the corrected data, so as to identify the erroneous data bits of the failed correction page by using the known error data of pages with similar structures and perform error correction processing, thereby reducing the number of errors that need to be corrected by ECC, and enabling the flash memory storage page whose error information exceeds the ECC error correction capability to perform ECC error correction processing, thereby improving the data error correction reliability of the flash memory storage page. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 A flowchart of the first embodiment of the flash memory-based data processing method provided by the present application;
[0041] Figure 2 A flowchart of a second embodiment of the flash memory-based data processing method of the present application is provided;
[0042] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the flash memory-based data processing method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0045] The main solution of the embodiment of the present application is: obtaining an error correction failure page of the flash memory after error detection and correction processing is performed, and obtaining an error correction success page adjacent to the error correction failure page;
[0046] Determine the corrected data of the corrected page is the corresponding target data in the failed correction page;
[0047] Performing soft decoding on the target data based on the corrected data and a preset decoding algorithm to identify and correct the erroneous data bits of the error-correction-failed pages, thereby reducing the number of bit errors in the error-correction-failed pages.
[0048] Error detection and correction processing is performed based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page.
[0049] During the production and use process, NAND Flash may generate bad blocks or bad columns. These bad blocks or bad columns may be caused by production defects, charge leakage, physical damage, and other reasons. When NAND Flash dynamically generates consecutive bad columns during operation (errors occur simultaneously on multiple data bits), it can significantly affect the error correction capability. Among them, LDPC codes (Low Density Parity-check Codes) use a check matrix for error correction. When the number of error bits is large and distributed continuously, the check matrix may not be able to effectively identify and correct these errors, resulting in a decrease in error correction capability and reduced data error correction reliability.
[0050] When using ECC for error correction, regardless of the algorithm and configuration, the ECC error correction range is limited. When the number of errors exceeds this range, ECC cannot correct them and can only report errors, resulting in low data error correction reliability.
[0051] The present application provides a solution. When there is too much erroneous data and a flash memory storage page cannot be processed by ECC, the successful error correction page adjacent to the failed error correction page is first obtained, and the corresponding data in the failed error correction page is soft-decoded based on the corrected data of the successful error correction page, thereby reducing the number of errors that need to be corrected by ECC, so that the flash memory storage page whose error information exceeds the ECC correction capability can be processed by ECC, thereby improving the data error correction reliability of the flash memory storage page.
[0052] It should be noted that ECC primarily uses the principle of redundant coding to implement data error detection and correction. Specifically, when data is written to ECC memory, the ECC logic uses a specific algorithm to calculate a checksum based on the data bits. This calculated checksum is stored in an additional check bit. When data is read from ECC memory, the ECC logic recalculates the required checksum based on the read data bits. This calculated checksum is then compared with the checksum stored in memory. If the two checksums do not match, an error occurred during data storage or transmission. The ECC logic then triggers an error detection mechanism to determine whether an error has occurred. If an error is detected, the ECC logic uses a specific algorithm to locate the error, typically by comparing the values of different check bits and the relationship between them. Once the error location is determined, the ECC logic automatically corrects the error, flipping the erroneous bit to the correct value. The corrected data is then rewritten to memory to ensure data accuracy and integrity.
[0053] Furthermore, the ECC error correction process is typically performed immediately during data reading, and its error correction capability is determined by a specific algorithm and the design of redundant check bits. ECC error correction relies on comparing the checksum calculated during reading with the stored checksum to detect and correct errors. Therefore, ECC error correction is a real-time process and cannot be performed in batches. That is, when the number of data errors exceeds the ECC error correction capability, ECC error correction will not be performed on the page data in batches. Implementing batch error correction requires complex technical support, including how to determine which errors can be corrected first, which ones need to be left for subsequent processing, and how to ensure that new errors are not introduced during subsequent processing. These technical difficulties make batch error correction impractical in practical applications. Moreover, each error correction process consumes time and resources, and interruptions or errors in the error correction process can result in data loss or corruption.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device or data processing device capable of performing the above functions. The following describes this embodiment and the following embodiments using a data processing device as an example.
[0056] Based on this, the embodiment of the present application provides a data processing method based on flash memory, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the flash memory-based data processing method of the present application.
[0057] In this embodiment, the data processing method based on the flash memory includes steps S10 to S40:
[0058] Step S10 , obtaining an error correction failure page of the flash memory after error detection and correction processing is performed, and obtaining an error correction success page adjacent to the error correction failure page.
[0059] It should be noted that error detection and correction refers to ECC error correction processing, hereinafter referred to as ECC error correction processing. Error correction failure pages are flash memory storage pages that ECC cannot successfully correct. During the data reading process, due to various reasons (such as physical damage, electromagnetic interference, etc.), the number of error bits in the data exceeds the error correction capability of ECC, and therefore ECC cannot effectively correct them. Error correction success pages are flash memory storage pages that have been successfully corrected by ECC.
[0060] In this embodiment, when consecutive bad columns appear in the flash memory, the same bad columns appear on all pages within the entire block. Therefore, when data is written to a flash memory page, it must undergo ECC error correction. Obtaining a flash memory page that has failed to undergo ECC error correction indicates that the data error information on some flash memory data pages within the consecutive bad columns exceeds the ECC error correction capability. Therefore, to ensure that the page that failed to undergo ECC error correction can undergo ECC error correction, it is necessary to have the same physical structure / storage structure as the page that failed to undergo error correction, or to have adjacent pages that are logically arranged in a continuous manner. This allows the page that failed to undergo ECC error correction to be soft-decoded by adjacent pages that have successfully undergone ECC error correction, thereby reducing the amount of error information during subsequent ECC processing.
[0061] Specifically, the error correction information of each flash memory storage page fed back by the detection module can be read to determine which flash memory storage pages are error correction failure pages and which are error correction success pages. Then, based on the determined information, the error correction failure page is read, and at the same time, the error correction success page adjacent to the error correction failure page is obtained based on the error correction failure page. The number of error correction success pages obtained can be set based on actual needs. The more adjacent error correction success pages are obtained, the better the effect of soft decoding processing of the error correction failure page based on the error correction success page, and the higher the corresponding data error correction reliability. Therefore, after obtaining the error correction failure page, it is necessary to obtain at least one page of error correction success page adjacent to the error correction failure page, so as to perform soft decoding processing on the error correction failure page based on the adjacent error correction success page.
[0062] Adjacent pages refer to one or more adjacent flash memory storage pages in the same block. For example, if the page number of the error correction failure page is 5, its adjacent error correction success pages can be pages 4 and 6, or pages 1-4, 6-10, or more.
[0063] Optionally, data integrity verification can also be performed using redundant data (such as checksums, hash values) when writing data to each flash memory storage page. If the redundant data is consistent with the decoded data, the page data is judged to have been successfully corrected; if not, the correction is judged to have failed.
[0064] Step S20 , determining target data corresponding to the corrected data of the corrected page in the corrected page in the error correction failure state.
[0065] It should be noted that the corrected data can be used as soft-decoding data, and auxiliary soft-decoding processing can be performed on the data of the page where error correction failed. The corrected data includes the data bits of the successfully corrected bits and padding value information. Since the corrected page and the failed page are adjacent pages, their storage structure and data error locations are relatively similar. Therefore, the data bits of the corrected data are mapped to the corresponding target data in the failed page, and soft decoding processing is performed based on the target data. The target data refers to the data that is located at the same location on the data storage page as the corrected data or at an associated location between storage pages.
[0066] In this embodiment, because the storage structures of adjacent flash memory data pages are similar, the location of the corrected data on the ECC error-correcting page can be used to directly determine the target data at the same location or at a location with a mapping relationship on the ECC failure page. For example, if the corrected data is located at the third data bit of the corrected page, the corresponding target data is the third data bit of the failed page, or the nth data bit that is associated with the third data bit.
[0067] Step S30 , performing soft decoding processing on the target data according to the error-corrected data and a preset decoding algorithm.
[0068] It should be noted that soft decoding involves using corrected data as soft-decoded data to identify target data, i.e., corrected data. The soft-decoded data informs the pre-set decoding algorithm, which then identifies and attempts to correct erroneous data bits in pages where correction failed, thereby reducing the number of erroneous bits in those pages.
[0069] In this embodiment, the data processing device utilizes this soft-decoded data and a pre-set soft-decoding algorithm (such as a probability-based decoding algorithm, an iterative decoding algorithm, etc.) to perform an in-depth analysis of the target data in the error-correction-failed page. The soft-decoding algorithm attempts to more accurately determine the correctness of each target data piece based on the soft decoding, and attempts to recover errors that the initial ECC decoding failed to correct, i.e., identify and correct some erroneous data bits. These corrected data bits are then updated back to the error-correction-failed page, thereby reducing the number of erroneous bits in that page. Therefore, by performing soft-decoding on the target data, it is possible to identify and correct erroneous data bits in the error-correction-failed page, thereby reducing the number of erroneous bits in the error-correction-failed page.
[0070] This embodiment performs soft decoding processing on target data that needs to be soft decoded in the error correction failure page through a preset algorithm, thereby reducing the number of errors in the error correction failure page and improving the reliability of subsequent ECC error correction processing on the error correction failure page.
[0071] Step S40 , performing error detection and correction processing based on the error correction failure page after the soft decoding processing, to obtain a corrected target error correction success page.
[0072] In this embodiment, after soft decoding of pages that failed to be corrected, the number of errors that need to be corrected by the ECC is reduced, allowing flash memory pages with error information exceeding the ECC error correction capability to undergo ECC error correction, ultimately resulting in a target page with successful error correction. Based on this, when dealing with consecutive bad columns in flash memory, soft decoding of pages with a high number of failed error information is performed using data from adjacent successfully corrected pages to reduce the number of errors, allowing these failed pages to undergo subsequent ECC correction, thereby improving data error correction reliability.
[0073] It is understandable that all error correction failure pages can be processed using the current processing method. If consecutive error correction failure pages appear, such as flash memory storage pages with page numbers 5-10 are all error correction failure pages, the error correction failure page with page number 5 can be corrected based on the error correction success page with page number 4, or page numbers 1-4. Then, after the error correction failure page with page number 5 completes the ECC error correction process and becomes an error correction success page, the error correction failure pages with subsequent page numbers are processed. This process is repeated until all flash memory data pages in the block have completed the ECC error correction process, thereby improving data write efficiency and data error correction reliability.
[0074] This embodiment provides a data processing method based on a flash memory. When continuous bad columns occur in the flash memory, if a correction failure page whose number of errors exceeds the ECC correction capability is obtained, a correction success page adjacent to the correction failure page whose errors are successfully corrected is directly obtained, and the corrected data of the correction success page is read, so that the correction failure page is soft-decoded using the corrected data and a preset decoding algorithm, thereby reducing the number of errors that need to be corrected by the ECC, so that the flash memory storage page whose error information exceeds the ECC correction capability can be corrected by the ECC, and finally the target correction success page is obtained after correction, thereby improving the data error correction reliability of the flash memory storage page.
[0075] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction, and no further details will be given later. On this basis, when performing error correction processing on the error-corrected data of the error-corrected page, it is necessary to first determine the content of the error-corrected data. Therefore, please refer to Figure 2 Before step S20, the data processing method based on the flash memory further includes steps S50 to S60:
[0076] Step S50 , obtaining the corrected page data of the successfully corrected page and the uncorrected page data before error correction.
[0077] In this embodiment, the corrected page data includes the data bits and padding value information of the successfully corrected bit data. The uncorrected page data refers to data that has not yet been processed or checked by the ECC algorithm during data storage or transmission. In this embodiment, by comparing the corrected page data after ECC correction processing with the uncorrected page data before ECC correction processing, the bit data at which positions have changed can be determined, and the changed data can be used as the corrected data.
[0078] Specifically, the corrected page data of the current successfully corrected page can be directly read, while the uncorrected page data before correction can be obtained through the ECC correction history record. By obtaining the corrected and uncorrected page data, it is possible to accurately determine which data has changed, so that the changed data can be used to optimize the processing of the page where correction failed.
[0079] Step S60 , determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data.
[0080] In this embodiment, the corrected data of the successfully corrected page can be found from the corrected page data and the uncorrected page data by using ECC error location methods, wherein the ECC error location methods may include XOR operation, error correction table query, large model query, and algorithm decoding.
[0081] Specifically, when determining the corrected data for a successfully corrected page, the uncorrected page data and the corrected page data can be compared, and the corrected data can be determined based on the difference between the two. Alternatively, two different page data can be input into a large model, and the difference information can be analyzed based on the large model, and the corrected data can be determined based on the difference information. After obtaining the corrected data, the processing action of step S20 is executed.
[0082] Alternatively, in addition to determining corrected data using corrected and uncorrected page data, corrected data can also be determined by querying an error correction table. Specifically, during ECC error correction, the ECC algorithm typically generates an error correction code table containing all possible error patterns and their corresponding error correction codes. Therefore, after receiving a successfully corrected page, the error correction code table can be directly searched to locate the changed data based on the received error correction table. This table lookup improves computational efficiency.
[0083] Based on this, by obtaining the corrected page data and uncorrected page data of the successfully corrected page, the corrected data is calculated through the difference information between the two page data, thereby improving the accuracy of the corrected data, and then improving the effect of soft decoding processing on the failed correction page based on the corrected data, thereby improving the reliability of error correction.
[0084] Based on the above-mentioned second embodiment, in the third embodiment of the present application, step S60 may include: determining the XOR result of the corrected page data and the uncorrected page data, then generating the error bit information of the successfully corrected page based on the XOR result, and setting the error bit information to the corrected data.
[0085] In this embodiment, by performing an XOR check on the corrected page data and the uncorrected page data, the differences between the two pages of data are extracted. The XOR process includes comparing each bit in the two pages of data bit by bit. If the values at a certain bit are different (i.e., one is 0 and the other is 1), the XOR result at that bit is 1. If the values at a certain bit are the same (i.e., both are 0 or both are 1), the XOR result at that bit is 0. Based on this, an XOR result of 0 or 1 corresponding to each data bit in the current corrected page is obtained. Among them, the error bit information is the result of the data bit being 1 in the XOR result, that is, the data of this data bit is erroneous and has been corrected by ECC. Finally, the error bit information is set as the corrected data so that the error bit information can be used to perform soft decoding processing on the page where error correction failed. Therefore, by performing an XOR operation on the uncorrected page data and the corrected page data (which already contains the ECC correction result), the location of the error can be effectively revealed.
[0086] Optionally, in step S60, the process of determining the corrected data based on the corrected page data and the uncorrected page data may also include: inputting the corrected page data and the uncorrected page data into a preset error correction model to obtain error bit information of the successfully corrected page, and then setting the error bit information as the corrected data.
[0087] Specifically, a machine learning model is trained to learn the characteristics and error patterns of ECC codes. After receiving a successfully corrected page, the model inputs the corrected page data containing the error correction data and the uncorrected page data. The model then outputs a decoding result, which includes the error bit information of the successfully corrected page. While this approach requires a large amount of training data and computing resources, it offers higher decoding performance and lower error rates, effectively improving error correction reliability.
[0088] This embodiment improves the accuracy of the calculated corrected data by performing XOR processing on the uncorrected page data and the corrected page data, or performing processing based on a large model, thereby reducing subsequent data processing time.
[0089] Based on the second embodiment described above, in the fourth embodiment of the present application, in the process of calculating the corrected data based on the corrected page data and the uncorrected page data, since the data has already been written to the flash memory, once the data is written to a block, the entire block needs to be erased to rewrite the new data. At the same time, flash memory chips generally do not contain sufficient computing resources to perform complex data processing tasks. Performing data calculations within the flash memory may significantly affect the performance of the storage device, including increasing read and write latency, reducing throughput, and increasing power consumption. To avoid these performance issues, data calculations are generally not performed within the flash memory.
[0090] Therefore, in this embodiment, after the corrected page data and the uncorrected page data are acquired in step S50, and before the corrected data is determined based on the corrected page data and the uncorrected page data in step S60, the corrected page data and the uncorrected page data need to be written into a temporary storage area, and then the action of step S60 is performed in the temporary storage area.
[0091] For example, after reading the corrected page data of the successfully corrected page, the data is written to RAM (Random Access Memory) via NAND Flash Bypass, which is equivalent to obtaining the completely correct data when the data was written to the Flash. At the same time, the uncorrected page data is written to RAM. Finally, when executing step S60, the completely correct data in RAM (corrected page data) can be XORed with the data read from the uncorrected page data to obtain the error status of the successfully corrected page, that is, the corrected data.
[0092] In this embodiment, the data to be compared is stored in a temporary storage area, and then data processing is performed in the temporary storage area, thereby effectively reducing the complexity of calculating the corrected data and the complexity of the flash memory chip, and improving the feasibility of calculating the corrected data.
[0093] Based on the first embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail. On this basis, step S10 also includes steps S11 to S13:
[0094] Step S11: obtaining storage page error correction information generated by an error correction module of the flash memory.
[0095] In this embodiment, after performing ECC error correction processing, the hardware modules of the data processing device, such as the ECC error correction module, will generate error correction information for each storage page. Therefore, by obtaining the storage page error correction information, it is possible to determine which flash memory data pages are error correction failure pages, which are error correction success pages, and which are normal pages.
[0096] By obtaining storage page error correction information, it is possible to accurately know which flash memory storage pages contain correct data and which contain erroneous data, thereby improving data processing effects.
[0097] Step S12: determining a page where error correction fails according to the error correction result of the stored page error correction information.
[0098] In this embodiment, the error correction result can be determined by a check bit or a check code in the error correction information.
[0099] For example, in the error correction information fed back by the ECC error correction module, the check codes are 0, 1, and 2 respectively. When the check code is 0, it indicates that the flash memory data page is an error correction failure page, when the check code is 1, it indicates that the error correction is successful page, and when the check code is 2, it indicates that the page is normal.
[0100] After determining the error correction failure page, the corresponding error correction success page is obtained through the error correction failure page, so that the error correction failure page is soft-decoded by the error correction success page, thereby reducing the ECC error correction complexity.
[0101] Step S13: Acquire at least one page of successful error correction adjacent to the page of failed error correction.
[0102] In this embodiment, at least one successfully corrected page can be obtained using the page number information of adjacent pages. By obtaining at least one successfully corrected adjacent page, soft decoding processing can be performed on the failed page based on the data of the adjacent pages with similar structures, thereby improving the reliability of the soft decoding processing.
[0103] This embodiment accurately obtains the ECC error correction failure page and at least one error correction success page adjacent to the error correction page through the error correction information of the hardware module, thereby improving the reliability of the soft decoding process.
[0104] Based on the fifth embodiment of the present application, in the sixth embodiment of the present application, the same contents as those in the fifth embodiment will not be described in detail. On this basis, in the physical layout of the NAND flash memory, adjacent pages generally refer to pages that are logically arranged continuously, and these pages may also be physically located in the same block. Therefore, if the error correction success page and the error correction failure page are considered to be adjacent, then they are likely to be in the same block. Therefore, in the process of obtaining at least one page of error correction success page adjacent to the error correction failure page, the storage block where the error correction failure page is located can be determined, and then at least one page of error correction success page adjacent to the error correction failure page is obtained within the storage block. Among them, the storage block can be determined by the block number information where the error correction failure page is located.
[0105] In this embodiment, the storage structure of data pages in the same memory block is relatively similar. Therefore, when the same error occurs, all data pages in the memory block will basically have errors in the same location. Therefore, when obtaining the successfully corrected pages of adjacent pages, it is necessary to obtain the flash memory data pages in the same memory block. Based on the similar storage structure of data pages in the same memory block, the effect of soft decoding the failed error correction pages using the successfully corrected pages can be effectively improved.
[0106] Based on the first embodiment of the present application, in the seventh embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to above and will not be described in detail. On this basis, in the case of a normal occurrence of bad columns, the number of data errors on adjacent pages will usually not differ greatly (usually not more than twice), so in the aforementioned embodiment, after soft decoding processing is performed on the data of the error-correction-failed page based on the data of the adjacent error-correction-successful page, it is considered that the remaining number of errors on the error-correction-failed page does not exceed the upper limit of the error correction number of the ECC error correction processing, that is, after step S30, the processing action of step S40 can be directly executed.
[0107] Based on this, in this embodiment, in order to avoid special circumstances (where the number of errors on adjacent pages differs significantly), directly executing the action of step S40 may result in the subsequent inability to effectively perform error correction processing. After executing step SS30 and before executing step S40, it is necessary to obtain the number of errors on the page where error correction failed. If the number of errors is less than or equal to the preset number associated with the error detection and correction process, the processing action of step S40 is executed. The preset number is the maximum number of errors corrected by the ECC error correction process. If the number of errors is greater than the preset number, an error prompt is output, or the processing action of step S10 is jumped to select more adjacent pages with successful error correction for soft decoding processing, thereby improving the reliability of error correction.
[0108] Based on the first embodiment of the present application, in the eighth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail. On this basis, after step S30, steps S60 to S70 are also included:
[0109] Step S60: Acquire verification information of the target error-corrected successful page.
[0110] In this embodiment, after correcting a page that failed error correction, it is necessary to verify the accuracy of the corrected data. This verification method includes rereading the corrected page and applying the ECC algorithm for verification. By obtaining verification information, it is possible to analyze and determine whether the page that failed error correction has been corrected, thereby improving data error correction reliability.
[0111] Step S70 : If the verification information indicates that the verification is passed, the target error-corrected page is updated to the flash memory, or the error correction status corresponding to the target error-corrected page in the flash memory is updated.
[0112] In this embodiment, if the failed page is successfully corrected, the new data needs to be updated to the flash memory. For example, the target successfully corrected page in the temporary storage area needs to be updated to the flash memory. Furthermore, if the failed page is corrected directly in the flash memory, the storage device's status information needs to be updated to reflect that the page has returned to a normal state. Updating the latest status information or data facilitates management and maintenance of the storage device.
[0113] The present application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the flash memory-based data processing method in the first embodiment described above.
[0114] Reference below Figure 3 , which shows a structural schematic diagram of a data processing device suitable for implementing an embodiment of the present application. Figure 3 The data processing device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application.
[0115] like Figure 3 As shown, the data processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the data processing device. Processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. Communication device 1009 can allow the data processing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0116] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0117] The data processing device provided by this application utilizes the flash memory-based data processing method of the above-mentioned embodiment to resolve the technical problem of low data error correction reliability. Compared with the prior art, the beneficial effects of the data processing device provided by this application are the same as those of the flash memory-based data processing method provided by the above-mentioned embodiment. Other technical features of this data processing device are the same as those disclosed in the above-mentioned embodiment and are not further described here.
[0118] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the flash memory-based data processing method in the above embodiment.
[0121] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0122] The computer-readable storage medium may be included in a data processing device, or may exist independently without being incorporated into a data processing device.
[0123] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a data processing device, the data processing device:
[0124] Acquire an error correction failure page of the flash memory after error detection and correction processing is performed, and acquire an error correction success page adjacent to the error correction failure page;
[0125] Determine the corrected data of the corrected page is the corresponding target data in the failed correction page;
[0126] Perform soft decoding on the target data based on the corrected data and a preset decoding algorithm to identify and correct the erroneous data bits of the error-correction-failed pages, thereby reducing the number of bit errors in the error-correction-failed pages.
[0127] Error detection and correction processing is performed based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page.
[0128] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0130] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0131] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned flash memory-based data processing method, thereby resolving the technical issue of low data error correction reliability. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the flash memory-based data processing method provided in the aforementioned embodiment, and are not further elaborated here.
[0132] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data processing method based on flash memory, characterized in that: The flash memory-based data processing method comprises: Acquire an error correction failure page of the flash memory after error detection and correction processing is performed, and acquire an error correction success page adjacent to the error correction failure page; Determine the target data corresponding to the corrected data of the corrected page in the corrected page; According to the error-corrected data and a preset decoding algorithm, soft decoding processing is performed on the target data to identify and correct the erroneous data bits of the error-correction failed page, thereby reducing the number of erroneous bits in the error-correction failed page; Error detection and correction processing is performed based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page.
2. The flash memory-based data processing method according to claim 1, characterized in that: Before the step of determining the corrected data of the successful error correction page is in the target data corresponding to the failed error correction page, the method further includes: Acquire the corrected page data of the successfully corrected page and the uncorrected page data before error correction; The corrected data of the successfully corrected page is determined based on the corrected page data and the uncorrected page data.
3. The flash memory-based data processing method according to claim 2, characterized in that: The step of determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data comprises: Determine an XOR result of the error-corrected page data and the uncorrected page data; Generate error bit information of the error-corrected page based on the XOR result, and set the error bit information as the error-corrected data; or The error-corrected page data and the uncorrected page data are input into a preset error correction model to obtain error bit information of the error-corrected page, and the error bit information is set as the error-corrected data.
4. The flash memory-based data processing method according to claim 2, characterized in that: Before the step of determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data, the method further includes: Writing the error-corrected page data and the uncorrected page data into a temporary storage area; The step of determining the corrected data of the successfully corrected page based on the corrected page data and the uncorrected page data is performed based on the temporary storage area.
5. The flash memory-based data processing method according to claim 1, characterized in that: The steps of obtaining an error correction failure page of the flash memory after error detection and correction processing is performed, and obtaining an error correction success page adjacent to the error correction failure page include: Obtaining storage page error correction information generated by an error correction module of the flash memory; Determining the error correction failed page according to the error correction result of the storage page error correction information; At least one page of the error correction success page adjacent to the error correction failure page is obtained.
6. The flash memory-based data processing method according to any one of claim 5, characterized in that: The step of obtaining at least one page of the successful error correction page adjacent to the failed error correction page comprises: Determine the storage block where the error correction failed page is located; At least one page of the error correction success page adjacent to the error correction failure page is obtained in the storage block.
7. The flash memory-based data processing method according to claim 1, characterized in that: After the step of performing soft decoding processing on the target data according to the error-corrected data and the preset decoding algorithm, the method further includes: Obtaining the error number of the error correction failed page; If the number of errors is less than or equal to a preset number associated with error detection and correction processing, the step of performing error detection and correction processing based on the error correction failure page after soft decoding processing to obtain a corrected target error correction success page is performed.
8. The flash memory-based data processing method according to claim 1, characterized in that: After the step of performing error detection and correction processing on the error correction failure page after the soft decoding processing to obtain the corrected target error correction success page, the method further includes: Obtain verification information of the target error correction success page; If the verification information is verified to be passed, the target error correction success page is updated to the flash memory, or the error correction status corresponding to the target error correction success page in the flash memory is updated.
9. A data processing device, characterized in that: The data processing device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the flash memory-based data processing method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the flash memory-based data processing method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Error correction method and system based on flash memory
CN103745753A
ECC-based NAND data Read Retry error correction method and NAND controller
CN108241549A
Providing recovered data to a new memory cell at a memory sub-system based on an unsuccessful error correction operation
CN111837108A
Storage device and operating method of storage device
CN116110477A
Memory system, control method thereof, and program
US20190295665A1
Cited By
Memory and control method thereof
CN120029556A
Data error correction method and device, equipment and medium
CN120892245A