A server power mode switching method, apparatus, device and medium

By acquiring power supply unit and server hardware data, using predictive models to predict load, and generating switching commands, the problem of inaccurate PSU mode switching is solved, achieving more efficient energy management and extending PSU lifespan.

CN122131897APending Publication Date: 2026-06-02INSPUR (SHANDONG) COMPUTER TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR (SHANDONG) COMPUTER TECH CO LTD
Filing Date
2026-05-08
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of PSU mode switching is low, resulting in frequent switching that consumes additional energy and shortens the lifespan of the PSU.

Method used

By acquiring the operating parameters of the power supply unit and server hardware data, load prediction is performed using a target prediction model to generate load levels and load recovery time windows. Based on this information, mode switching instructions are generated to avoid frequent switching.

Benefits of technology

It achieves precise PSU mode switching, reduces unnecessary energy consumption, and extends the service life of the PSU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122131897A_ABST
    Figure CN122131897A_ABST
Patent Text Reader

Abstract

This invention relates to the field of server technology, and in particular to a method, apparatus, device, and medium for switching server power modes. The method includes acquiring operating parameters of a power supply unit and various hardware data of the server, including not only power supply status but also server hardware data; performing load prediction using a target prediction model based on the operating parameters of the power supply unit and the various hardware data of the server, which can accurately predict the load level and load recovery time window for a future preset period; matching the power mode corresponding to the load level according to the load level for the future preset period; and generating a mode switching command based on the power mode corresponding to the load level and the load recovery time window. This enables power mode switching to more accurately match load changes, and switching between mode levels based on the load recovery time window can avoid power damage caused by excessively rapid switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a server power mode switching method, apparatus, device, and medium. Background Technology

[0002] As data center server clusters expand, the Power Supply Unit (PSU), as a core power supply component, becomes crucial for energy-saving management, which is key to reducing data center operating costs. The Baseboard Management Controller (BMC), as the core of remote server management, controls power status through communication with the PSU. Currently, the industry mainstream adopts the PMBus (Power Management Bus) protocol as the communication standard between the BMC and PSU. This protocol is based on the I2C (Inter-Integrated Circuit) bus extension and supports basic functions such as power consumption monitoring and mode switching.

[0003] In related technologies, the operating mode of the power supply unit is dynamically adjusted based on the real-time load rate. Specifically, the load of the power supply unit is monitored in real time. When the current load is detected to be below a certain threshold, the power supply unit is switched to sleep mode to reduce switching losses; conversely, when the load rate rises back above the threshold, it is switched back to wake-up mode.

[0004] In practical applications, when the load experiences a sudden peak, this method relies on a serial process of monitoring, judgment, and response. Furthermore, it adjusts the mode after the load has increased and exceeded the threshold, resulting in low accuracy in determining whether to switch modes. This can lead to frequent switching, additional energy consumption, and a shortened PSU lifespan.

[0005] It is evident that accurately switching between PSU modes is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a server power mode switching method, apparatus, device, and medium that can accurately achieve PSU mode switching.

[0007] In a first aspect, a server power mode switching method is provided, comprising: acquiring operating parameters of a power supply unit and various hardware data of the server; performing load prediction using a target prediction model based on the operating parameters of the power supply unit and the various hardware data of the server to obtain a load level and a load recovery time window for a future preset period, wherein the load recovery time window represents the time required for switching between adjacent load levels; matching the power mode corresponding to the load level according to the load level of the future preset period; generating a mode switching instruction based on the power mode corresponding to the load level and the load recovery time window; and sending the mode switching instruction to the power supply unit.

[0008] In a preferred embodiment, the present invention can be further configured to: generate a mode switching instruction based on the power mode corresponding to the load level and the load recovery time window, including: obtaining constraints and comparison information; adjusting the power mode corresponding to the load level based on the constraints and the comparison information to obtain the adjusted power mode corresponding to the load level; and generating a mode switching instruction based on the adjusted power mode corresponding to the load level.

[0009] In a preferred embodiment, the present invention can be further configured as follows: the constraints include at least one of the following: task constraint information; service operation latency constraint information; hardware health constraint information; the information to be compared corresponds to the constraints, and the information to be compared includes at least one of the following: task type, latency, and health information, wherein the health information includes hardware health degradation and / or sleep frequency; according to the constraints and the information to be compared, the power mode corresponding to the load level is adjusted to obtain the adjusted power mode corresponding to the load level, including: when the task type is an uninterruptible task of the task constraint information, and the power mode corresponding to the load level is not a normal working mode, determining first adjustment information, wherein the first adjustment information is an adjustment of the load level. The system obtains information on the power mode corresponding to the normal operating mode; when the delay does not meet the preset delay threshold of the service operation delay constraint information, it determines the second adjustment information, which is information on adjusting the power mode corresponding to the load level to the corresponding power mode; when the hardware health loss reaches the preset loss threshold of the hardware health constraint information, or the sleep frequency reaches the preset sleep frequency of the hardware health constraint information, it determines the third adjustment information, which is information on adjusting the power mode corresponding to the load level to the corresponding power mode; based on at least one of the first adjustment information, the second adjustment information, and the third adjustment information, it adjusts the power mode corresponding to the load level to obtain the adjusted power mode corresponding to the load level.

[0010] In a preferred embodiment, the present invention can be further configured to: match the power mode corresponding to the load level according to the load level of the future preset time period, including: when the target load level in the load level of the future preset time period is a high load or a medium load, determining the power mode corresponding to the target load level as a normal operation mode; when the target load level is a low load, determining the power mode corresponding to the target load level as a light sleep operation mode; and when the target load level is no load, determining the power mode corresponding to the target load level as a deep sleep operation mode.

[0011] In a preferred embodiment, the present invention may further include: acquiring business requirement scenario features; and determining a target prediction model from at least two prediction models based on the business requirement scenario features.

[0012] In a preferred embodiment, the present invention can be further configured as follows: the business requirement scenario features include a model inference time threshold; based on the business requirement scenario features, a target prediction model is determined from at least two prediction models, including: obtaining the actual inference time thresholds of at least two prediction models; and determining the target prediction model from at least two prediction models based on the actual inference time thresholds of at least two prediction models and the model inference time thresholds.

[0013] In a preferred embodiment, the present invention can be further configured to: determine a target prediction model from at least two prediction models based on the characteristics of the business demand scenario, including: determining the target prediction model from at least two prediction models based on the characteristics of the business demand scenario and hardware health characteristics.

[0014] In a preferred embodiment, the present invention can be further configured to: determine a target prediction model from at least two prediction models based on the business demand scenario characteristics and hardware health characteristics, including: determining a first score based on the business demand scenario characteristics; determining a second score based on the hardware health characteristics; determining a comprehensive score based on the first score and the second score; and determining the target prediction model from at least two prediction models based on the comprehensive score.

[0015] In a preferred embodiment, the present invention may be further configured such that the hardware data of the server includes hardware load data and / or hardware health data.

