Data writing method, electronic equipment and computer readable storage medium

By utilizing the calculation processing of cache pages and data cache areas in the QLC Flash storage device, the problem of low QLC Flash mode conversion efficiency is solved, and the data writing speed and computing efficiency are improved.

CN118778879APending Publication Date: 2024-10-15ZHONGSHAN JIANGBOLONG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310374326.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2024-10-15

Smart Images

  • Figure CN118778879A_ABST
    Figure CN118778879A_ABST
Patent Text Reader

Abstract

The invention discloses a data writing method, electronic equipment and a computer readable storage medium. The method comprises the following steps: in response to a data writing instruction, sequentially writing data corresponding to the data writing instruction into each cache page; in the process of writing in the cache page, obtaining first cache page data; writing the first cache page data into a data cache region; obtaining second cache page data; performing operation processing by using the second cache page data and the data in the data cache region to obtain a first operation result, and replacing the data in the data cache region by using the first operation result; writing the latest data in the data cache region into the data storage region to complete data writing of the storage device; wherein the latest data is obtained based on all data in the at least two cache pages. By means of the mode, the efficiency of mode conversion of the storage device can be improved, and the writing speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage, and in particular to a data writing method, an electronic device and a computer-readable storage medium. Background Art

[0002] With the development of storage technology, the manufacturing level of Flash has evolved from SLC to MLC, and then to TLC and QLC. Although the storage capacity is constantly increasing, the data storage capacity is also decreasing step by step. As QLC Flash is more and more widely used, how to improve the data storage capacity and utilization of QLC is a huge challenge. Usually, QLC is converted to TLC for use. Although there will be a loss of capacity, the data storage capacity is greatly improved. However, the general conversion method uses two data cache areas to complete the mode conversion operation during use, which is inefficient and has a slow writing speed. Therefore, how to improve the conversion efficiency and increase the writing speed has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0003] The main purpose of this application is to provide a data writing method, an electronic device and a computer-readable storage medium, which can solve the technical problems of low efficiency and slow writing speed when the storage device mode is converted.

[0004] In order to solve the above technical problems, the first technical solution adopted by the present application is: to provide a data writing method. The method is applied to a storage device, which includes at least two cache pages, a data cache area and a data storage area. The method includes: in response to a data write instruction, writing the data corresponding to the data write instruction to each cache page in sequence; in the process of writing the cache page, obtaining the first cache page data; writing the first cache page data to the data cache area; and obtaining the second cache page data; using the second cache page data and the data in the data cache area to perform calculations to obtain a first calculation result, and using the first calculation result to replace the data in the data cache area; writing the latest data in the data cache area to the data storage area to complete the data writing of the storage device; wherein the latest data is obtained based on all the data in at least two cache pages.

[0005] To solve the above technical problem, the second technical solution adopted by the present application is to provide an electronic device, which includes a memory and a processor, wherein the memory is used to store program data, and the program data can be executed by the processor to implement the method described in the first technical solution.

[0006] To solve the above technical problems, the third technical solution adopted by the present application is to provide a computer-readable storage medium. The computer-readable storage medium stores program data and can be executed by a processor to implement the method described in the first technical solution.

[0007] The beneficial effect of the present application is: in response to a data write instruction, the data is written into the cache page in sequence. The first cache page data is obtained and written into the data cache area, and then the data of the second cache page is obtained, and the data is processed with the first cache page data in the data cache area to obtain a first operation result, and the first operation result is used to replace the first cache page data in the data cache area, and then the data based on the first operation result as the latest data is written to complete the data writing to the storage device. By using only one data cache area, the operation processing of the cache page data is completed, and there is no need to read the data of the second cache page into the data cache area, which reduces the operation process, improves the calculation efficiency, and speeds up the data writing speed when the storage mode of the storage device is converted. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0009] Figure 1 This is a schematic diagram of QLC mode conversion in this application;

[0010] Figure 2 It is a flowchart of the first embodiment of the data writing method of the present application;

