Power consumption distribution method and device, storage medium and program product

By dividing time slots in the server and dynamically adjusting power consumption allocation according to load requirements and task priority, the problem of poor power consumption allocation flexibility in the prior art is solved, and efficient resource utilization and task execution efficiency are achieved.

CN119988035AActive Publication Date: 2025-05-13INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510447364.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-13
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

In the prior art, the power consumption distribution flexibility is poor and the load fluctuations cannot be dealt with, resulting in waste of resources.

Method used

By dividing multiple time slots, and determining the dynamic priority weight of each node based on the load demand prediction value and task priority weight of each node within each time slot interval, the power consumption allocation of each node is performed based on the dynamic priority and resource budget.

Benefits of technology

It realizes flexible adaptation to different load requirements and the execution of different priority tasks within different time periods, so that tasks with high priority can guarantee more resources and avoid resource waste, and provides reliable decision support for server power consumption management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988035A_ABST
    Figure CN119988035A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption distribution method and device, a storage medium and a program product, and relates to the technical field of servers, and the method comprises the steps: dividing a plurality of time slots, and in each time slot interval, according to the predicted load demand of each node and the task priority weight of a task executed by each node in the corresponding time slot, determining the task priority of each node; according to the method, the dynamic priority of each node is determined, and then the power consumption of each node is allocated based on the dynamic priority and the resource budget of each node in each time slot interval, so that the method can flexibly adapt to different load requirements and execution of tasks with different priorities in different time periods, and the tasks with high priorities can guarantee more resources; according to the method, resource waste is avoided, reliable decision support is provided for power consumption management of the server, system stability and task execution efficiency are effectively balanced, and double breakthrough of the data center in the aspects of energy conservation and performance optimization is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a power consumption allocation method, device, storage medium and program product. Background Art

[0002] In data centers, server clusters, or multi-node servers, power consumption management is a key technology to break through the power supply bottleneck and hardware stability constraints of data centers. As hardware devices become more and more powerful, if power consumption is not controlled, excessive use of power consumption will lead to inefficient system operation and even affect hardware stability.

[0003] In the related art, a static power budget allocation method can be used to allocate power consumption, however, it cannot cope with load fluctuations and easily leads to resource waste. Summary of the invention

[0004] The present application provides a power consumption allocation method, device, storage medium and program product to at least solve the problem in the related art that power consumption allocation has poor flexibility and easily leads to waste of resources.

[0005] The present application provides a power consumption allocation method, including:

[0006] Determining a resource budget provided to a plurality of nodes within a current time slot interval; the time slot interval being determined based on a time slot of a preset granularity;

[0007] Determine the dynamic priority weights corresponding to the multiple nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes;

[0008] According to the resource budget and the dynamic priority weights respectively corresponding to the multiple nodes, the power consumption quotas respectively corresponding to the multiple nodes in the current time slot interval are determined.

[0009] The present application also provides a power consumption allocation device, comprising:

[0010] A resource budget determination module, used to determine a resource budget provided to a plurality of nodes within a current time slot interval; the time slot interval is determined based on a time slot of a preset granularity;

[0011] A priority weight determination module, used to determine the dynamic priority weights corresponding to the multiple nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes;

[0012] The power consumption allocation module is used to determine the power consumption quotas corresponding to the multiple nodes in the current time slot interval according to the resource budget and the dynamic priority weights corresponding to the multiple nodes.

[0013] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned power consumption allocation methods when executing the computer program.

[0014] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned power consumption allocation methods are implemented.

[0015] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above power consumption allocation methods when executed by a processor.

[0016] Through the present application, multiple time slots are divided, and in each time slot interval, the dynamic priority of each node is determined according to the predicted load demand of each node and the task priority weight of the task executed by each node in the corresponding time slot, and then the power consumption of each node is allocated based on the dynamic priority and the resource budget of each node in each time slot interval. It can flexibly adapt to different load demands and the execution of tasks with different priorities in different time periods, so that high-priority tasks can guarantee more resources and avoid resource waste, provide reliable decision-making support for the power consumption management of the server, effectively balance the system stability and task execution efficiency, and promote the double breakthrough of data center in energy saving and performance optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A schematic diagram of an application scenario of the power consumption allocation method provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a flow chart of a power consumption allocation method provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a flow chart of time slot synchronization of a power consumption allocation method provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of the structure of a prediction model for the power consumption allocation method provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of the working principle of the power consumption arbiter provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of the structure of a power consumption allocation device provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0027] Glossary:

[0028] Last-Level Cache (LLC) hit rate: This is the last-level cache hit rate, which refers to the proportion of data found in the last-level cache of the central processing unit (CPU) when accessing data. A high hit rate indicates that the CPU can get more data from the cache when accessing data, reducing the frequency of accessing the main memory; a low hit rate indicates that the cache fails to hit and needs to access the main memory frequently, which will increase latency and power consumption.

[0029] Instructions Per Cycle (IPC): refers to the number of instructions executed by the CPU in each clock cycle, and is an important indicator for measuring CPU performance.

[0030] Power Distribution Unit (PDU): refers to the equipment used to provide power distribution and management for data centers, computer rooms or large equipment.

[0031] Dynamic Voltage and Frequency Scaling (DVFS): refers to a technology used to dynamically adjust the voltage and frequency of the processor based on computing needs to improve energy efficiency, reduce power consumption and extend battery life.

[0032] Thermal Design Power (TDP): refers to the maximum power requirement that a system or component needs to dissipate heat when the device is running at full load.

[0033] In data centers, server clusters, and multi-node servers, power consumption management issues are often encountered. As hardware devices become more powerful, power consumption has gradually become an important bottleneck. If not controlled, excessive use of power consumption will lead to inefficient system operation and even affect the stability of the hardware.

[0034] Due to power consumption wall restrictions, modern server clusters are limited by power supply infrastructure (such as PDU capacity) and cannot meet the peak power consumption requirements of each node at the same time. Coupled with resource contention, high-priority tasks (such as AI training) compete with low-priority tasks (such as data backup) for power consumption budgets, resulting in performance fluctuations. In addition, there is a lack of effective dynamic load methods. Server loads change over time, and traditional static power allocation strategies are inefficient.

[0035] In the related art, a static allocation method can be used, in which a fixed power consumption budget is allocated to each node and subsystem when the system starts, and it does not change during the operation of the system. Regardless of how the system load changes, the power consumption budget remains unchanged. However, this method mainly relies on the static configuration of the system, such as the maximum power consumption limit of the hardware, the performance requirements of the node, etc. It is not sensitive to load changes and is prone to waste of resources.

