Power failure protection device, data processing method and device, equipment and storage medium

The power-loss protection device, which works in conjunction with the capacitor and battery power supply unit, solves the problem of data loss when the solid-state drive loses power, realizes stable data transmission and miniaturized design, adapts to the needs of multiple scenarios, and improves the security and reliability of data storage.

CN121996476APending Publication Date: 2026-05-08TP-LINK INT SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TP-LINK INT SHENZHEN CO LTD
Filing Date
2025-12-24
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When power is lost, data in the volatile storage of existing solid-state drives is not written to the non-volatile storage in a timely manner, resulting in data loss or corruption. In addition, traditional large-capacity energy storage solutions occupy a lot of space and cost, cannot meet the needs of miniaturization, and the response method cannot prioritize the processing of critical data.

Method used

The system employs a combination of capacitor-powered and battery-powered units. When a power outage is detected, the control unit controls data writing and limits the maximum energy storage capacity of each capacitor and battery to achieve rapid response and continuous power supply. Combined with the collaborative power supply control mechanism of the power supply units, it ensures stable data transmission.

Benefits of technology

It effectively reduces the risk of data loss, ensures data integrity and security, adapts to diverse power outage scenarios, reduces device size and cost, conforms to the trend of miniaturization, and improves the stability and reliability of power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996476A_ABST
    Figure CN121996476A_ABST
Patent Text Reader

Abstract

The invention discloses a power failure protection device. The power failure protection device is connected with the solid state disk, the power failure protection device comprises a control unit, a capacitor power supply unit and a battery power supply unit, the maximum electric energy storage amount of a first capacitor in the capacitor power supply unit is smaller than or equal to 120 uF, and the maximum electric energy storage amount of a first battery in the battery power supply unit is smaller than or equal to 120 mAh; the control unit is configured to control the capacitor power supply unit and the battery power supply unit to supply power to the solid state disk when it is detected that the solid state disk is in a power-down state; under the condition that the capacitor power supply unit and the battery power supply unit supply power to the solid state disk, data in the volatile memory of the solid state disk is written into the nonvolatile memory. Thus, through cooperative work of the control unit, the capacitor power supply unit and the battery power supply unit, a power failure event can be quickly responded, the data loss risk is effectively reduced, the integrity and safety of data are guaranteed to a certain extent, and a powerful guarantee is provided for data safety of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a power failure protection device, a data processing method, a data processing apparatus, an electronic device, a computer device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In related technologies, solid-state drives (SSDs) typically rely on DRAM (Dynamic Random Access Memory) for high-speed data caching during operation, while user data is ultimately stored in non-volatile memory such as NAND flash memory. However, when a computer device unexpectedly loses power, if the data cached in volatile memory is not written to non-volatile memory in a timely manner, data loss or corruption will occur, which will affect the user experience to some extent. Summary of the Invention

[0003] This application provides a power failure protection device, a data processing method, a data processing apparatus, an electronic device, a computer device, a computer-readable storage medium, and a computer program product.

[0004] This application provides a power-loss protection device, which is connected to a solid-state drive. The power-loss protection device includes a control unit, a capacitor power supply unit, and a battery power supply unit. The maximum energy storage capacity of the first capacitor in the capacitor power supply unit is less than or equal to 120uF, and the maximum energy storage capacity of the first battery in the battery power supply unit is less than or equal to 120mAh.

[0005] The control unit is configured to:

[0006] When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit and the battery power supply unit are controlled to supply power to the solid-state drive.

[0007] When the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive, the data in the volatile memory of the solid-state drive is written to the non-volatile memory.

[0008] In this way, through the coordinated work of the control unit, capacitor power supply unit and battery power supply unit, it can quickly respond to power failure events, effectively reduce the risk of data loss, and to a certain extent ensure the integrity and security of data, providing strong protection for users' data security.

[0009] In some embodiments, the maximum energy storage capacity of each capacitor in the capacitor power supply unit is less than or equal to 120uF, and the maximum energy storage capacity of each battery in the battery power supply unit is less than or equal to 120mAh.

[0010] In this way, limiting the upper limit of the capacity of all energy storage components in the capacitor power supply unit and the battery power supply unit solves the problem of excessive device size caused by the excessive capacity of some energy storage components to a certain extent. This makes the overall structure of the power failure protection device more compact, reduces the area occupied, and is more compatible with small form factor solid-state drives such as M.2 2230. At the same time, it reduces the overall material cost to a certain extent, which is in line with the development trend of equipment miniaturization.

[0011] In some embodiments, the control unit is specifically configured as follows:

[0012] When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit is controlled to supply power to the solid-state drive;

[0013] When the capacitor power supply unit is detected supplying power to the solid-state drive, the battery power supply unit is controlled to supply power to the solid-state drive.

[0014] In this way, by dividing the power supply unit into capacitor power supply unit and battery power supply unit and establishing a collaborative power supply control mechanism, a seamless connection of power supply is achieved, which improves the stability and reliability of power supply to a certain extent. Compared with a single power supply unit solution, it can adapt to diverse power failure scenarios and data writing requirements, improve the effect of power failure protection, and ensure the safe storage of data.

[0015] In some embodiments, the power-down protection device is installed on the computer device, and the solid-state drive enters a power-down state when the computer device stops supplying power to the solid-state drive.

[0016] Thus, the integrated design of the power failure protection device and the computer equipment enables rapid detection and response to power failure events, which to some extent shortens the time from the occurrence of a power failure to the activation of the power failure protection, ensures the timely initiation of data writing operations, reduces the risk of data loss, and improves the timeliness and reliability of power failure protection.

[0017] In some embodiments, the control unit is further configured to:

[0018] When the computer device supplies power to the solid-state drive, the power status of the computer device is obtained;

[0019] When the computer device is determined to be in a preset power state, the solid-state drive is controlled to write the target data in the volatile memory to the non-volatile memory.

[0020] Thus, through predictive protection mechanisms, proactive protection is achieved compared to traditional passive power failure protection modes. By monitoring the power status of computer equipment in real time, the risk of power failure can be predicted in advance, and data writing operations can be initiated. This reduces the risk of data loss due to sudden power failures to a certain extent, and improves the security and timeliness of data protection.

[0021] In some implementations, the data includes multiple types of sub-data, each type of sub-data corresponding to a priority level, and the control unit is further configured to:

[0022] The various types of sub-data in the volatile memory of the solid-state drive are sequentially written to the non-volatile memory in descending order of priority.

[0023] In this way, by prioritizing and writing sub-data in sequence, differentiated and targeted data protection is achieved. This ensures the safe storage of the most important data even when the power supply of the capacitor-powered unit and the battery-powered unit is limited. To a certain extent, this reduces the loss caused by data loss, improves the effectiveness and practicality of data protection, and meets users' storage needs for data of different importance.

[0024] In some embodiments, the control unit is further configured to:

[0025] Based on the operating status data of the solid-state drive, the current remaining power of the capacitor power supply unit, and the current remaining power of the battery power supply unit, determine whether the capacitor power supply unit and the battery power supply unit can support writing the target data in the volatile memory of the solid-state drive to the non-volatile memory.

[0026] When the capacitor power supply unit and the battery power supply unit cannot support the sequential writing of the multiple types of sub-data in the volatile memory of the solid-state drive to the non-volatile memory, the solid-state drive is controlled to perform a preset operation to reduce operating power consumption.

[0027] In this way, by predicting the power support capacity of the capacitor power supply unit and the battery power supply unit and controlling the system power consumption, dynamic management of the power supply situation after power failure is realized. Power shortages are identified in advance and operating power consumption is reduced, which reduces the power consumption of the solid-state drive and effectively extends the power supply time of the capacitor power supply unit and the battery power supply unit. This, to a certain extent, increases the probability of writing the target data completely and improves the effectiveness and flexibility of power failure protection.

[0028] In some implementations, the preset operation includes shutting down some data write channels of the non-volatile memory and / or reducing the controller frequency of the solid-state drive.

[0029] In this way, the two operations of shutting down some data writing channels and reducing the main control frequency can, to some extent, resolve the contradiction between power consumption and data writing stability when the power is insufficient. According to actual needs, the power consumption is reduced in a step-by-step manner, maximizing the power supply time under limited power, improving the success rate and integrity of data writing. Compared with the traditional indiscriminate power reduction scheme, it can not only avoid the sharp drop in writing efficiency caused by excessive power reduction to a certain extent, but also effectively control power consumption and improve the reliability and flexibility of power failure protection.

[0030] In some embodiments, the control unit is further configured to:

[0031] Determine the first current aging level of the capacitor power supply unit and the second current aging level of the battery power supply unit;

[0032] If the first current aging degree is greater than or equal to the first aging degree threshold, and / or the second current aging degree is greater than or equal to the second aging degree threshold, a preset prompt message will be provided.

[0033] When the first current aging level is greater than or equal to the third aging level threshold, and / or the second current aging level is greater than or equal to the fourth aging level threshold, the data in the volatile memory of the solid-state drive is written to the non-volatile memory in a preset manner, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

[0034] In this way, by monitoring and responding in a tiered manner to the aging status of the capacitor power supply unit and the battery power supply unit in real time, the system can promptly and accurately detect their performance degradation. When the aging level of the capacitor power supply unit and the battery power supply unit reaches the preset warning threshold, the system will proactively remind the user to perform maintenance or replacement through preset prompts. This effectively avoids the problem of power-off protection failure caused by the continuous performance degradation of the capacitor power supply unit and the battery power supply unit, and improves the maintainability and operational reliability of the system to a certain extent. At the same time, the system dynamically adjusts the data writing method according to the different aging levels of the capacitor power supply unit and the battery power supply unit, effectively extending the effective service life of the power-off protection system and ensuring that the capacitor power supply unit and the battery power supply unit can provide stable power-off protection capabilities under different health conditions.

[0035] This application provides a data processing method applied to the power failure protection device described in some of the above embodiments, the method comprising:

[0036] When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit and the battery power supply unit are controlled to supply power to the solid-state drive.

[0037] When the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive, the data in the volatile memory of the solid-state drive is written to the non-volatile memory.

[0038] Thus, with power supplied by both the capacitor power supply unit and the battery power supply unit, the active control of the data writing operation achieves, to a certain extent, the complete and accurate transmission of the target data from volatile memory to non-volatile memory, ensuring the timeliness of data transmission, reducing the risk of data loss due to control delay, and improving the security and reliability of data storage.

[0039] In some embodiments, the capacitor power supply unit supplies power to the solid-state drive when the solid-state drive enters a power-down state, and the method further includes:

[0040] When the capacitor power supply unit is detected supplying power to the solid-state drive, the battery power supply unit is controlled to supply power to the solid-state drive.

[0041] In this way, by constructing a collaborative power supply mechanism of two-level power supply units, the problem that a single power supply unit cannot simultaneously ensure rapid response and continuous power supply is effectively solved. To a certain extent, seamless power supply is achieved, improving the stability and reliability of power supply. Compared with a single power supply unit solution, it can adapt to diverse power outage scenarios and data writing requirements, thereby improving the effectiveness of power outage protection and ensuring the safe storage of data.

[0042] This application also provides a data processing apparatus applied to the power failure protection device described in some of the above embodiments, the apparatus comprising:

[0043] The hard disk control unit is used to control the capacitor power supply unit and the battery power supply unit to supply power to the solid-state drive when the solid-state drive is detected to be in a power-off state.

[0044] The data writing unit is used to write data from the volatile memory of the solid-state drive to the non-volatile memory when the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive.

[0045] Thus, with power supplied by both the capacitor power supply unit and the battery power supply unit, the active control of the data writing operation achieves, to a certain extent, the complete and accurate transmission of the target data from volatile memory to non-volatile memory, ensuring the timeliness of data transmission, reducing the risk of data loss due to control delay, and improving the security and reliability of data storage.