[0016] In a preferred embodiment, the present invention can be further configured to: send the mode switching instruction to the power supply unit, including: when the mode switching instruction includes a hibernation instruction, sending a pre-hibernation notification to the operating system, so that the operating system stops processing new services, stops caching data, and closes processes according to the hibernation notification; and sending the mode switching instruction to the power supply unit.

[0017] In a preferred embodiment, the present invention may be further configured as follows: after sending the mode switching command to the power supply unit, the invention further includes: obtaining the actual load corresponding to the future preset time period; determining the deviation rate based on the actual load and the predicted load, wherein the predicted load is data obtained by load prediction based on the target prediction model; and adjusting the parameters of the target prediction model based on the deviation rate.

[0018] In a preferred embodiment, the present invention may be further configured as follows: after sending the mode switching instruction to the power supply unit, it further includes: when the fluctuation of the load level in the future preset period does not conform to the preset fluctuation condition, extending the time window for obtaining PSU operating parameters and various hardware data of the server.

[0019] Secondly, a server power mode switching device is provided, comprising: a data acquisition module for acquiring operating parameters of a power supply unit and various hardware data of the server; a load prediction module for performing load prediction using a target prediction model based on the operating parameters of the power supply unit and the various hardware data of the server, to obtain a load level and a load recovery time window for a future preset period, wherein the load recovery time window represents the time required for switching between adjacent load levels; a mode decision module for matching the power mode corresponding to the load level according to the load level of the future preset period; and generating a mode switching instruction based on the power mode corresponding to the load level and the load recovery time window; and an execution feedback module for sending the mode switching instruction to the power supply unit.

[0020] Thirdly, an electronic device is provided, including a memory for storing a computer program; and a processor for executing the computer program to implement the method as described in any of the first aspects.

[0021] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the server power mode switching method as described in any of the first aspects.

[0022] Fifthly, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the server power mode switching method as described in any of the first aspects.

[0023] In summary, the server power mode switching method provided by this invention has the following beneficial technical effects: It acquires the operating parameters of the power supply unit and various hardware data of the server, including not only the power supply status but also the server's hardware data; based on the operating parameters of the power supply unit and the various hardware data of the server, it uses a target prediction model to perform load prediction, which can accurately predict the load level and load recovery time window for a preset future period, wherein the load recovery time window represents the time required for switching between adjacent load levels; it matches the power mode corresponding to the load level based on the load level for the preset future period; and it generates a mode switching command based on the power mode corresponding to the load level and the load recovery time window; this enables power mode switching to more accurately match load changes, and switching between mode levels based on the load recovery time window can avoid power damage caused by excessively rapid switching.

[0024] In addition, the present invention also provides a server power mode switching device, equipment and medium, all of which have the above-mentioned beneficial technical effects. Attached Figure Description

[0025] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating a server power mode switching method provided in an embodiment of the present invention.

[0027] Figure 2 This is a schematic diagram of the structure of a module set in a BMC according to an embodiment of the present invention.

[0028] Figure 3 This is a schematic diagram illustrating another server power mode switching process provided in an embodiment of the present invention.

[0029] Figure 4 This is a schematic diagram of a server power mode switching device provided in an embodiment of the present invention.

[0030] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0032] It should be noted that, in the optional embodiments of the present invention, the data related to object information, etc., requires the permission or consent of the object when the embodiments of the present invention are applied to specific products or technologies. Furthermore, the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of the present invention involve data related to an object, it must be obtained with the permission and consent of the object, the permission and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the permission and consent of the object.

[0033] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.

[0034] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0035] The following sections will describe in detail a server power mode switching method, apparatus, device, and medium provided by embodiments of the present invention.

[0036] This invention provides a method for switching server power modes, such as... Figure 1 As shown, the method provided in this embodiment of the invention can be executed by an electronic device, which is a server. This server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. This embodiment of the invention does not impose any limitations. The method includes: S101, acquiring the operating parameters of the power supply unit and various hardware data of the server.

[0037] In this embodiment of the invention, the BMC-integrated data acquisition module acquires various hardware data of the server via the I2C bus and acquires PSU operating parameters via the PMBus interface.

[0038] The server's hardware data includes individual hardware load data and / or individual hardware health data. Hardware load data includes, but is not limited to: CPU (Central Processing Unit) utilization, temperature (CPU, memory, hard drive, expansion devices, etc.), fan speed, fan PWM (Pulse Width Modulation), and other hardware load data. Hardware health data includes, but is not limited to: the aging level of each hardware component, and the number of PSU hibernation switches. Power supply unit operating parameters include, but are not limited to, PSU output power, operating temperature, and other operating parameters. The server's hardware data may also include system operating status, i.e., server power-on status, component availability, and the presence of alarms, ensuring real-time data accuracy.

[0039] S102. Based on the operating parameters of the power supply unit and the hardware data of the server, load prediction is performed using the target prediction model to obtain the load level and load recovery time window for the future preset period.

[0040] The load recovery time window represents the time required for adjacent load levels to switch.

[0041] In related technologies, switching is passively performed based solely on real-time load thresholds, without introducing a load prediction mechanism, making it impossible to predict future load recovery trends. In this invention, the load prediction module deployed in the BMC embedded processor can perform load prediction based on a target prediction model. This invention deploys one or more prediction models; when multiple prediction models are used, the model can be dynamically switched during the decision-making process to determine the target prediction model.

[0042] In this embodiment of the invention, the collected operating parameters of the power supply unit and various hardware data of the server are converted into feature vectors and input into the target prediction model. The model inference time can be controlled within 10ms, and the load trend and recovery time window for a future preset time period (T period) are output. The load trend is composed of load levels, and the load level includes at least one load level.

[0043] The model's input features include power supply unit operating parameters over a preset historical period (e.g., the past hour), server hardware data such as PSU output power statistics, peak CPU utilization, component temperature and load characteristics, time characteristics, system utilization, and hardware health characteristics (component aging level, PSU hibernation switching count). The model outputs the load level (high / medium / low / no load) and load recovery time window for a preset future period (5-300 seconds, configurable), along with prediction confidence.

[0044] The load recovery time window refers to the time required for the load level to switch between different levels. For example, if the load level will rise from low to high after a certain period of time in the future, this specific time allows for advance adjustment of the power mode. For instance, if the future period is 30 seconds, and it is predicted that the load will be low for the next 0-30 seconds, the power level will be increased to the medium load mode at 0 seconds, within the corresponding load recovery time window. Of course, if the load recovery time window is 'a', it can be gradually increased to the medium load mode within the remaining 0-'a' seconds. Naturally, if the predicted future period is long, the predicted load level may be a load level sequence.

[0045] By utilizing the load recovery time window and buffer time, the mode can be gradually adjusted, such as gradually increasing the output power to achieve a gradual adjustment, which can reduce energy consumption to a certain extent.

[0046] S103. Match the power mode corresponding to the load level according to the load level of the future preset period; and generate a mode switching command according to the power mode corresponding to the load level and the load recovery time window.

[0047] In this embodiment of the invention, the BMC has a built-in PSU mode decision module, which can make decisions on the mode based on the prediction results, combined with the load level and the load recovery time window, to avoid frequent switching of PSU sleep mode and facilitate BMC decision anti-jitter.

