Power consumption control method, flash memory device, and storage medium

By calculating the power consumption of NAND Flash packages and stopping operation requests when power consumption is high, combined with a scheduling mechanism to optimize request sending, the latency problem caused by high power consumption in large-capacity storage devices is solved, thus improving service quality.

CN120066230BActive Publication Date: 2026-06-02DAPUSTOR CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DAPUSTOR CORP
Filing Date
2024-12-30
Publication Date
2026-06-02

Smart Images

  • Figure CN120066230B_ABST
    Figure CN120066230B_ABST
Patent Text Reader

Abstract

This application relates to the field of flash memory device control technology, and discloses a power consumption control method, a flash memory device, and a storage medium. The method includes: calculating the power consumption of each package; when receiving an operation request from the host, if the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, then stopping sending the operation request to the flash memory space until the power consumption of the package corresponding to the operation request is less than the power consumption threshold. By calculating the power consumption of each package, before sending the operation request to the flash memory space, it is determined whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, so as to determine whether to send the operation request to the flash memory space. This application can avoid the problem of high latency of operation requests caused by high overall power consumption of the flash memory device, and improve the service quality of the flash memory device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of flash memory device control technology, and in particular to a power consumption control method, a flash memory device, and a storage medium. Background Technology

[0002] Flash memory devices are storage devices manufactured using flash memory technology. Flash memory is an electronic storage medium that uses electric current to store and retrieve data in semiconductor transistors. For example, NAND flash memory is a type of flash memory composed of multiple storage cells, where each cell can store a data bit (0 or 1). Flash memory devices can be standalone storage units, such as USB flash drives and solid-state drives (SSDs), or they can be storage modules embedded in other devices, such as eMMC or UFS storage in smartphones.

[0003] With the development of NAND Flash manufacturing technology, coupled with the increasing demands for single-disk storage capacity in applications such as AI and data centers, SSD single-disk capacities are becoming increasingly larger. In high-capacity drives, the use of high-density NAND flash (such as ODP and HDP) has become a trend. Each ODP (Octo Die Package) encapsulates 8 dies; each HDP (Hexadeca Die Package) encapsulates 16 dies.

[0004] Currently, some manufacturers' flash memory has a peak power management (PPM) function. If the PPM function of NAND flash is enabled, the overall power consumption of the disk will increase, and some erase, write, and read requests will have higher latency, resulting in a low quality of service (QoS) of the SSD. Summary of the Invention

[0005] This application provides a power consumption control method, a flash memory device, and a storage medium. By calculating the power consumption of each package, before sending an operation request to the flash memory space, it is determined whether the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, so as to determine whether to send the operation request to the flash memory space. This avoids the problem of high latency of operation requests caused by high overall power consumption of the flash memory device, and improves the service quality of the flash memory device.

[0006] The embodiments of this application provide the following technical solutions:

[0007] In a first aspect, embodiments of this application provide a power consumption control method applied to a flash memory device, the flash memory device including a flash memory space, the flash memory space including multiple packages;

[0008] The methods include:

[0009] Calculate the power consumption of each package;

[0010] When an operation request is received from the host, if the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, the operation request will stop being sent to the flash memory until the power consumption of the package corresponding to the operation request is less than the power consumption threshold.

[0011] In some embodiments, each package includes a plurality of dies, and each die includes a plurality of planes;

[0012] Operation requests include read operations, write operations, and erase operations;

[0013] Calculate the power consumption of each package, including:

[0014] Get the number of the first planes of a bare wafer;

[0015] Obtain the first typical power consumption, the second typical power consumption, and the third typical power consumption, wherein the first typical power consumption is the typical power consumption for reading operations with the number of first planes, the second typical power consumption is the typical power consumption for writing operations with the number of first planes, and the third typical power consumption is the typical power consumption for erasing operations with the number of first planes.

[0016] Based on the number of first planes, and combined with the first typical power consumption, the second typical power consumption, and the third typical power consumption, the power consumption of each package is calculated.

[0017] In some embodiments, the power consumption of each package is calculated based on the number of first planes, combined with the first typical power consumption, the second typical power consumption, and the third typical power consumption, including:

[0018]

[0019] Among them, P package The power consumption of a package is given by totalPlane, where totalPlane is the number of the first plane, pl is the number of planes, and P is the power consumption of the package. W-pl The power consumption for writing to p planes, W cnt-pl P represents the number of write operations performed on pl planes. E-pl The power consumption of performing a wipe operation on p planes, E cnt-pl P represents the number of operations performing wipe operations on pl planes. R-pl The power consumption for reading operations on p planes, R cnt-pl The number of read operations currently in progress across pl planes;

[0020] Where pl ≤ totalPlane, P W-pl = (Second typical power consumption / totalPlane) * pl, PE-pl = (Third typical power consumption / totalPlane) * pl, P R-pl = (First typical power consumption / totalPlane) * pl.

[0021] In some embodiments,

[0022] The method also includes:

[0023] Calculate the power consumption threshold, including:

[0024] Obtain the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption, wherein the first maximum power consumption is the maximum power consumption for read operations with the number of first planes, the second maximum power consumption is the maximum power consumption for write operations with the number of first planes, and the third maximum power consumption is the maximum power consumption for erase operations with the number of first planes.

[0025] The maximum value among the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption is taken as the maximum power consumption.

[0026] The minimum value among the first typical power consumption, the second typical power consumption, and the third typical power consumption is taken as the minimum power consumption.

[0027] Get the first number of bare dies for a package;