[0036] In order to solve the above technical problems, the inventors of the present application have found that the disadvantage of static power consumption budget allocation is mainly because it does not take into account the load fluctuations in actual operation, so that it cannot respond to the dynamic changes of the system load. And when the system load is low, static power consumption allocation may allocate too much power consumption to some nodes, and these nodes do not fully use these resources, resulting in power consumption waste. The inventors of the present application have also found that even if the workload of the system nodes is monitored in real time to dynamically adjust the power consumption allocation, due to the actual system weight, the load change cannot be instantly reflected to the power consumption management system, the response time is relatively delayed, the power consumption allocation effect is not ideal, and the adaptability to different tasks is also poor. Therefore, the inventors of the present application innovatively comprehensively consider the load demand prediction value and the task priority, and divide the time axis into multiple time slots, determine the time slot interval according to the time slot, use the time slot interval as the adjustment period, and synchronously calculate and adjust the function allocation of each node in each time slot interval, which can adapt to the load change and take into account the needs of different tasks. Based on this, the embodiment of the present application provides a power consumption allocation method.

[0037] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0038] In conjunction with the specific application environment architecture or the specific hardware architecture on which the execution of the power consumption allocation method depends, the specific application environment architecture or the specific hardware architecture is described herein. Figure 1 , Figure 1 Schematic diagram of application scenarios of the power consumption allocation method provided in the embodiment of the present application. Figure 1 As shown, taking a server cluster as an example, the server cluster includes multiple server nodes (a master node 101 and multiple slave nodes 102).

[0039] In the specific implementation process, a power consumption arbitrator can be set in the master node 101, and a high precision event timer (HPET) can be used to realize the time slot boundary of each node. For example, the HPET of the master node 101 can be used as a reference clock, and each slave node 102 can be synchronized with the reference clock. One or more time slots can be used as time slot intervals. Then, the power consumption allocation method provided in the present application is executed at the beginning of each time slot interval. Specifically, the resource budget provided for multiple nodes in the current time slot interval can be first determined, and then the dynamic priority weights corresponding to the multiple nodes in the current time slot interval can be determined according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes in the current time slot interval. Thus, according to the resource budget corresponding to the current time slot interval and the dynamic priority weights corresponding to the multiple nodes, the power consumption quotas corresponding to the multiple nodes in the current time slot interval can be determined to realize power consumption allocation. The power consumption allocation method provided in the embodiment of the present application divides a plurality of time slots, and determines the dynamic priority of each node in each time slot interval according to the predicted load demand of each node and the task priority weight of the task executed by each node in the corresponding time slot, and then allocates the power consumption of each node based on the dynamic priority and the resource budget of each node in each time slot interval. It can flexibly adapt to different load demands and the execution of tasks of different priorities in different time periods, so that tasks with high priority can be guaranteed more resources and avoid waste of resources. It provides reliable decision support for the power consumption management of the server, effectively balances the system stability and task execution efficiency, and promotes the dual breakthrough of energy saving and performance optimization of the data center.

[0040] Figure 2 A schematic diagram of a flow chart of a power consumption allocation method provided in an embodiment of the present application, such as Figure 2 As shown, an embodiment of the present application provides a power consumption allocation method, and the method is described in detail as follows:

[0041] 201. Determine a resource budget provided for multiple nodes within a current time slot interval; the time slot interval is determined according to a time slot of a preset granularity.

[0042] The execution subject of this embodiment may be a power consumption allocation device, which may be a terminal device or a server, for example, Figure 1 The master node 101 is shown.