[0048] Among them, at least one load level can correspond to a power mode, such as high load corresponding to power mode 1, medium load corresponding to power mode 2, low load corresponding to power mode 3, and no load corresponding to power mode 4; or, high load / medium load corresponding to power mode a, low load corresponding to power mode b, and no load corresponding to power mode c.

[0049] In one feasible approach, the system maintains normal operation under high / medium load (PSU output power ≥ 50% of rated power); under low load (10%-50% of rated power), it enters a light-load sleep mode (reducing voltage and frequency while allocating the load ratio between primary and backup PSUs (controlling the power of the primary and backup PSUs according to the load allocation)); and under no load (< 10% of rated power and no timed tasks), it enters a deep sleep mode (only the wake-up circuit and BMC power supply are retained). In this embodiment of the invention, the PSU mode decision module has a built-in PSU hardware parameter library to set corresponding parameters for each mode.

[0050] Furthermore, based on the power mode corresponding to the load level and the load recovery time window, a mode switching instruction is generated. This mode switching instruction enables the PSU to switch to the corresponding power mode over time according to each power mode in the generated power mode sequence and the corresponding load recovery time window.

[0051] S104. Send mode switching command to power supply unit.

[0052] In this embodiment of the invention, the BMC has a built-in execution feedback module, and the BMC sends mode switching instructions to the PSU through the PMBus interface.

[0053] Furthermore, related technologies lack feedback optimization mechanisms, and setting fixed thresholds makes it difficult to adapt to load fluctuations in different scenarios, resulting in limited ability to balance energy saving and response speed. This invention also includes: after the BMC issues control commands, the PSU receives the control commands through the PMBus and provides feedback on the PSU's operating status, operating voltage, power, etc., while the BMC collects real-time load energy consumption data to achieve closed-loop feedback.

[0054] Specifically, mode switching commands are issued via the PMBus interface to monitor the PSU's operating status in real time. Once the predicted period has truly ended and the complete, realistic load is obtained, the prediction deviation rate can be calculated. It's understandable that in sleep mode, the system operates at low power; calculating deviations and adjusting the model midway would increase system overhead and reduce energy efficiency. Therefore, the deviation rate is calculated after waking up. If the deviation rate > 20%, model parameters are automatically adjusted, such as the number of LSTM (Long Short-Term Memory) training epochs or decision thresholds (e.g., the duration of no-load judgment). After each execution cycle, feedback data flows back to the data acquisition module, entering the next closed loop for continuous optimization.

[0055] As can be seen, in this embodiment of the invention, the operating parameters of the power supply unit and various hardware data of the server are obtained. This data includes not only the power supply status but also the hardware data of the server. Based on the operating parameters of the power supply unit and the hardware data of the server, load prediction is performed using a target prediction model. This can accurately predict the load level and load recovery time window for a preset period in the future. The load recovery time window represents the time required for switching between adjacent load levels. Based on the load level for the preset period in the future, the power mode corresponding to the load level is matched. And based on the power mode corresponding to the load level and the load recovery time window, a mode switching command is generated. This makes the power mode switching more accurately match the load changes, and the switching between mode levels based on the load recovery time window can avoid power damage caused by too rapid switching.

[0056] One possible implementation of this invention involves generating a mode switching instruction based on the power mode corresponding to the load level and the load recovery time window, including: obtaining constraints and comparison information; adjusting the power mode corresponding to the load level based on the constraints and comparison information to obtain the adjusted power mode corresponding to the load level; and generating a mode switching instruction based on the adjusted power mode corresponding to the load level.

[0057] In this embodiment of the invention, constraints are set to indicate whether a specific power mode needs to be maintained. The comparison information is the comparison information corresponding to the time period of the predicted load level. When the comparison information meets the constraints, no adjustment is needed; when it does not meet the constraints, adjustment is needed. During adjustment, the power mode can be downgraded / upgraded by one level. For example, if the predicted power mode for the preset time period is deep sleep, and the current mode is normal operation, the deep sleep mode is downgraded to light load sleep mode; or if the predicted power mode for the preset time period is normal operation, and the current mode is deep sleep, the deep sleep mode is upgraded to light load sleep mode; or the power mode can be downgraded to the power mode that best meets the constraints.

[0058] As can be seen, in this embodiment of the invention, the constraints and comparison information are first obtained; based on the constraints and comparison information, the power mode corresponding to the load level is adjusted to obtain the adjusted power mode. This adjustment process fully considers various limitations and requirements in actual operation, making the generated power mode more in line with the actual situation.

[0059] In one feasible embodiment, non-sleepable scenarios are first excluded through constraint checks. Then, the optimal mode is matched with the PSU hardware parameter library based on the load prediction results. The parameter library stores the parameters corresponding to the working mode, light-load sleep mode, and deep sleep mode. The mode is determined based on the load prediction results, and then the corresponding parameters are matched based on the determined mode to generate a switching command.

[0060] Constraints take precedence over load forecasting. During periods when sleep is not allowed, normal mode is enforced, while light-load sleep is implemented during other low-load periods.

[0061] One possible implementation of this invention includes constraints including at least one of the following: task constraint information; service operation latency constraint information; hardware health constraint information; information to be compared corresponding to the constraints, and the information to be compared including at least one of the following: task type, latency, and health information, wherein the health information includes hardware health degradation and / or sleep frequency.

[0062] The BMC incorporates a built-in PSU mode decision module, which includes a PSU hardware parameter library (storing rated power, delays for each mode, and energy consumption parameters) and employs a three-layer constraint intelligent decision-making logic. Task constraints indicate that when the current task is an uninterruptible task, such as data writing or critical computation, it should maintain normal operation mode and cannot be switched to sleep mode. Business workload latency constraints indicate that when the latency does not meet the preset latency threshold, the mode needs to be adjusted. Latency includes: the switching latency required to switch from the previous mode to the next (when switching from sleep to wake-up in normal operation mode, it is the wake-up latency; deep sleep mode has a longer wake-up latency, while light-load sleep mode has a shorter wake-up latency), or prediction inference duration + switching latency. Health information includes hardware health degradation and / or sleep frequency.

[0063] Specifically, based on the constraints and comparison information, the power mode corresponding to the load level is adjusted to obtain the adjusted power mode corresponding to the load level. This includes: when the task type is an uninterruptible task according to the task constraint information, and the power mode corresponding to the load level is not a normal working mode, determining first adjustment information, which is information to adjust the power mode corresponding to the load level to the normal working mode; when the delay does not meet the preset delay threshold of the service operation delay constraint information, determining second adjustment information, which is information to adjust the power mode corresponding to the load level to the corresponding power mode; when the hardware health loss reaches the preset loss threshold of the hardware health constraint information, or the sleep frequency reaches the preset sleep frequency of the hardware health constraint information, determining third adjustment information, which is information to adjust the power mode corresponding to the load level to the corresponding power mode; and adjusting the power mode corresponding to the load level according to at least one of the first, second, and third adjustment information to obtain the adjusted power mode corresponding to the load level.