[0046] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the methods described in some of the above embodiments.

[0047] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the methods described in some of the above embodiments.

[0048] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods described in some of the above embodiments.

[0049] The electronic device, computer-readable storage medium, and computer program product provided in this application, when implementing the above method, control the capacitor power supply unit and the battery power supply unit to supply power to the solid-state drive when the solid-state drive is detected to be in a power-off state; while the capacitor power supply unit and the battery power supply unit are supplying power to the solid-state drive, data in the volatile memory of the solid-state drive is written to the non-volatile memory. Thus, by actively controlling the data writing operation while the capacitor power supply unit and the battery power supply unit are supplying power, the complete and accurate transmission of target data from volatile memory to non-volatile memory is achieved to a certain extent, ensuring the timeliness of data transmission, reducing the risk of data loss due to control delays, and improving the security and reliability of data storage.

[0050] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description

[0051] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:

[0052] Figure 1 This is a schematic diagram of a power failure protection device according to certain embodiments of this application;

[0053] Figure 2 This is a schematic diagram of the component connections of a power failure protection device according to certain embodiments of this application;

[0054] Figure 3 This is one of the flowcharts illustrating a data processing method according to certain embodiments of this application;

[0055] Figure 4 This is a second schematic flowchart of a data processing method according to certain embodiments of this application;

[0056] Figure 5 This is a third flowchart illustrating a data processing method according to certain embodiments of this application;

[0057] Figure 6 This is a fourth flowchart illustrating a data processing method according to certain embodiments of this application;

[0058] Figure 7 This is the fifth flowchart illustrating a data processing method according to certain embodiments of this application;

[0059] Figure 8 This is a flowchart of a data processing method according to certain embodiments of this application, number six.

[0060] Figure 9 This is a schematic diagram of the workflow of a data processing method according to certain embodiments of this application. Detailed Implementation

[0061] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.

[0062] In the field of data storage technology, solid-state drives (SSDs) have been widely used in consumer electronics, enterprise servers, network video recorders (NVRs), and other scenarios, becoming the mainstream storage medium. Their data security and reliability have attracted significant attention. When an SSD is working normally, user data is first cached in volatile memory and then transferred to non-volatile flash memory for permanent storage. However, a sudden power outage can lead to the loss of unwritten data in the cache and may also cause serious damage such as file system corruption and metadata corruption.

[0063] To address the risk of data loss due to sudden power outages, relevant technologies generally employ backup power circuit solutions based on high-capacity energy storage components. This solution is primarily implemented through two specific methods: First, a capacitor-based backup power solution. As the most widely used method, its core involves deploying a set of high-capacity tantalum or polymer capacitors on the solid-state drive's printed circuit board (PCB), along with a power monitoring circuit. When the power monitoring circuit detects that the main power supply voltage has dropped to a preset threshold, it quickly switches to capacitor-based power supply to provide temporary power to the solid-state drive's controller chip and memory. This ensures sufficient time to write user data temporarily stored in Dynamic Random Access Memory (DRAM) and critical metadata such as Flash Translation Layer (FTL) mapping tables to non-volatile flash memory chips. Second, a fixed response process. Upon detecting a power outage, the solid-state drive's firmware triggers a preset emergency refresh process. This process immediately stops receiving all new host commands and initiates data writing operations, writing as much data stored in DRAM as possible to the flash memory.

[0064] Although the above technical solutions can achieve basic power loss protection, their inherent technical defects are becoming increasingly prominent as the application scenarios of solid-state drives continue to expand and form factors develop towards miniaturization, such as the M.2 2230 specification.

[0065] First, the deployment of large-capacity tantalum or polymer capacitors in this solution not only increases the footprint of the printed circuit board and the bill of materials (BOM) cost, conflicting with the trend of miniaturization in solid-state drives (SSDs), but also has a limited lifespan, with performance severely degrading under high-temperature environments, affecting the stability of power-loss protection. Second, related technical solutions typically calculate the required backup energy based on worst-case scenarios such as full disk writes, leading to over-design of capacitor capacity and an inability to dynamically adjust according to the real-time workload of the SSD, resulting in wasted energy resources. Third, the power-loss detection and subsequent response process is relatively fixed; once a power loss is detected, a unified emergency data refresh process is initiated. This mechanical response method cannot prioritize processing user-critical data within limited energy and time, potentially leading to the loss of critical data. Finally, related technical solutions only focus on the internal working state of the SSD, failing to establish a collaborative mechanism with the host system or other peripheral devices. They cannot sense external power status information such as the remaining power of the host battery, making it difficult to initiate preventative data protection measures in advance, and can only respond passively after a power loss occurs.

[0066] Based on the above issues, please refer to Figure 1This application provides a power-off protection device 100, which is connected to a solid-state drive 200. The power-off protection device 100 includes a control unit 110, a capacitor power supply unit 120, and a battery power supply unit 130. The maximum energy storage capacity of the first capacitor in the capacitor power supply unit 120 is less than or equal to 120uF, and the maximum energy storage capacity of the first battery in the battery power supply unit 130 is less than or equal to 120mAh.

[0067] Control unit 110 is configured as follows:

[0068] When the solid-state drive 200 is detected to be in a power-off state, the capacitor power supply unit 120 and the battery power supply unit 130 are controlled to supply power to the solid-state drive 200.

[0069] When the capacitor power supply unit 120 and the battery power supply unit 130 supply power to the solid-state drive 200, the data in the volatile memory 210 of the solid-state drive 200 is written to the non-volatile memory 220.

[0070] Specifically, the power failure protection device 100 is a device that can ensure data security when the solid-state drive 200 loses external power. It provides temporary power to the solid-state drive 200 and controls data transmission through its own structure to avoid data loss.

[0071] Solid-state drives (SSDs) are storage devices that use flash memory (Flash chips) or DRAM as storage media. They are characterized by fast read and write speeds and strong shock resistance, and are widely used in consumer electronics, enterprise servers, and other fields.

[0072] Volatile memory 210 usually refers to dynamic random access memory DRAM, which can be used to temporarily cache data. The data stored in it will be lost after power failure. It is a component in solid-state drive 200 used for high-speed data caching.

[0073] Non-volatile memory 220 generally refers to flash memory chips, which can retain data for a long time after power failure and are the components in solid-state drive 200 used for permanent data storage.

[0074] The control unit 110 is the control component of the power failure protection device 100. It can monitor the power supply status, coordinate the operation of each capacitor power supply unit 120 and battery power supply unit 130, and issue power supply control commands based on the detection results to ensure the orderly progress of data transmission.

[0075] The capacitor power supply unit 120 is responsible for quickly responding to power supply during power failure. It has the characteristic of strong instantaneous discharge capability and can provide immediate power support to the solid-state drive 200 in the early stage of power failure.

[0076] The battery power supply unit 130 is responsible for continuous power supply. Compared with the capacitor power supply unit 120, the battery power supply unit 130 has a larger energy storage capacity and can continue to supply power after the capacitor power supply unit 120 supplies power, so as to ensure long-term data writing operations.

[0077] The first capacitor is an energy storage element in the capacitor power supply unit 120, capable of storing and releasing electrical energy. The first battery is an energy storage element in the battery power supply unit 130, also capable of storing and releasing electrical energy.

[0078] The maximum energy storage capacity is the upper limit of the energy that the power supply unit can provide, and the size of the maximum energy storage capacity determines the power supply capacity of the power supply unit.

[0079] A power outage typically refers to a situation where the power supply to the solid-state drive (SSD) 200 is interrupted. This can be caused by power failure, device malfunction, or other external factors. In this state, the SSD 200 cannot maintain normal operation, potentially leading to the loss of unwritten target data in the cache. In severe cases, it can also cause file system structure corruption, metadata corruption, and other problems, resulting in abnormal device operation or permanent data loss.

[0080] The target data refers to various types of data that need to be protected and are stored in the volatile memory 210, including user business data, system metadata, mapping tables, and other information.

[0081] When the solid-state drive 200 is working normally, the power failure protection device 100 is in standby mode, monitoring the power supply status of the solid-state drive 200 in real time. When the external power supply is interrupted and the solid-state drive 200 enters a power failure state, the capacitor power supply unit 120 and the battery power supply unit 130 of the power failure protection device 100 respectively supply power to the solid-state drive 200, ensuring that the solid-state drive 200 will not stop working due to power failure during data transmission, and providing stable power guarantee for data writing operations.

[0082] Meanwhile, the control unit 110 monitors the power supply status of the capacitor power supply unit 120 and the battery power supply unit 130, as well as the working status of the solid-state drive 200 in real time. After confirming that the capacitor power supply unit 120 and the battery power supply unit 130 can provide stable power, it sends a data write control signal to the solid-state drive 200.

[0083] After receiving the control signal, the solid-state drive 200 reads the target data originally stored in the volatile memory 210 and writes it into the non-volatile memory 220 step by step according to the preset transmission protocol and sequence.

[0084] In addition, during the entire data writing process, the control unit 110 can continuously monitor the data transmission progress and the remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 to ensure the integrity and stability of data transmission. In case of abnormal situations, it can take timely adjustment measures to ensure that the target data is written to the non-volatile memory 220 as completely as possible.

[0085] Understandably, the coordinated power supply of the capacitor power supply unit 120 and the battery power supply unit 130 effectively solves the power supply problem of the solid-state drive 200 when power is lost, ensuring the stability and durability of the power supply to a certain extent. At the same time, the precise control of the control unit 110 enables the target data to be safely transferred from the volatile memory 210 to the non-volatile memory 220, effectively ensuring the orderliness and integrity of data transmission, and to a certain extent avoiding the loss of data in the volatile memory 210 due to power loss, thereby improving the data storage security and reliability of the solid-state drive 200.

[0086] In addition, by clearly defining the capacity thresholds of the two power supply units 120 and 130, a miniaturized design of the device is achieved, which can be adapted to solid-state drives with different form factors, solving the problems of large space occupation and high cost of traditional large-capacity energy storage solutions.

[0087] Thus, through the coordinated operation of the control unit 110, the capacitor power supply unit 120, and the battery power supply unit 130, a rapid response to power failure events can be achieved, effectively reducing the risk of data loss and ensuring the integrity and security of data to a certain extent, thus providing strong protection for users' data security.

[0088] In some implementations, the maximum energy storage capacity of each capacitor in the capacitor power supply unit is less than or equal to 120uF, and the maximum energy storage capacity of each battery in the battery power supply unit is less than or equal to 120mAh.

[0089] Specifically, in the embodiments of this application, the maximum energy storage capacity of all capacitors participating in energy storage power supply in capacitor power supply unit 120 is less than or equal to 120uF, and the maximum energy storage capacity of each battery participating in energy storage power supply in battery power supply unit 130 is less than or equal to 120mAh, thereby realizing capacity control of all energy storage components in power supply unit 120 or 130.

[0090] Understandably, all capacitors and batteries adopt a uniform capacity standard to ensure that the charging and discharging characteristics of each energy storage component inside power supply units 120 and 130 are more balanced. This avoids, to some extent, the power supply fluctuation problem caused by excessive differences in the capacity of some components, improves the stability and continuity of emergency power supply, and provides a more reliable power guarantee for the data transfer process.

[0091] When the solid-state drive 200 is working normally, the external power supply will simultaneously charge all capacitors of the capacitor power supply unit 120 and all batteries of the battery power supply unit 130, and all energy storage components will remain fully charged and ready to go.

[0092] The control unit 110 monitors the power supply status of the solid-state drive 200 in real time. When it detects that the solid-state drive 200 has entered a power-off state, it sends a power supply command to the capacitor power supply unit 120 and the battery power supply unit 130.

[0093] At this time, all capacitors in the capacitor power supply unit 120 release instantaneous power synchronously, and all batteries in the battery power supply unit 130 provide continuous power synchronously. The two work together to output stable emergency power to the solid-state drive 200 to ensure the normal operation of the volatile memory 210 and non-volatile memory 220 of the solid-state drive 200.