[0043] In this embodiment, a node refers to a physical / virtual computing unit that operates independently in a network or distributed system, has independent hardware resources (CPU, memory, storage) and network interfaces, is used to perform specific services (such as data processing, application hosting), and can work with other nodes through cluster protocols to achieve load balancing or high availability. The preset granularity can be less than or equal to 120 microseconds (μs), for example, 100μs. The time slot interval can be one or more time slots. In order to save computing resources, the time slot interval can be determined as a single time slot during a period of large load changes (for example, from the evening period before 10 o'clock when the load demand is large to the transition period from 10 o'clock to 2 o'clock in the early morning when the load demand is small), and the time slot interval can be determined as multiple time slots during a stable load demand change stage (for example, the working period from 8 o'clock to 12 o'clock). The definition of a specific time period can be determined based on the analysis of historical load demand data. The method provided in this embodiment is to solve the limitations of being unable to adapt to dynamic load requirements under fixed TDP constraints, being unable to fully utilize microsecond-level power consumption fluctuations, being unable to perform minute-level or second-level power consumption adjustments, and being unable to solve the power consumption contention problem of a multi-node cluster through single-node optimization. By dynamically allocating slotted power consumption budgets, a suitable power consumption budget is allocated to each node and each time slice (i.e., time slot interval) to cope with load fluctuations and changes in resource requirements.

[0044] Exemplarily, assuming that the time slot is 100 μs, the time slot interval is a single time slot, that is, 100 μs, and the resource budget provided by the current time slot interval for multiple nodes is 100 watts (W), 100 W is allocated to multiple nodes in the current time slot interval.

[0045] In some embodiments, the master node is used as the execution subject, and this embodiment describes in detail the synchronization of the time slot interval between the master and slave nodes. Before step 201, it may also include: in the current time slot interval, sending synchronization data packets to multiple slave nodes respectively through a preset bus; the synchronization data packet is used to instruct the corresponding slave node to synchronize the time slot interval with the master node according to the synchronization data packet; if the synchronization data packet is not sent to the first slave node among the multiple slave nodes, then in response to receiving the negative confirmation signal sent by the first slave node, the synchronization data packet is resent in the next time slot interval; if the synchronization data packet is not sent to the second slave node among the multiple slave nodes for a preset number of consecutive times, the second slave node is controlled to enable the local time slot counter to divide the time slot interval. The power consumption allocation method provided in this embodiment can dynamically adjust the power consumption requirements of multiple nodes in each time period by dividing the running time of the server into multiple independent time periods and synchronizing the boundaries, which provides flexibility for power consumption management and resource scheduling, so that different load requirements and execution requirements of tasks of different priorities can be adapted in different time periods.

[0046] In this embodiment, the synchronization data packet is used to synchronize the clocks between multiple nodes. The synchronization data packet may include a master node identifier field, a current value of a global time slot counter, a time slot cycle length code, a master node HPET current absolute timestamp, a cyclic redundancy check code, etc. The preset bus may be a high-speed peripheral component interconnect Express (PCIe) bus.

[0047] In the specific implementation process, Figure 3 As shown, HPET can be initialized first, and then the granularity of the time slot and the number of time slots included in the time slot interval can be set. For example, the granularity of the time slot can be set to 100 microseconds, and the time slot interval can be set to a single time slot. After the setting is completed, a broadcast signal can be used to synchronize the hardware-level signal. For example, the synchronization data packet can be broadcasted through the broadcast signal to achieve synchronization of the time slot interval.

[0048] Exemplarily, a time slot interval of a single time slot is taken as an example. The master node can send a synchronization data packet to each slave node through the PCIe bus at the beginning of each time slot. Taking the third slave node among multiple slave nodes as an example, after receiving the synchronization data packet, the third slave node can perform a time slot alignment operation. Specifically, the time slot counter value can be parsed and the local time slot counter register can be updated to calibrate the local HPET clock phase so that the deviation from the master node HPET absolute timestamp is less than the preset deviation value. Verify the validity of the check code, and discard the current synchronization packet if the check fails. If the third slave node does not receive a valid synchronization data packet within the time slot window, a negative acknowledgment (NAK) signal can be sent to the master node through the sideband channel. After the master node receives the NAK signal, it performs a unicast retransmission to the third slave node in the next time slot. When the local time slot counter of the third slave node detects that the valid synchronization has not been completed for a continuous preset number of times (greater than 2 times, for example 3 times), it switches to the autonomous clock mode. In this mode, the full time slot counter update is disabled, and the time slot division is maintained based on the local HPET clock.

[0049] 202. Determine dynamic priority weights corresponding to the multiple nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes.

[0050] Specifically, after determining the resource budget corresponding to the current time slot interval, the load demand prediction value of each node in the current time slot interval and the task priority weight of the task executed by each node in the current time slot interval can be obtained, and then for each node, the dynamic priority weight of the node is calculated based on the load demand prediction value of the corresponding node and the task priority weight of the task executed.

[0051] In this embodiment, the load demand prediction value refers to the predicted value of the load required by the corresponding node in the current time slot interval. It can be inferred based on the load demand in the historical period, for example, based on the load demand in multiple historical time slot intervals. The task priority weight can be a priority weight set in advance for different tasks. For example, the priority of the artificial intelligence training task can be set to the first level, and the priority of the data backup task can be set to the second level, the first level is higher than the second level, the first level task priority weight is set to 1, and the second level task priority weight is set to 0.3.

[0052] In some embodiments, in order to improve the prediction accuracy, a prediction model can be used to predict the load demand. Before step 202, it can also include: obtaining input data corresponding to the current time slot interval; the input data includes characteristic data corresponding to multiple nodes in multiple historical time slot intervals; multiple historical time slot intervals are time slot intervals before the current time slot interval; the characteristic data includes at least one of the following items of the corresponding node: workload characteristic data, hardware characteristic data, temperature data; input the input data into the prediction model to obtain the load demand prediction values ​​corresponding to multiple nodes in the current time slot interval. The power consumption allocation method provided in this embodiment determines the load demand prediction value of each node by comprehensively considering factors such as workload, hardware characteristics, and temperature limits in each time slot interval. Since the above factors are highly sensitive to the load, the accuracy of the load demand prediction value can be improved, and then the power consumption quota of each node is determined based on the load demand prediction value, which can improve the accuracy of power consumption allocation.

[0053] In this embodiment, workload characteristic data refers to parameter characteristics of the node's processor related to the workload, and may include, for example, processor utilization (e.g., utilization of the central processing unit (CPU) and utilization of the graphics processing unit (GPU)) and at least one of LLC hit rate; hardware characteristic data refers to at least one of the node's memory bandwidth and IPC.

[0054] In some embodiments, the prediction model is based on a bidirectional long short-term memory network architecture. In the power consumption allocation method provided in this embodiment, the load demand prediction value of each node is predicted by a prediction model based on a bidirectional long short-term memory network architecture, which can enhance the feature capture capability and generalization on time series feature data, thereby improving the prediction accuracy of the prediction model, and then obtaining a more accurate load demand prediction value, thereby improving the accuracy of power consumption allocation. The long short-term memory network is a special recursive neural network that can process and predict time series data well.

[0055] In some embodiments, the prediction model may include a bidirectional long short-term memory network layer, a random inactivation layer, a unidirectional long short-term memory network layer and a fully connected layer; the bidirectional long short-term memory network layer is used to fuse the forward and reverse dependencies of the input data to obtain first feature data; the random inactivation layer is used to process the first feature data through multiple neurons, and randomly discard the outputs of some neurons in the multiple neurons to obtain second feature data; the unidirectional long short-term memory network layer is used to extract key features of the second feature data to obtain third feature data; the fully connected layer is used to map the third feature data to obtain a load demand forecast value. The power consumption allocation method provided in this embodiment builds a prediction model based on a bidirectional long short-term memory network layer, a random inactivation layer, a unidirectional long short-term memory network layer and a fully connected layer. The bidirectional long short-term memory network layer can simultaneously capture the forward and reverse context information of the time series feature data to improve the accuracy. The random inactivation layer randomly discards some neurons to prevent overfitting. The unidirectional long short-term memory network layer is used to perform in-depth feature extraction. The output of the unidirectional long short-term memory network layer is mapped to the target prediction space through the fully connected layer to obtain the load demand prediction value. The accuracy and generalization ability of the model can be improved. Through the innovative deep learning architecture design, it shows significant advantages in multi-dimensional time series feature fusion, long-term dependency modeling and computational efficiency optimization.

[0056] For example, Figure 4 As shown, the prediction model includes an input layer, a bidirectional long short-term memory network layer, a random inactivation layer, a unidirectional long short-term memory network layer and a fully connected layer connected in sequence.

[0057] The input layer, as the starting point of the model, is responsible for receiving input data. The shape of the input data can be (None, 10, 6), where None represents the batch size, which is dynamically changing; 10 represents the time step, which means using data from 10 historical time slots; 6 represents the feature dimension, and the specific features include CPU / GPU utilization, LLC hit rate, memory bandwidth, IPC, and temperature.

[0058] The main function of the bidirectional long short-term memory network layer is to capture the bidirectional dependency of time series data, that is, to consider both forward (from the past to the future) and backward (from the future to the past) information at the same time, and extract high-dimensional features. The output shape of this layer can be (None, 10, 256), where 256 refers to the output dimension of the bidirectional long short-term memory network layer, which is obtained by multiplying 128 units by 2 directions.

[0059] The random dropout layer is used to prevent the model from overfitting and enhance the generalization ability of the model. During the training process, this layer will randomly discard the output of some neurons. Its output shape is the same as the input shape, which is (None, 10, 256).

[0060] The unidirectional long short-term memory network layer is used to further extract key temporal features and reduce the feature dimension, for example, to 64 dimensions, to provide suitable input for the subsequent fully connected layer. The output shape of this layer is (None, 64), where 64 is the output dimension of the unidirectional long short-term memory network layer, that is, 64 units.

[0061] The fully connected layer is used to map the output of the unidirectional long short-term memory network layer to the final prediction value, and can output the power consumption prediction for the next N (for example, 3) time slots. Its output shape is (None, 3), where 3 represents the power consumption prediction value for the next 3 time slots.

[0062] Among them, the long short-term memory network unit consists of four key parts, namely the input gate (, forget gate, output gate and candidate memory unit. Each part has its own weight and bias. The number of parameters of the long short-term memory network unit is closely related to the input dimension (id) and the hidden state dimension (hd).

[0063] The number of parameters of the LSTM network unit is calculated by the number of parameters = 4×(hd×(id+hd)+hd), where id is the dimension of the input feature, hd is the dimension of the hidden state, that is, the output dimension of the LSTM network unit, and hd×(id+hd)+hd is the number of parameters of the weight matrix.

[0064] For example, for the bidirectional LSTM layer, assuming the input dimension id = 6; hidden state dimension hd = 128, the number of parameters of the unidirectional LSTM network = 4×(128×(6+128)+128)= 69120. Since the bidirectional LSTM network consists of two independent unidirectional LSTM network units, one for processing forward time series data (past to future) and the other for processing reverse time series data (future to past), the number of parameters of the bidirectional LSTM network is twice that of a single LSTM network: 69120×2=138260.

[0065] For the unidirectional LSTM layer, assuming the input dimension id = 256 (the output from the bidirectional LSTM layer) and the hidden state dimension hd = 64, the number of parameters of this layer is: 4×(64×(256+64)+64)= 82176.

[0066] In some embodiments, before step 202, it may also include: obtaining historical feature data; the historical feature data includes feature data of multiple processors of the target node in the historical time period; preprocessing the historical feature data to obtain a training sample set; based on a preset loss function, training the model to be trained according to the training sample set to obtain a prediction model; the preset loss function includes: a mean absolute error term and a gradient penalty term; the mean absolute error term characterizes the absolute error between the predicted value and the true value; the gradient penalty term is used to constrain the sensitivity of the model to be trained to the features of the input training sample. The power consumption allocation method provided in this embodiment can integrate multi-dimensional time series features, improve the sensitivity to the load demand of the node, improve the accuracy of the prediction, and ensure the prediction accuracy by setting the mean absolute error term, while introducing the gradient penalty term to achieve double optimization and improve generalization.

[0067] In the specific training process, you can first compile the model. For example, you can use the Nesterov Accelerated Adaptive Moment Estimation (Nadam) optimizer and set the learning rate to 0.001. Use a custom hybrid loss model to track the mean absolute error (MAE) and mean square error (MSE) during training. Then set the callback function. You can use the early stopping mechanism to stop training when there is no improvement in the loss after setting consecutive preset rounds (for example, 5 rounds) to avoid overfitting of the model. Then set the model to save. You can save the best model at the end of each training round for subsequent use. Finally, you can set the training execution strategy to perform a maximum of preset rounds (for example, 70 rounds) of training, and extract a preset number of samples (for example, 512) from the data set for training at each iteration.

[0068] In some embodiments, the expression of the preset loss function is:

[0069] (1)

[0070] in, is the true value of the i-th time slot, i.e., the actual power consumption; is the predicted value of the i-th time slot output by the model; N is the number of samples; is the penalty coefficient; is the gradient of the predicted value of the i-th time slot to the input feature. The power consumption allocation method provided in this embodiment constrains the sensitivity of the input feature by setting the gradient penalty term, suppresses the weight oscillation caused by noise disturbance, enhances the resistance to overfitting, forces the model to learn a smooth mapping that conforms to the hardware characteristics, avoids misjudgment caused by abnormal feature mutations, and adjusts the accuracy and robustness weights of the λ coefficient to improve generalization.

[0071] Specifically, the first term in formula (1) ) is the mean absolute error (MAE), and the second term ( ) is the gradient penalty term. For example, assuming the true value: =[700,520,560], and the predicted value: =[510,530,570], then after calculation: MAE= (|700−510|+|520−530|+|560−570|) / 3 = 10. Assuming the input feature =[0.3,0.4,0.5], model output =[510,530,570]. Then the gradient can be calculated as: =[2.0,1.5,1.0]. The penalty coefficient is λ. λ can be set to 0.1. Then the gradient penalty term is 0.1× (4+2.25+1) / 3, which is 0.24167. Then the preset loss function value is Loss=10+0.24167=10.24167.

[0072] In some embodiments, preprocessing historical feature data to obtain a training sample set may include: based on a high-precision event timer, time-aligning feature data of multiple processors in the historical feature data to obtain aligned data; normalizing the aligned data to obtain normalized data; based on a preset time slot interval, window-segmenting the normalized data to obtain multiple training samples; and determining a training sample set based on multiple training samples. The power consumption allocation method provided in this embodiment aligns multi-source data streams of processors such as CPU / GPU, eliminates feature deviations caused by timing misalignment, ensures synchronization across hardware states, eliminates feature scale differences by adopting dimensional normalization, accelerates model convergence and improves gradient optimization stability, constructs time series samples by window segmentation, fully captures hardware load fluctuation periodic characteristics, realizes coordinated prediction of power consumption change trends and instantaneous peaks, reduces model training errors, and shortens inference response delays.

[0073] Exemplarily, in order to make the historical feature data more suitable for model training, at least one preprocessing such as time alignment, normalization, and window segmentation is required. For time alignment, due to the difference in sampling periods of the CPU and GPU, the HPET timestamp is used to time align the multi-source data to ensure the time consistency of the data. For normalization, the 6-dimensional features can be standardized by standard deviation respectively so that the data has zero mean and unit variance, which is conducive to the convergence and training effect of the model. For window segmentation, data of n (n can be greater than 8, such as 10) historical time slots (each time slot can be the same as the time slot interval, such as 0.1ms) can be used as input to predict the power consumption of m (m can be greater than 2, such as 3) time slots in the future (each time slot is 0.1ms, a total of 0.3ms).

[0074] In some embodiments, determining the dynamic priority weights corresponding to the multiple nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes respectively may include: for each of the multiple nodes, determining the dynamic priority weight corresponding to the node in the current time slot interval according to the product between the load demand prediction value corresponding to the node in the current time slot interval and the task priority weight of the task executed by the node. The power consumption allocation method provided in this embodiment can realize adaptive adjustment of resource allocation weights with demand fluctuations and task urgency by dynamically coupling the node load demand prediction value and task priority based on product operation, thereby ensuring that high-priority tasks obtain sufficient computing power while avoiding node overload.

[0075] Specifically, the task currently being processed by the node can be learned by communicating with the node, and then the task priority weight corresponding to the currently processed task can be learned from the preset task priority weight data. The load demand forecast value can be obtained through the prediction model, and then the product of the load demand forecast value and the task priority weight is determined as the dynamic priority weight of the corresponding node, which can respond to the load surge predicted by LSTM and take into account the preset task level. If the task priority weight of the data backup task is 0.3 and the load demand forecast value of the node is 100 watts, then the dynamic priority weight is 100×0.3=30.

[0076] 203. Determine power consumption quotas corresponding to the multiple nodes in the current time slot interval according to the resource budget and the dynamic priority weights corresponding to the multiple nodes.

[0077] Specifically, the larger the dynamic priority weight is, the more important the corresponding node is after comprehensively considering the task priority and load demand. Therefore, after determining the resource budget in the current time slot interval and the dynamic priority weight of each node, power consumption can be allocated according to the size of the dynamic priority weight of each node to ensure that nodes with large dynamic priority weights can obtain more power consumption resources.

[0078] In some embodiments, determining the power consumption quotas corresponding to the multiple nodes in the current time slot interval according to the resource budget and the dynamic priority weights corresponding to the multiple nodes respectively may include: normalizing the dynamic priority weights corresponding to the multiple nodes respectively to obtain the normalized priority weights corresponding to the multiple nodes respectively; for each node, determining the power consumption quota corresponding to the node in the current time slot interval according to the resource budget and the normalized priority weight corresponding to the node. The power consumption allocation method provided in this embodiment can realize the precise on-demand allocation of node power consumption quotas by normalizing the dynamic priority weights and co-allocating the global resource budget, giving priority to guaranteeing the resource supply of high-weight tasks under the constraint of total power consumption, while avoiding performance degradation caused by low-priority tasks occupying resources.

[0079] Specifically, normalization can be performed by calculating the proportion of the dynamic priority weight of each node. For example, assuming that the dynamic priority weights of the four nodes are 0.8, 0.42, 0.2, and 0.06, the sum is 1.48, and the normalized calculation results in the proportion of the dynamic priority weight of each node being 0.8 / 1.48, 0.42 / 1.48, 0.2 / 1.48, and 0.06 / 1.48, which is approximately equal to 0.54, 0.28, 0.14, and 0.04. Then, the resource budget in the current time slot interval can be directly allocated according to the normalized priority weight of each node. For example, assuming the resource budget is 8000 watts, the power consumption quota of each node is 8000×0.54=4320W, 8000×0.28=2260W, 8000×0.14=1120W, and 8000×0.04=320W.

[0080] From the above description, it can be seen that the power consumption allocation method provided in this embodiment divides a plurality of time slots, and determines the dynamic priority of each node in each time slot interval according to the predicted load demand of each node and the task priority weight of the task executed by each node in the corresponding time slot, and then allocates the power consumption of each node based on the dynamic priority and the resource budget of each node in each time slot interval. It can flexibly adapt to different load demands and the execution of tasks of different priorities in different time periods, so that high-priority tasks can be guaranteed more resources and avoid waste of resources. It provides reliable decision-making support for the power consumption management of the server, effectively balances the system stability and task execution efficiency, and promotes the dual breakthroughs of energy saving and performance optimization of data centers.

[0081] In some embodiments, considering that the load demand prediction value may deviate from the actual load demand, the actual power consumption demand may exceed the power consumption quota or may be less than the power consumption quota. In order to more flexibly allocate the power consumption allocation in each time slot interval, a preset control period may be set, and the resource budget of each time slot interval may be determined based on the power consumption resources corresponding to the preset control period. Specifically, determining the resource budget provided for multiple nodes in the current time slot interval may include: dividing the preset control period into multiple time slot intervals based on the time slots of preset granularity; determining the resource budget provided for multiple nodes in the current time slot interval based on the power consumption resources corresponding to the preset control period and the multiple time slot intervals. The power consumption allocation method provided in this embodiment, by introducing the global resource constraints of the preset control period and the time slot level dynamic budget decomposition mechanism, can achieve the dynamic adjustment of the subsequent time slot budget allocation according to the actual power consumption deviation of the historical time slot under the premise of meeting the total power consumption upper limit of the period, forming a closed-loop control of "overlimit compensation-surplus reuse", improving the system resource utilization while reducing the probability of overload risk.

[0082] Exemplarily, assuming that the preset control cycle is 2 milliseconds and a single time slot interval is 0.1 milliseconds, the preset control cycle includes 20 time slot intervals. Assuming that the power consumption resource is 10 kilowatts, the resource budget provided by each time slot interval for multiple nodes is 10 / 20=0.5 kilowatts.

[0083] In some embodiments, step 203 may also include: if the power consumption quota of the first node among the multiple nodes in the current time slot interval is greater than the actual power consumption of the first node, the remaining quota is recorded to obtain a credit record; if the power consumption quota of the second node among the multiple nodes in the current time slot interval is less than the actual power consumption of the second node, the remaining quota is called from the credit record, the shortfall of the second node is recorded to obtain a deficit record; within the preset control period, the total remaining quota in the credit record is greater than or equal to the total shortfall in the deficit record. The power consumption allocation method provided in this embodiment realizes the redistribution of power consumption margin across time slots through the credit-deficit dynamic balancing mechanism, and allows high-load nodes to call unused quotas of low-load nodes under the hard constraint of the total cycle budget, thereby improving system resource utilization. At the same time, through the conservation design of total credit ≥ deficit, it ensures that the cycle-level global power consumption cap is not exceeded, thereby reducing the risk of overload.

[0084] Specifically, the power consumption credit register can be used to record credits to obtain a credit table, and the power consumption deficit register can be used to record deficits to obtain a deficit table. If the actual power consumption of a node is less than the power consumption quota corresponding to the node, the remaining quota is recorded in the credit table. If the actual power consumption of a node is greater than the power consumption quota corresponding to the node, the portion exceeding the budget, i.e., the deficit quota, is recorded in the deficit table. By establishing a dual-register coupling mechanism, dynamic redistribution of the power budget is achieved, while ensuring the service quality of high-priority tasks, the global conservation of the system-level power consumption budget is maintained.

[0085] Exemplarily, a power arbiter (PA) may be set up, and the power arbiter may be used to execute the power allocation method provided in this embodiment. The power arbiter executes the power allocation method when the rising edge of the clock of the current time slot interval arrives. Because in digital circuits, the rising edge of the clock serves as a trigger point for state update, the circuit is in a stable state at this time and is suitable for executing critical operations. A high quota is immediately allocated at the rising edge at the beginning of the time slot interval to ensure that high-priority tasks get priority in obtaining resources. In the specific implementation process, if Figure 5 As shown, in response to the power consumption allocation request of each node, the dynamic priority weight of each node can be calculated according to the load demand prediction value output by the prediction model and the task priority weight. It can respond to the load surge predicted by the prediction model and take into account the preset task level. After determining the dynamic priority weight, the power consumption quota can be allocated based on the dynamic priority weight, and the total power consumption budget can be allocated to each node using an algorithm to ensure that high-priority tasks obtain more resources. After determining the power consumption coordination of each node, the actual power consumption of each node in the current time slot interval can be detected, and then the credit table and deficit table can be updated to achieve a credit-deficit balance of power consumption.

[0086] In some embodiments, considering that when multiple nodes execute tasks with different task priority levels, nodes with higher task priority levels will monopolize resources, while nodes with lower task priority levels may continue to be allocated inadequate power consumption quotas and fail to maintain basic functions, step 203 may include: setting a minimum quota for tasks with a task priority weight less than a preset weight, and if the quotas obtained by the target nodes that execute the preset tasks within a preset number of time slot intervals are all less than the actual power consumption of the target nodes, then the preset quota is allocated to the target nodes within the current time slot interval; the preset quota is greater than or equal to the actual power consumption of the target nodes within the current time slot interval. The power consumption allocation method provided in this embodiment, by introducing a dynamic minimum quota guarantee mechanism and an elastic resource allocation strategy, can ensure that high-priority tasks monopolize resources while allocating preset quotas that are not less than actual requirements to continuously limited low-priority tasks, thereby maintaining stable operation of basic system functions; combined with the reuse of credit pool redundant quotas and dynamic calculation of preset thresholds, the risk of malicious resource preemption is effectively isolated, and the coordinated optimization of resource utilization improvement of 28% and system service availability of 99.9% is achieved.

[0087] Specifically, a higher power consumption quota can be allocated to nodes that execute tasks with higher priority levels at the rising edge of the clock cycle, i.e., at the beginning of the time slot interval. For nodes with lower task priority levels, the minimum power consumption quota can be guaranteed in a specific time slot to avoid high-priority tasks monopolizing resources and causing uneven instantaneous load on the system, thereby ensuring that tasks with lower task priority levels can obtain the minimum resources and maintain basic functions.

[0088] Exemplarily, assume that the tasks include an artificial intelligence training task and a data backup task. The task priority level of the artificial intelligence training task is greater than the priority level of the data backup task. Then a higher power consumption quota is provided for the artificial intelligence training task at the rising edge of the clock cycle. In the case where the power consumption quota of the data backup task is always less than the actual power consumption in multiple consecutive time slot intervals, a power consumption quota greater than the actual power consumption is provided for the data backup quota, that is, sufficient power consumption quota, to ensure the stable operation of the data backup task.

[0089] In order to more clearly illustrate the implementation principle of the power consumption allocation method provided in the embodiment of the present application, an example is given below with reference to actual data.

[0090] In this embodiment, the power consumption allocation device can be deployed on the main node of the server cluster, HPET can be enabled, and the time slot interval can be set to a single time slot, where a single time slot is 0.1 milliseconds. Then, the power consumption allocation method can be executed when an interrupt signal of each time slot interval is received.

[0091] Assuming that the power consumption resource of the current server cluster is 8000W, and the task priority weights of the four nodes are 0.4, 0.2, 0.1, and 0.3, and the load demand prediction values ​​obtained by the prediction model for each node are 0.8, 0.6, 0.4, and 0.2, then the dynamic priority weights can be obtained by comprehensively considering the task priority weights and the load demand prediction values, and the normalized priority weights obtained after normalization are 0.64, 0.24, 0.08, and 0.12. Then, the power consumption quota is allocated, and the power consumption quotas of the four nodes are 5120W, 1920W, 660W, and 960W. Assume that the actual task power consumption requests triggered by four nodes are 7000W, 3000W, 2000W, and 1000W. Each node adjusts the power consumption based on the credit-deficit dynamic balance mechanism. For example, node 1: requests 7000W < 5120W, and deposits 120W into the credit table; node 2: requests 3000W > 1920W, borrows 1080W, and deposits it into the deficit table (the credit table must have sufficient balance).

[0092] After the power consumption allocation is completed, the power consumption arbiter in the power consumption allocation device will send dynamic voltage and frequency adjustment DVFS instructions to each node CPU through the PCIe interface to adjust the voltage and frequency of each node. For example, if node 1 is allocated to 7000w, the frequency of node 1 will be adjusted to 2.5GHz and the voltage will be 1.41V.

[0093] The power consumption allocation method provided in this embodiment accurately predicts the power consumption requirements of the server by innovatively combining deep timing modeling with hardware-level optimization, thereby ensuring the efficiency and accuracy of power consumption allocation. Specifically, the load prediction model uses timing data for deep learning, and can provide high-precision power consumption prediction (average error is less than 70W) under dynamically changing workloads. The core advantage of this technology is that by accurately grasping the power consumption requirements of each node, the system can intelligently allocate resources to avoid over-limit events caused by excessive or insufficient power consumption scheduling. In practical applications, combined with the dynamic bus arbitration mechanism, the system can effectively reduce the incidence of over-limit events. In addition, tasks with higher priority are guaranteed more resources, thereby improving the performance of these tasks. This technical solution based on time-slot power consumption scheduling provides reliable decision-making support for server power consumption management, effectively balances system stability and task execution efficiency, and promotes a double breakthrough in energy saving and performance optimization of data centers.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0095] Figure 6 This is a schematic diagram of the structure of the power consumption allocation device provided in the embodiment of the present application. Figure 6 As shown, the embodiment of the present application further provides a power consumption allocation device. The device 60 includes: a resource budget determination module 601 , a priority weight determination module 602 , and a power consumption allocation module 603 .

