Server power consumption adjustment method, electronic device, and storage medium
By constructing a power consumption load correlation model and using an inverse mapping function to determine the target load threshold, a targeted power consumption adjustment strategy is generated, which solves the problem that server power consumption adjustment schemes cannot adapt to dynamic load changes and achieves precise adjustment and stable control of server power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing server power consumption regulation solutions cannot adapt to dynamic changes in load and lack accurate modeling of the complex relationship between load and power consumption, resulting in poor power consumption regulation and an inability to balance power control effectiveness with server performance.
By constructing a power load correlation model based on historical load and power consumption data, the target load threshold is dynamically determined using an inverse mapping function, generating targeted power consumption adjustment strategies, and combining these with the power management unit to execute power consumption adjustment commands, thus achieving flexible and precise adjustment of server power consumption.
It enables precise and flexible adjustment of server power consumption, reducing data center operating costs and energy consumption, while ensuring the stability of server business processing performance.
Smart Images

Figure CN122131899A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server operation technology, and in particular to a server power consumption regulation method, electronic device and storage medium. Background Technology
[0002] The server power consumption adjustment schemes in related technologies can only perform static control operations based on preset fixed thresholds. They cannot adapt to the dynamic changes in server load and match the load fluctuations in actual operation. They also lack a deep understanding and accurate modeling of the complex relationship between server load and power consumption. They ignore many factors that have a key impact on power consumption, such as historical load conditions, load change trends and time. As a result, when faced with scenarios such as differentiated power consumption changes caused by high load operation of servers for different durations, it is difficult to achieve accurate and flexible power consumption adjustment, and it is impossible to balance power consumption control effect and server operating performance. Summary of the Invention
[0003] This application provides a server power consumption adjustment method, electronic device, and storage medium to at least solve the problems in related technologies where server power consumption adjustment adopts static control with a fixed threshold, which cannot adapt to dynamic changes in load, and lacks accurate modeling of the complex relationship between load and power consumption, making it difficult to achieve accurate and flexible power consumption adjustment.
[0004] This application provides a method for regulating server power consumption, including:
[0005] If the server to be processed meets the power consumption adjustment conditions, the inverse mapping function corresponding to the power consumption load correlation model is determined based on the inverse mapping relationship of the power consumption load correlation model of the server to be processed. The power consumption load correlation model is pre-trained and generated based on the historical load data of the server to be processed and the historical power consumption data corresponding to the historical load data. The reverse load analysis is performed on the target power consumption data of the server to be processed using the reverse mapping function to obtain the target load threshold that matches the target power consumption data. The target power consumption data is determined based on the preset power consumption threshold and preset safety margin of the server to be processed. Based on the target load threshold, a power consumption adjustment strategy is generated for the server to be processed, and the power consumption of the server to be processed is adjusted according to the power consumption adjustment strategy.
[0006] This application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the above-described server power consumption regulation methods.
[0007] This application also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform any of the above-described server power consumption regulation methods.
[0008] The server power consumption adjustment method, electronic device, and storage medium provided in this application construct a power consumption load correlation model that integrates historical server load and power consumption data. By leveraging the inverse mapping relationship of the power consumption load correlation model, and combining a preset power consumption threshold with a safety margin, a target load threshold matching the target power consumption is dynamically determined. Based on the dynamic target load threshold, a targeted power consumption adjustment strategy is generated. This not only effectively adapts to the dynamic changes in server load and accurately captures the complex relationship between load and power consumption, enabling flexible and precise adjustment of server power consumption, but also ensures that server business processing performance is not affected by excessive regulation while stabilizing power consumption within the target range and reducing data center operating costs and energy consumption, thus balancing power consumption control effectiveness and server operational stability. Attached Figure Description
[0009] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A flowchart illustrating the first server power consumption adjustment method provided in this application embodiment; Figure 2 A flowchart illustrating the second server power consumption adjustment method provided in this application embodiment; Figure 3 This is a schematic diagram of a process for collecting real-time operating status data of a server to be processed, provided in an embodiment of this application. Figure 4 This is a schematic diagram of a process for training and generating a power load correlation model, provided in an embodiment of this application. Figure 5 A flowchart illustrating the process of constructing a three-dimensional correlation model of power consumption, load, and time combined with task scheduling, as provided in an embodiment of this application; Figure 6 This is a schematic diagram illustrating a dynamic power adjustment strategy generation process based on a power load correlation model, provided in an embodiment of this application. Figure 7 A flowchart illustrating the third server power consumption adjustment method provided in this application embodiment; Figure 8 This is a flowchart illustrating the fourth server power consumption adjustment method provided in the embodiments of this application; Figure 9 This is a schematic diagram illustrating the process of updating parameters in a power consumption load correlation model, as provided in an embodiment of this application. Figure 10 A flowchart illustrating the fifth server power consumption adjustment method provided in this application embodiment; Figure 11 This is a schematic diagram illustrating a specific server power consumption adjustment method provided in an embodiment of this application. Figure 12 This application provides a schematic diagram of the structure of a server power consumption adjustment device. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0012] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. 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.
[0013] Against the backdrop of rapid development in modern information technology, the scale of large-scale server clusters such as data centers and cloud computing platforms continues to expand, and the number of servers is growing rapidly. These servers consume a large amount of electricity during operation, which not only leads to a significant increase in operating costs but also puts considerable pressure on the environment. The proportion of data center energy consumption in global total energy consumption is rising year by year, making it a significant area of energy consumption.
[0014] Currently, server power management in related technologies mostly adopts static strategies, the core of which is to adjust power consumption based on preset fixed thresholds. Specifically, when the server CPU (Central Processing Unit) utilization exceeds a certain fixed value, power consumption is reduced by lowering the CPU frequency; when memory usage exceeds a set threshold, some memory modules are shut down, thereby controlling server power consumption.
[0015] However, under the aforementioned static control mode, server power management in related technologies has the following shortcomings: On the one hand, static strategies cannot adapt to dynamic changes in server load and are difficult to match the fluctuations in load during actual operation; on the other hand, the server power management solutions in related technologies lack a deep understanding and accurate modeling of the complex relationship between server load and power consumption, ignoring various key influencing factors such as historical load conditions, load change trends, and time. For example, a short period of high load operation on a server may not lead to a significant increase in power consumption, but when the high load state continues for a long time, power consumption will increase significantly, and static strategies cannot cope with such scenarios.
[0016] To address the shortcomings of existing server power management technologies that employ static control with fixed thresholds, which fails to adapt to dynamic load changes and lacks accurate modeling of the complex relationship between load and power consumption, neglecting multiple key influencing factors and resulting in poor power regulation, this application provides a server power regulation method. This method focuses on dynamically determining the target load threshold. By constructing and calling a power-load correlation model trained based on historical load and power consumption data, and leveraging the model's inverse mapping relationship, the target power consumption is accurately converted into a suitable target load threshold. This generates a targeted power regulation strategy, enabling dynamic and precise control of server power consumption.
[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] Figure 1 This is a flowchart illustrating the first server power consumption adjustment method provided in this application embodiment.
[0019] like Figure 1 As shown, the method includes the following steps: Step 101: If the server to be processed meets the power consumption adjustment conditions, determine the inverse mapping function corresponding to the power consumption load association model based on the inverse mapping relationship of the power consumption load association model of the server to be processed.
[0020] In some embodiments, a server to be processed refers to one or more servers whose current operating state meets the power consumption adjustment triggering conditions and whose power consumption needs to be adjusted.
[0021] The power consumption adjustment conditions refer to the criteria for triggering the server power consumption adjustment process (such as the server's predicted power consumption exceeding the preset power consumption threshold, or the real-time load continuously exceeding the baseline value), and are prerequisites for initiating this application.
[0022] The power load correlation model refers to a mathematical model that is pre-trained using machine learning algorithms (such as regression algorithms, neural networks, etc.) with historical server load data as input features and historical power consumption data at the corresponding time as output labels. Its core function is to accurately represent the dynamic correlation between server load and power consumption, making up for the lack of accurate modeling of the complex relationship between the two in related technologies.
[0023] Historical load data refers to various load-related metrics collected during the past operation of the server to be processed, such as CPU utilization, memory usage, disk I / O (Input / Output) utilization, network throughput, etc. Historical power consumption data refers to the actual historical power consumption value of the server (such as the power consumption of the whole machine and the power consumption of each hardware module) that corresponds one-to-one with the timestamp of the historical load data.
[0024] The inverse mapping relationship and the inverse mapping function are the inverse mappings of the power consumption load correlation model. The forward mapping of the power consumption load correlation model is "input load data, output power consumption data", while the inverse mapping relationship is its inverse relationship. The core implementation is "input power consumption data, output matching load data". The inverse mapping function is the mathematical expression of this inverse mapping relationship, which is used to deduce the target load that can achieve the target power consumption from the target power consumption.
[0025] Step 102: Use the reverse mapping function to perform reverse load analysis on the target power consumption data of the server to be processed, and obtain the target load threshold that matches the target power consumption data.
[0026] In some embodiments, the target power consumption data is the upper limit of power consumption that the system expects the server to achieve. The target power consumption data is not directly equal to a preset power consumption threshold, but rather a preset power consumption threshold minus a preset safety margin. The safety margin is set to prevent the actual power consumption from momentarily exceeding the limit due to model prediction errors or load fluctuations. For example, the target power consumption data can be calculated as follows:
[0027] in, The target power consumption value; The preset power consumption threshold; A preset safety margin is provided. It should be noted that the preset power consumption threshold and preset safety margin can be set according to actual needs, and are not limited in the embodiments of this application.
[0028] Since the power consumption load correlation model is trained with load data as input and power consumption data as output, the load data of the server to be processed can be derived from the power consumption data of the server to be processed by using the inverse mapping function corresponding to the power consumption load correlation model.
[0029] Specifically, the target power consumption data is input into the inverse mapping function, and the load threshold corresponding to one or more load indicators can be calculated (e.g., CPU utilization must not exceed 80%, memory bandwidth utilization must not exceed 70%, etc.). For example, the formula for calculating the target load threshold is as follows:
[0030] in, Indicates the target load threshold; This represents the inverse mapping function of the power consumption load correlation model. It is understood that the target load threshold in this application is calculated in real-time using the inverse mapping function of the power consumption load correlation model, rather than being a pre-set fixed value. Specifically, the target load threshold is the upper limit of load control obtained by inputting target power consumption data into the inverse mapping function. Its value is adjusted in real-time according to changes in the server's current load level, load change trend, task scheduling, and power consumption characteristics. Therefore, the target load threshold can accurately reflect the maximum load level that the server can withstand under the current operating scenario, thereby achieving precise power consumption control while meeting performance requirements. Compared to the preset fixed thresholds in related technologies, the target load threshold of this application has significant dynamism and adaptability, enabling higher precision, higher stability, and higher energy efficiency in server power consumption management.
[0031] Step 103: Based on the target load threshold, generate a power consumption adjustment strategy for the server to be processed, so as to adjust the power consumption of the server to be processed according to the power consumption adjustment strategy.
[0032] In some embodiments, power consumption regulation strategies refer to a series of instructions that can be executed by the server power management unit, such as frequency reduction instructions, memory channel shutdown instructions, and hard disk speed reduction instructions. The aim is to reduce power consumption by adjusting the working state of the server hardware so that its actual load is constrained below the target load threshold.
[0033] Specifically, the target load threshold is compared with the current real-time load of the server to be processed to identify hardware modules (such as CPU or memory) that exceed the target load threshold. Based on the characteristics of each hardware component (such as the CPU's adjustable frequency range and memory power mode), corresponding adjustment instructions are generated. These instructions are integrated into a complete power consumption adjustment strategy, which is then sent to the power management unit of the server to be processed for execution. The power management unit can then adjust the power consumption of the server to be processed in a timely manner according to the power consumption adjustment strategy.
[0034] In summary, by constructing a power load correlation model that integrates historical server load and power consumption data, and leveraging the inverse mapping relationship of the power load correlation model, the target load threshold for matching the target power consumption is dynamically determined by combining preset power consumption thresholds and safety margins. Based on the dynamic target load threshold, a targeted power adjustment strategy is generated. This not only effectively adapts to the dynamic changes in server load and accurately captures the complex relationship between load and power consumption, enabling flexible and precise adjustment of server power consumption, but also ensures that server business processing performance is not affected by excessive regulation while stabilizing power consumption within the target range and reducing data center operating costs and energy consumption, thus balancing power control effectiveness and server operational stability.
[0035] Figure 2 A flowchart illustrating the second server power consumption regulation method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains the steps preceding 101. Figure 2 This may include the following steps: Step 201: Obtain the real-time operating status data of the server to be processed.
[0036] In some embodiments, this application can acquire the initial operating status data of the server to be processed at a preset acquisition frequency by a monitoring agent program deployed on the server to be processed; and perform data preprocessing on the initial operating status data to obtain preprocessed real-time operating status data. The data preprocessing includes at least one of outlier removal processing, smoothing filtering processing, timestamp alignment processing, and standardization processing.
[0037] Among them, the monitoring agent is a lightweight data collection component deployed inside the server to be processed, used to collect the server's underlying hardware and system operation indicators in real time.
[0038] The preset data collection frequency refers to the time interval at which the monitoring agent collects data; it is a configurable parameter. For example, it can be set to 1 second / time or 5 seconds / time, requiring a balance between data real-time performance and system overhead.
[0039] Initial runtime status data is raw data collected directly by the monitoring agent without any processing, such as CPU performance counter data, memory page table mapping data, disk I / O request queue depth, and network packet transmission rate.
[0040] In some examples, for ease of understanding, this application provides specific procedures for collecting real-time operational status data of the server to be processed, such as... Figure 3As shown. First, this application uses a monitoring agent deployed on the server to be processed to acquire initial running status data such as CPU performance counter data, memory page table mapping data, disk I / O request queue depth, and network packet transmission rate at a preset collection frequency. Next, outlier removal is performed on the raw monitoring data (i.e., the initial running status data), identifying and removing abnormal data points exceeding a preset statistical threshold to generate a pre-cleaned dataset. Then, the pre-cleaned dataset undergoes data smoothing filtering to generate a smoothed dataset. The data smoothing filtering uses the following moving average formula:
[0041] in, For time points The data point is smoothed after being filtered by the moving average, i.e., the current time point. The output value; Indicates the time point in the raw monitoring data The original data points at that location, The range of values is from arrive , covering continuous One original data point; This indicates the size of the moving average window, which is the number of original data points used in the average calculation. This represents the time point index, used to iterate through the raw data points within the moving average window.
[0042] Finally, the data points in the smoothed dataset are timestamped using resampling or interpolation methods to align all data points onto a unified timeline, ensuring temporal consistency across multiple dimensions. Standardization is then performed to convert metrics of different scales and magnitudes (e.g., CPU utilization as a percentage, network throughput as Mbps) to the same numerical range, generating a standardized real-time operational status dataset.
[0043] Step 202: Based on the power consumption load correlation model, perform power consumption prediction on the real-time operating status data to obtain the predicted power consumption data of the server to be processed.
[0044] In some embodiments, the predicted power consumption data is the future power consumption value predicted by the power load association model based on the current load. This application inputs real-time operating status data into the power load association model, and can output the predicted power consumption value.
[0045] Before predicting power consumption using the power load correlation model, the model needs to be trained and generated first. This involves obtaining historical load data and corresponding historical power consumption data for the server to be processed; performing time-series trend decomposition on the historical load data to obtain load trend feature data for the server to be processed; constructing input and output vectors based on the load trend feature data and historical power consumption data; and using machine learning algorithms, the input and output vectors to train and generate the power load correlation model for the server to be processed.
[0046] In one example, to facilitate understanding of the overall process of training and generating a power load correlation model, such as... Figure 4 The illustration shows a flowchart of a power consumption load correlation model training method provided in this application embodiment. First, historical load data and corresponding historical power consumption data within a preset time period are extracted from the database. The historical load data includes average CPU load, peak memory usage, disk I / O operations per second, and network bandwidth. Next, a time series analysis method is used to perform trend decomposition on the historical load data, yielding a load change trend term (reflecting the overall trend of the load over a period of time, such as a slow monthly increase in CPU load due to business growth), a periodic term (reflecting fixed periodic changes in the load, such as a periodic increase in CPU load during peak business hours (9-6 PM) and a periodic decrease at night), and a residual term (reflecting irregular short-term random disturbances in the load that cannot be explained by trends and periods, such as load peaks or troughs caused by occasional external network requests, temporary activity of background system processes, or instantaneous hardware jitter). The time series decomposition formula is as follows:
[0047] in, Represents historical load data points. Indicates the trend term. Represents a periodic term. This represents the residual term. Then, an input vector containing the load change trend term, the periodic term, and the residual term is constructed, along with the corresponding historical power consumption data as the output vector. Finally, a mapping relationship between the input and output vectors is trained based on a machine learning algorithm to generate a power consumption-load correlation model. The machine learning algorithm includes at least one of random forest regression, gradient boosting tree, or long short-term memory network. The training process uses the mean squared error loss function, which is as follows:
[0048] in, This represents the actual power consumption value. This represents the predicted power consumption value. Indicates the number of data points.
[0049] Optionally, this application can also incorporate future load change trends to establish a three-dimensional correlation model of power consumption and load over time, which includes a time dimension. This model is used to characterize the dynamic mapping relationship between server load, time, and power consumption. In one example, for ease of understanding, as follows... Figure 5 The diagram shown is a schematic diagram of a three-dimensional correlation model construction process for power consumption, load, and time combined with task scheduling, provided by an embodiment of this application.
[0050] Reference Figure 5 Before obtaining the real-time running status data of the server to be processed, this application needs to obtain the task scheduling queue data of the server to be processed. The task scheduling queue data includes the type of task to be processed on the server to be processed (i.e., the business or technical attribute classification of the task to be processed, used to distinguish the characteristics of different tasks' demand for server resources, such as compute-intensive, I / O-intensive, memory-intensive, etc.), the priority of the task to be processed (i.e., the execution priority assigned to the task by the system, which determines the order of tasks in resource scheduling, such as high-priority core transaction requests, low-priority log backup tasks, etc.), and the estimated execution time of the task to be processed (i.e., the estimated task completion time based on historical data or task characteristics).
[0051] Next, based on the task scheduling queue data, the future load change trend of the server to be processed within a preset time period is predicted. First, features are extracted from the task types, priorities, and expected execution times to obtain task type distribution features (e.g., the proportion of each task type and resource demand intensity), task priority distribution features (e.g., the proportion of high / medium / low priority tasks), and expected execution time distribution features (e.g., the distribution of tasks of different durations). Then, these features are input into the load prediction model to predict the future load change trend of the server to be processed within the preset time period. The load prediction model is trained based on historical task scheduling queue data of the server to be processed. The load prediction model includes a recurrent neural network or Transformer model trained on historical task scheduling queue data. The hidden state update formula for the recurrent neural network is:
[0052] in, Represents the hidden state at time t, used to capture the temporal dependencies of the task scheduling sequence; This represents the input feature vector; and Represents the weight matrix; Represents the bias vector; This represents the activation function, used to introduce non-linear mapping capabilities.
[0053] Finally, based on future load change trends, a three-dimensional power consumption-load time correlation model is established, incorporating the time dimension. This model, building upon the traditional two-dimensional power consumption-load mapping, introduces the time dimension, including load change trends, periodic characteristics, and time decay effects. This allows for a more accurate characterization of the dynamic power consumption changes of servers under different time and load combinations, providing a more reliable predictive basis for subsequent power consumption adjustments.
[0054] Step 203: If the predicted power consumption data is greater than the preset power consumption threshold, determine that the server to be processed meets the power consumption adjustment conditions.
[0055] In some embodiments, the preset power consumption threshold refers to the maximum power consumption limit allowed by the system. The specific value can be set according to the actual situation and is not limited in the embodiments of this application.
[0056] In one example, such as Figure 6 The diagram shown illustrates a dynamic power consumption adjustment strategy generation process based on a power consumption load correlation model, as provided in this application embodiment. This application compares the predicted power consumption value, obtained from the real-time operating status data of the server to be processed, with a real-time preset power consumption threshold. If the predicted power consumption value exceeds the preset power consumption threshold, it indicates that the server may experience power consumption exceeding limits under the current load trend, requiring timely power consumption adjustment. Specifically, based on the inverse mapping relationship of the power consumption load correlation model, a target load threshold corresponding to the target power consumption value is calculated (where the target power consumption value is the difference between the preset power consumption threshold and the preset safety margin). Then, based on this target load threshold, a power consumption adjustment strategy is generated that includes at least one of the following: CPU frequency reduction instruction, memory power module shutdown instruction, and hard disk speed reduction instruction. If the predicted power consumption does not exceed the threshold, monitoring continues, and no power consumption adjustment is performed.
[0057] In summary, this application collects real-time operational status data of the server under processing from multiple dimensions, combines this data with task scheduling queue data to predict future load trends, then uses a power consumption load correlation model to predict current and future power consumption, and finally triggers adjustments by comparing the predicted power consumption with a preset threshold, thus achieving proactive perception of server power consumption risks. This mechanism solves the problem of the lag in ex-post remediation of static threshold methods in related technologies, providing a reliable decision-making basis for subsequent accurate and dynamic power consumption adjustment.
[0058] Figure 7 A flowchart of the third server power consumption regulation method proposed in this application is further shown. Based on... Figure 1 The illustrated embodiment further explains step 103. Figure 7 This may include the following steps: Step 301: Based on the real-time operating data of the server to be processed and the target load threshold, determine the hardware to be processed in the server to be processed and the abnormal load data of the hardware to be processed.
[0059] In some embodiments, the hardware to be processed refers to the hardware modules in the server to be processed whose load exceeds the target load threshold and require power consumption adjustment. Common examples include core power-consuming components such as CPU, memory, disk, and network card.
[0060] Abnormal load data refers to the difference between the real-time operating data of the hardware to be processed and the target load threshold, which represents the degree to which the hardware load exceeds the reasonable range (e.g., if the real-time CPU utilization is 85% and the target threshold is 70%, then the abnormal load data is 15%).
[0061] Specifically, real-time operating data is compared with the target load threshold dimension by dimension, traversing the load indicators corresponding to core hardware such as CPU, memory, disk, and network card, and filtering out hardware modules whose real-time values exceed the threshold, which are then identified as hardware to be processed. At the same time, the difference between the real-time load value and the target load threshold of each hardware to be processed, as well as the excess ratio and other abnormal load data, are calculated to determine the severity of the load anomaly.
[0062] Step 302: Based on the hardware characteristics of the hardware to be processed, the abnormal load data, and the target power level corresponding to the target power consumption data, determine the power adjustment instructions adapted to the hardware to be processed, and integrate the power adjustment instructions to obtain the power adjustment strategy.
[0063] In some embodiments, hardware characteristics refer to the power consumption adjustment capabilities and parameter ranges supported by each piece of hardware to be processed, such as the adjustable frequency levels of the CPU, the power modes of the memory (normal / power saving / hibernation, etc.), and the rotational speed of the disk. The target power consumption level refers to the graded energy consumption standard (such as high / medium / low levels) corresponding to the target power consumption data, which is used to clarify the power consumption control level of each piece of hardware and match the needs of different load scenarios.
[0064] Power adjustment instructions are specific operation instructions generated for individual hardware devices and executed by the power management unit. They have clearly defined adjustment parameters and execution logic. For example, a CPU corresponds to a downclocking instruction to "reduce the clock speed by one level," memory corresponds to a power module shutdown instruction to "shut down some idle memory channels," and a hard drive corresponds to a speed reduction instruction to "reduce speed from high speed to low speed." Integrating the power adjustment instructions of all hardware devices forms a complete and executable power control scheme, ensuring coordinated adaptation of the adjustment actions of each hardware device while balancing power control and business performance.
[0065] Step 303: Send the power consumption adjustment strategy to the power management unit of the server to be processed, so that the power management unit can adjust the power supply parameters of the server to be processed based on the power consumption adjustment strategy.
[0066] In some embodiments, the power management unit is a dedicated hardware module in the server responsible for power supply control, power consumption monitoring, and hardware energy consumption adjustment, and has the ability to receive instructions, parse and execute them, and provide status feedback.
[0067] Power supply parameters are core parameters that determine the energy consumption of the server and its various hardware modules. These include at least one of the following: CPU core voltage adjustment range, memory power module on / off status, and hard drive speed control level. The power management unit can directly adjust power supply parameters through a hardware interface according to power consumption adjustment strategies. For example, it can adjust the CPU core voltage and frequency, control the power supply switch of the memory module, and reduce the hard drive speed.
[0068] In summary, this application generates targeted adjustment strategies based on hardware characteristics and abnormal load levels. It can not only accurately control power supply parameters through the power management unit to achieve the target power consumption, but also minimize the impact of power consumption adjustment on server business performance. This further improves the accuracy, stability, and coordination of server power consumption management, and provides reliable execution support for the efficient energy saving of large-scale server clusters.
[0069] Figure 8 A flowchart of the fourth server power consumption regulation method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment will further explain the process after step 103. Figure 8 This may include the following steps: Step 401: Obtain the power consumption adjustment data, actual power consumption data, and load change data of the server to be processed after the power consumption adjustment strategy has been applied, and integrate the power consumption adjustment data, actual power consumption data, and load change data to obtain a feedback dataset.
[0070] In some embodiments, power consumption adjustment data refers to the complete power consumption adjustment strategy content after adjustment by the power consumption adjustment strategy, including adjustment instructions for each hardware to be processed, target parameters (such as CPU downclocking to 2.2GHz, shutting down one memory channel), and execution timestamps.
[0071] Actual power consumption data refers to the actual power consumption value of the server after the adjustment strategy is implemented (such as the power consumption of the whole machine and the power consumption of each hardware module). It is compared with the predicted power consumption before adjustment and can be used to characterize the actual effect of the adjustment action.
[0072] Load change data refers to the changes in load indicators of each core hardware component of the server after power consumption adjustment (such as CPU utilization decreasing from 85% to 68% and memory utilization decreasing from 80% to 62%), reflecting the impact of power consumption adjustment on business load.
[0073] The three types of data are aligned by timestamp and integrated into a structured feedback dataset that contains a complete correspondence between adjustment actions, load changes, and actual power consumption.
[0074] Step 402: Based on the positive correlation between data timestamps and weight values, determine at least one weight value for at least one feedback data in the feedback dataset.
[0075] In some embodiments, a data timestamp refers to the collection time or adjustment execution time corresponding to each feedback data point, used to characterize the timeliness of the data.
[0076] Weights are used to characterize the contribution of each data point in the feedback dataset to the model parameter update. Their values typically range from 0 to 1; the larger the value, the greater the impact on model parameter estimation. Weights are positively correlated with the timestamp of the data point; the closer the timestamp is to the current moment, the larger the corresponding weight value; the older the timestamp, the smaller the weight value.
[0077] In one example, a time-decaying weight allocation algorithm can be used. This algorithm calculates weights based on the difference between the timestamp of each feedback data point and the current system time. The core principle is to assign higher weights to more recent data, thus reducing the interference of older data on the model. Commonly used algorithms include exponential decay or linear decay.
[0078] Step 403: Determine the updated model parameters of the power load association model based on at least one weight value and model parameters, and update the power load association model according to the updated model parameters.
[0079] In some embodiments, the model parameter determination algorithm may specifically be the weighted least squares method. This application calculates new model parameters using the weighted least squares method, replaces the original model parameters, and adapts the model to the latest power consumption and load relationships.
[0080] For easier understanding, please refer to one example. Figure 9 The diagram shown is a flowchart illustrating the parameter update process of a power consumption load association model provided in an embodiment of this application.
[0081] Reference Figure 9This application first constructs a feedback dataset containing actual power consumption data, load change data, and corresponding power adjustment strategies. Then, based on the positive correlation between weight values and data timestamps, it calculates the weight values of each data point in the feedback dataset. Next, based on the weight values, it re-estimates the parameters of the power consumption-load correlation model using the weighted least squares method to update the model. Specifically, the weighted feedback dataset is split into an input feature vector and an output vector. The input feature vector consists of the load change data and corresponding power adjustment data from the feedback dataset, while the output vector represents the corresponding actual power consumption data. Subsequently, the weight values of each data point are substituted into the objective function of the weighted least squares method, and the model parameters that minimize the objective function are solved using gradient descent. This allows for the re-estimation of the core model parameters, such as the weight matrix and bias vector, of the power consumption-load correlation model. The objective function of the weighted least squares method is as follows:
[0082] in, Indicates model parameters; This indicates the actual power consumption value; This represents the power consumption value predicted by the power load correlation model; Indicates the weight value; Indicates the number of data points.
[0083] In summary, this application constructs a feedback dataset, introduces a time-decaying weight allocation mechanism, and combines it with a model parameter determination algorithm to achieve dynamic updates of model parameters, thus forming an adaptive power consumption-load modeling system. This mechanism addresses the deficiency of static models in related technologies that cannot adapt to the dynamic changes in server power consumption characteristics. By assigning higher weights to recent data, it ensures that the model always optimizes parameters based on the latest operating state, continuously improving the accuracy of power consumption prediction and adjustment strategy generation, and enabling the entire power management system to have self-learning and self-optimization capabilities.
[0084] Figure 10 A flowchart of the fifth server power consumption regulation method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment will further explain the process after step 103. Figure 10 This may include the following steps: Step 501: Obtain the actual power consumption data, load change data, and task processing delay time of the server to be processed after the power consumption adjustment strategy.
[0085] In some embodiments, this application can receive policy execution result data returned by each server through a monitoring agent and a power management unit. The task processing latency time refers to the response time or completion time of the server in processing business tasks after power consumption adjustment, such as the average latency of APIs (Application Programming Interfaces), database query time, etc., used to assess whether power consumption adjustment has an unexpected impact on business performance.
[0086] Step 502: Based on the actual power consumption data, load change data, task processing delay time, and abnormal execution judgment conditions, determine whether there is a policy execution abnormality on the server to be processed.
[0087] In some embodiments, this application determines whether there is a strategy execution anomaly based on strategy execution result data (actual power consumption data, load change data, task processing delay time) and anomaly judgment conditions. The anomaly judgment conditions are pre-defined multi-dimensional anomaly judgment rules used to verify whether the execution effect of the power consumption adjustment strategy meets expectations, including three dimensions: power consumption deviation threshold, preset load change range, and task delay upper limit.
[0088] Wherein, power consumption deviation is the deviation between the actual power consumption value and the target power consumption value, and the formula for calculating power consumption deviation is:
[0089] in, This indicates the actual power consumption value after power adjustment. This represents the target power consumption value.
[0090] This application compares the strategy execution result data with the abnormal execution judgment conditions from multiple dimensions: if If a preset threshold is set (which can be set according to actual needs, but is not limited in the embodiments of this application), it is determined that the power consumption adjustment has not met the standard; if the load change value exceeds the preset range (e.g., the CPU utilization rate drops by less than 10% or the memory usage rate drops by less than 5%), it is determined that the load adjustment has not met expectations; if the task processing latency exceeds the service level agreement requirements (e.g., the latency of the core transaction task exceeds the task latency limit), it is determined that the performance is abnormal. If any dimension fails the verification, it is determined that the server to be processed has a policy execution abnormality.
[0091] Step 503: If it is determined that there is a policy execution abnormality in the server to be processed, an abnormality handling instruction is generated. The abnormality handling instruction includes at least one of resending the power consumption adjustment policy, adjusting the power management unit parameters, or triggering a fault alarm of the server to be processed.
[0092] In some embodiments, exception handling instructions are remedial measures generated for different exception types to quickly restore normal server operation. Adjusting power management unit parameters refers to fine-tuning the power supply control parameters of the power management unit, such as increasing CPU voltage compensation or relaxing the shutdown conditions of the memory power module, to optimize the adjustment effect.
[0093] In one example, corresponding exception handling instructions can be generated based on the exception type. For example, if the power consumption deviation is abnormal, the optimized power consumption adjustment strategy will be resent, or the adjustment range will be increased (such as changing the CPU frequency reduction from one level to two levels); if the load change is abnormal, the power management unit parameters will be adjusted, such as relaxing the memory channel shutdown conditions, or increasing the CPU core voltage to improve the load processing capacity; if the task latency is abnormal, some adjustment instructions will be rolled back immediately, and a performance alarm will be triggered to notify the operation and maintenance personnel to investigate.
[0094] In summary, this application establishes an anomaly protection mechanism that includes execution result collection, multi-dimensional anomaly verification, and intelligent remedial processing. This mechanism not only monitors the policy execution effect in real time but also generates precise remedial instructions for different anomaly scenarios. It ensures the achievement of power consumption control targets while minimizing the impact of anomalies on business performance, providing a reliable safety net for the stable operation of large-scale server clusters.
[0095] Furthermore, for ease of understanding, such as Figure 11 As shown in the diagram, this application provides a specific schematic diagram of server power consumption adjustment.
[0096] Reference Figure 11 The server power consumption adjustment method provided in this application operates with a closed-loop logic of data acquisition, model building, strategy generation, instruction execution, effect feedback, and model iteration. The specific process is as follows: First, monitoring agents deployed on each server collect multi-dimensional real-time operational status data at a preset frequency, including CPU utilization, memory usage, disk I / O throughput, network bandwidth utilization, and task queue length, to comprehensively understand the server cluster's load. Next, based on historical load data and corresponding power consumption data within a preset time period, a power consumption-load correlation model is generated through time series decomposition and machine learning algorithms (such as random forests and long short-term memory networks). Real-time operational status data is input into the model to predict current and future power consumption. If the predicted power consumption exceeds a preset threshold, the model is used to inversely map and calculate the target load threshold, generating a power adjustment strategy that includes instructions such as CPU frequency reduction, memory power module shutdown, and hard drive speed reduction, thus defining the target power consumption level for each server.
[0097] Then, the power consumption adjustment strategy is sent to the power management unit of each server. The power management unit adjusts power parameters such as CPU core voltage range, memory power module on / off status, and hard drive speed control level according to the strategy. After the strategy is executed, the actual power consumption data and load change data of each server are collected to verify whether the adjustment effect meets expectations.
[0098] Finally, based on the feedback data, the power consumption load correlation model is updated using a model parameter determination algorithm, giving higher weight to recent data so that the model can adapt to the dynamic changes in server hardware characteristics and business load, and continuously improve the accuracy of prediction and adjustment.
[0099] The specific execution process of server power consumption adjustment can be referred to Figures 1 to 10 The embodiments shown will not be described in detail here.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0101] Embodiments of this application also provide a server power consumption adjustment device 1200. Figure 12 This is a schematic diagram of a server power consumption adjustment device provided in an embodiment of this application, as shown below. Figure 12 As shown, it includes: The determination module 1210 is used to determine the inverse mapping function corresponding to the power load association model based on the inverse mapping relationship of the power load association model of the server under the condition that the server under the process meets the power consumption adjustment conditions. The power load association model is pre-trained and generated based on the historical load data of the server under the process and the historical power consumption data corresponding to the historical load data. Analysis module 1220 is used to perform reverse load analysis on the target power consumption data of the server to be processed using a reverse mapping function, and to obtain a target load threshold that matches the target power consumption data. The target power consumption data is determined based on the preset power consumption threshold and preset safety margin of the server to be processed. The generation module 1230 is used to generate a power consumption adjustment strategy for the server to be processed based on the target load threshold, so as to adjust the power consumption of the server to be processed according to the power consumption adjustment strategy.
[0102] In one possible implementation of this application embodiment, the determining module 1210 is configured to: before determining the inverse mapping function corresponding to the power load association model based on the inverse mapping relationship of the power load association model of the server to be processed, when it is determined that the server to be processed meets the power consumption adjustment conditions, obtain real-time operating status data of the server to be processed; perform power consumption prediction on the real-time operating status data based on the power load association model to obtain predicted power consumption data of the server to be processed; and determine that the server to be processed meets the power consumption adjustment conditions when the predicted power consumption data is greater than a preset power consumption threshold.
[0103] In one possible implementation of this application, the determining module 1210 is configured to: before determining the inverse mapping function corresponding to the power load correlation model based on the inverse mapping relationship of the power load correlation model of the server to be processed, when it is determined that the server to be processed meets the power consumption adjustment conditions, acquire historical load data of the server to be processed and historical power consumption data corresponding to the historical load data; perform time series trend decomposition on the historical load data to obtain load trend feature data of the server to be processed; construct input vector and output vector based on load trend feature data and historical power consumption data; and train and generate the power load correlation model of the server to be processed using machine learning algorithms, input vector and output vector.
[0104] In one possible implementation of this application embodiment, the generation module 1230 is configured to: determine the hardware to be processed and the abnormal load data of the hardware to be processed in the server to be processed based on the real-time operating data and target load threshold of the server to be processed; determine the power adjustment instruction adapted to the hardware to be processed based on the hardware characteristics of the hardware to be processed, the abnormal load data and the target power consumption level corresponding to the target power consumption data, and integrate the power adjustment instruction to obtain a power adjustment strategy; and send the power adjustment strategy to the power management unit of the server to be processed so that the power management unit adjusts the power supply parameters of the server to be processed based on the power adjustment strategy.
[0105] In one possible implementation of this application embodiment, the determining module 1210 is used to: acquire the initial running status data of the server to be processed at a preset acquisition frequency through a monitoring agent program deployed on the server to be processed; perform data preprocessing on the initial running status data to obtain preprocessed real-time running status data, wherein the data preprocessing includes at least one of outlier removal processing, smoothing filtering processing, timestamp alignment processing, and standardization processing.
[0106] In one possible implementation of this application embodiment, the generation module 1230 is configured to: after adjusting the power consumption of the server to be processed according to the power consumption adjustment strategy, obtain the power consumption adjustment data, actual power consumption data, and load change data of the server to be processed after the power consumption adjustment strategy, and integrate the power consumption adjustment data, actual power consumption data, and load change data to obtain a feedback dataset; based on the positive correlation between data timestamps and weight values, determine at least one weight value of at least one feedback data in the feedback dataset; and determine the updated model parameters of the power consumption load association model according to the at least one weight value and the model parameter determination algorithm, so as to update the power consumption load association model according to the updated model parameters.
[0107] In one possible implementation of this application embodiment, the determining module 1210 is configured to: acquire task scheduling queue data of the server to be processed, the task scheduling queue data including the type of task to be processed, the priority of task to be processed, and the expected execution time of task to be processed; extract features from the type of task to be processed, the priority of task to be processed, and the expected execution time of task to be processed to obtain task type distribution features, task priority distribution features, and expected execution time distribution features; input the task type distribution features, task priority features, and expected execution time distribution features as input features into the load prediction model to predict the future load change trend of the server to be processed within a preset period of time, the load prediction model being trained based on the historical task scheduling queue data of the server to be processed; and adjust the task scheduling queue data of the server to be processed based on the future load change trend.
[0108] In one possible implementation of this application embodiment, the generation module 1230 is configured to: after adjusting the power consumption of the server to be processed according to the power consumption adjustment strategy, obtain the actual power consumption data, load change data, and task processing delay time of the server to be processed after the power consumption adjustment strategy; determine whether there is a strategy execution anomaly on the server to be processed based on the actual power consumption data, load change data, task processing delay time, and abnormal execution judgment conditions; and generate an anomaly handling instruction if it is determined that there is a strategy execution anomaly on the server to be processed, the anomaly handling instruction including at least one of resending the power consumption adjustment strategy, adjusting the power management unit parameters, or triggering a fault alarm on the server to be processed.
[0109] For a description of the features in the embodiment corresponding to the server power consumption adjustment device, please refer to the relevant description in the embodiment corresponding to the server power consumption adjustment method, which will not be repeated here.
[0110] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described server power consumption regulation method embodiments.
[0111] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described server power consumption regulation method embodiments when running.
[0112] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0113] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described server power consumption adjustment method embodiments.
[0114] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described server power consumption regulation method embodiments.
[0115] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0116] The above provides a detailed description of a server power consumption adjustment method, electronic device, storage medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for regulating server power consumption, characterized in that, include: If it is determined that the server to be processed meets the power consumption adjustment conditions, the inverse mapping function corresponding to the power consumption load association model is determined based on the inverse mapping relationship of the power consumption load association model of the server to be processed. The power consumption load association model is pre-trained and generated based on the historical load data of the server to be processed and the historical power consumption data corresponding to the historical load data. The reverse mapping function is used to perform reverse load analysis on the target power consumption data of the server to be processed to obtain a target load threshold that matches the target power consumption data. The target power consumption data is determined based on the preset power consumption threshold and preset safety margin of the server to be processed. Based on the target load threshold, a power consumption adjustment strategy is generated for the server to be processed, so as to adjust the power consumption of the server to be processed according to the power consumption adjustment strategy.
2. The method according to claim 1, characterized in that, Before determining the inverse mapping function corresponding to the power load association model based on the inverse mapping relationship of the power load association model of the server to be processed, when it is determined that the server to be processed meets the power consumption adjustment conditions, the method includes: Obtain the real-time operating status data of the server to be processed; Based on the power consumption load correlation model, power consumption is predicted from the real-time operating status data to obtain the predicted power consumption data of the server to be processed. If the predicted power consumption data is greater than the preset power consumption threshold, it is determined that the server to be processed meets the power consumption adjustment condition.
3. The method according to claim 1, characterized in that, Before determining the inverse mapping function corresponding to the power load association model based on the inverse mapping relationship of the power load association model of the server to be processed, when it is determined that the server to be processed meets the power consumption adjustment conditions, the method includes: Obtain the historical load data of the server to be processed and the historical power consumption data corresponding to the historical load data; The historical load data is decomposed into time series trends to obtain the load trend feature data of the server to be processed. Based on the load trend characteristic data and the historical power consumption data, an input vector and an output vector are constructed. Using machine learning algorithms, the input vector, and the output vector, a power consumption load correlation model for the server to be processed is trained and generated.
4. The method according to claim 1, characterized in that, The step of generating a power consumption adjustment strategy for the server to be processed based on the target load threshold, and adjusting the power consumption of the server to be processed according to the power consumption adjustment strategy, includes: Based on the real-time operating data of the server to be processed and the target load threshold, determine the hardware to be processed in the server to be processed and the abnormal load data of the hardware to be processed. Based on the hardware characteristics of the hardware to be processed, the abnormal load data, and the target power level corresponding to the target power consumption data, a power adjustment instruction adapted to the hardware to be processed is determined, and the power adjustment instruction is integrated to obtain the power adjustment strategy. The power consumption adjustment strategy is sent to the power management unit of the server to be processed, so that the power management unit adjusts the power supply parameters of the server to be processed based on the power consumption adjustment strategy.
5. The method according to claim 2, characterized in that, The process of obtaining the real-time operating status data of the server to be processed includes: The initial operating status data of the server to be processed is acquired by a monitoring agent program deployed on the server to be processed at a preset collection frequency. The initial running status data is preprocessed to obtain preprocessed real-time running status data. The data preprocessing includes at least one of outlier removal, smoothing filtering, timestamp alignment, and standardization.
6. The method according to claim 1, characterized in that, After adjusting the power consumption of the server to be processed according to the power consumption adjustment strategy, the method includes: The power consumption adjustment data, actual power consumption data, and load change data of the server to be processed after being adjusted by the power consumption adjustment strategy are obtained, and the power consumption adjustment data, actual power consumption data, and load change data are integrated to obtain a feedback dataset. Based on the positive correlation between data timestamps and weight values, at least one weight value is determined for at least one feedback data in the feedback dataset. Based on the at least one weight value and the model parameter determination algorithm, the updated model parameters of the power load association model are determined, so as to update the power load association model according to the updated model parameters.
7. The method according to claim 2, characterized in that, Before acquiring the real-time operating status data of the server to be processed, the method includes: Obtain the task scheduling queue data of the server to be processed, the task scheduling queue data including the type of task to be processed, the priority of task to be processed, and the estimated execution time of task to be processed. Feature extraction is performed on the type of task to be processed, the priority of the task to be processed, and the expected execution time of the task to be processed to obtain the distribution features of task type, task priority, and expected execution time. The task type distribution characteristics, the task priority distribution characteristics, and the task expected execution time distribution characteristics are used as input features to the load prediction model to predict the future load change trend of the server to be processed within a preset time period. The load prediction model is trained based on the historical task scheduling queue data of the server to be processed. Based on the predicted future load change trends, adjust the task scheduling queue data of the servers to be processed.
8. The method according to claim 4, characterized in that, After adjusting the power consumption of the server to be processed according to the power consumption adjustment strategy, the method further includes: Obtain the actual power consumption data, load change data, and task processing delay time of the server to be processed after the power consumption adjustment strategy. Based on the actual power consumption data, the load change data, the task processing delay time, and the abnormal execution judgment conditions, determine whether the server to be processed has a policy execution abnormality; If it is determined that there is a policy execution anomaly on the server to be processed, an anomaly handling instruction is generated. The anomaly handling instruction includes at least one of resending the power consumption adjustment policy, adjusting the parameters of the power management unit, or triggering a fault alarm on the server to be processed.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the server power consumption regulation method according to any one of claims 1-8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the server power consumption regulation method according to any one of claims 1-8.