Power supply method, hard disk and computing device

The main control chip provides state-by-block power supply to multiple storage blocks of the hard disk, solving the high power consumption problem caused by continuous power supply of traditional hard disks and achieving energy saving and performance maintenance of the hard disk.

CN116126127BActive Publication Date: 2025-09-16XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310080392.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-11
Publication Date
2025-09-16
Estimated Expiration
2043-01-11

AI Technical Summary

Technical Problem

Traditional computing devices require continuous power supply when there are continuous read and write requests to the hard disk, resulting in high power consumption and inability to achieve effective energy saving.

Method used

The main control chip in the hard disk is used to power multiple storage blocks in different states, and the power supply power of the storage blocks in the enabled state and the energy-saving state is controlled separately. Only the storage blocks in the enabled state are powered normally, and the storage blocks in the energy-saving state are powered at low power or not at all.

Benefits of technology

The energy-saving effect of the hard disk is achieved, which avoids the continuous power supply to the entire hard disk and reduces the power consumption while maintaining the good performance and available capacity of the hard disk.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116126127B_ABST
    Figure CN116126127B_ABST
Patent Text Reader

Abstract

The present application discloses a power supply method, a hard disk, and a computing device, relating to the field of storage. The method can provide power to a block based on the status of multiple storage blocks in the hard disk, thereby reducing the power consumption of the hard disk and achieving energy conservation. The method is applied to a hard disk, which includes a main control chip and multiple storage blocks, each of which is connected to the main control chip. The method includes: obtaining the status of a first storage block; wherein the first storage block is any one of the multiple storage blocks; the status includes an enabled state or an energy-saving state; when the status of the first storage block is the enabled state, powering the first storage block according to the rated power; when the status of the first storage block is the energy-saving state, powering the first storage block according to the energy-saving power, or not powering the first storage block; the energy-saving power is lower than the rated power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage, and in particular to a power supply method, a hard disk, and a computing device. Background Art

[0002] With the rapid development of the digital economy and the gradual digital transformation of various industries, the scale of data centers has continued to grow in line with the increasing volume of business. When computing devices in a data center store, retrieve, and share digital information on their respective hard drives, each drive consumes relatively little power. However, when an entire data center has tens of thousands of hard drives, and these drives operate 24 / 7, power consumption becomes a significant cost.

[0003] Traditionally, a computing device controls the state of its hard drive by issuing commands to it. If the computing device has no read or write requests to the hard drive for a period of time, it will send a sleep command to the hard drive, powering it down to a low level to reduce power consumption. When a new read or write request arrives, the computing device will send a wake-up command to the hard drive and power it back on.

[0004] In this traditional method, the computing device issues instructions to the entire hard disk. If the computing device continues to have read and write requests, the hard disk needs to be continuously powered normally, which consumes a lot of power and cannot save energy. Summary of the Invention

[0005] The present application provides a power supply method, a hard disk, and a computing device, which can provide power in blocks based on the status of multiple storage blocks in the hard disk, reduce the power consumption of the hard disk, and achieve energy saving.

[0006] To achieve the above technical objectives, this application adopts the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a power supply method, which is applied to a hard disk, wherein the hard disk includes a main control chip and multiple storage blocks, each storage block is connected to the main control chip, and the method includes: obtaining the status of a first storage block; wherein the first storage block is any one of the multiple storage blocks; the status includes an enabled state or an energy-saving state; when the status of the first storage block is an enabled state, the first storage block is powered according to the rated power; when the status of the first storage block is an energy-saving state, the first storage block is powered according to the energy-saving power, or the first storage block is not powered; the energy-saving power is lower than the rated power.

[0008] It is understandable that during the use of the hard disk, all storage space will not be filled with data at one time. Therefore, the storage space of the hard disk can be divided into multiple storage blocks. The main control chip in the hard disk controls the power supply to multiple storage blocks in the hard disk according to the status of each storage block. Only the storage blocks in the enabled state are powered normally, and the storage blocks in the energy-saving state are powered at low power. This method can avoid continuous power supply to the entire hard disk, save power consumption, and achieve energy saving.

[0009] In one possible implementation, obtaining the status of the first storage block includes: the first storage block stores the status of multiple storage blocks, when the hard disk is powered on, the first storage block is powered on according to the rated power, and the status of the multiple storage blocks is obtained from the first storage block; the status of the multiple storage blocks includes the status of the first storage block; or, the hard disk includes a storage space, the storage space stores the status of multiple storage blocks, when the hard disk is powered on, the status of the multiple storage blocks is obtained from the storage space; the status of the multiple storage blocks includes the status of the first storage block.

[0010] It is understandable that in the first implementation described above, the first storage block is any storage block among multiple storage blocks, and the main control chip can obtain the status of multiple storage blocks at a time, including the status of the first storage block. This method does not require powering all storage blocks in sequence to obtain the status of each storage block, thereby improving the efficiency of obtaining the status of multiple storage blocks. At the same time, this implementation method is based on existing storage blocks and does not require changing the existing hard disk architecture, making it highly feasible. The second implementation method described above only requires storing the status of multiple storage blocks in the storage space, saving storage space for the storage blocks, allowing the hard disk to quickly obtain the status of multiple storage blocks, and the operation steps are simple.

[0011] In another possible implementation, the hard disk also includes a power supply module, and the main control chip controls the power supply provided by the power supply module to the first storage block through a chip select signal; supplying power to the first storage block according to the rated power includes: setting the level of the chip select signal to a high level, so that the power supplied by the power supply module to the first storage block is the rated power; supplying power to the first storage block according to energy-saving power, or not supplying power to the first storage block includes: setting the level of the chip select signal to a low level, so that the power supplied by the power supply module to the first storage block is energy-saving power, or not supplying power to the first storage block.

[0012] It is understandable that the chip select signal is a mature technical solution. By controlling the power supply to the first storage block through the level of the chip select signal, it is possible to quickly realize block power supply to multiple storage blocks, save power consumption, and achieve energy saving.

[0013] In another possible implementation, the storage block includes multiple storage particles.

[0014] It is understandable that the size and number of storage particles corresponding to the storage block are not limited. Generally, in order to facilitate the control and management of the main control chip, the storage block may include one or more die-sized storage particles.

[0015] In another possible implementation, the above method also includes: selecting a first target storage block and a second target storage block from multiple storage blocks; the first target storage block is: a storage block that is in an enabled state and has the highest degree of wear or is greater than or equal to a first threshold, and the second target storage block is: a storage block that is in an energy-saving state and has the lowest degree of wear or is less than or equal to a second threshold; the first threshold is greater than the second threshold; when the difference in the degree of wear between the first target storage block and the second target storage block is greater than or equal to a preset value, migrating the data stored in the first target storage block to other storage blocks in an enabled state among the multiple storage blocks; after the migration is completed, changing the state of the first target storage block to an energy-saving state, and powering the first target storage block according to the energy-saving power, or not powering the first target storage block.