[0096] The resource budget determination module 601 is used to determine the resource budget provided for multiple nodes in the current time slot interval; the time slot interval is determined according to the time slot of the preset granularity.

[0097] The priority weight determination module 602 is used to determine the dynamic priority weights corresponding to multiple nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the multiple nodes in the current time slot interval and the task priority weights of the tasks executed by the multiple nodes.

[0098] The power consumption allocation module 603 is used to determine the power consumption quotas corresponding to the multiple nodes in the current time slot interval according to the resource budget and the dynamic priority weights corresponding to the multiple nodes.

[0099] In some embodiments, the priority weight determination module 602 is also used to obtain input data corresponding to the current time slot interval; the input data includes characteristic data corresponding to multiple nodes in multiple historical time slot intervals; the multiple historical time slot intervals are time slot intervals before the current time slot interval; the characteristic data includes at least one of the following items of the corresponding node: workload characteristic data, hardware characteristic data, temperature data; the input data is input into the prediction model to obtain the load demand prediction values ​​corresponding to multiple nodes in the current time slot interval.

[0100] In some embodiments, the priority weight determination module 602 is also used to obtain historical feature data; the historical feature data includes feature data of multiple processors of the target node within a historical time period; the historical feature data is preprocessed to obtain a training sample set; based on a preset loss function, the model to be trained is trained according to the training sample set to obtain a prediction model; the preset loss function includes: a mean absolute error term and a gradient penalty term; the mean absolute error term represents the absolute error between the predicted value and the true value; the gradient penalty term is used to constrain the sensitivity of the model to be trained to the characteristics of the input training samples.

