A data processing method, device and electronic equipment
By combining power consumption prediction models, genetic algorithms, and deep reinforcement learning, a server scheduling solution is generated and optimized, which solves the problem of lack of global optimization of scheduling solutions in existing technologies and achieves optimal configuration of server power consumption and balanced load distribution.
Patent Information
- Application Number
- CN202411162420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Existing server power consumption management and scheduling solutions lack global optimization capabilities, making it difficult to achieve optimal power consumption configuration.
The power consumption of the server is predicted through the power consumption prediction model, and a preliminary scheduling plan is generated using a genetic algorithm. The preliminary scheduling plan is optimized through deep reinforcement learning to obtain the target scheduling plan, and finally the power consumption distribution of the server is adjusted.
The optimal configuration of server power consumption is achieved, the accuracy of power consumption prediction and the efficiency of scheduling scheme are improved, and the balanced distribution of server load and the minimization of power consumption are ensured.
Smart Images

Figure CN119126961B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a data processing method and device and electronic equipment. BACKGROUND
[0002] With the rapid development of the Internet and cloud computing services, the scale and number of data centers are also increasing. As the core infrastructure of the Internet and cloud computing services, the power consumption problem of the data center has attracted widespread attention.
[0003] Among them, the main power consumption equipment of the data center includes a server. The power consumption management of the server is directly related to the operation cost and environmental protection benefit of the data center. Therefore, it is of great significance to manage the power consumption of the server.
[0004] At present, the power consumption of the server can be manually adjusted through a pre-set scheduling scheme, so as to realize the power consumption management of the server.
[0005] However, the scheduling scheme in the above manner mainly depends on simple rule control, lacks global optimization ability, and leads to difficulty in realizing the optimal power consumption configuration of the server. SUMMARY
[0006] The present application provides a data processing method, device and electronic equipment, to solve the problem that the scheduling scheme lacks global optimization ability, leading to difficulty in realizing the optimal power consumption configuration of the server. The specific implementation scheme is as follows:
[0007] In a first aspect, the present application provides a data processing method, comprising:
[0008] predicting the power consumption of the server through a power consumption prediction model to obtain power consumption prediction results of the server at multiple future time points;
[0009] processing the power consumption prediction results through a genetic algorithm GA to generate a preliminary scheduling scheme of the server;
[0010] optimizing the preliminary scheduling scheme through a deep reinforcement learning DRL to obtain a target scheduling scheme;
[0011] adjusting the power consumption allocation of the server according to the target scheduling scheme.
[0012] According to the power consumption prediction model, the power consumption prediction results of the server at the multiple future time points are processed, a preliminary scheduling scheme of the server is generated, the preliminary scheduling scheme is further optimized according to the DRL, the target scheduling scheme is obtained, and then the power consumption allocation of the server is adjusted according to the target scheduling scheme. Since the GA and the DRL both have global optimization capability, the target scheduling scheme obtained is the optimal scheduling scheme at the current time point, and then the power consumption allocation of the server is adjusted according to the optimal scheduling scheme at the current time point, so that the power consumption allocation of the server is most reasonable, and the server achieves the optimal power consumption configuration.
[0013] In a possible implementation, before the power consumption of the server is predicted by the power consumption prediction model to obtain the power consumption prediction results of the server at the multiple future time points, the method further includes:
[0014] Collecting running data of the server;
[0015] Preprocessing the running data to obtain processed data of the server; wherein the preprocessing includes data cleaning, missing value processing and data normalization, and the processed data is used for power consumption prediction of the server.
[0016] According to the above application embodiment, the processed data is obtained, thereby providing data for subsequent power consumption prediction of the server. Moreover, by preprocessing the collected running data of the server (including data cleaning, missing value processing and data normalization), the abnormal values and noises in the running data are removed, the quality of the running data is ensured, the missing values in the running data are processed, the influence of the missing values on subsequent prediction is avoided, and by data normalization, each data in the running data is converted to a unified scale, thereby facilitating subsequent processing, avoiding calculation errors caused by differences in data dimension or order of magnitude, and thus the quality of the obtained processed data is better, which is beneficial to improving the power consumption prediction accuracy.
[0017] In a possible implementation, the power consumption prediction model includes a convolutional neural network (CNN) and a long short-term memory (LSTM) network, and the power consumption of the server is predicted by the power consumption prediction model to obtain the power consumption prediction results of the server at the multiple future time points, including:
[0018] Extracting local spatial features of the processed data of the server by the CNN to obtain a one-dimensional feature vector;
[0019] Capturing the time sequence relationship in the one-dimensional feature vector by the LSTM to obtain the power consumption prediction results of the server at the multiple future time points.
[0020] Through the above application examples, firstly, the local spatial features of the to-be-processed data of the server are extracted by the CNN in the power consumption prediction model to form a one-dimensional feature vector, and then the time sequence relationship in the one-dimensional feature vector is captured by the LSTM in the power consumption prediction model to obtain the power consumption prediction result of the server at multiple future time points, which not only considers the local spatial features of the running data of the server, but also considers the time sequence dependence relationship of the running data of the server, so that the accuracy of the power consumption prediction of the server is greatly improved, thereby realizing the accurate prediction of the power consumption of the server and providing accurate power consumption prediction results for subsequent power consumption scheduling of the server.
[0021] In a possible implementation, the power consumption prediction result is processed by a genetic algorithm (GA) to generate a preliminary scheduling scheme of the server, including:
[0022] According to the power consumption prediction result, an initial population is generated; wherein the initial population includes multiple scheduling schemes;
[0023] The fitness of each scheduling scheme in the initial population is calculated;
[0024] According to the fitness corresponding to each scheduling scheme in the initial population, multiple first scheduling schemes are selected from the initial population;
[0025] The multiple first scheduling schemes are subjected to a crossover operation to generate multiple second scheduling schemes;
[0026] The multiple second scheduling schemes are subjected to a mutation operation to generate multiple third scheduling schemes;
[0027] The multiple scheduling schemes in the initial population are replaced by the multiple third scheduling schemes to obtain a new population;
[0028] If the GA iteration termination condition is not triggered, the initial population is replaced by the new population, and a new population is obtained based on the replaced initial population;
[0029] If the GA iteration termination condition is triggered, the multiple scheduling schemes in the new population are determined as the preliminary scheduling scheme.
[0030] Through the above application examples, according to the selection operation, the crossover operation, and the mutation operation of the GA, the scheduling scheme can be iteratively optimized flexibly, and the preliminary scheduling scheme that can allocate the power consumption of the server is quickly and effectively generated, and the balanced allocation of the server load and the minimization of the power consumption are realized.
[0031] In a possible implementation, the preliminary scheduling scheme is optimized by a deep reinforcement learning (DRL) to obtain a target scheduling scheme, including:
[0032] According to the preliminary scheduling scheme, the DRL is initialized;
[0033] Obtaining running data of the server;
[0034] Building an experience replay pool and storing the running data into the experience replay pool;
[0035] Based on the experience replay pool, iteratively optimizing the preliminary scheduling scheme to obtain the target scheduling scheme.
[0036] According to the above application embodiments, the learning of the agent in the DRL is provided with a starting point according to the initialization of the DRL, so that the preliminary scheduling scheme can be optimized. Moreover, the experience generated in the subsequent iterative optimization process can be stored in the experience replay pool built, so as to improve the learning efficiency of the DRL and enhance the stability and generalization ability of the DRL. Based on the experience replay pool, the preliminary scheduling scheme is iteratively optimized, so that the problems in the preliminary scheduling scheme are continuously adjusted through iterative optimization, which is conducive to making the target scheduling scheme obtained as the optimal scheduling scheme at the current time.
[0037] In a possible implementation, the iteratively optimizing the preliminary scheduling scheme based on the experience replay pool to obtain the target scheduling scheme comprises:
[0038] According to the latest data in the experience replay pool, updating the policy network;
[0039] According to the updated policy network, selecting a scheduling action and executing the scheduling action;
[0040] According to the execution result of the scheduling action, updating the experience replay pool, and according to the execution result of the scheduling action, adjusting the preliminary scheduling scheme to obtain a fourth scheduling scheme;
[0041] If the DRL iteration termination condition is not triggered, adjusting the power consumption allocation of the server according to the fourth scheduling scheme, collecting the latest running data of the server, storing the running data into the experience replay pool, and readjusting the scheduling scheme;
[0042] If the DRL iteration termination condition is triggered, determining the fourth scheduling scheme as the target scheduling scheme.
[0043] Through the above application examples, the preliminary scheduling scheme is iteratively optimized until the DRL iteration termination condition is triggered, so that the DRL can learn the optimal scheduling scheme in a dynamic environment, improve the overall performance of the system, and through the iterative optimization of the preliminary scheduling scheme, the preliminary scheduling scheme is further optimized, so that it is more efficient in actual application, and the obtained target scheduling scheme is the optimal scheduling scheme at the current time.
[0044] In a possible implementation, after the power consumption allocation of the server is adjusted, the method further includes:
[0045] monitoring the power consumption state of the server; and collecting the latest running data of the server; wherein the latest running data is used for the next round of power consumption prediction and power consumption allocation of the server.
[0046] Through the above application examples, after the power consumption allocation of the server is adjusted, the power consumption state of the server is monitored to timely find out the power consumption problems of the server or the threshold reached, so that the power consumption problems of the server or the power consumption threshold reached can be timely adjusted, and the adverse effects of the power consumption problems of the server or the power consumption threshold reached on the data center can be avoided. At the same time, the latest running data of the server is collected to continue the power consumption prediction and power consumption allocation of the server through the latest running data, so as to form a closed loop of the power consumption prediction and power consumption allocation of the server, so as to dynamically and timely adjust the power consumption allocation of the server, which is beneficial to the server to always maintain the best power consumption state.
[0047] In a second aspect, the application further provides a data processing device, which includes:
[0048] a power consumption prediction module configured to predict the power consumption of the server through a power consumption prediction model to obtain power consumption prediction results of the server at multiple future time points;
[0049] a first optimization module configured to process the power consumption prediction results through a genetic algorithm (GA) to generate a preliminary scheduling scheme of the server;
[0050] a second optimization module configured to optimize the preliminary scheduling scheme through a deep reinforcement learning (DRL) to obtain a target scheduling scheme;
[0051] a processing module configured to adjust the power consumption allocation of the server according to the target scheduling scheme.
[0052] In a possible implementation, the power consumption prediction module is specifically configured to collect running data of the server; and perform preprocessing on the running data to obtain to-be-processed data of the server; wherein the preprocessing includes data cleaning, missing value processing, and data normalization, and the to-be-processed data is used for power consumption prediction of the server.
[0053] In a possible implementation, the power consumption prediction model includes a convolutional neural network (CNN) and a long short-term memory (LSTM) network, and the power consumption prediction module is specifically configured to extract local spatial features of the to-be-processed data of the server by using the CNN to obtain a one-dimensional feature vector; and capture a time sequence relationship in the one-dimensional feature vector by using the LSTM to obtain the power consumption prediction result of the server at future time points.
[0054] In a possible implementation, the first optimization module is specifically configured to generate an initial population according to the power consumption prediction result; wherein the initial population includes multiple scheduling schemes; calculate respective fitness of each scheduling scheme in the initial population; select multiple first scheduling schemes from the initial population according to respective fitness of each scheduling scheme in the initial population; perform a crossover operation on the multiple first scheduling schemes to generate multiple second scheduling schemes; perform a mutation operation on the multiple second scheduling schemes to generate multiple third scheduling schemes; replace the multiple scheduling schemes in the initial population with the multiple third scheduling schemes to obtain a new population; if a GA iteration termination condition is not triggered, replace the initial population with the new population, and obtain a new population based on the replaced initial population; and if the GA iteration termination condition is triggered, determine the multiple scheduling schemes in the new population as the preliminary scheduling schemes.
[0055] In a possible implementation, the second optimization module is specifically configured to initialize the DRL according to the preliminary scheduling schemes; obtain running data of the server; construct an experience replay pool and store the running data into the experience replay pool; and perform iterative optimization on the preliminary scheduling schemes based on the experience replay pool to obtain the target scheduling schemes.
[0056] In one possible implementation, the second optimization module is specifically configured to update the policy network based on the latest data in the experience replay pool; select a scheduling action based on the updated policy network and execute the scheduling action; update the experience replay pool based on the execution result of the scheduling action, and adjust the preliminary scheduling plan based on the execution result of the scheduling action to obtain a fourth scheduling plan; if the DRL iteration termination condition is not triggered, adjust the power consumption allocation of the server according to the fourth scheduling plan, collect the latest operating data of the server, store the operating data in the experience replay pool, and readjust the scheduling plan; if the DRL iteration termination condition is triggered, determine the fourth scheduling plan as the target scheduling plan.
[0057] In a possible implementation, the processing module is specifically configured to monitor the power consumption status of the server and collect the latest operating data of the server; wherein the latest operating data is used for the next round of power consumption prediction and power consumption allocation of the server.
[0058] In a third aspect, the present application provides an electronic device, comprising:
[0059] Memory for storing computer programs;
[0060] The processor is used to implement the above-mentioned data processing method steps when executing the computer program stored in the memory.
[0061] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned data processing method steps are implemented.
[0062] For each of the above-mentioned aspects from the second to the fourth aspects and the technical effects that may be achieved by each of the aspects, please refer to the above-mentioned description of the technical effects that can be achieved by the first aspect or various possible solutions in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of the hierarchical structure of the collected data provided in the embodiment of the present application;
[0065] Figure 3 Schematic diagram of the GA optimization process provided in the embodiment of this application;
[0066] Figure 4 A schematic diagram of the DRL optimization process provided in an embodiment of the present application;
[0067] Figure 5 A complete processing process schematic diagram of a data processing method provided for an embodiment of the application is shown in the figure.
[0068] Figure 6 A schematic diagram of a data processing device provided for an embodiment of the application is shown in the figure.
[0069] Figure 7 A schematic diagram of an electronic device provided for the application is shown in the figure. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below with reference to the drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment. It should be noted that in the description of the application, "multiple" is understood as "at least two". The association relationship of the associated objects is described, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A exists alone, A and B exist together, and B exists alone. A and B are connected, which means that A and B are directly connected and A and B are connected through C. In addition, in the description of the application, "first", "second", etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.
[0071] The embodiments of the application will be described in detail below with reference to the drawings.
[0072] At present, the power consumption management method of the server adjusts the power consumption of the server manually through a pre-set scheduling scheme, so that the scheduling scheme lacks global optimization, resulting in a single scheduling scheme that is not the optimal scheduling scheme at the current time, thereby making it difficult to allocate power consumption most appropriately when the server allocates power consumption according to the scheduling scheme.
[0073] Therefore, the application proposes a data processing method, which first predicts the power consumption of the to-be-processed data of the server through a power consumption prediction model to obtain power consumption prediction results of the server at multiple future times, then processes the power consumption prediction results through a genetic algorithm (English: Genetic Algorithm, abbreviated as GA) to generate a preliminary scheduling scheme, and further optimizes the preliminary scheduling scheme through deep reinforcement learning (English: Deep Reinforcement Learning, abbreviated as DRL) to obtain a target scheduling scheme, so that the obtained target scheduling scheme is the optimal scheduling scheme at the current time, and then the optimal power consumption configuration of the server can be realized when the power consumption allocation of the server is adjusted according to the target scheduling scheme.
[0074] Reference Figure 1A data processing method provided by an embodiment of the present application is shown in a flowchart. The method comprises the following steps.
[0075] In S101, a power consumption prediction model is used to predict the power consumption of the server, and power consumption prediction results of the server at multiple future time points are obtained.
[0076] Before predicting the power consumption of the server according to the power consumption prediction model, the server's to-be-processed data is first obtained, so as to predict the power consumption of the server based on the server's to-be-processed data. The to-be-processed data is data obtained by preprocessing the server's running data.
[0077] Specifically, the server's running data is first collected. The server's running data can include the usage of a central processing unit (CPU), the usage of memory, network traffic, disk input / output (I / O), device temperature, fan speed, current voltage, historical power consumption, and the like.
[0078] In the embodiment of the present application, the server's running data can be collected in real time by a sensor and monitoring software. The collection of the server's running data can be performed through an intelligent platform management interface (IPMI) interface.
[0079] The specific hierarchy of the IPMI interface can be as shown in the following table. Figure 2 In the hierarchy, there are three levels, namely, an application layer (APP), an operating system layer (OS), and a hardware layer (Hardware).
[0080] The tool ipmitool in the application layer (APP) can communicate with the server's baseboard management controller (BMC) through the IPMI interface. The commands sent by the ipmitool can obtain hardware state information such as device temperature, fan speed, and voltage. Thus, the device temperature and other data in the server's running data can be obtained according to the commands sent by the ipmitool.
[0081] In the operating system layer (OS), the IPMI interface is responsible for managing requests from the application layer (such as the commands sent by the ipmitool in the application layer) and delivering the requests to the BMC in the hardware layer. The IPMI interface in the operating system layer provides a standardized command and response mechanism, making it easier for the application layer to interact with the BMC.
[0082] The BMC in the hardware layer is a dedicated controller, which can be used to monitor the state of the server hardware. The BMC can directly access various sensor hardware components, collect real-time running data of the server, and provide the collected data to the operating system layer and the application layer through the IPMI interface.
[0083] The BMC reads the device state information (such as device temperature, fan speed, current voltage, etc.) in real time through the sensor, and stores the device state information in the shared memory. The BMC can receive commands from the operating system and the application layer, and control and manage the hardware state, such as adjusting the fan speed, setting the voltage, etc. Therefore, the data obtained by the BMC can be used to determine the hardware health and running state of the server, thereby providing data support for the power consumption prediction of the server.
[0084] Further, through the above structure, the collection of the running data of the server can be realized.
[0085] After collecting the running data of the server, the running data is preprocessed to obtain the to-be-processed data, thereby realizing the acquisition of the to-be-processed data, and making the quality of the obtained to-be-processed data better, which is beneficial to improve the accuracy of the subsequent power consumption prediction of the running data. The to-be-processed data can be multi-dimensional time series data.
[0086] In the embodiments of the present application, the above-mentioned preprocessing includes data cleaning, missing value processing and data normalization. The data cleaning is used to remove outliers and noise in the running data, thereby ensuring the quality of the running data. The missing value processing is used to fill or reject the missing values in the running data, thereby avoiding the influence of the missing values on the subsequent prediction. The data normalization is used to convert each data in the running data to a unified scale, which is convenient for subsequent processing, and at the same time avoids the calculation error caused by the difference in data dimension or order of magnitude.
[0087] In the embodiments of the present application, the above-mentioned data cleaning, missing value processing and data normalization can be conventional processing methods in the prior art, which will not be described here.
[0088] Further, after obtaining the to-be-processed data, the to-be-processed data is input into the power consumption prediction model, so that the power consumption of the server can be predicted through the power consumption prediction model, and the power consumption prediction results of the server at future time points are obtained.
[0089] In the embodiments of the present application, the power consumption prediction result can include CPU usage, memory usage, network traffic, temperature, and the like of the server. Thus, the power consumption of the server at the future time points can be determined according to the CPU usage, memory usage, network traffic, temperature, and the like at the future time points, such as determining how much power consumption the server needs to use.
[0090] The power consumption prediction model can include a convolutional neural network (CNN) and a long short-term memory (LSTM).
[0091] Further, the power consumption prediction of the to-be-processed data by the power consumption prediction model can specifically be:
[0092] First, the to-be-processed data is input into the CNN. The CNN processes the to-be-processed data through a convolutional layer, an activation function, and a pooling layer to extract local spatial features of the to-be-processed data and obtain a multi-dimensional feature map; and the multi-dimensional feature map is flattened into a one-dimensional feature vector. Therefore, the CNN can extract local spatial features from the to-be-processed data and form a one-dimensional feature vector.
[0093] Then, the one-dimensional feature vector is input into the LSTM. The LSTM captures the time sequence relationship between the data in the one-dimensional feature vector to obtain the power consumption prediction result of the server at the future time points.
[0094] In the above manner, the power consumption prediction of the server is realized according to the power consumption prediction model of the CNN and the LSTM, and the accuracy of the power consumption prediction result of the server at the future time points is high, which is conducive to improving the efficiency and accuracy of the subsequent scheduling scheme based on the power consumption prediction result. Moreover, compared with the simple statistical analysis based on historical power consumption data in the prior art to predict the power consumption of the server at the future time points, the power consumption prediction model of the present application uses not only power consumption data but also CPU usage, memory usage, and the like, so that the power consumption of the server can be predicted from multiple dimensions, and the power consumption prediction accuracy is greatly improved.
[0095] It should be noted that before the power consumption prediction model (i.e., CNN-LSTM) is used to process the to-be-processed data to obtain the power consumption prediction result of the server at the plurality of future time points, the power consumption prediction model needs to be trained first, so that each parameter in the power consumption prediction model is an optimal parameter, thereby obtaining an optimal power consumption prediction model, and then the to-be-processed data is processed by the optimal power consumption prediction model to obtain the power consumption prediction result of the server at the plurality of future time points, thereby further improving the accuracy of the power consumption prediction model in predicting the power consumption of the server, and making the accuracy of the power consumption prediction result the highest.
[0096] Specifically, after the training data after data preprocessing is input into the power consumption prediction model (i.e., CNN-LSTM), when the power consumption training result output by the LSTM does not satisfy the training termination condition of the power consumption prediction model, the parameters of the CNN and the LSTM are adjusted, and the training data after data preprocessing is continuously input into the power consumption prediction model with adjusted parameters until the training termination condition of the power consumption prediction model is satisfied, so that the finally obtained power consumption prediction model is an optimal power consumption prediction model.
[0097] In the embodiment of the present application, the training termination condition can be that the accuracy of the power consumption training result is greater than an accuracy threshold, or the error of the power consumption training result is less than an error threshold, but is not limited thereto, and the specific training termination condition can be adjusted according to the specific application scenario.
[0098] In addition, in the embodiment of the present application, the power consumption prediction model can also be a model combining random forest and gradient boosting, thereby realizing accurate prediction of the power consumption of the server. However, the power consumption prediction model is not limited thereto, and can be adjusted according to the specific application scenario.
[0099] S102, processing the power consumption prediction result by GA to generate a preliminary scheduling scheme of the server.
[0100] After the power consumption prediction model is used to predict the power consumption of the server in step S101 to obtain the power consumption prediction result of the server at the plurality of future time points, a preliminary scheduling scheme of the server is generated by GA based on the power consumption prediction result.
[0101] The preliminary scheduling scheme can be a reasonable allocation of the power consumption of each node in the server according to the power consumption prediction result.
[0102] GA is a search algorithm simulating natural selection and genetic mechanism, and the basic idea is to iteratively optimize the scheduling scheme by simulating the evolution process in nature. The GA can process the power consumption prediction result by selection operation, crossover operation and mutation operation, iteratively optimize the scheduling scheme, and determine the preliminary scheduling scheme, thereby realizing balanced allocation of the server load and minimization of the power consumption.
[0103] Specifically, the specific process of determining the preliminary scheduling plan through GA can be as follows: Figure 3 As shown. Figure 3 The specific steps S301-S308 are as follows:
[0104] S301: Generate an initial population based on the power consumption prediction result.
[0105] The initial population includes multiple scheduling schemes, each of which is an individual, and each individual (ie, each scheduling scheme) represents a resource scheduling scheme, including server load distribution, task distribution, and the like.
[0106] In an embodiment of the present application, an initial population is generated based on the power consumption prediction results. Based on multiple power consumption prediction results, an initial population including multiple scheduling schemes can be randomly generated through a population initialization operation, thereby providing GA with an initial solution set, that is, an initial search space.
[0107] S302: Calculate the fitness of each scheduling scheme in the initial population.
[0108] Among them, fitness can be used to evaluate the quality of individuals in the population. Therefore, this fitness can be used to evaluate the quality of each scheduling scheme in the initial population. The higher the fitness, the better the scheduling scheme.
[0109] In the embodiment of the present application, the fitness of each scheduling scheme in the initial population can be calculated according to a fitness function. The fitness function can be defined according to a goal (such as minimizing power consumption, balancing loads), and can be adjusted according to specific application scenarios.
[0110] S303 : Select multiple first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population.
[0111] That is, based on fitness, some excellent scheduling schemes (i.e., some excellent individuals) are selected from multiple scheduling schemes in the initial population as parents (i.e., the first scheduling scheme). In the embodiment of the present application, the number of first scheduling schemes can be determined based on the specific application scenario. That is, the number of parents (or the number of excellent individuals) can be determined based on the specific application scenario.
[0112] The plurality of first scheduling schemes are selected from the initial population based on the fitness of each scheduling scheme in the initial population, and can be selected by roulette wheel selection, tournament selection, etc. In the embodiment of the present application, the specific selection method can be adjusted according to the specific application scenario.
[0113] In addition, in order to maintain the diversity of the population, the scheduling scheme with the fitness greater than the first threshold in the initial population can be taken as the first scheduling scheme (i.e., taking the individual with the fitness greater than the first threshold as the parent), and the scheduling scheme with the fitness less than the second threshold can also be taken as the first scheduling scheme.
[0114] That is, in the initial population, the scheduling scheme with high fitness is retained, and part of the scheduling scheme with low fitness is also retained to maintain the diversity of the population, thereby helping to improve the global search capability of the GA, avoiding falling into a local optimal solution, promoting the adaptability of the GA and the stability of the ecosystem, and thereby improving the performance and effect of the GA.
[0115] The first threshold and the second threshold can be the same or different, and can be adjusted according to specific application scenarios.
[0116] S304, performing a crossover operation on the plurality of first scheduling schemes to generate a plurality of second scheduling schemes.
[0117] The crossover operation combines part of the genes of the parent (i.e., the first scheduling scheme) into the offspring (i.e., the second scheduling scheme) by simulating the gene recombination of organisms. Therefore, the crossover operation is performed on the parent to generate the offspring (i.e., the second scheduling scheme), so that the offspring individual with better fitness can be generated, thereby promoting the evolution of the population to a better solution.
[0118] In the embodiments of the present application, the crossover operation can be a commonly used crossover operation, such as single-point crossover, multi-point crossover, uniform crossover, etc., and the specific crossover operation can be selected according to the specific application scenario.
[0119] S305, performing a mutation operation on the plurality of second scheduling schemes to generate a plurality of third scheduling schemes.
[0120] The mutation operation can be realized by randomly changing part of the genes of the offspring (i.e., the second scheduling scheme), thereby generating new offspring (i.e., the third scheduling scheme), which is beneficial to increase the diversity of the population and thereby avoid the GA falling into a local optimal solution.
[0121] However, in order to ensure the stability of the solution of the GA, the mutation probability of the offspring is small.
[0122] S306, replacing the plurality of scheduling schemes in the initial population with the plurality of third scheduling schemes to obtain a new population.
[0123] The new population includes the plurality of third scheduling schemes.
[0124] S307, determining whether a GA iteration termination condition is triggered.
[0125] In the embodiments of the present application, the GA iteration termination condition can be that the number of GA iterations is greater than or equal to a threshold of the number of GA iterations, and can also be that the increase in fitness is less than a third threshold, but is not limited to this. The GA iteration termination condition can be adjusted according to specific application scenarios.
[0126] If the GA iteration termination condition is not triggered, step S308 is performed.
[0127] If the GA iteration termination condition is triggered, step S309 is performed.
[0128] S308, the initial population is replaced by the new population.
[0129] After the initial population is replaced by the new population, the above steps S302-S307 are continued to be performed based on the replaced initial population, that is, based on the plurality of scheduling schemes in the replaced initial population, the new population is continued to be obtained through the fitness calculation operation, the selection operation, the crossover operation, the mutation operation and the replacement operation, so as to realize the iterative optimization of the scheduling scheme, so that the scheduling scheme in the final obtained population is the optimal scheduling scheme at the current time, until the GA iteration termination condition is triggered.
[0130] S309, the plurality of scheduling schemes in the new population are determined as the preliminary scheduling schemes.
[0131] After the GA iteration termination condition is triggered, the execution of steps S301-S308 is ended, and the plurality of scheduling schemes in the new population are determined as the preliminary scheduling schemes.
[0132] Thus, according to the above steps S301-S309, the preliminary iterative optimization of the scheduling scheme is realized, and the preliminary scheduling scheme is generated.
[0133] S103, the preliminary scheduling scheme is optimized by DRL to obtain the target scheduling scheme.
[0134] After the GA is used in step S103 to process the power consumption prediction result to generate the preliminary scheduling scheme, the preliminary scheduling scheme is further optimized by DRL to obtain the target scheduling scheme.
[0135] In the embodiments of the present application, DRL can use a deep Q network (English: Deep Q-Network, DQN, abbreviated as DQN), so as to adjust the task load of the server based on DQN, realize intelligent scheduling in a large-scale server cluster, and optimize the overall power consumption of the server. DRL can also use a policy gradient method, an asynchronous advantage action evaluation algorithm (English: Asynchronous Advantage Actor-Critic, abbreviated as A3C), and the like, which can be adjusted according to specific application scenarios.
[0136] The specific optimization process of obtaining the target scheduling scheme by optimizing the preliminary scheduling scheme through the DRL can be as follows:
[0137] First, initialize the DRL according to the preliminary scheduling scheme. Then, obtain the running data of the server. Next, construct an experience replay pool and store the running data in the experience replay pool. Then, based on the experience replay pool, iteratively optimize the preliminary scheduling scheme to obtain the target scheduling scheme.
[0138] The initialization of the DRL can include environment definition. The environment definition includes defining the state space, action space, and reward function.
[0139] The state space can include the current state of the server (such as CPU usage, memory usage, etc.); the action space can include scheduling operations in the preliminary scheduling scheme (such as task allocation, resource adjustment, etc.).
[0140] The reward function can be designed according to the target (such as reducing power consumption, improving performance), and the reward function is usually designed in a combination of immediate reward and long-term reward.
[0141] The collected running data can be used to train and optimize the behavior of the agent in the DRL. The acquisition method of the running data can be the same as the acquisition method of the server running data in step S101; and after the running data is collected, it can be preprocessed in the same way as in step S101, which will not be repeated here.
[0142] The experience replay pool can be used to store experience data (such as state, action, reward, next state) generated during training. Its specific construction method is the conventional construction method of the DRL experience replay pool in the prior art, which will not be repeated here.
[0143] And the collected running data is also stored in the experience replay pool to facilitate the training process to obtain data.
[0144] In the embodiments of the present application, the specific iterative optimization process of obtaining the target scheduling scheme based on the experience replay pool and iteratively optimizing the preliminary scheduling scheme can be as shown in Figure 4
[0145] S401, update the policy network according to the data in the latest experience replay pool.
[0146] In the embodiments of the present application, the parameters of the policy network can be updated by gradient descent method, so as to realize the update of the policy network.
[0147] The policy network can be a deep neural network (DNN), but is not limited thereto. The policy network can be used to predict a scheduling action taken in a given state.
[0148] In the embodiments of the present application, the process of updating the policy network according to the data in the latest experience replay pool can be performed by randomly extracting data in the experience replay pool, breaking the correlation between the data, and helping to improve the stability of the training.
[0149] S402, selecting a scheduling action according to the updated policy network and executing the scheduling action.
[0150] Specifically, the current state in the data extracted from the experience replay pool is input into the updated policy network (such as a DNN), and the probabilities of each scheduling action are obtained according to the output of the policy network, so that the scheduling action is selected according to the probabilities of each scheduling action output by the policy network, and the scheduling action is executed, that is, the policy optimization operation is completed.
[0151] The scheduling action can represent the use of a function in the scheduling scheme. When polling step S402 for the first time, the selected scheduling action can be a scheduling action in the preliminary scheduling scheme generated by GA. When polling step S402 is not the first time, the selected scheduling action can be a scheduling action in the scheduling scheme obtained by adjusting the preliminary scheduling scheme through steps S401-S405.
[0152] S403, updating the experience replay pool according to the execution result of the scheduling action, and adjusting the preliminary scheduling scheme to obtain a fourth scheduling scheme.
[0153] Specifically, first, the reward is obtained according to the execution result of the scheduling action. Then, the reward, the current state of the server and the scheduling action are stored in the experience replay pool, so as to realize the updating of the experience replay pool, that is, the experience replay operation is completed.
[0154] At the same time, the preliminary scheduling scheme is adjusted according to the execution result of the scheduling action, so as to optimize the problems existing in the preliminary scheduling scheme, thereby obtaining the adjusted fourth scheduling scheme.
[0155] In the embodiments of the present application, the adjustment of the preliminary scheduling scheme according to the execution result of the scheduling action can be adjusted in the following way:
[0156] retaining the parameters in the preliminary scheduling scheme that meet the expectations (i.e., rewarding the good places in the preliminary scheduling scheme), deleting the parameters in the preliminary scheduling scheme that do not meet the expectations (i.e., punishing the bad places in the preliminary scheduling scheme), or modifying the parameters in the preliminary scheduling scheme that do not meet the expectations (i.e., punishing the bad places in the preliminary scheduling scheme), but not limited thereto.
[0157] After the experience replay pool is updated according to the execution result of the scheduling action, and the preliminary scheduling scheme is adjusted to obtain a fourth scheduling scheme, step S404 is performed.
[0158] S404, it is judged whether a DRL iteration termination condition is triggered.
[0159] In the embodiments of the present application, the DRL iteration termination condition can be that the number of DRL iterations reaches a DRL iteration number threshold, but is not limited thereto. The DRL iteration termination condition can be adjusted according to specific application scenarios.
[0160] If the DRL iteration termination condition is not triggered, step S405 is performed.
[0161] If the DRL iteration termination condition is triggered, step S406 is performed.
[0162] S405, according to the fourth scheduling scheme, the power consumption allocation of the server is adjusted, and the latest running data of the server collected is stored in the experience replay pool.
[0163] When the DRL iteration termination condition is not triggered, the power consumption allocation of the server is adjusted according to the fourth scheduling scheme, then the latest running data of the server is collected and stored in the experience replay pool, and the latest experience replay pool is used to re-perform the foregoing steps S401-S405, so as to re-adjust the scheduling scheme until the DRL iteration termination condition is triggered, thereby the problems in the preliminary scheduling scheme can be continuously optimized to reduce the problems in the scheduling scheme, so that the optimized scheduling scheme is more in line with the needs of the current scene.
[0164] S406, the fourth scheduling scheme is determined as a target scheduling scheme.
[0165] Through the above steps S401-S406, the iterative optimization of the preliminary scheduling scheme is realized, the problems in the preliminary scheduling scheme are continuously optimized according to the real-time data, so that the target scheduling scheme finally obtained is the optimal scheduling scheme at the current time, and the method can adapt to the dynamically changing environment, thereby the power consumption scheduling effect of the server is improved.
[0166] S104, according to the target scheduling scheme, the power consumption allocation of the server is adjusted.
[0167] After the further optimization of the preliminary scheduling scheme by DRL in step S103, the power consumption allocation of the server (such as the working state) is adjusted according to the target scheduling scheme, including starting or shutting down the server, adjusting the load allocation, etc., to realize real-time response and resource optimization, and to realize load balancing and energy efficiency optimization of the server.
[0168] Optionally, after adjusting the power consumption allocation of the server according to the target scheduling scheme, the server state and power consumption are continuously monitored, and the feedback data is used for the next round of prediction and scheduling to form a closed-loop system.
[0169] Specifically, after adjusting the power consumption allocation of the server according to the target scheduling scheme, the power consumption usage of the server is monitored in real time. When the power consumption of the server reaches the maximum value (i.e., the power consumption reaches the maximum value), the power consumption can be reduced by adjusting the speed of heat dissipation, or the CPU can be frequency-reduced without affecting the operation of the business to reduce the power consumption. The latest running data of the server is read through the sensor, and based on the latest running data, the next round of power consumption prediction of the server is continued through the above steps S101-S104, and based on the power consumption prediction result of the next round, the scheduling scheme is continuously optimized by GA and DRL, so that the power consumption allocation of the server is dynamically adjusted to make the power consumption allocation of the server more reasonable.
[0170] In summary, the data processing method proposed in the present application uses the power consumption prediction model based on CNN and LSTM to predict the power consumption of the preprocessed server running data, obtains the power consumption prediction result of the server at multiple future time points, and then uses GA to process the power consumption prediction result to obtain a preliminary scheduling scheme, and then uses DRL to further optimize the preliminary scheduling scheme to obtain a target scheduling scheme, so that the power consumption allocation of the server is realized through the target scheduling scheme, and the intelligent dynamic scheduling of the server is realized, the energy utilization efficiency and system performance of the data center are effectively improved, the operation cost is reduced, and the service quality is ensured.
[0171] Moreover, the data processing method proposed in the present application not only improves the accuracy of power consumption prediction and server resource utilization, reduces the overall energy consumption of the server, but also enhances the reliability and stability of the system, is suitable for various application scenarios, optimizes the overall performance, and has significant application value and economic benefits.
[0172] In addition, the data processing method proposed in the present application uses the power consumption prediction model, GA and DRL to continuously optimize the power consumption prediction and scheduling scheme according to real-time data, so as to meet the real-time scheduling demand and effectively handle the dynamic changes of the environment and the load.
[0173] The following will be described in detail Figure 5The data processing method provided by the embodiment of the application is described in detail.
[0174] First, the running data (such as CPU usage, memory adaptation rate, device temperature, fan speed, etc.) of the server is collected through the IPMI interface or the simple network management protocol (English: Simple Network Management Protocol, abbreviated as SNMP), and the running data is transmitted to the data preprocessing module.
[0175] In the data preprocessing module, the received running data is subjected to data cleaning, missing value processing, data normalization and other preprocessing operations to obtain the to-be-processed data. The to-be-processed data is then input into the power consumption prediction model.
[0176] In the power consumption prediction model, the received to-be-processed data is first input into the CNN. The local spatial features of the to-be-processed data are extracted through the convolution layer, the activation function and the pooling layer in the CNN, and the extracted local spatial features are formed into a one-dimensional feature vector through flattening. Then, the one-dimensional feature vector is output to the LSTM. The LSTM captures the time sequence relationship between the data in the one-dimensional feature vector to generate a power consumption prediction result for a plurality of future time points. The power consumption prediction result is transmitted to the GA optimization module in the scheduling algorithm module.
[0177] It should be noted that before the power consumption prediction model (i.e., CNN-LSTM) is used to predict the power consumption of the server, the CNN-LSTM needs to be trained by the training data after data preprocessing. If the power consumption training result finally output by the LSTM in the CNN-LSTM fails to meet the training termination condition of the power consumption prediction model, the parameters in the CNN-LSTM are adjusted, and the training data after data preprocessing is then input into the CNN-LSTM with the adjusted parameters, until the training termination condition of the power consumption prediction model is met, so that the CNN-LSTM used to finally predict the power consumption of the server is the optimal power consumption prediction model.
[0178] In the GA optimization module in the scheduling algorithm module, the power consumption prediction result is first processed by the GA to generate a preliminary scheduling scheme.
[0179] Specifically, first, an initial population including multiple scheduling schemes is generated according to the power consumption prediction result. Second, the fitness of each scheduling scheme in the initial population is calculated. Third, multiple first scheduling schemes are selected from the initial population according to the fitness. Fourth, multiple second scheduling schemes are generated by performing a crossover operation on the multiple first scheduling schemes. Fifth, multiple third scheduling schemes are generated by performing a mutation operation on the multiple second scheduling schemes. Sixth, the multiple scheduling schemes in the initial population are replaced by the multiple third scheduling schemes to obtain a new population, thereby realizing population updating. If the GA iteration termination condition is not triggered, the initial population is replaced by the new population, thereby continuing the polling of the above scheduling scheme optimization operations (i.e., fitness calculation, selection operation, crossover operation, mutation operation, population updating) based on the replaced initial population until the GA iteration termination condition is triggered, and the multiple scheduling schemes in the finally obtained new population are taken as the preliminary scheduling schemes.
[0180] The preliminary scheduling schemes are transmitted to a DRL optimization module in the scheduling algorithm module.
[0181] In the DRL optimization module in the scheduling algorithm module, the preliminary scheduling schemes are further optimized by DRL to obtain target scheduling schemes.
[0182] Specifically, first, the DRL is initialized according to the preliminary scheduling schemes. Then, the running data of the server are collected. Next, an experience replay pool is constructed, and the running data of the server are stored in the experience replay pool. Then, the policy network is updated according to the data in the experience replay pool. Next, a scheduling action is selected according to the updated policy network, and the scheduling action is executed. Then, the experience replay pool is updated according to the execution result of the scheduling action, and the preliminary scheduling schemes are adjusted to obtain fourth scheduling schemes. If the DRL iteration termination condition is not triggered, the power consumption allocation of the server is adjusted according to the fourth scheduling schemes, the latest running data of the server are collected, and the latest running data are stored in the experience replay pool, and then the optimization steps of the above scheduling schemes are continued to be polled based on the latest experience replay pool until the DRL iteration termination condition is triggered, and the finally obtained scheduling schemes are taken as the target scheduling schemes.
[0183] The target scheduling schemes are transmitted to the BMC real-time monitoring module.
[0184] In the BMC real-time monitoring module, first, the power consumption allocation of the server is adjusted according to the received target scheduling scheme. Then, the BMC real-time monitoring module monitors the power consumption state of the server in real time, and if it is determined that the power consumption of the server reaches the maximum value (i.e., the power consumption cap), the power consumption is reduced through the cooling condition rotating speed, or the CPU is downclocked without affecting the operation of the business, so as to reduce the power consumption; and the latest running data of the server is read through the sensor. Then, the latest running data of the server is collected through the IMPI interface or the SNMP, and is transmitted to the data preprocessing module, so that the next round of power consumption prediction and power consumption scheduling is performed based on the latest running data.
[0185] Based on the same inventive concept, the embodiment of the present application also provides a data processing device, as shown in Figure 6 As shown in Fig. 1, a data processing device provided by the present application includes:
[0186] The power consumption prediction module 601 is configured to perform power consumption prediction on the server through a power consumption prediction model, to obtain power consumption prediction results of the server at future time points.
[0187] The first optimization module 602 is configured to process the power consumption prediction results through a genetic algorithm (GA) to generate a preliminary scheduling scheme of the server.
[0188] The second optimization module 603 is configured to optimize the preliminary scheduling scheme through a deep reinforcement learning (DRL) to obtain a target scheduling scheme.
[0189] The processing module 604 is configured to adjust the power consumption allocation of the server according to the target scheduling scheme.
[0190] In a possible implementation, the power consumption prediction module 601 is specifically configured to collect running data of the server; and pre-process the running data to obtain to-be-processed data of the server; wherein the pre-processing includes data cleaning, missing value processing and data normalization, and the to-be-processed data is used for power consumption prediction of the server.
[0191] In a possible implementation, the power consumption prediction model includes a convolutional neural network (CNN) and a long short-term memory (LSTM), and the power consumption prediction module 601 is specifically configured to extract local spatial features of the to-be-processed data of the server through the CNN to obtain a one-dimensional feature vector; and capture the time sequence relationship in the one-dimensional feature vector through the LSTM to obtain the power consumption prediction results of the server at future time points.
[0192] In a possible implementation, the first optimization module 602 is specifically configured to generate an initial population according to the power consumption prediction result; the initial population includes a plurality of scheduling schemes; calculate the fitness of each scheduling scheme in the initial population; select a plurality of first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population; perform a crossover operation on the plurality of first scheduling schemes to generate a plurality of second scheduling schemes; perform a mutation operation on the plurality of second scheduling schemes to generate a plurality of third scheduling schemes; replace the plurality of scheduling schemes in the initial population with the plurality of third scheduling schemes to obtain a new population; if a GA iteration termination condition is not triggered, replace the initial population with the new population, and obtain a new population based on the replaced initial population; and if the GA iteration termination condition is triggered, determine the plurality of scheduling schemes in the new population as the preliminary scheduling scheme.
[0193] In a possible implementation, the second optimization module 603 is specifically configured to initialize the DRL according to the preliminary scheduling scheme, obtain running data of the server, construct an experience replay pool, and store the running data into the experience replay pool; perform iterative optimization on the preliminary scheduling scheme based on the experience replay pool to obtain the target scheduling scheme.
[0194] In a possible implementation, the second optimization module 603 is specifically configured to update a policy network according to the latest data in the experience replay pool, select a scheduling action according to the updated policy network and perform the scheduling action, update the experience replay pool according to the execution result of the scheduling action, and adjust the preliminary scheduling scheme according to the execution result of the scheduling action to obtain a fourth scheduling scheme; if the DRL iteration termination condition is not triggered, adjust the power consumption allocation of the server according to the fourth scheduling scheme, collect the latest running data of the server, store the running data into the experience replay pool, and readjust the scheduling scheme; and if the DRL iteration termination condition is triggered, determine the fourth scheduling scheme as the target scheduling scheme.
[0195] In a possible implementation, the processing module 604 is specifically configured to monitor the power consumption state of the server, and collect the latest running data of the server; the latest running data is used for power consumption prediction and power consumption allocation of the server in the next round.
[0196] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, which can realize the functions of the data processing apparatus described above, and refer to Figure 7 The electronic device described above includes
[0197] The at least one processor 701 and the memory 702 connected with the at least one processor 701 are not limited to the specific connection medium between the processor 701 and the memory 702 in the embodiments of the present application, Figure 7 The processor 701 and the memory 702 are connected through the bus 700 in the embodiments of the present application. The bus 700 is represented by a thick line in Figure 7 The connection mode between other components is only schematically illustrated, and is not limited. The bus 700 can be divided into an address bus, a data bus, a control bus, etc., for convenience of representation, Figure 7 The bus 700 is represented by a thick line in the embodiments of the present application, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 701 can also be referred to as a controller, and the name is not limited.
[0198] In the embodiments of the present application, the memory 702 stores instructions executable by the at least one processor 701. The at least one processor 701 can execute the data processing method discussed above by executing the instructions stored in the memory 702. The processor 701 can realize the functions of various modules in the apparatus shown in Figure 6
[0199] The processor 701 is the control center of the apparatus, and can connect all parts of the control device through various interfaces and lines. The apparatus can realize various functions and process data by running or executing instructions stored in the memory 702 and calling data stored in the memory 702, thereby monitoring the apparatus as a whole.
[0200] In a possible design, the processor 701 can include one or more processing units. The processor 701 can integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 can be implemented on the same chip, and in some embodiments, they can also be implemented on independent chips respectively.
[0201] The processor 701 can be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can realize or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the data processing method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.
[0202] The memory 702, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 can include at least one type of storage medium, for example, can include flash memory, hard disk, multimedia card, card type memory, random access memory (English: Random Access Memory, abbreviated as RAM), static random access memory (English: Static Random Access Memory, abbreviated as SRAM), programmable read-only memory (English: Programmable Read Only Memory, abbreviated as PROM), read-only memory (English: Read Only Memory, abbreviated as ROM), electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), magnetic storage, optical disc, etc. The memory 702 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 702 in the embodiments of the present application can also be a circuit or any other device capable of realizing the storage function, used for storing program instructions and / or data.
[0203] By designing and programming the processor 701, the code corresponding to the data processing method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the data processing method of the embodiments shown in the running time. Figure 1 How to design and program the processor 701 is a technology known to those skilled in the art, which will not be described here.
[0204] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, when the computer instructions run on a computer, the computer instructions make the computer execute the data processing method discussed above.
[0205] In some possible implementations, various aspects of the data processing method provided by the present application can also be implemented in the form of a program product, which includes program code for making the control device execute the steps of the data processing method according to various exemplary embodiments of the present application described above in the specification when the program product runs on the device.
[0206] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code.
[0207] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0208] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. one or more functions specified in the flowchart illustrations and / or block diagrams.
[0210] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their legal equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A data processing method, characterized in that: include: The power consumption of the server is predicted by using a power consumption prediction model to obtain power consumption prediction results of the server at multiple moments in the future; Processing the power consumption prediction result by a genetic algorithm (GA) to generate a preliminary scheduling plan for the server; Initialize deep reinforcement learning (DRL) according to the preliminary scheduling plan; Obtaining operation data of the server; Building an experience replay pool, and storing the operating data in the experience replay pool; Update the policy network based on the latest data in the experience replay pool; Selecting a scheduling action based on the updated policy network and executing the scheduling action; updating the experience replay pool according to the execution result of the scheduling action, and adjusting the preliminary scheduling plan according to the execution result of the scheduling action to obtain a fourth scheduling plan; If the DRL iteration termination condition is not triggered, adjusting the power consumption allocation of the server according to the fourth scheduling scheme, collecting the latest operating data of the server, storing the operating data in the experience replay pool, and re-adjusting the scheduling scheme; If the DRL iteration termination condition is triggered, determining the fourth scheduling scheme as the target scheduling scheme; According to the target scheduling scheme, the power consumption distribution of the server is adjusted.
2. The method according to claim 1, wherein Before predicting the power consumption of the server using the power consumption prediction model to obtain power consumption prediction results of the server at multiple moments in the future, the method further includes: Collecting operation data of the server; Preprocessing is performed on the operating data to obtain data to be processed of the server; wherein the preprocessing includes data cleaning, missing value processing and data normalization, and the data to be processed is used for power consumption prediction of the server.
3. The method according to claim 1, wherein The power consumption prediction model includes a convolutional neural network (CNN) and a long short-term memory (LSTM) network. The power consumption prediction model is used to predict the power consumption of the server, and the power consumption prediction results of the server at multiple moments in the future are obtained, including: Extracting local spatial features of the data to be processed by the server through the CNN to obtain a one-dimensional feature vector; The LSTM is used to capture the temporal relationship in the one-dimensional feature vector to obtain the power consumption prediction results of the server at multiple moments in the future.
4. The method according to claim 1, wherein The processing of the power consumption prediction result by a genetic algorithm (GA) to generate a preliminary scheduling plan for the server includes: generating an initial population according to the power consumption prediction result; wherein the initial population includes multiple scheduling schemes; Calculating the fitness of each scheduling scheme in the initial population; Selecting a plurality of first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population; Performing a cross operation on the plurality of the first scheduling schemes to generate a plurality of second scheduling schemes; performing mutation operations on the plurality of the second scheduling schemes to generate a plurality of third scheduling schemes; Replacing the plurality of scheduling schemes in the initial population with the plurality of third scheduling schemes to obtain a new population; If the GA iteration termination condition is not triggered, the initial population is replaced by the new population, and a new population is obtained based on the replaced initial population; If the GA iteration termination condition is triggered, multiple scheduling schemes in the new population are determined to be the preliminary scheduling schemes.
5. The method according to claim 1, wherein After adjusting the power consumption distribution of the server, the method further includes: Monitor the power consumption status of the server; and collect the latest operating data of the server; wherein the latest operating data is used for the next round of power consumption prediction and power consumption allocation of the server.
6. A data processing device, characterized in that: include: The power consumption prediction module is used to predict the power consumption of the server using the power consumption prediction model to obtain the power consumption prediction results of the server at multiple moments in the future; A first optimization module is configured to process the power consumption prediction result by using a genetic algorithm (GA) to generate a preliminary scheduling plan for the server; A second optimization module is configured to initialize deep reinforcement learning (DRL) according to the preliminary scheduling scheme; Acquire the operation data of the server; construct an experience replay pool, and store the operation data in the experience replay pool; updating the policy network based on the latest data in the experience replay pool; selecting a scheduling action based on the updated policy network and executing the scheduling action; updating the experience replay pool based on the execution result of the scheduling action, and adjusting the preliminary scheduling plan based on the execution result of the scheduling action to obtain a fourth scheduling plan; If the DRL iteration termination condition is not triggered, adjusting the power consumption allocation of the server according to the fourth scheduling scheme, collecting the latest operating data of the server, storing the operating data in the experience replay pool, and re-adjusting the scheduling scheme; If the DRL iteration termination condition is triggered, determining the fourth scheduling scheme as the target scheduling scheme; A processing module is used to adjust the power consumption distribution of the server according to the target scheduling scheme.
7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method steps of any one of claims 1 to 5 when executing the computer program stored in the memory.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method, system and equipment for optimizing energy consumption of server and storage medium
CN116627241A
Server power consumption equalization processing method and device and electronic equipment
CN118519784A