[0011] Figure 3 It is a flowchart of the second embodiment of the data writing method of the present application;

[0012] Figure 4 It is a schematic diagram of the corresponding relationship of a data page;

[0013] Figure 5 It is a flowchart of the third embodiment of the data writing method of the present application;

[0014] Figure 6 It is a flowchart of the fourth embodiment of the data writing method of the present application;

[0015] Figure 7 It is a structural schematic diagram of the first embodiment of the electronic device of the present application;

[0016] Figure 8 It is a structural diagram of the first embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0019] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0020] Before introducing the technical solution of the present application, a brief introduction to the related technologies is first given.

[0021] DMA, Direct Memory Access, is also called group data transfer mode, and sometimes direct memory operation. In DMA, since the CPU does not participate in the transfer operation, the CPU operations such as fetching instructions, fetching data, and sending data are omitted. Memory address modification, counting of the number of transferred words, etc. are not implemented by software, but are directly implemented by hardware circuits. The DMA method can meet the requirements of high-speed I / O devices and is also conducive to the performance of CPU efficiency.

[0022] DMA provides two modes. Mode A: Data from the Nand interface is stored in the specified data buffer after a series of operations by the ECC and randomization modules. Mode B: Data from the Nand interface is physically stored in the specified data buffer without passing through the ECC and randomization modules.

[0023] During the QLC storage process, data is stored in four cache pages according to the write voltage, and then the voltage written to the data storage area is determined by the data of the four cache pages, and finally the data is written.

[0024] Reference Figure 1 , Figure 1 The figure is a schematic diagram of QLC mode conversion. The general QLC mode conversion scheme reads the data of the four cache pages in sequence in DMA mode B, and then uses software to perform XOR / XOR operations to achieve mode conversion. If it is QLC to TLC, the data of page0 will be read into DMA buff0, and the data of page1 will be read into DMA buff1. Then the data of DMA buff0 and DMA buff1 are XOR / XOR operations are performed, and the operation results are stored in DMAbuff0. Finally, the data is written according to the data of DMA buff0 and page2 and page3 to complete the conversion of TLC mode. If it is QLC to MLC, after the above DMA buff0 and DMA buff1 complete the operation and store the operation results in DMAbuff0, the data of page2 is read into DMA buff1, and the data of DMA buff0 and DMA buff1 are XOR / XOR operations are performed again, and the operation results are stored in DMA buff0. Finally, the data is written according to the data of DMA buff0 and page3 to complete the conversion of MLC mode. If it is QLC to SLC conversion, then after reading the data of page2 into DMA buff1, performing XOR / XOR operation on the data of DMA buff0 and DMA buff1 again, and storing the operation result in DMA buff0, read the data of page3 into DMA buff1, performing XOR / XOR operation on the data of DMA buff0 and DMA buff1 again, and storing the operation result in DMA buff0, the writing of the number is completed with the data of DMA buff0 to complete the conversion of SLC mode.

[0025] The above process is very inefficient, and data processing can only start after reading the data of all cache pages, and two DMA buffs need to be used during the processing.

[0026] Reference Figure 2 , Figure 2 This is a flow chart of the first embodiment of the data writing method of the present application. The method is applied to a storage device. The storage device includes at least two storage pages, a data buffer area and a data storage area. The method includes the following steps:

[0027] S11: In response to a data write instruction, write data corresponding to the data write instruction into each cache page in sequence.

[0028] Based on the data write instruction, the data to be written to the data storage area is stored in each cache page according to the write voltage. If the original storage mode of the storage device is QLC mode, it needs to be written to four cache pages, if the original storage mode is TLC mode, it needs to be written to three cache pages, and if the original storage mode is MLC mode, it needs to be written to two cache pages.

[0029] During the process of writing cache page data, the writing is also completed in order. The writing of the previous cache page can be completed before the writing of the next cache page.

[0030] Before writing data to the cache page, the target storage mode of the storage device may be predetermined for use in subsequent computational processing of the storage page data.