[0101] In some embodiments, the priority weight determination module 602 is specifically used to: based on a high-precision event timer, time align the feature data of multiple processors in the historical feature data to obtain aligned data; normalize the aligned data to obtain normalized data; based on a preset time slot interval, window segmentation the normalized data to obtain multiple training samples; and determine a training sample set based on multiple training samples.

[0102] In some embodiments, the expression of the preset loss function is:

[0103]

[0104] Among them, Loss is the loss value; is the true value of the i-th time slot interval, i.e., the actual power consumption; is the predicted value of the i-th time slot interval output by the model; N is the number of samples; is the penalty coefficient; is the gradient of the predicted value of the i-th time slot interval with respect to the input feature.

[0105] In some embodiments, the prediction model is based on a bidirectional long short-term memory network architecture.

[0106] In some embodiments, the prediction model includes a bidirectional long short-term memory network layer, a random inactivation layer, a unidirectional long short-term memory network layer and a fully connected layer; the bidirectional long short-term memory network layer is used to fuse the forward and reverse dependencies of the input data to obtain first feature data; the random inactivation layer is used to process the first feature data through multiple neurons, and randomly discard the outputs of some neurons in the multiple neurons to obtain second feature data; the unidirectional long short-term memory network layer is used to extract key features of the second feature data to obtain third feature data; the fully connected layer is used to map the third feature data to obtain a load demand forecast value.