[0016] It's understandable that when some storage blocks on a hard drive are in the active state, they can provide read and write services. During this process, these blocks will wear out more and more. To prevent this wear from affecting the overall hard drive performance, the data in these blocks is migrated to other blocks, and these blocks are no longer in use, thus maintaining good hard drive performance.

[0017] In another possible implementation, before migrating the data stored in the first target storage block to other storage blocks in an enabled state among the multiple storage blocks, the above method also includes: changing the state of the second target storage block to an enabled state, and supplying power to the second target storage block according to the rated power.

[0018] It is understood that the above method is a dynamic wear-leveling method. In this method, the less-worn memory block is moved from the energy-saving state to the enabled state, and data from the more-worn memory block can be migrated to this memory block. The less-worn memory block in the energy-saving state replaces the more-worn memory block in the enabled state, thereby maintaining the wear level difference between the memory blocks in the hard drive within a certain range. This method can maintain a balanced read and write count across the hard drive's memory blocks, thereby maintaining good hard drive performance.

[0019] In another possible implementation, the above method also includes: when the total remaining available capacity of storage blocks in an enabled state among multiple storage blocks is less than or equal to a first preset value, selecting a second target storage block from the storage blocks in an energy-saving state among the multiple storage blocks, changing the state of the second target storage block to an enabled state, and supplying power to the second target storage block according to the rated power; the second target storage block is: a storage block that is in an energy-saving state and has the lowest degree of wear or is less than or equal to a second threshold.

[0020] It is understood that in the above method, the main control chip dynamically expands the total remaining available capacity based on the size of the total remaining available capacity of the enabled storage blocks. When the total remaining available capacity is small, to avoid service stalls, the main control chip first wakes up the storage blocks with less wear among the energy-saving storage blocks and turns them into the enabled state. This method can ensure that when new services are available, the current total remaining available capacity can meet the operation requirements of the new services.

[0021] In another possible implementation, the above method also includes: when the total remaining available capacity of storage blocks in an enabled state among multiple storage blocks is greater than or equal to a second preset value, selecting a first target storage block from the storage blocks in an enabled state among the multiple storage blocks, and migrating the data stored in the first target storage block to other storage blocks in an enabled state among the multiple storage blocks; after the migration is completed, changing the state of the first target storage block to an energy-saving state, and supplying power to the first target storage block according to the energy-saving power, or not supplying power to the first target storage block; the first target storage block is: a storage block that is in an enabled state and has the highest degree of wear or is greater than or equal to a first threshold.

[0022] It is understood that in the above method, the main control chip dynamically reduces the total remaining available capacity based on the total remaining available capacity of the enabled memory blocks. When the total remaining available capacity is large, in order to save power, the main control chip changes the memory blocks with the highest degree of wear among the enabled memory blocks to an energy-saving state. This method can achieve a certain energy-saving effect.

[0023] In another possible implementation, the above-mentioned main control chip is also connected to a cache chip, which caches the physical location information of multiple storage blocks. The physical location information of the multiple storage blocks includes the channel number, chip select signal and capacity of each storage block in the hard disk; the main control chip selects each storage block according to the physical location information.

[0024] It is understandable that the main control chip caches the physical location information of multiple storage blocks by setting a cache chip in the hard disk, and the main control chip can quickly read the location information of each storage block.

[0025] In another possible implementation, the method further includes: when the first storage block is in an enabled state and the main control chip detects that the enabled first storage block fails, stopping power supply to the enabled first storage block.

[0026] It is understandable that the main control chip stops supplying power to the first storage block that fails in the enabled state, which can save power consumption of the hard disk and achieve energy saving.

[0027] In a second aspect, an embodiment of the present application provides a control device, such as a main control chip in a hard disk, wherein the control device is applied to various modules of the power supply method of the first aspect or any possible implementation of the first aspect.

[0028] In a third aspect, an embodiment of the present application provides a hard disk, comprising a main control chip and multiple storage blocks; the main control chip is connected to the multiple storage blocks; the main control chip is used to supply power to the first storage block based on the state of the first storage block; the state includes an enabled state or an energy-saving state; the first storage block is any one of the multiple storage blocks; when the state of the first storage block is the enabled state, the first storage block is supplied with power according to the rated power; when the state of the first storage block is the energy-saving state, the first storage block is supplied with power according to the energy-saving power, or the first storage block is not supplied with power; the energy-saving power is lower than the rated power.

[0029] In one possible implementation, the hard disk further includes a cache chip; the cache chip is used to cache physical location information of multiple storage blocks, where the physical location information of the multiple storage blocks includes the channel number, chip select signal, and capacity of each storage block in the hard disk; the main control chip selects each storage block based on the physical location information.

[0030] In a fourth aspect, an embodiment of the present application provides a computing device, comprising a main board, a hard disk backplane, and a hard disk; the main board and the hard disk are connected through the hard disk backplane, the hard disk comprises a main control chip and multiple storage blocks, and each storage block is connected to the main control chip; the hard disk is used to obtain the status of a first storage block; wherein the first storage block is any one of the multiple storage blocks; the status comprises an enabled state or an energy-saving state; when the status of the first storage block is an enabled state, the first storage block is powered at rated power; when the status of the first storage block is an energy-saving state, the first storage block is powered at energy-saving power, or the first storage block is not powered; the energy-saving power is lower than the rated power.

[0031] In a fifth aspect, embodiments of the present application provide a control device comprising a memory and a processor. The memory and the processor are coupled; the memory is configured to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the control device performs the power supply method of the first aspect and any possible implementation thereof.

[0032] In a sixth aspect, the present application provides a computer-readable storage medium comprising computer instructions, wherein when the computer instructions are executed on a control device, the control device executes the power supply method of the first aspect and any possible implementation thereof.

[0033] In a seventh aspect, the present application provides a computer program product comprising computer instructions, wherein when the computer instructions are executed on a control device, the control device is caused to execute the power supply method of the first aspect and any possible implementation thereof.

[0034] For the specific descriptions of the second to seventh aspects and their various implementations in this application, reference can be made to the detailed descriptions in the first aspect and its various implementations; and for the beneficial effects of the second to seventh aspects and their various implementations, reference can be made to the analysis of the beneficial effects in the first aspect and its various implementations, which will not be repeated here.

[0035] These and other aspects of the present application will become more readily apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a hard disk structure involved in the power supply method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the structure of a memory chip provided in an embodiment of the present application;

[0038] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0039] Figure 4 A flow chart of a power supply method provided in an embodiment of the present application;