[0028] Calculate the power consumption threshold based on the number of first dies, the maximum power consumption, and the minimum power consumption.

[0029] In some embodiments, calculating a power consumption threshold based on the number of first dies, the maximum power consumption, and the minimum power consumption includes:

[0030] Power consumption threshold = minimum power consumption * (number of first dies * third coefficient), where the third coefficient is the smaller of the first and second coefficients, the first coefficient = minimum power consumption / maximum power consumption, and the second coefficient is a preset coefficient.

[0031] In some embodiments, the method further includes:

[0032] Record the timing of every write operation issued for each packaged die;

[0033] Get the current time, and within a preset time period, poll the difference between the operation time of each raw die record and the current time to obtain several differences;

[0034] The maximum value among several differences is taken as the maximum difference, and the bare die corresponding to the maximum difference is determined.

[0035] Based on the maximum difference, update the second coefficient to obtain the updated second coefficient, where the updated second coefficient = the original second coefficient - (maximum difference - first time threshold) / second time threshold.

[0036] In some embodiments, the method further includes:

[0037] If the maximum difference is greater than or equal to the third time threshold, the second coefficient is set to zero and the power consumption threshold is set to zero, so that no operation request is distributed to any of the packaged dies.

[0038] After the write operation on the die corresponding to the maximum difference is completed, the second coefficient is reset to the original second coefficient;

[0039] In the next time period, repeatedly poll the difference between the operation time and the current time for each raw record and the subsequent steps.

[0040] In some embodiments, the method further includes:

[0041] Create several operation request queues, where each operation request queue corresponds to one raw silicon.

[0042] After receiving the operation request from the host, the corresponding die is determined and the operation request is inserted into the operation request queue corresponding to the die. Each operation request corresponds to an insertion time.

[0043] Obtain the first insertion time in each operation request queue to get several first insertion times, where the first insertion time is the longest insertion time in the operation request queue;

[0044] Construct a scheduling list, and add the identifier of the raw die corresponding to each first insertion time to the scheduling list in ascending order of the first insertion time.

[0045] In some embodiments, the method further includes:

[0046] If the power consumption of the package corresponding to the operation request is less than the power consumption threshold, the scheduling list is searched in ascending order of the first insertion time.

[0047] If an idle die is found, the first operation request is retrieved from the operation request queue corresponding to the idle die, and the first operation request is sent to the flash memory space. The power consumption of the package corresponding to the first operation request is updated, and the identifier of the die corresponding to the idle die is removed from the scheduling list. The first operation request is the operation request corresponding to the first insertion time.

[0048] In some embodiments, the method further includes:

[0049] If the identifier of the die corresponding to the first operation request does not exist in the scheduling list, and there is an operation request in the operation request queue corresponding to the die of the first operation request, then the identifier of the die corresponding to the first operation request is inserted into the scheduling list in ascending order of the first insertion time of the operation request queue.

[0050] In some embodiments,

[0051] The method also includes:

[0052] If the power consumption of the package corresponding to the operation request is less than the power consumption threshold, then the operation request is sent to the flash memory space.

[0053] After the operation request is completed, update the power consumption of the package corresponding to the operation request.

[0054] Secondly, embodiments of this application provide a flash memory device, including:

[0055] The processor and memory, the processor is used to execute executable program code in memory, and when the executable program code is executed, the processor executes instructions such as the power consumption control method of the first aspect.

[0056] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed, implements the power consumption control method as described in the first aspect.

[0057] The beneficial effects of the embodiments of this application are as follows: Unlike existing technologies, the embodiments of this application provide a power consumption control method applied to a flash memory device. The flash memory device includes a flash memory space, which includes multiple packages. The method includes: calculating the power consumption of each package; when receiving an operation request from a host, if the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, then stopping the transmission of the operation request to the flash memory space until the power consumption of the package corresponding to the operation request is less than the power consumption threshold. This application can determine whether to send the operation request to the flash memory space before sending it by calculating the power consumption of each package and judging whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, thereby avoiding the problem of high latency of operation requests caused by high overall power consumption of the flash memory device and improving the service quality of the flash memory device. Attached Figure Description

[0058] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0059] Figure 1This is a schematic diagram of a packaging structure provided in an embodiment of this application;

[0060] Figure 2 This is a schematic flowchart of a power consumption control method provided in an embodiment of this application;

[0061] Figure 3 yes Figure 2 A detailed flowchart of step S201 in the process;

[0062] Figure 4 This is a schematic diagram of a process for calculating a power consumption threshold provided in an embodiment of this application;

[0063] Figure 5 yes Figure 4 A detailed flowchart of step S401 in the process;

[0064] Figure 6 This is a schematic diagram of a process for updating the second coefficient provided in an embodiment of this application;

[0065] Figure 7 This is a flowchart illustrating a method for determining whether the maximum difference is greater than or equal to a third time threshold, provided in an embodiment of this application.

[0066] Figure 8 This is a schematic diagram of a process for constructing a scheduling linked list provided in an embodiment of this application;

[0067] Figure 9 This is a schematic diagram of the structure of an operation request queue provided in an embodiment of this application;

[0068] Figure 10 This is a schematic diagram of a process for inserting the identifier of the bare die corresponding to the first operation request into the scheduling list, as provided in an embodiment of this application.

[0069] Figure 11 This is a schematic diagram of the structure of a scheduling linked list provided in an embodiment of this application;

[0070] Figure 12 This is a schematic diagram of a process for determining whether a free die has been found, provided in an embodiment of this application.

