Verification information storage method, storage device and electronic device

By optimizing the storage method of verification information when the storage device enters and exits the state, the problem of inefficiency of the storage device is solved and more efficient state switching is achieved.

CN120295829APending Publication Date: 2025-07-11SHANGHAI LONGSYS DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410039035.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, when the storage device exits the shutdown state or the low power consumption state, it is necessary to write the verification information to an additional storage area and re-read it when exiting, resulting in inefficiency of the storage device.

Method used

When the storage device enters the shutdown state or low power consumption state, the remaining storage space of the current memory page is obtained, the verification information calculated by the RAID engine is written to the target physical plane of the remaining storage space, and the target data and the second verification information are written to the remaining physical plane when exiting, avoiding additional writing and reading.

Benefits of technology

Improves the efficiency of the storage device entering and exiting the shutdown state or low power state, reducing additional storage operation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295829A_ABST
    Figure CN120295829A_ABST
Patent Text Reader

Abstract

The invention provides a verification information storage method, storage equipment and electronic equipment, the storage equipment applied to the electronic equipment comprises a controller and a memory, the memory comprises a plurality of memory pages, each memory page comprises a plurality of physical surfaces, and the method comprises the following steps: when the storage equipment enters a power-off state or a low-power-consumption state, storing the verification information in the controller; obtaining a residual storage space of a current memory page used for storing data in the storage device; writing first verification information calculated by an RAID engine in the controller into a target physical surface of the remaining storage space; when the storage device exits from the shutdown state or the low-power-consumption state, obtaining a residual physical surface, in which any data is not written, in the current memory page; and writing target data sent by the electronic equipment and second verification information calculated by the RAID engine into the remaining physical surface. According to the method, the efficiency of quitting the shutdown state or the low-power-consumption state of the storage device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the storage field, and particularly to a method for storing check information, a storage device, and an electronic device. Background Art

[0002] As a part of an electronic device, when the electronic device enters the shutdown state or the low-power state, the storage device may be synchronously triggered to enter the shutdown state or the low-power state. At this time, if the NAND of the storage device has not written a full memory page (Super Page), the check information (Parity) will be written to an independent area (Parity Block) for storing check information. When the storage device exits the shutdown state or the low-power state, the electronic device reads the Parity from the Parity Block in the NAND and then transfers it into the Redundant Array of Independent Disks (RAID) engine. The Parity transferred into the RAID engine is used to perform encoding calculations on subsequent data in the same memory page. However, this type of method will extend the time for the storage device to exit the shutdown state or the low-power state. Summary of the Invention

[0003] Embodiments of this application disclose a method for storing check information, a storage device, and an electronic device, which solve the technical problem of low efficiency of the storage device exiting the shutdown state or the low-power state.

[0004] This application provides a method for storing check information, which is applied to a storage device in an electronic device. The storage device includes a controller and a memory. The memory includes multiple memory pages, and each memory page includes multiple physical surfaces. The method includes: when the storage device enters the shutdown state or the low-power state, obtaining the remaining storage space of the current memory page in the storage device for storing data; writing the first check information calculated by the RAID engine in the controller to the target physical surface of the remaining storage space; when the storage device exits the shutdown state or the low-power state, obtaining the remaining physical surfaces in the current memory page that have not written any data; writing the target data sent by the electronic device and the second check information calculated by the RAID engine to the remaining physical surfaces.

[0005] In some embodiments of the present application, the method further includes: receiving a read instruction generated by the electronic device based on a preset data reading request, where the read instruction is used to instruct the controller to read data in the target memory page; based on the read instruction, if it is determined that the data reading of any physical surface fails based on a preset data mapping table in the controller, obtaining data of other physical surfaces in the target memory page except the any physical surface; performing an exclusive OR operation on the data of the other physical surfaces to parse out the data of the any physical surface.

[0006] In some embodiments of the present application, the performing an exclusive OR operation on the data of the other physical surfaces to parse out the data of the any physical surface includes: performing an exclusive OR operation on the first check information, the second check information, and the data stored in the storage device in the other physical surfaces to parse out the data of the any physical surface.