[0094] At the same time, the control unit 110 drives the solid-state drive 200 to start the data transfer program, completely writing the data in the volatile memory 210 to the non-volatile memory 220 until the data transfer is completed. Then, the control unit 110 instructs the two power supply units 120 and 130 to stop supplying power, and the entire protection process ends in an orderly manner.

[0095] Understandably, the control unit 110 works in conjunction with the standardized capacity power supply units 120 and 130 to more accurately allocate energy, which reduces the risk of data loss to a certain extent. This makes the power failure protection device more applicable in various scenarios such as consumer electronics, enterprise servers, and network video recorders, and improves the reliability and stability of data protection.

[0096] In this way, limiting the upper limit of the capacity of all energy storage components in the capacitor power supply unit and the battery power supply unit solves the problem of excessive device size caused by the excessive capacity of some energy storage components to a certain extent. This makes the overall structure of the power failure protection device more compact, reduces the area occupied, and is more compatible with small form factor solid-state drives such as M.2 2230. At the same time, it reduces the overall material cost to a certain extent, which is in line with the development trend of equipment miniaturization.

[0097] In some embodiments, the control unit 110 is specifically configured as follows:

[0098] When the solid-state drive 200 is detected to be in a power-off state, the capacitor power supply unit 120 is controlled to supply power to the solid-state drive 200.

[0099] When the capacitor power supply unit 120 is detected to supply power to the solid-state drive 200, the battery power supply unit 130 is controlled to supply power to the solid-state drive 200.

[0100] Specifically, when the external power supply to the solid-state drive 200 is interrupted and it enters a power-down state, the control unit 110 controls the capacitor power supply unit 120 to supply power to the volatile memory 210 and non-volatile memory 220 of the solid-state drive 200. This provides time for the control unit 110 to detect the power-down state and start the subsequent data writing process, thereby reducing the risk of data loss during the power-down process to a certain extent.

[0101] Meanwhile, the control unit 110 monitors the power supply status of the solid-state drive 200 and the working status of the capacitor power supply unit 120 in real time, and accurately determines whether the solid-state drive 200 has entered a power-off state through voltage detection, current monitoring and other methods.

[0102] When the control unit 110 confirms that the solid-state drive 200 is in a power-off state and detects that the capacitor power supply unit 120 has started to supply power stably, it immediately generates a power supply control command and sends it to the battery power supply unit 130. The control unit 130 controls the battery power supply unit 130 and the capacitor power supply unit 120 to work together to supply power to the solid-state drive 200, or controls the battery power supply unit 130 to take over or supplement the power supply when the power of the capacitor power supply unit 120 is gradually consumed.

[0103] Understandably, the rapid discharge characteristic of the capacitor power supply unit 120 ensures immediate power supply during power failure, which to some extent avoids the problem of the data writing process failing to start due to power interruption. The continuous power supply capability of the battery power supply unit 130 meets the long-term power requirements of large amounts of data or complex operations, which to some extent ensures that the target data can be completely written to the non-volatile memory 220. The coordinated work of the two power supply units 120 and 130 achieves seamless power supply, effectively reducing the risk of power interruption, and providing continuous and stable power support for the solid-state drive 200 to completely write the target data in the volatile memory 210 to the non-volatile memory 220.

[0104] The precise control of the control unit 110 effectively ensures the timeliness and smoothness of power switching, and to a certain extent avoids the impact of power fluctuations on the operation of the solid-state drive 200, thus ensuring the integrity of data transmission.

[0105] In addition, during the entire power supply process, the control unit 110 continuously monitors the remaining power and real-time power supply status of the two power supply units 120 and 130. Combined with the dynamic power demand during the data writing process of the solid-state drive 200, the power supply allocation strategy is intelligently adjusted. In this way, by accurately matching the power output with the actual power consumption demand, the stability of the power output is ensured to a certain extent, providing a reliable guarantee for continuous data writing, while effectively avoiding the ineffective loss of power and improving the energy storage utilization efficiency of the capacitor power supply unit 120 and the battery power supply unit 130.

[0106] In this way, by dividing the power supply unit 120 and the battery power supply unit 130 and establishing a collaborative power supply control mechanism, the power supply is seamlessly connected, which improves the stability and reliability of the power supply to a certain extent. Compared with a single power supply unit solution, it can adapt to diverse power failure scenarios and data writing requirements, improve the power failure protection effect, and ensure the safe storage of data.

[0107] In some implementations, the first capacity threshold is less than or equal to 100uF.

[0108] Specifically, in the embodiments of this application, the first capacity threshold of the capacitor power supply unit 120 is further defined as less than or equal to 100uF.

[0109] For example, the capacitor power supply unit 120 can be limited to a small-capacity, high-power-density capacitor array with a total nominal capacitance of no more than 100uF and an overall equivalent series resistance of no more than 100mΩ. This allows for the provision of a large instantaneous current during power loss, ensuring the continuous operation of the SSD controller and DRAM, and enabling operations such as saving the mapping table in the DRAM. This capacitor combination can provide instantaneous power no less than the peak operating current required by the SSD controller and memory chip during power loss, and provide the system with an operating time of greater than or equal to 100us and less than or equal to 100ms.

[0110] A capacitor is an electronic component that stores electrical energy based on an electric field. It has the characteristics of fast charging and discharging response, compact structure, controllable cost, and high reliability. It can release a stable current in a short time and is suitable for the needs of instantaneous power supply scenarios.

[0111] When the external power supply to the solid-state drive 200 is interrupted and it enters a power-down state, the capacitor immediately outputs a stable instantaneous current to the volatile memory 210 and non-volatile memory 220 of the solid-state drive 200. This reduces the risk of loss of target data in the volatile memory 210 due to power interruption to a certain extent, and buys time for the control unit 110 to subsequently start the battery power supply unit 130 and coordinate the data writing process.

[0112] Furthermore, during normal operation of the SSD 200, the external power supply continuously charges the capacitors, keeping them fully charged and ready to respond instantly in the event of a power outage. Simultaneously, the control unit 110 periodically monitors parameters such as voltage and internal resistance across the capacitor array, assessing the capacitor's health in real time. If capacitor performance degrades to a preset threshold, an alarm signal is promptly issued, prompting the user to inspect or replace the capacitor, ensuring the long-term reliability of the power-loss protection function.

[0113] Understandably, further limiting the first capacity threshold of the capacitor power supply unit 120 to less than or equal to 100uF is beneficial to the miniaturization design of the power-down protection device 100, which is in line with the development trend of miniaturization and thinning of solid-state drives 200. It does not require occupying too much PCB board area, reduces the overall size and weight of the power-down protection device 100, and makes it easy to integrate into devices with small form factor such as M.22230.

[0114] Meanwhile, the instantaneous power supply capability of the capacitor can meet the immediate power supply needs of the solid-state drive 200 in the early stage of power failure, laying a stable foundation for the coordinated work of the control unit 110 and the battery power supply unit 130, ensuring the smooth start and continuous operation of the subsequent data writing process, reducing the risk of data loss due to power supply delay to a certain extent, and improving the timeliness and effectiveness of power failure protection. It is suitable for various devices that rely on solid-state drive 200 to store data, such as consumer electronics, enterprise-level servers, and NVR devices.

[0115] Furthermore, since capacitors are relatively controllable in cost, have mature technology, and strong resistance to harsh environments, they can still maintain stable performance in scenarios such as high temperature and long-term use. The embodiments of this application use small-capacity, high-power-density capacitors as capacitor power supply units 120, which effectively improves the environmental adaptability and service life of the power failure protection device 100.

[0116] By limiting the first capacity threshold to less than or equal to 100uF, a more efficient miniaturized design is achieved. The size and space occupied by the capacitor power supply unit are further reduced, making it more compatible with solid-state drives with small form factor such as M.2 2230. This reduces material costs and the overall design difficulty of the device to a certain extent.

[0117] In some implementations, the second capacity threshold is less than or equal to 100 mAh.

[0118] Specifically, in the design of the power failure protection device 100, the type and specifications of the capacitor power supply unit 120 and the battery power supply unit 130 can be reasonably selected according to the power requirements for data writing, so that the maximum energy storage of the battery power supply unit 130 is higher than that of the capacitor power supply unit 120, forming a two-level power supply architecture with complementary functions.

[0119] The capacitor power supply unit 120 focuses on instantaneous power supply capability, selecting components with fast discharge characteristics. Its maximum energy storage is only required to meet the needs of starting the data writing process and maintaining the short-term operation of critical components during a power failure, ensuring an immediate response in the event of a power failure to avoid interruption of the data writing process. For example, a combination of small-capacity, high-power-density capacitor arrays.

[0120] The battery power supply unit 130 is designed for continuous power supply, and uses components with higher energy density and larger energy storage capacity. Its maximum energy storage capacity is precisely calculated to cover the power consumption required to write all target data in the volatile memory 210 to the non-volatile memory 220 after the capacitor power supply unit 120 is depleted.

[0121] In this embodiment of the application, the second capacity threshold of the battery power supply unit 130 is further limited to an energy storage capacity of less than or equal to 100mAh.

[0122] For example, the battery power supply unit 130 is defined as a small, rechargeable solid-state battery with a nominal capacity of less than or equal to 100mAh, a package volume accounting for less than or equal to 10% of the SSD motherboard area, and a volumetric energy density greater than or equal to 50Wh / L.

[0123] In addition, the energy density of the battery power supply unit 130 can usually be configured to be greater than that of the capacitor power supply unit 120, so that after the first stage of energy is exhausted, the battery power supply unit 130 can provide a relatively long battery life to complete the flushing of user data and more complex FTL operations.

[0124] When the solid-state drive 200 is working normally, the external power supply will charge the capacitor power supply unit 120 and the battery power supply unit 130 at the same time to ensure that both are in a fully charged standby state.

[0125] When a power failure occurs, the capacitor power supply unit 120 is activated first, using its rapid discharge characteristics to provide immediate power to the solid-state drive 200, so as to ensure the continuity of data writing operations.

[0126] After detecting a power failure, the control unit 110 quickly controls the battery power supply unit 130 to start power supply, so as to continuously provide stable power to the solid-state drive 200 while the power of the capacitor power supply unit 120 is gradually consumed, ensuring the continuous data writing operation until all target data in the volatile memory 210 is completely written to the non-volatile memory 220, thus ensuring uninterrupted power supply and sufficient power supply to a certain extent.

[0127] Thus, by limiting the second capacity threshold to less than or equal to 100mAh, more precise capacity optimization is achieved, further reducing the size and space occupied by the battery power supply unit. The power-loss protection device is more compatible with small form factor solid-state drives such as M.2 2230, reducing material costs and the overall design difficulty of the device. This aligns with the development trend of device miniaturization and low cost. At the same time, the precise capacity limitation avoids energy waste caused by excessive capacity of the battery power supply unit to a certain extent. This allows the battery power supply unit to meet the continuous power supply requirements after a power outage while forming an efficient synergy with the capacitor power supply unit, ensuring the stability and sufficiency of emergency power supply. This, to a certain extent, ensures the power supply time required for data transfer without increasing the burden on the device due to capacity redundancy.

[0128] Please see Figure 2 In some embodiments, the power-down protection device 100 is installed on the computer device 300, and the solid-state drive 200 enters a power-down state when the computer device 300 stops supplying power to the solid-state drive 200.

[0129] Specifically, computer equipment 300 refers to various electronic devices that integrate solid-state drives 200 as storage components, such as personal computers, enterprise servers, network video recorders, and routers.

[0130] Stopping power supply to the solid-state drive 200 means that the power supply system of the computer device 300 no longer outputs stable power to the solid-state drive 200 due to external power interruption, failure, or other reasons.

