Power supply power determination method and device
By using a spatiotemporal attention prediction model and differential processing, the upper limit of power supply is adaptively adjusted, which solves the problem that power supply schemes are unable to cope with changing power demand, and achieves more accurate power supply adjustment and resource conservation.
Patent Information
- Application Number
- CN202411131009.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2026-03-03
AI Technical Summary
Existing power supply solutions are ill-equipped to meet the ever-changing power demands of computing resource usage, leading to power waste or limited service quality.
By employing a spatiotemporal attention prediction model, the upper limit of power supply is adaptively adjusted by mining the correlation between future operation indicator data, current power consumption indicator data, and current operation indicator data. Combined with differential processing and adaptive power adjustment strategies, accurate power supply adjustment decisions are generated.
It enables more accurate power supply adjustment, adapts to constantly changing load conditions, reduces power waste, improves resource utilization security, and saves power resources.
Smart Images

Figure CN121599520A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of intelligent operation and maintenance, and more specifically, to a method and apparatus for determining power supply. Background Technology
[0002] With the development of cloud computing technology, deploying on-demand computing and storage services on a large number of server cluster nodes has become the mainstream way for enterprises to provide internal and external services. However, the on-demand service delivery method leads to constantly changing usage of computing resources on nodes, and correspondingly, constantly changing power demands. Excessive power supply can result in additional electricity costs, while insufficient power supply may limit service quality. Power supply solutions in related technologies are difficult to cope with such constantly changing power demands. Summary of the Invention
[0003] This invention provides a method and apparatus for determining power supply, which at least solves the problem that power supply schemes in related technologies are unable to cope with constantly changing power demands.
[0004] According to an embodiment of the present invention, a method for determining power supply is provided, comprising: determining future operation indicator data based on historical electricity consumption index data and historical operation indicator data, and using a spatiotemporal attention prediction model; and determining an upper limit for future power supply based on the future operation indicator data, current electricity consumption index data, and current operation indicator data.
[0005] According to another embodiment of the present invention, a power supply determination device is provided, comprising: a first determination module, configured to determine future operation indicator data based on historical electricity consumption index data and historical operation indicator data, and by means of a spatiotemporal attention prediction model; and a second determination module, configured to determine an upper limit of future power supply based on the future operation indicator data, current electricity consumption index data, and current operation indicator data.
[0006] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in the above method embodiments when executed.
[0007] According to yet another embodiment of the present invention, an electronic device is also provided, 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 the above method embodiments.
[0008] According to yet another embodiment of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0009] Through the above embodiments of the present invention, the spatiotemporal attention prediction model can consider the temporal and spatial correlations among various input data, and can represent a more comprehensive feature representation. Therefore, by using the spatiotemporal attention prediction model and based on the input historical electricity consumption index data and historical operation index data, more accurate future operation index data can be determined. Based on this future operation index data, current electricity consumption index data, and current operation index data, a more accurate future power supply limit can be determined, thereby making the generated power adjustment decision more accurate and better adaptable to constantly changing load conditions. Therefore, it can solve the problem in related technologies where power supply schemes are unable to cope with constantly changing power demands, achieving the effect of saving power resources. Attached Figure Description
[0010] Figure 1 This is a hardware structure block diagram of a computer terminal for using a power supply determination method according to an embodiment of the present invention.
[0011] Figure 2 This is a structural diagram of a power supply adjustment system based on spatiotemporal prediction according to an embodiment of the present invention;
[0012] Figure 3 This is a schematic diagram of the overall data transmission based on the power upper limit adjustment module according to an embodiment of the present invention;
[0013] Figure 4 This is a flowchart of a power supply determination method according to an embodiment of the present invention;
[0014] Figure 5 This is a schematic diagram of differential processing according to an embodiment of the present invention;
[0015] Figure 6 This is a schematic diagram of the internal workflow of the spatiotemporal attention prediction model according to an embodiment of the present invention;
[0016] Figure 7 This is a structural block diagram of a power supply determination device according to an embodiment of the present invention. Detailed Implementation
[0017] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0019] The methods and embodiments provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a computer terminal as an example, Figure 1This is a hardware structure block diagram of a computer terminal for implementing the power supply determination method according to an embodiment of the present invention. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0020] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the power supply determination method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0021] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0022] In related technologies, power supply generally employs two approaches: constant power supply and adaptive power supply. Constant power supply, to ensure high-quality service operation, consistently supplies power exceeding the power required for nodes under high load, leading to power waste during idle periods. Adaptive power supply involves two approaches: one based on current values, directly adjusting power supply based on actual power consumption to ensure it exceeds the actual power by a certain percentage; the other based on predictions, using historical power values to predict the actual power consumption of server nodes and then setting the power supply as needed. However, the current-value-based approach struggles to adapt to constantly changing load conditions, and adaptive power supply adjustments may be delayed. The prediction-value-based approach often only considers historical power usage, ignoring the power demands of node computing resource usage, making it difficult to guarantee the quality of service.
[0023] In view of this, in order to reduce the delay of adaptive power supply, reduce power waste, and improve the guarantee of server node resource utilization, this application provides a power supply adjustment method based on a spatiotemporal attention prediction model. By mining the correlation between future operation index data, current power consumption index data, and current operation index data, the upper limit of power supply is adaptively adjusted in order to achieve the goal of adaptive power saving.
[0024] The embodiments of this application can be run in Figure 2 In the spatiotemporal prediction-based power supply adjustment system shown, such as Figure 2 As shown, the power supply adjustment system includes: a data acquisition module, a power upper limit adjustment module, and a power control module.
[0025] The data acquisition module is used to obtain various indicator data (e.g., power supply limit, actual power consumption, CPU (Central Processing Unit) utilization and power limit ratio) required by the embodiments of this application from the acquisition server, and input them to the power limit adjustment module.
[0026] The power limit adjustment module receives various indicator data provided by the data acquisition module, predicts the CPU utilization rate of future time windows through a spatiotemporal attention prediction model, generates an adaptive power limit, and passes the new power limit to the power control module.
[0027] The power limit adjustment module includes two sub-modules: CPU utilization prediction based on spatiotemporal attention and adaptive power adjustment strategy generation.
[0028] Figure 3 This is a schematic diagram of the overall data transmission based on the power upper limit adjustment module according to an embodiment of the present invention, as shown below. Figure 3As shown, the input data of the CPU utilization prediction submodule based on spatiotemporal attention includes the historical window power limit, the historical window actual power, the historical window CPU utilization, and the historical window power limit ratio. The CPU utilization prediction submodule based on spatiotemporal attention learns the spatial and temporal correlation of the input data through the model and predicts the future CPU utilization, which is then used by the adaptive power adjustment strategy generation submodule to predict the future power supply.
[0029] In addition to the predicted CPU utilization rate mentioned above, the input data for the adaptive power adjustment strategy generation submodule also includes the current power supply limit, the current actual power, the current power limit ratio, the current CPU utilization rate, and the expected CPU utilization rate.
[0030] The adaptive power regulation strategy generation submodule can predict the new power supply limit based on the above input data.
[0031] The power control module is used to adjust the server's power supply limit based on the generated adaptive power supply limit, thereby achieving power adjustment.
[0032] The entire process is iteratively completed through three modules: data acquisition, power limit adjustment, and power control, to achieve adaptive adjustment of the power supply limit.
[0033] This embodiment provides a method for determining the power supply of a computer terminal or power adjustment system as described above. Figure 4 This is a flowchart of a power supply determination method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:
[0034] Step S402: Based on historical electricity consumption data and historical work performance data, determine future work performance data using a spatiotemporal attention prediction model;
[0035] In this embodiment, the power consumption index data includes at least one of the following: upper limit of power supply, power consumption of equipment, and power limit ratio; the power consumption index data includes the historical power consumption index data and the current power consumption index data; the operation index data includes at least one of the following: CPU utilization rate, memory utilization rate, network I / O (Input / Output), hard disk read / write capability, and CPU temperature; the operation index data includes the historical operation index data, the current operation index data, and the future operation index data.
[0036] In step S402 of this embodiment, the method includes: determining the spatial correlation between multiple input data through the graph attention network of the spatiotemporal attention prediction model; wherein the multiple input data includes the historical electricity consumption index data and the historical operation index data; determining the temporal correlation between the multiple input data through the gated loop unit of the spatiotemporal attention prediction model; and determining the future operation index data based on the spatial and temporal correlation between the multiple input data.
[0037] In this embodiment, the CPU utilization prediction submodule based on spatiotemporal attention can be used to determine future job indicator data. Specifically, the CPU utilization prediction submodule based on spatiotemporal attention determines future job indicator data through two parts: differential processing and model prediction. The future job indicator data includes: CPU utilization, memory utilization, network I / O, hard disk read / write, CPU temperature, etc.
[0038] In one embodiment, determining future operation indicator data based on historical electricity consumption data and historical operation indicator data using a spatiotemporal attention prediction model includes: performing a linear transformation on the multidimensional time series corresponding to a determined historical window to determine first hidden layer spatial data; determining second hidden layer spatial data based on the first hidden layer spatial data and the various input data using the spatial graph attention layer of the spatiotemporal attention prediction model, wherein the second hidden layer spatial data contains the spatial correlation of the various input data; determining third hidden layer spatial data based on the first hidden layer spatial data using the temporal graph attention layer of the spatiotemporal attention prediction model; wherein the third hidden layer spatial data contains the temporal correlation of the historical time dimension corresponding to the various input data, and the graph attention network includes the spatial graph attention layer and the temporal graph attention layer; obtaining target operation indicator data by predicting using the fully connected network layer of the spatiotemporal attention prediction model based on the first hidden layer spatial data, the second hidden layer spatial data, and the third hidden layer spatial data; and determining the future operation indicator data by performing differential processing based on the change in the target operation indicator data and the predicted operation indicator data.
[0039] In one embodiment, determining the second hidden layer spatial data based on the first hidden layer spatial data and the multiple input data, and through the spatial graph attention layer of the spatiotemporal attention prediction model, includes: for the historical electricity consumption index data or the historical work index data, determining multiple sets of weight data based on the first hidden layer spatial data, the historical electricity consumption index data, and the historical work index data, wherein each set of weight data includes multiple weight data, and one weight data corresponds to one historical electricity consumption index data or one historical work index data; updating the historical electricity consumption index data and the historical work index data respectively based on the historical electricity consumption index data, the historical work index data, and the weight data of the corresponding set; and determining the updated historical electricity consumption index data and the updated historical work index data as the second hidden layer spatial data.
[0040] In real-world business environments, the services deployed on nodes change constantly, and the CPU utilization metric drifts over time due to configuration changes in power supply limits. Differential processing can better eliminate the state drift of the metric data, and it plays an important role in the overall CPU utilization prediction.
[0041] Figure 5 This is a flowchart of differential processing according to an embodiment of the present invention. Figure 5 As shown, the input data (i.e., indicator data) for differential processing includes: CPU usage, actual power consumption, power supply limit, and power limitation ratio. Then, based on the differentially processed input data, model prediction is performed to predict the future CPU usage.
[0042] In this embodiment, the three indicators—upper power supply limit, actual power consumption, and power limit ratio—represent the server's power consumption, while CPU utilization represents the server's job operation status. From the perspective of server job operation status, other indicators that can represent server job operation status can also be considered (e.g., memory utilization, network I / O, hard disk read / write, CPU temperature, etc.). However, the differential processing flow only affects the CPU utilization indicator, with CPU utilization listed first among the input data.
[0043] In this embodiment, for the selection of input data, firstly, indicator data that can characterize the power consumption of the server is selected; secondly, in order to ensure the normal operation of the jobs on the server, indicator data that can characterize the operation of the server jobs is selected, and the correlation of multiple indicator data is mined to predict a single index.
[0044] Model prediction based on the differentially processed input data includes: inspired by the Autoregressive Integrated Moving Average (ARIMA) model, this embodiment uses a spatiotemporal attention prediction model to predict changes in CPU utilization.
[0045] For example: Suppose that the CPU utilization at time step t is v. t The trend change is stripped away by differential processing, where the CPU change at time t is:
[0046] b t =v t -v t-1 (1)
[0047] Spatiotemporal attention prediction model directly predicts b t Its predicted value is b ′ t Furthermore, by superimposing and completing the data, the predicted CPU change rate is obtained as follows:
[0048] v t ′ =b ′ t +v t-1 (2)
[0049] Figure 6 This is a schematic diagram of the internal workflow of the spatiotemporal attention prediction model. The structure of the spatiotemporal attention prediction model is a general structure, and the embodiments in this application do not impose specific limitations. The number of indicators is marked in a general variable form.
[0050] In this embodiment, the input to the spatiotemporal attention prediction model is the historical window X∈R. k*n Where k is the number of indicator data points, and n is the number of time steps (i.e., units of time) within the historical window. For example, if k is 4, it includes four indicator data points: power supply limit, actual power, CPU utilization change, and power limit ratio.
[0051] based on Figure 6 The spatiotemporal attention prediction model predicts future CPU utilization, including:
[0052] Step S1: Use a one-dimensional convolutional network to perform a linear transformation on the multi-dimensional time series and embed it into the one-dimensional convolutional hidden space X1∈R. k*n Among them, the one-dimensional convolutional hidden layer space X1 is the data of the first hidden layer space.
[0053] Step S2: Use the one-dimensional convolutional hidden layer space X1 as the input to the two parallel graph attention networks (GAT) in the next step to obtain the spatial graph attention hidden layer space X2 and the temporal graph attention hidden layer space X3.
[0054] In this embodiment, two parallel graph attention networks (GATs) are used to extract the spatial and temporal correlations of the one-dimensional convolutional hidden layer space X1. The two parallel GATs are labeled as GATs. s (Spatial Graph Attention Layer), GAT t (Time-map attention layer)
[0055] According to GAT s The network takes historical indicator data and a one-dimensional convolutional hidden space X1 as input. For each indicator data point, it mines the weights corresponding to each indicator data point from the historical data. Here, the weights refer to the influence of all input indicator data points on the indicator to be predicted. Based on the extracted weights, each indicator is updated with the weighted result of its neighboring indicators. This is equivalent to performing a k-to-k mapping in the indicator dimension, resulting in a spatial graph attention hidden space X2∈R. k*n Among them, the spatial graph attention hidden space X2 is the second hidden space data.
[0056] For example: when predicting changes in CPU utilization, GAT s The network mining algorithm assigns weights to four metrics: upper limit of power supply, actual power, change in CPU utilization, and power limit ratio, in relation to the change in CPU utilization. Each of the four metrics is a neighboring metric of the other, including the metric itself being a neighbor, as each metric can be weighted when it is updated.
[0057] For the same reason, according to GAT t The network takes a one-dimensional convolutional hidden layer space X1 as input and extracts weight features between different time steps. This is equivalent to performing an n-to-n mapping on the time dimension of historical data, resulting in a temporal graph attention hidden layer space X3∈R. k*n Among them, the time-map attention hidden space X3 is the third hidden space data.
[0058] The hidden layer vectors X2 and X3 incorporate the spatial correlation of the indicator dimension and the temporal correlation of the historical time step dimension, respectively.
[0059] Through the above calculations, three hidden layer space data were obtained: one-dimensional convolutional hidden layer space X1, spatial graph attention hidden layer space X2, and temporal graph attention hidden layer space X3.
[0060] Step S3: Concatenate the one-dimensional convolutional hidden layer space X1, the spatial graph attention hidden layer space X2, and the temporal graph attention hidden layer space X3 to obtain an n*3k dimension time series, denoted as the fused hidden layer space X1|X2|X3.
[0061] Here, "|" represents the concatenation operation. The purpose of concatenation is twofold: firstly, to integrate spatial and temporal correlations together as inputs to the subsequent GRU; and secondly, to incorporate them into the residual network.
[0062] Step S4: Using a gated recurrent unit (GRU), the time series fusion hidden space X1|X2|X3 is processed from 3k to d. h The mapping, where d h This indicates the size of the GRU hidden space.
[0063] GRU was used to extract the correlation of time series over continuous time, that is, to analyze the impact of previous time steps on future time steps.
[0064] Step S5: Predict the value of the future window using a fully connected network, and predict the change in CPU utilization at future time steps (i.e., Y). ′ And by using the above-mentioned completion method, the CPU utilization rate v′ is obtained.
[0065] The calculation process of the spatiotemporal attention prediction model is as follows:
[0066] X1 = W c *X (3)
[0067] X2 = GAT s (X1 T (4)
[0068] X3 = GAT t (X1) (5)
[0069] X4 = GRU(X1|X2|X3) (6)
[0070] Y ′ =W f *X4 (7)
[0071] Step S404: Determine the upper limit of future power supply based on the future operation indicator data, current power consumption indicator data, and current operation indicator data.
[0072] In this embodiment, the relationship between the upper limit of power supply and the power limitation ratio is defined as follows:
[0073] u=s*(1-l) (8)
[0074] Where l is the power limiting ratio, u is the upper limit of the power supply, and s is the base power, i.e. the rated power of the physical load.
[0075] Formula (8) defines the physical meaning of the power limit ratio l, which is the percentage of the limit that is set under the premise that the reference power of the physical device is s and the current power supply limit is u.
[0076] Based on the above formula (8), the upper limit of future power supply is:
[0077] u t+1 =s*(1-l) t+1 (9)
[0078] Where s is the reference power, l t+1 To limit the proportion of future power supply.
[0079] In step S404 of this embodiment, determining the future power supply limit includes: determining the device's base power based on the current power supply limit or the current device power consumption, and in conjunction with the current power limit ratio; determining the harmonic CPU utilization based on the future CPU utilization, the current CPU utilization, and the first hyperparameter; determining the future power supply limit ratio based on the harmonic CPU utilization, the set expected CPU utilization, and the current power supply limit ratio; and determining the future power supply limit based on the base power and the future power supply limit ratio.
[0080] In one embodiment, determining the reference power of the device based on the current power supply limit or the current device power consumption, and in conjunction with the current power limit ratio, includes: determining the reference power based on the current power limit ratio and the current power supply limit when the current power limit ratio is greater than the current power limit ratio; and determining the reference power based on the current device power consumption when the current power limit ratio is equal to zero.
[0081] In one embodiment, the calculation strategy for the reference power s is as follows:
[0082] A. When the power limit ratio l of the historical window is greater than 0, the reference power is as follows:
[0083] s=u / (1-l) (10)
[0084] Where u is the current power supply limit;
[0085] B. When the power limit ratio l = 0 in the historical window, the reference power is as follows:
[0086]
[0087] Where N represents the number of samples where the current consecutive power limiting ratio l = 0, p i This represents the actual power of the i-th unconstrained sample, i.e., the current power consumption of the device.
[0088] When the power limit ratio l = 0 in the historical window, formula (11) helps the system initialize the baseline power, that is, when the power limit is lifted due to the deployment of a large number of jobs, the appropriate baseline power can still be calculated.
[0089] In one embodiment, determining the future power supply limit ratio based on the harmonic CPU utilization and the set expected CPU utilization includes: determining an adjustment coefficient for the power limit ratio based on the harmonic CPU utilization, the expected CPU utilization, and a second hyperparameter; and determining the future power supply limit ratio based on the adjustment coefficient, a third hyperparameter, and the current power supply limit ratio.
[0090] In one embodiment, the adaptive power regulation strategy generation submodule predicts the future power supply limit based on the predicted CPU utilization v′ as described above, and based on the current power supply limit, the current actual power, the current power limit ratio, the current CPU utilization, and the expected CPU utilization.
[0091] Strategies for calculating future power supply limitation ratios include:
[0092] Step S1: Calculate the harmonic CPU utilization rate by fusing the predicted future CPU utilization rate with the current CPU utilization rate.
[0093] Calculating the harmonic CPU utilization involves fusing the model's prediction of future CPU utilization v′ with the current CPU utilization v, using the following formula:
[0094] v″′=λ*v+(1-λ)*v′ (12)
[0095] Here, λ is the harmonic hyperparameter, i.e., the first hyperparameter.
[0096] The merged v″′ represents the harmonized CPU utilization.
[0097] It should be noted that the purpose of this integration is to consider both the current and future CPU utilization of the server, so that the generated power adjustment decisions are more accurate and can adapt to constantly fluctuating loads.
[0098] Step S2: Based on the harmonized CPU utilization, calculate the future power supply limit ratio using an adaptive strategy.
[0099] The strategy for calculating the future power supply limitation ratio is as follows:
[0100] a) When the harmonic CPU utilization rate is relatively low (v″′ < v″ - 10%), adaptively increase the power limit ratio.
[0101] l t+1 = l t + α * m;
[0102] b) When the harmonic CPU utilization rate is relatively high (v″′ > v″ + 10%), adaptively decrease the power limit ratio.
[0103] l t+1 = l t - α * m.
[0104] Where, v″ is the expected CPU utilization rate; α is the third hyperparameter; m is the adjustment coefficient of the power limit ratio; l t is the power limit ratio at the current time step; l t+1 is the future power supply limit ratio.
[0105] The calculation formula of m is:
[0106] m = γ * |v″ - v″′| / β (13)
[0107] Where, β, γ are the second hyperparameters.
[0108] If the harmonic CPU utilization rate v″′ is relatively close to the expected CPU utilization rate v″, the generated adjustment coefficient m of the power limit ratio is smaller. m represents the distance between the harmonic CPU utilization rate v″′ and the expected CPU utilization rate v″. Through the bidirectional approximation adjustment of the power limit ratio, the CPU utilization rate is forced to gradually converge to the expected value v″.
[0109] In one embodiment, the values of the hyperparameters are: α = 0.02, β = 0.5, γ = 2.5; the hyperparameters α, β, γ can also be other values, which are not limited in the embodiments of this application.
[0110] Through adaptive power adjustment, a constant adjustment ratio can be achieved, thus solving the problem that too small adjustment ratio may not be able to adapt to the frequently changing CPU utilization rate; too large adjustment ratio may lead to the difficulty of converging the power upper limit. Considering both the current and future CPU utilization rates of the computer, the generated power adjustment decision is more accurate and can adapt to the changing load conditions; based on the CPU utilization rate prediction of the spatio-temporal attention prediction model, considering both the temporal correlation and spatial correlation of the input data, a more comprehensive feature representation and a more accurate prediction result can be obtained.
[0111] Through the above steps, the spatiotemporal attention prediction model, by considering the temporal and spatial correlations among various input data, can represent a more comprehensive feature representation. Therefore, by using the spatiotemporal attention prediction model and based on historical electricity consumption and operational data, more accurate future operational data can be determined. This future operational data, along with current electricity consumption and operational data, can then be used to determine a more accurate future power supply limit, resulting in more accurate power adjustment decisions that are better adapted to changing load conditions. Therefore, this approach can solve the problem of power supply schemes in related technologies struggling to cope with constantly changing electricity demand, thus achieving the effect of saving electricity resources.
[0112] 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. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0113] This embodiment also provides a power supply determination device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0114] Figure 7 This is a structural block diagram of a power supply determination device according to an embodiment of the present invention, such as... Figure 7 As shown, the power supply determination device 700 includes: a first determination module 710 and a second determination module 720.
[0115] The first determining module 710 is used to determine future operation indicator data based on historical electricity consumption index data and historical operation index data, and through a spatiotemporal attention prediction model.
[0116] The second determining module 720 is used to determine the upper limit of future power supply based on the future operation indicator data, the current power consumption indicator data and the current operation indicator data.
[0117] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0118] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0119] 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.
[0120] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0121] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0122] According to yet another embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of the present application.
[0123] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0124] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0125] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining power supply, characterized in that, include: Based on historical electricity consumption data and historical work data, future work data are determined using a spatiotemporal attention prediction model. Based on the future operation indicator data, current electricity consumption indicator data, and current operation indicator data, the upper limit of future power supply is determined.
2. The method according to claim 1, characterized in that, in, The electricity consumption index data includes at least one of the following: upper limit of power supply, power consumption of equipment, and power limit ratio; the electricity consumption index data includes the historical electricity consumption index data and the current electricity consumption index data; the operation index data includes at least one of the following: CPU utilization rate, memory utilization rate, network input / output IO, hard disk read / write capability, and CPU temperature; the operation index data includes the historical operation index data, the current operation index data, and the future operation index data.
3. The method according to claim 1, characterized in that, Based on historical electricity consumption and operational data, and using a spatiotemporal attention prediction model, future operational data are determined, including: The spatial correlation between various input data is determined by the graph attention network of the spatiotemporal attention prediction model; wherein, the various input data include the historical electricity consumption index data and the historical work index data; The temporal correlation between the various input data is determined by the gated recurrent unit of the spatiotemporal attention prediction model; The future operation indicator data are determined based on the spatial and temporal correlations among the various input data.
4. The method according to claim 3, characterized in that, Based on historical electricity consumption and operational data, and using a spatiotemporal attention prediction model, future operational data are determined, including: A linear transformation is performed on the multidimensional time series corresponding to a given historical window to determine the first hidden layer spatial data. Based on the first hidden layer spatial data and the various input data, and through the spatial graph attention layer of the spatiotemporal attention prediction model, the second hidden layer spatial data is determined, wherein the second hidden layer spatial data contains the spatial correlation of the various input data; Based on the first hidden layer spatial data, the third hidden layer spatial data is determined through the temporal graph attention layer of the spatiotemporal attention prediction model; wherein, the third hidden layer spatial data contains the temporal correlation of the historical time dimension corresponding to the multiple input data, and the graph attention network includes the spatial graph attention layer and the temporal graph attention layer; Based on the first hidden layer spatial data, the second hidden layer spatial data, and the third hidden layer spatial data, and through prediction by the fully connected network layer of the spatiotemporal attention prediction model, the target operation index data is obtained. The future operational indicator data is determined by performing differential processing on the target operational indicator data and the predicted operational indicator data changes.
5. The method according to claim 4, characterized in that, Based on the first hidden layer spatial data and the various input data, and by determining the second hidden layer spatial data through the spatial graph attention layer of the spatiotemporal attention prediction model, including: For the historical electricity consumption index data or the historical operation index data, multiple sets of weight data are determined based on the first hidden layer space data, the historical electricity consumption index data and the historical operation index data. Each set of weight data includes multiple weight data, and one weight data corresponds to one historical electricity consumption index data or one historical operation index data. Based on the historical electricity consumption index data, the historical work index data, and the weight data of the corresponding groups, update the historical electricity consumption index data and the historical work index data respectively; The updated historical electricity consumption data and the updated historical operation data are determined as the second hidden layer space data.
6. The method according to claim 2, characterized in that, Based on the aforementioned future operational indicator data, current electricity consumption indicator data, and current operational indicator data, the upper limit of future power supply is determined, including: Determine the base power of the equipment based on the current power supply limit or the current power consumption of the equipment, and in conjunction with the current power limit ratio. Determine the harmonic CPU utilization based on future CPU utilization, current CPU utilization, and the first hyperparameter; The future power supply limit ratio is determined based on the harmonized CPU utilization, the set expected CPU utilization, and the current power supply limit ratio. The upper limit of future power supply is determined based on the baseline power and the future power supply limit ratio.
7. The method according to claim 6, characterized in that, Based on the current power supply limit or the current power consumption of the equipment, and in conjunction with the current power limit ratio, determine the base power of the equipment, including: If the current power limit ratio is greater than the specified limit, the reference power is determined based on the current power limit ratio and the current power supply limit. When the current power limit ratio is equal to zero, the reference power is determined based on the current power consumption of the device.
8. The method according to claim 6, characterized in that, Based on the harmonized CPU utilization and the set expected CPU utilization, determine the future power supply limit ratio, including: Based on the harmonic CPU utilization, the desired CPU utilization, and the second hyperparameter, determine the adjustment coefficient for the power limiting ratio; The future power supply limit ratio is determined based on the adjustment coefficient, the third hyperparameter, and the current power supply limit ratio.
9. A power supply determination device, characterized in that, include: The first determination module is used to determine future operation indicator data based on historical electricity consumption index data and historical operation index data, and through a spatiotemporal attention prediction model. The second determining module is used to determine the upper limit of future power supply based on the future operation indicator data, the current power consumption indicator data, and the current operation indicator data.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.