Hard disk data protection method and electronic equipment

By monitoring the motherboard voltage in electronic devices and using the electric energy storage module to provide power to the storage structure, the data loss problem of PLN NVME M.2 hard disk when power is not notified is lost, and data protection of the storage structure is realized.

CN120449218APending Publication Date: 2025-08-08LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510599870.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing PLN NVME M.2 hard disk cannot effectively protect data in the event of non-notice abnormal power failure, resulting in lost data from electronic equipment.

Method used

By monitoring the motherboard voltage and using the power storage module to provide power supply when no power outage notification is received, the storage structure is controlled to execute a power outage strategy to save data, including the power storage module being set on the backplane, providing power outage to the storage structure through the power output end of the backplane, and sending a power outage instruction to trigger data storage.

Benefits of technology

In the case of non-notification power outage, the data in the storage structure is effectively protected, improving the data security of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449218A_ABST
    Figure CN120449218A_ABST
Patent Text Reader

Abstract

The invention discloses a hard disk data protection method and electronic equipment, and relates to the field of control, the hard disk data protection method comprises the following steps: monitoring the voltage of a mainboard in the electronic equipment, the mainboard providing electric energy for each storage structure in the electronic equipment through a backboard, and the backboard being connected with at least one storage structure; and based on the condition that the power-down notification is not received and the mainboard voltage represents that the mainboard is powered down, if the function of the electric energy storage module is normal, controlling each storage structure to execute a power-down strategy based on the electric energy stored by the electric energy storage module so as to enable each storage structure to store data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of control, and in particular to a hard disk data protection method and electronic device. Background Art

[0002] Solid State Drives (SSDs) are used as non-volatile memory in various electronic devices.

[0003] When using a hard disk to store data, the data is first temporarily stored in a cache (such as a cache) and then written from the cache to the hard disk.

[0004] When data is temporarily stored in the cache, once the power is lost, the data in the cache will be lost. Therefore, power-off protection is set for the hard disk.

[0005] Hard drives that use PLN (Power Loss Notification), NVME (Non-Volatile Memory Express), and M.2 (Next Generation Form Factor, NGFF) generally only support notification-based power-off protection and cannot protect against abnormal power outages without notification. This results in the inability to save data when an electronic device experiences an abnormal power outage. Summary of the Invention

[0006] A first aspect of the present application provides a method for protecting hard disk data, comprising:

[0007] Monitoring the voltage of a mainboard in an electronic device, wherein the mainboard provides power to each storage structure in the electronic device via a backplane, wherein the backplane is connected to at least one storage structure;

[0008] Based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has experienced a power-off, if the power storage module functions normally, each storage structure is controlled to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data.

[0009] In a possible implementation, controlling each storage structure to execute a power-off strategy based on the electric energy stored in the electric energy storage module includes:

[0010] Based on the fact that the electric energy storage module is arranged on the back plate, the electric energy stored in the electric energy storage module is provided to each storage structure through the electric energy output terminal of the back plate;

[0011] Send a power-off instruction to each storage structure to trigger each storage structure to save data.

[0012] In a possible implementation, the method further includes:

[0013] Based on the mainboard voltage indicating that the mainboard is not powered off, receiving power provided by the mainboard through the receiving end;

[0014] The power output terminal of the backplane is controlled to provide the power received from the mainboard to each storage structure.

[0015] In a possible implementation, the method further includes:

[0016] Detecting the functional status of the electric energy storage module according to a set detection cycle;

[0017] Based on the functional status indicating that the electric energy storage module is functioning normally, continuing to monitor the motherboard voltage in the electronic device, and controlling each storage structure to operate in a first mode, wherein the storage structure performs read operations and write operations in the first mode;

[0018] Based on the functional status indicating the functional abnormality of the electric energy storage module, an alarm message is output, where the alarm message is used to prompt that the electric energy storage module is abnormal.

[0019] In a possible implementation, the method further includes:

[0020] Characterizing a functional abnormality of the electric energy storage module based on the functional status, and reporting functional abnormality information to a baseboard management controller;

[0021] receiving a first instruction fed back by a baseboard management controller;

[0022] The first instruction is sent to each storage structure, and each storage structure switches to a second mode according to the instruction, and the storage structure performs a read-only operation in the second mode.

[0023] In a possible implementation, detecting the functional status of the electric energy storage module includes:

[0024] Controlling the electric energy storage module to discharge through a preset resistor;

[0025] Recording a discharge time based on the voltage of the electric energy storage module reaching a preset voltage threshold;

[0026] determining, based on the discharge time being less than a preset time threshold, that the electric energy storage module is malfunctioning;

[0027] Based on the fact that the discharge time is not less than a preset time threshold, it is determined that the function of the electric energy storage module is normal.

[0028] A second aspect of the present application provides an electronic device, including:

[0029] at least one storage structure, an electrical energy storage module, a mainboard, and a backplane;

[0030] The mainboard supplies power to the at least one storage structure via the backplane;

[0031] The backplane is provided with a control unit, which is used to control each storage structure to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data, based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has lost power. If the power storage module functions normally, the control unit is used to control each storage structure to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data.

[0032] In a possible implementation, the electric energy storage module is provided on the backplane, and the backplane is provided with an electric energy input terminal and an electric energy output terminal;

[0033] The electric energy storage module receives electric energy provided by the mainboard through the electric energy input terminal on the backplane and stores the electric energy;

[0034] Wherein, based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has lost power, the electric energy storage module is connected to the electric energy output terminal, and the electric energy stored in the electric energy storage module is provided to each storage structure;

[0035] The control unit is further configured to send a power-off instruction to each storage structure to trigger each storage structure to save data based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has experienced a power-off.

[0036] In a possible implementation, based on the mainboard voltage indicating that the mainboard has not been powered off, the power input end is connected to the power output end, and the power received from the mainboard is provided to each storage structure through the power output end.

[0037] In a possible implementation, the method further includes:

[0038] The baseboard control manager is used to control the at least one storage structure to switch to a second mode when the electric energy storage module is abnormal, and the storage structure performs a read-only operation in the second mode.

[0039] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the hard disk data protection method of the first aspect or any implementation of the first aspect.

[0040] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0041] The memory is used to store computer programs;

[0042] The processor is used to execute the computer program so that the electronic device can implement the hard disk data protection method of the first aspect or any implementation of the first aspect.

[0043] The fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the hard disk data protection method of the above-mentioned first aspect or any implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0045] Figure 1 This is a flowchart of a hard disk data protection method provided by an embodiment of the present application;

[0046] Figure 2 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0047] Figure 3 This is a flow chart of controlling each storage structure to execute a power-off strategy based on the electric energy stored in the electric energy storage module according to an embodiment of the present application;

[0048] Figure 4 This is a schematic structural diagram of a backplane provided in an embodiment of the present application;

[0049] Figure 5 This is another flowchart of a hard disk data protection method provided by an embodiment of the present application;

[0050] Figure 6 is another structural schematic diagram of the backplane provided in an embodiment of the present application;

[0051] Figure 7 is a schematic diagram of a process for detecting and responding to the state of an electric energy storage module provided in an embodiment of the present application;

[0052] Figure 8 1 is a flowchart of a process for handling a functional abnormality of an electric energy storage module provided in an embodiment of the present application;

[0053] Figure 9 is a schematic diagram of a flow chart for detecting the functional status of the electric energy storage module provided in an embodiment of the present application;

[0054] Figure 10 This is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0055] Figure 11 is another structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0056] Figure 12 is another structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0057] Figure 13 This is a schematic diagram of an application scenario of an electronic device provided in an embodiment of the present application;

[0058] Figure 14 This is a schematic diagram of the process of the electronic device in an application scenario provided by an embodiment of the present application;

[0059] Figure 15 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The following describes the embodiments of the present application in conjunction with the accompanying drawings. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.

[0061] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0062] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0063] Reference Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for protecting hard disk data provided by an embodiment of the present application. Figure 1 As shown, a hard disk data protection method provided by an embodiment of the present application may include steps 101 to 102, and these steps are described in detail below.

[0064] 101. Monitoring a voltage of a mainboard in an electronic device, wherein the mainboard provides power to each storage structure in the electronic device via a backplane, wherein the backplane is connected to at least one storage structure;

[0065] The hard disk data protection method provided in the embodiment of the present application is applied to a control unit, which can be a functional chip arranged on a backplane.

[0066] The electronic device is provided with a storage structure, which is used to store data in the electronic device and supports read and write operations.

[0067] The electronic device is further provided with a backplane, which is used for plugging in the storage structure, and multiple storage structures can be plugged in the backplane.

[0068] The storage structure may be a storage structure supporting PLN, the storage structure may be an NVME structure, such as NVME M.2; the storage structure may also be a SATA (Serial Advanced Technology Attachment), such as SATA M.2.

[0069] Among them, in this electronic device, the mainboard provides power to each structure, each storage structure is plugged into the backplane, and the mainboard provides power to each storage structure through the backplane.

[0070] In one possible implementation, the motherboard voltage can be monitored according to a set period, and it can be determined whether the motherboard voltage is a preset voltage value. If it is the preset voltage value, it can be determined that the motherboard is operating normally. If the voltage value is less than the preset threshold, it can be determined that the motherboard has a power outage.

[0071] Among them, the preset voltage value can be 12V (volts), and the preset threshold value can be 2V. The values of the two can be set according to actual conditions and are not limited in this application.

[0072] In a possible implementation, one or more storage structures are plugged into the backplane, and the mainboard provides power to each storage structure on the backplane.

[0073] In a possible implementation, the input voltage required by the storage structure is the same as the voltage provided by the mainboard. Accordingly, the backplane diverts the power provided by the mainboard to provide power of the same voltage to each storage structure.

[0074] In one possible implementation, the input voltage required by the storage structure is different from the voltage provided by the motherboard, and is generally smaller than the voltage provided by the motherboard. Accordingly, the backplane converts the voltage provided by the motherboard to provide corresponding power to each storage structure.

[0075] As an example, the motherboard provides 12V power to the backplane, and the backplane converts the voltage to the voltage required by the storage structure, such as 3.3V.

[0076] 102. Based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has experienced a power-off, if the power storage module functions normally, control each storage structure to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data.

[0077] The power-off strategy is a method for processing data involved in a read operation or a write operation executed on the storage structure when a power-off occurs.

[0078] The electronic device is provided with an electric energy storage module, which can supply power to the storage structure when the electronic device suddenly loses power.

[0079] In a possible implementation, the electric energy storage module may be a capacitor, which may be charged when the backplane of the electronic device is powered on, so as to supply power to a storage structure connected to the backplane.

[0080] The electric energy storage module may be an independent structure or a structure provided on a back plate.

[0081] In electronic devices, a notification-based power outage involves processors like the CPU (central processing unit) and PCH (platform controller hub) sending a power-out notification to the backplane and motherboard. The backplane uses this notification to control the storage structure. Furthermore, the motherboard performs power-out protection actions after a period of time after the notification is sent. After receiving the power-out notification, the storage structure protects its data during the period before the motherboard powers off, for example, by completing tasks in its queue.

[0082] Wherein, whether the mainboard is powered off can be determined by monitoring the voltage of the mainboard. If no power-off notification is received but the mainboard is detected to be powered off, it can be considered as an unnotified power-off and the data in the storage structure needs to be urgently protected.

[0083] Among them, the notification-type power-off can be a power-off caused by long pressing the power-off button. The power-off process can be executed within the set time of long pressing the power-off button, such as long pressing the power-off button for 4 seconds. Accordingly, the power-off process is executed within 4 seconds.

[0084] Among them, non-notified power outages may be caused by hot-plugging a hard disk, sudden power outage of the entire machine's input power, abnormal power outage of the device (such as overheating protection shutdown of the central processing unit, etc.), etc.