[0031] S12: In the process of writing the cache page, obtaining first cache page data.

[0032] In the process of writing the cache page, data is first written into the first cache page, and then data of the first cache page is obtained.

[0033] S13: Writing the first cache page data into the data cache area.

[0034] The acquired first cache page data is written into the data cache area.

[0035] In one embodiment, the method of writing the first cache page data into the data cache area is DMA mode B, that is, directly writing into the data cache area without ECC and random block processing.

[0036] S14: Acquire the second cache page data.

[0037] After the first cache page data is written into the data cache area, the second cache page data is acquired.

[0038] S15: performing calculation processing using the second cache page data and the data in the data cache area to obtain a first calculation result, and replacing the data in the data cache area with the first calculation result.

[0039] S16: Writing data into the data storage area based on the latest data in the data cache area to complete the data writing of the storage device.

[0040] The acquired second cache page data and the first cache page data in the data cache unit are operated to obtain a first result, and the first cache page data in the data cache area is replaced with the first result.

[0041] After all data operations on the cache page are completed, the data is written to the data storage area based on the latest data in the data cache area to complete the data writing.

[0042] The latest data is obtained based on all data in at least two cache pages. The number of cache pages on which the latest data is based is related to the original storage mode and the target storage mode of the storage device. If the storage device is in QLC to TLC mode, the storage device has four cache pages: the first cache page, the second cache page, the third cache page, and the fourth cache page. The latest data is the result of the operation based on all data of the first cache page and the second cache page. Then the data is written to the data storage area according to the latest data, the data of the third cache page, and the fourth cache page. If the storage device is in QLC to MLC mode, the latest data is the result of the operation based on the first cache page, the second cache page, and the third cache page. Then the data is written to the data storage area according to the latest data and the data of the fourth cache page. If the storage device is in TLC to MLC mode, the storage device has three cache pages: the first cache page, the second cache page, and the third cache page. The latest data is the result of the operation based on the first cache page and the second cache page. Then the data is written to the data storage area according to the latest data and the data of the third cache page. By analogy, the conversion of the storage device from high-capacity mode to low-capacity mode is completed.

[0043] In this embodiment, in response to a data write instruction, data is written into the cache page in sequence. The first cache page data is obtained and written into the data cache area, and then the second cache page data is obtained, and the data is processed with the first cache page data in the data cache area to obtain a first operation result, and the first operation result is used to replace the first cache page data in the data cache area, and then the data based on the first operation result as the latest data is written to complete the data writing to the storage device. By using only one data cache area, the operation processing of the cache page data is completed, and there is no need to read the data of the second cache page into the data cache area, which reduces the operation process, improves the calculation efficiency, and speeds up the data writing speed when the storage mode of the storage device is converted.

[0044] In one embodiment, the second cache page data includes at least one bit of second cache page data.

[0045] The acquired second cache page data may not be data corresponding to the maximum data volume of the second cache page, but may be data of any data volume of at least one bit, and may not exceed the maximum data volume of the second cache page. This means that when acquiring, it is not necessary to wait for the data of the second cache page to be fully transmitted, and when there is data in the second cache page, it can be acquired to perform subsequent calculation processing.

[0046] On the basis of the above embodiment, further, acquiring the second cache page data includes acquiring the second cache page data in response to at least one bit of data being written into the second cache page.

[0047] Generally speaking, data transmission takes time. When data is written to a cache page, then calculated, and then written to a storage device, there will be a long delay in this process. In this embodiment, the data processing operation process does not need to wait for the completion of data transmission of all cache pages or the completion of all data transmission of a certain cache page. When data is written to the second cache page, the second cache page data can be obtained to perform calculations with the first cache page data in the data cache area to complete the replacement. The cache page data can be calculated and processed during the writing process to achieve the conversion of the storage mode. Finally, when the cache page data is written, the data can be written to the storage device, thereby further improving the data writing speed and achieving real-time data writing.