[0071] Figure 13 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application.

[0072] Explanation of icon numbers:

[0073] label name label name 130 Flash memory devices 131 processor 132 memory Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0075] Furthermore, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0076] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0077] The technical solution of this application is described in detail below with reference to the accompanying drawings:

[0078] Please see Figure 1 , Figure 1 This is a schematic diagram of a packaging structure provided in an embodiment of this application;

[0079] like Figure 1 As shown, a package in a flash memory device refers to the physical packaging unit of NAND Flash. It is a whole that encapsulates the bare NAND Flash die and can contain one or more targets.

[0080] In this application embodiment, the package packaging form includes HDP, which (Hexadeca Die Package) refers to a NAND Flash package form containing 16 dies per package. HDP is an abbreviation for Hexadeca Die Package, referring to a NAND Flash package form containing 16 dies per package. This packaging form improves the storage density and capacity of NAND Flash, allowing more storage cells to be accommodated in the same physical space.

[0081] Specifically, each Target contains multiple Dies, which are the basic building blocks of NAND Flash used for data storage. The Package, as the physical encapsulation of the NAND Flash, provides a protective shell for the Dies, enabling them to operate more stably and reliably. The Package also facilitates the installation and replacement of NAND Flash. A Target contains one or more Dies, and one or more Dies within a Target share a set of data signals. A Die is the smallest unit in NAND Flash capable of independently executing commands and reporting status, corresponding one-to-one with a logic unit. Within a Target, one or more LUNs share a set of data signals, and each Target is controlled by a CE pin (chip select). The LUN (Die) and logic unit in NAND Flash are one-to-one, meaning that each LUN (Die) can be considered an independent logical storage unit for performing read, write, and erase operations.

[0082] A die is an individual flash memory die containing multiple blocks for data storage. In a multi-channel SSD, each die can be read, written, or erased independently, allowing for parallel processing to improve performance. A plane is an independent storage unit within a flash memory die, used for storing and managing data. Each die typically contains multiple planes, each plane is further composed of multiple blocks, and each block contains multiple pages. The main advantage of planes is that they can perform read, write, and erase operations independently, thus improving SSD performance.

[0083] Multiple planes make up a single die. This means that within a single flash memory die, multiple planes share the tasks of data storage and management. This structure helps improve storage density and performance because it can accommodate more data in a smaller physical space and improve read and write speeds by processing multiple data blocks in parallel.

[0084] In practical applications, multi-plane operations leverage the parallelism of NAND flash memory to execute read and write tasks simultaneously on multiple planes within the same die, significantly improving data transfer rates. Asynchronous plane operations, on the other hand, offer greater operational independence, allowing read tasks on different planes to proceed independently without waiting for other planes to complete, thus improving random read response speeds.

[0085] Please see Figure 2 , Figure 2This is a schematic flowchart of a power consumption control method provided in an embodiment of this application;

[0086] The power consumption control method is applied to a flash memory device, which includes a flash memory space and multiple packages.

[0087] like Figure 2 As shown, the power consumption control method includes:

[0088] Step S201: Calculate the power consumption of each package;

[0089] For details, please refer to [link / reference]. Figure 3 , Figure 3 yes Figure 2 A detailed flowchart of step S201 in the process;

[0090] like Figure 3 As shown, step S201: Calculate the power consumption of each package, including:

[0091] Step S211: Obtain the number of the first planes of a bare wafer;

[0092] Specifically, each package includes multiple die dies, and each die dies includes multiple planes. Determining the number of first planes in a die involves: determining the package type, as different package types may contain different numbers of die dies. For example, a Single Chip Package (SCP) contains only one die, while a Multi-Chip Package (MCP) contains multiple dies. MCPs include 4-plane and 6-plane configurations, where 4-plane refers to a die dies with 4 first planes and 6-plane refers to a die dies with 6 first planes. After determining the package type, the number of first planes for each die is obtained by consulting the die's datasheet. It is understood that die manufacturers typically provide datasheets that include the number of planes in each die dies.

[0093] Step S212: Obtain the first typical power consumption, the second typical power consumption, and the third typical power consumption;

[0094] Specifically, typical power consumption refers to the electrical energy consumed by a device during normal operation or a specific working mode. For solid-state drives (SSDs), typical power consumption usually refers to the electrical energy consumed by the SSD during read and write operations under normal usage conditions. This typical power consumption value is affected by various factors, including the SSD model, capacity, read / write performance, load level, and power management strategy. The typical power consumption of flash memory devices of different specifications and capacities can be found in the NAND flash datasheet or datasheet. This typical power consumption includes a first typical power consumption, a second typical power consumption, and a third typical power consumption. The first typical power consumption is the typical power consumption for read operations (R) using the first number of planes; the second typical power consumption is the typical power consumption for write operations (W) using the first number of planes; and the third typical power consumption is the typical power consumption for erase operations (E) using the first number of planes.

[0095] Understandably, the typical power consumption of a write operation (W) refers to the power consumed by the NAND Flash during a write operation, which involves programming data into the NAND Flash memory cells. The typical power consumption of an erase operation (E) refers to the power consumed by the NAND Flash during an erase operation: an erase operation is used to clear data from memory cells for reprogramming. Erase operations typically consume more power than read and write operations because they involve erasing an entire block or page. The typical power consumption of a read operation (R) refers to the power consumed by the NAND Flash during a read operation, which involves reading data from the NAND Flash. Compared to write and erase operations, read operations typically consume less power because they do not involve modifying memory cells.