[0085] The power storage module can provide power to each storage structure in the event of an unnotified power outage.

[0086] Among them, since the power of the energy storage module is limited, in the event of an unnotified power outage, the energy storage module can support the power-off strategy executed by the storage structure to complete power-off protection in a very short time (such as tens of milliseconds).

[0087] Therefore, the power-off strategy adopted when the non-notified power-off occurs can protect the data involved in the important tasks in the task queue from power-off. When the power-off strategy is executed, the power is turned off after the important tasks are completed.

[0088] When the electronic device powers down normally, the motherboard stops sending read and write requests to the storage structure, and no new tasks are added to the storage structure's processing queue. The storage structure uses power provided by the motherboard to complete the tasks in its pending task queue before powering down. This power-down process can last several seconds.

[0089] However, the energy storage module can operate normally on the basis of providing electric energy. Therefore, in this application, it is also necessary to determine whether the function of the energy storage module is normal. If it is normal, it can provide electric energy to each storage structure in the event of an unnotified power outage.

[0090] Whether the function of the electric energy storage module is normal can be determined through a pre-set detection method.

[0091] Figure 2 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, wherein the electronic device includes: a mainboard 201, a backplane 202, a storage structure 203, and an energy storage module 204. The storage structure 203 is plugged into the backplane 202, and the mainboard 201 provides power to the backplane 202, which then transmits the power to the storage structure 203. Furthermore, the energy storage module 204 is connected to the backplane 202. In the event of an abnormal power outage, if the energy storage module 204 functions normally, the energy storage module 204 supplies power to each storage module 203 via the backplane 202. In the event of a normal power outage, the mainboard 201 supplies power to the storage structure 203 via the backplane 202.

[0092] In this embodiment, the motherboard voltage in the electronic device is monitored, and the motherboard provides power to each storage structure in the electronic device through a backplane, and the backplane is connected to at least one storage structure. Based on the fact that no power-off notification is received and the motherboard voltage indicates that the motherboard has lost power, if the power storage module functions normally, each storage structure is controlled to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data. During the operation of the electronic device, if an abnormal power off occurs and the power storage module functions normally, the power in the power storage module is used to control the power off of each storage structure, thereby protecting its data and improving data security in the electronic device.

[0093] Figure 3 This is a flow chart of controlling each storage structure to execute a power-off strategy based on the electric energy stored in the electric energy storage module according to an embodiment of the present application, which may include steps 301 to 302. These steps are described in detail below.

[0094] 301. Based on the electric energy storage module being arranged on the backplane, the electric energy stored in the electric energy storage module is provided to each storage structure through the electric energy output terminal of the backplane;

[0095] In this embodiment, the electric energy storage module is arranged on the backplane, which is connected to the electric energy output end on the backplane, and the electric energy output end is connected to the storage structure. The backplane transmits electric energy to each storage structure through the electric energy output end.

[0096] The backplane is provided with an interface, in which pins are provided as power output terminals. The interface is also provided with other pins, which can realize the transmission of other data information.

[0097] Among them, the energy storage module can use capacitors. In the event of an unnotified power outage in the electronic device, in order to ensure that the energy storage module is provided with power in a timely manner, the energy storage module can use multiple capacitors in parallel. Each capacitor discharges at the same time, which can provide a sufficiently high voltage to support the energy storage module to execute the power-off strategy.

[0098] Figure 4 This is a schematic diagram of the structure of the backplane provided by the embodiment of the present application, wherein the backplane is provided with an electric energy storage module 401 and an electric energy output terminal 402, wherein the electric energy storage module 401 is connected to the electric energy output terminal 402, and the electric energy output terminal 402 of the backplane is connected to each storage structure. Figure 4 In the embodiment, the energy storage module uses a capacitor array composed of three capacitors, each capacitor in the capacitor array is connected in parallel. The power output terminal is connected to the storage structure, and the storage structure can use the power output of the energy storage module to the storage structure through the power output terminal.

[0099] 302. Send a power-off instruction to each storage structure to trigger each storage structure to save data.

[0100] Among them, if the control unit that executes the hard disk data protection method in this application does not receive a power-off notification and the motherboard voltage indicates that the motherboard has a power-off, that is, an unnotified power-off occurs, due to the unnotified power-off, one end of the backplane does not receive the power-off notification. In order to notify each storage module to perform power-off protection, the control unit generates a power-off instruction, and each storage structure sends a power-off instruction. The power-off instruction is used to notify each storage structure that the current electronic device has a power-off, so that each storage structure can save data.

[0101] The power-off instruction may be generated by the control unit, and the power-off instruction may match the power-off notification.

[0102] Among them, the match means that the power-off instruction and the point-off notification are not exactly the same. The two can contain some of the same content, such as information that triggers power-off protection, and can also contain some different content, such as triggering different power-off protection strategies. This application does not limit the specific format of the power-off instruction.

[0103] In a possible implementation, a pin is provided on the backplane, and the pin is used to connect to a pin of each storage structure. The backplane transmits a power-off instruction to each storage structure through the pin.

[0104] The power-off instruction may be a high level, and the control unit of the backplane sends a high level, which triggers each storage module to retain data.

[0105] Among them, the power-off notification can trigger each storage structure to execute a power-off strategy of notifying power off, and each storage structure can save data for a sufficiently long time; the power-off instruction can trigger each storage structure to execute a power-off strategy of non-notifying power off, and the storage structure needs to save data in a very short time.

[0106] In this embodiment, an energy storage module is disposed on a backplane, and the energy stored in the energy storage module is provided to each storage structure via the backplane's energy output terminal. A power-off instruction is sent to each storage structure to trigger each storage structure to save data. In an electronic device, the energy storage module is disposed on the backplane, connected to the backplane's energy output terminal, which in turn is connected to each storage structure. In the event of an unnotified power outage, the energy stored in the energy storage module on the backplane can be provided to each storage structure. Furthermore, a power-off instruction is generated for each storage structure to trigger each storage structure to execute the power-off strategy and save data, thereby protecting the data security of each storage structure in the event of an unnotified power outage.