[0131] The power failure protection device 100 adopts an integrated design concept and is directly installed inside the computer device 300, becoming a built-in functional module of the computer device 300.

[0132] Under normal operating conditions, the main power supply system of the computer device 300 simultaneously supplies power to its own components, the solid-state drive 200, and the capacitor power supply unit 120 and battery power supply unit 130 of the power failure protection device 100. The power supply units 120 and 130 are continuously charged and kept in a fully charged standby state.

[0133] The control unit 110 of the power failure protection device 100 monitors the power supply voltage and current output by the computer device 300 to the solid-state drive 200 in real time to determine whether the power supply is normal.

[0134] When the computer device 300 stops supplying power to the solid-state drive 200 due to external power interruption, power supply failure, or other reasons, the control unit 110 detects this change, determines that the solid-state drive 200 has entered a power-off state, and immediately starts the internal capacitor power supply unit 120 and battery power supply unit 130 to supply power to the volatile memory 210 and non-volatile memory 220 of the solid-state drive 200 according to the preset power supply logic. At the same time, the control unit 110 starts the data writing control process to ensure data security.

[0135] Thus, the integrated design of the power failure protection device 100 and the computer equipment 300 enables rapid detection and response to power failure events, which to some extent shortens the time from the occurrence of a power failure to the activation of the power failure protection, ensures the timely initiation of data writing operations, reduces the risk of data loss, and improves the timeliness and reliability of power failure protection.

[0136] Please refer to it again. Figure 2 In some embodiments, the control unit 110 is further configured to:

[0137] When the computer device 300 supplies power to the solid-state drive 200, the power status of the computer device 300 is obtained;

[0138] When the computer device 300 is determined to be in a preset power state, the solid-state drive 200 is controlled to write the target data in the volatile memory 210 to the non-volatile memory 220.

[0139] Specifically, the power status refers to the power supply status of the computer device 300, including information such as the external power supply connection status, the remaining power of the built-in battery, and the stability of the power supply.

[0140] The preset power state is a pre-defined critical state that requires the activation of predictive data protection, such as when the remaining battery power is below a threshold or when the external power supply is disconnected. For example, predictive data protection needs to be activated when the remaining battery power is below 30%.

[0141] The power-loss protection device 100 is integrated inside the computer device 300. Its control unit 110 establishes real-time communication with the power management system of the computer device 300. During the normal power supply period from the computer device 300 to the solid-state drive 200, it continuously acquires the power status information of the computer device 300 through the host interface. The acquired power status information typically includes parameters such as whether the external power supply is connected, the remaining percentage of the built-in battery, the battery health status, and the stability of the power supply voltage. For example, the power status of the host system is acquired through the Predictable Latency Mode (PLM) of the Non-Volatile Memory Express (NVMe) host controller interface 220.

[0142] The control unit 110 has a preset power state threshold, which can be flexibly configured according to the type of computer device 300 and the application scenario requirements. For example, the preset power state can be set to the state where the external power is disconnected and the remaining battery power is less than 30% or less than 20%.

[0143] The control unit 110 continuously compares the real-time power status information with preset thresholds to determine whether the computer device 300 is at risk of power failure.

[0144] When it is determined that the computer device 300 is in a preset power state, it indicates that its power supply can no longer be maintained stably, and the risk of power failure is high. At this time, the control unit 110 does not need to wait for the computer device 300 to stop supplying power to the solid-state drive 200, but immediately starts the predictive protection process and sends a data write command to the solid-state drive 200.

[0145] After receiving the instruction, the solid-state drive 200 reads the target data from the volatile memory 210 and writes it to the non-volatile memory 220 step by step according to the preset transmission protocol and sequence, thereby reducing the energy demand in emergency situations to a certain extent.

[0146] In addition, during the data writing process, the control unit 110 continuously monitors the power status and data writing progress of the computer device 300 to ensure that the data transmission is completed before the computer device 300 is powered off, or at least the writing of high-priority data is completed.

[0147] Thus, through predictive protection mechanisms, compared to the traditional passive power failure protection mode, proactive protection is achieved. By monitoring the power status of computer equipment 300 in real time, the risk of power failure can be predicted in advance, and data writing operations can be initiated. To a certain extent, the risk of data loss due to sudden power failure is reduced, and the security and timeliness of data protection are improved.

[0148] In some implementations, the data includes multiple types of sub-data, each type of sub-data corresponding to a priority level, and the control unit 110 is further configured to:

[0149] The various types of sub-data in the volatile memory 210 of the solid-state drive 200 are sequentially written to the non-volatile memory 220 in descending order of priority.

[0150] Specifically, sub-data refers to the subcategories of data after it has been divided according to criteria such as importance and purpose. Each type of sub-data has independent storage attributes and protection priorities.

[0151] Priority refers to the level of importance assigned to various types of sub-data, used to clarify the order in which data is written, so as to ensure that critical data is protected first.

[0152] When the solid-state drive 200 is working normally, the control unit 110 of the power failure protection device 100 can divide the target data into multiple sub-data categories during the data caching stage, based on factors such as the importance of the data, its impact on system operation, and user needs. These sub-data categories include system metadata, user synchronous write data, user write-delayed data, and data generated during internal maintenance.

[0153] Each type of sub-data is assigned a unique priority identifier. The priority level can be preset according to the actual application scenario to ensure that the more critical the sub-data, the higher the priority. These priority identifiers are stored together with the sub-data in volatile memory to form a structured data storage system. For example, FTL metadata and mapping tables are classified as the highest priority sub-data, user-submitted synchronous write data is classified as high priority sub-data, user-cached write data is classified as medium priority sub-data, and internal write data generated by GC or wear leveling is classified as low priority sub-data.

[0154] When the external power supply is interrupted, after the power supply units 120 and 130 provide stable power to the solid-state drive 200, the control unit 110 sends a data write command to the solid-state drive 200, which includes the priority sorting rules for the sub-data.

[0155] After receiving the instruction, the solid-state drive 200 first parses the priority sorting information, then reads the highest priority sub-data from the volatile memory 210, and writes it accurately into the non-volatile memory 220 according to the preset transmission protocol and verification method.

[0156] After the highest priority sub-data is written, the next highest priority, medium priority, and low priority sub-data are read and written in sequence. This writing order from high to low priority optimizes the logical order of data transmission, reduces redundant operations in the data writing process, improves data transmission efficiency, saves power consumption to a certain extent, and extends the effective power supply time of the capacitor power supply unit 120 and the battery power supply unit 130.

[0157] During the data writing process, the control unit 110 monitors the remaining power and data writing progress of the capacitor power supply unit 120 and the battery power supply unit 130 in real time. If the remaining power is sufficient, the refresh operation is performed sequentially according to the data priority from high to low to ensure that all sub-data is written completely. If the remaining power gradually decreases to below 30%, the writing of high-priority sub-data is prioritized, and the writing of low-priority sub-data is paused or abandoned. This reduces the loss caused by the loss of critical data to a certain extent and ensures the consistency of the file system.

[0158] In this way, by prioritizing and writing the sub-data of the data in sequence, differentiated and targeted data protection is achieved. This ensures the safe storage of the most important data even when the power supply units 120 and 130 are limited, thereby reducing the loss caused by data loss to a certain extent, improving the effectiveness and practicality of data protection, and meeting the user's storage needs for data of different importance.

[0159] In some embodiments, the control unit 110 is further configured to:

[0160] Based on the operating status data of the solid-state drive 200, the current remaining power of the capacitor power supply unit 120 and the current remaining power of the battery power supply unit 130, it is determined whether the capacitor power supply unit 120 and the battery power supply unit 130 can support writing the target data in the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220.

[0161] When the capacitor power supply unit 120 and the battery power supply unit 130 cannot support writing multiple types of sub-data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 in sequence, the solid-state drive 200 is controlled to perform a preset operation to reduce operating power consumption.

[0162] Specifically, the operating status data includes various parameters that reflect the real-time working status of the solid-state drive 200, such as read / write speed, number of active channels, controller load, and total target data volume, which serve as the basis for judging the energy consumption requirements for data writing.

[0163] The current remaining power is the total amount of electrical energy currently stored in the capacitor power supply unit 120 and the battery power supply unit 130, which determines the duration for which the capacitor power supply unit 120 and the battery power supply unit 130 can support data writing in the power-off state.

[0164] The preset operation is a pre-set operation to reduce the power consumption of the solid-state drive 200. The purpose is to extend the power supply time of the capacitor power supply unit 120 and the battery power supply unit 130 to ensure the writing of critical data.

[0165] When the solid-state drive 200 is working normally, the control unit 110 of the power-loss protection device 100 collects the operating status data of the solid-state drive 200 and the current remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 in real time. That is, it obtains parameters such as the current read / write speed, the number of active NAND channels, the load of the main control chip, and the total capacity of the target data in the volatile memory 210 through the communication interface with the solid-state drive 200, and monitors the voltage, current and other parameters of each capacitor power supply unit 120 and battery power supply unit 130 through the power detection circuit, and dynamically calculates the current remaining power of the capacitor power supply unit 120 and the current remaining power of the battery power supply unit 130.

[0166] For example, the control unit 110 has a preset energy consumption calculation model. The collected operating status data is input into the model, and combined with the unit energy consumption standard for data writing, the total energy consumption required to write all the target data in the volatile memory 210 to the non-volatile memory 220 is calculated. Then, the total energy consumption is compared with the current remaining power of the capacitor power supply unit 120 and the current remaining power of the battery power supply unit 130 to determine whether the capacitor power supply unit 120 and the battery power supply unit 130 can support the complete data writing process.

[0167] If the comparison results show that the current remaining power can meet the total energy consumption requirements, the control unit 110 controls the data writing according to the normal process. If it is determined that the current remaining power cannot support the complete writing of the target data, it indicates that there is a power shortage. The control unit 110 immediately generates a power consumption control command and sends it to the solid-state drive 200.

[0168] After receiving the instruction, the solid-state drive 200 starts a preset low-power operation mode, performing operations to reduce operating power consumption. By reducing unnecessary energy consumption, it extends the effective power supply time of the capacitor power supply unit 120 and the battery power supply unit 130, thus gaining more time for writing critical data. For example, it reduces the operating frequency of the main controller chip, closes some idle NAND channels, and suspends unnecessary background operations.

[0169] In this way, by predicting the power support capacity of the capacitor power supply unit 120 and the battery power supply unit 130 and controlling the system power consumption, dynamic management of the power supply situation after power failure is realized. Power shortages are identified in advance and operating power consumption is reduced, thereby reducing the power consumption of the solid-state drive 200 and effectively extending the power supply time of the capacitor power supply unit 120 and the battery power supply unit 130. This, to a certain extent, increases the probability of complete writing of target data and improves the effectiveness and flexibility of power failure protection.

[0170] In some implementations, the preset operations include shutting down some data write channels of the non-volatile memory 220 and / or reducing the controller frequency of the solid-state drive 200.

[0171] Specifically, the data write channel is an independent path in the non-volatile memory 220 used for parallel transmission and writing of data. Multiple channels can work simultaneously to improve write efficiency, while some channels are idle when under low load.

[0172] The controller frequency is the operating frequency of the SSD's 200MHz controller chip, which determines the controller's processing speed and data processing efficiency. Its dynamic power consumption is positively correlated with the operating frequency (P = CV). 2 f).

[0173] When the control unit 110 determines that the current remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 is insufficient to support the writing of all target data, it will select and execute a suitable preset operation based on the real-time operating status of the solid-state drive 200.

[0174] If the operation of closing some data write channels is to be performed, the control unit 110 will first identify the write channels that are currently idle in the non-volatile memory 220 through the communication interface with the solid-state drive 200, that is, channels that are not involved in data transmission and have no load. Then, it will send a channel closing command to the solid-state drive 200 to close only these idle channels, while keeping the channels that are transmitting data or are about to participate in core data transmission open, so as to ensure that data writing efficiency is not affected.