[0096] Step S213: Based on the number of first planes, and combined with the first typical power consumption, the second typical power consumption, and the third typical power consumption, calculate the power consumption of each package;

[0097] Specifically, the formula for calculating the power consumption of each package is as follows:

[0098]

[0099] Among them, P package The power consumption of a package is given by totalPlane, where totalPlane is the number of the first plane, pl is the number of planes, and P is the power consumption of the package. W-pl The power consumption for writing to p planes, W cnt-pl P represents the number of write operations performed on pl planes. E-pl The power consumption of performing a wipe operation on p planes, E cnt-pl P represents the number of operations performing wipe operations on pl planes. R-pl The power consumption for reading operations on p planes, Rcnt-pl The number of read operations currently in progress across pl planes;

[0100] Where pl ≤ totalPlane, P W-pl = (Second typical power consumption / totalPlane) * pl, P E-pl = (Third typical power consumption / totalPlane) * pl, P R-pl = (First typical power consumption / totalPlane) * pl.

[0101] Please refer to the following: Figure 4 , Figure 4 This is a schematic diagram of a process for calculating a power consumption threshold provided in an embodiment of this application;

[0102] like Figure 4 As shown, the process for calculating the power consumption threshold includes:

[0103] Step S401: Calculate the power consumption threshold;

[0104] For details, please refer to [link / reference]. Figure 5 , Figure 5 yes Figure 4 A detailed flowchart of step S401 in the process;

[0105] like Figure 5 As shown, step S401: Calculate the power consumption threshold, including:

[0106] Step S411: Obtain the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption;

[0107] Specifically, based on the number of first planes, the first maximum power consumption, second maximum power consumption, and third maximum power consumption are obtained. The first maximum power consumption is the maximum power consumption for read operations using the first number of first planes, the second maximum power consumption is the maximum power consumption for write operations using the first number of first planes, and the third maximum power consumption is the maximum power consumption for erase operations using the first number of first planes. For example, taking a 4-pane flash memory as an example, assuming the number of first planes is 4, then the first maximum power consumption is the maximum power consumption for read operations using all 4 planes, the second maximum power consumption is the maximum power consumption for write operations using all 4 planes, and the third maximum power consumption is the maximum power consumption for erase operations using all 4 planes.

[0108] It is understandable that the maximum power consumed when all four planes of the flash memory device are performing read operations simultaneously is the first maximum power consumption; the maximum power consumed when all four planes of the flash memory device are performing write operations simultaneously is the second maximum power consumption; and the maximum power consumed when all four planes of the flash memory device are performing erase operations simultaneously is the third maximum power consumption.

[0109] Step S412: Take the maximum value among the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption as the maximum power consumption;

[0110] Specifically, by comparing the magnitudes of the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption, the maximum value among the three is determined, and the maximum value among the three is determined as the maximum power consumption.

[0111] Step S413: Take the minimum value among the first typical power consumption, the second typical power consumption, and the third typical power consumption as the minimum power consumption;

[0112] Specifically, by comparing the magnitudes of the first typical power consumption, the second typical power consumption, and the third typical power consumption, the minimum value among the three is determined, and this minimum value is set as the minimum power consumption.

[0113] Step S414: Obtain the first number of bare dies for a package;

[0114] Specifically, to obtain the first die count of a package, that is, to obtain the number of dies in the Flash Package, for example, assuming the package is HDP, then the first die count of HDP is 16.

[0115] Step S415: Calculate the power consumption threshold based on the number of first dies, the maximum power consumption, and the minimum power consumption;

[0116] Specifically, the power consumption threshold is calculated based on the number of first dies, the maximum power consumption, and the minimum power consumption. The power consumption threshold is calculated as: minimum power consumption * (number of first dies * third coefficient). The third coefficient is the smaller of the first coefficient and the second coefficient. The first coefficient is calculated as: minimum power consumption / maximum power consumption. The second coefficient is a preset coefficient. It should be noted that the second coefficient can be set according to actual needs. Preferably, the second coefficient is set to 75%.

[0117] Step S202: Determine whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold;

[0118] Specifically, it is determined whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold. If the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, then proceed to step S203; if the power consumption of the package corresponding to the operation request is less than the power consumption threshold, then proceed to step S204.

[0119] Step S203: Stop sending operation requests to the flash memory space until the power consumption of the package corresponding to the operation request is less than the power consumption threshold;

[0120] Specifically, if the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, the operation request to be sent to the flash memory will be stopped, and the flash memory will be waited for an operation to be completed until the power consumption of the package corresponding to the operation request is less than the power consumption threshold.

[0121] Step S204: Send an operation request to the flash memory space;

[0122] Specifically, if the power consumption of the package corresponding to the operation request is less than the power consumption threshold, then the operation request is sent to the flash memory space.

[0123] Step S205: After the operation request is completed, update the power consumption of the package corresponding to the operation request;

[0124] Specifically, while the flash memory device is performing an operation, the system or controller continuously monitors the actual power consumption. For example, the power consumption of the package can be monitored through a built-in power monitoring circuit or an external power measurement device. When the operation request is completed, the system or controller updates the power consumption of the package corresponding to the operation request based on the power consumption data during the actual execution process, so that when the next operation request is issued, it can determine whether the power consumption of the package corresponding to the next operation request is greater than or equal to the power consumption threshold.