[0064] For uninterruptible tasks, the power mode is set to normal operating mode. This means that if the task constraints include task constraint information, it will be directly set to normal operating mode when determined to be an uninterruptible task.

[0065] Regarding latency, when the latency is a switching latency, the service operation latency constraint information is a preset switching latency threshold. Based on the current power mode and the predicted power mode, a table is consulted to obtain the time required for switching between the current power mode and the predicted power mode. The time is compared with the preset switching latency threshold. If the required time is not longer than the preset switching latency threshold, it means that no power mode adjustment is needed; if the required time is longer than the preset switching latency threshold, it means that the power mode needs to be adjusted. When adjusting the power mode, it can be downgraded / upgraded by one level, or adjusted to the mode that best meets the latency requirements. When it is the predicted inference time + switching latency, based on the current power mode and the predicted power mode, a table is consulted to obtain the time required for switching between the current power mode and the predicted power mode. The required time and the inference time are used to obtain the total time, and the total time is compared with the preset switching latency threshold. The specific method used is not limited in this embodiment of the invention, and users can set it according to actual needs.

[0066] Regarding health information, when the hardware health wear reaches the preset wear threshold of the hardware health constraint information, or when the sleep frequency reaches the preset sleep frequency of the hardware health constraint information, it can be downgraded / upgraded by one level.

[0067] Furthermore, whenever the constraints include task constraint information, the power mode corresponding to the load level is adjusted according to the first adjustment information to obtain the adjusted power mode corresponding to the load level, wherein the adjusted power mode is the normal operating mode.

[0068] When the constraints include: service operation delay constraint information, the power mode corresponding to the load level is adjusted according to the second adjustment information to obtain the adjusted power mode corresponding to the load level.

[0069] When the constraints include hardware health constraint information, the power mode corresponding to the load level is adjusted according to the third adjustment information to obtain the adjusted power mode corresponding to the load level.

[0070] When the constraints include service operation latency constraints and hardware health constraints, the power mode is adjusted based on the adjustment information that best matches the two constraints from the second and third adjustment information.

[0071] One possible implementation of this invention involves matching the power mode corresponding to the load level based on the load level of a future preset time period, including: when the target load level in the future preset time period is a high load or a medium load, determining the power mode corresponding to the target load level as a normal operation mode; when the target load level is a low load, determining the power mode corresponding to the target load level as a light sleep operation mode; and when the target load level is no load, determining the power mode corresponding to the target load level as a deep sleep operation mode.

[0072] One possible implementation of this invention further includes: obtaining business requirement scenario characteristics; and determining a target prediction model from at least two prediction models based on the business requirement scenario characteristics.

[0073] In this embodiment of the invention, the load prediction module can be a multi-model architecture that can dynamically switch during the decision-making process. Taking a dual-model architecture as an example, a lightweight LSTM neural network model can be built in, which consumes less computing power and is suitable for low-priority energy-saving scenarios, such as data storage and backup; a TFT (Temporal Fusion Transformer) model can be built in, which is suitable for high-priority, high-precision scenarios, such as financial transactions and cloud computing. The confidence level of the TFT model is higher than that of the lightweight LSTM model to adapt to its high-precision working scenarios.

[0074] For the LSTM model, a lightweight LSTM model can be developed. This is achieved by reducing the number of network layers, decreasing the number of hidden units, or employing techniques such as pruning and quantization. This retains the advantages of the LSTM model in processing time series data, such as capturing long-term dependencies, while reducing computational complexity and memory usage. The lightweight LSTM model consists of an input layer, lightweight LSTM layers, and fully connected layers.

[0075] The system collects operating parameters of the power supply unit and various hardware data of the server, cleans and normalizes them, and extracts time-series features (such as sliding window statistical features) for model training. The model parameters are then updated using the backpropagation algorithm. The trained lightweight LSTM model is then used to predict the load for a predetermined future time period.

[0076] The lightweight TFT model is achieved by simplifying the Transformer architecture, reducing the number of attention heads, or employing sparse attention. It retains the advantages of the TFT model in feature extraction and pattern recognition while reducing computational complexity and memory footprint. The lightweight TFT model is constructed by including an input embedding layer, lightweight self-attention layers, convolutional layers, and fully connected layers. The model is trained using training data, and its parameters are updated through algorithm optimization. The model is then fine-tuned using validation data to select the optimal model structure and hyperparameters. The trained lightweight TFT model is then used to predict the load for a predetermined future time period. The lightweight TFT model can more accurately capture complex patterns and long-term dependencies in load changes, thus potentially leading to more accurate predictions.

[0077] During the data acquisition phase, the data acquisition module, which is automatically activated after BMC starts, synchronously collects scenario feature data. Among these, the business requirement scenario features include at least one of the following: business type and model inference time threshold.

[0078] Business types include: archiving business, transaction business, etc. Different business types have different requirements for model accuracy and different business demand response times. The business demand response time is the model inference time.

[0079] In one feasible approach, based on the business type and a preset business type and corresponding accuracy level, a target prediction model corresponding to the accuracy level is matched from at least two prediction models.

[0080] In another feasible approach, the business requirement scenario features include a model inference time threshold; obtaining the actual inference time thresholds of at least two prediction models; and determining the target prediction model from the at least two prediction models based on the actual inference time thresholds of the at least two prediction models and the model inference time threshold. Specifically, when Model 1 and Model 2 exist; assuming the model inference time threshold is 10ms, and the previous inference time of Model 1 was 8ms, Model 1 is used as the final inference model.

[0081] If the inference time threshold is 7ms, and the previous inference time for Model 1 was 8ms, then if the previous inference time for Model 2 is 5ms, Model 2 is selected as the final inference model. If the inference time threshold is 7ms, and the previous inference time for Model 1 was 8ms, then if the previous inference time for Model 2 is 10ms, Model 1 is selected as the final inference model.

[0082] Furthermore, when switching models, it is necessary to ensure that the last prediction result and feature weights of the previous model are successfully saved and fine-tuned by the switched model, so as to enable iterative training of the model and make the model prediction more and more accurate.

[0083] As can be seen, in this embodiment of the invention, business demand scenario characteristics are obtained; based on these characteristics, a target prediction model is determined from at least two prediction models. Different prediction models may have different advantages when processing data in different business scenarios. Selecting a target prediction model that matches the characteristics of the current business demand scenario can make load prediction more closely reflect the actual business situation and improve the accuracy of load prediction.

[0084] One possible implementation of this invention involves determining a target prediction model from at least two prediction models based on business requirement scenario characteristics, including: determining the target prediction model from at least two prediction models based on business requirement scenario characteristics and hardware health characteristics.

[0085] Among them, hardware health characteristics are a series of features that describe the current health status of hardware devices, including hardware temperature (such as CPU temperature and hard drive temperature), wear and tear (such as hard drive read and write cycles and lifespan), and fault history (whether there have been faults in the past, the type of fault, and the repair status), which are used to assess the reliability and stability of the hardware.