[0107] In some embodiments, the priority weight determination module 602 is specifically used to: for each node among multiple nodes, determine the dynamic priority weight corresponding to the node in the current time slot interval based on the product between the load demand prediction value corresponding to the node in the current time slot interval and the task priority weight of the task executed by the node.

[0108] In some embodiments, the power consumption allocation module 603 is specifically used to: normalize the dynamic priority weights corresponding to multiple nodes to obtain the normalized priority weights corresponding to the multiple nodes; for each node, determine the power consumption quota corresponding to the node in the current time slot interval based on the resource budget and the normalized priority weight corresponding to the node.

[0109] In some embodiments, the resource budget determination module 601 is specifically used to: divide the preset control period into multiple time slot intervals based on time slots of preset granularity; determine the resource budget provided for multiple nodes in the current time slot interval based on the power consumption resources corresponding to the preset control period and multiple time slot intervals.

[0110] In some embodiments, the power consumption allocation module 603 is also used for: if the power consumption quota of a first node among multiple nodes in the current time slot interval is greater than the actual power consumption of the first node, then the remaining quota is recorded to obtain a credit record; if the power consumption quota of a second node among multiple nodes in the current time slot interval is less than the actual power consumption of the second node, then the remaining quota is called from the credit record, and the shortfall of the second node is recorded to obtain a deficit record; within a preset control period, the total amount of remaining quotas in the credit record is greater than or equal to the total amount of shortfall in the deficit record.