[0125] In this embodiment, the above calculation process is based on the typical power consumption of W / E / R. However, in reality, each operation has a maximum power consumption; for example, W / R occurs at the moment of data transmission burst. Operations on each die are independent, and if multiple dies simultaneously reach their maximum power consumption, the above mechanism cannot cover them. This is especially true when a write operation occurs on one die while other dies continuously perform parallel read operations; the above situation is prone to occur. Therefore, based on the above mechanism, this application also provides a feedback mechanism that can prevent a decrease in IO QoS due to slow operation completion caused by the power consumption of the NAND flash memory when too many operations are running on the package.

[0126] Please refer to the following: Figure 6 , Figure 6 This is a schematic diagram of a process for updating the second coefficient provided in an embodiment of this application;

[0127] like Figure 6 As shown, the process for updating the second coefficient includes:

[0128] Step S601: Record the operation time of each write operation issued for each bare die in the package;

[0129] Specifically, a timestamp generation module or counter is integrated inside the die. This module or counter is used to automatically record the current time or operation sequence number when each write operation occurs. The counter records the operation time of each write operation issued by each die.

[0130] Step S602: Obtain the current time. Within a preset time period, poll the difference between the operation time of each raw die record and the current time to obtain several differences.

[0131] Specifically, the current time is obtained and denoted as tcurr. Using a timer, the operation time tn of each Die record is polled within a preset time period, and the difference between each operation time and the current time is calculated to obtain several differences. The difference is calculated as: current time - operation time. It should be noted that the preset time period can be set according to actual needs. For example, the preset time period can be set to 100ms, which means that the operation time of each Die record is polled once every 100ms.

[0132] Step S603: Take the maximum value among several differences as the maximum difference, and determine the bare die corresponding to the maximum difference;

[0133] Specifically, based on several differences, the maximum value among the differences is determined, and this maximum value is taken as the maximum difference. Then, the bare die corresponding to the maximum difference is determined.

[0134] Step S604: Update the second coefficient based on the maximum difference to obtain the updated second coefficient;

[0135] Specifically, the original second coefficient is obtained, and the second coefficient is updated based on the maximum difference to obtain the updated second coefficient. The updated second coefficient is calculated as: Original second coefficient - (Maximum difference - First time threshold) / Second time threshold. It should be noted that the first and second time thresholds can be set according to actual needs. For example, if the first time threshold is set to 200ms and the second time threshold is set to 2s, then when the original second coefficient is 75%, the first time threshold is 200ms, and the second time threshold is 2s, the updated second coefficient Factor = 75% - (tmax - 200ms) / 2s.

[0136] In the embodiments of this application, although the above-mentioned feedback mechanism can improve the QoS of IO to a certain extent, in order to prevent some operation requests from being sent to the flash memory space after arriving at the firmware due to the power consumption limit, resulting in poor QoS, this application also proposes a scheduling mechanism. Through this scheduling mechanism, it can be ensured that the requests are scheduled in an orderly manner under power consumption control, thereby further improving the QoS of IO.

[0137] Please refer to the following: Figure 7 , Figure 7 This is a flowchart illustrating a method for determining whether the maximum difference is greater than or equal to a third time threshold, provided in an embodiment of this application.

[0138] like Figure 7 As shown, the process for determining whether the maximum difference is greater than or equal to the third time threshold includes:

[0139] Step S701: Obtain the maximum difference;

[0140] Specifically, the current time is obtained, denoted as tcurr. A timer is used to poll the operation time tn of each Die record within a preset time period, and the difference between each operation time and the current time is calculated to obtain several differences. The difference is calculated as: current time - operation time. It should be noted that the preset time period can be set according to actual needs. For example, the preset time period can be set to 100ms, that is, the operation time of each Die record is polled once every 100ms. Then, based on the several differences, the maximum value among the several differences is determined, and the maximum value among the several differences is taken as the maximum difference, and thus the maximum difference is obtained.

[0141] Step S702: Determine whether the maximum difference is greater than or equal to the third time threshold;

[0142] Specifically, a third time threshold is set, which can be set according to actual needs, for example, the third time threshold is set to 1.7s; it is determined whether the maximum difference is greater than or equal to the third time threshold. If the maximum difference is greater than or equal to the third time threshold, then proceed to step S703; if the maximum difference is less than the third time threshold, then proceed to step S704.

[0143] Step S703: Set the second coefficient to zero and the power consumption threshold to zero, so that no operation request is distributed to any of the packaged dies;

[0144] Specifically, if the maximum difference is greater than or equal to the third time threshold, the second coefficient Factor is set to 0. Combined with the above calculation formula for the power consumption threshold, it can be seen that the power consumption threshold will also be 0. At this time, any operation request is stopped from being sent to the flash memory space, and then the process proceeds to step S704. For example, if the third time threshold is 1.7s, the second coefficient is set to zero and the power consumption threshold is set to zero, so that no operation request is distributed to any of the packaged dies.

[0145] Step S704: After the write operation of the die corresponding to the maximum difference is completed, reset the second coefficient to the original second coefficient;

[0146] Specifically, if the maximum difference is less than the third time threshold, or after the second coefficient and power consumption threshold are set to zero, the second coefficient is reset to the original second coefficient after the write operation of the die corresponding to the maximum difference is completed. For example, assuming the original second coefficient is 75% and the current second coefficient is set to 0, the second coefficient needs to be set to the original second coefficient of 75% after the write operation of the die corresponding to the maximum difference is completed.

[0147] Step S705: In the next time period, repeatedly poll the difference between the operation time and the current time for each raw die record and the subsequent steps;