[0048] Reference Figure 3 , Figure 3 This is a flow chart of the second embodiment of the data writing method of the present application. The method is a further extension of step S15, and includes the following steps:

[0049] S21: Determine a storage location of at least one bit of second cache page data in the second cache page.

[0050] S22: Determine a target storage location in the corresponding data cache area according to the storage location of at least one bit of second cache page data.

[0051] In actual situations, data pages can be considered stacked, so their data also has a certain correspondence relationship. Figure 4 As shown, Figure 4 Schematic diagram of the corresponding relationship of a data page.

[0052] In the figure, the first cache page data is "ABCD", and the second cache page data is "EFGH", and the storage locations of these data correspond to each other in structure. For example, "ABCD" is the first four bits of data of the first cache page, and "EFGH" is the first four bits of data of the second cache page, A corresponds to E, B corresponds to F, C corresponds to G, and D corresponds to H.

[0053] After the storage position of the acquired second cache page data in the second cache page is determined, the corresponding first cache page data is stored in a target storage position in the data cache area according to the position.

[0054] S23: performing a calculation on at least one bit of the second cache page data and at least one bit of the first cache page data at the target storage location to obtain a first calculation result, and replacing at least one bit of the first cache page data with the first calculation result.

[0055] After determining the target storage location corresponding to the storage location of the second cache page data, the second cache page data is subjected to computational processing based on the first cache page data at the determined target storage location.

[0056] The obtained first operation result is written into the data cache area to replace the original first cache page data.

[0057] In the above embodiment, the first cache page and the second cache page only indicate that they are different objects, and do not limit the order in which their data is written. For example, in QLC, the first cache page and the second cache page can be any two different cache pages among the four cache pages. The third cache page and the fourth cache page described below are similar.

[0058] In one embodiment, the first cache page may be the first cache page to which data is written during the cache page data writing process, and the second cache page may be the second cache page to which data is written during the cache page data writing process. This arrangement may allow the calculation process to start as early as possible, reduce the impact on data writing, increase the data writing speed, and achieve real-time data writing.

[0059] If the first cache page is a cache page written later than the second cache page, obtaining the first cache page data includes obtaining the first cache page data in response to writing at least one bit of data to the first cache page. The at least one bit of the first cache page data obtained is written to the data cache area, and then the data in the second cache area and the data in the data cache area are processed to complete the data replacement. There is no need to wait for all the first cache page data to be written to the data cache area before performing the processing, so that the calculation process starts as early as possible, reducing the impact on data writing, improving the data writing speed, and achieving real-time data writing.

[0060] Reference Figure 5 , Figure 5 This is a flow chart of the third embodiment of the data writing method of this application. It includes the following steps:

[0061] S31: In response to a data write instruction, write data corresponding to the data write instruction into each cache page in sequence.

[0062] Before writing data to the cache page, the target storage mode of the storage device may be predetermined for use in subsequent computational processing of the storage page data.

[0063] S32: In the process of writing the cache page, obtaining first cache page data.

[0064] In the process of writing the cache page, data is first written into the first cache page, and then data of the first cache page is obtained.

[0065] S33: Writing the first cache page data into the data cache area.

[0066] In one embodiment, the method of writing the first cache page data into the data cache area is DMA mode B, that is, directly writing into the data cache area without ECC and random block processing.

[0067] S34: Acquire the second cache page data.

[0068] After the first cache page data is written into the data cache area, the second cache page data is acquired.

[0069] S35: Performing calculation processing using the second cache page data and the data in the data cache area to obtain a first calculation result, and replacing the data in the data cache area with the first calculation result.

[0070] S36: Obtain third cache page data.

[0071] S37: performing operation processing using the third cache page data and the first operation result in the data cache area to obtain a second operation result, and replacing the first operation result in the data cache area with the second operation result.

[0072] S38: writing the latest data in the data buffer area to the data storage area to complete the data writing of the storage device.

[0073] After all data operations on the cache page are completed, the data is written to the data storage area based on the latest data in the data cache area to complete the data writing.