[0007] In some embodiments of the present application, the writing the first check information calculated by the redundant array of independent disks (RAID) engine in the controller into the target physical surface of the remaining storage space includes: obtaining the physical surface where data has been written in the current memory page and the adjacent physical surface of the physical surface where data has been written, where the adjacent physical surface is a physical surface where no data has been written; using the adjacent physical surface as the target physical surface; writing the first check information into the target physical surface.

[0008] In some embodiments of the present application, the writing the target data sent by the electronic device and the second check information calculated by the RAID engine into the remaining physical surface includes: encoding the target data according to the controller to obtain encoded data and a second backup data corresponding to the encoded data; writing the encoded data into a first specified physical surface of the remaining physical surface; calculating the second check information according to the RAID engine for the second backup data; writing the second check information into a second specified physical surface of the remaining physical surface.

[0009] In some embodiments of the present application, the second specified physical surface is the last physical surface to be written with data in the current memory page.

[0010] In some embodiments of the present application, it includes: if the remaining storage space is the second specified physical surface, when the storage device exits the shutdown state or the low-power state, writing the target data and the second check information into a new memory page.

[0011] In some embodiments of the present application, after writing the first check information to the target physical surface, the method further includes: the controller controls the RAID engine to delete the first backup data stored in the RAID engine based on a preset firmware, where the first backup data is used to calculate the first check information.

[0012] The present application also provides a storage device, which includes a controller and a memory; the memory is used to store program instructions; the controller is used to read the program instructions stored in the memory to implement the storage method of the check information.

[0013] The present application also provides an electronic device, which includes a storage device and a processor, and the processor is used to implement the storage method of the check information when executing the computer program stored in the memory.

[0014] In the storage method of the check information provided by the present application, when the storage device enters the shutdown state or the low-power state, the remaining storage space of the current memory page used to store data in the storage device is obtained, and the first check information calculated by the RAID engine is written to the target physical surface of the remaining storage space. It is not necessary to write the first check information to an additional storage area when the storage device enters the shutdown state or the low-power state, which can improve the efficiency of the storage device entering the shutdown state or the low-power state to a certain extent. When the storage device exits the shutdown state or the low-power state, the remaining physical surfaces in the current memory page that have not been written with any data are obtained, and the target data sent by the electronic device and the second check information calculated by the RAID engine are written to the remaining physical surfaces, enabling the storage device to directly exit the shutdown state or the low-power state without rereading the first check information when exiting the shutdown state or the low-power state, thereby improving the efficiency of the storage device exiting the shutdown state or the low-power state. Description of the Drawings

[0015] Figure 1 is a schematic diagram of the application scenario of the storage method of the check information provided by the embodiments of the present application.

[0016] Figure 2 is a flowchart of the storage method of the check information provided by the embodiments of the present application.

[0017] Figure 3 is a flowchart of the storage method of the check information provided by another embodiment of the present application.

[0018] Figure 4 is a schematic diagram of the storage method of the check information provided by the embodiments of the present application.

[0019] Figure 5 is a schematic diagram of the related art provided by the embodiments of the present application. Detailed implementation manners

[0020] For ease of understanding, some explanations of concepts related to the embodiments of the present application are exemplarily given for reference.

[0021] It should be noted that in the present application, "at least one" means one or more, and "a plurality" means two or more than two. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0022] As a part of an electronic device, when the electronic device enters the shutdown state or the low-power state, the storage device may be synchronously triggered to enter the shutdown state or the low-power state. At this time, if the storage device has not filled a memory page (Super Page), the parity information will be written to an independent area (Parity Block) for storing parity information. When the storage device exits the shutdown state or the low-power state, the electronic device reads the Parity from the Parity Block in the nand and then passes it into the Redundant Array of Independent Disks (RAID) engine. The Parity passed into the RAID engine is used to perform encoding calculations on subsequent data in the same memory page. However, this type of method will extend the time for the storage device to exit the shutdown state or the low-power state.

[0023] To solve the technical problem of low efficiency in the storage device exiting the shutdown state or the low-power state, the embodiments of the present application provide a method for storing parity information, a storage device, and an electronic device. First, the application scenario of the method for storing parity information in the present application will be described below.