[0107] Figure 5This is another flowchart of a method for protecting hard disk data provided by an embodiment of the present application. The steps in the flowchart are Figure 1 The steps performed after step 101 of the flowchart may include steps 501 to 502, which are described in detail below.

[0108] 501. Based on the mainboard voltage indicating that the mainboard is not powered off, receive power provided by the mainboard through the receiving end;

[0109] If the motherboard voltage indicates that the motherboard has not been powered off, the electronic device can provide the power provided by the motherboard to the storage structure during normal operation.

[0110] The backplane is provided with a receiving terminal connected to the mainboard, and the backplane receives electrical energy provided by the mainboard through the receiving terminal.

[0111] In the process of using the power provided by the mainboard to provide the storage structure, the function of the power storage module may be normal or abnormal.

[0112] 502. Control the power output end of the backplane to provide the power received from the mainboard to each storage structure.

[0113] The backplane is provided with an electric energy output terminal, through which electric energy is provided to the storage structure.

[0114] Among them, the control unit that executes the hard disk data protection method in this application can control whether the branch connected to the power output end is the receiving end or the power storage module.

[0115] Among them, when the control unit does not receive a power-off notification and the mainboard voltage indicates that a power-off has occurred on the mainboard, if the function of the energy storage module is normal, the control unit controls the power output end to be connected to the energy storage module, and the power in the energy storage module supports the power-off protection of the storage structure.

[0116] The control unit controls the power output terminal and the input terminal to be connected when the mainboard voltage indicates that the mainboard has not been powered off, and the power provided by the input terminal supports the power-off protection of the storage structure.

[0117] Figure 6 This is another schematic diagram of the backplane structure provided by an embodiment of the present application. The backplane is provided with an input terminal 601, a control unit 602, an energy storage module 603, and an energy output terminal 604. The energy storage module utilizes a capacitor array consisting of three capacitors, each connected in parallel. The backplane input terminal 601 is used to connect to the motherboard and receive power from it. The control unit 602 controls whether the energy output terminal 604 is connected to the input terminal 601 or to the energy storage module 603.

[0118] In this embodiment, based on the motherboard voltage indicating that the motherboard has not lost power, the receiving terminal receives power from the motherboard. The power output terminal of the backplane controls the power received from the motherboard to be supplied to each storage structure. If the motherboard has not lost power, the power received from the motherboard is used to power each storage module, thereby providing continuous power to ensure the normal operation of each storage structure.

[0119] Figure 7 This is a flow chart of detecting and responding to the state of an electric energy storage module provided in an embodiment of the present application, which may include steps 701 to 703. These steps are described in detail below.

[0120] 701. Detect the functional status of the electric energy storage module according to a set detection cycle;

[0121] In order to protect the data of the storage structure when an unnotified power failure occurs later, it is necessary to detect the functional status of the energy storage module to determine whether the function of the energy storage module is normal.

[0122] In one possible implementation, the functional status of the energy storage module may be detected by detecting the stability of the electric energy stored in the energy storage module. For example, the amount of electricity in the energy storage module may be detected according to a set detection cycle. If the amount of electricity is less than a preset loss threshold within a preset time period (including multiple detection cycles), then it can be considered that the electric energy stored in the energy storage module has been maintained within a stable range for a relatively long period of time, and it can be determined that the energy storage module is functioning normally.

[0123] In a possible implementation, the functional status of the electric energy storage module may be detected by detecting the charge and discharge functions of the electric energy storage module. If the charge and discharge functions are normal, it can be determined that the function of the electric energy storage module is normal.

[0124] During the operation of the electronic device, the process of detecting and responding to the state of the electric energy storage module is always executed.

[0125] In one possible implementation, when the electronic device is started, each component in the electronic device is powered on. Part of the power provided by the mainboard to the backplane can be used to charge the power storage module, and the other part can be provided to the storage structure to power the storage structure.

[0126] 702. Based on the functional status indicating that the electric energy storage module is functioning normally, continue to monitor the voltage of the mainboard of the electronic device, and control each storage structure to operate in the first mode, whereby the storage structure performs read and write operations in the first mode;

[0127] Among them, if the function of the power storage structure is normal, it is only necessary to continue to check the voltage of the electronic device motherboard and control each storage structure to maintain the state of operating in the first mode. There is no need to adjust the operation of each structure in the electronic device.

[0128] During normal operation of the storage structure, the storage structure operates in a first mode, and the storage structure can perform read operations and write operations in the first mode.

[0129] 703. Based on the functional status indicating that the electric energy storage module is functioning abnormally, an alarm message is output, where the alarm message is used to indicate that the electric energy storage module is functioning abnormally.

[0130] If the electric energy storage structure is abnormal in function, once an unnotified power failure occurs, the electric energy storage module cannot provide the electric energy required for each storage structure to execute the power failure protection data.

[0131] Therefore, when a malfunction of the energy storage module is detected, an alarm message is output to prompt that the energy storage module is abnormal. Accordingly, the user can handle the malfunctioning energy storage module as soon as possible after understanding the abnormality.

[0132] In a possible implementation, the alarm information may be generated by the control unit, or by the BMC, or by the BMC triggering each storage structure to generate the alarm information by utilizing a functional abnormality of the electric energy storage module.

[0133] In a possible implementation, the alarm information may be output in the form of an alarm tone, so as to notify the user of the electronic device by sound that the electric energy storage module is abnormal.

[0134] In a possible implementation, the alarm information may be output in the form of an interface display, and the alarm information may be output on a display interface of the electronic device to prompt a user of the electronic device that the electric energy storage module is abnormal.

[0135] The output of the alarm information may be outputting the alarm information to a structure such as a BMC or a CPU, so as to implement audio output or display output of the alarm information by using the structure.

