Demand charge optimization control method and device, and storage medium
Patent Information
- Application Number
- CN202611170743.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-04
AI Technical Summary
[0004]然而,现有技术是基于固定阈值触发,未考虑需量计量采用滑动窗口计算平均功率的特性,导致削峰时机与超限风险不匹配,响应存在滞后,导致对需量功率峰值的抑制程度不足
[0053]本申请提供的需量电费优化控制方法、装置及存储介质,该方法通过监测需量计量滑动窗口内的功率数据并确定当前平均功率,结合图形处理器的任务调度特征预测滑动窗口结束时的预测需量功率,能够更贴合需量计量的滑动窗口特性及人工智能数据中心中图形处理器负载的突发变化,提前识别需量超限风险;进而通过在预测需量功率超过设定值时,根据超限风险等级以及储能系统的荷电状态分级执行功率控制措施,能够在提高需量控制准确性与响应及时性的同时减少不必要的储能充放电,进而提高需量电费优化效果。
Smart Images

Figure CN122675146B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power control technology, and in particular to a demand-cost optimization control method, device and storage medium. Background Technology
[0002] Electricity costs constitute a large proportion of total operating costs for data centers. Electricity charges consist of power consumption charges and demand charges, with demand charges calculated based on the maximum power demand during the billing cycle. As the amount of data to be processed grows exponentially, the power fluctuation range of data centers increases dramatically. Instantaneous peaks can easily drive up power demand, leading to a significant increase in demand charges.
[0003] In existing technologies, energy storage systems are typically used for peak shaving control to reduce demand-based electricity costs. Specifically, load power is monitored in real time, and when the power exceeds a preset threshold, the energy storage system is controlled to discharge, thereby suppressing power peaks and reducing demand during the billing cycle.
[0004] However, existing technologies are based on fixed threshold triggering and do not take into account the characteristics of demand metering using a sliding window to calculate average power. This results in a mismatch between peak shaving timing and over-limit risk, and a lag in response, leading to insufficient suppression of demand power peaks. Summary of the Invention
[0005] This application provides a demand-based electricity cost optimization control method, apparatus, and storage medium to solve the aforementioned technical problems. This solution targets data center scenarios including graphics processors (GPUs). By combining the power status within a window during demand metering, the GPU load change trend, and energy storage availability, it predicts and implements targeted control to mitigate demand exceedance risks. This improves the accuracy, timeliness, and economy of demand-based electricity cost optimization control under the constraints of demand metering rules.
[0006] In a first aspect, this application provides a method for optimizing demand-based electricity pricing control, comprising:
[0007] Monitor the power data within the sliding window of demand measurement, and determine the average power within the sliding window up to the current time as the current average power;
[0008] The task scheduling characteristics of the graphics processor are obtained, and the power trajectory of the graphics processor during the period from the current time to the end of the sliding window is predicted based on the task scheduling characteristics. The predicted power demand at the end of the sliding window is determined based on the power trajectory and the current average power.
[0009] When the predicted power demand exceeds the set value, calculate the excess ratio of the predicted power demand exceeding the set value;
[0010] When the excess ratio is less than the first ratio threshold, the excess risk level is determined to be Level 1 risk; when the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold, the excess risk level is determined to be Level 2 risk; when the excess ratio is greater than or equal to the second ratio threshold, the excess risk level is determined to be Level 3 risk; wherein, the first ratio threshold is less than the second ratio threshold.
[0011] Based on the aforementioned risk level of exceeding limits and the state of charge of the energy storage system, power control measures are implemented in stages.
[0012] In one possible embodiment, obtaining the task scheduling characteristics of the graphics processor and predicting the power trajectory of the graphics processor during the period from the current moment to the end of the sliding window based on the task scheduling characteristics includes:
[0013] Obtain the task scheduling queue of the graphics processor during the time period;
[0014] The task scheduling queue is parsed to obtain the type identifier, task size parameter, and execution time point of each task to be executed.
[0015] Based on the type identifier and the task size parameter, determine the reference power curve corresponding to each task to be executed from the preset power consumption feature library;
[0016] Based on the execution time point corresponding to each task to be executed, the reference power curve is mapped to the corresponding time axis position within the time period, and the power values of each reference power curve mapped to the same time point are added together to obtain the power trajectory.
[0017] In one possible embodiment, the step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes:
[0018] When the risk level of exceeding the limit is the first-level risk, calculate the power difference between the predicted power demand and the set value;
[0019] The energy storage system is controlled to discharge at a first discharge power corresponding to the power difference to make up for the energy consumption gap caused by the power difference.
[0020] In one possible embodiment, the step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes:
[0021] When the risk level of exceeding the limit is level two, the energy storage system is controlled to discharge at the maximum available power that can be provided at present.
[0022] In one possible embodiment, the step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes:
[0023] When the risk level of the over-limit is level three and the state of charge of the energy storage system is less than the preset charge threshold, the energy storage system is controlled to discharge at the maximum available power that can be provided at present, and the graphics processor is frequency reduced, and the frequency reduction is within the first frequency reduction range.
[0024] In one possible embodiment, the step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes:
[0025] When the risk level of the over-limit is level three and the remaining time of the sliding window is less than a preset time threshold, the energy storage system is controlled to discharge at the maximum available power that can be provided at present, and the graphics processor is frequency-reduced, and the frequency reduction is within the second frequency reduction range.
[0026] In one possible embodiment, performing frequency reduction on the graphics processor includes:
[0027] Obtain a preset frequency reduction range, and determine the target frequency reduction magnitude within the frequency reduction range with the goal of minimizing the total monthly electricity cost;
[0028] The target frequency reduction range is constrained by the energy storage system's cycle life loss value not exceeding a preset life loss threshold, and the target frequency reduction range is used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
[0029] Secondly, this application provides a demand-based electricity cost optimization control device, comprising:
[0030] The processing module is used to monitor the power data within the sliding window of demand measurement and determine the average power within the sliding window up to the current time as the current average power;
[0031] The acquisition module is used to acquire the task scheduling characteristics of the graphics processor;
[0032] The processing module is further configured to predict the power trajectory of the graphics processor from the current moment to the end of the sliding window based on the task scheduling features, and determine the predicted power demand at the end of the sliding window based on the power trajectory and the current average power.
[0033] The calculation module is used to calculate the excess ratio of the predicted power demand exceeding the set value when the predicted power demand exceeds the set value.
[0034] The processing module is further configured to determine the risk level as Level 1 when the excess ratio is less than a first ratio threshold; determine the risk level as Level 2 when the excess ratio is greater than or equal to the first ratio threshold and less than a second ratio threshold; and determine the risk level as Level 3 when the excess ratio is greater than or equal to the second ratio threshold; wherein the first ratio threshold is less than the second ratio threshold.
[0035] The processing module is also used to implement power control measures in stages according to the risk level of exceeding limits and the state of charge of the energy storage system.
[0036] In one possible embodiment, the acquisition module is further configured to acquire the task scheduling queue of the graphics processor during the time period;
[0037] The processing module is also used to parse the task scheduling queue to obtain the type identifier, task size parameters and execution time point corresponding to each task to be executed.
[0038] The processing module is further configured to determine the reference power curve corresponding to each task to be executed from a preset power consumption feature library based on the type identifier and the task size parameter.
[0039] The processing module is further configured to map the reference power curve to the corresponding time axis position within the time period according to the execution time point corresponding to each task to be executed, and to add the power values of each reference power curve mapped to the same time to obtain the power trajectory.
[0040] In one possible embodiment, the calculation module is further configured to calculate the power difference between the predicted demand power and the set value when the risk level of exceeding the limit is the first level of risk;
[0041] The processing module is also used to control the energy storage system to discharge at a first discharge power corresponding to the power difference, so as to make up for the energy consumption gap caused by the power difference.
[0042] In one possible embodiment, the processing module is further configured to control the energy storage system to discharge at the maximum available power currently available when the risk level of the over-limit is level two.
[0043] In one possible embodiment, the processing module is further configured to control the energy storage system to discharge at the maximum available power currently available when the over-limit risk level is level three and the state of charge of the energy storage system is less than a preset charge threshold, and to perform frequency reduction on the graphics processor, wherein the frequency reduction is within a first frequency reduction range.
[0044] In one possible embodiment, the processing module is further configured to control the energy storage system to discharge at the maximum available power currently available, and to reduce the frequency of the graphics processor when the risk level of the over-limit is level three and the remaining time of the sliding window is less than a preset time threshold, wherein the frequency reduction is within a second frequency reduction range.
[0045] In one possible embodiment, the acquisition module is further configured to acquire a preset frequency reduction range;
[0046] The processing module is also used to determine the target frequency reduction range within the frequency reduction range with the goal of minimizing the total monthly electricity cost;
[0047] The target frequency reduction range is constrained by the energy storage system's cycle life loss value not exceeding a preset life loss threshold, and the target frequency reduction range is used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
[0048] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0049] The memory stores computer-executed instructions;
[0050] The processor executes computer execution instructions stored in the memory to implement the demand charge optimization control method as described in the first aspect and various possible implementations of the first aspect.
[0051] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions thereon, which, when executed by a processor, are used to implement the demand-based electricity cost optimization control method as described in the first aspect and various possible implementations of the first aspect.
[0052] Fifthly, this application provides a program product, including a computer program, which, when executed by a processor, implements the demand-based electricity cost optimization control method described above.
[0053] The demand-based electricity cost optimization control method, device, and storage medium provided in this application monitor power data within the demand metering sliding window and determine the current average power. By combining the task scheduling characteristics of the graphics processor, the predicted demand power at the end of the sliding window is predicted. This method can better match the characteristics of the demand metering sliding window and the sudden changes in the graphics processor load in the artificial intelligence data center, and identify the risk of demand exceeding limits in advance. Furthermore, when the predicted demand power exceeds the set value, power control measures are implemented in stages according to the level of the risk of exceeding limits and the state of charge of the energy storage system. This can improve the accuracy and timeliness of demand control while reducing unnecessary energy storage charging and discharging, thereby improving the demand-based electricity cost optimization effect. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 A flowchart illustrating a demand-based electricity cost optimization control method provided in this application. Figure 1 ;
[0056] Figure 2 A flowchart illustrating a demand-based electricity cost optimization control method provided in this application. Figure 2 ;
[0057] Figure 3 A schematic diagram of a demand-based electricity cost optimization control device provided in this application;
[0058] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application.
[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0061] First, let me explain the terms used in this application:
[0062] AIDC (Artificial Intelligence Data Center) is a high-performance computing infrastructure specifically designed to support artificial intelligence training. It deploys a large number of graphics processing units (GPUs) or dedicated AI acceleration chips, interconnected via high-speed networks to form a massively parallel computing cluster. Unlike traditional data centers that primarily rely on general-purpose CPUs (Central Processing Units) for computing, the core characteristic of AIDCs is their high computing density and high power load for AI (Artificial Intelligence) computing tasks, with significant power fluctuations occurring during AI training. In this application, AIDC specifically refers to an artificial intelligence data center deploying GPU training clusters, and the power fluctuation characteristics of its GPU training tasks are the core target of the demand-based power cost optimization control method in this application.
[0063] Demand charge: This refers to the fee charged by the power grid company to users based on their maximum power demand within a settlement period (usually one month). Power demand is measured using a sliding window method, which continuously calculates the average power over a fixed-length time window and uses the maximum average value across all windows within the settlement period as the basis for billing. Essentially, the demand charge is an infrastructure usage fee paid by users for occupying the power grid's transmission and distribution capacity; it represents a fair allocation of power grid construction costs on the user side. In this application, the demand charge is a core component of AIDC operating costs, and its value is easily and significantly increased by instantaneous power spikes generated by GPU training tasks. It is the direct optimization target of the demand charge optimization control method in this application.
[0064] This application relates to demand-based electricity cost optimization and control for industrial and commercial users, and is particularly applicable to artificial intelligence data centers configured with graphics processing unit (GPU) clusters. Such scenarios typically include a power metering system, a GPU task scheduling system, and an energy storage system. The power metering system continuously collects power data from the data center, the task scheduling system reflects the GPU task execution rhythm, and the energy storage system is used for peak shaving during power fluctuations.
[0065] As a core infrastructure of the AI industry, the electricity cost of AIDC (AI Data Center) accounts for 60% to 70% of its total operating cost. Electricity bills for industrial and commercial users typically consist of two parts: power consumption charge and demand charge. The demand charge is calculated based on the user's maximum power demand during the billing cycle and represents the cost the user pays in advance for grid capacity. With the continuous expansion of large-scale AI model training, the power density and load fluctuation of AIDCs are increasing dramatically. For example, during AI training, device power can change drastically within milliseconds. This high-frequency, large-amplitude power fluctuation makes the demand power of AIDCs easily spiked by instantaneous peaks, leading to a significant increase in demand charge.
[0066] In existing technologies, energy storage systems are typically used for peak shaving control to reduce demand-based electricity costs. This involves triggering energy storage charging and discharging control based on real-time power monitoring results or preset thresholds, and reducing power voltage when the load is detected to be close to the upper limit, in order to avoid excessively high maximum demand power during the billing cycle.
[0067] However, graphics processing unit (GPU) tasks are highly phased and unpredictable, with training and data loading processes easily causing instantaneous power spikes. Controlling power solely based on the current power value or a fixed threshold, and failing to reflect the cumulative impact of the sliding window's later stages, can result in power demands still exceeding limits at the end of the window.
[0068] In view of this, how to balance the accuracy and timeliness of demand control with the cost of energy storage has become an urgent technical problem to be solved.
[0069] To address the aforementioned technical issues, this application provides a demand-based electricity cost optimization control method. By monitoring power data within a demand metering sliding window and determining the current average power, the method acquires the task scheduling characteristics of the graphics processor to predict the power trajectory and demand power before the sliding window ends. When the predicted demand power exceeds a set value, the method determines the over-limit risk level and combines the state of charge of the energy storage system to implement power control measures, thereby improving the pertinence and effectiveness of demand-based electricity cost optimization control.
[0070] This method can be deployed in an AIDC demand-based electricity cost optimization and management system that includes a power monitoring module, a GPU task scheduling interface, a power prediction module, a control decision module, an energy storage system, and a GPU frequency reduction execution unit. By real-time monitoring of the sliding window average power, power trajectory prediction driven by GPU task scheduling features, and coordinated invocation of a graded control strategy that links the over-limit risk level with the energy storage state of charge, intelligent coordination between energy storage discharge and GPU frequency reduction is achieved. This effectively suppresses peak demand power and reduces demand-based electricity costs while ensuring GPU training throughput.
[0071] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0072] Figure 1 A flowchart illustrating a demand-based electricity cost optimization control method provided in this application embodiment. Figure 1 .like Figure 1 As shown, the demand-based electricity cost optimization control method provided in this embodiment is applied to a data center, which includes a graphics processor and includes:
[0073] S101. Monitor the power data within the sliding window of the demand meter and determine the average power within the sliding window up to the current time as the current average power.
[0074] Demand metering refers to the method of measuring the average power of users within a certain time interval in the power system. It is used to determine the maximum demand value of users in the billing cycle, which serves as the basis for calculating demand-based electricity charges.
[0075] A sliding window refers to a measurement window with a fixed time length (such as 15 minutes or 30 minutes). The window slides forward continuously at preset time intervals (such as 1 second to 5 seconds), and the average power within the window is recalculated after each slide.
[0076] One possible implementation is to collect instantaneous power data of the AIDC in real time through a power monitoring module, and store the collected instantaneous power data into the buffer of the current sliding window at each collection moment.
[0077] At the end of each sliding interval, all power data cached within the current sliding window is read, and the arithmetic mean of these power data is calculated. This calculated average is used as the current average power at the current moment. This current average power is continuously updated as the sliding window advances and new power data is continuously written. Once the current average power is determined, it is used as the basis for subsequent demand exceedance risk assessment and compared with the predicted demand power.
[0078] Real-time monitoring via a high-frequency sliding window can accurately reflect the average power level within the current demand window up to the current moment, providing a precise data foundation for subsequent power trajectory prediction and over-limit risk assessment.
[0079] S102. Obtain the task scheduling characteristics of the graphics processor, predict the power trajectory of the graphics processor from the current time to the end of the sliding window based on the task scheduling characteristics, and determine the predicted power demand at the end of the sliding window based on the power trajectory and the current average power.
[0080] Among them, task scheduling features refer to various attribute information related to task scheduling during the execution of computing tasks by the graphics processor, including but not limited to the type identifier of the task to be executed, the task size parameters, and the execution time point corresponding to each task to be executed.
[0081] A power trajectory refers to a sequence of power values of a graphics processing unit (GPU) arranged chronologically over a future period. The power trajectory reflects the predicted power of the GPU at each moment and its trend over time, showcasing dynamic characteristics such as power increases, decreases, and jumps.
[0082] One possible implementation is to obtain a task scheduling queue through the graphics processor's task scheduling interface. This queue records all tasks that the graphics processor needs to execute during the period from the current moment to the end of the sliding window.
[0083] The task scheduling queue is parsed, and the type identifier, task size parameter, and corresponding execution time point of each task entry are extracted. Based on the extracted type identifier and task size parameter, a pre-set power consumption feature library is accessed. The power consumption feature library pre-stores baseline power curves for various tasks at different sizes. The type identifier and size parameter of the current task are matched with the records in the power consumption feature library to determine the baseline power curve corresponding to each task to be executed.
[0084] Based on the execution time of each task, each baseline power curve is mapped to its corresponding time axis position. That is, within the time interval of task execution, the baseline power curve for that task is placed on the corresponding time period. When multiple tasks are executed in parallel at the same time, the execution entity adds the power values of the baseline power curves of each task at that time to obtain the total predicted power for that time. Arranging the total predicted power at all times in chronological order constitutes the power trajectory of the graphics processor within that time period.
[0085] After the power trajectory is constructed, the average power at the end of the sliding window is estimated based on the power trajectory and the current average power. Specifically, the predicted power values at each moment in the power trajectory are combined with the historical power data collected within the current sliding window to calculate the average power over the entire sliding window length, which is used as the predicted demand power at the end of the sliding window.
[0086] By analyzing the task scheduling queue of the graphics processor and extracting task scheduling features, the type, scale, and execution sequence of each task can be accurately identified, thus predicting its power consumption characteristics before the task is actually executed.
[0087] S103. When the predicted power demand exceeds the set value, calculate the over-limit ratio of the predicted power demand exceeding the set value.
[0088] The over-limit ratio refers to the percentage of predicted demand power exceeding the set value, used to quantify the severity of demand exceeding limits. A higher over-limit ratio indicates a higher risk of demand exceeding limits.
[0089] One possible implementation involves comparing the predicted power demand with a pre-stored setpoint to determine if the predicted power demand exceeds the setpoint. If the predicted power demand is less than or equal to the setpoint, it indicates that under the current power trajectory, the power demand at the end of the sliding window will not exceed the allowable upper limit, thus eliminating the risk of demand exceeding limits and eliminating the need to trigger subsequent power control measures; monitoring can then resume.
[0090] If the predicted demand power is greater than the set value, it indicates that under the current power trajectory, the demand power at the end of the sliding window will exceed the allowable upper limit, resulting in a demand over-limit risk. The difference between the predicted demand power and the set value is calculated as the over-limit amount. This over-limit amount is then divided by the set value to obtain a dimensionless ratio, which is used as the over-limit ratio. This over-limit ratio reflects the relative severity of the demand over-limit; a larger value indicates a more severe over-limit and requires greater power control measures. After calculation, the over-limit ratio is output as the basis for subsequent over-limit risk level classification.
[0091] S104. When the excess ratio is less than the first ratio threshold, the excess risk level is determined to be Level 1 risk; when the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold, the excess risk level is determined to be Level 2 risk; when the excess ratio is greater than or equal to the second ratio threshold, the excess risk level is determined to be Level 3 risk.
[0092] The first proportional threshold is a pre-set minimum risk classification boundary value used to distinguish between Level 1 and Level 2 risks; the second proportional threshold is a pre-set higher risk classification boundary value, which is greater than the first proportional threshold, used to distinguish between Level 2 and Level 3 risks.
[0093] Level 1 risk, Level 2 risk, and Level 3 risk are three levels that classify the degree of risk of exceeding limits. The degree of risk increases in that order, and each level corresponds to a different intensity of power control measures.
[0094] After calculating the excess ratio, the excess ratio is compared with the pre-stored first ratio threshold and second ratio threshold, and the corresponding risk level is determined based on the comparison results.
[0095] One possible implementation is as follows: when the excess ratio is less than a first ratio threshold, it indicates a minor exceedance of the predicted power demand by the set value, and the excess risk level is determined as Level 1 risk. When the excess ratio is greater than or equal to the first ratio threshold but less than a second ratio threshold, it indicates a moderate level of excess, and the excess risk level is determined as Level 2 risk. When the excess ratio is greater than or equal to the second ratio threshold, it indicates a severe level of excess, and the excess risk level is determined as Level 3 risk. Here, both the first and second ratio thresholds are preset values, with the first ratio threshold being less than the second ratio threshold, collectively defining the excess ratio ranges corresponding to the three risk levels.
[0096] Once the risk level is determined, the corresponding level information will be transmitted to the subsequent tiered execution steps.
[0097] S105. Based on the risk level of exceeding limits and the state of charge of the energy storage system, implement power control measures in stages.
[0098] Among them, power control measures refer to the general term for various power regulation operations performed to suppress excessive power demand, such as power regulation of energy storage systems (such as energy storage discharge) and frequency reduction operation of graphics processors.
[0099] The state of charge (SBC) of an energy storage system refers to the percentage of its total capacity that is currently available. It characterizes the level of available electrical energy reserves. A higher SBC indicates that the energy storage system can provide greater discharge power and for a longer duration; a lower SBC indicates that the energy storage system has less available electricity and requires careful use to avoid over-discharge.
[0100] One possible approach is to determine the risk level of exceeding limits, obtain the current state of charge of the energy storage system, compare the state of charge with a preset state of charge threshold, and determine whether the available power of the energy storage system is sufficient to support the discharge operation.
[0101] Based on the risk level of exceeding limits and the state of charge (SBC) of the energy storage system, the power control measures to be implemented are determined from a pre-defined tiered strategy. The tiered strategy predefines the types and intensities of control measures to be implemented under different combinations of risk levels and SBCs. Different combinations of risk levels and SBCs correspond to different combinations of power control measures.
[0102] Specifically, when the risk is low or the state of charge (SOC) is high, energy storage power regulation is prioritized to fully utilize the rapid response and dispatchability of the energy storage system. When the risk is high and the SOC is low, the available power of the energy storage system is insufficient to support sufficient discharge operations, requiring supplementary power regulation by the graphics processor (GPU). This is achieved by reducing the GPU's operating frequency to further reduce total power consumption. After determining the power control measures, corresponding control commands are issued to the energy storage system and / or the GPU. The energy storage system executes the corresponding power regulation actions according to the commands, and the GPU executes the corresponding frequency adjustment actions according to the commands.
[0103] This embodiment provides a demand-based electricity cost optimization control method. This method monitors the current average power within the demand metering sliding window in real time and predicts its power trajectory from the current moment to the end of the sliding window by combining the task scheduling characteristics of the graphics processor. Then, it determines the predicted demand power at the end of the sliding window. When the predicted demand power exceeds a set value, it determines the over-limit risk level according to the excess ratio. Then, it implements power control measures according to the over-limit risk level and the state of charge of the energy storage system. This allows the peak shaving action to be initiated in advance before the demand over-limit risk occurs, avoiding the problem of mismatch between peak shaving timing and over-limit risk caused by response lag under the fixed threshold triggering method.
[0104] Figure 2 A flowchart illustrating a demand-based electricity cost optimization control method provided in this application embodiment. Figure 2 .like Figure 2 As shown, in Figure 1 Based on the examples, the demand-based electricity cost optimization control method is described in detail, including:
[0105] S201. Obtain the task scheduling queue of the graphics processor within the time period.
[0106] The task scheduling queue refers to the list of tasks to be executed in the order of execution within the task scheduling system of the Graphics Processing Unit (GPU). This queue records the various computational tasks that the GPU needs to execute in the near future, along with their related information, including task type, execution time, and resource requirements. The task scheduling queue reflects the GPU's workload plan and serves as the data foundation for predicting its future power consumption.
[0107] One possible implementation involves determining the start and end times of the prediction when forecasting the graphics processor's power trajectory. The start time is the current moment, and the end time is the end time of the current sliding window. Based on this time range, a request is made to the graphics processor's task scheduling system to obtain the task execution plan for that time period.
[0108] Specifically, by calling the task query interface provided by the task scheduling system, a query command carrying a time range is sent to the task scheduling system. After receiving the query command, the task scheduling system retrieves all tasks to be executed within that time range from its internally maintained task queue, encapsulates the relevant information of these tasks, and returns it to form a task scheduling queue. This queue contains information such as the task identifier, task type, start time, and duration of each task to be executed.
[0109] S202. Parse the task scheduling queue to obtain the type identifier, task size parameters, and execution time point of each task to be executed.
[0110] The type identifier is used to uniquely identify the type of task. Different types of computational tasks have different computational characteristics and power consumption characteristics. For example, model training tasks are usually accompanied by high-intensity matrix operations and periodic large-scale data read and write operations, while the computational load of model inference tasks is relatively fixed and the power consumption fluctuates less.
[0111] Task size parameters are used to quantify the computational load or data processing scale of a task, such as batch size and the number of model parameters in a model training task. Task size parameters directly affect the task's power consumption. Larger scale tasks involve higher computational intensity and correspondingly higher power consumption.
[0112] One possible implementation involves, after acquiring the task scheduling queue, sequentially reading the data entries of each task starting from the head of the queue. For each task entry, according to a predefined queue data structure format, the task type field is located and extracted from the data entry, and the value of this field is used as the type identifier of the task. The task size parameter is read from the current task entry, which records the computational workload or data processing scale of the task. The execution time information of the task is also read from the current task entry, including the planned start time and expected duration of the task, forming the execution time points corresponding to each task to be executed.
[0113] The relevant information of each task entry in the task scheduling queue is read sequentially in the manner described above. The parsed data is then stored as a group by task, forming a table showing the correspondence between the type identifier, task size parameters, and execution time of each task to be executed. If any data entry in the task scheduling queue is missing task size parameters or execution time information, the task is marked as missing information, and the power curve matching for that task is skipped in subsequent steps.
[0114] S203. Based on the type identifier and task size parameters, determine the reference power curve corresponding to each task to be executed from the preset power consumption feature library.
[0115] The pre-built power consumption characteristic library refers to a power characteristic database that is pre-built and stored in the system. This database records the typical power consumption curves of various computing tasks under different task scales. The construction of the power consumption characteristic library is based on the collection, statistics and analysis of historical power data of the graphics processor when performing various tasks, and the power curve shapes under different task types and scale parameters are solidified and stored in the form of structured data.
[0116] One possible implementation involves parsing the task scheduling queue to obtain the type identifier and task size parameters of each task to be executed, and then searching and matching in a pre-defined power consumption feature library for each task. Specifically, for the current task to be executed, the power feature record area corresponding to the task type is located in the power consumption feature library based on the task type identifier. The power consumption feature library is organized according to task type, and records under the same type are stored hierarchically according to different size parameter ranges.
[0117] After locating the record area corresponding to the task type, the system further searches for a baseline power curve record that matches the current scale parameter among multiple records of that type. Each record in the power consumption feature library is associated with a scale parameter range. When the scale parameter of the current task falls within the scale parameter range of a certain record, the power curve in that record is determined as the baseline power curve for that task. If the scale parameter of the current task happens to fall on the boundary between two adjacent ranges, its assignment is determined according to a preset range assignment rule.
[0118] Following the above method, a matching operation is performed sequentially on each task to be executed in the task scheduling queue until all tasks are matched with the corresponding baseline power curve. If the type identifier of a task cannot be found in the power consumption feature library, the task is marked as an unknown type task and processed according to the preset default power curve.
[0119] S204. Based on the execution time point corresponding to each task to be executed, map the reference power curve to the corresponding time axis position within the time period, and add the power values of each reference power curve mapped to the same time point to obtain the power trajectory.
[0120] Mapping refers to the operation of placing the baseline power curve of each task to be executed onto the corresponding time axis position within the prediction period according to its corresponding execution time point. The baseline power curve of each task is expanded on the time axis according to its duration, starting from its start time point, forming the power contribution range of the task within the prediction period.
[0121] One possible implementation involves determining the baseline power curve for each task to be executed, and then placing the baseline power curve onto the time axis of the predicted period task by task. Specifically, for the current task to be executed, the execution time point of the task is read, and the start time of that time point is used as the starting position of the baseline power curve on the time axis. According to the relative time offset and corresponding power value recorded in the baseline power curve, the power contribution value of the task is placed at the corresponding position on the time axis. If there is a deviation between the duration of the baseline power curve and the actual duration of the task, the time axis span of the curve is adjusted according to a preset scaling rule to match the actual duration.
[0122] When multiple tasks are executed in parallel at the same time, the power contribution values of each task at that time are accumulated. Specifically, the system scans point by point at preset time intervals within the prediction period. For each scan time, all tasks in the execution state at that time are identified, and the power values of each task at that time are added together to obtain the total predicted power of the graphics processor at that time. The total predicted power values of each time are arranged sequentially according to time to form the complete power trajectory of the graphics processor within the prediction period.
[0123] After the power trajectory is generated, it is used as input data for subsequent demand exceedance judgment and is used to calculate the predicted demand power at the end of the sliding window.
[0124] By converting task categories, task sizes, and execution times in the task scheduling queue into power curves and mapping and overlaying them on a time axis, the output can reflect the power change trend of the graphics processor during the remaining time of the sliding window. This method keeps the power trajectory consistent with the task scheduling rhythm, thereby providing input for predicting the predicted power demand at the end of the sliding window and improving the correspondence between subsequent over-limit judgment and energy storage control.
[0125] S205. Determine the predicted power demand at the end of the sliding window based on the power trajectory and the current average power.
[0126] Among them, the predicted demand power refers to the average power value of the current sliding window at the end time, which is calculated based on the predicted power trajectory of the graphics processor and the historical power data collected within the current sliding window.
[0127] One possible implementation is to merge the power trajectory of the graphics processor from the current moment to the end of the sliding window with the historical power data already collected within the current sliding window after constructing the power trajectory of the graphics processor from the current moment to the end of the sliding window.
[0128] Specifically, all historical power data from the start time of the current sliding window to the current time are obtained, and then the predicted power values at each time point in the prediction period are appended to the historical power data to form a complete power data sequence covering the entire length of the sliding window (historical part + prediction part).
[0129] The arithmetic mean of all power values in the complete power data sequence is calculated, that is, the historical power data and the predicted power data are averaged as a whole. The result is the predicted demand power at the end of the sliding window. This predicted demand power reflects the possible value of the demand power at the end of the sliding window under the current power trajectory.
[0130] S206. When the predicted power demand exceeds the set value, calculate the over-limit ratio of the predicted power demand exceeding the set value.
[0131] Step S206 is similar to the aforementioned step S104, and will not be described again here.
[0132] S207. When the excess ratio is less than the first ratio threshold, the excess risk level is determined to be Level 1 risk.
[0133] Understandably, a pre-stored first proportional threshold is retrieved, and the excess ratio is compared with the first proportional threshold. When the excess ratio is determined to be less than the first proportional threshold, it indicates that although the current predicted demand power exceeds the set value, the excess portion accounts for a small proportion of the set value, and the degree of excess is minor. The current demand excess risk level is determined as Level 1 risk, which is the lowest level of risk.
[0134] Once a risk level is identified as Level 1, it will serve as the basis for subsequent tiered power control measures, and the power control strategy corresponding to Level 1 risk will be invoked.
[0135] Specifically, the power control strategy corresponding to Level 1 risk is as follows: when the risk level of exceeding the limit is Level 1 risk, calculate the power difference between the predicted power demand and the set value.
[0136] The energy storage system is controlled to discharge at the first discharge power corresponding to the power difference in order to make up for the energy consumption gap caused by the power difference.
[0137] The power difference refers to the difference between the predicted power demand and the set demand value, reflecting the specific amount by which the current power demand exceeds the allowable upper limit. This difference represents the power shortfall that needs to be made up through energy storage discharge or other power control measures, and it serves as the basis for determining the magnitude of the energy storage discharge power.
[0138] The first discharge power refers to the energy storage discharge power value determined based on the power difference under the first-level risk level. The magnitude of the first discharge power corresponds to the power difference, aiming to discharge with a power that matches the deficit, neither over-compensating nor under-compensating.
[0139] Specifically, when the risk level of exceeding the limit is determined to be Level 1, the difference between the predicted power demand and the set value is calculated to obtain the power deficit that needs to be compensated. Based on the calculated power difference, the first discharge power of the energy storage system is determined. The first discharge power corresponds to the power difference, and the first discharge power is issued to the energy storage system as a discharge power command. The energy storage system discharges according to this command at the first discharge power, offsetting the power demand on the grid side by outputting power, thereby supplementing the power demand to within the set value.
[0140] The system continuously monitors power changes within the sliding window. When the power difference changes with load variations, it dynamically adjusts the initial discharge power to ensure the energy storage discharge power always follows the power difference. When the sliding window ends, the system stops discharging.
[0141] By using the above method, in Level 1 risk scenarios, there is no need to rely on the threshold judgment of the energy storage state of charge. The discharge power is directly determined based on the power difference, which enables the discharge power of the energy storage system to be precisely matched with the actual power shortage of demand. The power output always keeps in sync with the change of demand power. In the remaining time of the sliding window, the demand power is effectively supplemented with the lowest power consumption, which improves the economy of energy utilization of the energy storage system, simplifies the control logic, and improves the response speed.
[0142] S208. When the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold, the excess risk level is determined to be Level II risk.
[0143] Understandably, if the over-limit ratio is determined to be greater than or equal to the first ratio threshold, it is further compared with the second ratio threshold. When the over-limit ratio is determined to be greater than or equal to the first ratio threshold but less than the second ratio threshold, it indicates that the current predicted demand power exceeds the set value to a moderate level, neither falling into the category of slight over-limit (Level 1 risk) nor reaching the level of severe over-limit (Level 3 risk). The current demand over-limit risk level is determined to be Level 2 risk, i.e., a moderate risk level.
[0144] The secondary risk level will serve as the basis for subsequent tiered power control measures, and the power control strategy corresponding to the secondary risk level will be invoked.
[0145] Specifically, the power control strategy corresponding to Level 2 risk is as follows: when the over-limit risk level is Level 2, the energy storage system is controlled to discharge at the maximum available power that can be provided at present.
[0146] The maximum available power refers to the maximum discharge power that the energy storage system can continuously output under current operating conditions. The maximum available power is constrained by the rated power of the energy storage system, the current state of charge, temperature, voltage, and system protection limits, and may have different values at different times.
[0147] Specifically, when the risk level of exceeding limits is determined to be Level 2, the maximum available power of the energy storage system under its current operating condition is obtained. This power value is calculated and provided in real time by the energy storage system's battery management system based on parameters such as current state of charge, temperature, and voltage. The maximum available power is then sent to the energy storage system as a discharge power command, controlling the system to discharge at this power. The energy storage system continuously outputs power according to this command at its maximum available power to offset the power demand on the grid side to the greatest extent possible.
[0148] The system continuously monitors power changes within the sliding window and controls the energy storage system to stop full-power discharge when the sliding window ends.
[0149] In this way, the implementing entity does not need to rely on the threshold judgment of the energy storage state of charge in secondary risk scenarios, but can directly control the energy storage system to discharge at its current maximum available power. When a moderate level of over-limit risk occurs, the energy storage system can smooth out the peak demand power with the maximum capacity it can provide. At the same time, since the maximum available power is calculated in real time by the battery management system based on the current operating status, the energy storage system always discharges at the maximum power that can be safely output under the current conditions, which not only maximizes the peak shaving effect, but also ensures the operational safety of the energy storage system.
[0150] S209. When the excess ratio is greater than or equal to the second ratio threshold, the excess risk level is determined to be Level 3 risk.
[0151] Understandably, when the over-limit ratio is greater than or equal to the second ratio threshold, it indicates that the current predicted power demand exceeds the set value to a high degree, belonging to the most serious level of demand over-limit risk.
[0152] The current demand exceedance risk level is determined to be Level 3, the highest level of risk. Once determined to be Level 3, this level will serve as the basis for subsequent tiered power control measures. The power control strategy corresponding to Level 3 risk will be invoked, namely a composite control strategy combining energy storage discharge and graphics processor frequency reduction, to comprehensively suppress peak demand power.
[0153] Specifically, the power control strategy corresponding to Level 3 risk is as follows:
[0154] Scenario 1: When the risk level of the over-limit is level three and the state of charge of the energy storage system is less than the preset charge threshold, the energy storage system is controlled to discharge at the maximum available power that can be provided at present, and the frequency of the graphics processor is reduced, with the reduction range being within the first reduction range.
[0155] Among them, the preset charge threshold is a pre-set low charge state alarm value. When the charge state of the energy storage system is lower than this threshold, it indicates that the available power of the energy storage system is insufficient to support the power demand suppression requirement alone, and the graphics processor frequency reduction needs to be enabled as a supplementary measure.
[0156] The first frequency reduction range is a pre-defined range of lower frequency reduction amplitude. Within this range, frequency reduction of the graphics processor can be performed to minimize the impact on the training task while supplementing insufficient power storage.
[0157] Specifically, when the risk level of exceeding the limit is determined to be Level 3, the current state of charge (SBC) of the energy storage system is obtained and compared with a preset SBC threshold. If the current SBC is less than the preset SBC threshold, it indicates that the available power of the energy storage system is insufficient to independently complete the task of suppressing the required power. At the same time, the energy storage system is controlled to discharge at the maximum available power it can provide, and a frequency reduction control command is generated and sent to the graphics processor. The graphics processor is then controlled to execute the frequency reduction operation, and the frequency reduction range is within the first frequency reduction range.
[0158] The system continuously monitors power changes and the state of charge of the energy storage system within the sliding window. When the sliding window ends, the execution unit controls the energy storage system to stop discharging and controls the graphics processor to return to its operating frequency before frequency reduction.
[0159] Through the above methods, under Level 3 risk and insufficient energy storage state of charge, the coordinated control of full energy storage discharge and moderate GPU frequency reduction, with energy storage as the primary power compensation method and GPU frequency reduction as a supplementary method, not only makes up for the power gap caused by insufficient energy storage output, but also keeps the performance impact on GPU training tasks at a low level. Simultaneously, by setting a third charge threshold as the trigger condition for frequency reduction, the execution entity only activates frequency reduction when the energy storage capacity is truly insufficient, avoiding unnecessary performance intervention and achieving a balance between energy storage capacity protection and demand power suppression.
[0160] Scenario 2: When the risk level of exceeding the limit is level three and the remaining time of the sliding window is less than the preset time threshold, the control energy storage system discharges at the maximum available power that it can currently provide, and the graphics processor is frequency-reduced, with the frequency reduction range being within the second frequency reduction range.
[0161] The preset time threshold is a pre-set emergency time boundary value. When the remaining time of the sliding window is less than this threshold, it indicates that the demand window is about to end. If effective control measures are not taken within a limited time, the average power at the end of the window will inevitably exceed the limit.
[0162] The second frequency reduction range is a pre-set range of higher frequency reduction amplitude, and its lower limit is greater than or equal to the upper limit of the first frequency reduction range.
[0163] Specifically, during the tiered implementation of power control measures, the remaining time of the current sliding window is continuously monitored. The remaining time of the sliding window is compared with a preset time threshold to determine whether an emergency situation is currently in effect. When the remaining time of the sliding window is less than the preset time threshold, it indicates that the demand window is about to end, and the system immediately enters emergency control mode.
[0164] Instead of relying on the risk level of exceeding limits or the state of charge of energy storage for classification, the system directly controls the energy storage system to discharge at the maximum available power it can currently provide. At the same time, it generates a frequency reduction control command and sends it to the graphics processor to control the graphics processor to perform a frequency reduction operation. The frequency reduction range is within the second frequency reduction range.
[0165] The system continuously monitors the power changes of the sliding window. When the sliding window ends, it controls the energy storage system to stop discharging and controls the graphics processor to return to its operating frequency before the frequency reduction.
[0166] By employing the above method, as the sliding window is about to close, regardless of the current risk level or energy storage state of charge, the energy storage system and graphics processor are simultaneously activated with maximum control strength to reduce the frequency, achieving maximum power suppression within the limited time before the window closes. Since the lower limit of the second frequency reduction range is greater than or equal to the upper limit of the first frequency reduction range, the frequency reduction magnitude in emergency mode is higher than in a level three risk scenario, enabling the demand power to be reduced below the set value in the shortest possible time. Simultaneously, because the triggering condition of this emergency mode is independent of the risk level and state of charge, it avoids control delays caused by step-by-step or conditional judgments in time-sensitive situations, ensuring that the average power at the end of the demand window does not exceed the set value, effectively guaranteeing the demand-based electricity cost control effect.
[0167] In some embodiments, downclocking of the graphics processor includes:
[0168] Obtain the preset frequency reduction range, and determine the target frequency reduction magnitude within the frequency reduction range with the goal of minimizing the total monthly electricity cost;
[0169] The target frequency reduction is constrained by the energy storage system's cycle life loss value not exceeding a preset life loss threshold. The target frequency reduction is used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
[0170] Understandably, the preset frequency reduction range is a pre-configured range of selectable frequency reduction magnitudes. The target frequency reduction magnitude is a specific percentage reduction value determined through optimization within the preset frequency reduction range, used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
[0171] In one implementation, a pre-configured frequency reduction range is obtained, where the upper and lower limits correspond to the maximum and minimum frequency reduction allowed by the graphics processor, respectively. An optimization function is constructed with the goal of minimizing the total monthly electricity cost. The decision variable of this optimization function is the target frequency reduction magnitude, and the input parameters include predicted power demand, the current state of charge of the energy storage system, and time-of-use pricing information. A constraint is set in the optimization function that the cycle life loss value of the energy storage system does not exceed a preset life loss threshold. The optimization function is then solved under this constraint to determine the target frequency reduction magnitude that minimizes the total monthly electricity cost within the preset frequency reduction range.
[0172] Based on the target frequency reduction amplitude obtained from the solution, a frequency reduction control command is generated and sent to the graphics processor (GPU) to instruct it to reduce its operating frequency to the target frequency value. The energy storage system is also synchronously controlled to perform corresponding charging and discharging operations according to the energy storage call strategy determined during the optimization process. When the upper limit of the preset frequency reduction range is the maximum value or the lower limit is the minimum value, the corresponding boundary value is directly determined as the target frequency reduction amplitude.
[0173] By employing the above method, the target frequency reduction range is determined with the goal of minimizing total monthly electricity costs. This ensures that the selection of the frequency reduction range is no longer a fixed value or a subjective experience value, but rather an optimal value dynamically calculated based on real-time information such as predicted power demand, energy storage state of charge, and time-of-use pricing. Because the optimization process incorporates constraints on energy storage cycle lifespan degradation, it can proactively control the intensity of energy storage usage while pursuing the minimization of electricity costs, avoiding excessive energy storage degradation due to over-utilization. This achieves a comprehensive balance between short-term electricity cost savings and long-term energy storage economics.
[0174] This embodiment provides a demand-based power cost optimization control method. This method obtains the task scheduling queue of the graphics processor from the current time to the end of the sliding window, parses the type identifier, task size parameters, and execution time point of each task to be executed, determines the reference power curve corresponding to each task from a preset power consumption feature library based on the type identifier and task size parameters, maps the reference power curve to the corresponding time axis position according to the execution time point of each task, and adds the power values of each reference power curve mapped to the same time to obtain the power trajectory. Based on the power trajectory and the current average power, the method determines the power cost. The predicted demand power at the end of the fixed sliding window is used to calculate the over-limit ratio when the predicted demand power exceeds the set value. When the ratio is in different threshold ranges, level 1, level 2, or level 3 risk is determined respectively. Then, power control measures are implemented according to different risk levels and the state of charge of the energy storage system. This realizes the classification of over-limit risks into multiple levels and their linkage with energy storage. Under different risk levels, energy storage discharge and frequency reduction are called in a differentiated manner. Under the premise of ensuring effective suppression of demand power, the performance interference of training tasks is minimized, demand power peak is accurately suppressed, demand electricity expenditure is reduced, and energy storage is avoided due to blind discharge.
[0175] Figure 3 This is a schematic diagram of a demand-based electricity cost optimization control device provided in this application. Figure 3 As shown, this application provides a demand-based electricity cost optimization control device, the demand-based electricity cost optimization control device 300 including:
[0176] The processing module 301 is used to monitor the power data within the sliding window of demand measurement and determine the average power within the sliding window up to the current time as the current average power;
[0177] The acquisition module 302 is used to acquire the task scheduling characteristics of the graphics processor;
[0178] The processing module 301 is also used to predict the power trajectory of the graphics processor from the current time to the end of the sliding window based on the task scheduling characteristics, and to determine the predicted power demand at the end of the sliding window based on the power trajectory and the current average power.
[0179] The calculation module 303 is used to calculate the over-limit ratio of the predicted demand power exceeding the set value when the predicted demand power exceeds the set value.
[0180] The processing module is also used to determine the risk level of exceeding the limit as Level 1 when the excess ratio is less than the first ratio threshold; to determine the risk level of exceeding the limit as Level 2 when the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold; and to determine the risk level of exceeding the limit as Level 3 when the excess ratio is greater than or equal to the second ratio threshold; wherein the first ratio threshold is less than the second ratio threshold.
[0181] The processing module 301 is also used to implement power control measures in stages according to the risk level of exceeding limits and the state of charge of the energy storage system.
[0182] In one possible embodiment, the acquisition module 302 is further configured to acquire the task scheduling queue of the graphics processor within a time period;
[0183] The processing module 301 is also used to parse the task scheduling queue to obtain the type identifier, task size parameters and execution time point of each task to be executed.
[0184] The processing module 301 is also used to determine the reference power curve corresponding to each task to be executed from a preset power consumption feature library based on the type identifier and task size parameters.
[0185] The processing module 301 is also used to map the reference power curve to the corresponding time axis position within the time period according to the execution time point corresponding to each task to be executed, and to add the power values of each reference power curve mapped to the same time to obtain the power trajectory.
[0186] In one possible embodiment, the calculation module 303 is further configured to calculate the power difference between the predicted demand power and the set value when the risk level of the over-limit is Level 1.
[0187] The processing module 301 is also used to control the energy storage system to discharge at the first discharge power corresponding to the power difference, so as to make up for the energy consumption gap caused by the power difference.
[0188] In one possible embodiment, the processing module 301 is further configured to control the energy storage system to discharge at the maximum available power currently available when the risk level of the over-limit is level two.
[0189] In one possible embodiment, the processing module 301 is further configured to control the energy storage system to discharge at the maximum available power currently available when the risk level of the over-limit is level three and the state of charge of the energy storage system is less than a preset charge threshold, and to perform frequency reduction on the graphics processor, wherein the frequency reduction is within a first frequency reduction range.
[0190] In one possible embodiment, the processing module 301 is further configured to control the energy storage system to discharge at the maximum available power currently available when the remaining time of the sliding window is less than a preset time threshold, and to perform frequency reduction on the graphics processor, wherein the frequency reduction magnitude is within a second frequency reduction range.
[0191] In one possible embodiment, the acquisition module 302 is further configured to acquire a preset frequency reduction range;
[0192] The processing module 301 is also used to determine the target frequency reduction range within the frequency reduction range with the goal of minimizing the total monthly electricity cost;
[0193] The target frequency reduction is constrained by the energy storage system's cycle life loss value not exceeding a preset life loss threshold. The target frequency reduction is used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
[0194] The demand-cost optimization control device provided in this application embodiment is similar in principle and technical effect to the implementation of each part of the aforementioned demand-cost optimization control method, and will not be described again here.
[0195] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 4 As shown, the electronic device 400 includes: a receiver 401, a transmitter 402, a processor 403, and a memory 404.
[0196] Receiver 401 is used to receive instructions and data;
[0197] Transmitter 402 is used to send commands and data;
[0198] Memory 404 is used to store instructions executed by the computer;
[0199] The processor 403 is used to execute computer execution instructions stored in the memory 404 to implement the various steps performed by the demand-based electricity cost optimization control method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the demand-based electricity cost optimization control method.
[0200] Optionally, the memory 404 can be either standalone or integrated with the processor 403.
[0201] When the memory 404 is set up independently, the electronic device also includes a bus for connecting the memory 404 and the processor 403.
[0202] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.
[0203] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method of any of the foregoing embodiments.
[0204] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the foregoing embodiments.
[0205] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0206] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0207] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0208] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0209] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0210] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0211] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A demand-based electricity cost optimization control method, applied to a data center, wherein the data center includes a graphics processor, characterized in that, include: Monitor the power data within the sliding window of demand measurement, and determine the average power within the sliding window up to the current time as the current average power; The task scheduling characteristics of the graphics processor are obtained, and the power trajectory of the graphics processor during the period from the current time to the end of the sliding window is predicted based on the task scheduling characteristics. The predicted power demand at the end of the sliding window is determined based on the power trajectory and the current average power. When the predicted power demand exceeds the set value, calculate the excess ratio of the predicted power demand exceeding the set value; When the excess ratio is less than the first ratio threshold, the excess risk level is determined to be Level 1 risk; when the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold, the excess risk level is determined to be Level 2 risk. When the excess ratio is greater than or equal to the second ratio threshold, the excess risk level is determined to be Level 3 risk; wherein, the first ratio threshold is less than the second ratio threshold; Based on the aforementioned risk level of exceeding limits and the state of charge of the energy storage system, power control measures are implemented in stages. The step of acquiring the task scheduling characteristics of the graphics processor, predicting the power trajectory of the graphics processor from the current time to the end of the sliding window based on the task scheduling characteristics, and determining the predicted power demand at the end of the sliding window based on the power trajectory and the current average power includes: Obtain the task scheduling queue of the graphics processor during the time period; The task scheduling queue is parsed to obtain the type identifier, task size parameters, and execution time point of each task to be executed. Based on the type identifier and the task size parameter, determine the reference power curve corresponding to each task to be executed from the preset power consumption feature library; Based on the execution time point corresponding to each task to be executed, the reference power curve is mapped to the corresponding time axis position within the time period, and the power values of each reference power curve mapped to the same time point are added together to obtain the power trajectory; After the power trajectory is constructed, the predicted power values at each time point in the power trajectory are merged with the historical power data collected within the current sliding window, and the average power over the entire sliding window length is calculated as the predicted demand power at the end of the sliding window.
2. The method according to claim 1, characterized in that, The step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes: When the risk level of exceeding the limit is the first-level risk, calculate the power difference between the predicted power demand and the set value; The energy storage system is controlled to discharge at a first discharge power corresponding to the power difference to make up for the energy consumption gap caused by the power difference.
3. The method according to claim 1, characterized in that, The step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes: When the risk level of exceeding the limit is level two, the energy storage system is controlled to discharge at the maximum available power that can be provided at present.
4. The method according to claim 1, characterized in that, The step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes: When the risk level of the over-limit is level three and the state of charge of the energy storage system is less than the preset charge threshold, the energy storage system is controlled to discharge at the maximum available power that can be provided at present, and the graphics processor is frequency reduced, and the frequency reduction is within the first frequency reduction range.
5. The method according to claim 1, characterized in that, The step of implementing graded power control measures based on the over-limit risk level and the state of charge of the energy storage system includes: When the risk level of the over-limit is level three and the remaining time of the sliding window is less than a preset time threshold, the energy storage system is controlled to discharge at the maximum available power that can be provided at present, and the graphics processor is frequency-reduced, and the frequency reduction is within the second frequency reduction range.
6. The method according to claim 4 or 5, characterized in that, The step of downclocking the graphics processor includes: Obtain a preset frequency reduction range, and determine the target frequency reduction magnitude within the frequency reduction range with the goal of minimizing the total monthly electricity cost; The target frequency reduction range is constrained by the energy storage system's cycle life loss value not exceeding a preset life loss threshold, and the target frequency reduction range is used to instruct the graphics processor to reduce its operating frequency to the corresponding target frequency value.
7. A demand-based electricity cost optimization control device, characterized in that, include: The processing module is used to monitor the power data within the sliding window of demand measurement and determine the average power within the sliding window up to the current time as the current average power; The acquisition module is used to acquire the task scheduling characteristics of the graphics processor; The processing module is further configured to predict the power trajectory of the graphics processor from the current moment to the end of the sliding window based on the task scheduling features, and determine the predicted power demand at the end of the sliding window based on the power trajectory and the current average power. The calculation module is used to calculate the excess ratio of the predicted power demand exceeding the set value when the predicted power demand exceeds the set value. The processing module is further configured to determine the risk level as Level 1 when the excess ratio is less than the first ratio threshold; and to determine the risk level as Level 2 when the excess ratio is greater than or equal to the first ratio threshold and less than the second ratio threshold. When the excess ratio is greater than or equal to the second ratio threshold, the excess risk level is determined to be Level 3 risk; wherein, the first ratio threshold is less than the second ratio threshold; The processing module is also used to implement power control measures in stages according to the risk level of exceeding the limit and the state of charge of the energy storage system. The acquisition module is specifically used to acquire the task scheduling queue of the graphics processor during the time period; The processing module is specifically used for: The task scheduling queue is parsed to obtain the type identifier, task size parameters, and execution time point of each task to be executed. Based on the type identifier and the task size parameter, determine the reference power curve corresponding to each task to be executed from the preset power consumption feature library; Based on the execution time point corresponding to each task to be executed, the reference power curve is mapped to the corresponding time axis position within the time period, and the power values of each reference power curve mapped to the same time point are added together to obtain the power trajectory; After the power trajectory is constructed, the predicted power values at each time point in the power trajectory are merged with the historical power data collected within the current sliding window, and the average power over the entire sliding window length is calculated as the predicted demand power at the end of the sliding window.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Data center hybrid energy storage and renewable energy source intelligent scheduling control method and system
CN120601468A
Energy storage planning and identification method based on fatigue sensitivity and marginal utility
CN122315767A