[0148] Specifically, upon entering the next time cycle, the difference between the operation time recorded for each die and the current time is repeatedly polled to obtain several differences. The maximum value among these differences is taken as the maximum difference, and the die corresponding to the maximum difference is determined. Based on the maximum difference, the second coefficient is updated to obtain the updated second coefficient. It is then determined whether the maximum difference is greater than or equal to the third time threshold. If the maximum difference is greater than or equal to the third time threshold, the second coefficient is set to zero, and the power consumption threshold is set to zero, so that no operation request is distributed to any of the packaged dies. If the maximum difference is less than the third time threshold, after the write operation of the die corresponding to the maximum difference is completed, the second coefficient is reset to the original second coefficient for cyclic scheduling. For the specific process, please refer to steps S601 to S704 above, which will not be elaborated further in this application.

[0149] Please refer to the following: Figure 8 , Figure 8 This is a schematic diagram of a process for constructing a scheduling linked list provided in an embodiment of this application;

[0150] like Figure 8 As shown, the process of constructing the scheduling linked list includes:

[0151] Step S801: Create several operation request queues;

[0152] Specifically, an operation request queue is created for each die, meaning each operation request queue corresponds one-to-one with a die, generating several operation request queues. Each die has a queue (Queuen) to manage the die's operation requests (hereinafter referred to as req). This operation request queue is specifically used to enqueue the operation requests req from the firmware arriving at the SSD.

[0153] Step S802: After receiving the operation request sent by the host, determine the die corresponding to the operation request and insert the operation request into the operation request queue corresponding to the die.

[0154] Specifically, each operation request corresponds to a raw die. After receiving the operation request from the host, the raw die corresponding to the operation request is determined, and the operation request is inserted into the operation request queue corresponding to the raw die. Here, the operation request refers to the W / E / R request that operates on the NAND after passing through the FE and FTL of the SSD.

[0155] Step S803: Obtain the first insertion time in each operation request queue to obtain several first insertion times;

[0156] Specifically, each req corresponds to an insertion time Treq. The first insertion time in each operation request queue is obtained to obtain several first insertion times. The insertion time corresponding to each operation request refers to the time when the operation request is inserted into the operation request queue. The insertion time corresponding to all operation requests in each operation request queue and the current time are obtained. By calculating the first difference between the current time and the insertion time, the largest first difference is determined. The insertion time corresponding to the largest first difference is determined as the first insertion time. That is, the first insertion time is the longest insertion time in the operation request queue.

[0157] Step S804: Construct a scheduling list and add the identifier of the die corresponding to each first insertion time to the scheduling list in ascending order of the first insertion time;

[0158] Specifically, a scheduling list called scheduleList is constructed to store the identifier of the die corresponding to the first insertion time. The specific storage method is to add the identifier of the die corresponding to each first insertion time to the scheduling list in ascending order of the first insertion time Tdie.

[0159] Please refer to the following: Figure 9 , Figure 9 This is a schematic diagram of the structure of an operation request queue provided in an embodiment of this application;

[0160] like Figure 9 As shown, assuming the flash memory device includes dies Die 0, Die 1, Die 2... Dien, each die corresponds to an operation request queue. Each operation request queue includes a head and a tail. The operation request queue is used to cache operation requests (req). The operation requests within the operation request queue are ordered according to the insertion time. After receiving an operation request from the host, the die corresponding to the operation request is determined, and the operation request is inserted from the tail of the operation request queue into the operation request queue corresponding to the die. It can be understood that when an operation request needs to be retrieved, the operation request is dequeued from the head of the operation request queue.

[0161] Please refer to again Figure 10 , Figure 10 which is a schematic flowchart of a process for determining whether an idle die is searched in an embodiment of the present application;

[0162] As Figure 10 shown, the process of determining whether an idle die is searched;

[0163] Step S1001: If the power consumption of the package corresponding to the operation request is less than the power consumption threshold, search the scheduling list in ascending order of the first insertion time;

[0164] Specifically, if the power consumption of the package corresponding to the operation request is less than the power consumption threshold, obtain the first insertion time corresponding to each die, sort the first insertion times in descending order, and search the scheduling list in ascending order of the first insertion time to obtain an idle die.

[0165] Please refer to again Figure 11 , Figure 11 which is a schematic structural diagram of a scheduling list provided in an embodiment of the present application;

[0166] As Figure 11 shown, assume that the flash memory device includes Diex, Diey... Diez, where the first insertion time corresponding to Diex is Tx, the first insertion time corresponding to Diey is Ty, the first insertion time corresponding to Diez is Tz, and so on, and Tx < Ty <... < Tz. Then, when the power consumption of the package corresponding to the operation request is less than the power consumption threshold, search the scheduling list in ascending order of the first insertion time, that is, first search the die Diex corresponding to the minimum first insertion time Tx, then search the die Diey corresponding to the first insertion time Ty, and so on, and finally search the die Diez corresponding to the maximum first insertion time Tz.

[0167] Step S1002: Determine whether an idle die is searched;

[0168] Specifically, determine whether an idle die is searched. If an idle die is searched, enter Step S1003; if no idle die is searched, enter Step S1004.

[0169] Step S1003: Obtain the first operation request from the operation request queue corresponding to the idle die, send the first operation request to the flash memory space, update the power consumption of the package corresponding to the first operation request, and delete the identifier of the die corresponding to the idle die from the scheduling list;

