CN-122018791-A - Data writing method and device for flash memory storage unit and storage medium
Abstract
The application discloses a data writing method, equipment and a storage medium of a flash memory storage unit, comprising the steps of obtaining a historical data error set of the flash memory storage unit; analyzing the historical data error set, identifying at least one error rate storage interval with the number of error bits higher than a preset error threshold value in the flash memory storage unit based on an analysis result, generating a scattered storage rule based on the identified error rate storage interval, reorganizing user data to be stored according to the scattered storage rule, and writing the reorganized user data into the flash memory storage unit. The application realizes the technical effects of reducing the error rate of each storage unit and improving the writing reliability of the flash memory data by identifying the storage interval with high error rate and accordingly dispersedly storing the continuous data to different physical intervals.
Inventors
- HUANG LINYONG
- LIN YIN
- WU JIAN
Assignees
- 得一微电子股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260109
Claims (10)
- 1. The data writing method of the flash memory storage unit is characterized by comprising the following steps of: Acquiring a historical data error set of a flash memory unit; Analyzing the historical data error set, and identifying at least one error rate storage interval with the number of error bits higher than a preset error threshold value in the flash memory storage unit based on an analysis result; Generating a distributed storage rule based on the identified error rate storage section, wherein the distributed storage rule is configured to allocate a plurality of data units belonging to the same continuous logic data section to a plurality of physical storage sections with different batches in the flash memory storage unit for storage, and exclude the error rate storage section from the plurality of physical storage sections; And reorganizing the user data to be stored according to the scattered storage rule, and writing the reorganized user data into the flash memory storage unit.
- 2. The method of writing data to a flash memory cell of claim 1, wherein the step of obtaining a historical data error set for the flash memory cell comprises: acquiring equipment parameters of the flash memory storage unit, and determining a scanning strategy according to the equipment parameters; and performing error scanning on the flash memory storage unit through the scanning strategy, and generating the historical data error set based on a scanning result.
- 3. The method of writing data to a flash memory cell of claim 1, wherein the step of analyzing the set of historical data errors and identifying at least one error rate storage interval in the flash memory cell having a number of error bits above a predetermined error threshold based on the analysis result comprises: Counting the number of error bits of each storage page in the historical data error set; Calculating a mean and variance of at least one of the memory pages in the set of historical data errors based on the number of error bits; if the average value is lower than a preset first threshold value and the variance is higher than a preset second threshold value, judging that error distribution is uneven, and determining a storage section where the memory pages with the number of error bits exceeding a third threshold value are located as the error rate storage section.
- 4. The method of claim 1, wherein said step of analyzing said set of historical data errors to identify at least one high error rate storage interval in said flash memory cells having a number of error bits above a predetermined error threshold comprises: Calculating the historical unit data error rate of each physical storage interval in the flash memory storage unit based on the historical data error set; comparing the historical unit data error rate with a preset error rate threshold value, and determining a physical storage interval of which the historical unit data error rate exceeds the preset error rate threshold value as the error rate storage interval.
- 5. The method of writing data to a flash memory cell of claim 1, wherein the step of generating a scatter storage rule based on the identified error rate storage interval comprises: Acquiring interval error rate parameters of each storage interval in the flash memory storage unit, wherein the interval error rate parameters are obtained based on the historical data error set; creating a scattered mapping relation from an original user data sequence to a plurality of storage intervals according to the interval error rate parameter; and generating the scattered storage rule based on the scattered mapping relation.
- 6. The method for writing data to a flash memory cell of claim 5, wherein creating a scatter mapping from the original user data sequence to the plurality of storage intervals based on the interval error rate parameter comprises: acquiring historical erasing times of each storage interval in the flash memory storage unit; Constructing a multi-objective optimization function according to the interval error rate parameter and the historical erasing times, wherein an optimization objective of the multi-objective optimization function comprises overall data error risk and abrasion degree; And solving the multi-objective optimization function based on the error rate parameter and the historical erasing times to obtain the dispersion mapping relation.
- 7. The method for writing data to a flash memory cell according to claim 1, wherein the step of reorganizing the user data to be stored according to the scatter storage rule and writing the reorganized user data to the flash memory cell comprises: dividing the user data into a plurality of data units and forming a user data unit sequence according to the original sequence of the data units; Invoking a dispersion mapping relation in the dispersion storage rule, and distributing a corresponding target storage interval for each data unit in the data unit sequence; classifying each user data unit according to the target storage interval according to the scattered mapping relation, and temporarily storing the user data units to a buffer queue corresponding to the target storage interval; and responding to the data writing instruction, and writing the data units in each buffer queue into the corresponding target storage section.
- 8. The method of writing data to a flash memory cell of claim 1, further comprising: Updating a trigger condition in response to a preset rule, wherein the trigger condition comprises at least one of a predetermined time period, an accumulated written data amount exceeding a threshold value, or a detected overall error rate change of the flash memory storage unit exceeding a set range; acquiring an updated data error set of the flash memory unit; re-identifying an error rate storage interval based on the updated data error set, and generating an updated decentralized storage rule based on the re-identified error rate storage interval; and responding to a data writing instruction, and writing user data into the flash memory storage unit based on the updated scattered storage rule.
- 9. A data writing device of a flash memory storage unit, characterized in that the data writing device of the flash memory storage unit stores a computer program which, when executed by a processor, implements the data writing method of the flash memory storage unit of any of claims 1-8.
- 10. A storage medium storing a computer program which, when executed by a processor, implements the method of writing data to a flash memory storage unit of any one of claims 1-8.
Description
Data writing method and device for flash memory storage unit and storage medium Technical Field The present application relates to the field of data storage technologies, and in particular, to a method, an apparatus, and a storage medium for writing data into a flash memory unit. Background Along with the evolution of three-dimensional stacking and other processes, the density of NAND FLASH memory cells is significantly improved, and bit errors generated by charge disturbance, programming disturbance and the like in the read-write process are also increased. To ensure data reliability, storage systems typically employ error correction code techniques, which have a physical upper limit on their error correction capability. In practice, flash memory media often exhibit a non-uniform error distribution characteristic, i.e., bit errors are not randomly uniformly dispersed throughout memory space, but rather tend to occur centrally within certain specific physical memory intervals. In the case of such a centralized distribution, although the overall raw error rate of the storage medium may still be within an acceptable range, the number of error bits accumulated in the physical section of the individual data segment is very likely to exceed the maximum error correction capability of the master error correction code, thereby causing unrecoverable failure of the local data. The traditional optimization strategies such as uniform wear leveling, bad block management and the like are mainly aimed at the life cycle and macroscopic reliability of the memory cells, and are not designed for the microcosmic concentration of the error distribution inside the page or the block. Therefore, how to effectively cope with the problem of insufficient local error correction capability caused by concentrated distribution of error bits becomes a key challenge for improving the writing and storage reliability of the high-density flash memory. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The application mainly aims to provide a data writing method, equipment and a storage medium of a flash memory storage unit, and aims to solve the technical problem that local data cannot be corrected due to concentrated error distribution in the existing flash memory. In order to achieve the above object, the present application provides a data writing method of a flash memory unit, the method comprising: Acquiring a historical data error set of a flash memory unit; Analyzing the historical data error set, and identifying at least one error rate storage interval with the number of error bits higher than a preset error threshold value in the flash memory storage unit based on an analysis result; Generating a distributed storage rule based on the identified error rate storage section, wherein the distributed storage rule is configured to allocate a plurality of data units belonging to the same continuous logic data section to a plurality of physical storage sections with different batches in the flash memory storage unit for storage, and exclude the error rate storage section from the plurality of physical storage sections; And reorganizing the user data to be stored according to the scattered storage rule, and writing the reorganized user data into the flash memory storage unit. In one embodiment, the step of obtaining the historical data error set of the flash memory unit includes: acquiring equipment parameters of the flash memory storage unit, and determining a scanning strategy according to the equipment parameters; and performing error scanning on the flash memory storage unit through the scanning strategy, and generating the historical data error set based on a scanning result. In one embodiment, the step of analyzing the historical data error set and identifying at least one error rate storage section in the flash memory storage unit with the number of error bits higher than a preset error threshold based on the analysis result includes: Counting the number of error bits of each storage page in the historical data error set; Calculating a mean and variance of at least one of the memory pages in the set of historical data errors based on the number of error bits; if the average value is lower than a preset first threshold value and the variance is higher than a preset second threshold value, judging that error distribution is uneven, and determining a storage section where the memory pages with the number of error bits exceeding a third threshold value are located as the error rate storage section. In one embodiment, the step of analyzing the historical data error set to identify at least one high error rate storage interval in the flash memory cell having a number of error bits above a predetermined error threshold comprises: Calculating the historical unit