[0040] Figure 5 A flow chart of a dynamic wear leveling method provided in an embodiment of the present application;

[0041] Figure 6 A flow chart of a dynamic scaling method provided in an embodiment of the present application;

[0042] Figure 7 A schematic structural diagram of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In the following, the terms "first," "second," and "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Thus, a feature designated as "first," "second," or "third," etc., may explicitly or implicitly include one or more of the features.

[0044] In traditional technology, a computing device controls the state of the hard drive by issuing commands to the hard drive within the computing device. If the computing device has no read or write requests to the hard drive for a period of time, it will send a sleep command to the hard drive and power it to a low level, thereby reducing power consumption. When a new read or write request is received, the computing device will send a wake-up command to the hard drive and power it back to normal. Because this traditional method issues commands to the entire hard drive, if the computing device continues to receive read or write requests, the hard drive must continue to be powered normally, resulting in high power consumption and a lack of energy conservation.

[0045] Based on this, an embodiment of the present application provides a power supply method, which is applied to a hard disk drive's main control chip. In this method, the main control chip can separately control multiple storage blocks in the hard disk. Specifically, for any storage block, when the storage block is in the enabled state, the storage block is powered at the rated power; when the storage block is in the energy-saving state, the storage block is powered at the energy-saving power, or no power is supplied to the storage block.

[0046] It is understandable that during the use of the hard disk, all storage space will not be filled with data at one time. Therefore, the storage space of the hard disk can be divided into multiple storage blocks. The main control chip in the hard disk controls the power supply to multiple storage blocks in the hard disk according to the status of each storage block. Only the storage blocks in the enabled state are powered normally, and the storage blocks in the energy-saving state are powered at low power or not powered at all. This method can avoid continuous power supply to the entire hard disk, save power consumption, and achieve energy saving.

[0047] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0048] Please refer to Figure 1 , which shows a schematic diagram of a hard disk structure involved in the power supply method provided in the embodiment of the present application. Figure 1 As shown, the hard disk 100 may include: a hard disk connector 110, a main control chip 120, a storage chip 130, and a cache chip 140 (optional).

[0049] The hard disk 100 is a hard disk made of a solid-state electronic storage chip array, such as a solid-state hard disk.

[0050] The hard disk connector 110 is used to provide an interface externally and to connect to the main control chip 120 internally. The hard disk connector 110 is used to be electrically connected to the motherboard of the computing device to achieve communication with the motherboard.

[0051] The main control chip 120 is the core component in the hard disk, which plays the role of command, operation and collaboration. Exemplarily, the main control chip 120 is a system-on-chip (SOC), which can be based on a high-performance reduced instruction set machine (advanced RISC machines, ARM) architecture, or a reduced instruction set computer (RISC) architecture, which has a computing power similar to a central processing unit (CPU) level. In an embodiment of the present application, the main control chip 120 is used to control the state (including enabled state and energy-saving state) and power supply of each storage block 131, as well as control data reading, writing and migration. Optionally, the main control chip 120 is also connected to a cache chip 140.

[0052] The memory chip 130 is a chip obtained by packaging the memory particles in the hard disk. The hard disk contains multiple memory chips 130. Figure 2 , Figure 2 FIG. 1 shows a schematic structural diagram of the memory chip 130 .

[0053] The hard disk is packaged with multiple memory chips 130. The memory chips 130 may include memory particles of multiple die granularities (e.g., NAND flash memory particles). The main control chip 120 may select the memory particles of each die granularity through the chip select signal (chip enable, CE). The memory chip 130 also includes memory particles of plane granularity, memory particles of block granularity, memory particles of page granularity, and memory particles of smaller granularity. The relationship between die and plane, block, and page includes: each die includes multiple planes; each plane includes multiple blocks, each block is the smallest unit for flash memory to clear data; each block includes multiple pages, and page is the smallest unit for flash memory to read and write.

[0054] In a possible implementation, the storage block 131 is obtained by grouping storage particles of multiple die granularities included in the storage chip 130. Figure 2 The structure of the memory chip 130 shown is that the memory chip 130 is obtained by encapsulating memory particles of one or more die granularities. Therefore, the memory block 131 can include one or more memory chips 130, or the memory block 131 can include part of the space in the memory chip 130.

[0055] In practice, the memory block 131 may include memory particles with a finer or coarser granularity than the die granularity. For example, the memory block 131 may include memory particles with a plurality of plane granularities.

[0056] like Figure 2 As shown, the main control chip 120 can connect and control the power supply of multiple storage blocks 131 through channels (channel, CH) and chip enable (chip enable, CE).

[0057] Optionally, the hard disk further includes a power supply module 150, which is a hardware structure capable of providing power to the multiple storage blocks 131. The power supply module 150 can be integrated into the main control chip 120 or independently provided outside the main control chip 120, electrically connected to the main control chip 120 and the multiple storage blocks 131. The main control chip 120 can control the power provided by the power supply module 150 to each storage block 131 through a chip select signal.

[0058] In one possible implementation, when the chip select signal level is set to a high level, the power supplied by the power supply module is the rated power; when the chip select signal level is set to a low level, the power supplied by the power supply module is energy-saving power or no power is supplied. For example, for the storage block CH1-CE1, the main control chip 120 sets the chip select signal of CH1-CE1 to CE1-1, and sends the level value of the chip select signal to the power supply module to control the power supply module to supply power to the CH1-CE1 storage block according to the rated power; or, the main control chip 120 sets the chip select signal of CH1-CE1 to CE1-0, and sends the level value of the chip select signal to the power supply module to control the power supply module to supply power to the CH1-CE1 storage block according to the energy-saving power, or not supply power to the CH1-CE1 storage block.

[0059] In another possible implementation, the chip select signal circuit is integrated with the power supply circuit of the power supply module. When the main control chip 120 sets the chip select signal level to a high level, the power supplied by the power supply module 150 is the rated power. When the main control chip 120 sets the chip select signal level to a low level, the power supplied by the power supply module 150 is the energy-saving power or no power is supplied. For example, for the storage block CH1-CE1, when the main control chip 120 sets the chip select signal of CH1-CE1 to CE1-1, the power supply module 150 automatically supplies power to the CH1-CE1 storage block at the rated power. When the main control chip 120 sets the chip select signal of CH1-CE1 to CE1-0, the power supply module 150 automatically supplies power to the CH1-CE1 storage block at the rated power or no power is supplied to the CH1-CE1 storage block.

[0060] The above is only a possible implementation method of the main control chip 120 controlling the power supply module 150 to provide power to the multiple storage blocks 131 according to the embodiment of the present application, and the actual implementation is not limited thereto.