[0175] If the controller frequency is reduced, the control unit 110 calculates an appropriate low-power frequency value based on the current supply voltage, remaining battery power, and data write requirements, and sends a frequency adjustment command to the SSD controller chip. The dynamic power consumption of the controller chip is proportional to its operating frequency. When powered by a capacitor or battery with limited energy, a sudden surge in current demand can cause a sharp drop in supply voltage, potentially causing the SSD controller to reset or crash due to undervoltage, interrupting the data saving process. Reducing the frequency can directly reduce peak current and average power consumption, stabilize the supply voltage, and provide a stable operating environment for data refresh.

[0176] In practical applications, the control unit 110 can flexibly combine the two operations according to specific scenarios. For example, when the data writing pressure is low, simply closing the idle channel can meet the power consumption control requirements. When the power shortage is large or the main control load is high, both operations are executed simultaneously to achieve the best power reduction effect, which to a certain extent ensures that the power supply duration is sufficient to support the writing of critical data.

[0177] In this way, the two operations of shutting down some data writing channels and reducing the main control frequency can, to some extent, resolve the contradiction between power consumption and data writing stability when the power is insufficient. According to actual needs, the power consumption is reduced in a step-by-step manner, maximizing the power supply time under limited power, improving the success rate and integrity of data writing. Compared with the traditional indiscriminate power reduction scheme, it can not only avoid the sharp drop in writing efficiency caused by excessive power reduction to a certain extent, but also effectively control power consumption and improve the reliability and flexibility of power failure protection.

[0178] In some embodiments, the control unit 110 is further configured to:

[0179] Determine the first current aging level of the capacitor power supply unit 120 and the second current aging level of the battery power supply unit 120;

[0180] If the first current aging level is greater than or equal to the first aging level threshold, and / or the second current aging level is greater than or equal to the second aging level threshold, a preset prompt message will be displayed.

[0181] When the first current aging level is greater than or equal to the third aging level threshold, and / or the second current aging level is greater than or equal to the fourth aging level threshold, the data in the volatile memory 210 of the solid-state drive 200 is written to the non-volatile memory 220 in a preset manner, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

[0182] Specifically, the first current aging degree and the second current aging degree refer to the degree of performance degradation of the capacitor power supply unit 120 and the battery power supply unit 130 after long-term use, such as their energy storage capacity, charge and discharge efficiency, and internal resistance. They are usually evaluated by detecting parameters such as the capacity, charge and discharge efficiency, and internal resistance of the capacitor power supply unit 120 and the battery power supply unit 130, and are indicators for measuring the health status of the capacitor power supply unit 120 and the battery power supply unit 130.

[0183] The first aging threshold is a pre-set performance degradation warning threshold for the capacitor power supply unit 120. When the actual aging degree of the capacitor power supply unit 120 reaches this threshold, it indicates that the performance of the capacitor power supply unit 120 has begun to decline, and the user needs to be promptly alerted. For example, if the performance degradation warning threshold of the capacitor power supply unit 120 is pre-set to 50%, and the state of health (SoH) detection result of the capacitor is 40% and the aging degree is 60%, it indicates that the aging degree of the capacitor has reached the preset first aging threshold, and the corresponding warning prompt needs to be triggered.

[0184] The second aging threshold is a pre-set performance degradation warning threshold for the battery power supply unit 130. When the actual aging degree of the battery power supply unit 130 reaches this threshold, it indicates that the performance of the battery power supply unit 130 has begun to decline, and the user needs to be promptly alerted. For example, if the performance degradation warning threshold for the battery power supply unit 130 is pre-set to 40%, and the battery's State of Health (SoH) test result is 55% and the aging degree is 45%, it indicates that the aging degree of the battery has exceeded the pre-set first aging threshold, and a corresponding warning prompt needs to be triggered.

[0185] The preset prompt message is a warning message used to inform the user of the aging status of the capacitor power supply unit 120 and the battery power supply unit 130. The feedback can be provided through the device display interface, indicator lights or sound.

[0186] The third aging threshold is a decay threshold greater than the first aging threshold. When the aging level reaches this value, the power failure protection capability of the capacitor power supply unit 120 decreases, requiring the activation of enhanced data protection measures. For example, the first aging threshold is 50%, and the third aging threshold is 80%.

[0187] The fourth aging threshold is a degradation threshold greater than the second aging threshold. When the aging level reaches this value, the power failure protection capability of the battery power supply unit 130 decreases, and enhanced data protection measures need to be activated. For example, the second aging threshold is 40%, and the fourth aging threshold is 75%.

[0188] The synchronous write method is a transmission method in which data is written directly to the non-volatile memory 220 without passing through the volatile memory 210 cache, so as to ensure the timely and reliable storage of data.

[0189] During normal operation of the solid-state drive 200, the control unit 110 of the power-loss protection device 100 periodically detects and evaluates the current aging level of the capacitor power supply unit 120 and the battery power supply unit 130. The control unit 110 can collect performance parameters of the capacitor power supply unit 120 and the battery power supply unit 130 through a dedicated detection circuit, including actual energy storage capacity, charge-discharge cycle count, internal resistance change, discharge efficiency, etc., and compare these performance parameters with the initial factory parameters of the capacitor power supply unit 120 and the battery power supply unit 130 to calculate the quantitative value of the current aging level.

[0190] The control unit 110 has a first aging threshold, a second aging threshold, a third aging threshold and a fourth aging threshold preset inside, and the third aging threshold is greater than the first aging threshold and the fourth aging threshold is greater than the second aging threshold.

[0191] The control unit 110 continuously compares the calculated first current aging level with the first aging level threshold and the third aging level threshold, and simultaneously continuously compares the calculated second current aging level with the second aging level threshold and the fourth aging level threshold. Based on the comparison results, the corresponding response strategy is executed:

[0192] If the current aging level is greater than or equal to a first aging level threshold and / or a second aging level is greater than or equal to a second aging level threshold, it indicates that the performance of the capacitor power supply unit 120 and / or the battery power supply unit 130 has degraded to a certain extent, which may affect the effectiveness of the power-off protection. In this case, the control unit 110 will generate a preset prompt message and provide feedback to the user through the human-machine interface of the computer device 300, prompting the user to promptly inspect or replace the capacitor power supply unit 120 and / or the battery power supply unit 130 to avoid the power supply performance degradation affecting the power-off protection effect.

[0193] When the first current aging level is greater than or equal to the third aging level threshold and / or the second current aging level is greater than or equal to the fourth aging level threshold, it indicates that the performance of the capacitor power supply unit 120 and / or the battery power supply unit 130 has been severely degraded, and their power supply stability and duration during power loss cannot guarantee the normal data writing process. At this time, the control unit 110 adopts stricter data protection measures, controlling the solid-state drive 200 to write the target data to the non-volatile memory 220 in a synchronous writing mode. That is, the single-level cell (SLC) caching mode used to improve performance is temporarily disabled, and the data is written directly to the non-volatile memory 220 without going through the volatile memory 210 cache, or the target data in the volatile memory 210 is directly forced to be written to the non-volatile memory 220. This reduces the risk of data loss due to insufficient performance of the capacitor power supply unit 120 and the battery power supply unit 130 to a certain extent, and ensures the safety of core data.

[0194] Thus, by real-time monitoring and graded response to the aging status of the capacitor power supply unit 120 and the battery power supply unit 130, the system can promptly and accurately detect their performance degradation. When the aging degree of the capacitor power supply unit 120 and the battery power supply unit 130 reaches the preset warning threshold, the system will proactively remind the user to perform maintenance or replacement through preset prompts. This effectively avoids the power-off protection failure caused by the continuous performance degradation of the capacitor power supply unit 120 and the battery power supply unit 130, thereby improving the maintainability and operational reliability of the system to a certain extent. At the same time, the system dynamically adjusts the data writing method according to the different aging degrees of the capacitor power supply unit 120 and the battery power supply unit 130, effectively extending the effective service life of the power-off protection system and ensuring that the capacitor power supply unit 120 and the battery power supply unit 130 can provide stable power-off protection capabilities under different health conditions.

[0195] Please see Figure 3 This application also provides a data processing method applied to the power failure protection device 100 of some of the above embodiments, the method comprising:

[0196] 01: When the solid-state drive 200 is detected to be in a power-off state, the capacitor power supply unit 120 and the battery power supply unit 130 are controlled to supply power to the solid-state drive 200.

[0197] 02: When the capacitor power supply unit 120 and the battery power supply unit 130 supply power to the solid-state drive 200, the data in the volatile memory 210 of the solid-state drive 200 is written to the non-volatile memory 220.

[0198] This application provides a data processing apparatus. The data processing method of this application can be implemented by the data processing apparatus of this application. Specifically, the data processing apparatus includes a hardware control module and a data writing module. The hardware control module is used to control the capacitor power supply unit 120 and the battery power supply unit 130 to supply power to the solid-state drive 200 when the solid-state drive 200 is detected to be in a power-off state. The data writing module is used to write data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 when the capacitor power supply unit 120 and the battery power supply unit 130 are supplying power to the solid-state drive 200.

[0199] This application also provides a server, which includes a memory and a processor. The data processing method of this application can be implemented by the server of this application. Specifically, the memory stores a computer program, and the processor is used to control the capacitor power supply unit 120 and the battery power supply unit 130 to supply power to the solid-state drive 200 when the solid-state drive 200 is detected to be in a power-off state. The processor is also used to write data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 when the capacitor power supply unit 120 and the battery power supply unit 130 are supplying power to the solid-state drive 200.

[0200] Specifically, when the solid-state drive 200 is working normally, the capacitor power supply unit 120 and the battery power supply unit 130 of the power failure protection device 100 are in a fully charged standby state, and the control unit 110 monitors the power supply status of the solid-state drive 200 in real time.

[0201] When an external power supply interruption is detected in the solid-state drive 200 and it enters a power-down state, the capacitor power supply unit 120 and the battery power supply unit 130 of the power-down protection device 100 immediately provide stable power to the solid-state drive 200 to ensure that the solid-state drive 200 will not stop working due to power failure during data transmission.

[0202] Meanwhile, after confirming that the capacitor power supply unit 120 and the battery power supply unit 130 have provided stable power and can meet the power requirements of the solid-state drive 200 for data writing operations, the control unit 110 of the power failure protection device 100 will send a data writing control signal to the solid-state drive 200.

[0203] After receiving the control signal, the solid-state drive 200 reads and writes the target data stored in the volatile memory 210 into the non-volatile memory 220 step by step according to the preset transmission protocol and order.

[0204] In addition, during data reading and writing, the control unit 110 monitors the data transmission status and the power supply status of the capacitor power supply unit 120 and the battery power supply unit 130 in real time to ensure the integrity and stability of data transmission.

[0205] If an abnormality occurs during data transmission, the control unit 110 will promptly issue adjustment commands, such as pausing transmission, rereading data, or adjusting the transmission rate, to ensure data integrity.

[0206] Once all target data has been successfully written to the non-volatile memory 220, the control unit 110 will issue a command to terminate the data writing process, and the capacitor power supply unit 120 and the battery power supply unit 130 will stop supplying power.

[0207] Thus, with power supplied by the capacitor power supply unit 120 and the battery power supply unit 130, the active control of the data writing operation achieves, to a certain extent, the complete and accurate transmission of the target data from the volatile memory 210 to the non-volatile memory 220, ensuring the timeliness of data transmission, reducing the risk of data loss due to control delay, and improving the security and reliability of data storage.

[0208] Please see Figure 4 In some embodiments, the capacitor power supply unit 120 supplies power to the solid-state drive 200 when the solid-state drive 200 enters a power-off state, and the data processing method further includes:

[0209] 03: When the capacitor power supply unit 120 is detected to supply power to the solid-state drive 200, the battery power supply unit 130 is controlled to supply power to the solid-state drive 200.