[0086] As can be seen, in this embodiment of the invention, not only are the characteristics of business demand scenarios considered, but also the characteristics of hardware health are combined; by using both the characteristics of business demand scenarios and the characteristics of hardware health as the basis for determining the target prediction model, various factors affecting load prediction can be considered more comprehensively, so that the selected target prediction model can predict the load more accurately.

[0087] Specifically, based on the characteristics of business demand scenarios and hardware health characteristics, a target prediction model is determined from at least two prediction models, including: determining a first score based on the characteristics of business demand scenarios; determining a second score based on the hardware health characteristics; determining a comprehensive score based on the first and second scores; and determining the target prediction model from at least two prediction models based on the comprehensive score.

[0088] The first score quantifies a certain state or degree of a business requirement scenario. The second score quantifies the health of the hardware. The overall score comprehensively reflects the overall situation of both the business requirement scenario and the hardware health.

[0089] In one feasible approach, the weights of each feature are pre-determined based on their importance to business forecasting, considering both the characteristics of the business demand scenario and the hardware health characteristics. For example, in the business demand scenario characteristics, the response time of business demands may have a significant impact on the business and is therefore given a higher weight; in the hardware health characteristics, the hardware's failure history may better reflect its reliability and is also given a higher weight.

[0090] Assume the business requirement scenario features include accuracy and business requirement response time, with weights of 0.4 and 0.6 respectively; hardware health features include hardware temperature, wear level, and fault history, with weights of 0.4, 0.3, and 0.3 respectively. Each feature is scored according to a preset scoring standard. For example, a model accuracy above 80% is considered excellent and scores 5 points; a business requirement response time within a reasonable range scores 4 points. The first score is calculated according to the weights: First Score = Accuracy Score × 0.4 + Business Requirement Response Time Score × 0.5 = 5 × 0.4 + 4 × 0.6 = 4.4. For hardware health features, data on hardware temperature, wear level, and fault history are collected. Scoring is then performed according to the scoring standard. For example, normal hardware temperature scores 5 points; low wear level scores 4 points; and a good fault history scores 5 points. The second score = hardware temperature score × 0.4 + wear and tear score × 0.3 + fault history score × 0.3 = 5 × 0.4 + 4 × 0.3 + 5 × 0.3 = 2 + 1.2 + 1.5 = 4.7. Assuming that business requirement scenario characteristics and hardware health characteristics have equally important impacts on the overall score, the overall score = (first score + second score) / 2 = (4.3 + 4.7) / 2 = 4.5.

[0091] The overall score is matched with the applicable conditions of each prediction model. For example, prediction model A is suitable for overall scores of 4-5, and prediction model B is suitable for overall scores of 3-4; prediction model A is selected as the target prediction model.

[0092] One possible implementation of this invention involves sending a mode switching instruction to a power supply unit, including: when the mode switching instruction includes a hibernation instruction, sending a pre-hibernation notification to the operating system so that the operating system stops processing new services, stops caching data, and closes processes according to the hibernation notification; and sending the mode switching instruction to the power supply unit.

[0093] In this embodiment of the invention, if the mode switching instruction includes a hibernation instruction, the BMC sends the mode switching instruction to the PSU through the PMBus interface. Before switching, the BMC sends a pre-hibernation notification to the operating system to ensure data security. The OS stops processing new services, caches data, performs graceful shutdown of processes, and sends a hibernation permission signal to the BMC after the work is completed.

[0094] As can be seen, in this embodiment of the invention, when the mode switching instruction includes a hibernation instruction, a pre-hibernation notification is first sent to the operating system; the operating system stops processing new services, stops caching data, and closes processes according to the hibernation notification, properly handling ongoing services and data to avoid data loss or service interruption; then, a mode switching instruction is sent to the power supply unit, causing the power supply unit to switch the server to hibernation mode according to the instruction; this ensures the stability and data security of the server during the power mode switching process, avoids system failures or data corruption caused by sudden mode switching, and improves the security of server power mode switching.

[0095] In one possible implementation of this invention, after sending the mode switching command to the power supply unit, the method further includes: obtaining the actual load corresponding to a future preset time period; determining the deviation rate based on the actual load and the predicted load, wherein the predicted load is data obtained by load prediction based on a target prediction model; and adjusting the parameters of the target prediction model based on the deviation rate.

[0096] The BMC includes a model optimization unit, which is the core functional unit of the execution feedback module responsible for model self-optimization and threshold adaptive adjustment. It is used to statistically analyze the deviation rate between the actual load and the prediction results and dynamically adjust the model parameters and decision thresholds.

[0097] The target prediction model can predict the actual load, corresponding load level, and load recovery time window for a preset period of time based on the operating parameters of the power supply unit and the hardware data of the server.

[0098] The model optimization unit is responsible for adaptively correcting the model parameters and decision thresholds based on the deviation between the prediction results and the actual load (PSU output power), and taking the actual time corresponding to the prediction time.

[0099] According to the deviation rate The model parameters are adjusted by slightly increasing the learning rate when the deviation is large and decreasing it when the deviation is small. Gradient updates are performed using the latest actual load data, and model weights are fine-tuned to optimize the forget gate adaptation to time-series features. Input feature weights are adaptively allocated by calculating the Pearson correlation coefficient between each feature (CPU utilization, PSU power, component temperature, etc.) and the actual load, and dynamically allocating weights (when the correlation between PSU power and actual load increases from 0.6 to 0.8, the input weight of the power feature is increased, and the weight of features with low correlation is decreased). When the load sequence fluctuates too much, the time-series window is appropriately extended to capture more features and improve accuracy; conversely, the time-series window can be shortened to reduce redundant calculations and improve real-time performance.

[0100] In one possible implementation of this invention, after sending the mode switching command to the power supply unit, the method further includes: when the load level fluctuation in a future preset period does not conform to the preset fluctuation condition, extending the time window for obtaining the operating parameters of the power supply unit and the hardware data of the server.

[0101] For example, if the number of load levels in a future preset time period exceeds the first preset number, it indicates a large fluctuation. If the original data collection period was assumed to be 10 seconds, it will be adjusted to 12 seconds to capture more features and improve accuracy. If the number of load levels in a future preset time period is lower than the second preset number (the first preset number is greater than the second preset number), it indicates a small fluctuation. If the original data collection period was assumed to be 10 seconds, it will be adjusted to 8 seconds.

[0102] As can be seen, in this embodiment of the invention, after sending the mode switching command to the power supply unit, if the fluctuation of the load level in the future preset period does not conform to the preset fluctuation situation, extending the time window for obtaining PSU operating parameters and various hardware data of the server can obtain data over a longer period of time. The richer data can more comprehensively reflect the operating status and load change trend of the server.

[0103] Furthermore, this invention can be adapted to edge computing device scenarios, optimize lightweight prediction models to reduce computing power consumption; for blade server clusters, it adds PSU cluster collaborative management functions, and realizes cluster-level power scheduling based on overall load prediction.

[0104] This invention can also integrate AI large-scale model inference optimization, and achieve rapid adaptation of model parameters for different PSU models through transfer learning; combined with digital twin technology, it can construct a virtual simulation model of PSU, predict the effect of mode switching in advance, and further improve decision-making accuracy.