[0024] Figure 1 It is a schematic diagram of the application scenario of the method for storing parity information provided by the embodiments of the present application. The method for storing parity information provided by the embodiments of the present application is applied to the storage device 10. The storage device 10 can be an internal embedded component of the electronic device 20 (as Figure 1 shown), or an external memory of the electronic device 20 ( Figure 1 not shown), and the present application does not limit this. In one embodiment, during the operation of the electronic device 20, data can be written in the storage device 10.

[0025] The electronic device 20 can be a mobile phone, a tablet computer, a computer, etc.

[0026] The storage device 10 includes, but is not limited to, a controller 101 and multiple memories 102. The memory 102 can be a Universal Flash Storage (UFS) chip.

[0027] The controller 101 can be pre-set with firmware, which is used to drive the storage device to perform corresponding operations, such as deleting data, reading data, and writing data, etc. The controller 101 can also be provided with a Redundant Array of Independent Disks (RAID) engine, and the RAID engine is used to calculate the check information corresponding to the data written into the storage device 10.

[0028] The memory 102 includes multiple Super Pages, and each Super Page includes multiple planes for storing data.

[0029] The said schematic Figure 1 is merely an example of the storage device 10, and does not constitute a limitation on the storage device 10. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the storage device 10 may also include a power management circuit, an Error Correction Code (ECC) circuit, a voltage regulator, etc.

[0030] Refer to Figure 2 As shown, it is a flowchart of a method for storing check information provided by an embodiment of the present application, which is applied in a storage device (such as Figure 1 the storage device 10). According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0031] Step S201, when the storage device enters the shutdown state or the low-power state, obtain the remaining storage space of the current memory page used for storing data in the storage device.

[0032] In some embodiments of the present application, the storage device can be a storage chip embedded in an electronic device. In one example, when the electronic device enters the shutdown state or the low-power state, it can trigger the storage device to synchronously enter the shutdown state or the low-power state. In another example, taking the electronic device as a mobile phone for example, there can be multiple applications running on the mobile phone. When the user closes the application through a sliding operation or the like, or when the electronic device (such as a mobile phone) enters the low-power mode due to insufficient battery power, it triggers the storage device to enter the low-power state to reduce the power consumption of the mobile phone.

[0033] In some embodiments of the present application, a storage device may receive a first instruction sent by an electronic device. The first instruction is used to instruct the storage device to enter a shutdown state or a low-power state. The storage device responds to the first instruction and obtains the remaining storage space of the current memory page used to store data in the storage device. The storage device may include multiple memory pages, each memory page may include multiple dies, and each die includes multiple physical surfaces. The memory page currently writing data is used as the current memory page, and the physical surface in the current memory page that has not written any data is used as the remaining storage space.

[0034] Step S202: Write the first parity information calculated by the RAID engine in the controller to the target physical surface of the remaining storage space.

[0035] In some embodiments of the present application, the storage device includes a controller, and a firmware and a RAID engine are pre-set in the controller. The RAID engine is used to calculate parity information for the written data when the data is written to the storage device, and is also used to parse out the data that fails to be read when the data is read. Running the firmware by the controller can trigger the RAID engine to generate parity information through XOR (exclusive OR) operation. For example, the first parity information.

[0036] In some embodiments of the present application, after calculating the first parity information, obtain the physical surfaces of the current memory page that have written data and the adjacent physical surfaces of the physical surfaces that have written data. The adjacent physical surfaces are physical surfaces that have not written data, and use the adjacent physical surfaces as the target physical surfaces.

[0037] In an example, the current memory page includes physical surfaces A1 to A6. Among them, A1 to A3 are physical surfaces that have written data. Then, the adjacent physical surface of the physical surface that has written data is A4, and A4 is used as the target physical surface.

[0038] In some embodiments of the present application, after determining the target physical surface, the first parity information can be written into the target physical surface, and there is no need to write the first parity information into an additional memory page or a temporary storage area, which can improve the efficiency of the storage device entering the shutdown state or the low-power state to a certain extent.