[0210] In some implementations, the hardware control module is also used to control the battery power supply unit 130 to supply power to the solid-state drive 200 when it is detected that the capacitor power supply unit 120 is supplying power to the solid-state drive 200.

[0211] In some implementations, the processor is also configured to control the battery power supply unit 130 to supply power to the solid-state drive 200 when it detects that the capacitor power supply unit 120 is supplying power to the solid-state drive 200.

[0212] Specifically, when the external power supply to the solid-state drive 200 is interrupted and it enters a power-down state, the capacitor power supply unit 120 will immediately supply power to the solid-state drive 200, giving the control unit 110 time to detect the power-down state and start the subsequent data writing process, thereby reducing the risk of data loss during the power-down moment to a certain extent.

[0213] Meanwhile, the control unit 110 monitors the power supply status of the solid-state drive 200 and the working status of the capacitor power supply unit 120 in real time, and accurately determines whether the solid-state drive 200 has entered a power-off state through voltage detection, current monitoring and other methods.

[0214] When the control unit 110 confirms that the solid-state drive 200 is in a power-off state and detects that the capacitor power supply unit 120 has started to supply power stably, it immediately generates a power supply control command and sends it to the battery power supply unit 130. The control unit 130 controls the battery power supply unit 130 and the capacitor power supply unit 120 to work together to supply power to the solid-state drive 200, or controls the battery power supply unit 130 to take over or supplement the power supply when the power of the capacitor power supply unit 120 is gradually consumed.

[0215] In addition, throughout the power supply process, the control unit 110 continuously monitors the remaining power and real-time power supply status of the two power supply units 120 and 130, and intelligently adjusts the power distribution strategy in conjunction with the dynamic power demand of the solid-state drive 200 during data writing.

[0216] In this way, by constructing a collaborative power supply mechanism of two-level power supply units 120 and 130, the problem that a single power supply unit cannot simultaneously ensure rapid response and continuous power supply is effectively solved. To a certain extent, seamless power supply is achieved, improving the stability and reliability of power supply. Compared with a single power supply unit solution, it can adapt to diverse power outage scenarios and data writing requirements, thereby improving the effectiveness of power outage protection and ensuring the safe storage of data.

[0217] Please see Figure 5 In some implementations, step 02 includes:

[0218] 021: Send a data write command to the solid-state drive 200, wherein the solid-state drive 200 writes the target data to the non-volatile memory 220 upon receiving the data write command.

[0219] In some implementations, the data writing module is also used to send a data writing command to the solid-state drive 200, wherein the solid-state drive 200 writes the target data to the non-volatile memory 220 upon receiving the data writing command.

[0220] In some implementations, the processor is also used to send a data write instruction to the solid-state drive 200, wherein the solid-state drive 200, upon receiving the data write instruction, writes the target data to the non-volatile memory 220.

[0221] Specifically, the data write command is a signal sent by the control unit 110 to the solid-state drive 200 to instruct it to perform a data write operation, including parameters such as the data transmission address, rate, and verification method.

[0222] When the solid-state drive 200 is working normally, the control unit 110 of the power failure protection device 100 monitors the power supply status in real time, and the capacitor power supply unit 120 and the battery power supply unit 130 are in a fully charged standby state.

[0223] When the external power supply is interrupted and the solid-state drive 200 enters a power-down state, the capacitor power supply unit 120 and the battery power supply unit 130 immediately supply power to the volatile memory 210 and non-volatile memory 220 of the solid-state drive 200 to provide power for data writing.

[0224] After confirming that the power supply from the capacitor power supply unit 120 and the battery power supply unit 130 is stable, the control unit 110 generates a standardized data write instruction based on the hardware specifications of the solid-state drive 200, the data transmission protocol, and the storage status of the target data. This instruction typically includes parameters such as the storage address range of the target data in the volatile memory 210, the target address to be written to the non-volatile memory 220, the data transmission rate, and the verification method, to ensure that the solid-state drive 200 can accurately identify and execute the instruction.

[0225] The control unit 110 sends a data write command to the control chip of the solid-state drive 200 through a preset communication interface. The control chip of the solid-state drive 200 reads the target data segment by segment from the volatile memory 210 according to the parameters specified in the command, and after verification processing, writes the data to the corresponding address in the non-volatile memory 220.

[0226] During the data writing process, the solid-state drive 200 will provide real-time feedback on data transmission progress, transmission status and other information to the control unit 110 through the communication interface. The control unit 110 will dynamically adjust the instruction execution strategy according to the feedback information. If a transmission error is found, it will send an error correction instruction or a retransmission instruction in a timely manner, which to a certain extent ensures the complete transmission of the target data from the volatile memory 210 to the non-volatile memory 220 and avoids data loss in the event of a power failure.

[0227] After all target data has been successfully written to the non-volatile memory 220, the solid-state drive 200 sends a write completion signal to the control unit 110. After confirmation, the control unit 110 instructs the capacitor power supply unit 120 and the battery power supply unit 130 to stop supplying power.

[0228] In this way, by controlling the data writing operation of the solid-state drive 200 through data writing commands, the problem of data transmission errors or low efficiency caused by unclear parameters of the solid-state drive 200 is avoided to a certain extent. This improves the accuracy and reliability of data writing, simplifies the logical complexity of the data writing process, reduces the operating burden of the solid-state drive 200, and enables data transmission to be completed with higher efficiency when the power supply of the capacitor power supply unit 120 and the battery power supply unit 130 is limited. This extends the utilization rate of the effective power supply time and improves the overall effect of power failure protection.

[0229] In some implementations, the data includes multiple types of sub-data, each type of sub-data corresponding to a priority. When the solid-state drive 200 receives a data write instruction, it writes the multiple types of sub-data sequentially to the non-volatile memory 220 in order of priority from high to low.

[0230] Specifically, when the solid-state drive 200 is working normally, the control unit 110 of the power failure protection device 100 can divide the target data into multiple sub-data categories during the data caching stage, based on factors such as the importance of the data, its impact on system operation, and user needs. These sub-data categories include system metadata, user synchronous write data, user cached write data, and data generated during internal maintenance.

[0231] Each type of sub-data is assigned a unique priority identifier. The priority level can be preset according to the actual application scenario to ensure that the more critical the sub-data, the higher the priority. These priority identifiers are stored together with the sub-data in volatile memory to form a structured data storage system. For example, FTL metadata and mapping tables are classified as the highest priority sub-data, user-submitted synchronous write data is classified as high priority sub-data, user-cached write data is classified as medium priority sub-data, and internal write data generated by GC or wear leveling is classified as low priority sub-data.

[0232] When the external power supply is interrupted, after the power supply units 120 and 130 provide stable power to the solid-state drive 200, the control unit 110 sends a data write command to the solid-state drive 200, which includes the priority sorting rules for the sub-data.

[0233] After receiving the instruction, the solid-state drive 200 first parses the priority sorting information, then reads the highest priority sub-data from the volatile memory 210, and writes it accurately into the non-volatile memory 220 according to the preset transmission protocol and verification method.

[0234] After the highest priority sub-data is written, the next highest priority, medium priority, and low priority sub-data are read and written in sequence. This writing order from high to low priority optimizes the logical order of data transmission, reduces redundant operations in the data writing process, improves data transmission efficiency, saves power consumption to a certain extent, and extends the effective power supply time of the capacitor power supply unit 120 and the battery power supply unit 130.

[0235] During the data writing process, the control unit 110 monitors the remaining power and data writing progress of the capacitor power supply unit 120 and the battery power supply unit 130 in real time. If the remaining power is sufficient, the refresh operation is performed sequentially according to the data priority from high to low to ensure that all sub-data is written completely. If the remaining power gradually decreases to below 30%, the writing of high-priority sub-data is prioritized, and the writing of low-priority sub-data is paused or abandoned. This reduces the loss caused by the loss of critical data to a certain extent and ensures the consistency of the file system.

[0236] In this way, by prioritizing and writing the sub-data of the data in sequence, differentiated and targeted data protection is achieved. This ensures the safe storage of the most important data even when the power supply units 120 and 130 are limited, thereby reducing the loss caused by data loss to a certain extent, improving the effectiveness and practicality of data protection, and meeting the user's storage needs for data of different importance.

[0237] Please see Figure 6 In some implementations, the data processing method further includes:

[0238] 04: Based on the operating status data of the solid-state drive 200, the current remaining power of the capacitor power supply unit 120 and the current remaining power of the battery power supply unit 130, determine whether the capacitor power supply unit 120 and the battery power supply unit 130 can support writing the target data in the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220.

[0239] 05: When the capacitor power supply unit 120 and the battery power supply unit 130 cannot support writing multiple types of sub-data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 in sequence, the solid-state drive 200 is controlled to perform a preset operation to reduce operating power consumption.

[0240] In some embodiments, the hardware control module is further configured to determine, based on the operating status data of the solid-state drive 200, the current remaining power of the capacitor power supply unit 120, and the current remaining power of the battery power supply unit 130, whether the capacitor power supply unit 120 and the battery power supply unit 130 can support writing target data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220. The hardware control module is also configured to control the solid-state drive 200 to perform preset operations to reduce operating power consumption when the capacitor power supply unit 120 and the battery power supply unit 130 cannot support sequentially writing multiple types of sub-data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220.

[0241] In some embodiments, the processor is further configured to determine, based on the operating status data of the solid-state drive 200, the current remaining power of the capacitor power supply unit 120, and the current remaining power of the battery power supply unit 130, whether the capacitor power supply unit 120 and the battery power supply unit 130 can support writing target data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220. The processor is also configured to control the solid-state drive 200 to perform a preset operation to reduce operating power consumption if the capacitor power supply unit 120 and the battery power supply unit 130 cannot support sequentially writing multiple types of sub-data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220.

[0242] Specifically, the operating status data includes various parameters that reflect the real-time working status of the solid-state drive 200, such as read / write speed, number of active channels, controller load, and total target data volume, which serve as the basis for judging the energy consumption requirements for data writing.

[0243] The current remaining power is the total amount of electrical energy currently stored in the capacitor power supply unit 120 and the battery power supply unit 130, which determines the duration for which the capacitor power supply unit 120 and the battery power supply unit 130 can support data writing in the power-off state.

[0244] The preset operation is a pre-set operation to reduce the power consumption of the solid-state drive 200. The purpose is to extend the power supply time of the capacitor power supply unit 120 and the battery power supply unit 130 to ensure the writing of critical data.

[0245] When the solid-state drive 200 is working normally, the control unit 110 of the power-loss protection device 100 collects the operating status data of the solid-state drive 200 and the current remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 in real time. That is, it obtains parameters such as the current read / write speed, the number of active NAND channels, the load of the main control chip, and the total capacity of the target data in the volatile memory 210 through the communication interface with the solid-state drive 200, and monitors the voltage, current and other parameters of each capacitor power supply unit 120 and battery power supply unit 130 through the power detection circuit, and dynamically calculates the current remaining power of the capacitor power supply unit 120 and the current remaining power of the battery power supply unit 130.

[0246] For example, the control unit 110 has a preset energy consumption calculation model. The collected operating status data is input into the model, and combined with the unit energy consumption standard for data writing, the total energy consumption required to write all target data from the volatile memory 210 to the non-volatile memory 220 is calculated. Subsequently, the total energy consumption is compared with the current remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 to determine whether they can support the complete data writing process.

[0247] If the comparison results show that the current remaining power can meet the total energy consumption requirements, the control unit 110 controls the data writing according to the normal process. If it is determined that the current remaining power cannot support the complete writing of the target data, it indicates that there is a power shortage. The control unit 110 immediately generates a power consumption control command and sends it to the solid-state drive 200.