[0136] In this embodiment, the functional status of the electric energy storage module is detected according to a set detection cycle; based on the functional status indicating that the electric energy storage module is functioning normally, the motherboard voltage in the electronic device is continuously monitored, and each storage structure is controlled to operate in the first mode, so that the storage structure performs read and write operations in the first mode; based on the functional status indicating that the electric energy storage module is functioning abnormally, the obtained alarm information is output, and the alarm information is used to indicate that the electric energy storage module is functioning abnormally. This implements the detection of the functional status of the electric energy storage module during operation of the electronic device and the issuance of an alarm when the electric energy storage module is functioning abnormally, so that the abnormally functioning energy storage module can be processed as quickly as possible, thereby improving data security during operation of the electronic device.

[0137] Figure 8 This is a flowchart of a process for handling a functional abnormality of an electric energy storage module provided by an embodiment of the present application, which may include steps 801 to 803. These steps are described in detail below.

[0138] 801. Indicate that the energy storage module is functionally abnormal based on the functional status, and report the functional abnormality information to a baseboard management controller.

[0139] The electronic device is also provided with a BMC (Baseboard Management Controller), which is connected to the backplane via an I2C bus (Inter-Integrated Circuit bus). The two exchange signals through the I2C bus, such as transmitting information and instructions.

[0140] When it is determined that the electric energy storage module has a function abnormality, information indicating the function abnormality is reported to the BMC.

[0141] In one possible implementation, after determining that the energy storage module has a functional abnormality, the functional abnormality is written into a register. The register serves as a register for recording the health status of the energy storage module. The BMC reads the information in the register through I2C to achieve the purpose of reporting the functional abnormality information.

[0142] 802. Receive a first instruction fed back by a baseboard management controller;

[0143] After obtaining the function abnormality information, the BMC generates a first instruction, which can be used to instruct each storage structure to switch modes.

[0144] In a possible implementation, the BMC uses I2C to obtain the setting and setting status information for a specific function in the NVME as the first instruction and sends it to each storage structure through the backplane.

[0145] As an example, the first instruction may be an Nvme set feature / get feature instruction.

[0146] The first instruction may be a Vendor Unique command. A Vendor Unique command is a vendor-specific command used in memory systems, such as solid-state drives (SSDs). This command allows a host to communicate with the memory system via a standard host protocol (such as SATA or NVMe) without physically connecting to a debug port.

[0147] The first instruction includes information related to the functional abnormality of the electric energy storage module, and the format of the first instruction satisfies the format for setting the storage structure operation mode. Accordingly, the BMC utilizes the functional abnormality of the electric energy storage structure and uses the first instruction to instruct each storage structure to switch from the first mode to the second mode.

[0148] Among them, the specific format and specific content of the first instruction can be set according to actual conditions and are not limited in this application.

[0149] 803. Send the first instruction to each storage structure. Each storage structure switches to the second mode according to the instruction. The storage structure performs a read-only operation in the second mode.

[0150] The backplane and each storage structure are also connected via an I2C bus, and the control unit of the backplane forwards the first instruction received from the BMC to each storage structure.

[0151] After receiving the first instruction, each storage structure can know that the function of the electric energy storage module is abnormal and switch from the first mode to the second mode.

[0152] When the storage structure operates in the first mode, it can respond to read requests and write requests respectively, and realize reading and writing of its stored data.

[0153] When the storage structure operates in the second mode, it only responds to read requests but not write requests.

[0154] Due to a malfunction in the energy storage module, if an unannounced power outage occurs, the energy storage module cannot support the various storage structures in executing the power-off policy, compromising data security. Therefore, in the event of a malfunction in the energy storage module, the storage module does not respond to write requests to prevent data from being written due to an unannounced power outage during a write operation. However, the storage module responds to read requests to best meet the operational requirements of current electronic devices.

[0155] In one possible implementation, if the electric energy storage module functions normally, information indicating that the module functions normally will be reported to the BMC. Accordingly, the BMC will feedback a second instruction to each storage structure regarding the normal function. Each storage structure will determine that the electric energy storage module functions normally based on the second instruction, and no mode adjustment is required, and will continue to maintain the first mode.

[0156] In this embodiment, functional abnormality of the electric energy storage module is characterized based on the functional status, and functional abnormality information is reported to the baseboard management controller; a first instruction fed back by the baseboard management controller is received; the first instruction is sent to each storage structure, and each storage structure switches to the second mode according to the instruction, and the storage structure performs read-only operations in the second mode. In the case of functional abnormality of the electric energy storage module, the baseboard management controller controls each storage structure to switch to the second mode. In the second mode, the storage structure performs read-only operations and does not perform write operations, which not only meets the operating requirements of the electronic device as much as possible, but also protects the data security in the storage structure.

[0157] Figure 9 This is a flow chart of detecting the functional status of the electric energy storage module provided in an embodiment of the present application, which may include steps 901 to 904. These steps are described in detail below.

[0158] 901. Control the electric energy storage module to discharge through a preset resistor;

[0159] The functional status of the electric energy storage module may be detected by detecting the charge and discharge functions of the electric energy storage module.

[0160] There is also a preset resistor on the back panel, and the resistance value of the preset resistor is known.

[0161] As an example, the preset resistor may be a 1000Ω (ohm) resistor. Of course, the value of the preset resistor is not limited in this application.

[0162] In a possible implementation, during the process of detecting the functional state of the electric energy storage module, the electric energy storage module is controlled to discharge to a preset resistor, and the preset resistor can release the electric energy in the form of heat.

[0163] 902. Recording a discharge time based on the voltage of the electric energy storage module reaching a preset voltage threshold;

[0164] During the discharge process of the electric energy storage module, its voltage is monitored, and time is counted from the start of discharge, and the duration of the discharge process is recorded as the discharge time.

[0165] In a possible implementation, the preset voltage threshold may be a value that can indicate that the power in the electric energy storage module has been fully released. It is generally a smaller value, such as 0.1V, but the value is certainly not limited thereto.