[0039] In some embodiments of the present application, when the storage device receives the data written by the electronic device, the data written by the electronic device passes through the controller. The controller backs up the data written by the electronic device to obtain the first backup data, and then writes the data written by the electronic device into the memory. Therefore, after writing the first parity information into the target physical surface, trigger the controller to run the firmware and control the RAID engine to delete the first backup data stored in the RAID engine. The first backup data is used to calculate the first parity information to avoid the first backup data affecting the calculation of the subsequent written data.

[0040] Step S203: When the storage device exits the shutdown state or the low-power state, obtain the remaining physical planes in the current memory page that have not been written with any data.

[0041] In some embodiments of the present application, after writing the first check information to the target physical plane, obtain the remaining physical planes in the current memory page that have not been written with any data, where the any data may include data written by the electronic device and the first check information.

[0042] In an embodiment of the present application, when the storage device exits the shutdown state or the low-power state, the RAID engine does not need to read the first check information from the target physical plane, which can improve the efficiency of the storage device exiting the shutdown state or the low-power state to a certain extent.

[0043] Step S204: Write the target data sent by the electronic device and the second check information calculated by the RAID engine to the remaining physical planes.

[0044] In some embodiments of the present application, after the storage device exits the shutdown state or the low-power state, the storage device can receive the target data written by the electronic device, encode the target data through the controller to obtain encoded data, and write the encoded data to the first specified physical plane of the remaining physical planes.

[0045] In an example, the current memory page includes physical planes A1 to A6, where A1 to A2 are physical planes with data written, A3 is the target physical plane, and A4 to A6 are the remaining physical planes. Then, based on the principle of sequential data writing, the first specified physical plane can be A4 and A5.

[0046] In some embodiments of the present application, when the first specified physical plane is full, the controller runs the RAID engine based on the preset firmware to calculate the second backup data corresponding to the encoded data, obtain the second check information, and write the second check information to the second specified physical plane of the remaining physical planes, where the second specified physical plane is the last physical plane in the current memory page to be written with data.

[0047] In an example, the current memory page includes physical planes A1 to A6, where A1 to A2 are physical planes with data written, A3 is the target physical plane, and A4 to A6 are the remaining physical planes. The first specified physical plane can be A4 and A5, then A6 is the second specified physical plane, that is, the second specified physical plane is the last plane of the last die in the same memory page.

[0048] In other embodiments of the present application, if the remaining storage space is the second specified physical surface, when the storage device exits the shutdown state or the low-power state, the target data and the second check information are written into a new memory page, and the RAID engine does not need to read out the first check information again to determine that the current memory page is full of data.

[0049] In an embodiment of the present application, when the storage device enters the shutdown state or the low-power state, the remaining storage space of the current memory page used to store data in the storage device is obtained, and the first check information calculated by the RAID engine is written into the target physical surface of the remaining storage space. There is no need to write the first check information to an additional storage area when the storage device enters the shutdown state or the low-power state, which can improve the efficiency of the storage device entering the shutdown state or the low-power state to a certain extent. When the storage device exits the shutdown state or the low-power state, the remaining physical surface in the current memory page where no data is written is obtained, and the target data sent by the electronic device and the second check information calculated by the RAID engine are written into the remaining physical surface, so that when the storage device exits the shutdown state or the low-power state, it can directly exit the shutdown state or the low-power state without rereading the first check information, improving the efficiency of the storage device exiting the shutdown state or the low-power state.

[0050] Figure 3 is a flowchart of a method for storing check information provided by another embodiment of the present application. As Figure 3 shown, based on the method for storing check information as Figure 2 shown, if the data reading fails, the data with the reading failure can be parsed through the embodiment as Figure 3 shown. As Figure 3 shown, it includes the following steps:

[0051] Step S301, in response to receiving a data reading request from an electronic device, trigger the generation of a read command.

[0052] In some embodiments of the present application, when triggered by a user or an automatic program, the electronic device can generate a corresponding data reading request. The storage device receives the data reading request from the electronic device and triggers the generation of a read command, which is used to instruct the controller of the storage device to read the data in the memory page, for example, the data in the target memory page.

[0053] Step S302, based on the read instruction, if it is determined that the data reading of any physical surface fails based on the preset data mapping table in the controller, obtain the data of other physical surfaces in the target memory page except any physical surface.