[0248] After receiving the instruction, the solid-state drive 200 starts a preset low-power operation mode, performing operations to reduce operating power consumption. By reducing unnecessary energy consumption, it extends the effective power supply time of the capacitor power supply unit 120 and the battery power supply unit 130, thus gaining more time for writing critical data. For example, it reduces the operating frequency of the main controller chip, closes some idle NAND channels, and suspends unnecessary background operations.

[0249] In this way, by predicting the power support capacity of the capacitor power supply unit 120 and the battery power supply unit 130 and controlling the system power consumption, dynamic management of the power supply situation after power failure is realized. Power shortages are identified in advance and operating power consumption is reduced, thereby reducing the power consumption of the solid-state drive 200 and effectively extending the power supply time of the capacitor power supply unit 120 and the battery power supply unit 130. This, to a certain extent, increases the probability of complete writing of target data and improves the effectiveness and flexibility of power failure protection.

[0250] In some implementations, the preset operations include shutting down some data write channels of the non-volatile memory 220 and / or reducing the controller frequency of the solid-state drive 200.

[0251] Specifically, when the control unit 110 determines that the remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 is insufficient to support the writing of all target data, it will select and execute a suitable preset operation based on the real-time operating status of the solid-state drive 200.

[0252] If the operation of closing some data write channels is to be performed, the control unit 110 will first identify the write channels that are currently idle in the non-volatile memory 220 through the communication interface with the solid-state drive 200, that is, channels that are not involved in data transmission and have no load. Then, it will send a channel closing command to the solid-state drive 200 to close only these idle channels, while keeping the channels that are transmitting data or are about to participate in core data transmission open, so as to ensure that data writing efficiency is not affected.

[0253] If the controller frequency is reduced, the control unit 110 calculates an appropriate low-power frequency value based on the current supply voltage, remaining battery power, and data write requirements, and sends a frequency adjustment command to the SSD controller chip. The dynamic power consumption of the controller chip is proportional to its operating frequency. When powered by a capacitor or battery with limited energy, a sudden surge in current demand can cause a sharp drop in supply voltage, potentially causing the SSD controller to reset or crash due to undervoltage, interrupting the data saving process. Reducing the frequency can directly reduce peak current and average power consumption, stabilize the supply voltage, and provide a stable operating environment for data refresh.

[0254] In practical applications, the control unit 110 can flexibly combine the two operations according to specific scenarios. For example, when the data writing pressure is low, simply closing the idle channel can meet the power consumption control requirements. When the power shortage is large or the main control load is high, both operations are executed simultaneously to achieve the best power reduction effect, which to a certain extent ensures that the power supply duration is sufficient to support the writing of critical data.

[0255] In this way, the two operations of shutting down some data writing channels and reducing the main control frequency can, to some extent, resolve the contradiction between power consumption and data writing stability when the power is insufficient. According to actual needs, the power consumption is reduced in a step-by-step manner, maximizing the power supply time under limited power, improving the success rate and integrity of data writing. Compared with the traditional indiscriminate power reduction scheme, it can not only avoid the sharp drop in writing efficiency caused by excessive power reduction to a certain extent, but also effectively control power consumption and improve the reliability and flexibility of power failure protection.

[0256] Please see Figure 7 In some embodiments, the power-down protection device 100 is installed on the computer device 300. When the computer device 300 stops supplying power to the solid-state drive 200, the solid-state drive 200 enters a power-down state. The data processing method further includes:

[0257] 06: When the computer device 300 is supplying power to the solid-state drive 200, obtain the power status of the computer device 300;

[0258] 07: When it is determined that the computer device 300 is in a preset power state, control the solid-state drive 200 to write the target data in the volatile memory 210 to the non-volatile memory 220.

[0259] In some implementations, the hardware control module is also used to acquire the power status of the computer device 300 when the computer device 300 supplies power to the solid-state drive 200. The data writing module is also used to control the solid-state drive 200 to write target data from the volatile memory 210 to the non-volatile memory 220 when it is determined that the computer device 300 is in a preset power status.

[0260] In some embodiments, the processor is also configured to acquire the power state of the computer device 300 when the computer device 300 supplies power to the solid-state drive 200. The processor is also configured to, when it is determined that the computer device 300 is in a preset power state, control the solid-state drive 200 to write target data from the volatile memory 210 to the non-volatile memory 220.

[0261] Specifically, the power-loss protection device 100 is integrated inside the computer device 300. Its control unit 110 establishes real-time communication with the power management system of the computer device 300. During the normal power supply period from the computer device 300 to the solid-state drive 200, it continuously acquires the power status information of the computer device 300 through the host interface. This acquired power status information typically includes parameters such as whether an external power supply is connected, the remaining percentage of the built-in battery, battery health status, and power supply voltage stability. For example, the power status of the host system is acquired through the Predictable Latency Mode (PLM) of the Non-Volatile Memory Express (NVMe) host controller interface 220.

[0262] The control unit 110 has a preset power state threshold, which can be flexibly configured according to the type of computer device 300 and the application scenario requirements. For example, the preset power state can be set to the state where the external power is disconnected and the remaining battery power is less than 30% or less than 20%.

[0263] The control unit 110 continuously compares the real-time power status information with preset thresholds to determine whether the computer device 300 is at risk of power failure.

[0264] When it is determined that the computer device 300 is in a preset power state, it indicates that its power supply can no longer be maintained stably, and the risk of power failure is high. At this time, the control unit 110 does not need to wait for the computer device 300 to stop supplying power to the solid-state drive 200, but immediately starts the predictive protection process and sends a data write command to the solid-state drive 200.

[0265] After receiving the instruction, the solid-state drive 200 reads the target data from the volatile memory 210 and writes it to the non-volatile memory 220 step by step according to the preset transmission protocol and sequence, thereby reducing the energy demand in emergency situations to a certain extent.

[0266] In addition, during the data writing process, the control unit 110 continuously monitors the power status and data writing progress of the computer device 300 to ensure that the data transmission is completed before the computer device 300 is powered off, or at least the writing of high-priority data is completed.

[0267] Thus, through predictive protection mechanisms, compared to the traditional passive power failure protection mode, proactive protection is achieved. By monitoring the power status of computer equipment 300 in real time, the risk of power failure can be predicted in advance, and data writing operations can be initiated. To a certain extent, the risk of data loss due to sudden power failure is reduced, and the security and timeliness of data protection are improved.

[0268] Please see Figure 8 In some implementations, the data processing method further includes:

[0269] 08: Determine the first current aging level of the capacitor power supply unit 120 and the second current aging level of the battery power supply unit 130;

[0270] 09: If the first current aging level is greater than or equal to the first aging level threshold, and / or the second current aging level is greater than or equal to the second aging level threshold, a preset prompt message will be provided;

[0271] 010: When the first current aging level is greater than or equal to the third aging level threshold, and / or the second current aging level is greater than or equal to the fourth aging level threshold, the data in the volatile memory 210 of the solid-state drive 200 is written to the non-volatile memory 220 in a preset manner, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

[0272] In some embodiments, the hardware control module is further configured to determine a first current aging level of the capacitor power supply unit 120 and a second current aging level of the battery power supply unit 130. The hardware control module is also configured to provide preset prompt information when the first current aging level is greater than or equal to a first aging level threshold, and / or the second current aging level is greater than or equal to a second aging level threshold. The data writing module is further configured to write data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 in a preset manner when the first current aging level is greater than or equal to a third aging level threshold, and / or the second current aging level is greater than or equal to a fourth aging level threshold, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

[0273] In some embodiments, the processor is further configured to determine a first current aging level of the capacitor power supply unit 120 and a second current aging level of the battery power supply unit 130. The processor is also configured to provide a preset prompt message if the first current aging level is greater than or equal to a first aging level threshold, and / or the second current aging level is greater than or equal to a second aging level threshold. The processor is also configured to write data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 in a preset manner if the first current aging level is greater than or equal to a third aging level threshold, and / or the second current aging level is greater than or equal to a fourth aging level threshold, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

[0274] Specifically, during normal operation of the solid-state drive 200, the control unit 110 of the power-loss protection device 100 periodically detects and evaluates the current aging level of the capacitor power supply unit 120 and the battery power supply unit 130. The control unit 110 can collect performance parameters of the capacitor power supply unit 120 and the battery power supply unit 130 through a dedicated detection circuit, including actual energy storage capacity, charge-discharge cycle count, internal resistance change, discharge efficiency, etc., and compare and analyze these performance parameters with the initial factory parameters of the capacitor power supply unit 120 and the battery power supply unit 130 to calculate the quantitative value of the current aging level.

[0275] The control unit 110 has a first aging threshold, a second aging threshold, a third aging threshold and a fourth aging threshold preset inside, and the third aging threshold is greater than the first aging threshold and the fourth aging threshold is greater than the second aging threshold.

[0276] The control unit 110 continuously compares the calculated first current aging level with the first aging level threshold and the third aging level threshold, and simultaneously continuously compares the calculated second current aging level with the second aging level threshold and the fourth aging level threshold. Based on the comparison results, the corresponding response strategy is executed:

[0277] If the current aging level is greater than or equal to a first aging level threshold and / or a second aging level is greater than or equal to a second aging level threshold, it indicates that the performance of the capacitor power supply unit 120 and / or the battery power supply unit 130 has degraded to a certain extent, which may affect the effectiveness of the power-off protection. In this case, the control unit 110 will generate a preset prompt message and provide feedback to the user through the human-machine interface of the computer device 300, prompting the user to promptly inspect or replace the capacitor power supply unit 120 and / or the battery power supply unit 130 to avoid the power supply performance degradation affecting the power-off protection effect.

[0278] When the first current aging level is greater than or equal to the third aging level threshold and / or the second current aging level is greater than or equal to the fourth aging level threshold, it indicates that the performance of the capacitor power supply unit 120 and / or the battery power supply unit 130 has been severely degraded, and their power supply stability and duration during power loss cannot guarantee the normal data writing process. At this time, the control unit 110 adopts stricter data protection measures, controlling the solid-state drive 200 to write the target data to the non-volatile memory 220 in a synchronous writing mode. That is, the single-level cell (SLC) caching mode used to improve performance is temporarily disabled, and the data is written directly to the non-volatile memory 220 without going through the volatile memory 210 cache, or the target data in the volatile memory 210 is directly forced to be written to the non-volatile memory 220. This reduces the risk of data loss due to insufficient performance of the capacitor power supply unit 120 and the battery power supply unit 130 to a certain extent, and ensures the safety of core data.

[0279] Thus, by real-time monitoring and graded response to the aging status of the capacitor power supply unit 120 and the battery power supply unit 130, the system can promptly and accurately detect their performance degradation. When the aging degree of the capacitor power supply unit 120 and the battery power supply unit 130 reaches the preset warning threshold, the system will proactively remind the user to perform maintenance or replacement through preset prompts. This effectively avoids the power-off protection failure caused by the continuous performance degradation of the capacitor power supply unit 120 and the battery power supply unit 130, thereby improving the maintainability and operational reliability of the system to a certain extent. At the same time, the system dynamically adjusts the data writing method according to the different aging degrees of the capacitor power supply unit 120 and the battery power supply unit 130, effectively extending the effective service life of the power-off protection system and ensuring that the capacitor power supply unit 120 and the battery power supply unit 130 can provide stable power-off protection capabilities under different health conditions.

[0280] Please see Figure 9 The following example uses an enterprise-grade server equipped with an M.2 form factor enterprise-grade SSD, which needs to process a large amount of business data and metadata and has extremely high requirements for power loss protection reliability, to explain the data processing methods of some of the above implementation methods:

[0281] The main power supply of the enterprise-level server supplies power to the SSD module and the Equipment Under Test Mainboard (EUT motherboard) through the power supply module. At the same time, it charges the capacitor power supply unit 120 (MLCC), which is a small capacitor array with a total nominal capacity of 80uF and an equivalent series resistance of 50mΩ, and the battery power supply unit 130, which is a thin-film lithium battery with a nominal capacity of 80mAh and a volumetric energy density of 60Wh / L. The two power supply units 120 and 130 are kept fully charged and ready for operation.