[0061] Cache chip 140 serves as a temporary data storage buffer when the hard drive reads and writes data, thereby accelerating the hard drive's data read and write speeds. In embodiments of the present application, the cache chip can be used to cache the physical location information, status, wear level, and / or flash translation layer (FTL) table of multiple storage blocks. The physical location information of multiple storage blocks includes each storage block's channel number, chip select signal, and capacity on the hard drive. Generally, the above-mentioned physical location information, status, wear level, and / or FTL table can also be stored in a designated storage space, such as within each storage block. After the hard drive is powered on, the main control chip loads this information from any storage block into the cache chip to facilitate reading and updating this information. Before the hard drive is powered off, this information is updated in cache chip 140 and then synchronously stored in the designated storage space. Of course, the hard drive may also include non-volatile memory, which can be located within the main control chip or externally and electrically connected to the main control chip. The designated storage space can also be non-volatile memory.

[0062] Exemplarily, the cache chip 140 may be a dynamic random access memory (DRAM).

[0063] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a computing device provided in an embodiment of the present application. The computing device includes: a motherboard, a hard disk backplane, and a hard disk. The motherboard and the hard disk are connected via the hard disk backplane. The hard disk can be Figure 1 The hard disk 100 shown. The number of hard disks in the computing device can be one or more, and the embodiment of the present application does not limit the number of hard disks included in the computing device.

[0064] The following describes the power supply method provided in the embodiment of the present application:

[0065] Please refer to Figure 4 , is a flow chart of a power supply method provided by an embodiment of the present application. The method is applied to the main control chip of the hard disk, and the main control chip is connected to multiple storage blocks in the hard disk. The multiple storage blocks can be all or part of the storage blocks in the hard disk. Figure 4 As shown, the method may include S101-S104.

[0066] S101: The hard disk is powered on, and the main control chip obtains the status of the first storage block.

[0067] The first storage block is any one of the multiple storage blocks; and the state includes an enabled state or a power-saving state.

[0068] When the state of the first storage block is enabled, executing S102;

[0069] When the state of the first storage block is the energy-saving state, S104 is executed.

[0070] The enabled state indicates that the storage block is enabled and can provide normal read and write services; the energy-saving state indicates that the storage block is disabled or dormant and cannot provide normal read and write services.

[0071] The information on the state of the first storage block may be stored in any storage block, or in a main control chip.

[0072] In one possible implementation, the first storage block stores the status of multiple storage blocks. When the hard disk is powered on, the first storage block is powered according to the rated power, and the status of the multiple storage blocks is obtained from the first storage block; the status of the multiple storage blocks includes the status of the first storage block.

[0073] In the above implementation, the first storage block is any one of the multiple storage blocks. The main control chip can obtain the status of multiple storage blocks, including the first storage block, at once. This method eliminates the need to power all storage blocks sequentially to obtain the status of each storage block, thereby improving the efficiency of obtaining the status of multiple storage blocks. Furthermore, this implementation relies on existing storage blocks and does not require changes to the existing hard drive architecture, making it highly feasible.

[0074] In another possible implementation, the hard disk includes a storage space, such as a non-volatile memory chip. The storage space can be set inside the main control chip or outside the main control chip, and is electrically connected to the main control chip. The storage space is used to store the status of multiple storage blocks. When the hard disk is powered on, the status of the multiple storage blocks is obtained from the storage space; the status of the multiple storage blocks includes the status of the first storage block.

[0075] The above implementation method only needs to save the status of multiple storage blocks in the storage space, saving storage space of the storage blocks, allowing the hard disk to quickly obtain the status of multiple storage blocks, and the operation steps are simple.

[0076] The status of multiple storage blocks is set differently depending on whether the hard disk is powered on for the first time.

[0077] In one implementation, when the hard disk is powered on for the first time, the states of multiple storage blocks in the hard disk are preset states, wherein the states of some storage blocks are enabled and the states of other storage blocks are energy-saving.

[0078] During hard drive initialization, some memory blocks are preset to an enabled state, while others are preset to a power-saving state. This preset state can be stored in a designated space within each memory block or in the memory space of the main control chip. This preset state ensures that some memory blocks provide normal read and write services while others conserve power.

[0079] In another implementation, when the hard disk is not powered on for the first time, the states of the multiple storage blocks in the hard disk are the states saved before the last power-off.

[0080] During use, the main control chip adjusts the status of each storage block based on actual usage and saves the current status of each storage block before powering off. When the hard drive is powered on again, the main control chip can continue to supply power to each storage block based on the previous status.

[0081] S102: The main control chip supplies power to the first storage block according to the rated power.

[0082] The rated power is the power that enables the first storage block to operate normally (ie, provide normal read and write services). The rated power may be a power preset based on the capacity of the first storage block.

[0083] In one possible implementation, the hard disk further includes a power supply module, and the main control chip controls the power supply provided by the power supply module to the first storage block via a chip select signal. For example, the main control chip sets the chip select signal level to a high level so that the power supplied by the power supply module to the first storage block is rated power.

[0084] The chip select signal is a mature technical solution. The power supplied by the power supply module to the first storage block is controlled by the level of the chip select signal. It can quickly realize block power supply to multiple storage blocks, save power consumption and achieve energy saving.

[0085] Optionally, in an enabled state, the first storage block can provide data read and write services.

[0086] For example, an FTL table is stored in the hard disk. The FTL table is a correspondence conversion table maintained inside the hard disk between a logical address (LBA) and the physical address of the storage space inside the actual hard disk. The main control chip uses this table to control the physical space where the data to be read and written is actually stored in the first storage block.

[0087] S103 (optional): When the state of the first storage block is enabled, and the main control chip detects that the enabled first storage block fails, the main control chip stops supplying power to the enabled first storage block.

[0088] In this case, the main control chip can stop supplying power to the first storage block that fails in the enabled state to achieve energy saving, and can change the state of the first storage block that fails to a failed state.

[0089] The fault status indicates that a memory block in this state is faulty and will no longer participate in normal read and write operations. Setting the fault status prevents the main control chip from selecting a faulty memory block, reducing computing resource waste. It also indicates which memory block is faulty, allowing staff to take timely repair measures.

[0090] After executing S103 , the process of supplying power to the first storage block ends.

[0091] S104: The main control chip supplies power to the first storage block according to the energy-saving power, or does not supply power to the first storage block.

[0092] When the main control chip supplies power to the first storage block according to the energy-saving power, or does not supply power to the first storage block, the first storage block enters the energy-saving state.

[0093] The energy-saving power is power that can put the first storage block into sleep mode, and the energy-saving power is lower than the rated power.

[0094] If the main control chip does not supply power to the first storage block, the first storage block is shut down. The difference between sleep and shut down is that the main control chip can wake up the sleep storage block faster and make it enter the started state.