[0166] When the energy released by the energy storage module reaches the preset voltage threshold, the timer is stopped to obtain the discharge time of this discharge. The recorded discharge time is compared with the preset time threshold. If the discharge time is less than the preset time threshold, step 903 is executed; otherwise, step 904 is executed.

[0167] The preset time threshold is the length of time required for the energy storage module to release a rated amount of energy to a preset resistor. The rated amount of energy is the difference between the energy storage module's rated voltage and the energy at the preset voltage threshold. The rated amount of energy can be approximately the amount of energy that the energy storage module can store at a calibrated voltage value. This rated amount of energy can support the storage structure's execution of the power-off strategy.

[0168] 903. Determine that the electric energy storage module is malfunctioning based on the discharge time being less than a preset time threshold;

[0169] If the discharge time is less than a preset time threshold, it is determined that the amount of electricity released by the electric energy storage module is less than the amount of electricity required to support the storage structure in executing the power-off strategy.

[0170] The reason why the power released by the energy storage module is less than the power required to support the storage structure to execute the power-off strategy may be that the power stored in the energy storage module is insufficient, or it may be caused by other reasons.

[0171] Then, when an unnotified power failure occurs, the electric energy storage module cannot support the storage structure to execute the power failure strategy, and the original design intention of setting up the electric energy storage module cannot be achieved. Therefore, it is determined that the function of the electric energy storage module is abnormal.

[0172] 904. Based on the discharge time being not less than a preset time threshold, determine that the function of the electric energy storage module is normal.

[0173] If the discharge time is less than a preset time threshold, it is determined that the amount of electricity released by the electric energy storage module matches the amount of electricity required to support the storage structure in executing the power-off strategy.

[0174] Then, when an unnotified power failure occurs, the electric energy storage module can support the storage structure to execute the power failure strategy, which can achieve the original design intention of setting up the electric energy storage module. Therefore, it is determined that the electric energy storage module functions normally.

[0175] In this embodiment, the energy storage module is controlled to discharge through a preset resistor; the discharge time is recorded when the voltage of the energy storage module reaches a preset voltage threshold; if the discharge time is less than the preset time threshold, the energy storage module is determined to be malfunctioning; if the discharge time is not less than the preset time threshold, the energy storage module is determined to be functioning normally. By controlling the length of the energy storage module discharge time, whether the energy storage module is functioning normally is determined, allowing for subsequent configuration changes based on different normal and abnormal conditions, thereby improving data security within the storage structure.

[0176] A hard disk data protection method provided by an embodiment of the present application has been introduced above. An electronic device that executes the hard disk data protection method will be introduced below.

[0177] See also Figure 10 , Figure 10 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 1000 includes: at least one storage structure 1001, an energy storage module 1002, a mainboard 1003, and a backplane 1004;

[0178] The mainboard 1003 supplies power to the at least one storage structure 1001 through the backplane 1004;

[0179] A control unit 10041 is provided on the backplane 1004. The control unit 10041 is used to control each storage structure to execute a power-off strategy based on the power stored in the power storage module, if the power-off notification is not received and the motherboard voltage indicates that the motherboard has lost power. Therefore, each storage structure saves data.

[0180] In a possible implementation, the function of the control unit may be implemented by a functional chip in the electronic device.

[0181] The function of the control unit in the hard disk data protection method is described in the aforementioned method embodiment and will not be elaborated here.

[0182] The electric energy storage module can be arranged on the backplane and connected to the control unit signal; or it can be arranged independently and connected to the backplane via the I2C bus.

[0183] The storage structure is plugged into the backplane and operates using the electrical energy transmitted from the backplane.

[0184] Among them, the mainboard provides power to the backplane, and the backplane can use the power provided by the mainboard to power the storage structure. In the event of an unnotified power outage, the backplane uses the power in the power storage module to power the storage structure, so that the storage structure executes the power-off strategy and saves data.

[0185] Figure 111 is another structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 1100 includes: at least one storage structure 1101, an energy storage module 1102, a mainboard 1103, and a backplane 1104. A control unit 11041 is provided on the backplane 1104.

[0186] Among them, the Figure 11 At least one storage structure 1101, mainboard 1103 and backplane 1104 and their connections Figure 10 The same is true in the previous section and will not be repeated here.

[0187] The power storage module 1102 is disposed on the back plate 1104 , and the back plate is provided with a power input terminal 11042 and a power output terminal 11043 ;

[0188] The power storage module receives power from the mainboard via the power input terminal 11042 on the backplane and stores the power;

[0189] Wherein, based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has lost power, the electric energy storage module 1102 is connected to the electric energy output terminal 11043, and the electric energy stored in the electric energy storage module 11042 is provided to each storage structure 1101;

[0190] The control unit 11041 is further configured to send a power-off instruction to each storage structure 1101 to trigger each storage structure to save data based on the fact that no power-off notification is received and the motherboard voltage indicates that the motherboard has experienced a power-off.

[0191] Among them, based on the fact that the mainboard voltage indicates that the mainboard has not been powered off, the power input end is connected to the power output end, and the power received from the mainboard is provided to each storage structure through the power output end.

[0192] The power input and output ends of the backplane are respectively connected to a control unit, which controls whether the power output end is connected to the power storage module and whether the power input end is connected to the power output end.

[0193] Among them, if no power-off notification is received and the motherboard voltage indicates that the motherboard has experienced a power-off, in the event of a non-notified power-off, the control unit controls the power output end to be connected to the power storage module, and the power of the power storage module is provided to the storage structure to execute the power-off strategy.

[0194] Among them, if the mainboard voltage indicates that the mainboard has not been powered off, the control unit controls the power input end and the power output end to be connected to provide the power provided by the mainboard to the storage structure for operation.

[0195] Among them, when receiving the power-off notification, the control unit maintains the connection between the power input terminal and the power output terminal to provide the power currently provided by the mainboard to the storage structure, supporting the storage structure to execute the power-off strategy.