[0105] This invention can also add energy consumption visualization function, displaying PSU energy consumption curves and predicted trends through the BMC remote interface; and add a fault early warning mechanism, based on PSU operating parameters and load prediction results, to predict power failure risks and switch to redundancy mode in advance.

[0106] This invention is also compatible with new remote management protocols such as Redfish, improving cross-platform compatibility; it optimizes the fault tolerance mechanism of PMBus communication, adds data encryption transmission function, and improves security in industrial scenarios.

[0107] Based on any of the above embodiments, the core of the present invention is to construct a control system for data acquisition, load prediction, mode decision-making, and execution feedback. All modules are integrated into the server BMC and communicate bidirectionally with the PSU through the PMBus protocol. No additional hardware deployment is required; adaptive management of the PSU mode can be achieved simply through software algorithms and protocol adaptation.

[0108] 1. Addressing the issue of ineffective energy consumption caused by passive load response in existing technologies. Existing technologies (such as switching schemes based on real-time load thresholds) only passively trigger PSU mode switching based on the current load state, without predicting future load change trends. This leads to two scenarios of ineffective energy consumption: First, after triggering sleep mode under low load, the load rebounds quickly, requiring immediate wake-up. Frequent sleep-wake switching consumes additional energy and shortens the PSU's lifespan. Second, in redundant PSU architectures, multiple modules maintain flow sharing even under light loads, resulting in low conversion efficiency and energy waste. This invention aims to predict future load trends in advance through load forecasting, enabling predictive mode switching and reducing ineffective energy consumption at its source.

[0109] 2. Addressing the issue of limited selection of existing technology modes and their mismatch with business needs. Existing PSU modes mostly only support switching between working and standby modes, without considering the differentiated adaptation to PSU hardware characteristics (such as the energy consumption differences between different sleep modes). For example, deep sleep is not enabled in energy-sensitive scenarios, resulting in limited energy-saving effects. This invention aims to construct a multi-level sleep mode system to achieve precise matching between modes and business latency constraints and PSU hardware characteristics.

[0110] 3. Addressing the lack of adaptability in existing technologies with fixed thresholds. Existing technologies rely on fixed load thresholds (e.g., triggering hibernation when CPU utilization is <10%) or fixed durations (e.g., hibernation after 30 minutes of inactivity) for mode decisions, which cannot adapt to the load fluctuation characteristics of different servers (e.g., sudden loads on database servers, periodic loads on web servers, and low-power requirements of edge computing nodes). Fixed thresholds may be suitable in one scenario but may lead to excessive or insufficient energy saving in another, requiring frequent manual adjustments. This invention establishes a closed-loop feedback optimization mechanism to dynamically adjust the prediction model parameters and decision thresholds, achieving adaptive management without manual intervention.

[0111] 4. This invention addresses the issues of inappropriate switching and wear and tear caused by existing technologies failing to consider hardware health status. Existing technologies do not incorporate PSU aging status and server health data into their decision-making processes, potentially leading to insufficient energy efficiency and failure to meet hardware requirements during mode switching, as well as accelerated wear and tear on server components. This invention incorporates PSU aging status and server health data into prediction and decision-making, improving energy efficiency, reducing wear and tear, and extending hardware lifespan.

[0112] 5. Addressing the issue of insufficient scenario adaptability when using fixed LSTM neural network models. Existing technologies, especially lightweight LSTM models, suffer from accuracy deficiencies when using fixed prediction models. However, selecting high-precision models consumes significant resources, making efficient decision-making difficult under the limited computing power of the BMC. Therefore, to address different needs—high-priority low-latency scenarios and low-priority energy-saving scenarios—this invention designs a dynamic model switching mechanism to achieve precise matching between scenarios and models. It decides which model to use based on different needs, balancing accuracy, efficiency, and resource utilization.