[0095] In one possible implementation, the hard disk further includes a power supply module, and the main control chip controls the power provided by the power supply module to the first storage block via a chip select signal. For example, the main control chip sets the chip select signal level to a low level so that the power provided by the power supply module to the first storage block is energy-saving power, or the power supply to the first storage block is not provided to the storage block.

[0096] The first storage block in the energy-saving state is powered according to the energy-saving power, or when no power is supplied, the storage block does not provide data reading and writing services. In this case, the storage block can save the overall power consumption of the hard disk.

[0097] An embodiment of the present application provides a power supply method. In this method, since the hard disk will not fill all the storage space with data at once during use, the storage space of the hard disk can be divided into multiple storage blocks. The main control chip in the hard disk controls the power supply to the multiple storage blocks in the hard disk according to the status of each storage block, only normally supplies power to the storage blocks in the enabled state, and supplies low power to the storage blocks in the energy-saving state. This method can avoid continuous power supply to the entire hard disk, save power consumption, and achieve energy saving.

[0098] Please refer to Figure 5 , Figure 5A flow chart of a dynamic wear balancing method provided in an embodiment of the present application is shown in FIG. Figure 4 After the hard disk is powered on for a period of time, the main control chip can execute the Figure 5 The steps shown, Figure 5 The steps shown include S201-S206.

[0099] S201: The main control chip obtains the wear levels of multiple storage blocks.

[0100] The degree of wear is used to characterize the lifespan of a memory block. This degree of wear can be expressed as the total number of times a memory block has been worn. The wear count is the number of times data has been cleared from the memory block. Each time any storage space (e.g., a block) in the memory block is cleared, the total number of wear counts for that memory block accumulates. The higher the degree of wear of a memory block, the shorter its lifespan.

[0101] In the current method, the wear levels of the plurality of storage blocks are stored in a designated storage space, and the main control chip obtains the wear levels of the plurality of storage blocks from the designated storage space.

[0102] S202: The main control chip selects a first target storage block and a second target storage block from a plurality of storage blocks.

[0103] The first target storage block is: a storage block that is in an enabled state and has the highest degree of wear or is greater than or equal to a first threshold; the second target storage block is: a storage block that is in an energy-saving state and has the lowest degree of wear or is less than or equal to a second threshold; the first threshold is greater than the second threshold.

[0104] In one example, the main control chip selects a first target storage block with the highest wear level in the enabled state and a second target storage block with the lowest wear level in the energy-saving state from the wear levels of multiple storage blocks stored in the designated storage space.

[0105] In this example, the number of first target storage blocks and second target storage blocks is generally one each. If there are multiple first target storage blocks with the highest degree of wear or multiple second target storage blocks with the lowest degree of wear, then one first target storage block or one second target storage block is arbitrarily selected from the multiple first target storage blocks or the multiple second target storage blocks. Selecting the storage blocks with the highest degree of wear or the lowest degree of wear facilitates subsequent dynamic wear balancing at minimal cost, thus conserving computing resources.

[0106] In another example, the main control chip selects a first target storage block whose wear level is greater than or equal to a first threshold in the enabled state and a second target storage block whose wear level is less than or equal to a second threshold in the energy saving state from the wear levels of multiple storage blocks stored in the designated storage space.

[0107] In this example, there may be multiple first target storage blocks and multiple second target storage blocks respectively. By selecting the first target storage block and the second target storage block by this method, more storage blocks whose wear levels reach a certain threshold can be put into energy-saving state, making the wear levels of each storage block more balanced, thereby allowing the hard disk to maintain better performance.

[0108] S203: The main control chip determines whether the difference between the wear levels of the first target storage block and the second target storage block is greater than or equal to a preset value.

[0109] If yes, execute S204;

[0110] If not, this process ends.

[0111] The preset value is a value pre-set in the hard disk. The preset value can be customized based on the capacity of the storage block. The larger the capacity of the storage block, the greater the degree of wear it can accept. In this case, the preset value set based on the storage block with the larger capacity is also larger; the smaller the capacity of the storage block, the less acceptable degree of wear it can accept. In this case, the preset value set based on the storage block with the smaller capacity will be smaller than the preset value set for the storage block with the larger capacity.

[0112] The first target storage block is a storage block with a higher degree of wear among the storage blocks in the started state, and the second target storage block is a storage block with a lower degree of wear in the energy-saving state. When the difference in the degree of wear between the first target storage block and the second target storage block is greater than a preset value, it means that the degree of wear between the first target storage block and the second target storage is significantly different.

[0113] When there are multiple first target storage blocks and multiple second target storage blocks, if the difference in wear between any one of the first target storage blocks and any one of the second target storage blocks is greater than or equal to a preset value, the condition of S202 is considered to be satisfied. In other words, as long as the difference in wear between the first target storage block and the second target storage block is greater than or equal to the preset value, S203 can be executed.

[0114] S204: The main control chip changes the state of the second target storage block to an enabled state, and supplies power to the second target storage block according to the rated power.

[0115] S205: The main control chip migrates the data stored in the first target storage block to other storage blocks in the multiple storage blocks that are in an enabled state.

[0116] Optionally, before the main control chip migrates the data stored in the first target storage block to another enabled storage block among the multiple storage blocks, the main control chip can change the status of the first target storage block to a disabled state. Disabled indicates that the storage block is currently undergoing data migration and does not provide read or write services. The disabled state is a transitional state. When other processes in the main control chip detect that the storage block is disabled, data is not read or written to the storage block. This method can effectively prevent other processes in the main control chip from reading or writing data to the storage block, reducing data read and write errors.

[0117] S206: After the migration is completed, the main control chip changes the state of the first target storage block to the energy-saving state, and supplies power to the first target storage block according to the energy-saving power, or does not supply power to the first target storage block.

[0118] S204 can be executed before S205, after S206, or simultaneously with S205. The present embodiment does not limit the order in which S204 is executed, whether before or after S205 and S206. Generally, executing S204 before S205 is more optimal. In this case, when data migration is performed in S205, the data can be migrated to the second target storage block in S204.

[0119] Figure 5 The steps shown are a dynamic wear balancing method provided by an embodiment of the present application. When a portion of the storage blocks in the hard disk is in the enabled state, the portion of the storage blocks can provide read and write services. During the read and write process, the wear degree of the portion of the storage blocks will become increasingly higher. In order to avoid the wear degree of a portion of the storage blocks becoming increasingly higher while the other portion of the storage blocks are not used, the embodiment of the present application provides a method for dynamic wear balancing. Figure 5 The dynamic wear leveling method shown replaces heavily worn blocks in the active state with less-worn blocks in the energy-saving state, keeping the wear levels of each block within a certain range. This method balances the read and write times across each block, maintaining optimal hard drive performance.