[0074] In this embodiment, the latest data is obtained based on all the data in at least three cache pages. If the storage device is in QLC to MLC mode, the latest data is the result of calculations obtained based on the first cache page, the second cache page, and the third cache page. Then the data is written to the data storage area based on the latest data and the data of the fourth cache page. If the storage device is in TLC to SLC mode, there are three cache pages in the storage device: the first cache page, the second cache page, and the third cache page. The latest data is the result of calculations obtained based on the first cache page, the second cache page, and the third cache page. Then the data is written to the data storage area based on the latest data. By analogy, the conversion of the storage device from high-capacity mode to low-capacity mode is completed.

[0075] Similar steps in this embodiment can refer to the above embodiment and will not be described again here.

[0076] Reference Figure 6 , Figure 6 This is a flow chart of the fourth embodiment of the data writing method of this application. It includes the following steps:

[0077] S41: In response to a data write instruction, write data corresponding to the data write instruction into each cache page in sequence.

[0078] Before writing data to the cache page, the target storage mode of the storage device may be predetermined for use in subsequent computational processing of the storage page data.

[0079] S42: In the process of writing the cache page, obtaining first cache page data.

[0080] S43: Writing the first cache page data into the data cache area.

[0081] In one embodiment, the method of writing the first cache page data into the data cache area is DMA mode B, that is, directly writing into the data cache area without ECC and random block processing.

[0082] S44: Acquire the second cache page data.

[0083] S45: performing calculation processing using the second cache page data and the data in the data cache area to obtain a first calculation result, and replacing the data in the data cache area with the first calculation result.

[0084] S46: Acquire the third cache page data.

[0085] S47: performing operation processing using the third cache page data and the first operation result in the data cache area to obtain a second operation result, and replacing the first operation result in the data cache area with the second operation result.

[0086] S48: Acquire the fourth cache page data.

[0087] S49: performing a calculation using the fourth cache page data and the second calculation result in the data cache area to obtain a third calculation result, and replacing the second calculation result in the data cache area with the third calculation result.

[0088] S50: writing the latest data in the data buffer area into the data storage area to complete the data writing of the storage device.

[0089] After all data operations on the cache page are completed, the data is written to the data storage area based on the latest data in the data cache area to complete the data writing.

[0090] In this embodiment, the latest data is obtained based on all the data in at least four cache pages. If the storage device is in QLC to SLC mode, the latest data is the calculation result obtained based on the first cache page, the second cache page, the third cache page, and the fourth cache page. Then, the data is written to the data storage area according to the latest data. By analogy, the conversion of the storage device from high-capacity mode to low-capacity mode is completed.

[0091] Similar steps in this embodiment can refer to the above embodiment and will not be described again here.

[0092] In the above embodiments, the operation processing is XOR / XOR operation processing. In the same processing flow, the operation processing is the same processing method. For example, in the process of QLC to TLC, the operation processing is all XOR operation or all XOR operation.

[0093] like Figure 7 As shown, Figure 7 This is a schematic structural diagram of the first embodiment of the electronic device of the present application.

[0094] The electronic device includes a processor 110 and a memory 120 .

[0095] The processor 110 controls the operation of the electronic device, and the processor 110 may also be referred to as a CPU (Central Processing Unit). The processor 110 may be an integrated circuit chip having the ability to process a signal sequence. The processor 110 may also be a general-purpose processor, a digital signal sequence processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0096] The memory 120 stores instructions and program data required for the processor 110 to operate.

[0097] The processor 110 is used to execute instructions to implement the method provided by any one of the first to third embodiments of the data synchronization method described above in the present application and any possible combination thereof.

[0098] like Figure 8 As shown, Figure 8 This is a schematic diagram of the structure of the first embodiment of the computer-readable storage medium of the present application.

[0099] An embodiment of a readable storage medium of the present application includes a memory 210, and the memory 210 stores program data. When the program data is executed, the method provided by any one of the first to third embodiments and possible combinations of the data method of the present application is implemented.