[0196] In one possible implementation, if no power-off notification is received and the motherboard voltage indicates that the motherboard has experienced a power-off, in the event of an unnotified power-off, the storage structure determines the target task in the execution task, executes the target task, and ignores the non-target task, and the importance of the target task is higher than the importance of the non-target task.

[0197] The storage structure utilizes the energy storage module's power supply to execute a non-notified power-off strategy. Because the energy storage module has limited power, data protection must be completed quickly. Therefore, among the tasks in the storage module, the most important target task is identified and executed, while the remaining non-target tasks are ignored.

[0198] The target task is a highly important task related to a program crucial to the operation of the storage module. The importance of each task can be set in the storage module. When the storage module receives a power-off command, it selects the most important target task for execution based on the importance of its executing and pending tasks, discarding the remaining tasks to ensure that data related to the more important tasks is preserved during the power-off process.

[0199] Figure 12 1 is another structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 1200 includes: at least one storage structure 1201, an energy storage module 1202, a mainboard 1203, a backplane 1204, and a baseboard control manager 1205. A control unit 12041 is provided on the backplane 1204, and the energy storage module 1202 is provided on the backplane 1204.

[0200] Among them, the Figure 12 At least one storage structure 1201, power storage module 1202, main board 1203 and backboard 1204 and their connections Figure 11 The same is true in the previous section and will not be repeated here.

[0201] The baseboard control manager 1205 is configured to control the at least one storage structure to switch to a second mode when the electric energy storage module is malfunctioning, and the storage structure performs a read-only operation in the second mode.

[0202] When the electric energy storage module functions normally, each storage structure is in a first mode and performs read and write operations in the first mode.

[0203] The control unit detects whether the energy storage structure is functioning properly and stores the test results in registers on the backplane. If the test results indicate that the energy storage structure is functioning abnormally, the baseboard monitoring manager transmits the abnormal information read to the storage structure via the control unit, and each storage structure triggers the second mode, starting to support read-only operations and prohibiting write operations. If the test results indicate that the energy storage structure is functioning normally, the baseboard monitoring manager transmits the normal information read to the storage structure via the control unit, and each storage structure maintains the first mode, supporting both read and write operations.

[0204] In this embodiment, an electronic device includes: at least one storage structure, an energy storage module, a mainboard, and a backplane; the mainboard supplies power to the at least one storage structure via the backplane; and the backplane is provided with a control unit configured to, upon receiving no power-off notification and the mainboard voltage indicating a power-off, control each storage structure to execute a power-off strategy based on the energy stored in the energy storage module, if the energy storage module is functioning normally, so as to enable each storage structure to preserve data. During operation of the electronic device, if an abnormal power-off occurs and the energy storage module is functioning normally, the energy in the energy storage module is used to control each storage structure to power off, thereby protecting its data and improving data security in the electronic device.

[0205] Figure 13 This is a schematic diagram of an application scenario of an electronic device provided by an embodiment of the present application. In this application scenario, the electronic device includes: a motherboard 1301, a BMC 1302, a backplane 1303, a CPU / PCH 1304, and a hard disk 1305. The backplane is provided with an energy storage module 1306 composed of multiple capacitors connected in series and a control unit 1307.

[0206] The control unit can use the MP5520 chip in this application scenario. The hard drive uses a PLN M.2 (Next Generation Form Factor (NGFF) M.2, an electrical interface specification for the dimensions and pinout of internal computer expansion cards and related connectors) hard drive and supports power-loss protection. The backplane uses a PLN M.2 backplane compatible with the hard drive.

[0207] The backplane is connected to the mainboard, BMC, CPU / PCH, and hard drive. The backplane's control unit is electrically connected to the mainboard, receiving 12V power from the mainboard. The data connection between the backplane's control unit and the BMC uses the I2C protocol. The data connection between the backplane and the CPU / PCH supports both the I2C and PCIe protocols. The backplane's control unit and the hard drive use P3V3 power transmission, transmitting 3.3V power. The control unit can control whether the power comes from the mainboard or the power storage module. Data transmission between the backplane and the hard drive uses the PCIe protocol. There's also a PLN connection between the backplane and the hard drive for transmitting power-off commands. Furthermore, the BMC uses I2C to connect to the hard drive via the backplane.

[0208] The control unit is primarily responsible for powering on the hard drive and performing functional testing on the energy storage module to determine its functional health status, which indicates whether it is functioning properly. The control unit notifies the BMC of the energy storage module's functional health status via I2C. The BMC uses the command setting rules defined in the NVME base specification to set commands over I2C to notify the hard drive of the energy storage module's functional health status.

[0209] Among them, after the hard disk receives the command of the functional health status of the energy storage module, if the functional health of the energy storage module is abnormal, the hard disk can generate an alarm message to the BMC, and can also upload the alarm message to the system of the electronic device. In addition, the hard disk can switch mode and only respond to read requests.

[0210] Figure 14 This is a flow chart of the electronic device provided in an embodiment of the present application in an application scenario, including steps 1401-1412. These steps are described in detail below.

[0211] 1401, host is powered on;

[0212] In this step, the mainboard, CPU / PCH, BMC, and backplane are all powered on.

[0213] 1402. Capacitor charging;

[0214] After the backplane is powered on, the backplane inputs a 12V voltage, and the control unit uses the 12V input voltage to start charging the energy storage module. At the same time, the 12V voltage is converted to 3.3V through the voltage divider circuit and the 3.3V voltage is provided to the hard disk.

[0215] 1403. Controlling the discharge of the electric energy storage module to detect the function of the electric energy storage module;

[0216] During the operation of the electronic device, the function of the electric energy storage module is detected, and the control unit stores the detection result in the register.

[0217] If it is detected that the electric energy storage module functions normally, step 1404 is executed.

[0218] 1404. Monitor the voltage value provided by the mainboard;

[0219] The backplane receives the voltage provided by the mainboard and monitors whether the voltage value is less than a preset voltage threshold.

[0220] If the voltage value is lower than a preset voltage threshold, it indicates that the motherboard is powered off.