[0120] In some embodiments, the dynamic wear leveling method provided in the embodiments of the present application may be executed after the above-mentioned power supply method, or may be executed together with the above-mentioned power supply method at the same time.

[0121] The following is an example of the present application based on Figure 4 The method shown provides a dynamic scaling method. In other words, Figure 4 The power supply method shown may also include a dynamic expansion and contraction method, such as Figure 6 As shown, Figure 6 A flow chart of a dynamic scaling method provided in an embodiment of the present application, the dynamic scaling method includes S301-S305.

[0122] S301: The main control chip obtains the total remaining available capacity of the memory blocks in the enabled state among the multiple memory blocks.

[0123] The remaining available capacity is the remaining available capacity of each storage block, and the total remaining available capacity is the sum of the remaining available capacities of storage blocks in an enabled state among the multiple storage blocks.

[0124] S302: The main control chip determines whether the total remaining available capacity of the memory blocks in the enabled state among the multiple memory blocks is less than or equal to a first preset value, or whether it is greater than or equal to a second preset value.

[0125] The first preset value is smaller than the second preset value.

[0126] When the total remaining available capacity of the enabled storage blocks among the multiple storage blocks is greater than or equal to the second preset value, it indicates that the total remaining available capacity of the enabled storage blocks is large and can be reduced, and S303 is executed.

[0127] When the total remaining available capacity of the enabled storage blocks among the multiple storage blocks is less than or equal to the first preset value, it indicates that the total remaining available capacity of the enabled storage blocks is small and can be expanded, and S304 is executed.

[0128] When the total remaining available capacity of the enabled storage blocks among the multiple storage blocks is greater than the first preset value and less than the second preset value, it means that the total remaining available capacity of the enabled storage blocks is moderate, and expansion or contraction is not required, and this process ends.

[0129] S303: The main control chip selects a second target storage block from the storage blocks in the energy-saving state among the multiple storage blocks, changes the state of the second target storage block to the enabled state, and supplies power to the second target storage block according to the rated power.

[0130] The second target storage block is a storage block that is in an energy-saving state and has the lowest wear level or is less than or equal to a second threshold.

[0131] In one example, the main control chip selects a second target storage block with the lowest wear level in the energy-saving state or a wear level less than or equal to a second threshold from the wear levels of multiple storage blocks stored in the designated storage space.

[0132] After executing S303, this process ends.

[0133] S304: The main control chip selects a first target storage block from the storage blocks in the enabled state among the multiple storage blocks, and migrates the data stored in the first target storage block to other storage blocks in the enabled state among the multiple storage blocks.

[0134] The first target storage block is a storage block that is in an enabled state and has the highest wear level or is greater than or equal to a first threshold.

[0135] In one example, the main control chip selects a first target storage block with the highest wear level in an enabled state or a wear level greater than or equal to a first threshold from the wear levels of multiple storage blocks stored in the designated storage space.

[0136] For detailed description of S304, please refer to S205.

[0137] S305: After the migration is completed, the main control chip changes the state of the first target storage block to the energy-saving state, and supplies power to the first target storage block according to the energy-saving power, or does not supply power to the first target storage block.

[0138] The first target storage block is a storage block that is in an enabled state and has the highest wear level or is greater than or equal to a first threshold.

[0139] above Figure 6 In the method shown, the main control chip can monitor the size of the total remaining available capacity of the enabled storage blocks in real time. When the situation S302 occurs, the total remaining available capacity of the enabled storage blocks is dynamically adjusted until the total remaining available capacity of the enabled storage blocks is between the first preset value and the second preset value.

[0140] Figure 6 The steps shown are a dynamic expansion and contraction method provided by an embodiment of the present application. In this method, the main control chip dynamically expands or contracts the total remaining available capacity based on the size of the total remaining available capacity of the storage blocks in the enabled state. When the total remaining available capacity is small, in order to avoid business jams, the main control chip first wakes up the storage blocks with less wear in the energy-saving state and changes them to the enabled state. This method can ensure that when there is a new business, the current total remaining available capacity can meet the operating requirements of the new business. When the total remaining available capacity is large, in order to save power consumption, the main control chip changes the storage blocks with greater wear in the enabled state to the energy-saving state. This method can achieve a certain energy-saving effect.

[0141] Optional, Figure 4 、 Figure 5 and Figure 6 The hard drive shown also includes a cache chip, which is connected to the main control chip. The cache chip stores the physical location information of multiple storage blocks. The main control chip selects each storage block and controls the power supply to each storage block based on the physical location information cached in the cache chip.

[0142] Further optionally, when the storage block includes one or more die-sized storage particles, the physical location information includes the hard disk channel number, chip select signal, and capacity of each storage block. For example, if the first storage block includes a die with hard disk channel number CH1, chip select signals CE1 and CE2, and capacities of 32GB, the physical location information of the first storage block is: CH1-CE1-32G, CH1-CE2-32G.

[0143] Since the size and number of storage particles corresponding to the above-mentioned storage blocks are not limited, the above-mentioned physical location information can include more or less information. The embodiments of the present application do not limit the specific content included in the physical location information. Generally, in order to facilitate the control and management of the main control chip, the storage block includes storage particles of one or more die granularity.

[0144] The capacity of each of the above-mentioned storage blocks can be the same or different. Generally, in order to facilitate the control and management of the main control chip, the capacity of each storage block is usually set to the same size.

[0145] The cache chip can also cache the status and wear levels of multiple memory blocks. The main control chip loads the status and wear levels of multiple memory blocks stored in any memory block into the cache, facilitating faster reading and updating of the status and wear levels of each memory block.

[0146] In one example, as shown in Table 1, Table 1 shows the physical location information, status, and wear level of multiple memory blocks cached in a cache chip. Table 1 includes "memory block," "physical location information," "status," and "wear level." The "wear level" is represented by the total number of wear events on the memory block.

[0147] Table 1

[0148]

[0149] When the main control chip reads and writes data to each storage block, it dynamically updates the status and wear level of each storage block in Table 1 based on the actual usage of each storage block. When the hard disk is powered off, the main control chip persists the data in Table 1 cached in the cache chip in the designated space of each enabled storage block so that the data in Table 1 can be read the next time the hard disk is powered on.

[0150] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed herein, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0151] The embodiment of the present application further provides a control device 200, for example Figure 1 The main control chip in the Figure 7 , which is a structural diagram of a control device 200 provided in an embodiment of the present application.