[0100] The memory 210 may include a medium that can store program instructions, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it may be a server that stores the program instructions. The server may send the stored program instructions to other devices for execution, or it may execute the stored program instructions itself.

[0101] In summary, in response to the data write instruction, the data is written into the cache page in sequence. The first cache page data is obtained and written into the data cache area, and then the data of the second cache page is obtained, and the data is processed with the first cache page data in the data cache area to obtain the first operation result, and the first operation result is used to replace the first cache page data in the data cache area, and then the data based on the first operation result as the latest data is written to complete the data writing to the storage device. By using only one data cache area, the operation processing of the cache page data is completed, and there is no need to read the data of the second cache page into the data cache area, which reduces the operation process, improves the calculation efficiency, and speeds up the data writing speed when the storage mode of the storage device is converted. Furthermore, the operation process of data processing in the present application does not need to wait for the completion of data transmission of all cache pages or the completion of all data transmission of a certain page cache page. When data is written into the second cache page, the second cache page data can be obtained to perform operation processing with the first cache page data in the data cache area to complete the replacement. The cache page data can be processed during the writing process to achieve the conversion of the storage mode. Finally, when the cache page data is written, the data can be written to the storage device, thereby further improving the data writing speed and achieving real-time data writing.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and 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.

[0103] 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 present embodiment.

[0104] In addition, each functional unit in each embodiment of the present application 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 integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.

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

Claims

1. A data writing method, applied to a storage device, wherein the storage device comprises at least two cache pages, a data cache area and a data storage area, characterized in that: The method comprises: In response to a data write instruction, writing data corresponding to the data write instruction into each cache page in sequence; In the process of writing the cache page, obtaining first cache page data; Writing the first cache page data into the data cache area; and obtaining second cache page data; Performing a calculation using the second cache page data and the data in the data cache area to obtain a first calculation result, and replacing the data in the data cache area with the first calculation result; Writing data to the data storage area based on the latest data in the data cache area to complete the data writing of the storage device; The latest data is obtained based on all data in the at least two cache pages.

2. The method according to claim 1, characterized in that The second cache page data includes at least one bit of second cache page data.

3. The method according to claim 2, characterized in that The performing operation processing using the second cache page data and the data in the data cache area to obtain a first operation result, and replacing the data in the data cache area with the first operation result, includes: Determine a storage location of the at least one bit of second cache page data in the second cache page; Determine a corresponding target storage location in the data cache area according to the storage location of the at least one bit of the second cache page data; The at least one bit of the second cache page data and the at least one bit of the first cache page data at the target storage location are used to perform operation processing to obtain the first operation result, and the at least one bit of the first cache page data is replaced by the first operation result.

4. The method according to claim 1, characterized in that: The obtaining of the second cache page data includes: In response to at least one bit of data being written into the second cache page, the second cache page data is acquired.

5. The method according to claim 4, characterized in that After performing operation processing using the second cache page data and the data in the data cache area to obtain a first operation result and replacing the data in the data cache area with the first operation result, the method further comprises: Get the third cache page data; The third cache page data and the first operation result in the data cache area are used to perform operation processing to obtain a second operation result, and the first operation result in the data cache area is replaced by the second operation result.

6. The method according to claim 5, characterized in that The method of performing operation processing using the third cache page data and the first operation result in the data cache area to obtain a second operation result, and replacing the first operation result in the data cache area with the second operation result includes: Get the fourth cache page data; The fourth cache page data and the second operation result in the data cache area are used to perform operation processing to obtain a third operation result, and the third operation result is used to replace the second operation result in the data cache area.

7. The method according to claim 1, characterized in that The operation processing includes an XOR operation or an XOR operation.

8. The method according to claim 1, characterized in that: The step of writing the first cache page data into the data cache area includes: The first cache page data is directly written into the data cache area.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store program data, and the program data can be executed by the processor to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: Program data is stored and can be executed by a processor to implement the method according to any one of claims 1 to 8.