[0170] Specifically, if an idle die is found, the first operation request is retrieved from the operation request queue corresponding to the idle die, and the first operation request is sent to the flash memory space. The power consumption of the package corresponding to the first operation request is updated, and the identifier of the die corresponding to the idle die is removed from the scheduling list. Here, an idle die refers to a die in an idle state. Since a die can only perform one operation at a time, an idle state means that the die is not currently performing any operation. The first operation request is the operation request corresponding to the first insertion time.

[0171] Step S1004: Suspend the first operation request until a free die is found;

[0172] Specifically, if no free die is found, it means that there is no idle die in the current scheduling list. The first operation request is then suspended until a free die is found. The first operation request is then retrieved from the operation request queue corresponding to the free die, sent to the flash memory, and the power consumption of the package corresponding to the first operation request is updated. Finally, the identifier of the die corresponding to the free die is removed from the scheduling list.

[0173] Please refer to the following: Figure 12 , Figure 12 This is a schematic diagram of a process for inserting the identifier of the bare die corresponding to the first operation request into the scheduling list, as provided in an embodiment of this application.

[0174] like Figure 12 As shown, the process of inserting the identifier of the raw die corresponding to the first operation request into the scheduling list includes:

[0175] Step S1201: If the identifier of the die corresponding to the first operation request does not exist in the scheduling list, and there is an operation request in the operation request queue corresponding to the die corresponding to the first operation request, then the identifier of the die corresponding to the first operation request is inserted into the scheduling list in ascending order of the first insertion time of the operation request queue.

[0176] Specifically, each die corresponds to a unique identifier. When an operation in the Flash is completed, the power consumption of the package is updated. If the identifier of the die corresponding to the first operation request does not exist in the scheduling list, and there is an operation request in the operation request queue corresponding to the die of the first operation request, the identifier of the die corresponding to the first operation request is inserted into the scheduling list in ascending order of the first insertion time of the operation request queue, and waits for the scheduling of steps S1001 to S1002.

[0177] In this application embodiment, a power consumption control method is provided, applied to a flash memory device. The flash memory device includes flash memory space, which includes multiple packages. The method includes: calculating the power consumption of each package; and upon receiving an operation request from a host, if the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, stopping the transmission of the operation request to the flash memory space until the power consumption of the package corresponding to the operation request is less than the power consumption threshold. By calculating the power consumption of each package, and determining whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold before sending the operation request to the flash memory space, this application can avoid the problem of high latency of operation requests caused by high overall power consumption of the flash memory device, thereby improving the service quality of the flash memory device.

[0178] Please refer to the following: Figure 13 , Figure 13 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application;

[0179] like Figure 13 As shown, the flash memory device 130 includes one or more processors 131 and memory 132. Wherein, Figure 13 Take a processor 131 as an example.

[0180] Processor 131 and memory 132 can be connected via a bus or other means. Figure 13 Taking the example of a connection between China and Israel via a bus.

[0181] Processor 131 is configured to provide computing and control capabilities to control flash memory device 130 to perform corresponding tasks, such as controlling flash memory device 130 to perform the power control method in any of the above method embodiments. The power control method is applied to the flash memory device, which includes flash memory space and multiple packages. The method includes: calculating the power consumption of each package; and when receiving an operation request from the host, if the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, stopping sending the operation request to the flash memory space until the power consumption of the package corresponding to the operation request is less than the power consumption threshold.

[0182] By calculating the power consumption of each package, before sending an operation request to the flash memory space, it is determined whether the power consumption of the package corresponding to the operation request is greater than or equal to the power consumption threshold, so as to determine whether to send the operation request to the flash memory space. This application can avoid the problem of high latency of operation requests caused by the high overall power consumption of the flash memory device, and improve the service quality of the flash memory device.

[0183] Processor 131 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0184] Memory 132, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the power consumption control method in the embodiments of this application. Processor 131 can implement the power consumption control method in any of the above method embodiments by running the non-transitory software programs, instructions, and modules stored in memory 132. Specifically, memory 132 may include volatile memory (VM), such as random access memory (RAM); memory 132 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or other non-transitory solid-state storage devices; memory 132 may also include combinations of the above types of memory.

[0185] Memory 132 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 132 may optionally include memory remotely located relative to processor 131, and such remote memory may be connected to processor 131 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0186] One or more modules are stored in memory 132. When executed by one or more processors 131, they perform the power consumption control method in any of the above method embodiments, for example, the method described above. Figure 2 The steps shown.

[0187] In this embodiment, the flash memory device 130 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The flash memory device 130 may also include other components for implementing device functions, which will not be described in detail here.

[0188] This application also provides a non-volatile computer-readable storage medium, such as a memory including program code, which can be executed by a processor to implement the power consumption control method in the above embodiments. For example, the non-volatile computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0189] This application also provides a non-volatile computer-readable storage medium, such as a memory including program code, which can be executed by a processor to implement the power consumption control method in the above embodiments. For example, the non-volatile computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0190] This application also provides a computer program product comprising one or more lines of program code stored in a non-volatile computer-readable storage medium. A processor of a flash memory device reads the program code from the non-volatile computer-readable storage medium and executes the program code to complete the method steps of the power consumption control method provided in the above embodiments.