[0152] The control device 200 includes: an acquisition unit 201, which is used to acquire the state of the first storage block; wherein the first storage block is any one of the multiple storage blocks; the state includes an enabled state or an energy-saving state; when the state of the first storage block is the enabled state, the power supply unit 202 is used to supply power to the first storage block according to the rated power; when the state of the first storage block is the energy-saving state, the power supply unit 202 is used to supply power to the first storage block according to the energy-saving power, or not to supply power to the first storage block; the energy-saving power is lower than the rated power. For example, in combination Figure 4 The acquisition unit 201 is used in S101 in the method embodiment, and the power supply unit 202 is used in S102 or S104 in the method embodiment.

[0153] Optionally, the acquisition unit 201 is specifically configured to: store the states of multiple storage blocks in a first storage block; when the hard disk is powered on, power the first storage block according to the rated power, and acquire the states of the multiple storage blocks from the first storage block; the states of the multiple storage blocks include the state of the first storage block; or, the hard disk includes a storage space, the states of multiple storage blocks are stored in the storage space, and when the hard disk is powered on, acquire the states of the multiple storage blocks from the storage space; the states of the multiple storage blocks include the state of the first storage block. For example, the acquisition unit 201 is used in S101 in the method embodiment.

[0154] Optionally, the hard disk further includes a power supply module, and the main control chip controls the power supply provided by the power supply module to the first storage block through a chip select signal. The power supply unit 202 is specifically configured to set the level of the chip select signal to a high level so that the power supplied to the first storage block by the power supply module is rated power. The power supply unit 202 is specifically configured to set the level of the chip select signal to a low level so that the power supplied to the first storage block by the power supply module is energy-saving power, or to not supply power to the first storage block. For example, the power supply unit 202 is used in S102 or S104 in the method embodiment.

[0155] Optionally, the storage block includes multiple storage particles.

[0156] Optionally, the control device 200 further includes a selection unit 203 for selecting a first target storage block and a second target storage block from a plurality of storage blocks; the first target storage block is: a storage block in an enabled state and having the highest degree of wear or being greater than or equal to a first threshold, and the second target storage block is: a storage block in an energy-saving state and having the lowest degree of wear or being less than or equal to a second threshold; the first threshold is greater than the second threshold; the control device 200 further includes a migration unit 204 for migrating the data stored in the first target storage block to other storage blocks in an enabled state among the plurality of storage blocks when the difference in degree of wear between the first target storage block and the second target storage block is greater than or equal to a preset value; the power supply unit 202 is further used to, after the migration is completed, change the state of the first target storage block to an energy-saving state, and supply power to the first target storage block according to the energy-saving power, or not supply power to the first target storage block. For example, in combination Figure 5 The selection unit 203 is used in S202 of the method embodiment, the migration unit 204 is used in S205 of the method embodiment, and the power supply unit 202 is used in S206 of the method embodiment.

[0157] Optionally, the power supply unit 202 is further configured to change the state of the second target storage block to an enabled state and supply power to the second target storage block according to the rated power before migrating the data stored in the first target storage block to other storage blocks in the enabled state among the plurality of storage blocks. Figure 5 The power supply unit 202 is used in S204 in the method embodiment.

[0158] Optionally, the selection unit 203 is further configured to, when the total remaining available capacity of the storage blocks in the enabled state among the multiple storage blocks is less than or equal to a first preset value, select a second target storage block from the storage blocks in the energy-saving state among the multiple storage blocks, and the power supply unit 202 is further configured to change the state of the second target storage block to the enabled state and supply power to the second target storage block according to the rated power; the second target storage block is: a storage block in the energy-saving state with the lowest degree of wear or less than or equal to a second threshold. For example, in combination Figure 6The selection unit 203 is used for S303 in the method embodiment, and the power supply unit 202 is used for S303 in the method embodiment.

[0159] Optionally, the selection unit 203 is further used to select a first target storage block from the storage blocks in the enabled state among the multiple storage blocks when the total remaining available capacity of the storage blocks in the enabled state among the multiple storage blocks is greater than or equal to a second preset value, and the migration unit 204 is further used to migrate the data stored in the first target storage block to other storage blocks in the enabled state among the multiple storage blocks; the power supply unit 202 is further used to, after the migration is completed, change the state of the first target storage block to an energy-saving state, and supply power to the first target storage block according to the energy-saving power, or not supply power to the first target storage block; the first target storage block is: a storage block in the enabled state and with the highest degree of wear or a degree greater than or equal to a first threshold. For example, in combination Figure 6 The selection unit 203 is used in S304 of the method embodiment, the migration unit 204 is used in S304 of the method embodiment, and the power supply unit 202 is used in S305 of the method embodiment.

[0160] Optionally, the control device 200 is also connected to a cache chip, which caches the physical location information of multiple storage blocks. The physical location information of the multiple storage blocks includes the channel number, chip select signal and capacity of each storage block in the hard disk; the control device 200 selects each storage block according to the physical location information.

[0161] Optionally, the power supply unit 202 is further configured to stop supplying power to the first storage block in the enabled state when the first storage block is in the enabled state and the control device 200 detects that a fault occurs in the first storage block in the enabled state. Figure 4 The power supply unit 202 is used in S103 in the method embodiment.

[0162] Of course, the control device 200 provided in the embodiment of the present application includes but is not limited to the above modules.

[0163] Another embodiment of the present application provides a control device comprising a memory and a processor. The memory and the processor are coupled; the memory is configured to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the control device performs the steps of the power supply method described in the above method embodiment.

[0164] In actual implementation, the acquisition unit 201, the power supply unit 202, the selection unit 203 and the migration unit 204 can be implemented by the processor calling the computer program code in the memory. The specific execution process can be referred to the description of the method part above and will not be repeated here.

[0165] Another embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on the control device, the control device executes each step executed by the control device in the power supply method process shown in the above method embodiment.

[0166] Another embodiment of the present application provides a chip system, which is applied to a control device. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via circuits. The interface circuits are used to receive signals from the control device's memory and send signals to the processor, the signals including computer instructions stored in the memory. When the control device processor executes the computer instructions, the control device executes each step performed by the control device in the power supply method process shown in the above method embodiment.

[0167] In another embodiment of the present application, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are executed on a control device, the control device executes each step executed by the control device in the power supply method process shown in the above method embodiment.

[0168] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer-executable instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a server, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0169] The above is only a specific embodiment of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific embodiment provided in this application, and all such changes or substitutions shall fall within the scope of protection of this application.

Claims