[0054] In some embodiments of the present application, a preset data mapping table may be included in the controller, and the data mapping table is used to check whether the read data is accurate or whether the data is successfully read. The controller responds to a read command and reads data from a target memory page. If it is determined based on the data mapping table that the data reading of any physical plane fails, the data of other physical planes in the target memory page except any physical plane is obtained.

[0055] In one example, the target memory page includes 2 dies, and each die includes 3 physical planes. Then there are a total of 6 physical planes, including B1 to B6. If it is determined that the reading of B2 fails, then B1, B3 to B6 are the data of other physical planes.

[0056] Step S303: Perform an exclusive OR operation on the data of other physical planes to resolve the data of any physical plane.

[0057] In some embodiments of the present application, assume that the target memory page is the current memory page as shown in Figure 2 the embodiment. Then the data of other physical planes includes first check information, second check information, and data stored by the storage device. Performing an exclusive OR operation on the first check information, the second check information, and the data stored by the storage device can reverse-resolve the data of any physical plane.

[0058] In one example, the first check information P1 = A ⊕ B ⊕ C, and the second check information P2 = D ⊕ E ⊕ F, where ⊕ represents the symbol of the exclusive OR operation, A, B, C represent the data written to the storage device before the storage device enters the shutdown state or the low-power state, D, E, F represent the data written to the storage device after the storage device exits the shutdown state or the low-power state, and A, B, C, D, E, F, P1, and P2 are stored in the same memory page. If A is the data of any physical plane with a failed read, then A = P2 ⊕ P1 ⊕ B ⊕ C ⊕ D ⊕ E ⊕ F.

[0059] Figure 4 is a schematic diagram of the storage method of the check information provided by the embodiment of the present application, as shown in Figure 4 In the figure, there are a total of 4 memory pages in the storage device (as shown in Figure 4In it, a row represents a memory page), and each memory page includes 2 dies. For example, D0P0 to D0P3 are the first die, and D1P0 to D1P3 are the second die. Each die includes 4 planes. When data is written to D0P2 and the storage device enters the shutdown state or the low-power state, the RAID engine is triggered to perform an exclusive OR operation on the data of the three planes A, B, and C to obtain P1, and P1 is written to the column where D0P3 is located. If the storage device exits the shutdown state or the low-power state, the data received at this time is written to the first specified physical plane of the remaining physical planes. The first specified physical plane is the position where D, E, and F are located, and the RAID engine is triggered to perform an exclusive OR operation on the data of the three planes D, E, and F to obtain P2. As Figure 4 shown, the first row, the second row, and the third row in

[0060] Figure 5 are all normal writing situations. When writing data normally, the parity check information is stored in the last plane. Figure 5 As Figure 5 shown, the parity check information parity in

[0061] is all stored on the last plane. Assuming that at position M (the position in Figure G4), the storage device exits the shutdown state or the low-power state. In the related art, the parity check information of G1 to G3 will be read first, and then the total parity check information P3 of the same memory page will be calculated and stored in the last plane. Then, in the related art, the calculation of the total parity check information is: P3 = G1 ⊕ G2 ⊕ G3 ⊕ G4 ⊕ G5 ⊕ G6 ⊕ G7. Figure 4 and Figure 5 , when the storage device exits the shutdown state or the low-power state in this application, it is not necessary to read P1 as Figure 4 shown. When calculating P2 later, it is also not necessary to use the data of ABC, which can improve the data processing efficiency and the efficiency of the storage device exiting the shutdown state or the low-power state to a certain extent.

[0062] Please continue to refer to Figure 1 . In this embodiment, the memory 102 may be the internal memory of the storage device 10, that is, the memory built into the storage device 10. In other embodiments, the memory 102 may also be the external memory of the storage device 10, that is, the memory externally connected to the storage device 10.

[0063] In some embodiments, the memory 102 is used to store program codes and various data, and realizes the high-speed and automatic access of programs or data during the operation of the storage device 10.

[0064] The memory 102 may include a random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0065] In one embodiment, the processor 13 may be a Central Processing Unit (CPU), and may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any other conventional processor, etc.

