Power-off protection method of SSD and related device
By acquiring the energy storage characteristics and volatile cache data volume of the SSD segmented energy storage modules, and selecting the target energy storage segment combination for power loss protection, the adaptability problem of fixed energy storage configuration in existing SSD power loss protection is solved, thereby improving energy storage efficiency and data write reliability.
Patent Information
- Application Number
- CN202611654293.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-24
AI Technical Summary
In existing SSD power loss protection, the fixed backup energy storage configuration strategy is difficult to adapt to actual power loss protection needs, resulting in low energy storage utilization efficiency and adaptability.
By acquiring the measured values of the energy storage characteristics of each energy storage segment in the segmented energy storage module, the equivalent series resistance and available energy storage capacity are determined. Combined with the amount of data to be written back in the volatile buffer and the peak power consumption, the target combination of energy storage segments is selected to meet the upper limit of the energy storage capacity and voltage drop. The control switch matrix is then connected to the backup power bus to provide the energy storage capacity.
It improves the energy storage utilization efficiency and power failure protection adaptability of the segmented energy storage module, and enhances the reliability of writing volatile cache data to the NAND flash array under abnormal power failure conditions.
Smart Images

Figure CN123161606A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of solid-state drives (SSDs), and more particularly to a power-loss protection method and related equipment for SSDs. Background Technology
[0002] Solid-state drives (SSDs) are widely used in personal computers, servers, data centers, and embedded storage devices. SSDs typically use NAND flash memory as the non-volatile storage medium and utilize a volatile cache to temporarily store data to be written, improving data read and write performance. During normal SSD operation, some user data and control metadata generated by the SSD controller may be temporarily stored in the volatile cache. When an SSD experiences an abnormal power outage, backup power provided by energy storage devices such as capacitors is needed to keep the SSD running for a certain period of time. This allows the data to be written back from the volatile cache and related control metadata to be written to the NAND flash array, thereby reducing the impact of abnormal power outages on data integrity and the internal state of the SSD. Existing SSD power-loss protection typically involves setting up backup energy storage devices and connecting backup power when the input voltage drops to a preset threshold, providing sustaining power during the power-loss protection process. Related technologies also include schemes that use capacitor energy storage to provide short-term power to the SSD after a power outage to complete the write-back of cached data to the NAND flash memory.
[0003] However, existing SSD power loss protection typically employs fixed backup energy storage configurations and relatively fixed power loss protection strategies. The actual energy storage capacity of the energy storage devices, the differences in characteristics such as equivalent series resistance, and the actual amount of data write-back required during power loss are not fully considered. Therefore, it is difficult to adapt the available backup energy storage to the actual power loss protection requirements, resulting in low utilization efficiency of backup energy storage and low adaptability of power loss protection. Summary of the Invention
[0004] This invention provides a power-loss protection method and related equipment for SSDs, which solves the problem that existing SSD power-loss protection typically adopts a fixed backup energy storage configuration and a relatively fixed power-loss protection strategy, making it difficult to adapt the available backup energy storage to actual power-loss protection needs, resulting in low utilization efficiency of backup energy storage and low adaptability of power-loss protection.
[0005] In a first aspect, embodiments of this application provide a power-loss protection method for an SSD. The SSD includes a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array. The power-loss protection method includes: acquiring energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determining the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values; determining the holding energy required for power-loss protection based on the amount of data to be written back in the volatile cache of the SSD, the pre-determined write-back bandwidth of the SSD during the power-loss protection phase, and the peak power consumption; and determining the corresponding holding energy based on the minimum allowable operating voltage of the backup power bus. The upper limit of voltage drop is determined by the holding energy, the available energy of each energy storage segment, and the voltage drop generated by the equivalent series resistance of each energy storage segment to determine the target energy storage segment combination that meets the upper limit of voltage drop. The input voltage of the SSD is detected, and when it is determined that the SSD is in a power failure confirmation state based on the input voltage, the switch corresponding to the target energy storage segment combination in the preset switch matrix is turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding energy to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array.
[0006] Secondly, embodiments of this application provide a power-loss protection system for an SSD. The SSD includes a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array. The power-loss protection system includes: a data acquisition module, used to acquire energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determine the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values; an energy demand module, used to determine the holding energy required for power-loss protection based on the amount of data to be written back in the volatile cache of the SSD, the pre-determined write-back bandwidth of the SSD during the power-loss protection phase, and the peak power consumption; and an energy storage segment determination module, used to determine the minimum allowable energy storage of the backup power bus based on the energy storage segment. The operating voltage determines the corresponding upper limit of voltage drop. Based on the holding energy, the available energy of each energy storage segment, and the voltage drop generated by the equivalent series resistance of each energy storage segment, a target energy storage segment combination that satisfies the holding energy and the upper limit of voltage drop is determined. The power-down protection module is used to detect the input voltage of the SSD, and when it is determined that the SSD is in a power-down confirmation state based on the input voltage, it controls the switch corresponding to the target energy storage segment combination in the preset switch matrix to be turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding energy to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array.
[0007] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the aforementioned SSD power-loss protection method.
[0008] Fourthly, embodiments of this application provide a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned SSD power-loss protection method.
[0009] Fifthly, embodiments of this application provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the above-described SSD power-loss protection method.
[0010] In one solution provided by the aforementioned methods, systems, devices, media, and program products, the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module are obtained. Based on these measurement values, the equivalent series resistance and available energy storage capacity of each energy storage segment are determined, enabling the SSD to perform power-down protection based on the actual energy storage capacity and electrical characteristics of each segment. Simultaneously, the required holding energy for power-down protection is determined based on the amount of data to be written back in the volatile cache, the write-back bandwidth, and peak power consumption, ensuring that the selection of the target energy storage segment combination matches the actual power-down protection requirements. Furthermore, the upper limit of voltage drop is determined by combining the minimum allowable operating voltage of the backup power bus, and the target energy storage segment combination is determined by comprehensively considering the holding energy, available energy storage capacity, and voltage drop generated by the equivalent series resistance. This ensures that the determined target energy storage segment combination not only meets the holding energy requirements for power-down protection but also... It can limit the voltage drop generated after the target energy storage section combination is connected to the backup power bus; after confirming that the SSD is in a power failure confirmation state, the target energy storage section combination is connected to the backup power bus and provided with holding power through the switch matrix. This can reduce the participation of energy storage sections that do not meet the actual power failure protection requirements or voltage constraints in power failure protection, improve the energy storage utilization efficiency of the segmented energy storage module and the adaptability between the power failure protection process and the actual energy storage capacity and actual protection requirements, and improve the reliability of writing the data to be written back in the volatile cache and the SSD control metadata to the NAND flash array under abnormal power failure. It overcomes the problem that the existing SSD power failure protection usually adopts a fixed backup energy storage configuration and a relatively fixed power failure protection strategy, which makes it difficult to adapt the available backup energy storage according to the actual power failure protection requirements, resulting in low utilization efficiency of backup energy storage and low adaptability of power failure protection. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of the operating environment in one embodiment of the present invention; Figure 2 This is a schematic diagram of the structural unit of an SSD according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a power-loss protection method for an SSD according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a sub-process of step S10 in one embodiment of the present invention; Figure 5 This is a schematic diagram of the sub-process of S30 in one embodiment of the present invention; Figure 6 This is a schematic diagram of the sub-process of S40 in one embodiment of the present invention; Figure 7 This is a flowchart illustrating a power-loss protection method system for an SSD according to an embodiment of the present invention. Figure 8 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0016] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0017] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0018] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0019] In practical applications, when an SSD receives host write commands, updates the Flash Translation Layer (FTL) mapping, maintains logs, and performs data management operations, its volatile cache temporarily stores data that has not yet been written to the NAND flash array, as well as SSD control metadata. When the SSD's input voltage drops abnormally, a backup power supply is needed to maintain the SSD's operation, allowing the data to be written back and the SSD control metadata in the volatile cache to be written to the NAND flash array within a limited retention time. Existing power-down protection methods using fixed backup energy storage configurations suffer from differences in the actual energy storage capacity and equivalent series resistance of different energy storage segments within segmented energy storage modules. Furthermore, the amount of data to be written back in the volatile cache and the power consumption during the power-down protection phase vary with the SSD's operating state. If a fixed energy storage configuration is used for power-down protection, it is difficult to determine which energy storage segments participate in the protection based on their actual available energy storage capacity and the required retention energy. Additionally, the voltage drop caused by the equivalent series resistance of each energy storage segment affects the supply voltage of the backup power bus, resulting in a low degree of compatibility between the backup energy storage configuration and the actual power-down protection requirements. To address the aforementioned issues, this application proposes a power-down protection method for SSDs. By acquiring and processing the energy storage characteristics measurements of each energy storage segment in a segmented energy storage module, the equivalent series resistance and available energy storage of each segment are determined. The required holding energy for power-down protection is determined based on the amount of data to be written back in the volatile cache, the write-back bandwidth, and the peak power consumption. The upper limit of voltage drop is then determined in conjunction with the minimum allowable operating voltage of the backup power bus. A target energy storage segment combination is determined based on the available energy storage and the voltage drop generated by the equivalent series resistance of each energy storage segment. When the SSD is confirmed to be in a power-down state, the target energy storage segment combination is connected to the backup power bus. This ensures that the energy storage segments actually participating in power-down protection match the required holding energy for power-down protection and the voltage constraints of the backup power bus, thereby improving the energy storage utilization efficiency of the segmented energy storage module and the adaptability of power-down protection.
[0020] The power-loss protection method for SSDs provided in this embodiment of the invention can be applied to applications such as... Figure 1 The operating environment shown includes a server and terminal devices. The terminal devices communicate with the server via a network or bus. The SSD can be installed in the terminal device or connected to the server as a data storage device. The power-loss protection method in the SSD is executed by the SSD master controller or by a processor connected to the SSD master controller.
[0021] In practical applications, the SSD receives write requests from the host side and temporarily stores the data to be written in the volatile cache, while maintaining SSD control metadata corresponding to the data storage location. When the SSD is powered normally, each energy storage segment in the segmented energy storage module is in a preset energy storage state and establishes a controllable power supply connection with the backup power bus through its corresponding controlled switch. The SSD obtains the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module, and determines the equivalent series resistance and available energy storage capacity of each energy storage segment based on the energy storage characteristic measurement values; it determines the holding energy required for power-down protection based on the amount of data to be written back in the volatile cache, the write-back bandwidth corresponding to the SSD during the power-down protection phase, and the peak power consumption; it determines the upper limit of voltage drop based on the minimum allowable operating voltage of the backup power bus, and selects the target energy storage segment combination based on the available energy storage capacity of each energy storage segment and the voltage drop generated by the equivalent series resistance of each energy storage segment. During SSD operation, the input voltage of the SSD is detected. When it is determined that the SSD is in a power failure confirmation state based on the input voltage of the SSD, the switch corresponding to the target energy storage section combination in the control switch matrix is turned on, so that the target energy storage section combination is connected to the backup power bus and provides holding power to the backup power bus. At the same time, the holding power is used to maintain the SSD to perform the power failure protection process, and write the data to be written back in the volatile cache and the SSD control metadata into the NAND flash array.
[0022] In this context, "terminal device" refers to a device that corresponds to the server and provides local services to the user. Terminal devices include, but are not limited to, personal computers, laptops, smartphones, tablets, and portable wearable devices. In this embodiment, the SSD can connect to the terminal device or server via a PCIe interface, SATA interface, or other data interfaces suitable for SSDs. The SSD receives read / write requests from the terminal device or server and performs data storage operations based on these requests.
[0023] The server in the operating environment can be implemented as a standalone server or as a server cluster consisting of multiple servers. The server can establish a data communication connection with the SSD via a network or bus and send data write requests to the SSD. The SSD master controller in the SSD manages the data to be written back in the volatile cache according to the received data write requests, and controls the data to be written back in the volatile cache and the SSD control metadata to write to the NAND flash array in the event of a power failure.
[0024] In one embodiment, such as Figure 2 and Figure 3 As shown, a power-loss protection method for SSDs is provided, which is applied to... Figure 1The SSD in the operating environment shown is used as an example. The SSD includes a segmented energy storage module, volatile cache, backup power bus, and NAND flash memory array. Power loss protection methods include: S10: Obtain the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determine the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values.
[0025] The segmented energy storage module comprises multiple independent energy storage segments, each with corresponding energy storage characteristic measurements. These measurements include at least the voltage change characterizing the instantaneous voltage response of the energy storage segment, and the discharge current and voltage change corresponding to the discharge process of the energy storage segment. The SSD performs energy storage characteristic measurements on each energy storage segment separately. Based on the instantaneous voltage change before and after applying a load and the corresponding discharge current, it determines the equivalent series resistance of the energy storage segment. It then determines the effective capacity of the energy storage segment based on the voltage change, discharge current, and the preset discharge time window. Finally, it determines the available energy storage capacity of the energy storage segment based on the effective capacity, the preset test voltage, the preset minimum operating voltage, and the preset energy utilization rate. By separately determining the equivalent series resistance and available energy storage capacity of each energy storage segment, the actual energy storage capacity and electrical characteristics of different energy storage segments can be used independently in power-down protection calculations.
[0026] For example, the segmented energy storage module includes energy storage segments S1, S2, S3, S4, and S5, each with its own independent measurement node. When a preset pulse load is applied to energy storage segment S1, the discharge current I1, the instantaneous voltage change ΔV1 before and after the application of the preset pulse load, and the voltage change ΔVc1 within a preset discharge time window Δt1 are obtained. The equivalent series resistance of energy storage segment S1 is determined based on the discharge current I1 and the instantaneous voltage change ΔV1. The effective capacitance of energy storage segment S1 is determined based on the discharge current I1, the preset discharge time window Δt1, and the voltage change ΔVc1. Finally, the available stored energy of energy storage segment S1 is determined based on its effective capacitance. The equivalent series resistance and available stored energy of energy storage segments S2, S3, S4, and S5 are determined using the same measurement method. For each energy storage segment, the equivalent series resistance reflects the ability of the energy storage segment to generate an instantaneous voltage drop while providing sustaining power, and the available stored energy reflects the energy that the energy storage segment can actually use for power failure protection during the process of the energy storage segment dropping from the preset test voltage to the preset minimum operating voltage.
[0027] S20: Determine the holding energy required for power-down protection based on the amount of data to be written back in the SSD's volatile cache, the pre-determined write-back bandwidth of the SSD during the power-down protection phase, and the peak power consumption.
[0028] The SSD controller obtains the amount of data currently in the write-back state in the volatile cache and the pre-determined write-back bandwidth corresponding to the SSD writing the write-back data to the NAND flash array during the power-down protection phase. Based on the amount of write-back data and the write-back bandwidth, the SSD controller determines the data write-back time required to complete the write-back operation. It also obtains the controller termination time corresponding to the SSD performing cache write-back, SSD control metadata commit, and controller termination operations during the power-down protection phase, and adds a preset protection margin to determine the hold time required for power-down protection. The SSD controller further obtains the peak power consumption of the SSD during the power-down protection phase and determines the hold energy required for power-down protection based on the peak power consumption and the hold time required for power-down protection. Therefore, a correspondence is established between the hold energy required for power-down protection and the actual amount of write-back data in the volatile cache and the power supply requirements of the SSD when performing power-down protection operations.
[0029] For example, if the amount of data to be written back in the volatile cache is 256MB, and the write-back bandwidth corresponding to the SSD during the power-down protection phase is 10000MB / s, then the data write-back time corresponding to the data to be written back is 25.6ms. If the controller termination time corresponding to the SSD during the power-down protection phase is 20ms, and the preset protection margin is 4ms, then the hold time required for power-down protection is 49.6ms. When the peak power consumption of the SSD during the power-down protection phase is 18W, the hold energy required for power-down protection is determined to be 0.8928J based on the peak power consumption and hold time. The above parameters are design parameters used to illustrate the technical solution of this embodiment. The calculated hold time and hold energy are calculated values based on the listed design parameters and are not actual measured results of actual samples.
[0030] S30: Determine the corresponding upper limit of voltage drop based on the minimum allowable operating voltage of the backup power bus. Determine the target energy storage segment combination that meets the upper limit of energy storage and voltage drop by maintaining energy, the available energy storage of each energy storage segment, and the voltage drop generated by the equivalent series resistance of each energy storage segment.
[0031] The SSD obtains the minimum allowable operating voltage corresponding to the backup power bus and determines the upper limit of voltage drop based on the voltage difference between the supply voltage before the target energy storage segment combination is connected to the backup power bus and the minimum allowable operating voltage of the backup power bus. For different energy storage segment combinations in the segmented energy storage module, the SSD determines multiple candidate energy storage segment combinations and determines the corresponding combined usable energy storage based on the available energy storage of the energy storage segments included in each candidate combination. Simultaneously, it determines the equivalent series resistance voltage drop generated by each energy storage segment based on the equivalent series resistance and the corresponding operating current of each energy storage segment in each candidate combination. Then, it combines the power supply connection relationship between each energy storage segment and the backup power bus to determine the combined voltage drop corresponding to the candidate energy storage segment combination at the backup power bus. The SSD selects candidate energy storage segment combinations from multiple candidate energy storage segment combinations whose combined usable energy storage is not less than the holding energy and whose combined voltage drop does not exceed the upper limit of voltage drop. The candidate energy storage segment combinations that meet the above conditions are determined as the target energy storage segment combinations.
[0032] For example, a segmented energy storage module includes energy storage segments S1, S2, S3, S4, and S5. Candidate energy storage segment combinations are determined for S1 and S2, S3 and S4, and S5 respectively. Assuming a candidate energy storage segment combination has a combined usable energy storage capacity of 1.05 J, a required holding energy for power failure protection of 0.8928 J, a maximum voltage drop limit of 0.2 V on the backup power bus, and a combined voltage drop of 0.08 V determined based on the equivalent series resistance and operating current of each energy storage segment, then this candidate energy storage segment combination simultaneously satisfies the conditions that the combined usable energy storage capacity is not less than the holding energy and the combined voltage drop does not exceed the maximum voltage drop limit. Therefore, this candidate energy storage segment combination can be determined as the target energy storage segment combination. If another candidate energy storage segment combination has a combined available energy storage capacity of not less than the holding energy, but the combined voltage drop is 0.25V and exceeds the upper limit of the voltage drop, then the candidate energy storage segment combination will not be determined as the target energy storage segment combination.
[0033] S40: Detects the input voltage of the SSD, and when it is determined that the SSD is in a power-down confirmation state based on the input voltage, controls the switch corresponding to the target energy storage segment combination in the preset switch matrix to be turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array.
[0034] The preset switch matrix includes controlled switches that correspond one-to-one with each energy storage segment in the segmented energy storage module. One end of each controlled switch is connected to the corresponding energy storage segment, and the other end is connected to the backup power bus. Each controlled switch can independently change its conduction state according to the switch control state generated by the SSD main controller, enabling different energy storage segments to selectively connect to the backup power bus according to the target energy storage segment combination.
[0035] The SSD acquires its input voltage according to a preset sampling period and determines the voltage drop slope based on the continuously sampled input voltage. The power supply status of the SSD is then determined based on the input voltage and its drop slope. When the input voltage is between a preset first voltage threshold and a preset second voltage threshold, and the voltage drop slope does not reach a preset drop slope threshold, the SSD enters a power supply warning state, suspending unnecessary write operations and the pre-selected target energy storage segment combination. When the input voltage is below the second voltage threshold, or below the first voltage threshold and the voltage drop slope reaches a preset drop slope threshold, the corresponding power supply anomaly is debouncing. If the duration of the power supply anomaly reaches a preset debouncing time, the SSD is determined to be in a power-down confirmation state. When the SSD is in a power-down confirmation state, the corresponding controlled switch in the target energy storage segment combination control switch matrix is turned on, connecting the target energy storage segment combination to the backup power bus and providing sustaining power. Simultaneously, new write requests are stopped, and the sustaining power is used to write the data to be written back from the volatile cache and the SSD control metadata to the NAND flash array.
[0036] For example, the preset first voltage threshold is 10.8V, the preset second voltage threshold is 9.6V, the preset drop slope threshold is -0.08V / ms, and the preset debouncing time is 0.10ms. When the SSD's input voltage drops from 10.72V to 10.70V within 1ms, the calculated input voltage drop slope is -0.02V / ms. At this point, the input voltage is lower than the first voltage threshold but higher than the second voltage threshold, and the input voltage drop slope has not reached the preset drop slope threshold. Therefore, it is determined that the SSD enters a power supply warning state, and unnecessary write operations on the SSD and the pre-selected target energy storage segment combination are suspended. When the input voltage of the SSD drops from 11.0V to 10.6V within 1ms, the calculated drop slope of the input voltage is -0.40V / ms. At this time, the input voltage is lower than the first voltage threshold and the drop slope of the input voltage reaches the preset drop slope threshold. Debouncing is then performed on the corresponding power supply abnormality state. When the duration of the power supply abnormality state reaches 0.10ms, it is determined that the SSD is in a power failure confirmation state, and the controlled switch corresponding to the target energy storage section combination is turned on, so that the target energy storage section combination is connected to the backup power bus. The input voltage, preset first voltage threshold, preset second voltage threshold, preset drop slope threshold, and preset debouncing time mentioned above are all design parameters used to illustrate the technical solution. The above judgment result is a logical calculation result obtained based on the listed design parameters.
[0037] In this embodiment, by acquiring the energy storage characteristic measurements of each energy storage segment in the segmented energy storage module of the SSD, the equivalent series resistance and available energy storage of each energy storage segment are determined. The holding energy required for power-down protection is determined based on the amount of data to be written back in the volatile cache, the write-back bandwidth, and the peak power consumption, thus establishing a correspondence between the actual energy storage capacity of each energy storage segment and the actual power-down protection task that the SSD needs to complete. Furthermore, the upper limit of voltage drop is determined based on the minimum allowable operating voltage of the backup power bus, and the target energy storage segment combination is determined by combining the available energy storage of each energy storage segment and the voltage drop generated by the equivalent series resistance. This ensures that the target energy storage segment combination simultaneously meets the holding energy required for power-down protection and the voltage constraint of the backup power bus. When the SSD is determined to be in a power-down confirmation state, the target energy storage segment combination is selectively connected through a switch matrix, enabling the target energy storage segment combination to provide holding energy to the backup power bus and utilize this holding energy to complete the writing of the data to be written back in the volatile cache and the SSD control metadata to the NAND flash array. Therefore, this embodiment can select the energy storage segment participating in power-down protection based on the actual energy storage capacity, equivalent series resistance, and actual power-down protection requirements of the energy storage segment. This reduces the number of energy storage segments that do not meet energy requirements or voltage drop constraints participating in power-down protection, improves the energy storage utilization efficiency and adaptability of the segmented energy storage module, and enhances the reliability of writing data to be written back in the volatile cache and SSD control metadata to the NAND flash array under abnormal power-down conditions.
[0038] In one embodiment, such as Figure 4 As shown, step S10 involves obtaining the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determining the equivalent series resistance and available energy storage capacity of each energy storage segment based on the energy storage characteristic measurement values. Specifically, this includes the following steps: S11: Control each energy storage segment in the segmented energy storage module to connect to the charging circuit, so that after charging the energy storage segment to the preset test voltage, the charging circuit is disconnected, and the energy storage segment is kept in the disconnected state for a preset resting time.
[0039] The SSD main controller controls each energy storage segment in the segmented energy storage module to connect to its corresponding charging circuit. Each segment receives charging current from the SSD's input power supply or the charging power provided by the power management unit, raising its terminal voltage to a preset test voltage. Once the terminal voltage of a segment reaches the preset test voltage, the SSD main controller disconnects the corresponding charging circuit, creating electrical isolation between the energy storage segment and the charging power supply. This disconnection period is maintained for a preset resting time. The resting time allows the terminal voltage of the energy storage segment to transition from a charging state to a stable state without external charging current, thus reducing the impact of voltage changes caused by the moment the charging circuit is disconnected on the measurement results of the energy storage characteristics. During the resting time, the SSD main controller continuously acquires the terminal voltage of the energy storage segment through the corresponding measurement node. The resting time ends when the terminal voltage of the energy storage segment reaches a preset stability condition. The preset stability condition is determined based on the voltage difference between adjacent voltage samples. When the voltage difference between adjacent voltage samples is less than the preset stable voltage difference, the terminal voltage of the energy storage segment is considered to have reached a stable state.
[0040] For example, the segmented energy storage module includes energy storage segments S1, S2, S3, S4, and S5, each with its own charging circuit and measurement node. Taking energy storage segment S1 as an example, the SSD main controller controls energy storage segment S1 to connect to the charging circuit and charges it to a preset test voltage of 16.5V. When the terminal voltage of energy storage segment S1 reaches 16.5V, the corresponding charging circuit for energy storage segment S1 is disconnected, and energy storage segment S1 remains in the disconnected state. A resting time of 1 second is set, and the terminal voltage of energy storage segment S1 is acquired at a sampling period of 1ms during this time. When the change in terminal voltage between two adjacent sampling periods is less than 10mV, the terminal voltage of energy storage segment S1 is considered to have reached a stable state. Energy storage segments S2, S3, S4, and S5 use the same charging, disconnecting, and resting methods to reach the preset test voltage and stable state, respectively. The 16.5V, 1s, 1ms and 10mV mentioned above are design parameters used to illustrate the measurement process of the energy storage section.
[0041] S12: After the resting time ends, a preset pulse load is applied to the energy storage section, and the discharge current of the energy storage section under the preset pulse load, the instantaneous voltage change before and after the application of the preset pulse load, and the voltage change within the preset discharge time window are obtained. The discharge current, the instantaneous voltage change, and the voltage change within the preset discharge time window are determined as the energy storage characteristic measurement values corresponding to the energy storage section.
[0042] After the energy storage segment completes its resting phase, the SSD main controller controls the energy storage segment to connect to a preset pulse load, enabling the energy storage segment to provide discharge current to the pulse load for the preset pulse load duration. The SSD acquires the terminal voltage of the energy storage segment through the measurement node set at the corresponding energy storage segment, and acquires the discharge current of the energy storage segment under the preset pulse load through a current detection loop. Using the time point when the preset pulse load is applied as the measurement reference for the instantaneous voltage change, the first terminal voltage of the energy storage segment is acquired before the preset pulse load is applied, and the second terminal voltage of the energy storage segment is acquired after the preset pulse load is applied. The instantaneous voltage change is determined based on the difference between the first terminal voltage and the second terminal voltage. Simultaneously, the terminal voltage of the energy storage segment is acquired at the start and end times of the preset discharge time window, respectively. The voltage change within the preset discharge time window is determined based on the difference between the terminal voltages at the start and end times of the preset discharge time window. The discharge current, instantaneous voltage change, and voltage change within a preset discharge time window together form the energy storage characteristic measurement value corresponding to the energy storage segment. The instantaneous voltage change is used to characterize the voltage drop of the energy storage segment caused by the equivalent series resistance at the moment the load is applied, and the voltage change within the preset discharge time window is used to characterize the voltage change of the energy storage segment during continuous discharge.
[0043] For example, a preset pulse load of 2.5A is applied to the energy storage section S1 after it has been settling, and the duration of the preset pulse load is set to 10ms. Before applying the preset pulse load, the first terminal voltage is obtained through the measurement node corresponding to the energy storage section S1; the second terminal voltage is obtained at a specified sampling time after applying the preset pulse load. Assuming the first terminal voltage is 16.50V and the second terminal voltage is 16.43V, the instantaneous voltage change before and after applying the preset pulse load is 0.07V. Within a preset discharge time window of 10ms, the terminal voltage of the energy storage section S1 is obtained at the end of the preset discharge time window. Assuming the terminal voltage at the end of the preset discharge time window is 16.20V, the voltage change within the preset discharge time window is 0.30V. Therefore, the measured values of the energy storage characteristics corresponding to the energy storage section S1 include at least a discharge current of 2.5A, an instantaneous voltage change of 0.07V, and a voltage change of 0.30V within the 10ms preset discharge time window. Energy storage sections S2, S3, S4, and S5 each perform the same pulse load measurement process to obtain the energy storage characteristic measurement values corresponding to each energy storage section.
[0044] S13: Determine the equivalent series resistance of the energy storage section based on the discharge current and instantaneous voltage change in the measured values of the energy storage characteristics, and determine the effective capacity of the energy storage section based on the discharge current, the preset discharge time window, and the voltage change within the preset discharge time window in the measured values of the energy storage characteristics.
[0045] The SSD main controller obtains the discharge current and instantaneous voltage change from the energy storage characteristic measurements corresponding to the energy storage section, and determines the equivalent series resistance of the energy storage section based on the ratio between the instantaneous voltage change and the discharge current. The equivalent series resistance is determined according to the following formula: in, This is the equivalent series resistance of the energy storage section. The instantaneous voltage change before and after applying a preset pulse load. The discharge current of the energy storage segment under a preset pulse load is given. Using the above calculation method, a correspondence is established between the voltage change instantaneously generated when the load is applied to the energy storage segment and the corresponding discharge current to obtain the equivalent series resistance of the energy storage segment. The SSD main controller further obtains the discharge current, the preset discharge time window, and the voltage change within the preset discharge time window from the energy storage characteristic measurements. The effective capacity of the energy storage segment is determined by dividing the product of the discharge current and the preset discharge time window by the voltage change within the preset discharge time window. The effective capacity is determined according to the following formula: in, The effective electrical capacity of the energy storage section, This is the discharge current of the energy storage section under a preset pulse load. To preset the discharge time window, This refers to the voltage change within a preset discharge time window. When determining the equivalent series resistance and effective capacity of the energy storage segment, the SSD main controller calculates the discharge current, instantaneous voltage change, and voltage change within the preset discharge time window using the energy storage characteristic measurement values corresponding to the same energy storage segment. This ensures that the obtained equivalent series resistance and effective capacity correspond to the actual measurement process of the same energy storage segment.
[0046] For example, based on the measured energy storage characteristics of energy storage section S1, the discharge current is 2.5A, the instantaneous voltage change before and after applying the preset pulse load is 0.07V, the preset discharge time window is 10ms, and the voltage change within the preset discharge time window is 0.30V. The calculated equivalent series resistance of energy storage section S1 is 0.028Ω, or 28mΩ; the calculated effective capacitance of energy storage section S1 is 0.0833F, or 83.3mF. It should be noted that when using a single pulse load measurement, the discharge current and voltage change correspond to the same sampling period; when using multiple continuous pulses for measurement, the equivalent series resistance and effective capacitance corresponding to multiple pulses can be calculated separately, and the calculation results that meet the preset measurement conditions can be averaged to reduce the impact of single sampling disturbances on the calculation results. The above calculation results are calculated based on the listed design parameters and are not actual sample measurement results.
[0047] S14: Determine the available energy storage capacity of the energy storage section based on the effective capacity, preset test voltage, preset minimum operating voltage, and preset energy utilization rate.
[0048] The SSD main controller acquires the effective capacity of the energy storage segment determined in S13, and acquires the preset test voltage, preset minimum operating voltage, and preset energy utilization rate corresponding to the energy storage segment. The preset test voltage is used to determine the initial voltage at which the energy storage segment begins to provide sustaining power. The preset minimum operating voltage is used to limit the minimum voltage at which the energy storage segment can provide sustaining power to the backup power bus. The preset energy utilization rate characterizes the proportion of theoretical stored energy that can actually be used for power-down protection within the energy storage segment between the preset test voltage and the preset minimum operating voltage.
[0049] The SSD main controller determines the theoretical energy storage capacity of the energy storage section as it decreases from the preset test voltage to the preset minimum operating voltage based on the effective capacitance, preset test voltage, and preset minimum operating voltage. It then calculates the theoretical energy storage capacity using a preset energy utilization rate, and determines the calculated energy storage capacity as the usable energy storage capacity of the energy storage section. The usable energy storage capacity of the energy storage section is determined according to the following formula: in, The available stored energy in the energy storage section, The effective electrical capacity of the energy storage section, For the preset test voltage, To preset the minimum operating voltage, The preset energy utilization rate is determined based on the power conversion efficiency, lifespan retention factor, and temperature retention factor of the energy storage section. When the preset energy utilization rate is determined by all of the above parameters, it is calculated as the product of the power conversion efficiency, lifespan retention factor, and temperature retention factor. By converting the theoretical stored energy to the preset energy utilization rate, a correspondence can be established between the actual energy available for power failure protection in the energy storage section and the preset test voltage and preset minimum operating voltage.
[0050] For example, the effective capacity of energy storage section S1 is 83.3mF, the preset test voltage is 16.5V, the preset minimum operating voltage is 8.0V, and the preset energy utilization rate is 0.82 × 0.80 × 0.85, or 0.5576. The usable stored energy of energy storage section S1 is calculated as follows: The calculated usable energy storage capacity of energy storage segment S1 is approximately 5.43 J. For energy storage segments S2, S3, S4, and S5, the usable energy storage capacity of each segment is calculated based on its corresponding effective capacitance, preset test voltage, preset minimum operating voltage, and preset energy utilization rate. When different energy storage segments use the same preset test voltage, preset minimum operating voltage, and preset energy utilization rate, the difference in usable energy storage between segments is due to the difference in their effective capacitance. When different energy storage segments have different effective capacitances, the usable energy storage is calculated separately based on their respective effective capacitances.
[0051] In one embodiment, step S20, which involves determining the holding energy required for power-down protection based on the amount of data to be written back in the SSD's volatile cache, the predetermined write-back bandwidth of the SSD during the power-down protection phase, and the peak power consumption, specifically includes the following steps: S21: Obtain the amount of data to be written back in the volatile cache, and obtain the pre-determined write-back bandwidth corresponding to the SSD writing the data to be written back to the NAND flash array during the power-down protection phase. Determine the data write-back time corresponding to the data to be written back based on the amount of data to be written back and the write-back bandwidth.
[0052] The SSD controller obtains the data currently stored in the volatile cache that has not yet been written to the NAND flash array, and determines the amount of data to be written back based on the write status of each cached data. The amount of data to be written back represents the total amount of data that the SSD controller needs to write from the volatile cache to the NAND flash array after entering the power-down protection phase, and can be measured in bytes, kilobytes, or megabytes.
[0053] Simultaneously, the pre-determined write-back bandwidth is obtained when the SSD writes data to the NAND flash array during the power-down protection phase. Write-back bandwidth characterizes the amount of data that can be written to the NAND flash array per unit time, and it can be determined based on the actual write capabilities of the SSD's main controller, the NAND flash array, and the corresponding data write path during the power-down protection phase. To avoid directly using the maximum write bandwidth under normal operating conditions as the write-back bandwidth during the power-down protection phase, the write-back bandwidth is determined through testing based on the SSD's write command scheduling method during the power-down protection phase, the actual writable bandwidth of the NAND flash array, and the power supply conditions during the power-down protection phase, and is stored as a preset write-back bandwidth parameter.
[0054] After determining the amount of data to be written back and the write-back bandwidth, calculate the ratio of the amount of data to be written back to the write-back bandwidth to obtain the data write-back time corresponding to the data to be written back. Specifically, it can be calculated according to the following formula: in, Indicates the data write-back time. Indicates the amount of data to be written back. This represents the write-back bandwidth. When the amount of data to be written back and the write-back bandwidth are measured in MB and MB / s respectively, the calculated data write-back time is measured in seconds.
[0055] For example, if the amount of data to be written back in the volatile cache is 256MB, and the pre-determined write-back bandwidth for the SSD to write the data to the NAND flash array during the power-down protection phase is 10000MB / s, then the data write-back time calculated based on the amount of data to be written back and the write-back bandwidth is: Under the current conditions of the amount of data to be written back and the write-back bandwidth, the SSD needs approximately 25.6ms to complete the writing of the data to be written back from the volatile cache to the NAND flash array.
[0056] S22: Obtain the controller termination time and preset protection margin corresponding to the SSD during the power-down protection phase, and determine the sum of the data write-back time, controller termination time and preset protection margin as the hold time required for power-down protection.
[0057] Obtain the controller termination time for the SSD during the power-loss protection phase. The controller termination time characterizes the time required for the SSD's main controller to complete the termination operations during the power-loss protection process. These termination operations include at least one or more of the following: updating the logical address mapping relationship corresponding to the data to be written back, recording the write status of the NAND flash array, generating or updating the control metadata required for power-loss recovery, and confirming the cache write status. The controller termination time can be obtained by performing multiple tests on the SSD during the power-loss protection process, and the corresponding preset controller termination time can be determined based on the test results.
[0058] Simultaneously, a preset protection margin is obtained. This preset protection margin compensates for time fluctuations beyond the data write-back time and controller termination time. It can be determined based on NAND flash array write time fluctuations, SSD main controller task scheduling time fluctuations, and the additional time required for data status confirmation during power-down protection. The controller termination time and the preset protection margin can be stored as SSD power-down protection parameters in the corresponding parameter storage area of the SSD.
[0059] After obtaining the above parameters, sum the data write-back time, controller termination time, and preset protection margin to obtain the holding time required for power failure protection. This can be calculated using the following formula: in, Indicates the hold time required for power failure protection. Indicates the data write-back time. Indicates the controller's termination time. This indicates a preset protection margin.
[0060] For example, if the data write-back time is determined to be 25.6ms in S21, and the predetermined controller termination time for the SSD during the power-down protection phase is 20ms, and the preset protection margin is set to 4ms, then the required hold time for power-down protection is: =25.6 + 20 + 4 = 49.6 ms; This means that the current power failure protection process requires the backup power bus to maintain an effective power supply time of at least 49.6ms in order to complete the data write-back process of the data to be written back and the corresponding closing operation of the SSD main controller.
[0061] S23: Obtain the pre-determined peak power consumption of the SSD during the power-down protection phase, and determine the holding energy required for power-down protection based on the peak power consumption and the holding time.
[0062] Obtain the predetermined peak power consumption of the SSD during the power-down protection phase. Peak power consumption characterizes the maximum power requirement when the SSD's main controller, NAND flash array, and related power supply paths are simultaneously operating during the power-down protection process. Peak power consumption can be determined by performing a power-down protection test on the SSD, collecting the supply voltage and current on the backup power bus side under the condition that there is data to be written back in the volatile cache, determining the power variation range during the power-down protection process based on the supply voltage and current, and then determining the peak power consumption from this range. The determined peak power consumption is stored as the SSD's power-down protection parameter.
[0063] After determining the peak power consumption and hold-up time, multiply the peak power consumption by the hold-up time to obtain the hold-up energy required for power-down protection, which can be calculated using the following formula: in, This indicates the holding energy required for power-off protection. Indicates peak power consumption. This indicates the hold-up time required for power-down protection. When peak power consumption is expressed in W and hold-up time in s, the resulting hold-up energy is expressed in J.
[0064] For example, if the hold-up time required for power-down protection is determined to be 49.6ms in S22, and the pre-determined peak power consumption of the SSD during the power-down protection phase is 18W, then the hold-up energy required for power-down protection is: Under the current conditions of the amount of data to be written back, write-back bandwidth, controller termination time, protection margin, and peak power consumption, it is determined that the SSD needs to obtain at least 0.8928J of retention energy during the power-down protection phase. This retention energy serves as the energy constraint for determining the subsequent target energy storage segment combination and is compared with the available energy storage corresponding to each energy storage segment.
[0065] In one embodiment, such as Figure 5 As shown, in step S30, the target energy storage segment combination that meets the upper limits of the maintenance energy and voltage drop is determined by considering the maintenance energy, the available energy of each energy storage segment, and the voltage drop generated by the equivalent series resistance of each energy storage segment. This specifically includes the following steps: S31: Determine multiple candidate energy storage segment combinations composed of different energy storage segments based on the available energy storage capacity of each energy storage segment, and determine the corresponding combined available energy storage capacity based on the available energy storage capacity of each energy storage segment in each candidate energy storage segment combination.
[0066] The available energy storage capacity determined for each energy storage segment in the segmented energy storage module in S10 is obtained, and multiple candidate energy storage segment combinations are constructed based on whether each energy storage segment can be connected to the backup power bus and the available energy storage capacity corresponding to each energy storage segment. Each candidate energy storage segment combination includes at least one energy storage segment, and the same energy storage segment can belong to different candidate energy storage segment combinations in order to compare the differences in available energy storage capacity among different energy storage segment combinations.
[0067] After determining the candidate energy storage segment combinations, the available energy storage of each energy storage segment in the same candidate energy storage segment combination is summed to obtain the combined available energy storage of that candidate energy storage segment combination. In the case where multiple energy storage segments are connected in parallel to the backup power bus, each energy storage segment can jointly provide holding power to the backup power bus. Therefore, the available energy storage of each energy storage segment is accumulated to characterize the total holding power that the candidate energy storage segment combination can provide.
[0068] For example, the segmented energy storage module includes energy storage segments S1, S2, S3, S4, and S5. The available energy storage capacity of energy storage segments S1 to S5, measured and calculated by S10, is 0.42 J, 0.46 J, 0.51 J, 0.57 J, and 0.63 J, respectively. Based on the different energy storage segments forming candidate energy storage segment combinations, candidate energy storage segment combinations C1, C2, and C3 can be obtained. C1 includes energy storage segments S1, S2, and S3; C2 includes energy storage segments S2, S3, and S4; and C3 includes energy storage segments S3, S4, and S5.
[0069] For candidate energy storage segment combination C1, the available energy storage capacity is: For candidate energy storage segment combination C2, its available energy storage capacity is: For candidate energy storage segment combination C3, its available energy storage capacity is: This yields the combined available energy storage corresponding to different candidate energy storage segment combinations, and the combined available energy storage is then compared with the retention energy determined in S20.
[0070] S32: Obtain the operating current of each candidate energy storage segment combination corresponding to the predetermined operating current of each energy storage segment, and determine the equivalent series resistance voltage drop of each energy storage segment based on the equivalent series resistance of each energy storage segment and the corresponding operating current, and determine the combined voltage drop of the corresponding candidate energy storage segment combination based on the equivalent series resistance voltage drop of each energy storage segment.
[0071] Obtain the operating current of each energy storage segment corresponding to a predetermined combination of candidate energy storage segments. The operating current of the energy storage segment is used to characterize the supply current undertaken by each energy storage segment in the candidate energy storage segment combination when providing maintenance power to the backup power bus during the power outage protection phase. Different candidate energy storage segment combinations contain different energy storage segments, and their corresponding power supply distribution relationships are also different. Therefore, the operating current of each energy storage segment may be different.
[0072] For each candidate energy storage segment combination, the corresponding equivalent series resistance voltage drop is determined based on the equivalent series resistance of each energy storage segment and its operating current. Specifically, the equivalent series resistance voltage drop is obtained by multiplying the operating current of the energy storage segment by its equivalent series resistance. For energy storage segments connected in parallel to the backup power bus, multiple energy storage segments jointly supply power to the backup power bus. The equivalent series resistance voltage drops of each energy storage segment collectively affect the voltage at the backup power bus through the power supply distribution relationship. Therefore, the combined voltage drop corresponding to the candidate energy storage segment combination is determined based on the actual power supply connection relationship between each energy storage segment and the backup power bus.
[0073] Further, the steps of obtaining the operating current of each candidate energy storage segment corresponding to a predetermined combination of candidate energy storage segments, determining the equivalent series resistance voltage drop of each energy storage segment based on its equivalent series resistance and corresponding operating current, and determining the combined voltage drop of the corresponding candidate energy storage segment combination based on its equivalent series resistance voltage drop, specifically include: S321: Obtain the total power supply current of the SSD during the power failure protection phase, and for each candidate energy storage segment combination, determine the power supply allocation relationship corresponding to the candidate energy storage segment combination based on the power supply connection relationship of each energy storage segment in the candidate energy storage segment combination connected to the backup power bus.
[0074] Obtain the total supply current of the SSD during the power-down protection phase. The total supply current is used to characterize the total current required by the backup power bus to provide power to the SSD's power load during the power-down protection phase. It can be determined by testing based on the power requirements of the SSD main controller, volatile cache, NAND flash array, and power conversion path during the power-down protection phase, and is stored as a power-down protection parameter.
[0075] For each candidate energy storage segment combination, the power distribution relationship is determined based on the power supply connection between each energy storage segment in the candidate energy storage segment combination and the backup power bus. The power distribution relationship is used to characterize the proportion of the total power supply current distributed among the energy storage segments in the candidate energy storage segment combination. When multiple energy storage segments are connected to the backup power bus in parallel through corresponding controlled switches, the power supply capacity of each energy storage segment can be determined based on its equivalent series resistance, and the corresponding power distribution ratio can be determined according to the conductivity of each energy storage segment, so that the energy storage segment with the smaller equivalent series resistance can bear a relatively larger power supply current.
[0076] For example, candidate energy storage segment combination C1 includes energy storage segments S1, S2, and S3. The total supply current of the SSD during the power failure protection phase is predetermined to be 6A. The equivalent series resistances of energy storage segments S1, S2, and S3 are 28mΩ, 35mΩ, and 42mΩ, respectively. Based on the conductance of each energy storage segment, the power supply allocation ratio is determined, and the corresponding conductances for the three segments are as follows: Therefore, the power supply allocation ratio corresponding to the candidate energy storage segment combination C1 is normalized according to the above conductance, and the power supply allocation ratios of energy storage segments S1, S2 and S3 are approximately 40.54%, 32.43% and 27.03%, respectively.
[0077] S322: Determine the operating current of each energy storage segment in the candidate energy storage segment combination based on the total power supply current and the power supply distribution relationship.
[0078] The total supply current corresponding to the SSD during the power failure protection phase is allocated to each energy storage segment in the candidate energy storage segment combination according to the power allocation relationship determined in S321. The operating current of each energy storage segment is calculated based on the total supply current and the power allocation ratio corresponding to each energy storage segment. Specifically, it can be calculated according to the following formula: in, This represents the operating current of the i-th energy storage segment in the candidate energy storage segment combination. This indicates the total supply current of the SSD during the power-down protection phase. This represents the power supply allocation ratio corresponding to the i-th energy storage segment.
[0079] For example, given that the total supply current corresponding to candidate energy storage section combination C1 is 6A, and the power supply allocation ratios of energy storage sections S1, S2, and S3 are 40.54%, 32.43%, and 27.03%, respectively, the following calculations are obtained: Therefore, the operating currents of energy storage segments S1, S2 and S3 in candidate energy storage segment combination C1 are approximately 2.43A, 1.95A and 1.62A respectively, and the sum of the three is approximately 6A, which is consistent with the total power supply current of the SSD during the power failure protection phase.
[0080] S323: For each energy storage segment in the candidate energy storage segment combination, multiply the operating current of the energy storage segment by the corresponding equivalent series resistance to obtain the equivalent series resistance voltage drop of the energy storage segment. Based on the equivalent series resistance voltage drop of each energy storage segment in the candidate energy storage segment combination and the power supply connection relationship between each energy storage segment in the candidate energy storage segment combination and the backup power bus, determine the combined voltage drop of the candidate energy storage segment combination at the backup power bus.
[0081] For each energy storage segment in the candidate energy storage segment combination, the operating current of that energy storage segment is multiplied by its equivalent series resistance to obtain the equivalent series resistance voltage drop of that energy storage segment. Specifically, this can be calculated using the following formula: in, This represents the equivalent series resistance voltage drop corresponding to the i-th energy storage segment. This represents the operating current of the i-th energy storage segment. This represents the equivalent series resistance corresponding to the i-th energy storage segment.
[0082] When multiple energy storage sections are connected in parallel to the backup power bus, the equivalent series resistance voltage drop of each energy storage section collectively determines the supply voltage that the backup power bus can obtain. After current distribution according to the power distribution relationship determined in S321, the equivalent series resistance voltage drop of each parallel branch can reflect the degree of reduction in the bus supply voltage caused by the internal resistance of the corresponding energy storage section. Therefore, the equivalent series resistance voltage drop of each energy storage section can be compared according to its power supply connection relationship with the backup power bus, and the voltage drop of the branch that causes the largest voltage drop to the backup power bus in the candidate energy storage section combination can be determined as the combined voltage drop corresponding to the candidate energy storage section combination. For parallel energy storage sections with power distribution based on conductance, the current distribution of each branch makes the equivalent series resistance voltage drop of each branch nearly the same. In this case, the combined voltage drop can be directly determined by the equivalent series resistance voltage drop of any energy storage section participating in the parallel power supply.
[0083] For example, for candidate energy storage segment combination C1, the operating currents of energy storage segments S1, S2, and S3 are 2.4324A, 1.9458A, and 1.6218A, respectively, with corresponding equivalent series resistances of 28mΩ, 35mΩ, and 42mΩ. Then: Since energy storage sections S1, S2 and S3 are all connected in parallel to the backup power bus through corresponding controlled switches, and the above power distribution relationship makes the current borne by each branch match its equivalent series resistance, the combined voltage drop of candidate energy storage section combination C1 at the backup power bus is about 0.068V.
[0084] S33: From multiple candidate energy storage segment combinations, select the candidate energy storage segment combination that has a combined usable energy storage capacity not less than the holding energy and a combined voltage drop not exceeding the upper limit of the voltage drop as the target energy storage segment combination.
[0085] Obtain the holding energy required for power failure protection as determined in S20, and the upper limit of voltage drop determined based on the minimum allowable operating voltage of the backup power bus. For each candidate energy storage segment combination, compare the available energy storage capacity with the holding energy corresponding to that candidate energy storage segment combination, and compare the combined voltage drop with the upper limit of voltage drop.
[0086] When the available energy storage capacity of a candidate energy storage segment combination is not less than the holding energy, and the combined voltage drop does not exceed the upper limit of the voltage drop limit, the candidate energy storage segment combination is determined to meet the current power outage protection requirements, and the candidate energy storage segment combination that meets the above two conditions is determined as the target energy storage segment combination. By setting energy constraints and voltage drop constraints simultaneously, the large voltage drop of the energy storage segment during actual power supply is avoided due to selecting the energy storage segment solely based on the energy storage capacity.
[0087] For example, in S20, the required holding energy for power failure protection is determined to be 0.8928 J, and the upper limit of voltage drop is determined to be 0.20 V based on the minimum allowable operating voltage of the backup power bus. For the candidate energy storage segment combinations C1, C2, and C3 obtained in S31, their combined available energy storage is 1.39 J, 1.54 J, and 1.71 J, respectively.
[0088] Assuming that the combined voltage drops of candidate energy storage segment combinations C1, C2, and C3 are determined to be 0.068V, 0.21V, and 0.15V respectively through S32 and S321-S323, then candidate energy storage segment combination C1 satisfies the two conditions of "1.39J ≥ 0.8928J" and "0.068V ≤ 0.20V", thus satisfying the energy retention and voltage drop constraints. Candidate energy storage segment combination C2, although satisfying the energy retention constraint, has a combined voltage drop of 0.21V, which is greater than 0.20V, therefore not satisfying the voltage drop constraint. Candidate energy storage segment combination C3 satisfies both the energy retention and voltage drop constraints. Therefore, the target energy storage segment combination can be determined from candidate energy storage segment combinations C1 and C3 according to a predetermined combination selection rule. For example, if both satisfy the energy retention and voltage drop constraints, the candidate energy storage segment combination with the smaller energy margin between the available energy storage and the energy retention can be determined as the target energy storage segment combination to reduce unnecessary energy storage segment deployment. According to this rule, the energy margin of C1 is 0.4972J and the energy margin of C3 is 0.8172J. Therefore, candidate energy storage segment combination C1 is determined as the target energy storage segment combination.
[0089] In one embodiment, such as Figure 6 As shown, in step S40, the input voltage of the SSD is detected, and when it is determined that the SSD is in a power-down confirmation state based on the input voltage, the switch corresponding to the target energy storage segment combination in the preset switch matrix is turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array. Specifically, the steps include the following: S41: Obtain the input voltage of the SSD according to the preset sampling period, and determine the descent slope of the input voltage based on the continuously sampled input voltage.
[0090] The SSD's input voltage is continuously sampled by the SSD's power monitoring unit according to a preset sampling period, resulting in multiple input voltage sample values arranged according to the sampling time. The preset sampling period is determined based on the voltage sampling accuracy of the power monitoring unit and the SSD's response time to abnormal power supply changes, so that the continuously sampled input voltage can reflect the actual decrease process of the input power supply.
[0091] Obtain the input voltage and sampling time corresponding to two adjacent sampling moments, and determine the slope of the input voltage drop based on the voltage change and time change between adjacent sampling points. Specifically, it can be calculated using the following formula: in, This represents the slope of the input voltage decrease. and These represent the input voltages corresponding to the current sampling time and the previous sampling time, respectively. and These represent the current sampling time and the previous sampling time, respectively. When the input voltage decreases, the slope of the decrease is negative, and the faster the decrease, the larger the absolute value of the slope.
[0092] For example, if the preset sampling period is set to 1ms, and the input voltages at two consecutive sampling moments are 10.72V and 10.70V respectively, then the change in input voltage between the two sampling moments is -0.02V, and the time change is 1ms. Therefore, the slope of the input voltage decrease is: Therefore, the current input voltage decrease slope is -0.02V / ms.
[0093] S42: When the input voltage is lower than the preset first voltage threshold and higher than the preset second voltage threshold, the SSD is determined to enter the power supply warning state when the descent slope does not reach the preset descent slope threshold.
[0094] Obtain a predetermined first voltage threshold, a second voltage threshold, and a drop slope threshold. The first voltage threshold is used to divide the voltage range between the normal power supply state and the power supply warning state of the SSD, and the second voltage threshold is used to divide the low voltage range between the power supply warning state and the power failure confirmation state, with the first voltage threshold being higher than the second voltage threshold.
[0095] The first voltage threshold is determined based on the input voltage range required for normal SSD operation and the allowable input voltage range of the power management unit; the second voltage threshold is determined based on the minimum input voltage that allows the SSD to continue operating when it performs power-down protection; the descent slope threshold is determined based on the response time required for the SSD to enter the power-down protection preparation state in advance during a rapid input voltage drop. The descent slope is represented by a negative value, so when the descent slope is less than or equal to the descent slope threshold, it indicates that the input voltage drop rate has reached a preset rapid descent level.
[0096] If the current input voltage is lower than the first voltage threshold but higher than the second voltage threshold, the current descent rate is further compared with the descent rate threshold. If the descent rate has not yet reached the preset descent rate threshold, the current power supply anomaly is identified as a power supply warning state, and the target energy storage unit combination is not immediately activated.
[0097] For example, a first voltage threshold is set to 10.8V, a second voltage threshold to 9.6V, and a drop slope threshold to -0.08V / ms. When the current input voltage drops from 10.72V to 10.70V, the current input voltage of 10.70V is lower than 10.8V but higher than 9.6V, and the drop slope obtained according to S41 is -0.02V / ms. Since -0.02V / ms does not reach -0.08V / ms, it is determined that the SSD enters a power supply warning state.
[0098] S43: When it is determined that the SSD has entered the power supply warning state, suspend unnecessary write operations of the SSD and pre-select the target energy storage segment combination.
[0099] After determining that the SSD has entered a power-down warning state, the SSD main controller categorizes the currently executing write operations. Write operations that are unrelated to power-down protection and can be delayed are identified as unnecessary write operations and are suspended. Unnecessary write operations can include unnecessary data migration generated by garbage collection, writing background inspection data, and unnecessary log cleanup.
[0100] Simultaneously, based on the target energy storage segment combination already determined in S30, a corresponding pre-selection result is generated, and the target energy storage segment combination is marked as the energy storage segment combination to be put into operation. At this time, the controlled switch corresponding to the target energy storage segment combination is not controlled to be turned on, but the energy storage segment to be put into operation after the power outage confirmation is determined in advance, so that when the power outage confirmation occurs, the power supply switching can be directly performed based on the already determined target energy storage segment combination.
[0101] For example, when the SSD enters a power-off warning state, if it is detected that background garbage collection writes and log defragmentation writes are not necessary write operations required for power-off protection, then garbage collection writes and log defragmentation writes are paused. At the same time, S30 has determined that energy storage segments S1, S2, and S3 constitute the target energy storage segment combination, so energy storage segments S1, S2, and S3 are marked as pre-selected energy storage segments, but at this time the controlled switches corresponding to energy storage segments S1, S2, and S3 are kept in the off state.
[0102] S44: When the input voltage is lower than the second voltage threshold, or when the input voltage is lower than the first voltage threshold and the drop slope reaches the preset drop slope threshold, the corresponding power supply abnormality state is debouncing, and when the duration of the power supply abnormality state reaches the preset debouncing time, the SSD is determined to be in a power failure confirmation state.
[0103] The system combines input voltage and voltage drop rate for judgment. When the input voltage is lower than the second voltage threshold, the current power supply state is determined to be a low voltage abnormal state; when the input voltage is lower than the first voltage threshold and the voltage drop rate reaches the preset voltage drop rate threshold, the current power supply state is determined to be a rapid voltage drop abnormal state.
[0104] After identifying a power supply anomaly, instead of directly determining whether the SSD is in a power-down confirmation state based on a single sampling result, the duration of the power supply anomaly is recorded during continuous sampling. When the duration of the power supply anomaly reaches a preset debouncing time, the SSD is determined to be in a power-down confirmation state; if the power supply anomaly returns to the corresponding normal voltage range before reaching the preset debouncing time, the current power supply anomaly is cleared, and the SSD does not enter the power-down confirmation state.
[0105] The preset debouncing time is determined based on the sampling period of the power monitoring unit and the allowable power-down protection response time of the SSD. For abnormal states with rapid drops, a shorter debouncing time can be used to avoid the power-down protection response being too late during rapid power-down. For abnormal states with low voltage, the duration of the low voltage range can be used for confirmation to avoid false triggering caused by instantaneous voltage fluctuations.
[0106] For example, a first voltage threshold is set to 10.8V, a second voltage threshold to 9.6V, a drop slope threshold to -0.08V / ms, and a power-down confirmation debouncing time to 0.10ms. When the input voltage drops from 11.0V to 10.6V within 1ms, the drop slope is calculated as -0.40V / ms according to step S41. The current input voltage of 10.6V is lower than the first voltage threshold of 10.8V but higher than the second voltage threshold of 9.6V. Since -0.40V / ms represents a rapid drop as defined by the preset drop slope threshold, the current state is determined to be a rapid drop abnormal state, and debouncing timing begins. When the duration of the rapid drop abnormal state reaches 0.10ms, the SSD is determined to be in a power-down confirmation state.
[0107] For example, when the input voltage drops from 10.0V to 9.5V, the current input voltage is already below the second voltage threshold of 9.6V. Even if the rate of decrease does not reach the preset rate of decrease threshold, the current state is determined to be a low voltage abnormal state. After the abnormal state continues for the preset debouncing time, the SSD is determined to be in a power-down confirmation state.
[0108] S45: When it is determined that the SSD is in a power failure confirmation state, the switch corresponding to the target energy storage segment combination in the preset switch matrix is turned on according to the target energy storage segment combination control, so that the target energy storage segment combination is connected to the backup power bus and provides holding power. At the same time, it stops receiving new write requests and uses the holding power to write the data to be written back in the volatile cache and the SSD control metadata into the NAND flash array.
[0109] After confirming that the SSD is in a power-down state, the SSD main controller calls the pre-selected target energy storage segment combination in S43 and controls the corresponding controlled switches in the switch matrix to turn on according to the target energy storage segment combination, so that the target energy storage segment combination is connected to the backup power bus. After the target energy storage segment combination is connected to the backup power bus, each target energy storage segment provides holding power to the backup power bus to maintain the normal operating voltage of the SSD main controller, NAND flash memory array, and the power supply path required during the power-down protection process.
[0110] Meanwhile, the SSD main controller stops receiving new write requests and determines the data to be written back based on the data status in the volatile cache, and writes the data to be written back to the NAND flash array; for SSD control metadata, the SSD control metadata related to the cache data write status, FTL mapping relationship, log status and recovery location are written to the NAND flash array according to the power loss protection process, so that the SSD can be restored to a consistent state based on the already solidified data and SSD control metadata after power is restored.
[0111] For example, if S44 determines that the SSD is in a power-down confirmation state and S43 has pre-selected energy storage segments S1, S2, and S3, the controlled switches corresponding to energy storage segments S1, S2, and S3 are turned on, allowing all three energy storage segments to simultaneously connect to the backup power bus. Assuming S20 determines that the required hold-up time for the current power-down protection is 49.6ms, the combined available energy of the target energy storage segment combination is 1.39J, and the hold-up energy and voltage drop constraints determined in S30 are met, then the hold-up energy provided by the target energy storage segment combination is used to maintain power supply during the power-down protection period. During this period, new write requests are stopped, the data to be written back from the volatile cache and the SSD control metadata are written to the NAND flash array, and the corresponding cache state and recovery state are updated after the write is completed.
[0112] Furthermore, the steps for turning on the switches corresponding to the target energy storage segment combination in the preset switch matrix according to the target energy storage segment combination control specifically include: S451: Determine the controlled switch in the switch matrix based on the energy storage segment in the target energy storage segment combination, and generate the switch control state corresponding to the target energy storage segment combination.
[0113] The system acquires the identifiers of the energy storage segments included in the target energy storage segment combination and determines the controlled switches in the switch matrix corresponding to the target energy storage segment combination based on the pre-established one-to-one correspondence between the energy storage segments and the controlled switches. The one-to-one correspondence is used to characterize the correspondence between each energy storage segment and its controlled switch, enabling the SSD main controller to accurately determine the controlled switches that need to be turned on based on the energy storage segments in the target energy storage segment combination.
[0114] After determining the corresponding controlled switches, a switch control state is generated based on the energy storage segments in the target energy storage segment combination. The switch control state includes at least the on or off state of the controlled switches corresponding to each energy storage segment. Specifically, the controlled switches corresponding to the energy storage segments in the target energy storage segment combination are set to the on state, and the controlled switches corresponding to the energy storage segments not included in the target energy storage segment combination are set to the off state.
[0115] For example, assuming the switch matrix includes controlled switches SW1 to SW5 corresponding to energy storage sections S1 to S5 respectively, and the target energy storage section combination includes energy storage sections S1, S2 and S3, then SW1, SW2 and SW3 are determined as target controlled switches according to the one-to-one correspondence between energy storage sections and controlled switches, and corresponding switch control states are generated, where SW1, SW2 and SW3 are in the on state, and SW4 and SW5 are in the off state.
[0116] S452: Control the controlled switch corresponding to the target energy storage section combination to be turned on according to the switch control status, and control the controlled switch corresponding to the energy storage section not included in the target energy storage section combination to be turned off, so that each energy storage section in the target energy storage section combination can be selectively connected to the backup power bus.
[0117] Based on the switch control state generated by S451, a switch control signal is output to the switch matrix to control the controlled switches corresponding to each energy storage segment in the target energy storage segment combination to be turned on, so that the corresponding energy storage segment is connected to the backup power bus. At the same time, the controlled switches corresponding to the energy storage segments not included in the target energy storage segment combination are kept off, so that the unselected energy storage segments are kept disconnected from the backup power bus.
[0118] Through the above control method, only the target energy storage segment combination that meets the energy and voltage drop constraints in S30 participates in power outage retention, and the unselected energy storage segments do not participate in backup power supply, thereby keeping the energy storage segment selection result determined in S30 consistent with the energy storage segments actually put into operation in S40.
[0119] For example, if the target energy storage unit combination includes energy storage units S1, S2, and S3, control SW1, SW2, and SW3 to be simultaneously turned on, so that energy storage units S1, S2, and S3 are connected to the backup power bus; at the same time, control SW4 and SW5 to remain off, so that energy storage units S4 and S5 are not connected to the backup power bus. Thus, the backup power bus is only supplied with backup power by the target energy storage unit combination consisting of S1, S2, and S3.
[0120] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0121] In one embodiment, a power-loss protection system for an SSD is provided. The SSD includes a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array. This power-loss protection system corresponds one-to-one with the power-loss protection method for an SSD described in the previous embodiment. Figure 7 As shown, this SSD power-loss protection system includes a data acquisition module, an energy demand module, an energy storage segment determination module, and a power-loss protection module. Detailed descriptions of each functional module are as follows: The data acquisition module is used to acquire the energy storage characteristic measurement values of each energy storage segment in the segmented energy storage module of the SSD, and determine the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values. The energy demand module is used to determine the energy required for power-down protection based on the amount of data to be written back in the SSD's volatile cache, the pre-determined write-back bandwidth of the SSD during the power-down protection phase, and the peak power consumption. The energy storage section determination module is used to determine the corresponding upper limit of voltage drop based on the minimum allowable operating voltage of the backup power bus. By maintaining energy, the available energy of each energy storage section, and the voltage drop generated by the equivalent series resistance of each energy storage section, the target combination of energy storage sections that meets the upper limit of energy maintenance and voltage drop is determined. The power-down protection module is used to detect the input voltage of the SSD. When it is determined that the SSD is in a power-down confirmation state based on the input voltage, it controls the switch corresponding to the target energy storage segment combination in the preset switch matrix to be turned on, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array.
[0122] It should be noted that the information interaction and execution process between the above systems / modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0123] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0124] This application also provides a computer device, such as... Figure 8 As shown, the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments, or when the processor executes the computer program, it implements the functions of each module / unit in the above system embodiments.
[0125] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.
[0126] Those skilled in the art will understand that Figure 8 The computer device described is merely an example and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.
[0127] The aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0128] The memory can be an internal storage unit of the computer device, such as a hard drive or RAM. The memory can also be an external storage device of the computer device, such as a plug-in hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard. Furthermore, the memory can include both internal and external storage units of the computer device.
[0129] This application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0130] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0131] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0132] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0133] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0134] In the embodiments provided in this application, it should be understood that the disclosed systems / devices and methods can be implemented in other ways. For example, the system / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0136] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A power-loss protection method for SSDs, characterized in that, The SSD includes a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array. The power-loss protection method includes: Obtain the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determine the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values. Based on the amount of data to be written back in the SSD's volatile cache, the pre-determined write-back bandwidth of the SSD during the power-down protection phase, and the peak power consumption, determine the holding energy required for power-down protection; The upper limit of voltage drop is determined based on the minimum allowable operating voltage of the backup power bus. The target energy storage segment combination that satisfies the upper limit of voltage drop is determined by the holding energy, the available energy of each energy storage segment, and the voltage drop generated by the equivalent series resistance of each energy storage segment. The input voltage of the SSD is detected, and when it is determined that the SSD is in a power-down confirmation state based on the input voltage, the switch corresponding to the target energy storage segment combination in the preset switch matrix is turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controls the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array.
2. The SSD power-loss protection method as described in claim 1, characterized in that, The step of obtaining the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determining the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values, includes: The energy storage segment in the segmented energy storage module is connected to the charging circuit. After the energy storage segment is charged to a preset test voltage, the charging circuit is disconnected, and the energy storage segment is kept in the disconnected state for a preset resting time. After the settling time ends, a preset pulse load is applied to the energy storage section, and the discharge current of the energy storage section under the preset pulse load, the instantaneous voltage change before and after the application of the preset pulse load, and the voltage change within a preset discharge time window are obtained. The discharge current, the instantaneous voltage change, and the voltage change within the preset discharge time window are determined as the energy storage characteristic measurement values corresponding to the energy storage section. The equivalent series resistance of the energy storage section is determined based on the discharge current and the instantaneous voltage change in the measured energy storage characteristics, and the effective capacity of the energy storage section is determined based on the discharge current, the preset discharge time window, and the voltage change within the preset discharge time window in the measured energy storage characteristics. The available energy storage capacity of the energy storage segment is determined based on the effective capacity, the preset test voltage, the preset minimum operating voltage, and the preset energy utilization rate.
3. The SSD power-loss protection method as described in claim 1, characterized in that, The step of determining the holding energy required for power-loss protection based on the amount of data to be written back in the SSD's volatile cache, the pre-determined write-back bandwidth of the SSD during the power-loss protection phase, and the peak power consumption includes: The amount of data to be written back in the volatile cache is obtained, and the write-back bandwidth corresponding to the SSD writing the data to be written back to the NAND flash array during the power-down protection phase is obtained in advance. The data write-back time corresponding to the data to be written back is determined according to the amount of data to be written back and the write-back bandwidth. Obtain the controller termination time and preset protection margin corresponding to the SSD during the power-down protection phase, and determine the sum of the data write-back time, the controller termination time, and the preset protection margin as the hold time required for power-down protection. The peak power consumption of the SSD during the power-down protection phase is obtained in advance, and the holding energy required for the power-down protection is determined based on the peak power consumption and the holding time.
4. The SSD power-loss protection method as described in claim 3, characterized in that, The step of determining the target energy storage segment combination that satisfies the upper limit of the holding energy and the voltage drop by using the holding energy, the available energy of each of the energy storage segments, and the voltage drop generated by the equivalent series resistance of each of the energy storage segments includes: Based on the available energy storage capacity of each energy storage segment, multiple candidate energy storage segment combinations composed of different energy storage segments are determined, and the corresponding combined available energy storage capacity is determined based on the available energy storage capacity of each energy storage segment in each candidate energy storage segment combination. Obtain the operating current of each candidate energy storage segment combination corresponding to the predetermined operating current of each energy storage segment, and determine the equivalent series resistance voltage drop of each energy storage segment based on the equivalent series resistance of each energy storage segment and the corresponding operating current. Determine the combination voltage drop of the corresponding candidate energy storage segment combination based on the equivalent series resistance voltage drop of each energy storage segment. The candidate energy storage segment combination selected from the plurality of candidate energy storage segment combinations is the one whose available energy storage capacity is not less than the holding energy and whose voltage drop does not exceed the upper limit of the voltage drop.
5. The SSD power-loss protection method as described in claim 4, characterized in that, The steps of obtaining the operating current of each candidate energy storage segment corresponding to a predetermined combination of candidate energy storage segments, determining the equivalent series resistance voltage drop of each energy storage segment based on the equivalent series resistance of each energy storage segment and the corresponding operating current, and determining the combined voltage drop of the corresponding candidate energy storage segment combination based on the equivalent series resistance voltage drop of each energy storage segment include: Obtain the total power supply current of the SSD during the power failure protection phase, and determine the power supply allocation relationship corresponding to the candidate energy storage segment combination based on the power supply connection relationship of each energy storage segment in the candidate energy storage segment combination connected to the backup power bus. The operating current of each energy storage segment in the candidate energy storage segment combination is determined based on the total power supply current and the power supply distribution relationship. Multiply the operating current of the energy storage segment by the corresponding equivalent series resistance to obtain the equivalent series resistance voltage drop of the energy storage segment. Based on the equivalent series resistance voltage drop of each energy storage segment in the candidate energy storage segment combination and the power supply connection relationship between each energy storage segment in the candidate energy storage segment combination and the backup power bus, determine the combined voltage drop of the candidate energy storage segment combination at the backup power bus.
6. The SSD power-loss protection method as described in claim 1, characterized in that, The steps of detecting the input voltage of the SSD, and when determining that the SSD is in a power-down confirmation state based on the input voltage, controlling the switch corresponding to the target energy storage segment combination in a preset switch matrix to be turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controlling the data to be written back in the volatile cache and the SSD control metadata to be written to the NAND flash array, include: The input voltage of the SSD is obtained according to a preset sampling period, and the descent slope of the input voltage is determined based on the continuously sampled input voltage. When the input voltage is lower than a preset first voltage threshold and higher than a preset second voltage threshold, the SSD is determined to enter a power supply warning state when the descent slope does not reach a preset descent slope threshold. When it is determined that the SSD has entered a power supply warning state, unnecessary write operations on the SSD are suspended, and the target energy storage segment combination is pre-selected; When the input voltage is lower than the second voltage threshold, or when the input voltage is lower than the first voltage threshold and the drop slope reaches the preset drop slope threshold, the corresponding power supply abnormality state is debounced, and when the duration of the power supply abnormality state reaches the preset debounce time, the SSD is determined to be in a power failure confirmation state. When it is determined that the SSD is in a power failure confirmation state, the switch corresponding to the target energy storage segment combination in the preset switch matrix is turned on according to the target energy storage segment combination control, so that the target energy storage segment combination is connected to the backup power bus and provides holding power, and the holding power is used to write the data to be written back in the volatile cache and the SSD control metadata into the NAND flash array.
7. The SSD power-loss protection method as described in claim 6, characterized in that, The preset switch matrix includes controlled switches that correspond one-to-one with each energy storage segment in the segmented energy storage module. One end of each controlled switch is connected to the corresponding energy storage segment, and the other end is connected to the backup power bus. The step of controlling the switches in the preset switch matrix corresponding to the target energy storage segment combination to be turned on according to the target energy storage segment combination includes: Based on the energy storage segments in the target energy storage segment combination, determine the corresponding controlled switches in the switch matrix, and generate the switch control state corresponding to the target energy storage segment combination; According to the switch control state, the controlled switch corresponding to the target energy storage segment combination is turned on, and the controlled switch corresponding to the energy storage segment not included in the target energy storage segment combination is turned off.
8. A power-loss protected SSD, the power-loss protected SSD comprising a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array; in, The power-loss protected SSD uses the power-loss protection method for SSDs as described in any one of claims 1-7 for power-loss protection.
9. The power-loss protected SSD as described in claim 8, characterized in that, The segmented energy storage module includes at least two energy storage segments, each of which is connected to the backup power bus via a preset controlled switch.
10. A power-loss protection system for an SSD, characterized in that, The SSD includes a segmented energy storage module, a volatile cache, a backup power bus, and a NAND flash memory array. The power-loss protection system includes: The data acquisition module is used to acquire the energy storage characteristic measurement values corresponding to each energy storage segment in the segmented energy storage module of the SSD, and determine the equivalent series resistance and available energy storage of each energy storage segment based on the energy storage characteristic measurement values. The energy demand module is used to determine the holding energy required for power-down protection based on the amount of data to be written back in the volatile cache of the SSD, the pre-determined write-back bandwidth of the SSD during the power-down protection phase, and the peak power consumption. The energy storage section determination module is used to determine the corresponding upper limit of voltage drop based on the minimum allowable operating voltage of the backup power bus, and to determine the target energy storage section combination that meets the upper limit of voltage drop by using the holding energy, the available energy of each energy storage section and the voltage drop generated by the equivalent series resistance of each energy storage section. The power-down protection module is used to detect the input voltage of the SSD, and when it is determined that the SSD is in a power-down confirmation state based on the input voltage, it controls the switch corresponding to the target energy storage segment combination in the preset switch matrix to be turned on according to the target energy storage segment combination, so that the target energy storage segment combination provides holding power to the backup power bus of the SSD, and controls the data to be written back and the SSD control metadata in the volatile cache to be written to the NAND flash memory array.
11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the power-loss protection method for an SSD as described in any one of claims 1 to 7.
12. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the power-loss protection method for an SSD as described in any one of claims 1 to 7.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, enables the implementation of the steps of a power-loss protection method for an SSD as described in any one of claims 1 to 7.