[0111] In some embodiments, applied to the master node, the resource budget determination module 601 is also used to: in the current time slot interval, send synchronization data packets to multiple slave nodes respectively through a preset bus; the synchronization data packet is used to instruct the corresponding slave node to synchronize the time slot interval with the master node according to the synchronization data packet; if the synchronization data packet is not sent to the first slave node among the multiple slave nodes, then in response to receiving a negative confirmation signal sent by the first slave node, resend the synchronization data packet in the next time slot interval; if the synchronization data packet is not sent to the second slave node among the multiple slave nodes for a preset number of consecutive times, then control the second slave node to enable the local time slot counter to divide the time slot interval.

[0112] For the description of the features in the embodiment corresponding to the power consumption allocation device, reference can be made to the relevant description of the embodiment corresponding to the power consumption allocation method, which will not be described in detail here.

[0113] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus.

[0114] In a specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that the at least one processor 701 executes the above-mentioned power consumption allocation method embodiment.

[0115] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0116] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0117] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0118] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0119] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above-mentioned power consumption allocation method embodiments when running.

[0120] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0121] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above power consumption allocation method embodiments are implemented.

[0122] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned power consumption allocation method embodiments are implemented.

[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0124] The above is a detailed introduction to a power consumption allocation method provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A power consumption allocation method, characterized in that: include: Determining a resource budget provided for a plurality of nodes within a current time slot interval; the time slot interval being determined based on a time slot of a preset granularity; Determine the dynamic priority weights corresponding to the plurality of nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the plurality of nodes in the current time slot interval and the task priority weights of the tasks executed by the plurality of nodes; The power consumption quotas respectively corresponding to the plurality of nodes in the current time slot interval are determined according to the resource budget and the dynamic priority weights respectively corresponding to the plurality of nodes.