[0191] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program or program code related to hardware. The program can be stored in a non-volatile computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0192] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations as described above in different aspects of this application, which are not provided in detail for the sake of brevity; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A power consumption control method, characterized in that, Applied to a flash memory device, the flash memory device including a flash memory space, the flash memory space including multiple packages; The method includes: Calculate the power consumption of each package; Upon receiving an operation request from the host, if the power consumption of the package corresponding to the operation request is greater than or equal to a power consumption threshold, then sending the operation request to the flash memory space is stopped until the power consumption of the package corresponding to the operation request is less than the power consumption threshold, wherein the power consumption threshold is equal to the minimum power consumption. (Number of nude films) The third coefficient is the smaller value between the first coefficient and the second coefficient. The first coefficient = minimum power consumption / maximum power consumption. The second coefficient is a preset coefficient. The method further includes: Record the operation time of each write operation issued to each bare die of the package; Get the current time, and within a preset time period, poll the difference between the operation time of each raw die record and the current time to obtain several differences; The maximum value among several differences is taken as the maximum difference, and the bare die corresponding to the maximum difference is determined; Based on the maximum difference, the second coefficient is updated to obtain the updated second coefficient, where the updated second coefficient = the original second coefficient - (maximum difference - first time threshold) / second time threshold.

2. The method according to claim 1, characterized in that, Each package includes several dies, and each die includes several planes; The operation requests include read operations, write operations, and erase operations; Calculate the power consumption of each package, including: Obtain the number of first planes of the bare die; Obtain a first typical power consumption, a second typical power consumption, and a third typical power consumption, wherein the first typical power consumption is the typical power consumption for a read operation based on the number of the first planes, the second typical power consumption is the typical power consumption for a write operation based on the number of the first planes, and the third typical power consumption is the typical power consumption for an erase operation based on the number of the first planes. Based on the number of the first planes, and combined with the first typical power consumption, the second typical power consumption, and the third typical power consumption, the power consumption of each package is calculated.

3. The method according to claim 2, characterized in that, The step of calculating the power consumption of each package based on the number of the first planes, combined with the first typical power consumption, the second typical power consumption, and the third typical power consumption, includes: Among them, P package The power consumption of a package is given by totalPlane, where totalPlane is the number of the first plane, pl is the number of planes, and P is the power consumption of the package. W-pl The power consumption for writing to p planes, W cnt-pl P represents the number of write operations performed on pl planes. E-pl The power consumption of performing a wipe operation on p planes, E cnt-pl P represents the number of operations performing wipe operations on pl planes. R-pl The power consumption for reading operations on p planes, R cnt-pl The number of read operations currently in progress across pl planes; Where pl ≤ totalPlane, P W-pl = (Second typical power consumption / totalPlane) pl, P E-pl = (Third Typical Power Consumption / totalPlane) pl, P R-pl = (First typical power consumption / totalPlane) pl.

4. The method according to claim 2, characterized in that, The method further includes: Calculating the power consumption threshold includes: Obtain the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption, wherein the first maximum power consumption is the maximum power consumption for read operations with the first number of planes, the second maximum power consumption is the maximum power consumption for write operations with the first number of planes, and the third maximum power consumption is the maximum power consumption for erase operations with the first number of planes. The maximum value among the first maximum power consumption, the second maximum power consumption, and the third maximum power consumption is taken as the maximum power consumption. The minimum value among the first typical power consumption, the second typical power consumption, and the third typical power consumption is taken as the minimum power consumption. Obtain the first number of bare dies for one of the packages; The power consumption threshold is calculated based on the number of first dies, the maximum power consumption, and the minimum power consumption.

5. The method according to claim 1, characterized in that, The method further includes: If the maximum difference is greater than or equal to the third time threshold, then the second coefficient is set to zero and the power consumption threshold is set to zero, so that none of the bare dies in the package are distributed with operation requests. After the write operation on the die corresponding to the maximum difference is completed, the second coefficient is reset to the original second coefficient; In the next time period, repeatedly poll the difference between the operation time and the current time for each raw record and the subsequent steps.

6. The method according to claim 1, characterized in that, The method further includes: Create several operation request queues, where each operation request queue corresponds to one raw silicon. After receiving an operation request from the host, the die corresponding to the operation request is determined, and the operation request is inserted into the operation request queue corresponding to the die. Each operation request corresponds to an insertion time. Obtain the first insertion time in each of the operation request queues to obtain a plurality of first insertion times, wherein the first insertion time is the longest insertion time in the operation request queue; Construct a scheduling list, and add the identifier of the bare die corresponding to each first insertion time to the scheduling list in ascending order of the first insertion time.

7. The method according to claim 6, characterized in that, The method further includes: If the power consumption of the package corresponding to the operation request is less than the power consumption threshold, the scheduling list is searched in ascending order of the first insertion time. If an idle die is found, a first operation request is retrieved from the operation request queue corresponding to the idle die, and the first operation request is sent to the flash memory space. The power consumption of the package corresponding to the first operation request is updated, and the identifier of the die corresponding to the idle die is deleted from the scheduling list. The first operation request is the operation request corresponding to the first insertion time.

8. The method according to claim 7, characterized in that, The method further includes: If the identifier of the die corresponding to the first operation request does not exist in the scheduling list, and there is an operation request in the operation request queue corresponding to the die of the first operation request, then the identifier of the die corresponding to the first operation request is inserted into the scheduling list in ascending order of the first insertion time of the operation request queue.

9. The method according to claim 1, characterized in that, The method further includes: If the power consumption of the package corresponding to the operation request is less than the power consumption threshold, then the operation request is sent to the flash memory space. Once the operation request is completed, update the power consumption of the package corresponding to the operation request.

10. A flash memory device, characterized in that, include: A processor and a memory, the processor being configured to execute executable program code in the memory, wherein when the executable program code is executed, the processor executes instructions of the power consumption control method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the power consumption control method as described in any one of claims 1 to 9.