[0282] The CPU / NPU main controller on the EUT motherboard periodically sends a Power Good signal to the power failure protection device 100 through the General Purpose Input / Output (GPIO) interface to monitor the module status in real time. When the total module power is detected to be below 20%, an alarm prompt is immediately issued through the server management interface.

[0283] Meanwhile, the CPU / NPU main controller polls the PLM status through the high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) interface to obtain the host power status. The control unit 110 of the power-down protection device 100 detects the voltage across the MLCC to assess the health status of the capacitor array by reading the status, and monitors the remaining charge (State of Charge, SoC) and health status SoH of the module in real time through power detection.

[0284] The SSD module contains target data such as DRAM temporary business data and FTL metadata. Its controller feeds back the current workload to the EUT motherboard through power detection / load reporting, such as IOPS of 5000 and 8 active NAND channels.

[0285] When the mains power of the server fluctuates, and the mains voltage drops to 200V, and the power supply module's power is lower than the normal operating threshold of 220V±10%, the system detects the abnormal power status of the host through PLM status polling and immediately starts the pre-protection mode.

[0286] The SSD module controller prioritizes data in DRAM according to a data criticality classification mechanism. The first priority is FTL metadata and mapping tables, the second priority is synchronous write data such as user-submitted financial report upload data, the third priority is user-deferred write data such as unsubmitted document editing data, and the fourth priority is internal write data generated by GC / wear leveling.

[0287] Subsequently, data in the DRAM is actively written to the NAND flash memory in order of priority from high to low, in order to reduce energy demand in subsequent emergency scenarios.

[0288] If the mains power is completely interrupted, the power supply module stops supplying power, and the SSD enters a power-down state. At this time, the power-down protection device 100 immediately activates the MLCC to achieve instantaneous discharge, providing a large instantaneous current to ensure the continuous operation of the SSD controller and DRAM, and gaining about 50ms for critical operations.

[0289] Meanwhile, after the control unit 110 detects a power outage and the MLCC starts working, it immediately issues a command to put the thin-film lithium battery into a pre-on state and quickly connects to the power supply, which to a certain extent avoids the loss of protection function due to the failure of a single power supply unit.

[0290] Understandably, the hybrid architecture of small capacitors and small batteries provides longer protection time while reducing the PCB area occupied by the solution by 30% compared to the related large capacitor solution, and the modular design adapts to the M.2 form factor requirements of server SSDs.

[0291] In addition, during the period when the MLCC and thin-film lithium battery are powered together, the control unit 110 dynamically allocates energy according to the real-time SoC and SSD current workload.

[0292] If the SSD needs to write a large amount of data at this time, the controller will report the high load status through power detection / load feedback. The control unit 110 will not activate the power saving mode, maintaining all active NAND channels and normal controller frequency to ensure data writing efficiency. The SSD module controller sorts according to preset priorities, first writing the first priority FTL metadata and mapping table to the NAND, and then writing the second and third priority data in sequence.

[0293] If the remaining power of the capacitor power supply unit 120 and the battery power supply unit 130 is detected to be less than 30% during the writing process, the fourth priority data writing will be suspended to ensure the integrity of core business data.

[0294] Meanwhile, throughout the process, the CPU / NPU controller of the EUT motherboard continuously polls the PLM status through the PCIe interface to ensure that the SSD module and the energy buffer module are synchronized until all high-priority data is written to the NAND.

[0295] After the server has been running for a long time, the control unit 110 periodically checks the health status of the MLCC by reading the status, and determines the current aging level of the capacitor power supply unit 120 and the battery power supply unit 130 by combining parameters such as the number of charge and discharge cycles and changes in internal resistance of the thin-film lithium battery.

[0296] If the SoH of the capacitor power supply unit 120 drops to 40%, which means the first current aging level reaches 60%, and / or the SoH of the battery power supply unit 130 drops to 55%, which means the second current aging level reaches 45%, the system will send a preset prompt message through the server management platform to remind maintenance personnel to perform maintenance. If the SoH of the capacitor power supply unit 120 further drops to 20%, which means the first current aging level reaches 80%, and / or the SoH of the battery power supply unit 130 drops to 25%, which means the second current aging level reaches 75%, the controller will control the SSD to write the target data directly to the NAND in a synchronous write mode, disable the SLC caching mode, ensure reliable data storage, and extend the effective service life of the power failure protection system.

[0297] This application also provides a data processing apparatus applied to the power failure protection device 100 of some of the above embodiments, the apparatus comprising:

[0298] The hard disk control unit is used to control the capacitor power supply unit 120 and the battery power supply unit 130 to supply power to the solid-state drive 200 when the solid-state drive 200 is detected to be in a power-off state.

[0299] The data writing unit is used to write data from the volatile memory 210 of the solid-state drive 200 to the non-volatile memory 220 when the capacitor power supply unit 120 and the battery power supply unit 130 are supplying power to the solid-state drive 200.

[0300] Specifically, when the solid-state drive 200 is working normally, the capacitor power supply unit 120 and the battery power supply unit 130 of the power failure protection device 100 are in a fully charged standby state, and the control unit 110 monitors the power supply status of the solid-state drive 200 in real time.

[0301] When an external power supply interruption is detected in the solid-state drive 200 and it enters a power-down state, the capacitor power supply unit 120 and the battery power supply unit 130 of the power-down protection device 100 immediately provide stable power to the solid-state drive 200 to ensure that the solid-state drive 200 will not stop working due to power failure during data transmission.

[0302] Meanwhile, after confirming that the capacitor power supply unit 120 and the battery power supply unit 130 have provided stable power and can meet the power requirements of the solid-state drive 200 for data writing operations, the control unit 110 of the power failure protection device 100 will send a data writing control signal to the solid-state drive 200.

[0303] After receiving the control signal, the solid-state drive 200 reads and writes the target data stored in the volatile memory 210 into the non-volatile memory 220 step by step according to the preset transmission protocol and order.

[0304] In addition, during data reading and writing, the control unit 110 monitors the data transmission status and the power supply status of the capacitor power supply unit 120 and the battery power supply unit 130 in real time to ensure the integrity and stability of data transmission.

[0305] If an abnormality occurs during data transmission, the control unit 110 will promptly issue adjustment commands, such as pausing transmission, rereading data, or adjusting the transmission rate, to ensure data integrity.

[0306] Once all target data has been successfully written to the non-volatile memory 220, the control unit 110 will issue a command to terminate the data writing process, and the capacitor power supply unit 120 and the battery power supply unit 130 will stop supplying power.

[0307] Thus, with power supplied by the capacitor power supply unit 120 and the battery power supply unit 130, the active control of the data writing operation achieves, to a certain extent, the complete and accurate transmission of the target data from the volatile memory 210 to the non-volatile memory 220, ensuring the timeliness of data transmission, reducing the risk of data loss due to control delay, and improving the security and reliability of data storage.

[0308] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the methods of some of the above-described embodiments.

[0309] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the methods of some of the above-described embodiments.

[0310] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods of some of the above-described embodiments.

[0311] It is understood that a computer program includes computer program code. Computer program code can be in the form of source code, object code, executable files, or some intermediate form. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.

[0312] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0313] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of executable request code comprising one or more steps for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0314] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A power failure protection device, characterized in that, The power-loss protection device is connected to the solid-state drive. The power-loss protection device includes a control unit, a capacitor power supply unit, and a battery power supply unit. The maximum energy storage capacity of the first capacitor in the capacitor power supply unit is less than or equal to 120uF, and the maximum energy storage capacity of the first battery in the battery power supply unit is less than or equal to 120mAh. The control unit is configured to: When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit and the battery power supply unit are controlled to supply power to the solid-state drive. When the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive, the data in the volatile memory of the solid-state drive is written to the non-volatile memory.

2. The power failure protection device according to claim 1, characterized in that, The maximum energy storage capacity of each capacitor in the capacitor power supply unit is less than or equal to 120uF, and the maximum energy storage capacity of each battery in the battery power supply unit is less than or equal to 120mAh.

3. The power failure protection device according to claim 1 or 2, characterized in that, The control unit is specifically configured as follows: When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit is controlled to supply power to the solid-state drive; When the capacitor power supply unit is detected supplying power to the solid-state drive, the battery power supply unit is controlled to supply power to the solid-state drive.

4. The power failure protection device according to claim 1 or 2, characterized in that, The power-off protection device is installed on the computer equipment, and the solid-state drive enters a power-off state when the computer equipment stops supplying power to the solid-state drive.

5. The power failure protection device according to claim 4, characterized in that, The control unit is also configured to: When the computer device supplies power to the solid-state drive, the power status of the computer device is obtained; When the computer device is determined to be in a preset power state, the solid-state drive is controlled to write the target data in the volatile memory to the non-volatile memory.

6. The power failure protection device according to claim 1 or 2, characterized in that, The data includes multiple types of sub-data, each type of sub-data corresponding to a priority level, and the control unit is further configured to: The various types of sub-data in the volatile memory of the solid-state drive are sequentially written to the non-volatile memory in descending order of priority.

7. The power failure protection device according to claim 6, characterized in that, The control unit is also configured to: Based on the operating status data of the solid-state drive, the current remaining power of the capacitor power supply unit, and the current remaining power of the battery power supply unit, determine whether the capacitor power supply unit and the battery power supply unit can support writing the target data in the volatile memory of the solid-state drive to the non-volatile memory. When the capacitor power supply unit and the battery power supply unit cannot support the sequential writing of the multiple types of sub-data in the volatile memory of the solid-state drive to the non-volatile memory, the solid-state drive is controlled to perform a preset operation to reduce operating power consumption.

8. The power failure protection device according to claim 7, characterized in that, The preset operations include shutting down some data write channels of the non-volatile memory and / or reducing the master control frequency of the solid-state drive.

9. The power failure protection device according to claim 7, characterized in that, The control unit is also configured to: Determine the first current aging level of the capacitor power supply unit and the second current aging level of the battery power supply unit; If the first current aging degree is greater than or equal to the first aging degree threshold, and / or the second current aging degree is greater than or equal to the second aging degree threshold, a preset prompt message will be provided. When the first current aging level is greater than or equal to the third aging level threshold, and / or the second current aging level is greater than or equal to the fourth aging level threshold, the data in the volatile memory of the solid-state drive is written to the non-volatile memory in a preset manner, wherein the third aging level threshold is greater than the first aging level threshold, the fourth aging level threshold is greater than the second aging level threshold, and the preset manner includes synchronous writing and / or direct writing.

10. A data processing method, characterized in that, The method, applied to the power failure protection device according to any one of claims 1-5, comprises: When the solid-state drive is detected to be in a power-off state, the capacitor power supply unit and the battery power supply unit are controlled to supply power to the solid-state drive. When the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive, the data in the volatile memory of the solid-state drive is written to the non-volatile memory.

11. The data processing method according to claim 10, characterized in that, The capacitor power supply unit supplies power to the solid-state drive when the solid-state drive enters a power-off state, and the method further includes: When the capacitor power supply unit is detected supplying power to the solid-state drive, the battery power supply unit is controlled to supply power to the solid-state drive.

12. A data processing apparatus, characterized in that, The power failure protection device according to any one of claims 1-10, the device comprising: The hard disk control unit is used to control the capacitor power supply unit and the battery power supply unit to supply power to the solid-state drive when the solid-state drive is detected to be in a power-off state. The data writing unit is used to write data from the volatile memory of the solid-state drive to the non-volatile memory when the capacitor power supply unit and the battery power supply unit supply power to the solid-state drive.

13. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, which, when executed by the processor, implements the method of claim 10 or 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by one or more processors, implements the method of claim 10 or 11.

15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of claim 10 or 11.