Data storage method and device, equipment, and medium of a flash memory device
By converting and processing the user raw data of the TLC NAND flash memory device and determining the data storage order, the stability and reliability problems of the TLC NAND flash memory device are solved when storing data, and the storage reliability and stability of data are improved.
Patent Information
- Application Number
- CN202510437419.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-09
AI Technical Summary
TLC NAND flash memory devices have stability and reliability problems when storing data, especially in applications such as industrial and automotive, which require high data stability and reliability.
By performing data conversion processing on the acquired user raw data, the first user page data and the second user page data are generated, and the target storage page of the temporary page data is determined from three different types of candidate storage pages, the data processing order is determined based on the target storage page, and finally the data processing and data storage are performed according to the data processing order, so as to improve the storage data reliability and stability of the TLC NAND flash memory device.
This method can improve the storage data reliability and stability of TLC NAND flash memory devices, reduce the number of errors, and is suitable for applications that require loose storage capacity but strict reliability.
Smart Images

Figure CN119937938B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of flash memory storage technology, and in particular to a data storage method, apparatus, device, and medium for a flash memory device. Background Art
[0002] The triple-level cell (TLC) NAND flash memory device achieves a good balance among capacity, performance, reliability, and cost, and is the mainstream storage type in the current market. Nand Flash is a non-volatile random access storage medium that uses floating-gate transistors as storage units to store data. A TLC storage unit can store 3 bits of data. Therefore, the number of electrons in its floating-gate transistor has 8 states, the interval between each state is reduced, and accidental injection or loss of electrons may occur during read / write interference and data retention, resulting in a reduced error tolerance rate of the flash memory and poor stability and reliability of the stored data. In fields such as industrial and automotive applications, the requirement for storage capacity is relatively loose, but the requirement for data stability and reliability is very strict. Therefore, a technical solution is needed to solve the problems of the stability and reliability of storing data in a flash memory device. Summary of the Invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. For this purpose, the present application provides a data storage method, apparatus, device, and medium for a flash memory device, which can improve the reliability and stability of storing data in a flash memory device of the TLC NAND type.
[0004] In a first aspect, an embodiment of the present application provides a data storage method for a flash memory device, which is applied to a data storage device of the flash memory device. The data storage device of the flash memory device is electrically connected to the flash memory device. The type of the flash memory device is TLC NAND, and the flash memory device includes three different types of candidate storage pages;
[0005] The method includes:
[0006] Performing data conversion processing on the obtained first user raw data to obtain first user page data, and performing data conversion processing on the obtained second user raw data to obtain second user page data;
[0007] After determining the target storage page for the temporary page data from three different types of candidate storage pages, determine the data processing order according to the target storage page; wherein, the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the middle significant bit page, and the most significant bit page; the data processing order is used to indicate: the order of processing among the first user page data, the second user page data, and the temporary page data.
[0008] Perform data processing and data storage according to the data processing order, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages.
[0009] In a second aspect, an embodiment of the present application provides a data storage device for a flash memory device. The data storage device is electrically connected to the flash memory device, and the type of the flash memory device is TLC NAND; the flash memory device includes three different types of candidate storage pages; the data storage device of the flash memory device is used to execute the data storage method of the flash memory device according to any one of the embodiments of the first aspect.
[0010] In a third aspect, an embodiment of the present application provides an electronic device, including the data storage device of the flash memory device according to the embodiment of the second aspect.
[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, storing computer-executable instructions, which are used to implement the data storage method of the flash memory device according to the first aspect when being executed by a processor.
[0012] Embodiments of the present application include: In the process of storing data in a flash device using a data storage device, first, the acquired first user raw data is subjected to data conversion processing to obtain first user page data, and the acquired second user raw data is subjected to data conversion processing to obtain second user page data; then, after determining the target storage page of the temporary page data from three different types of candidate storage pages, the data processing order is determined according to the target storage page; wherein, the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the middle significant bit page, and the most significant bit page; the data processing order is used to indicate: the sequence of processing the first user page data, the second user page data, and the temporary page data; finally, data processing and data storage are performed according to the data processing order, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages. A group of temporary page data is generated based on the first user page data and the second user page data written to the TLC NAND, and a total of three groups of data to be stored are obtained (i.e., the first user page data, the second user page data, and the temporary page data), sacrificing one-third of the storage capacity of the TLC NAND and reducing the effective states of the storage cells from 8 to 4. When reading the data stored in the TLC NAND, the read threshold voltages of the three page types are offset, which can make the read threshold voltages more easily located at the central position between the two effective states, greatly reducing the number of errors and improving the reliability and stability of the product. That is to say, the embodiments of the present application can improve the reliability and stability of storing data in flash devices of the TLC NAND type. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic diagram of the specific structure of a data storage device of a flash device provided by an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of the threshold voltage distribution of the TLC NAND provided by an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of the distribution of 0 and 1 of three pages in the TCL NAND after XNOR operation provided by an embodiment of the present application;
[0016] Figure 4 is a schematic diagram of the state distribution of the TLC NAND after XNOR operation provided by an embodiment of the present application;
[0017] Figure 5It is a schematic flowchart of a data storage method of a flash memory device provided by an embodiment of the present application;
[0018] Figure 6 It is a schematic diagram of the process of data conversion processing provided by an embodiment of the present application;
[0019] Figure 7 It is a schematic flowchart of data storage when the target storage page of the temporary page data is the MSB Page provided by an embodiment of the present application;
[0020] Figure 8 It is a schematic flowchart of data storage when the target storage page of the temporary page data is the CSB Page provided by an embodiment of the present application;
[0021] Figure 9 It is a schematic flowchart of data storage when the target storage page of the temporary page data is the LSB Page provided by an embodiment of the present application. Detailed implementation manners
[0022] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0023] It should be understood that in the description of the present application, the orientation descriptions involved, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present application.
[0024] It should be noted that although the logical order is shown in the flowchart in the description of the present application, in some cases, the steps shown or described can be executed in a different order from that in the flowchart. In the description of the present application, the meaning of several is one or more, and the meaning of multiple is two or more. The descriptions of "first" and "second" are only for the purpose of distinguishing technical features, and should not be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or the sequence of the indicated technical features.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0026] First, several nouns involved in the present application are explained:
[0027] Error Checking and Correcting (ECC) Encode: An algorithm used for error detection and correction.
[0028] Random Seed: A random number that uses a true random number (seed) as the initial condition with random numbers as the object.
[0029] The present application provides a data storage method for a flash memory device, a data storage device for a flash memory device, an electronic device, and a computer-readable storage medium. The method includes: performing data conversion on first user original data to obtain first user page data, and performing data conversion on second user original data to obtain second user page data; determining a target storage page for the temporary page data from three different types of candidate storage pages, and determining a data processing order according to the target storage page; the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; performing data processing and data storage according to the data processing order so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two types of candidate storage pages. It can improve the reliability and stability of storing data in TLC NAND. It can improve the reliability and stability of storing data in flash memory devices of the TLC NAND type.
[0030] The following further elaborates on the embodiments of the present application with reference to the accompanying drawings.
[0031] As Figure 1 shown, the data storage device 100 is electrically connected to the flash memory device. The type of the flash memory device is TLC NAND, and the flash memory device includes three different types of candidate storage pages; specifically, the data storage device 100 includes: a data processing unit 110, a first cache unit 120, a second cache unit 130, and a logical operation unit 140; the output ends of the data processing unit 110 are respectively electrically connected to the output ends of the first cache unit 120, the second cache unit 130, and the flash memory device; the output ends of the first cache unit 120 and the second cache unit 130 are both electrically connected to the input end of the logical operation unit 140; the output end of the logical operation unit 140 is electrically connected to the input end of the flash memory device.
[0032] The data processing unit 110 is used to: obtain user original data and convert the user original data into user page data; the first cache unit 120 is used to store the first user page data, and the second cache unit 130 is used to store the second user page data; the logical operation unit 140 is used to perform a logical operation on the first user page data and the second user page data to obtain temporary page data.
[0033] Among them, the data storage device 100 of the flash memory device is used for: performing data conversion processing on the obtained first user raw data to obtain first user page data, and performing data conversion processing on the obtained second user raw data to obtain second user page data; after determining the target storage page of the temporary page data from three different types of candidate storage pages, determining the data processing order according to the target storage page; wherein, the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the central significant bit page, and the most significant bit page; the data processing order is used to indicate: the sequence of processing the first user page data, the second user page data, and the temporary page data; performing data processing and data storage according to the data processing order, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two types of candidate storage pages. The data storage device 100 of the flash memory device in the embodiment of the present application can execute the data storage method of the flash memory device provided by the embodiment of the present application, and can improve the reliability and stability of storing data in the flash memory device of the TLC NAND type.
[0034] The flash memory device provided by the embodiment of the present application is further described. Each storage unit of the flash memory device of the TLC NAND type can store 3 bits of data, namely LSB (Least Significant Bit, the least significant bit), CSB (Central Significant Bit, the central significant bit), and MSB (Most Significant Bit, the most significant bit). According to the type of stored bit data, the flash memory device has three page types: LSB Page (the least significant bit page), CSB Page (the central significant bit page), and MSB Page (the most significant bit page).
[0035] LSB (Least Significant Bit): The least significant bit, which is the bit with the smallest programming delay in the same storage unit. For a 3-bit flash memory device, since the programming threshold of the least significant bit is the lowest, the LSB is usually the first bit to be written.
[0036] CSB (Central Significant Bit): The central significant bit, located between the LSB and the MSB, and its programming delay is between the two. In some programming modes, the CSB may be the bit written immediately after the LSB.
[0037] MSB (Most Significant Bit): The most significant bit, which has the highest programming threshold and the maximum programming delay in the same memory cell. Therefore, the most significant bit is the last bit to be programmed.
[0038] As Figure 2 shown, it is a typical TLC NAND Vth (Threshold Voltage) distribution diagram: For the LSB Page, the value is 0 between read voltages A and E, and 1 outside read voltages A and E; For the CSB Page, using read voltage D as the demarcation line, the value is 1 to the left of read voltage B, 0 to the right of read voltage B, 1 to the left of read voltage E, and 0 to the right of read voltage E. For the MSB Page, the value is 0 between read voltages C and G, and 1 outside read voltages C and G.
[0039] If the data obtained by XNORing CSB and MSB is written into the LSB Page, the CSB Page and MSB Page are still normally written with the data obtained by XNORing CSB and MSB. The 0 and 1 distributions of the three Pages are as Figure 3 shown. It can be found that ER and A are both in the state of 111, B and G are both in the state of 001, C and F are both in the state of 100, and D and E are both in the state of 010. The cell originally in state A is forced to be classified into state ER, the cell originally in state G is classified into state B, the cell originally in state C is classified into state F, and the cell originally in state E is classified into state D. Therefore, finally, there are only 4 types of cells, resulting in four peaks of Er, B, D, and F as Figure 4 shown, which is similar to the Vth distribution of MLC NAND. Therefore, this TLC NAND is called pMLC (Pseudo-MLC) NAND. Similarly, regardless of whether the XNOR data is written into the LSB Page, CSB Page, or MSB Page, and regardless of whether it is an XNOR operation or an XOR operation, this TLC-to-pMLC method has the same effect. It can be seen that pMLC improves the reliability of data storage at the cost of sacrificing 1 / 3 of the storage capacity, and can be applied to industrial or automotive products with relatively loose requirements for storage capacity but very strict requirements for reliability.
[0040] Those skilled in the art can understand that the system structure shown in the figure does not limit the embodiments of the present application, and may include more or fewer components than shown, or combine some components, or have different component arrangements.
[0041] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0042] Those skilled in the art can understand that the system architecture and application scenarios described in the embodiments of this application are for more clearly explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art know, with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0043] Based on the above system structure, various embodiments of the data storage method of the flash memory device of this application are proposed below.
[0044] As Figure 5 shown, the data storage method of the flash memory device can be applied to the data storage device of the flash memory device as Figure 1 shown. The data storage device of the flash memory device is electrically connected to the flash memory device. The type of the flash memory device is TLC NAND. The flash memory device includes three different types of candidate storage pages. The data storage method of the flash memory device may include but is not limited to steps S110 to S130.
[0045] Step S110: Perform data conversion processing on the obtained first user raw data to obtain first user page data, and perform data conversion processing on the obtained second user raw data to obtain second user page data.
[0046] Step S120: After determining the target storage page of the temporary page data from the three different types of candidate storage pages, determine the data processing order according to the target storage page; wherein, the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the middle significant bit page, and the most significant bit page; the data processing order is used to indicate: the sequence of processing the first user page data, the second user page data, and the temporary page data.
[0047] Step S130: Perform data processing and data storage according to the data processing order, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages.
[0048] Through steps S110 to S130, in the process of storing data in the flash memory device using the data storage device, first, the obtained first user raw data is subjected to data conversion processing to obtain the first user page data, and the obtained second user raw data is subjected to data conversion processing to obtain the second user page data; then, after determining the target storage page of the temporary page data from three different types of candidate storage pages, the data processing order is determined according to the target storage page; wherein, the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the middle significant bit page, and the most significant bit page; the data processing order is used to indicate: the sequential processing order among the first user page data, the second user page data, and the temporary page data; finally, data processing and data storage are performed according to the data processing order, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages. Generate a group of temporary page data according to the first user page data and the second user page data written into the TLC NAND, and a total of three groups of data to be stored are obtained (i.e., the first user page data, the second user page data, and the temporary page data). One-third of the storage capacity of the TLC NAND is sacrificed, and the effective state of the storage unit is reduced from 8 to 4. When reading the data stored in the TLC NAND, the read threshold voltages of the three page types are offset, which can make the read threshold voltage more easily located at the central position of the two effective states, greatly reducing the number of errors and improving the reliability and stability of the product. Therefore, the embodiments of the present application can improve the reliability and stability of storing data in this type of flash memory device, namely the TLC NAND.
[0049] According to some embodiments of the present application, step S110 is further described. Among them, the data conversion processing includes but is not limited to steps S210 to S230.
[0050] Step S210: Divide the user raw data to be processed into N data blocks of a fixed length; the user raw data to be processed is: the first user raw data or the second user raw data.
[0051] Step S220: Perform codeword conversion processing on the N data blocks respectively to obtain N target codewords; wherein, the codeword conversion processing includes: randomization processing, error checking and correction coding processing, and data supplementation processing performed in sequence.
[0052] Step S230: Combine the N target codewords to obtain a target user Page data.
[0053] In step S210, as Figure 6 shown, the original user data D to be processed is divided into N data blocks (BLK_N) of a fixed length, laying a data foundation for subsequent codeword conversion processing and codeword combination.
[0054] It can be understood that when the original user data is the first original user data, after the data conversion processing shown in steps S210 and S230, the corresponding target user Page data obtained is the first user Page data; when the original user data is the second original user data, after the data conversion processing shown in steps S210 and S230, the corresponding target user Page data obtained is the second user Page data.
[0055] According to some embodiments of the present application, step S220 is further described. Among them, the codeword conversion processing includes but is not limited to steps S221 to S224.
[0056] Step S221: Generate a string of first random data of the same length as a data block to be processed, and perform exclusive OR processing on the data block to be processed and the first random data to obtain a randomized data block.
[0057] Step S222: Perform error checking and correction coding processing on the randomized data block to obtain an ECC check code.
[0058] Step S223: Add the ECC check code after the randomized data block to obtain an initial codeword.
[0059] Step S224: When the length of the initial codeword is less than the page size of the flash device, use second random data to supplement the initial codeword to obtain a target codeword; the length of the target codeword is equal to the page size.
[0060] Specifically, the randomization processing (Random) is achieved through step S221. The randomization processing is specifically as follows: Use a Random Seed to generate a string of first random data of the same length as a data block to be processed (such as Figure 6 shown: BLK_1), and perform exclusive OR processing on the data block to be processed and the first random data to obtain a randomized data block (that is, as Figure 6 shown: BLK_1 (Random)); in this way, the distribution of 0s and 1s in the data written into the TLC NAND can be made more balanced.
[0061] Specifically, the error checking and correction coding processing is achieved through step S222, and a set of ECC check codes are generated through ECC Encode (that is, as Figure 6As shown: ECC Parity Data), the ECC check code is appended after the randomized data block. The ECC check code is used to detect and correct data errors caused during data transmission and storage, restore the written user data, and improve the reliability of stored information.
[0062] Specifically, step S223 implements data supplementation processing. The second random data refers to Dummy data. When the length of an initial code word (Code Word, CW) is less than the NAND page size, the second random data is used to fill and complete the page data. After performing the processing of steps S221 to S224 on each divided data block BLK_1, BLK_2, ……, BLK_N respectively, the target code words CW_1, target code words CW_2, ……, target code words CW_N as shown Figure 6 can be correspondingly obtained. The target code words CW_1, target code words CW_2, ……, target code words CW_N are combined to obtain a target user Page data P.
[0063] In some embodiments, TLC NAND usually needs to be programmed page by page separately in the order of LSB Page, CSB Page, and MSB Page, and this order of processing the pages is fixed. Therefore, when the types of the pages where the generated temporary page data is stored are different, the data processing order among the first user page data, the second user page data, and the temporary page data is also different, and the data storage process is also different.
[0064] According to some embodiments of the present application, step S120 is further described. Among them, determining the data processing order according to the target storage page includes, but is not limited to: when the target storage page is: the most significant bit page, determining the data processing order to be: the first user page data, the second user page data, the temporary page data; when the target storage page is: the central significant bit page, determining the data processing order to be: the first user page data, the temporary page data, the second user page data; when the target storage page is: the least significant bit page, determining the data processing order to be: the temporary page data, the first user page data, the second user page data.
[0065] Furthermore, based on the different types of target storage pages where the temporary page data is stored, the data storage processes in each storage scenario are further described.
[0066] Through steps S221 to S224, the embodiment of the present application first processes the user's original data to generate user page data, and then performs logical operations on the user page data to generate temporary page data, which has the advantages of simplicity, high efficiency, and integrity in data processing.
[0067] According to some embodiments of the present application, the data storage device of the flash memory device further includes: a first cache unit and a second cache unit. Further illustrate step S130. Step S130: Perform data processing and data storage according to the data processing sequence, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages, including but not limited to steps S310 to S330.
[0068] Step S310: When the target storage page is the most significant bit page, write the first user page data to the least significant bit page, and at the same time store the first user page data in the first cache unit.
[0069] Step S320: Write the second user page data to the middle significant bit page, and at the same time store the second user page data in the second cache unit.
[0070] Step S330: Perform logical operation processing on the first user page data read from the first cache unit and the second user page data read from the second cache unit to obtain temporary page data, and write the temporary page data to the most significant bit page.
[0071] Specifically, the logical operation processing in step S330 is: exclusive NOR operation or exclusive OR operation.
[0072] Combined with Figure 7, further illustrate the scenario where the generated temporary page data needs to be stored in the most significant bit page. When the target storage page of the generated temporary page data P3 is to be stored in the MSB Page, the data processing unit first performs data conversion processing on the first user's original data D1 to generate the first user's page data P1, then writes the first user's page data P1 into the LSB Page, and at the same time stores the first user's page data P1 in the first cache unit. Secondly, the data processing unit then performs data conversion processing on the second user's original data D2 to generate the second user's page data P2, then writes the second user's page data P2 into the CSB Page, and at the same time stores the second user's page data P2 in the second cache unit. Finally, the first user's page data P1 and the second user's page data P2 are retrieved from the first cache unit and the second cache unit, and the first user's page data P1 and the second user's page data P2 are logically operated (including but not limited to exclusive OR / coincidence OR) by the logical operation unit to generate the temporary page data P3, and at the same time the temporary page data P3 is written into the MSB Page.
[0073] Through steps S310 to S330, the first user's page data, the second user's page data, and the temporary page data are orderly written into the TLC NAND.
[0074] According to some embodiments of the present application, step S130 is further illustrated. Step S130: Perform data processing and data storage according to the data processing order so that the temporary page data is stored in the target storage page, and the first user's page data and the second user's page data are respectively stored in the remaining two candidate storage pages, and further includes but is not limited to steps S410 to S440.
[0075] Step S410: When the target storage page is the central significant bit page, write the first user's page data into the least significant bit page, and at the same time store the first user's page data in the first cache unit.
[0076] Step S420: Store the second user's page data only in the second cache unit.
[0077] Step S430: Perform logical operation processing on the first user's page data read from the first cache unit and the second user's page data read from the second cache unit to obtain the temporary page data, and write the temporary page data into the central significant bit page.
[0078] Step S440: Write the second user's page data read from the second cache unit into the most significant bit page.
[0079] Specifically, the logical operation processing in step S430 is: exclusive NOR operation or exclusive OR operation.
[0080] Combined with Figure 8 , the scenario where the generated temporary page data needs to be stored in the central valid bit page is further described. When the target storage page of the generated temporary page data P3 is the CSB Page, first, the data processing unit performs data conversion processing on the first user's original data D1 to generate the first user's page data P1, then writes the first user's page data P1 into the LSB Page, and at the same time stores the first user's page data P1 in the first cache unit; secondly, the data processing unit performs data conversion processing on the second user's original data D2 to generate the second user's page data P2, and only stores the second user's page data P2 in the second cache unit; the first user's page data P1 and the second user's page data P2 are taken out from the first cache unit and the second cache unit, and the logical operation unit performs a logical operation (including but not limited to exclusive OR / exclusive NOR) on the first user's page data P1 and the second user's page data P2 to generate the temporary page data P3, and at the same time writes the temporary page data P3 into the CSB Page. Finally, the second user's page data P2 is taken out from the second cache unit and written into the MSBPage.
[0081] Through steps S410 to S440, the first user's page data, the temporary page data, and the second user's page data are orderly written into the TLC NAND.
[0082] According to some embodiments of the present application, step S130 is further described. Step S130: Perform data processing and data storage according to the data processing sequence, so that the temporary page data is stored in the target storage page, and the first user's page data and the second user's page data are respectively stored in the remaining two candidate storage pages, including but not limited to steps S510 to S540.
[0083] Step S510: When the target storage page is: the least significant bit page, store the first user's page data only in the first cache unit; store the second user's page data only in the second cache unit;
[0084] Step S520: Perform logical operation processing on the first user's page data read from the first cache unit and the second user's page data read from the second cache unit to obtain the temporary page data, and write the temporary page data into the least significant bit page;
[0085] Step S530: Write the first user's page data read from the first cache unit into the central valid bit page.
[0086] Step S540: Write the second user page data read from the second cache unit into the most significant bit page.
[0087] Specifically, the logical operation process in step S520 is: exclusive NOR operation or exclusive OR operation.
[0088] Combined with Figure 9 , further illustrate the scenario where the generated temporary page data needs to be stored in the least significant bit page. When the target storage page of the generated temporary page data P3 is the LSB page, first, the data processing unit performs data conversion processing on the first user's original data D1 to generate the first user's page data P1, which is only stored in the first cache unit. Secondly, the data processing unit performs data conversion processing on the second user's original data D2 to generate the second user's page data P2, and the second user's page data P2 is only cached in the second cache unit. Then, the first user's page data P1 and the second user's page data P2 are taken out from the first cache unit and the second cache unit, and the logical operation unit performs a logical operation (including but not limited to exclusive OR / exclusive NOR) on the first user's page data P1 and the second user's page data P2 to generate the temporary page data P3, and at the same time write the temporary page data P3 into the LSB Page; take out the first user's page data P1 from the first cache unit and write the first user's page data into the CSB Page. Finally, take out the second user's page data P2 from the second cache unit and write it into the MSB Page.
[0089] Through steps S510 to S540, the temporary page data, the first user's page data, and the second user's page data are orderly written into the TLC NAND.
[0090] The embodiment of the present application also provides an electronic device, including the data storage device of the flash memory device as described above. The electronic device provided by the embodiment of the present application can perform data conversion processing on two sets of acquired user original data, correspondingly obtain two sets of user page data, then perform a logical operation (including but not limited to exclusive OR / exclusive NOR) on the two sets of user page data to generate temporary page data, and finally store the three sets of data, namely the two sets of user page data and the temporary page data, into the corresponding type of Page in the TLC NAND; the two sets of user page data can be stored in any two types of pages among the three types of pages in the TLC NAND, and the generated temporary page data is stored in the remaining one type of page. This storage method can greatly improve the stability and reliability of storing data in the TLC NAND.
[0091] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the data storage method of the above flash memory device is implemented.
[0092] As a non-transitory computer-readable storage medium, a memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0093] Those of ordinary skill in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical disk storage, magnetic cassette, tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium generally includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0094] The above is a specific description of the preferred embodiment of the present application. However, the present application is not limited to the above-mentioned embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the present application.
Claims
1. A data storage method for a flash memory device, characterized in that: A data storage device applied to a flash memory device, the data storage device of the flash memory device is electrically connected to the flash memory device, the type of the flash memory device is TLC NAND, and the flash memory device includes three different types of candidate storage pages; The method comprises: Performing data conversion processing on the acquired original data of the first user to obtain first user page data, and performing data conversion processing on the acquired original data of the second user to obtain second user page data; After determining the target storage page of the temporary page data from three different types of candidate storage pages, determining the data processing order according to the target storage page; wherein the temporary page data is obtained by performing a logical operation on the first user page data and the second user page data; the three different types of candidate storage pages include: the least significant bit page, the central significant bit page, and the most significant bit page; the data processing order is used to indicate: the order of processing the first user page data, the second user page data, and the temporary page data; Data processing and data storage are performed according to the data processing sequence, so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages.
2. The data storage method of the flash memory device according to claim 1, characterized in that: The data conversion process includes: Dividing the user original data to be processed into N data blocks of fixed length; the user original data to be processed is: the first user original data or the second user original data; Performing codeword conversion processing on the N data blocks respectively to obtain N target codewords; wherein the codeword conversion processing includes: randomization processing, error checking and correction coding processing, and data supplementation processing performed in sequence; The N target code words are combined to obtain a target user Page data.
3. The data storage method of the flash memory device according to claim 2, characterized in that: The codeword conversion process includes: Generate a string of first random data of the same length as a data block to be processed, perform XOR processing on the data block to be processed and the first random data to obtain a randomized data block; Performing error checking and correction coding processing on the randomized data block to obtain an ECC check code; Adding the ECC check code after the randomized data block to obtain an initial codeword; When the length of the initial codeword is smaller than the page size of the flash memory device, the second random data is used to supplement the initial codeword to obtain the target codeword; the length of the target codeword is equal to the page size.
4. The data storage method of the flash memory device according to claim 1, characterized in that: The step of determining the data processing order according to the target storage page comprises: When the target storage page is the most significant bit page, the data processing order is determined to be: first user page data, second user page data, temporary page data; When the target storage page is a central valid bit page, the data processing order is determined to be: first user page data, temporary page data, and second user page data; When the target storage page is the least significant bit page, the data processing sequence is determined to be: temporary page data, first user page data, and second user page data.
5. The data storage method of the flash memory device according to claim 4, characterized in that: The data storage device of the flash memory device further includes: a first cache unit and a second cache unit; The data processing and data storage are performed according to the data processing sequence so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages, including: When the target storage page is: the most significant bit page, writing the first user page data into the least significant bit page, and storing the first user page data into the first cache unit; Writing the second user page data into the central valid bit page, and storing the second user page data into the second cache unit; A logical operation is performed on the first user page data read from the first cache unit and the second user page data read from the second cache unit to obtain temporary page data, and the temporary page data is written into the most significant bit page.
6. The data storage method of the flash memory device according to claim 5, characterized in that: The data processing and data storage are performed according to the data processing sequence so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages, including: When the target storage page is a central valid bit page, the first user page data is written into a least valid bit page, and the first user page data is stored in the first cache unit; storing the second user page data only in the second cache unit; Performing logic operation processing on the first user page data read from the first cache unit and the second user page data read from the second cache unit to obtain temporary page data, and writing the temporary page data into the central valid bit page; The second user page data read from the second cache unit is written into the most significant bit page.
7. The data storage method of the flash memory device according to claim 5, characterized in that: The data processing and data storage are performed according to the data processing sequence so that the temporary page data is stored in the target storage page, and the first user page data and the second user page data are respectively stored in the remaining two candidate storage pages, including: When the target storage page is the least significant bit page, the first user page data is stored only in the first cache unit; the second user page data is stored only in the second cache unit; Performing logic operation processing on the first user page data read from the first cache unit and the second user page data read from the second cache unit to obtain temporary page data, and writing the temporary page data into the least significant bit page; Writing the first user page data read from the first cache unit into the central valid bit page; The second user page data read from the second cache unit is written into the most significant bit page.
8. A data storage device of a flash memory device, characterized in that: The data storage device is electrically connected to the flash memory device, and the type of the flash memory device is TLC NAND; the flash memory device includes three different types of candidate storage pages; the data storage device of the flash memory device is used to execute the data storage method of the flash memory device as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: A data storage device comprising the flash memory device as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the data storage method of the flash memory device according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for screening data items in separated pages of web page
CN102521296A
Memory System And Processor System
CN107844263A