A flash memory reliability optimization method based on internal data migration and related device
By monitoring and analyzing the number of P/E cycles and page types of the flash controller, predicting the remaining number of copyback operations of the page, solving the problems of error accumulation asymmetry and RBER measurement difficulties in internal data migration, and improving the reliability of SSD flash memory and service life.
Patent Information
- Application Number
- CN202411001314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-25
AI Technical Summary
In SSD-based internal data migration, there is asymmetry in error accumulation between pages, and it is difficult to fully measure the flash memory reliability of SSD using RBER, which makes it difficult to guarantee flash memory reliability.
By monitoring the number of block P/E cycles recorded by the flash controller, obtain the page type and copyback operations of the page, calculate the distribution error, build optimization functions and constraint functions, combine the estimation matrix to predict the remaining number of copyback operations of the page, and when appropriate Start ECC verification to improve the reliability of flash memory.
By describing the distribution differences between the initial and final states, we predict whether the copyback of the page reaches the threshold, thereby starting the error correction mechanism, reducing error accumulation, extending the service life of the flash chip, and improving the reliability of the SSD.
Smart Images

Figure CN118550759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer storage, and in particular to a flash memory reliability optimization method based on internal data migration and a related device. Background Art
[0002] A solid-state drive (SSD) is a storage device that uses flash memory chips instead of traditional mechanical hard drives. Compared with traditional hard drives, SSDs have faster read and write speeds, lower energy consumption, and higher reliability. Among them, NAND flash memory is a non-volatile memory commonly used in storage devices such as solid-state drives (SSDs) and USB flash drives. In the management of NAND flash memory, due to the high cost of erase operations, a garbage collection algorithm is needed to manage the storage space. The garbage collection algorithm moves valid data to merge and erase blocks containing invalid data, thereby freeing up space for new data to be written. The internal data migration based on the copyback advanced command supports the migration of valid data from one block to another. This migration method can effectively improve write efficiency and reduce wear on NAND flash memory. After long-term use or frequent erasure and writing, NAND flash memory may cause errors in stored data due to physical wear.
[0003] In the internal data migration, in order to maintain the consistency and integrity of the data and reduce wear, the page address of the data page of the flash memory has the property of parity check restriction. Specifically, in the same plane, if the page currently being migrated is an even page, the data of the page can only be migrated to the even page, and it is not allowed to migrate to the odd page. Conversely, if the page currently being migrated is an odd page, the data of the page can only be migrated to the odd page. However, due to the address restriction of the page / word line, the error accumulation between pages is asymmetric during the copyback execution process, which increases the error rate and reduces the error correction capability of ECC, thereby reducing the flash memory reliability of the SSD. At the same time, the raw bit error rate (RBER) is used to measure the bit ratio of errors in the data bit under ideal conditions. RBER is a key indicator for measuring the flash memory reliability of the SSD. As the RBER increases, the data reliability of the NAND flash memory will be reduced. However, the manufacturing process of 3D flash memory will introduce inconsistent interference between word lines, making it difficult for the flash memory controller to obtain prior information of RBER before decoding. Summary of the invention
[0004] The present invention provides a flash memory reliability optimization method based on internal data migration and a related device, which are used to solve the technical problems that in the existing internal data migration based on SSD, there is asymmetry in error accumulation between pages, and it is difficult to fully measure the flash memory reliability of SSD using RBER in practical applications, making it difficult to ensure the flash memory reliability of SSD.
[0005] A first aspect of the present invention provides a flash memory reliability optimization method based on internal data migration, the method comprising:
[0006] Monitor whether the flash controller can record the number of P / E cycles of the block and obtain the page type, copyback operation number and multiple real state distributions of each page in the block;
[0007] If possible, the first distribution error of the page is calculated based on the number of copyback operations of the page and multiple real state distributions;
[0008] If not, determine based on a preset variation graph that different page types on the same word line are aligned with second distribution errors corresponding to all noise points in the preset variation graph;
[0009] Construct the copyback optimization function and its constraint function, and estimate the estimated matrix of the page by combining the number of copyback operations of the page and multiple real state distributions;
[0010] Inputting all the second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of remaining copyback operations for each page type of the page;
[0011] When the first distribution error is greater than a preset first distribution error, ECC is started to check the data of the page; or when the number of remaining operations of the page type copyback of the page is 0, ECC is started to check the data of the page type of the page.
[0012] Furthermore, the first distribution error is calculated as follows:
[0013]
[0014] In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
[0015] Furthermore, the step of determining different page types of the same word line based on the preset variation graph and aligning the second distribution errors corresponding to all noise points in the preset variation graph specifically includes:
[0016] Construct an enhanced distribution error formula for probability distribution of different states according to the page type;
[0017] Based on the enhanced distribution error formula, first distribution errors of all noise points of different page types aligned on the same word line are obtained in the preset change map, and the first distribution errors of the different page types are used as second distribution errors;
[0018] The preset change graph specifically includes the distribution change of the number of copyback operations and the first distribution error of different page types under different noise environments;
[0019] The enhanced distribution error formula is:
[0020]
[0021] In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
[0022] Furthermore,
[0023] The copyback optimization function for:
[0024]
[0025] In the formula, Indicates in status Multiple fitting errors under The sum of the absolute values of Indicates that after k copyback operations, the state is The actual distribution value under and estimated distribution values The fitting error between Indicates status Transfer to state The estimated probability of
[0026] The constraint function is:
[0027]
[0028] Where: Indicates status Transfer to state The estimated probability of 1,...,n}, where n represents the state type of the storage unit.
[0029] Furthermore, the calculation step of estimating the copyback count prediction model includes:
[0030] Initialize the remaining number of copyback operations for each page type;
[0031] Based on the estimation matrix, the estimated state distribution of each page type is calculated by using the copyback Markov prediction model;
[0032] Inputting the estimated state distribution into the enhanced distribution error formula to generate a third distribution error of the page type;
[0033] When the third distribution error of the page type is greater than the second distribution error corresponding to the page type, the remaining number of copyback operations of the output page type is 0.
[0034] Furthermore, the prediction step of estimating the copyback count prediction model further includes:
[0035] When the third distribution error of the page type is not greater than the second distribution error of the page type, the remaining number of copyback operations of the page type is increased by one, and the process jumps to the step of calculating the estimated state distribution of each page type of the page through the copyback Markov prediction model based on the estimation matrix, until the third distribution error of the page type is greater than the second distribution error of the page type, and the remaining number of copyback operations of the page type of the page is output.
[0036] The second aspect of the present invention further provides a flash memory reliability optimization system based on internal data migration, comprising:
[0037] An acquisition unit, used to monitor whether the flash memory controller can record the number of P / E cycles of the block, and obtain the page type, the number of copyback operations and multiple real state distributions of each page in the block;
[0038] A first distribution error calculation unit, configured to calculate a first distribution error of the page according to the number of copyback operations of the page and a plurality of real state distributions, if possible;
[0039] A second distribution error determination unit, configured to determine, if not possible, based on a preset variation graph, a second distribution error corresponding to aligning all noise points of different page types on the same word line in the preset variation graph;
[0040] An estimation matrix generation unit is used to construct a copyback optimization function and its constraint function, and estimate the estimation matrix of the page by combining the number of copyback operations of the page and multiple real state distributions;
[0041] A copyback remaining operation number prediction unit, used for inputting all the second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of copyback remaining operations of each page type of the page;
[0042] The verification unit is used to start ECC to verify the data of the page when the first distribution error is greater than the preset first distribution error; or when the number of remaining operations of the page type copyback of the page is 0, start ECC to verify the data of the page type of the page.
[0043] Furthermore,
[0044] The first distribution error is calculated as follows:
[0045]
[0046] In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
[0047] Further, the second distribution error determining unit includes:
[0048] An enhanced distribution error formula construction subunit is used to construct enhanced distribution error formulas of different state probability distributions according to the page type of the page;
[0049] A second distributed error determination subunit is used to obtain first distributed errors of all noise points of different page types aligned on the same word line in a preset variation graph based on an enhanced distributed error formula, and use the first distributed errors of different page types as second distributed errors;
[0050] The preset change graph specifically includes the distribution change of the number of copyback operations and the first distribution error of different page types under different noise environments;
[0051] The enhanced distribution error formula is:
[0052]
[0053] In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
[0054] The third aspect of the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program code, and the program code is used to execute the flash memory reliability optimization method described above.
[0055] It can be seen from the above technical solutions that the present invention has the following advantages:
[0056] The present invention provides a flash memory reliability optimization method based on internal data migration and a related device, wherein the method comprises: monitoring whether a flash memory controller can record the number of P / E cycles of a block, and obtaining the page type, the number of copyback operations and multiple real state distributions of each page in the block; if it can, calculating the first distribution error of the page according to the number of copyback operations of the page and the multiple real state distributions; if it cannot, determining the second distribution error corresponding to all noise points of different page types on the same word line aligned in the preset change graph based on a preset change graph; constructing a copyback optimization function and its constraint function, and estimating the estimated matrix of the page in combination with the number of copyback operations of the page and the multiple real state distributions; inputting all the second distribution errors and the estimated matrix into an estimated copyback count prediction model to predict the remaining number of copyback operations of each page type of the page; when the first distribution error is greater than the preset first distribution error, starting the ECC to verify the data of the page; or when the remaining number of copyback operations of the page type of the page is 0, starting the ECC to verify the data of the page type of the page.
[0057] In the present invention, the difference between the initial state distribution and the final state distribution of the page is described by the distribution error, so as to replace the RBER indicator to measure the reliability of the SSD; for the flash memory chip with known wear count, the first distribution error is used to predict whether the copyback of its page reaches the threshold, so as to start the corresponding error correction mechanism to improve the flash memory reliability of the SSD; at the same time, for the flash memory chip with unknown wear count, the copyback count prediction model is estimated and combined with the second distribution error to predict the remaining number of copyback operations of different page types of the flash memory chip, and then the maximum counting capacity of the flash memory chip is predicted, and then the corresponding error correction mechanism is started, so as to minimize the data errors caused by the asymmetry of error accumulation between pages, extend the service life of the flash memory chip, and improve the reliability of the SSD, thereby solving the technical problems that in the existing internal migration of data based on the SSD, there is asymmetry in the error accumulation between pages, and it is difficult to fully measure the flash memory reliability of the SSD using RBER in practical applications, so that the flash memory reliability of the SSD is difficult to be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0059] Figure 1 A flowchart of the steps of a flash memory reliability optimization method based on internal data migration provided by an embodiment of the present invention;
[0060] Figure 2 A structural block diagram of a flash memory reliability optimization system based on internal data migration provided by an embodiment of the present invention;
[0061] Figure 3 A garbage collection process diagram of a flash memory garbage collection algorithm provided in an embodiment of the present invention.
[0062] Figure 4 A performance diagram showing the effect of data migration on the access speed of a flash memory during the startup of a garbage collection algorithm provided by an embodiment of the present invention.
[0063] Figure 5 A diagram of the solid-state drive (SSD) system architecture provided by an embodiment of the present invention.
[0064] Figure 6 A diagram showing changes in the copyback command, data bit errors, and ECC error correction capability provided by an embodiment of the present invention.
[0065] Figure 7 This is a structural block diagram of the test platform provided by an embodiment of the present invention.
[0066] Figure 8 A diagram showing the RBER distribution of three page types, CSB, LSB and MSB, under different copyback execution times of the Toshiba BiCS3 flash memory chip and the YMTCX190 3D TLC NAND flash memory chip provided in an embodiment of the present invention.
[0067] Fig. 9 A voltage distribution diagram of an erased state of an MLC flash memory provided by an embodiment of the present invention.
[0068] Fig.10 Different copyback operation times provided by the embodiment of the present invention Distribution chart of values under different P / E environments.
[0069] Fig.11 A preset variation diagram of the distribution variation of the number of copyback operations and the first distribution error for different page types under different noise environments provided by an embodiment of the present invention.
[0070] Fig.12 This is a graph showing the relationship between the β value and RBER in a real chip provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The embodiment of the present invention provides a flash memory reliability optimization method based on internal data migration and a related device, which are used to solve the technical problems that in the existing internal data migration based on SSD, there is asymmetry in error accumulation between pages, and it is difficult to fully measure the flash memory reliability of the SSD using RBER in practical applications, making it difficult to ensure the flash memory reliability of the SSD.
[0072] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] In NAND flash memory, a block is the basic unit of the erase operation of NAND flash memory, and a page is the basic read and write unit in NAND flash memory. A block includes multiple pages, and the word line is responsible for selecting a specific storage cell for read or write operations. Among them, a page usually contains multiple storage cells / flash cells and has a fixed size. For example, the common page size may be 2KB, 4KB or larger. Data is written or read in units of pages. Write operations (programming) usually only occur on unprogrammed pages, while read operations can be performed from any page. The storage cell is the most basic storage element in NAND flash memory, usually composed of a floating gate transistor. This transistor can store charge, and the presence or absence and amount of charge determines the state of the storage cell, which in turn represents different data (bits). The storage cells of NAND flash memory can be divided into the following types according to the number of data bits stored: SLC flash memory, a storage cell can be in one of two states and store 1 bit of data (0 or 1). MLC flash memory, a storage cell can be in one of four states and store 2 bits of data. TLC flash memory, a storage cell can be in one of eight states and store 3 bits of data. In QLC flash memory, a memory cell can be in one of sixteen states, storing 4 bits of data. The number of states increases as the number of bits stored in each memory cell increases.
[0074] When the flash memory chip is almost full, the SSD (solid state drive) will start the garbage collection algorithm to recycle invalid data. Usually the data in the flash memory is updated remotely, and multiple pages of data need to be moved. Figure 3 Demonstrates the garbage collection process in flash memory, Figure 3 In the example, the flash block is the block that needs to be recycled. For example, the data in addr n in flash block a is invalid, while the data in addr n+1 is valid. At this time, the valid data of flash block a needs to be migrated to the new flash block b. When all the valid data of flash block a is migrated, flash block a will be recycled as garbage. In the process of starting the garbage collection algorithm, data migration will occupy the entire channel, resulting in a decrease in the access speed of the flash memory. Figure 4 The following is a description of the migration process for valid data:
[0075] External data migration (EDM): The traditional data migration solution for solid-state drive (SSD) systems is external data migration, which refers to migrating data from a page on a single plane to a page on another plane within the flash memory chip. Figure 5The EDM shows the process of external data migration, and takes it as an example to describe the migration process of external data migration. Specifically, step 1: the data of page 0 retrieved in block 0 of plane 0 is valid. At this time, the data of page 0 is migrated and first stored in a 4KB data register (4K Register). Step 2: Transfer the data to the flash controller (Flash controller). Step 3: Transfer the data from the flash controller to the data buffer (Data cache). Step 4: Start ECC check (Error-Correcting Code) to ensure the reliability of data transmission. Step 5: ECC check corrects the erroneous data and then sends the corrected data back to the data buffer. Step 6: Write the data in the data buffer back to the 4KB data register. Step 7: The data is programmed into page 0 of block 0 of plane 4.
[0076] External data migration (IDM): The data migration solution based on the copyback advanced command is called internal data migration. Internal data migration refers to migrating the data of a page of a block in a plane to a page of a different block in the same plane in the flash memory chip. Figure 5 The IDM represents the process of internal data migration. The migration process of internal data migration is described by taking it as an example. Step 1: The flash memory controller sends the copyback command to plane 0-plane 4 respectively. Step 2: Each plane reads a page of data into a 4KB data register. Step 3: The data of the 4KB data register is written to the target page of different blocks in the same plane.
[0077] Compared with external data migration, internal data migration performs migration operations within a single plane and does not require error correction through the data bus of the flash channel, eliminating the need for an external channel. The copyback command can be used to accelerate data migration in the solid-state drive. The simple operation significantly saves migration time.
[0078] In the internal data migration, as the number of copyback executions increases (based on the copyback command, the data of each page is randomly migrated to other pages, and then the migrated data is randomly migrated to other pages again using the copyback operation, and so on), without error correction, the number of bit error locations will increase. See Figure 6As the copyback command is executed, the bit error of the data gradually increases, and the rising trend of the bit error increases with the increase of the number of P / E cycles. Among them, the P / E cycle refers to the number of programming (writing) and erasing operations that the flash memory chip can undergo. During the internal data migration process, the number of copyback executions can be recorded in real time (the copyback count is written to the metadata of each page, and the copyback count is increased by 1 when the data of the page is IDMed). If the number of copyback executions is greater than the threshold, ECC error correction is enabled to improve the reliability of the flash memory.
[0079] In order to further study the reliability of flash memory chips, the present invention has built the following Figure 7 The test platform shown in the figure performs data internal migration test on the flash memory chip. The chip leads of the test platform are connected to a personal computer (PC). The test platform receives instructions and data for programming flash memory from the PC, and can read, write and erase the flash memory chip. It can also implement multiple groups of operations and read retries. The test platform is set with six channels, allowing parallel testing of flash memory chips. Two different types of three-dimensional NAND flash memory chips, ToshibaBiCS3 flash memory chip and YMTCX190 3D TLC NAND flash memory chip, are used as test flash memory chips. Among them, Table 1 shows the parameters of the two NAND flash memory chips.
[0080] Table 1 Chip parameter information of two NAND flash memory chips
[0081]
[0082] In the internal data migration, in order to maintain data consistency and integrity and reduce wear, the page address of the data page of the flash memory has a parity restriction property. Specifically, in the same plane, if the page currently being migrated is an even page, the data of the page can only be migrated to the even page, and migration to the odd page is not allowed. Conversely, if the page currently being migrated is an odd page, the data of the page can only be migrated to the odd page. During the test, it was found that due to the address restrictions of the page / word line, the error accumulation between pages during the copyback execution process is asymmetric, which will reduce the flash memory reliability of the SSD. At the same time, the manufacturing process of 3D flash memory will introduce inconsistent interference between word lines, making it difficult for the flash memory controller to obtain prior information on RBER before decoding, indicating that it is difficult to fully measure the flash memory reliability of the SSD using the average RBER or the best RBER in practical applications.
[0083] Taking TLC flash memory as an example, due to the limitation of page address, the RBER (raw bit error rate) of three types of pages of TLC flash memory shows asymmetry during the copyback execution process. Among them, CSB, LSB and MSB are the three types of pages of TLC flash memory. Please refer to Figure 8 , Figure 8 Figures (a), (b), and (c) show the RBER distribution of the three page types of CSB, LSB, and MSB of the Toshiba BiCS3 flash memory chip under different copyback execution times. Figure 8 Figures (d), (e) and (f) show the RBER distribution of three types of pages, CSB, LSB and MSB, of the YMTCX190 3D TLC NAND flash memory chip under different copyback execution times. Taking the ToshibaBiCS3 flash memory chip as an example, when RBER=0.004, the threshold of the copyback execution times of CSB is 5, the threshold of the copyback execution times of LSB is 9, and the threshold of the copyback execution times of MSB is 8. The page numbers of LSB can be 1, 4, 7; the page numbers of CSB are 2, 5, 8; and the page numbers of MSB are 3, 6, 9.
[0084] Secondly, the manufacturing process of 3D flash memory causes inconsistent interference between word lines, which makes it difficult for the flash memory controller to obtain prior information on RBER before decoding, and it is difficult to predict the maximum count capacity of copyback. Among them, the word line is a conductor in NAND flash memory that spans a group of memory cells. In the structure of NAND flash memory, memory cells are usually organized into a matrix, in which each row in the horizontal direction is connected by a word line. The memory cells on each word line share the same word line, which means that they will be selected at the same time in read, program or erase operations, so their state changes (such as from erased state to programmed state) are also synchronized.
[0085] See also Figure 1 In a first aspect, the present invention provides a flow chart of the steps of a flash memory reliability optimization method based on internal data migration.
[0086] The present invention provides a flash memory reliability optimization method based on internal data migration, the method comprising:
[0087] Step 101 , monitoring whether the flash memory controller can record the number of P / E cycles of the block, and obtaining the page type, the number of copyback operations and multiple real state distributions of each page in the block.
[0088] It should be noted that in order to improve the service life and reliability of SSD, SSD is equipped with a wear leveling algorithm. Whether it is a dynamic or static wear leveling algorithm, it can ensure that the number of P / E cycles of blocks in a plane remains within a certain range; SSD is also equipped with a data scrambling mechanism to ensure that the distribution of data states written to SSD is uniform. When wear leveling occurs between two blocks on the same plane, the RRV of the flash controller is used to detect the state transition of the storage unit. The flash controller detects the state transition in the two blocks with comparable probability through a fixed RRV, which means that the read operation has a uniform impact on all blocks, thereby helping to maintain the performance and life of the entire SSD.
[0089] Specifically, in NAND flash memory, taking MLC as an example, each cell / storage cell on a word line can be divided into an erase state and programming status and , where the threshold voltage of the erased state follows a Gaussian distribution and can be modeled as:
[0090]
[0091] Where x is the threshold voltage of the memory cell, and are the mean and standard deviation of the erased state, .
[0092] Flash memory is often exposed to noise environments. Noise interference can cause RRV to interpret the state of a specific storage cell inaccurately, resulting in misclassification of various states. The noise environment scenario can be determined by the number of P / E cycles. Whether the flash memory controller can record the number of P / E cycles of the block can determine whether the noise environment in which the flash memory is located is known or unknown. The position of the bit error caused by noise is random. When the flash memory is in different noise environments, the page type error accumulation of its page is asymmetric, and the way it triggers ECC verification is also difficult to determine.
[0093] In the case where the noise environment is known, a wear leveling algorithm can be used to ensure that the number of P / E cycles per block on a plane of flash memory with known wear counts remains within a specified error range, resulting in similar noise levels.
[0094] Among them, RRV is , which is usually used to detect the state of a single storage unit. When the storage unit transitions from state i to state j, the state transition probability read by the RRV read model is as follows:
[0095]
[0096] In the formula, , i, j ∈ {0, 1, 2, 3, 4}, where represent the threshold voltage boundaries (see Fig. 9 ).
[0097] Then, considering the consistent data migration and cross-word line programming of odd / even page addresses in the SSD. During the migration process, the flash memory controller of the SSD needs to migrate the data in the word line to other word lines on the same plane. Then the state transition probability matrix P of the word line / page can be expressed as:
[0098]
[0099] For MLC flash memory, there are four states, and its state transition probability matrix is a 4x4 matrix; each row in the matrix represents the probability distribution of a state. Before data is transferred to the flash memory, the scrambler module of the flash memory controller presents independent and equal probability distributions in the four cell states, and the initial state distribution vector is ,in represents the probability of being in the initial state j. After IDM iterates k times, the probability of being in state j is expressed as , then the state distribution vector after IDM iteration k is expressed as .
[0100] Under the same RRV, blocks will produce similar error state recognition probability P. Therefore, for flash memory with known wear count, a fixed RRV can be used to detect the state of the block in the same plane.
[0101] In practical applications, it is difficult to determine the maximum migration value of copyback based on the current RBER, that is, it is difficult to fully measure the flash memory reliability of the SSD using the average RBER and the optimal RBER. In order to solve this problem, the present invention introduces the KL divergence to quantify the difference between the initial state distribution S(0) and the final state distribution S(k) after the copyback migration, instead of the RBER value. By calculating the KL divergence, the change in the data state during the migration process is evaluated, and the migration strategy is adjusted accordingly to reduce the error rate and improve the flash memory reliability of the SSD. In order to describe the difference between the initial state distribution and the final state distribution, it is necessary to obtain the page type, the number of copyback operations, and the page state of each page in the block through the flash memory controller. and multiple true state distributions S(k).
[0102] Step 102: If possible, calculate a first distribution error of the page according to the number of copyback operations of the page and a plurality of real state distributions.
[0103] It should be noted that when the flash memory controller can record the number of P / E cycles of the block, it indicates that the scenario of the noise environment in which the flash memory is located is known. At this time, the first distribution error of the page can be calculated. The first distribution error is used to quantify the difference between the initial state distribution of the page and the state distribution after copyback migration, and use the first distribution error to predict whether a specific page reaches the maximum copyback counting capacity.
[0104] In the MLC flash memory, the first distribution error of the page / word line is:
[0105]
[0106] In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
[0107] Step 103 : if not, determine based on a preset variation graph that different page types on the same word line / page align a second distribution error corresponding to all noise points in the preset variation graph.
[0108] It should be noted that when the flash controller cannot record the number of P / E cycles of the block, it will bring about the uncertainty of unknown wear count and noise level. The flash controller does not know the prior information about the raw bit error rate (RBER) before decoding, and it is impossible to accurately apply formula (4) to predict the maximum number of copyback operations of each page type on a specific page. This also hinders the ability to determine whether each page type of the page has reached its maximum copyback count.
[0109] If the number of P / E cycles is not recorded in real time, sufficient information cannot be obtained to determine the transfer probability, which hinders the accurate prediction of the copyback count. In this case, other methods may be needed to infer the copyback count or consider other known information to estimate the maximum copyback count capacity in the current unknown scenario. The present invention can address the problem of error accumulation asymmetry between different pages by determining the second distribution error of different page types.
[0110] Specifically, step 103 includes: constructing an enhanced distribution error formula for probability distribution of different states according to the page type of the page; based on the enhanced distribution error formula, obtaining a first distribution error that aligns all noise points of different page types on the same word line in a preset change graph, and using the first distribution error of different page types as the second distribution error.
[0111] It is understandable that although The value can be used as an alternative to RBER, but Fig.10 It can be seen that the maximum copyback threshold is The value is different in different P / E environments. In order to determine a fixed β as the maximum threshold of copyback, an exponential constraint term can be added to enhance formula (4) to obtain the enhanced distribution error formula, where the enhanced distribution error formula of MLC flash memory is shown in formula (5):
[0112]
[0113] In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
[0114] Formula (5) is used to align the first distribution errors of all noise points of different page types on the same word line, such as Fig.11 As shown, in order to meet the maximum copyback threshold of each page type of MLC flash memory in Table 3, when the parameter When set to 0.8, the maximum copyback threshold that can align all noise points on different page types.
[0115] in, Fig.11 The solid line is consistent with the β value of LSB determined under different noise conditions, while the dashed line is consistent with the β value of MSB determined under different noise conditions. When β is equal to 1.0275 (solid line), the x-coordinate of the solid line through PE-3000 is between 1 and 2, indicating that the copyback threshold of MSB is 1 at PE-3000.
[0116] The preset change graph specifically refers to the distribution change of the number of copyback operations and the first distribution error of different page types under different noise environments.
[0117] Step 104 , construct a copyback optimization function and its constraint function, and estimate the estimated matrix of the page by combining the number of copyback operations of the page and a plurality of real state distributions.
[0118] When prior information of RBER or noise level is not available, estimating the number of remaining copyback operations of a page is not feasible. In order to predict the number of remaining copyback operations of a flash memory page, the present invention can calculate an estimated transfer matrix of the page to measure the unknown noise environment.
[0119] Assumptions Indicates the estimated actual value of state j after the kth copyback operation With estimated value The fitting error between . The fitting error can be defined as .
[0120] For the mth copyback operation, the actual value in state j With estimated value The sum of the absolute values of the fitting errors between . From state j to the final state n, we can construct a copyback optimization function , as shown in formula (6):
[0121]
[0122] In the formula, Indicates in status Multiple fitting errors under The sum of the absolute values of Indicates that after k copyback operations, the state is The actual distribution value under and estimated distribution values The fitting error between Indicates status Transfer to state The estimated probability of .
[0123] Copyback optimization function The objective function is the copyback optimization function Minimum value of , and its constraint is that the minimum value is non-negative.
[0124] Among them, the copyback optimization function The constraint function is shown in formula (7):
[0125] (7)
[0126] In the formula, Indicates status Transfer to state The estimated probability Needs to be satisfied , 1,...,n}, n represents the state type of the storage unit. It can be understood that MLC flash memory has four states, n=4, and TLC flash memory has eight states, n=8.
[0127] Combining formula (6) and (7), the least squares method is used to solve , and then estimate the estimated matrix of the page .
[0128] Step 105: input all second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of remaining copyback operations for each page type of the page.
[0129] The present invention proposes an Estimation Copyback Count Prediction Model (ECCPM) for predicting the maximum number of copyback operations used by different page types on a specific page when the flash memory cannot record the number of P / E cycles in real time.
[0130] The prediction step of estimating the copyback count prediction model includes the following sub-steps:
[0131] Sub-step 1051, initializing the remaining number of copyback operations for each page type.
[0132] In order to predict the maximum number of copyback operations used on a specific page, the remaining number of copyback operations of the page can be predicted. Before the model is executed, the remaining number of copyback operations of each page type needs to be initialized, and then EECPM is used to predict the remaining number of copyback operations of each page type. Specifically, in MLC flash memory, .
[0133] Sub-step 1052 , based on the estimation matrix, the estimated state distribution of each page type is calculated by using the copyback Markov prediction model.
[0134] It should be noted that, regardless of whether IDM or EDM is used, the noise between blocks in the same plane is often similar, and the probability of state transition between word lines is also comparable. The state transition probability distribution of the page can be regarded as a Markov model. The Markov model can be used to describe the noise interference in the copyback operation at the word line level. The Markov chain can be used to predict the maximum number of copyback operations at the word line level.
[0135] Among them, in MLC flash memory, the Markov prediction model based on copyback is shown in formula (8):
[0136]
[0137] in, .
[0138] Then, when estimating the estimation matrix When , get the estimated state distribution corresponding to each page type of the page .
[0139] Sub-step 1053, inputting the estimated state distribution into the enhanced distribution error formula to generate a third distribution error for each page type.
[0140] Sub-step 1054 , when the third distribution error of the page type is greater than the second distribution error corresponding to the page type, the remaining number of copyback operations of the output page type is 0.
[0141] It should be noted that when the page type third distribution error Greater than the second distribution error of this page type When the second distribution error of MLC flash memory is , at this time through It can be determined that the number of page type operations of a specific page reaches the copyback threshold of its associated page type, and the remaining number of copyback operations of the page is output as 0.
[0142] Sub-step 1055, when the third distribution error of the page type is not greater than the second distribution error of the page type, the remaining number of copyback operations of the page type is increased by one, and the process jumps to the step of calculating the estimated state distribution of each page type of the page based on the estimation matrix through the copyback Markov prediction model, until the third distribution error of the page type is greater than the second distribution error of the page type, and the remaining number of copyback operations of the page type of the page is output.
[0143] For ease of understanding, Table 2 shows the algorithm process used by ECCPM to solve the MSB and LSB of MLC flash memory.
[0144] Table 2 ECCPM is used to solve the maximum copyback threshold of MSB and LSB of MLC flash memory
[0145]
[0146] It is understandable that during the execution of ECCPM, the error distribution is calculated at each iteration ,when When the second error distribution is exceeded, the number of iterations is equal to the number of remaining copyback operations. It should be noted that the embodiment of the present invention is explained using MLC flash memory as an example, and those skilled in the art can extend the flash memory reliability optimization method based on internal data migration provided by the present invention to TLC and QLC in actual application scenarios as required.
[0147] Furthermore, Fig.12 (a) shows the estimated matrix estimated in the copyback operation The comparison between the predicted β values and the β values measured by the real data and the β values predicted by the matrix P calculated from the real data is shown in Figure 2. Fig.12 (a) It can be observed that the distributions of the three are basically the same, indicating that ECCPM can be applied to real flash memory scenarios. Fig.12 In (b), when the RBER is 0.0003, the copyback thresholds of MSB, LSB and CSB are 4, 6 and 7 respectively, and the β values corresponding to the real data are 4.17×10−6, 9.27×10−6 and 1.253×10−5 respectively. Then, the maximum copyback count thresholds of the three page types calculated by ECCPM are consistent with the real data.
[0148] Step 106, when the first distribution error is greater than the preset first distribution error, start ECC to check the data of the page; or when the number of remaining operations of the page type copyback of the page is 0, start ECC to check the data of the page type of the page.
[0149] For example, the page types of the MLC flash memory are LSB and MSB. Table 3 shows the maximum number of copyback operations for different page types of the MLC flash memory under different P / E cycles. Fig.10 , Fig.10 Displays the number of copyback operations under different P / E cycles and of changes.
[0150] Table 3 Maximum copyback operation times of different page types of MLC flash memory under different P / E cycles
[0151]
[0152] Among them, Table 3 shows that the maximum number of copyback operations for the LSB page of PE-4000 is 7. Fig.10 In the example, when the copyback of PE-4000 is 7, The value is 0.000432. Therefore, during the calculation of the kth copyback operation, when When the value exceeds 0.000432, ECC checking will be triggered to improve the flash memory reliability of the SSD.
[0153] Step 105 can predict the remaining number of copyback operations of different page types for a specific page. When the remaining number of copyback operations of a page type for a specific page is 0, it indicates that the page type for the specific page has reached the maximum number of copyback operations. At this time, it is necessary to start ECC checking to solve the asymmetric problem of error accumulation between pages, so as to improve the flash memory reliability of the SSD.
[0154] See also Figure 2 , Figure 2 A structural block diagram of a flash memory reliability optimization system based on internal data migration is provided for the second aspect of an embodiment of the present invention.
[0155] The present invention provides a flash memory reliability optimization system based on internal data migration, comprising:
[0156] The acquisition unit 201 is used to monitor whether the flash memory controller can record the number of P / E cycles of the block, and obtain the page type, the number of copyback operations and multiple real state distributions of each page in the block;
[0157] A first distribution error calculation unit 202, configured to calculate a first distribution error of a page according to the number of copyback operations of the page and a plurality of real state distributions, if possible;
[0158] A second distribution error determination unit 203 is used to determine, if not possible, based on a preset variation graph, a second distribution error corresponding to alignment of all noise points of different page types on the same word line in the preset variation graph;
[0159] An estimation matrix generation unit 204 is used to construct a copyback optimization function and its constraint function, and estimate an estimation matrix of the page by combining the number of copyback operations of the page and a plurality of real state distributions;
[0160] A copyback remaining operation number prediction unit 205 is used to input all second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of copyback remaining operations of each page type of the page;
[0161] The verification unit 206 is used to start ECC to verify the data of the page when the first distribution error is greater than the preset first distribution error; or when the number of remaining page type copyback operations of the page is 0, start ECC to verify the data of the page type.
[0162] Furthermore,
[0163] The first distribution error is calculated as:
[0164]
[0165] In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
[0166] Further, the second distribution error determination unit includes:
[0167] An enhanced distribution error formula construction subunit is used to construct enhanced distribution error formulas of different state probability distributions according to the page type of the page;
[0168] A second distributed error determination subunit is used to obtain first distributed errors of all noise points of different page types aligned on the same word line in a preset variation graph based on an enhanced distributed error formula, and use the first distributed errors of different page types as second distributed errors;
[0169] The preset change graph specifically includes the distribution change of the number of copyback operations and the first distribution error of different page types under different noise environments;
[0170] The enhanced distribution error formula is:
[0171]
[0172] In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
[0173] Furthermore,
[0174] Copyback optimization function for:
[0175]
[0176] In the formula, Indicates in status Multiple fitting errors under The sum of the absolute values of Indicates that after k copyback operations, the state is The actual distribution value under and estimated distribution values The fitting error between Indicates status Transfer to state The estimated probability of
[0177] The constraint function is:
[0178]
[0179] In the formula, Indicates status Transfer to state The estimated probability of n represents the state type of the storage unit.
[0180] Furthermore, the copyback remaining operation count prediction unit is specifically used to:
[0181] Initialize the remaining number of copyback operations for each page type;
[0182] Based on the estimation matrix, the estimated state distribution of each page type is calculated through the copyback Markov prediction model;
[0183] Inputting the estimated state distribution into the enhanced distribution error formula to generate a third distribution error of the page type;
[0184] When the third distribution error of the page type is greater than the second distribution error corresponding to the page type, the number of remaining copyback operations of the output page type is 0;
[0185] When the third distribution error of the page type is not greater than the second distribution error of the page type, the remaining number of copyback operations of the page type is increased by one, and the process jumps to the step of calculating the estimated state distribution of each page type of the page through the copyback Markov prediction model based on the estimation matrix, until the third distribution error of the page type is greater than the second distribution error of the page type, and the remaining number of copyback operations of the page type of the page is output.
[0186] A third aspect of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes, and the program codes are used to execute any of the above flash memory reliability optimization methods.
[0187] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0188] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0189] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0190] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0192] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flash memory reliability optimization method based on internal data migration, characterized in that the method include: Monitor whether the flash memory controller can record the number of P / E cycles of the block, and obtain the page type, the number of copyback operations and multiple real state distributions of each page in the block; the real state distribution includes the initial state distribution of the flash memory and the state distribution after migration k times; If possible, a first distribution error of the page is calculated according to the number of copyback operations of the page and a plurality of real state distributions; the first distribution error is used to quantify the difference between the initial state distribution of the page and the state distribution after the copyback migration, and the first distribution error is used to predict whether a specific page reaches the maximum copyback counting capacity; If not, determine based on a preset change graph that different page types on the same word line align second distribution errors corresponding to all noise points in the preset change graph; the preset change graph specifically includes the number of copyback operations of different page types under different noise environments and the distribution changes of the first distribution errors; Construct the copyback optimization function and its constraint function, and estimate the state transition probability matrix of the page by combining the number of copyback operations and multiple real state distributions; Inputting all the second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of remaining copyback operations for each page type of the page; When the first distribution error is greater than the preset first distribution error, the ECC is started to check the data of the page; or when the number of remaining operations of the page type copyback of the page is 0, the ECC is started to check the data of the page type of the page; The step of determining different page types of the same word line based on the preset variation graph and aligning the second distribution errors corresponding to all noise points in the preset variation graph specifically includes: Constructing an enhanced distribution error formula for probability distribution of different states according to the page type of the page; the enhanced distribution error formula is used to add an exponential constraint term to the first distribution error formula to enhance the first distribution error formula; Based on the enhanced distribution error formula, first distribution errors of all noise points of different page types aligned on the same word line are obtained in the preset change map, and the first distribution errors of the different page types are used as second distribution errors; The copyback optimization function for: ; In the formula, Indicates in status Multiple fitting errors under The sum of the absolute values of Indicates that after k copyback operations, the state is The actual distribution value under and estimated distribution values The fitting error between Indicates status Transfer to state The estimated probability of The constraint function is: ; Where: Indicates status Transfer to state The estimated probability of 1,...,n}, where n represents the state type of the storage unit.
2. The flash memory reliability optimization method according to claim 1, characterized in that: The first distribution error is calculated as follows: ; In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
3. The flash memory reliability optimization method according to claim 1, characterized in that: The enhanced distribution error formula is: ; In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
4. The flash memory reliability optimization method according to claim 3, characterized in that: The prediction step of the estimated copyback count prediction model includes: Initialize the remaining number of copyback operations for each page type; Based on the estimation matrix, the estimated state distribution of each page type is calculated by using the copyback Markov prediction model; Inputting the estimated state distribution into the enhanced distribution error formula to generate a third distribution error of the page type; When the third distribution error of the page type is greater than the second distribution error corresponding to the page type, the remaining number of copyback operations of the output page type is 0.
5. The flash memory reliability optimization method according to claim 4, characterized in that: The prediction step of estimating the copyback count prediction model further includes: When the third distribution error of the page type is not greater than the second distribution error of the page type, the remaining number of copyback operations of the page type is increased by one, and the process jumps to the step of calculating the estimated state distribution of each page type of the page through the copyback Markov prediction model based on the estimation matrix, until the third distribution error of the page type is greater than the second distribution error of the page type, and the remaining number of copyback operations of the page type of the page is output.
6. A flash memory reliability optimization system based on internal data migration, characterized in that: include: An acquisition unit is used to monitor whether the flash memory controller can record the number of P / E cycles of the block, and to acquire the page type, the number of copyback operations and multiple real state distributions of each page in the block; the real state distribution includes the initial state distribution of the flash memory and the state distribution after migration k times; a first distribution error calculation unit, configured to calculate a first distribution error of the page according to the number of copyback operations of the page and a plurality of real state distributions, if possible; the first distribution error is used to quantify the difference between the initial state distribution of the page and the state distribution after the copyback migration, and to predict whether a specific page reaches a maximum copyback counting capacity by using the first distribution error; A second distribution error determination unit is used to determine, if not possible, based on a preset change graph, that different page types on the same word line align second distribution errors corresponding to all noise points in the preset change graph; the preset change graph is specifically the number of copyback operations of different page types under different noise environments and the distribution change of the first distribution error; An estimation matrix generation unit is used to construct a copyback optimization function and its constraint function, and estimate the state transition probability matrix of the page by combining the number of copyback operations and multiple real state distributions; A copyback remaining operation number prediction unit, used for inputting all the second distribution errors and the estimation matrix into an estimated copyback count prediction model to predict the number of copyback remaining operations of each page type of the page; A verification unit, configured to start ECC to verify the data of the page when the first distribution error is greater than a preset first distribution error; or start ECC to verify the data of the page type of the page when the number of remaining operations of the page type copyback of the page is 0; The second distribution error determination unit comprises: An enhanced distribution error formula construction subunit is used to construct an enhanced distribution error formula for probability distribution of different states according to the page type of the page; the enhanced distribution error formula is used to add an exponential constraint term to the first distribution error formula to enhance the first distribution error formula; A second distributed error determination subunit is used to obtain first distributed errors of all noise points of different page types aligned on the same word line in a preset variation graph based on an enhanced distributed error formula, and use the first distributed errors of different page types as second distributed errors; The copyback optimization function for: ; In the formula, Indicates in status Multiple fitting errors under The sum of the absolute values of Indicates that after k copyback operations, the state is The actual distribution value under and estimated distribution values The fitting error between Indicates status Transfer to state The estimated probability of The constraint function is: ; Where: Indicates status Transfer to state The estimated probability of 1,...,n}, where n represents the state type of the storage unit.
7. The flash memory reliability optimization system according to claim 6, characterized in that: The first distribution error is calculated as follows: ; In the formula, is the first distribution error, Indicates the status of the page, k indicates the number of copyback operations, Indicates that it is in The initial true state probability of the state, Indicates that after k copyback operations, the migration is in The true state probability of the state.
8. The flash memory reliability optimization system according to claim 6, characterized in that: The enhanced distribution error formula is: ; In the formula, is the second distribution error, Indicates The initial true state probability of the state, Indicates the migration after k copyback operations. The true state probability of the state, is the index constraint term, is a constraint parameter.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the flash memory reliability optimization method according to any one of claims 1-5.