[0113] This invention provides a predictive control-based PSU mode management method based on BMC (Biological Control Model). See [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of a module set in a BMC according to an embodiment of the present invention. The BMC integrates data acquisition, load prediction, mode decision and feedback optimization modules, and dynamically selects the PSU working mode based on the future load prediction results. The load prediction module adopts an LSTM model dynamic switching mechanism, and the input features include a fusion vector of PSU operating parameter statistics and scene features.

[0114] PSU model management method, see Figure 3 This includes: acquiring hardware load data, power supply operating parameters, and business system status; fusing the above input features; selecting a model based on the model library and making predictions; checking constraints and matching power supply modes; generating switching instructions and issuing mode switching instructions; obtaining information such as power supply operating status, energy consumption data, and actual load, and then optimizing the model based on the error.

[0115] For the first time, three types of constraints—uninterruptible tasks, service latency, and hardware health—are incorporated into the decision-making process, and multi-mode matching is achieved in conjunction with load levels. The mode decision-making phase first performs checks on uninterruptible tasks and system process constraints, then divides the system into three modes based on load level: normal operation, light-load hibernation, and deep hibernation. A lightweight TFT and LSTM dual-model architecture is adopted, dynamically switching based on three-dimensional triggering conditions: service attributes, hardware status, and predicted demand. This achieves high-precision (error ≤5%) and low-latency (inference ≤10ms) load prediction under the limited computing power of the BMC. Communication control between the BMC and PSU is achieved through the PMBus interface, including a complete process of pre-hibernation notification, mode switching command issuance, and operational status feedback. The data acquisition module, load prediction module, PSU mode decision module, execution feedback module, and remote interaction module all work collaboratively through the BMC embedded processor. The feedback module includes a deviation analysis unit that automatically adjusts model parameters or decision thresholds when the prediction deviation rate > 20%.

[0116] This invention deeply integrates load forecasting technology with PSU mode control, achieving high-precision load trend prediction under the limited computing power of the BMC through a lightweight model. For the first time, it incorporates three types of constraints—PSU hardware characteristics, business operation progress status, and uninterrupted task status—into the decision-making process, achieving multi-objective optimization of mode selection. Through prediction deviation statistics and adaptive parameter adjustment, a continuous iterative mechanism of data collection, prediction, decision-making, and optimization is constructed to improve the system's adaptability to different scenarios. Based on the PMBus protocol, it implements control over PSU multi-mode switching, operating parameter acquisition, and wake-up command transmission, ensuring communication stability and control accuracy.

[0117] By dynamically selecting PSU hibernation modes based on predicted load trends, unnecessary switching is avoided, reducing the average daily energy consumption of server PSUs, especially suitable for server clusters with low load at night and long-term operation. Decisions are made based on business needs, PSU hardware characteristics, and hardware health status to optimize energy saving, low latency, and hardware lifespan. High-priority services have low latency, and PSU lifespan is extended. The system selects modes based on service wake-up latency requirements and PSU hardware characteristics to improve user experience. A feedback optimization module continuously adjusts model parameters and decision thresholds to adapt to the load fluctuation characteristics of different servers without manual intervention. Implementation is based on native BMC interfaces (I2C, PMBus, D-Bus), requiring no modification to PSU hardware design and compatible with mainstream server BMC and PSU models. Hardware damage and health status constraints prevent the risk of aging hardware wear and tear, improving system stability and reliability. The dynamic model switching mechanism achieves precise matching between scenarios and models. High-priority services have prediction errors ≤5% and inference times ≤5ms, meeting low-latency requirements; low-priority services have 30% lower computing power consumption, balancing energy saving and accuracy; the switching process is seamless, with no prediction interruptions, ensuring the continuity of the control flow.

[0118] Example 1: A predictive control server PSU hibernation mode management method based on BMC.

[0119] This embodiment takes a server equipped with a 1600W high-efficiency redundant power supply as an example, and the execution steps are as follows: Step S1 Data Acquisition. The BMC collects CPU utilization (sampling frequency 100ms / time), memory temperature, hard disk temperature, backplane temperature, fan speed, GPU temperature, etc. through the I2C bus; it collects PSU output power (currently 250W, rated power 1600W), operating temperature (42℃), voltage ripple coefficient (2.5%), service type label is data archiving, wake-up latency threshold is 2s, PSU cumulative sleep count is 320 times (<500 times), and the previous prediction deviation rate is 8% (<15%). The system reads and collects information from sensors to monitor the temperature decrease trend over time at the current fan speed, and, after coupling with the current process history, the CPU power consumption and temperature at the current CPU utilization rate; it monitors keyboard / mouse events and KVM session status to confirm that there have been no user operations or active KVM connections in the past 5 minutes; it extracts PSU sleep and wake-up records from the BMC historical logs for the past 12 hours, with a 100% success rate for deep PSU sleep at night and wake-up latency of <60ms.

[0120] Step S2: Load forecasting.

[0121] Choose a lightweight LSTM model; input features include the average PSU output power (300W), variance (50W), average CPU utilization (20%), memory temperature, hard disk temperature, backplane temperature, fan speed, and GPU temperature, all of which are within normal range. Furthermore, the current low fan speed shows no upward trend, system usage status is (none), and user activity status is (none). The LSTM model inference time is <8ms, and the output load trend for the next 30 seconds is: no load (PSU output power demand <160W, probability 95%).

[0122] Step S3: PSU dormancy decision.

[0123] Check uninterruptible tasks.

[0124] The server currently has no data writes, strong response, or critical computing processes, meeting the prerequisites for PSU hibernation. Based on the prediction results and PSU characteristics, with no load in the next 30 seconds (PSU output power demand < 10% of rated power), the decision is made to enter PSU deep hibernation mode. The BMC sends a pre-hibernation notification to the server operating system through the D-Bus interface, and the operating system sends back a confirmation signal after completing the temporary data saving. The BMC issues a deep hibernation command to the PSU through the PMBus interface, setting the power consumption for entering deep hibernation mode.

[0125] Step S4 execution and feedback.

[0126] PSU deep sleep was executed, and the PSU output power was reduced to 35W. The BMC recorded the sleep time and initial state. Deviation analysis showed that the actual load was consistent with the prediction result, with a deviation rate of 0%, and no model adjustment was required. When a remote KVM client operation, system startup, or CPU load increase was received after 20 seconds, the deviation rate was recorded as 33%. Next time, the no-load judgment time was shortened from 30 seconds to 25 seconds, and the time feature weights of the LSTM model were adjusted.

[0127] Example 2: Real-time transactions.

[0128] 1. BMC detected that the business type label has been switched to real-time transaction, and the latency threshold has been updated to 5ms; CPU utilization (average 40%), PSU output power (400W), and voltage ripple coefficient (2.3%) were collected; the previous round of lightweight TFT model inference took 7ms (>5ms threshold).

[0129] 2. Switching Condition Detection. When the business type switches, if the inference time of the previous lightweight TFT model does not meet the high-priority requirement, a model switch is triggered. The model switches from the TFT model to the LSTM model, inheriting and fine-tuning the feature weight parameters; the switch takes 1.8ms. Prediction execution involves inputting the fused feature vector, with inference taking 4ms, and outputting the load for the next 20 seconds (96% confidence). If the confidence level is 96% ≥ 95%, the prediction result is valid.

[0130] 3. Mode Decision. If the load is determined to be medium, maintain normal operating mode.

[0131] 4. Execution Feedback. Actual load matches prediction, FVR=3%; model inference time is 4ms≤5ms, meeting latency requirements.

[0132] The following describes a device provided by an embodiment of the present invention. The device described below can be referred to in correspondence with the method described above. The device of this embodiment is installed in an electronic device. Figure 4 , Figure 4This is a structural block diagram of a device according to one embodiment of the present invention, comprising five core modules. Each module works collaboratively through a BMC embedded processor and communicates and controls with the PSU based on the PMBus protocol. The modules include: a data acquisition module 210, used to acquire operating parameters of the power supply unit and various hardware data of the server; a load prediction module 220, used to perform load prediction using a target prediction model based on the operating parameters of the power supply unit and the various hardware data of the server, obtaining the load level and load recovery time window for a future preset period, wherein the load recovery time window represents the time required for switching between adjacent load levels; a mode decision module 230, used to match the power mode corresponding to the load level according to the load level for the future preset period; and generate a mode switching command based on the power mode corresponding to the load level and the load recovery time window; and an execution feedback module 240, used to send the mode switching command to the power supply unit.

[0133] In one possible implementation, the mode decision module 230 is used to: acquire constraints and comparison information; adjust the power mode corresponding to the load level according to the constraints and comparison information to obtain the adjusted power mode corresponding to the load level; and generate a mode switching instruction according to the adjusted power mode corresponding to the load level.

[0134] In one feasible approach, the constraints include at least one of the following: task constraint information; service operation latency constraint information; hardware health constraint information; comparison information corresponding to the constraints, the comparison information including at least one of the following: task type, latency, and health information, the health information including hardware health degradation and / or sleep frequency; mode decision module 230, used to: when the task type is an uninterruptible task of the task constraint information, and the power mode corresponding to the load level is not a normal working mode, determine first adjustment information, the first adjustment information being information to adjust the power mode corresponding to the load level to a normal working mode; when the latency does not meet the preset latency threshold of the service operation latency constraint information, determine second adjustment information, the second adjustment information being information to adjust the power mode corresponding to the load level to a corresponding power mode; when the hardware health degradation reaches the preset degradation threshold of the hardware health constraint information, or the sleep frequency reaches the preset sleep frequency of the hardware health constraint information, determine third adjustment information, the third adjustment information being information to adjust the power mode corresponding to the load level to a corresponding power mode; adjust the power mode corresponding to the load level according to at least one of the first adjustment information, the second adjustment information, and the third adjustment information, to obtain the adjusted power mode corresponding to the load level.

[0135] In one possible implementation, the mode decision module 230 is used to: determine the power mode corresponding to the target load level as normal operation mode when the target load level in the load level of the future preset period is a high load or a medium load; determine the power mode corresponding to the target load level as a light sleep operation mode when the target load level is a low load; and determine the power mode corresponding to the target load level as a deep sleep operation mode when the target load level is no load.

[0136] In one possible implementation, the data acquisition module 210 is further configured to: acquire business demand scenario characteristics; and the load prediction module 220 is further configured to determine a target prediction model from at least two prediction models based on the business demand scenario characteristics.

[0137] In one feasible approach, the business requirement scenario features include a model inference time threshold; the load prediction module 220 is used to: obtain the actual inference time thresholds of at least two prediction models; and determine the target prediction model from at least two prediction models based on the actual inference time thresholds of the at least two prediction models and the model inference time thresholds.

[0138] In one possible implementation, the load prediction module 220 is used to: determine a target prediction model from at least two prediction models based on business demand scenario characteristics and hardware health characteristics.

[0139] In one feasible approach, the load prediction module 220 is configured to: determine a first score based on business demand scenario characteristics; determine a second score based on hardware health characteristics; determine a comprehensive score based on the first and second scores; and determine a target prediction model from at least two prediction models based on the comprehensive score.

[0140] In one feasible approach, the server's hardware data includes hardware load data and / or hardware health data.

[0141] In one possible implementation, the execution feedback module 240 is configured to: send a pre-sleep notification to the operating system when the mode switching instruction includes a hibernation instruction, so that the operating system stops processing new services, stops caching data, and closes processes according to the hibernation notification; and send a mode switching instruction to the power supply unit.

[0142] In one possible implementation, the execution feedback module 240 is further configured to: obtain the actual load corresponding to a future preset time period; determine the deviation rate based on the actual load and the predicted load, wherein the predicted load is data obtained by load prediction based on the target prediction model; and adjust the parameters of the target prediction model based on the deviation rate.

[0143] In one possible implementation, the execution feedback module 240 is further configured to: extend the time window for obtaining PSU operating parameters and various hardware data of the server when the fluctuation of the load level in a future preset period does not conform to the preset fluctuation conditions.

[0144] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes: a memory 60 for storing a computer program; and a processor 61 for executing the computer program to implement the steps of the method as described in the above embodiments.

[0145] The processor 61 may include one or more processing cores, such as a quad-core processor, an octa-core processor, or a BMC. The processor 61 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0146] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc.