[0066] If the program code and various data in the memory 102 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of this application, for example, the storage method of verification information, it may also be completed by a computer program instructing relevant hardware. The computer program may be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments may be implemented. Among them, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a Read-Only Memory (ROM), etc.

[0067] The embodiment of this application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and the method implemented when the program instructions are executed may refer to the methods in the above-mentioned various embodiments of this application.

[0068] Among them, the computer-readable storage medium may be the internal memory of the storage device in the above embodiments, such as the hard disk or memory of the storage device. The computer-readable storage medium may also be an external storage device of the storage device, such as a plug-in hard disk equipped on the storage device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc.

[0069] In some embodiments, the computer-readable storage medium may include a storage program area and a storage data area. Among them, the storage program area may store an operating system, application programs required for at least one function, etc.; the storage data area may store data created according to the use of the storage device, etc.

[0070] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0071] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0072] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0073] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0074] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A method for storing verification information, which is applied to a storage device in an electronic device, characterized in that, The storage device includes a controller and a memory. The memory includes a plurality of memory pages, and each memory page includes a plurality of physical surfaces. The method includes: When the storage device enters the shutdown state or the low-power state, obtain the remaining storage space of the current memory page in the storage device for storing data; Write the first parity information calculated by the RAID engine in the controller to the target physical surface of the remaining storage space; When the storage device exits the shutdown state or the low-power state, obtain the remaining physical surfaces in the current memory page that have not been written with any data; Write the target data sent by the electronic device and the second parity information calculated by the RAID engine to the remaining physical surfaces.

2. The storage method of the verification information according to claim 1, wherein The method further includes: In response to receiving a data read request from the electronic device, trigger the generation of a read command, and the read instruction is used to instruct the controller to read the data in the target memory page; Based on the read instruction, if it is determined that the data reading of any physical surface fails based on a preset data mapping table in the controller, obtain the data of other physical surfaces in the target memory page except the any physical surface; Perform an exclusive OR operation on the data of the other physical surfaces to parse out the data of the any physical surface.

3. The storage method of the verification information according to claim 2, characterized in that, The performing an exclusive OR operation on the data of the other physical surfaces to parse out the data of the any physical surface includes: Perform an exclusive OR operation on the first parity information, the second parity information, and the data stored in the storage device in the other physical surfaces to parse out the data of the any physical surface.

4. The storage method of the verification information according to claim 1, wherein The writing the first parity information calculated by the redundant array of independent disks (RAID) engine in the controller to the target physical surface of the remaining storage space includes: Obtain the physical surfaces in the current memory page that have been written with data and the adjacent physical surfaces of the physical surfaces that have been written with data, and the adjacent physical surfaces are physical surfaces that have not been written with data; Use the adjacent physical surfaces as the target physical surfaces; Write the first parity information to the target physical surfaces.

5. The storage method of the verification information according to claim 1, characterized in that The writing the target data sent by the electronic device and the second parity information calculated by the RAID engine to the remaining physical surfaces includes: Encode the target data according to the controller to obtain encoded data and a second backup data corresponding to the encoded data; Write the encoded data to the first specified physical surface of the remaining physical surfaces; Calculate the second parity information according to the RAID engine for the second backup data; Write the second parity information to the second specified physical surface of the remaining physical surfaces.

6. The storage method of the verification information according to claim 5, characterized in that, The second specified physical surface is the last physical surface in the current memory page to be written with data.

7. The storage method of the verification information according to claim 6, wherein Includes: If the remaining storage space is the second specified physical surface, when the storage device exits the shutdown state or the low-power state, write the target data and the second parity information to a new memory page.

8. The storage method of the verification information according to claim 1, characterized in that After writing the first parity information to the target physical surface, the method further includes: The controller controls the RAID engine to delete the first backup data stored in the RAID engine based on a preset firmware, and the first backup data is used to calculate the first parity information.

9. A storage device, characterized in that, The storage device includes a controller and a memory; The memory is used to store program instructions; The controller is used to read the program instructions stored in the memory to implement the parity information storage method according to any one of claims 1 to 8.

10. An electronic device, characterized in that, The electronic device includes the storage device and a processor according to claim 9.