1. A power supply method, characterized in that: Applied to a hard disk, the hard disk includes a main control chip and multiple storage blocks, each of the storage blocks is connected to the main control chip, wherein when the hard disk is powered on for the first time, some of the multiple storage blocks are preset to an enabled state, and other parts are preset to an energy-saving state; the storage blocks in the enabled state provide data read and write services, and the storage blocks in the energy-saving state do not provide data read and write services; the method includes: Obtaining a state of a first storage block; wherein the first storage block is any one of the plurality of storage blocks; the state includes an enabled state or a power-saving state; When the state of the first storage block is an enabled state, supplying power to the first storage block according to the rated power; When the state of the first storage block is the energy-saving state, supplying power to the first storage block according to the energy-saving power, or not supplying power to the first storage block; the energy-saving power is lower than the rated power; The method further comprises: When the total remaining available capacity of the plurality of storage blocks in the enabled state is less than or equal to a first preset value, selecting a second target storage block with the lowest wear level or less than or equal to a second threshold value from the storage blocks in the energy-saving state, and changing the state of the second target storage block to the enabled state; And / or, when the total remaining available capacity in the multiple storage blocks in the enabled state is greater than or equal to a second preset value, a first target storage block with the highest degree of wear or greater than or equal to a first threshold is selected from the storage blocks in the enabled state, and after migrating the data of the first target storage block, the state of the first target storage block is changed to the energy-saving state.

2. The method according to claim 1, characterized in that The obtaining of the state of the first storage block comprises: The first storage block stores the status of the plurality of storage blocks. When the hard disk is powered on, the first storage block is powered according to the rated power, and the status of the plurality of storage blocks is obtained from the first storage block; the status of the plurality of storage blocks includes the status of the first storage block. Alternatively, the hard disk includes a storage space, in which the status of multiple storage blocks is stored. When the hard disk is powered on, the status of the multiple storage blocks is obtained from the storage space; the status of the multiple storage blocks includes the status of the first storage block.

3. The method according to claim 1, characterized in that The hard disk further includes a power supply module, and the main control chip controls the power supply provided by the power supply module to the first storage block through a chip select signal; supplying power to the first storage block according to the rated power includes: Setting the level of the chip select signal to a high level so that the power supplied by the power supply module to the first storage block is rated power; The supplying power to the first storage block according to the energy-saving power, or not supplying power to the first storage block includes: The level of the chip selection signal is set to a low level, so that the power supplied by the power supply module to the first storage block is energy-saving power, or no power is supplied to the first storage block.

4. The method according to any one of claims 1 to 3, characterized in that The memory block includes a plurality of memory particles.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: A first target storage block and a second target storage block are selected from the plurality of storage blocks; the first target storage block is a storage block that is in an enabled state and has the highest degree of wear or is greater than or equal to a first threshold, and the second target storage block is a storage block that is in an energy-saving state and has the lowest degree of wear or is less than or equal to a second threshold; the first threshold is greater than the second threshold; When the difference in wear levels between the first target storage block and the second target storage block is greater than or equal to a preset value, the data stored in the first target storage block is migrated to other storage blocks in the multiple storage blocks that are enabled; after the migration is completed, the state of the first target storage block is changed to an energy-saving state, and the first target storage block is powered on according to the energy-saving power, or the first target storage block is not powered on.

6. The method according to claim 5, characterized in that Before migrating the data stored in the first target storage block to other storage blocks in the plurality of storage blocks that are in an enabled state, the method further includes: The state of the second target storage block is changed to an enabled state, and power is supplied to the second target storage block according to the rated power.

7. The method according to any one of claims 1 to 6, characterized in that The migrating the data of the first target storage block includes: The data stored in the first target storage block is migrated to other storage blocks in the plurality of storage blocks that are in an enabled state.

8. A hard disk, characterized in that: It comprises a main control chip and multiple storage blocks; the main control chip is connected to the multiple storage blocks, wherein, when the hard disk is powered on for the first time, a part of the multiple storage blocks are preset to an enabled state, and another part is preset to an energy-saving state; the storage blocks in the enabled state provide data read and write services, and the storage blocks in the energy-saving state do not provide data read and write services; the main control chip is used to power the first storage block based on the state of the first storage block; the state includes an enabled state or an energy-saving state; the first storage block is any one of the multiple storage blocks; when the state of the first storage block is the enabled state, the first storage block is powered at the rated power; when the state of the first storage block is the energy-saving state, the first storage block is powered at the energy-saving power. The first storage block is powered, or the first storage block is not powered; the energy-saving power is lower than the rated power; when the total remaining available capacity of the multiple storage blocks in the enabled state is less than or equal to a first preset value, a second target storage block with the lowest degree of wear or less than or equal to a second threshold is selected from the storage blocks in the energy-saving state, and the state of the second target storage block is changed to the enabled state; and / or when the total remaining available capacity of the multiple storage blocks in the enabled state is greater than or equal to a second preset value, a first target storage block with the highest degree of wear or greater than or equal to the first threshold is selected from the storage blocks in the enabled state, and the state of the first target storage block is changed to the energy-saving state after migrating the data of the first target storage block.

9. The hard disk according to claim 8, wherein: The hard disk also includes a cache chip; the cache chip is used to cache the physical location information of the multiple storage blocks, and the physical location information of the multiple storage blocks includes the channel number, chip select signal and capacity of each storage block in the hard disk; the main control chip selects each storage block according to the physical location information.

10. A computing device, characterized in that The computing device includes a motherboard, a hard disk backplane and a hard disk; the motherboard is connected to the hard disk through the hard disk backplane, the hard disk includes a main control chip and multiple storage blocks, each of the storage blocks is connected to the main control chip, wherein, when the hard disk is powered on for the first time, a part of the multiple storage blocks are preset to an enabled state, and another part is preset to an energy-saving state; the storage blocks in the enabled state provide data read and write services, and the storage blocks in the energy-saving state do not provide data read and write services; the hard disk is used to obtain the state of a first storage block; wherein, the first storage block is any one of the multiple storage blocks; the state includes an enabled state or an energy-saving state; when the state of the first storage block is the enabled state, the first storage block is powered on according to the rated power; when the state of the first storage block is the enabled state, the first storage block is powered on according to the rated power; when the state of the first storage block is the When the state is an energy-saving state, the first storage block is powered according to the energy-saving power, or the first storage block is not powered; the energy-saving power is lower than the rated power; when the total remaining available capacity of the multiple storage blocks in the enabled state is less than or equal to a first preset value, a second target storage block with the lowest degree of wear or less than or equal to a second threshold is selected from the storage blocks in the energy-saving state, and the state of the second target storage block is changed to the enabled state; and / or, when the total remaining available capacity of the multiple storage blocks in the enabled state is greater than or equal to a second preset value, a first target storage block with the highest degree of wear or greater than or equal to the first threshold is selected from the storage blocks in the enabled state, and the state of the first target storage block is changed to the energy-saving state after migrating the data of the first target storage block.

Citation Information

Patent Citations

  • Solid state disk and computer equipment

    CN110515547A

  • Solid state disk, data operation method and device thereof and storage medium

    CN112000214A