[0147] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.

[0148] Those skilled in the art will understand that Figure 5 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.

[0149] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.

[0150] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.

[0151] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described method.

[0152] The foregoing has provided a detailed description of a server power mode switching method, apparatus, device, and medium provided by embodiments of the present invention. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0153] 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 implementations should not be considered beyond the scope of this invention.

[0154] The foregoing has provided a detailed description of a server power mode switching method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make appropriate improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A method for switching server power modes, characterized in that, include: Obtain the operating parameters of the power supply unit and various hardware data of the server; Based on the operating parameters of the power supply unit and the hardware data of the server, load prediction is performed using the target prediction model to obtain the load level and load recovery time window for a future preset period. The load recovery time window represents the time required for adjacent load level switching. Based on the load level of the future preset time period, match the power mode corresponding to the load level; and generate a mode switching instruction based on the power mode corresponding to the load level and the load recovery time window. Send the mode switching command to the power supply unit.

2. The server power mode switching method according to claim 1, characterized in that, Based on the power mode corresponding to the load level and the load recovery time window, a mode switching instruction is generated, including: Obtain the constraints and comparison information; Based on the constraints and the comparison information, adjust the power mode corresponding to the load level to obtain the adjusted power mode corresponding to the load level. Generate a mode switching command based on the adjusted power mode corresponding to the load level.

3. The server power mode switching method according to claim 2, characterized in that, The constraints include at least one of the following: task constraint information; service operation latency constraint information; hardware health constraint information; the information to be compared corresponds to the constraints, and the information to be compared includes at least one of the following: task type, latency, and health information, wherein the health information includes hardware health degradation and / or sleep frequency. Based on the constraints and the comparison information, the power mode corresponding to the load level is adjusted to obtain the adjusted power mode corresponding to the load level, including: When the task type is an uninterruptible task of the task constraint information and the power mode corresponding to the load level is not the normal working mode, the first adjustment information is determined. The first adjustment information is the information to adjust the power mode corresponding to the load level to the normal working mode. When the delay does not meet the preset delay threshold of the service operation delay constraint information, the second adjustment information is determined. The second adjustment information is the information to adjust the power mode corresponding to the load level to the corresponding power mode. When the hardware health loss reaches the preset loss threshold of the hardware health constraint information, or the sleep frequency reaches the preset sleep frequency of the hardware health constraint information, the third adjustment information is determined. The third adjustment information is the information to adjust the power mode corresponding to the load level to the corresponding power mode. Based on at least one of the first adjustment information, the second adjustment information, and the third adjustment information, the power mode corresponding to the load level is adjusted to obtain the adjusted power mode corresponding to the load level.

4. The server power mode switching method according to claim 1, characterized in that, Based on the load level for the future preset time period, match the power mode corresponding to the load level, including: When the target load level in the load level of the future preset period is a high load or a medium load, the power mode corresponding to the target load level is determined to be the normal working mode; When the target load level is low load, the power mode corresponding to the target load level is determined to be light hibernation mode. When the target load level is no load, the power mode corresponding to the target load level is determined to be the deep sleep mode.

5. The server power mode switching method according to claim 1, characterized in that, Also includes: Obtain the characteristics of business requirement scenarios; Based on the characteristics of the business requirement scenario, a target prediction model is determined from at least two prediction models.

6. The server power mode switching method according to claim 5, characterized in that, The characteristics of the business requirement scenario include a threshold for model inference time; Based on the characteristics of the business requirement scenario, a target prediction model is determined from at least two prediction models, including: Obtain the actual inference time thresholds for at least two prediction models; Based on the actual inference time threshold and the model inference time threshold of at least two prediction models, determine the target prediction model from at least two prediction models.

7. The server power mode switching method according to any one of claims 1 to 6, characterized in that, After sending the mode switching command to the power supply unit, the method further includes: Obtain the actual load corresponding to the preset future time period; The deviation rate is determined based on the actual load and the predicted load, wherein the predicted load is data obtained by load prediction based on the target prediction model; Based on the deviation rate, adjust the parameters of the target prediction model; And / or, after sending the mode switching command to the power supply unit, the method further includes: When the fluctuation of the load level in the future preset period does not conform to the preset fluctuation situation, the time window for obtaining PSU operating parameters and various hardware data of the server is extended.

8. A server power mode switching device, characterized in that, include: The data acquisition module is used to acquire the operating parameters of the power supply unit and various hardware data of the server; The load prediction module is used to predict the load based on the operating parameters of the power supply unit and the hardware data of the server using a target prediction model, and to obtain the load level and load recovery time window for a future preset period. The load recovery time window represents the time required for adjacent load level switching. The mode decision module is used to match the power mode corresponding to the load level according to the load level of the future preset time period; and generate a mode switching instruction according to the power mode corresponding to the load level and the load recovery time window. The execution feedback module is used to send the mode switching command to the power supply unit.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the server power mode switching method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the server power mode switching method as described in any one of claims 1 to 7.