2. The power consumption allocation method according to claim 1, characterized in that: Before determining the dynamic priority weights corresponding to the plurality of nodes in the current time slot interval according to the load demand prediction values ​​corresponding to the plurality of nodes in the current time slot interval and the task priority weights of the tasks executed by the plurality of nodes respectively, the method further includes: Obtain input data corresponding to the current time slot interval; the input data includes characteristic data corresponding to multiple nodes in multiple historical time slot intervals; the multiple historical time slot intervals are time slot intervals before the current time slot interval; the characteristic data includes at least one of the following data of the corresponding node: workload characteristic data, hardware characteristic data, and temperature data; The input data is input into a prediction model to obtain load demand prediction values ​​corresponding to the plurality of nodes in the current time slot interval.

3. The power consumption allocation method according to claim 2, characterized in that: Before inputting the input data into the prediction model, the method further comprises: Acquire historical feature data; the historical feature data includes feature data of multiple processors of the target node within a historical time period; Preprocessing the historical feature data to obtain a training sample set; Based on a preset loss function, the model to be trained is trained according to the training sample set to obtain the prediction model; the preset loss function includes: a mean absolute error term and a gradient penalty term; the mean absolute error term represents the absolute error between the predicted value and the true value; the gradient penalty term is used to constrain the sensitivity of the model to be trained to the characteristics of the input training samples.

4. The power consumption allocation method according to claim 3, characterized in that: The preprocessing of the historical feature data to obtain a training sample set includes: Based on a high-precision event timer, time-aligning feature data of multiple processors in the historical feature data to obtain aligned data; Normalizing the aligned data to obtain normalized data; Based on a preset time slot interval, the normalized data is window-segmented to obtain a plurality of training samples; The training sample set is determined according to the multiple training samples.

5. The power consumption allocation method according to claim 3, characterized in that: The expression of the preset loss function is: , Among them, Loss is the loss value; is the true value of the i-th time slot interval, i.e., the actual power consumption; is the predicted value of the i-th time slot interval output by the model; N is the number of samples; is the penalty coefficient; is the gradient of the predicted value of the i-th time slot interval with respect to the input feature.

6. The power consumption allocation method according to claim 2, characterized in that: The prediction model is based on a bidirectional long short-term memory network architecture.

7. The power consumption allocation method according to claim 2, characterized in that: The prediction model includes a bidirectional long short-term memory network layer, a random dropout layer, a unidirectional long short-term memory network layer and a fully connected layer; The bidirectional long short-term memory network layer is used to fuse the positive and negative dependencies of the input data to obtain the first feature data; The random inactivation layer is used to process the first feature data through a plurality of neurons, and randomly discard outputs of some neurons in the plurality of neurons to obtain second feature data; The unidirectional long short-term memory network layer is used to extract key features from the second feature data to obtain third feature data; The fully connected layer is used to map the third characteristic data to obtain the load demand prediction value.

8. The power consumption allocation method according to any one of claims 1 to 7, characterized in that: The determining, according to the load demand prediction values ​​respectively corresponding to the plurality of nodes in the current time slot interval and the task priority weights respectively corresponding to the tasks executed by the plurality of nodes, the dynamic priority weights respectively corresponding to the plurality of nodes in the current time slot interval comprises: For each of the multiple nodes, the dynamic priority weight corresponding to the node in the current time slot interval is determined based on the product of the load demand prediction value corresponding to the node in the current time slot interval and the task priority weight of the task executed by the node.

9. The power consumption allocation method according to any one of claims 1 to 7, characterized in that: The determining, according to the resource budget and the dynamic priority weights respectively corresponding to the plurality of nodes, the power consumption quotas respectively corresponding to the plurality of nodes in the current time slot interval comprises: Normalizing the dynamic priority weights corresponding to the plurality of nodes to obtain normalized priority weights corresponding to the plurality of nodes; For each of the nodes, a power consumption quota corresponding to the node in the current time slot interval is determined according to the resource budget and the normalized priority weight corresponding to the node.

10. The power consumption allocation method according to any one of claims 1 to 7, characterized in that: The determining of a resource budget provided to a plurality of nodes within a current time slot interval comprises: Based on a time slot of a preset granularity, dividing a preset control period into a plurality of time slot intervals; Based on the power consumption resources corresponding to the preset control period and the multiple time slot intervals, a resource budget provided for the multiple nodes in the current time slot interval is determined.

11. The power consumption allocation method according to claim 10, characterized in that: The method further comprises: If the power consumption quota of a first node among the plurality of nodes in the current time slot interval is greater than the actual power consumption of the first node, the remaining quota is recorded to obtain a credit record; If the power consumption quota of a second node among the multiple nodes in the current time slot interval is less than the actual power consumption of the second node, the remaining quota is called from the credit record, the shortfall of the second node is recorded, and a deficit record is obtained; within the preset control period, the total amount of the remaining quota in the credit record is greater than or equal to the total amount of the shortfall in the deficit record.

12. The power consumption allocation method according to any one of claims 1 to 7, characterized in that: The plurality of nodes include a master node and a plurality of slave nodes, and the method further includes: In the current time slot interval, a synchronization data packet is respectively sent to a plurality of slave nodes via a preset bus; the synchronization data packet is used to instruct the corresponding slave node to synchronize the time slot interval with the master node according to the synchronization data packet; If the synchronization data packet is not sent to a first slave node among the plurality of slave nodes, in response to receiving a negative acknowledgement signal sent by the first slave node, resending the synchronization data packet in a next time slot interval; If the synchronization data packet is not sent to a second slave node among the plurality of slave nodes for a preset number of consecutive times, the second slave node is controlled to enable a local time slot counter to divide the time slot interval.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the power consumption allocation method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the power consumption allocation method according to any one of claims 1 to 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the power consumption allocation method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Method for regulating and controlling load equipment based on minimum constraint set and load dynamic priority

    CN111582623A

  • Intelligent computing cluster management system for intelligent scheduling

    CN118760527A

  • Task allocation method and device, electronic equipment and computer program

    CN118796441A

  • Workload management for computing cluster

    US20190386889A1

  • Cluster node load state prediction-based job scheduling method

    WO2020206705A1

Cited By

  • Server cabinet system

    CN120653437A

  • Machine room equipment energy-saving regulation and control method and system based on load prediction

    CN121028723A

  • GPU heterogeneous resource scheduling method based on mixed execution of multiple simulation jobs

    CN121501523A

  • A GPU heterogeneous resource scheduling method based on mixed execution of multiple simulation jobs

    CN121501523B