[0221] If the voltage value provided by the mainboard is greater than the set voltage threshold, it indicates that the mainboard is operating normally. The mainboard can be returned to execution 1403 according to the set detection cycle to implement the function of detecting the energy storage module according to the set cycle during the operation of the electronic device.

[0222] 1405. If the voltage value provided by the motherboard is lower than the set voltage threshold, power-off protection is triggered;

[0223] 1406. Switching to the power storage module to supply power to the hard disk;

[0224] 1407. If the voltage value of the monitored electric energy storage module is less than a preset voltage threshold, disconnect the circuit between the electric energy storage module and the storage structure;

[0225] 1408. Electronic equipment is shut down and powered off;

[0226] 1409. BMC reads the test results in the register through the I2C bus;

[0227] If the monitoring result indicates that the electric energy storage module functions normally, the process returns to step 1402 to charge the capacitor again in preparation for subsequently utilizing the electric energy in the capacitor to power the storage structure.

[0228] If the monitoring result indicates that the electric energy storage module is malfunctioning, step 1410 is executed.

[0229] 1410. BMC sends a command to the hard disk;

[0230] The command is set using a command setting rule defined in the NVME base spec, and the command includes information about abnormal functions of the energy storage module.

[0231] 1411. The hard disk generates an alarm message and switches to support read-only requests.

[0232] 1412. BMC reads the alarm information through I2C and outputs it.

[0233] An electronic device is also provided in an embodiment of the present application. Figure 15 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the hard disk data protection method of the embodiment of the present application. The electronic device in the embodiment of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 15 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0234] like Figure 15 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1501, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1502 or programs loaded from a storage device 1508 into a random access memory (RAM) 1503. When the electronic device is powered on, the RAM 1503 also stores various programs and data required for the operation of the electronic device. The processing device 1501, ROM 1502, and RAM 1503 are interconnected via a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.

[0235] Typically, the following devices may be connected to the I / O interface 1505: an input device 1506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1508 including, for example, a memory card, a hard disk, etc.; and a communication device 1509. The communication device 1509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 15 The electronic device is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0236] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any hard disk data protection method provided in the embodiment of the present application.

[0237] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement any hard disk data protection method provided in an embodiment of the present application.

[0238] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0239] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0240] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0241] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A method for protecting hard disk data, comprising: Monitoring the voltage of a mainboard in an electronic device, wherein the mainboard provides power to each storage structure in the electronic device via a backplane, wherein the backplane is connected to at least one storage structure; Based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has experienced a power-off, if the power storage module functions normally, each storage structure is controlled to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data.

2. The hard disk data protection method according to claim 1, wherein the controlling each storage structure to execute a power-off strategy based on the power stored in the power storage module comprises: Based on the fact that the electric energy storage module is arranged on the back plate, the electric energy stored in the electric energy storage module is provided to each storage structure through the electric energy output terminal of the back plate; Send a power-off instruction to each storage structure to trigger each storage structure to save data.

3. The hard disk data protection method according to claim 2, further comprising: Based on the mainboard voltage indicating that the mainboard is not powered off, receiving power provided by the mainboard through the receiving end; The power output terminal of the backplane is controlled to provide the power received from the mainboard to each storage structure.

4. The hard disk data protection method according to claim 1, further comprising: Detecting the functional status of the electric energy storage module according to a set detection cycle; Based on the functional status indicating that the electric energy storage module is functioning normally, continuing to monitor the motherboard voltage in the electronic device, and controlling each storage structure to operate in a first mode, wherein the storage structure performs read operations and write operations in the first mode; Based on the functional status indicating the functional abnormality of the electric energy storage module, an alarm message is output, where the alarm message is used to prompt that the electric energy storage module is abnormal.

5. The hard disk data protection method according to claim 4, further comprising: Characterizing a functional abnormality of the electric energy storage module based on the functional status, and reporting functional abnormality information to a baseboard management controller; receiving a first instruction fed back by a baseboard management controller; The first instruction is sent to each storage structure, and each storage structure switches to a second mode according to the instruction, and the storage structure performs a read-only operation in the second mode.

6. The hard disk data protection method according to claim 4, wherein the detecting the functional status of the power storage module comprises: Controlling the electric energy storage module to discharge through a preset resistor; Recording a discharge time based on the voltage of the electric energy storage module reaching a preset voltage threshold; determining, based on the discharge time being less than a preset time threshold, that the electric energy storage module is malfunctioning; Based on the fact that the discharge time is not less than a preset time threshold, it is determined that the function of the electric energy storage module is normal.

7. An electronic device comprising: at least one storage structure, an electrical energy storage module, a mainboard, and a backplane; The mainboard supplies power to the at least one storage structure via the backplane; The backplane is provided with a control unit, which is used to control each storage structure to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data, based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has lost power. If the power storage module functions normally, the control unit is used to control each storage structure to execute a power-off strategy based on the power stored in the power storage module, so that each storage structure saves data.

8. The electronic device according to claim 7, wherein the power storage module is provided on the back panel, and the back panel is provided with a power input terminal and a power output terminal; The electric energy storage module receives electric energy provided by the mainboard through the electric energy input terminal on the backplane and stores the electric energy; in, Based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has lost power, the electric energy storage module is connected to the electric energy output terminal, and the electric energy stored in the electric energy storage module is provided to each storage structure; The control unit is further configured to send a power-off instruction to each storage structure to trigger each storage structure to save data based on the fact that no power-off notification is received and the mainboard voltage indicates that the mainboard has experienced a power-off.

9. The electronic device according to claim 8, wherein the power input terminal is connected to the power output terminal based on the mainboard voltage indicating that the mainboard has not been powered off, and the power received from the mainboard is provided to each storage structure through the power output terminal.

10. The electronic device according to claim 1, further comprising: The baseboard control manager is used to control the at least one storage structure to switch to a second mode when the electric energy storage module is abnormal, and the storage structure performs a read-only operation in the second mode.