Data processing method and device and electronic equipment
Through the power consumption prediction model and GA-DRL technology, the server scheduling solution is generated and optimized, and the problem of lack of global optimization of the scheduling solution in the existing technology is solved, achieving the optimal configuration of server power consumption and the energy efficiency improvement of the data center.
Patent Information
- Application Number
- CN202411162420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-22
AI Technical Summary
The existing server power consumption management scheduling scheme lacks global optimization capabilities, making it difficult to achieve optimal power consumption configuration.
The power consumption prediction model is used to combine genetic algorithms and deep reinforcement learning to achieve optimal distribution of server power consumption through power consumption prediction, preliminary scheduling scheme generation and optimization. The specific steps include: predicting power consumption through convolutional neural networks and long-term memory networks, generating a preliminary scheduling scheme using genetic algorithms, and then optimizing the scheme through deep reinforcement learning, and finally adjusting the server power consumption allocation.
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 operational cost and environmental impact are reduced.
Smart Images

Figure CN119126961A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device and electronic device. Background Art
[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 of data centers has attracted widespread attention.
[0003] Among them, the main power consumption equipment in the data center includes servers. The power consumption management of servers is directly related to the operating cost and environmental benefits of the data center. Therefore, it is of great significance to manage the power consumption of servers.
[0004] Currently, the power consumption of the server can be manually adjusted through a pre-set scheduling plan, thereby achieving power consumption management of the server.
[0005] However, the scheduling scheme in the above method mainly relies on simple rule control and lacks global optimization capability, which makes it difficult for the server to achieve optimal power consumption configuration. Summary of the invention
[0006] The present application provides a data processing method, device and electronic device to solve the problem that the scheduling scheme lacks global optimization capability, making it difficult for the server to achieve optimal power consumption configuration. The specific implementation scheme is as follows:
[0007] In a first aspect, the present application provides a data processing method, the method comprising:
[0008] 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;
[0009] Processing the power consumption prediction result by a genetic algorithm GA to generate a preliminary scheduling plan for the server;
[0010] The preliminary scheduling scheme is optimized by deep reinforcement learning (DRL) to obtain a target scheduling scheme;
[0011] According to the target scheduling scheme, the power consumption allocation of the server is adjusted.
[0012] Through the above application embodiment, the power consumption prediction results of the server at multiple moments in the future predicted by the power consumption prediction model are processed according to GA, and a preliminary scheduling plan for the server is generated. Then, the preliminary scheduling plan is further optimized according to DRL to obtain a target scheduling plan, and then the power consumption allocation of the server is adjusted according to the target scheduling plan. Since both GA and DRL have global optimization capabilities, the target scheduling plan obtained is the optimal scheduling plan at the current moment, and then the power consumption allocation of the server is adjusted according to the optimal scheduling plan at the current moment, which can make the power consumption allocation of the server most reasonable and enable the server to achieve the optimal power consumption configuration.
[0013] In a possible implementation manner, before predicting the power consumption of the server by 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:
[0014] Collecting operation data of the server;
[0015] Preprocessing is performed on the operating data to obtain the 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.
[0016] Through the above application embodiment, the data to be processed is obtained, thereby providing data for the subsequent power consumption prediction of the server. In addition, by preprocessing the collected operation data of the server (including data cleaning, missing value processing and data normalization), the outliers and noise in the operation data are removed, the quality of the operation data is ensured, and the missing values in the operation data are processed to avoid the impact of the missing values on the subsequent prediction. At the same time, through data normalization, each data in the operation data is converted to a unified scale for subsequent processing, avoiding calculation errors caused by differences in data dimensions or orders of magnitude, so that the quality of the obtained data to be processed is better, which is conducive to improving the accuracy of power consumption prediction.
[0017] In a possible implementation, the power consumption prediction model includes a convolutional neural network (CNN) and a long short-term memory (LSTM) network. Then, the power consumption prediction model is used to predict the power consumption of the server to obtain power consumption prediction results of the server at multiple moments in the future, including:
[0018] Extracting local spatial features of the data to be processed from the server through the CNN to obtain a one-dimensional feature vector;
[0019] The LSTM is used to capture the temporal relationship in the one-dimensional feature vector, and obtain the power consumption prediction results of the server at multiple moments in the future.
[0020] Through the above-mentioned application embodiment, the local spatial features of the server's to-be-processed data are first extracted through the CNN in the power consumption prediction model to form a one-dimensional feature vector, and then the time series relationship in the one-dimensional feature vector is captured through the LSTM in the power consumption prediction model to obtain the power consumption prediction results of the server at multiple moments in the future. This takes into account both the local spatial features of the server's operating data and the time series dependency of the server's operating data, thereby greatly improving the accuracy of the server's power consumption prediction, thereby achieving accurate prediction of the server's power consumption and providing accurate power consumption prediction results for subsequent server power consumption scheduling.
[0021] In a possible implementation manner, the processing of the power consumption prediction result by a genetic algorithm GA to generate a preliminary scheduling plan for the server includes:
[0022] Generate an initial population according to the power consumption prediction result; wherein the initial population includes multiple scheduling schemes;
[0023] Calculating the fitness of each scheduling scheme in the initial population;
[0024] Selecting a plurality of first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population;
[0025] Performing a cross operation on a plurality of the first scheduling schemes to generate a plurality of second scheduling schemes;
[0026] Performing mutation operations on the plurality of the second scheduling schemes to generate a plurality of third scheduling schemes;
[0027] Replacing a plurality of scheduling schemes in the initial population with a plurality of the 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, multiple scheduling schemes in the new population are determined as the preliminary scheduling schemes.
[0030] Through the above-mentioned application embodiments, according to the selection operation, crossover operation, mutation operation, etc. of GA, the scheduling scheme can be flexibly iterated and optimized, and a preliminary scheduling scheme that can allocate power consumption to the server can be quickly and effectively generated, thereby achieving balanced distribution of server load and minimization of power consumption.
[0031] In a possible implementation, the optimizing the preliminary scheduling solution by deep reinforcement learning (DRL) to obtain a target scheduling solution includes:
[0032] Initializing the DRL according to the preliminary scheduling scheme;
[0033] Obtaining operation data of the server;
[0034] Constructing an experience replay pool, and storing the operating data in the experience replay pool;
[0035] Based on the experience replay pool, the preliminary scheduling solution is iteratively optimized to obtain the target scheduling solution.
[0036] Through the above-mentioned application embodiments, according to the initialization of DRL, a starting point is provided for the learning of the agent in DRL, so that the preliminary scheduling plan can be optimized. In addition, the experience generated by the subsequent iterative optimization process can be stored through the constructed experience replay pool, so as to improve the learning efficiency of DRL and enhance the stability and generalization ability of DRL. Based on the experience replay pool, the preliminary scheduling plan is iteratively optimized, so that the problems in the preliminary scheduling plan are continuously adjusted through iterative optimization, which is conducive to making the target scheduling plan the optimal scheduling plan at the current moment.
[0037] In a possible implementation, the iterative optimization of the preliminary scheduling solution based on the experience replay pool to obtain the target scheduling solution includes:
[0038] Update the policy network based on the latest data in the experience replay pool;
[0039] Selecting a scheduling action according to the updated policy network and executing the scheduling action;
[0040] According to the execution result of the scheduling action, the experience replay pool is updated, and according to the execution result of the scheduling action, the preliminary scheduling plan is adjusted to obtain a fourth scheduling plan;
[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 operation data of the server, storing the operation data in the experience replay pool, and re-adjusting the scheduling scheme;
[0042] If the DRL iteration termination condition is triggered, the fourth scheduling scheme is determined to be the target scheduling scheme.
[0043] Through the above-mentioned application embodiments, the preliminary scheduling plan is continuously iteratively optimized until the DRL iteration termination condition is triggered, so that DRL can learn the optimal scheduling plan in a dynamic environment, improve the overall performance of the system, and further optimize the preliminary scheduling plan by continuously iteratively optimizing the preliminary scheduling plan, making it more efficient in practical applications, and making the obtained target scheduling plan the optimal scheduling plan at the current moment.
[0044] In a possible implementation manner, after adjusting the power consumption distribution of the server, the method further includes:
[0045] Monitor the power consumption status of the server; and collect the latest operation data of the server; wherein the latest operation data is used for the next round of power consumption prediction and power consumption allocation of the server.
[0046] Through the above application embodiment, after adjusting the power consumption allocation of the server, the power consumption status of the server is monitored to timely discover the power consumption problem of the server or reach the threshold, so that the power consumption problem of the server or the power consumption threshold reached can be timely adjusted in time to avoid the adverse effects of the power consumption problem of the server or reaching the power consumption threshold on the data center. At the same time, the latest operation data of the server is collected so that the power consumption of the server can be predicted and allocated continuously through the latest operation data, thereby forming a closed loop of power consumption prediction and power consumption allocation of the server, so as to dynamically adjust the power consumption allocation of the server in real time, which is conducive to the server always maintaining the best power consumption state.
[0047] In a second aspect, the present application further provides a data processing device, the device comprising:
[0048] The power consumption prediction module is used to predict the power consumption of the server through the power consumption prediction model to obtain the power consumption prediction results of the server at multiple moments in the future;
[0049] A first optimization module, used for processing the power consumption prediction result by using a genetic algorithm GA to generate a preliminary scheduling plan for the server;
[0050] A second optimization module is used to optimize the preliminary scheduling plan through deep reinforcement learning (DRL) to obtain a target scheduling plan;
[0051] A processing module is used 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 used to collect operating data of the server; preprocess the operating data to obtain the 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.
[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 used to extract the local spatial features of the data to be processed of the server through the CNN to obtain a one-dimensional feature vector; and to capture the temporal relationship in the one-dimensional feature vector through the LSTM to obtain the power consumption prediction results of the server at multiple moments in the future.
[0054] In a possible implementation, the first optimization module is specifically used to generate an initial population according to the power consumption prediction result; wherein the initial population includes multiple scheduling schemes; calculate the fitness of each scheduling scheme in the initial population; select multiple first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population; perform crossover operations on the multiple first scheduling schemes to generate multiple second scheduling schemes; perform mutation operations 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 the 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; if the GA iteration termination condition is triggered, determine that the multiple scheduling schemes in the new population are the preliminary scheduling schemes.
[0055] In a possible implementation, the second optimization module is specifically used to initialize the DRL according to the preliminary scheduling plan; obtain the operating data of the server; build an experience replay pool and store the operating data in the experience replay pool; based on the experience replay pool, iteratively optimize the preliminary scheduling plan to obtain the target scheduling plan.
[0056] In a possible implementation, the second optimization module is specifically used to update the policy network according to the latest data in the experience replay pool; select a scheduling action according to the updated policy network, and execute the scheduling action; update the experience replay pool according to the execution result of the scheduling action, and adjust 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, 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 used to monitor the power consumption status of the server; and collect the latest operation data of the server; wherein the latest operation 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, including:
[0059] Memory, used to store 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 aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes 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 A schematic diagram of the GA optimization process provided in the embodiment of the present application;
[0066] Figure 4 A schematic diagram of the DRL optimization process provided in the embodiment of the present application;
[0067] Figure 5 A complete processing diagram of a data processing method provided in an embodiment of the present application;
[0068] Figure 6 A schematic diagram of a data processing device provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0071] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0072] Currently, the power consumption management method of the server manually adjusts the power consumption of the server through a pre-set scheduling scheme, which makes the scheduling scheme lack of global optimization, resulting in a single scheduling scheme and not the optimal scheduling scheme at the current moment, which makes it difficult for the server to allocate power consumption most appropriately when allocating power consumption according to the scheduling scheme.
[0073] Therefore, the present application proposes a data processing method, which first predicts the power consumption of the server's to-be-processed data through a power consumption prediction model to obtain the power consumption prediction results of the server at multiple moments in the future, and then processes the power consumption prediction results through a genetic algorithm (English: Genetic Algorithm, abbreviated as GA) to generate a preliminary scheduling plan, and then further optimizes the preliminary scheduling plan through deep reinforcement learning (English: Deep Reinforcement Learning, abbreviated as DRL) to obtain a target scheduling plan, so that the obtained target scheduling plan is the optimal scheduling plan at the current moment, and then according to the target scheduling plan, the power consumption allocation of the server can be adjusted to achieve the optimal power consumption configuration of the server.
[0074] Reference Figure 1The figure is a flow chart of a data processing method provided by an embodiment of the present application, the method comprising:
[0075] S101, predicting the power consumption of a server using a power consumption prediction model, and obtaining power consumption prediction results of the server at multiple moments in the future.
[0076] Before predicting the power consumption of the server according to the power consumption prediction model, firstly obtain the to-be-processed data of the server, so as to predict the power consumption of the server based on the to-be-processed data of the server. The to-be-processed data is the data obtained after preprocessing the running data of the server.
[0077] Specifically, the server's operating data is first collected, which may include central processing unit (CPU) usage, memory usage, network traffic, disk input / output (I / O), device temperature, fan speed, current and voltage, historical power consumption, etc.
[0078] In the embodiment of the present application, the operation data of the server can be collected in real time through sensors and monitoring software. The operation data of the server can be collected through an intelligent platform management interface (English: Intelligent Platform Management Interface, abbreviated as IPMI) interface.
[0079] The specific hierarchical structure of the above IPMI interface can be as follows Figure 2 As shown in the figure, the hierarchical structure is divided into three levels, namely, the application layer (APP), the operating system layer (English: Operating System, abbreviated as OS), and the 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 status information, such as device temperature, fan speed, voltage, etc. Therefore, according to the commands sent by the ipmitool, data such as device temperature in the server's operating data can be obtained.
[0081] In the operating system layer (OS), the IPMI interface is responsible for managing requests from the application layer (such as commands sent by ipmitool in the application layer) and passing the request to the BMC in the hardware layer. The IPMI interface in the operating system layer provides a standardized command and response mechanism, which enables the application layer to interact with the BMC more conveniently.
[0082] The BMC in the hardware layer is a dedicated controller that can be used to monitor the status of server hardware. The BMC can directly access the hardware components of various sensors, collect real-time operation data of the server, and provide the collected data to the operating system layer and application layer through the IPMI interface.
[0083] The BMC reads device status information (such as device temperature, fan speed, current and voltage) in real time through sensors and stores the device status information in shared memory. The BMC can receive commands from the operating system and application layer to control and manage the hardware status, such as adjusting fan speed and setting voltage. Therefore, the data obtained by the BMC can be used to determine the hardware health and operating status of the server, thereby providing data support for the power consumption prediction of the server.
[0084] Furthermore, through the above structure, the collection of the operation data of the server can be realized.
[0085] After collecting the operation data of the server, the operation data is preprocessed to obtain the data to be processed, thereby achieving the acquisition of the data to be processed and making the quality of the obtained data to be processed better, which is conducive to improving the accuracy of subsequent power consumption prediction of the operation data. The data to be processed can be multi-dimensional time series data.
[0086] In the embodiment 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 operation data, thereby ensuring the quality of the operation data. The missing value processing is used to fill or remove missing values in the operation data, avoiding the impact of missing values on subsequent predictions. The data normalization is used to convert each data in the operation data to a unified scale, which is convenient for subsequent processing and avoids calculation errors caused by differences in data dimensions or orders of magnitude.
[0087] In the embodiments of the present application, the above-mentioned data cleaning, missing value processing, and data normalization may be conventional processing methods in the prior art and will not be described in detail here.
[0088] Furthermore, after the data to be processed is obtained, the data to be processed is input into a power consumption prediction model, so that the power consumption of the server can be predicted by the power consumption prediction model to obtain power consumption prediction results of the server at multiple moments in the future.
[0089] In the embodiment of the present application, the power consumption prediction result may include the CPU usage, memory usage, network traffic, temperature, etc. of the server. Therefore, the power consumption of the server at multiple moments in the future can be determined based on the CPU usage, memory usage, network traffic, temperature, etc. at multiple moments in the future, such as determining how much power the server needs to use.
[0090] The power consumption prediction model may include a convolutional neural network (CNN) and a long short-term memory network (LSTM).
[0091] Then, the power consumption prediction model is used to predict the power consumption of the data to be processed, and the power consumption prediction results of the server at multiple moments in the future can be specifically:
[0092] First, the data to be processed is input into CNN. CNN processes the data to be processed through convolution layer, activation function and pooling layer to extract the local spatial features of the data to be processed and obtain a multi-dimensional feature map; and the multi-dimensional feature map is flattened to form a one-dimensional feature vector. Therefore, CNN can extract local spatial features from the data to be processed to form a one-dimensional feature vector.
[0093] Then, the one-dimensional feature vector is input into LSTM. LSTM captures the temporal relationship between the data in the one-dimensional feature vector and obtains the power consumption prediction results of the server at multiple moments in the future.
[0094] Through the above method, the power consumption prediction of the server is realized according to the power consumption prediction model of CNN and LSTM, and the power consumption prediction results of the server at multiple moments in the future are highly accurate, which is conducive to improving the efficiency and accuracy of the subsequent scheduling scheme based on the power consumption prediction results. In addition, compared with the prior art that performs simple statistical analysis based on historical power consumption data to predict the power consumption of the server at multiple moments in the future, the power consumption prediction model of the present application uses CPU usage, memory usage and other data in addition to power consumption data, so that the power consumption of the server can be predicted from multiple dimensions, which greatly improves the accuracy of power consumption prediction.
[0095] However, it should be noted that before the power consumption prediction model (i.e., CNN-LSTM) is used to process the processed data and obtain the power consumption prediction results of the server at multiple moments in the future, the power consumption prediction model must first be trained to make the various parameters in the power consumption prediction model optimal parameters, thereby obtaining the optimal power consumption prediction model, and then the optimal power consumption prediction model is used to process the processed data to obtain the power consumption prediction results of the server at multiple moments in the future, thereby further improving the accuracy of the power consumption prediction model in predicting the power consumption of the server, making the power consumption prediction results the most accurate.
[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 meet the training termination condition of the power consumption prediction model, the parameters of the CNN and LSTM are adjusted, and the training data after data preprocessing continues to be input into the power consumption prediction model with adjusted parameters until the training termination condition of the power consumption prediction model is met, so that the power consumption prediction model finally obtained is the optimal power consumption prediction model.
[0097] In an embodiment of the present application, the above-mentioned training termination condition may be that the accuracy of the power consumption training result is greater than the accuracy threshold, or that the error of the power consumption training result is less than the error threshold, but is not limited to this, 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, so as to achieve accurate prediction of server power consumption. However, the power consumption prediction model is not limited to this and can be adjusted according to specific application scenarios.
[0099] S102, processing the power consumption prediction result through GA to generate a preliminary scheduling plan for the server.
[0100] In step S101, the power consumption of the server is predicted by using the power consumption prediction model, and after obtaining the power consumption prediction results of the server at multiple moments in the future, a preliminary scheduling plan of the server is generated by using GA based on the power consumption prediction results.
[0101] The above preliminary scheduling scheme can reasonably allocate the power consumption of each node in the server according to the power consumption prediction result.
[0102] GA is a search algorithm that simulates natural selection and genetic mechanisms. Its basic idea is to iteratively optimize the scheduling plan by simulating the evolutionary process in nature. The GA can process the power consumption prediction results through selection operations, crossover operations, and mutation operations, iteratively optimize the scheduling plan, and determine the preliminary scheduling plan, so as to achieve balanced distribution of server loads and minimize 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 shown are as follows:
[0104] S301, generating an initial population according to 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 power consumption prediction results. An initial population including multiple scheduling schemes can be randomly generated through a population initialization operation based on multiple power consumption prediction results, thereby providing an initial solution set for GA, i.e., an initial search space.
[0107] S302, calculating 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 the fitness function. The fitness function can be defined according to the goal (such as minimizing power consumption, balancing load), and can be adjusted according to the specific application scenario.
[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 to say, according to the fitness, among the multiple scheduling schemes of the initial population, some excellent scheduling schemes (i.e., some excellent individuals) are selected as parents (i.e., the first scheduling scheme). In the embodiment of the present application, the number of the first scheduling schemes can be determined according to the specific application scenario. That is, the number of parents (or the number of excellent individuals) can be determined according to the specific application scenario.
[0112] According to the fitness of each scheduling scheme in the initial population, multiple first scheduling schemes are selected from the initial population, which can be selected by roulette 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 a fitness greater than the first threshold in the initial population can be used as the first scheduling scheme (that is, the individuals with a fitness greater than the first threshold are used as parents), and the scheduling scheme with a fitness less than the second threshold is also used as the first scheduling scheme.
[0114] That is to say, in the initial population, the scheduling schemes with high fitness are retained, while some scheduling schemes with low fitness are retained to maintain the diversity of the population, which helps to improve the global search ability of GA and avoid falling into the local optimal solution. At the same time, it promotes the adaptability of GA and the stability of the ecosystem, thereby improving the performance and effect of GA.
[0115] The first threshold and the second threshold may be the same or different and may be adjusted according to specific application scenarios.
[0116] S304: Perform a cross operation on the multiple first scheduling schemes to generate multiple second scheduling schemes.
[0117] The above crossover operation simulates the genetic recombination of organisms and combines some genes of the parent generation (i.e., the first scheduling solution) into the offspring generation (i.e., the second scheduling solution). Therefore, the crossover operation is performed on the parent generation to generate offspring (i.e., the second scheduling solution), thereby generating offspring individuals with better fitness, thereby promoting the evolution of the population towards a better solution.
[0118] In the embodiment of the present application, the above-mentioned 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: Perform mutation operations on the multiple second scheduling schemes to generate multiple third scheduling schemes.
[0120] The above mutation operation can be achieved by randomly changing some genes of the offspring (i.e., the second scheduling scheme) to generate new offspring (i.e., the third scheduling scheme), which is conducive to increasing the diversity of the population and thus preventing GA from falling into a local optimal solution.
[0121] However, in order to ensure the stability of the GA solution, the mutation probability of the offspring is small.
[0122] S306: Replace the multiple scheduling schemes in the initial population with multiple third scheduling schemes to obtain a new population.
[0123] Among them, the new population includes multiple third scheduling schemes.
[0124] S307, determining whether the GA iteration termination condition is triggered.
[0125] In the embodiment of the present application, the GA iteration termination condition may be that the number of GA iterations is greater than or equal to the GA iteration number threshold, or that the increase in fitness is less than the third threshold, but is not limited thereto. The GA iteration termination condition may be adjusted according to specific application scenarios.
[0126] If the GA iteration termination condition is not triggered, step S308 is executed.
[0127] If the GA iteration termination condition is triggered, step S309 is executed.
[0128] S308, replacing the initial population with the new population.
[0129] When the initial population is replaced with a new population, the above steps S302-S307 are continued to be polled based on the replaced initial population. That is to say, based on the multiple scheduling schemes in the replaced initial population, fitness calculation operations, selection operations, crossover operations, mutation operations, and replacement operations are continued to be performed to obtain a new population, thereby realizing iterative optimization of the scheduling scheme, so that the scheduling scheme in the final population is the optimal scheduling scheme at the current moment, until the GA iteration termination condition is triggered.
[0130] S309, determining multiple scheduling schemes in the new population as preliminary scheduling schemes.
[0131] After the GA iteration termination condition is triggered, the execution of steps S301 to S308 is terminated, and the multiple scheduling schemes in the new population are determined to be preliminary scheduling schemes.
[0132] Thus, according to the above steps S301-S309, the preliminary iterative optimization of the scheduling plan is achieved and a preliminary scheduling plan is generated.
[0133] S103, optimizing the preliminary scheduling plan through DRL to obtain a target scheduling plan.
[0134] In step S103, GA is used to process the power consumption prediction result to generate a preliminary scheduling plan, and then the preliminary scheduling plan is optimized through DRL to obtain a target scheduling plan.
[0135] In the embodiment 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 methods such as policy gradient method and asynchronous advantage action evaluation algorithm (English: Asynchronous Advantage Actor-Critic, abbreviated as A3C), which can be adjusted according to specific application scenarios.
[0136] The specific optimization process of optimizing the preliminary scheduling scheme through DRL to obtain the target scheduling scheme can be shown as follows:
[0137] First, initialize DRL according to the preliminary scheduling plan. Then obtain the operation data of the server. Next, build an experience replay pool and store the operation data in the experience replay pool. Then, based on the experience replay pool, iteratively optimize the preliminary scheduling plan to obtain the target scheduling plan.
[0138] The initialization of the DRL may include an environment definition, which includes defining a state space, an action space, and a reward function.
[0139] The state space may include the current state of the server (such as CPU usage, memory usage, etc.); the action space may include scheduling operations in the preliminary scheduling plan (such as task allocation, resource adjustment, etc.).
[0140] The above reward function can be designed according to the objectives (such as reducing power consumption and improving performance), and the reward function is usually designed by combining immediate rewards with long-term rewards.
[0141] The collected operation data can be used to train and optimize the behavior of the agent in the DRL. The operation data can be obtained in the same way as the operation data of the server in step S101; and after the operation data is collected, it can be preprocessed in the same way as in step S101, which will not be repeated here.
[0142] The above experience replay pool can be used to store the experience data (such as state, action, reward, next state) generated during the training process. 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] In addition, the collected operation data is also stored in the experience replay pool to facilitate data acquisition during the training process.
[0144] In the embodiment of the present application, the specific iterative optimization process of iteratively optimizing the preliminary scheduling scheme based on the experience replay pool to obtain the target scheduling scheme can be as follows: Figure 4 As shown:
[0145] S401, update the policy network based on the data in the latest experience replay pool.
[0146] In the embodiment of the present application, the parameters of the policy network can be updated by the gradient descent method, thereby achieving the update of the policy network.
[0147] The policy network may be a deep neural network (DNN), but is not limited thereto. The policy network may be used to predict the scheduling action to be taken under a given state.
[0148] In the embodiment of the present application, in the process of updating the policy network according to the data in the latest experience replay pool, the training can be performed by randomly extracting data from the experience replay pool, which breaks the correlation between the data and helps to improve the stability of the training.
[0149] S402: Select a scheduling action according to the updated policy network, and execute the scheduling action.
[0150] Specifically, the current state of the data extracted from the experience replay pool is input into the updated policy network (such as DNN), and the probability of each scheduling action is obtained according to the output of the policy network. Then, according to the probability of each scheduling action output by the policy network, the scheduling action is selected and executed, thereby completing the policy optimization operation.
[0151] The above-mentioned scheduling action may represent the use of a function in the scheduling scheme. When the first polling step S402 is performed, the selected scheduling action may be the scheduling action in the preliminary scheduling scheme generated by GA. When the polling step S402 is not performed for the first time, the selected scheduling action may be the scheduling action in the scheduling scheme obtained by adjusting the preliminary scheduling scheme through steps S401-S405.
[0152] S403: Update the experience replay pool according to the execution result of the scheduling action, and adjust the preliminary scheduling plan to obtain a fourth scheduling plan.
[0153] Specifically, firstly, a reward is obtained according to the execution result of the scheduling action, and then the reward, the current state of the server and the scheduling are stored in the experience replay pool, thereby updating the experience replay pool, that is, completing the experience replay operation.
[0154] At the same time, according to the execution result of the scheduling action, the preliminary scheduling plan is adjusted to optimize the problems existing in the preliminary scheduling plan, thereby obtaining an adjusted fourth scheduling plan.
[0155] In the embodiment of the present application, the preliminary scheduling scheme is adjusted according to the execution result of the scheduling action, and can be adjusted in the following ways:
[0156] Keep the parameters that meet expectations in the preliminary scheduling plan (i.e., reward the good parts of the preliminary scheduling plan), delete the parameters that do not meet expectations in the preliminary scheduling plan (i.e., punish the bad parts of the preliminary scheduling plan), or modify the parameters that do not meet expectations in the preliminary scheduling plan (i.e., punish the bad parts of the preliminary scheduling plan), but not limited to this.
[0157] After the experience replay pool is updated and the preliminary scheduling plan is adjusted according to the execution result of the scheduling action to obtain the fourth scheduling plan, step S404 is executed.
[0158] S404: Determine whether a DRL iteration termination condition is triggered.
[0159] In the embodiment of the present application, the DRL iteration termination condition may be that the number of DRL iterations reaches a DRL iteration number threshold, but is not limited thereto. The DRL iteration termination condition may be adjusted according to specific application scenarios.
[0160] If the DRL iteration termination condition is not triggered, step S405 is executed.
[0161] If the DRL iteration termination condition is triggered, step S406 is executed.
[0162] S405: According to the fourth scheduling scheme, the power consumption distribution of the server is adjusted, and the latest operation 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 plan, and then the latest operating data of the server is collected and stored in the experience replay pool, and then based on the latest experience replay pool, the aforementioned steps S401-S405 are re-executed to readjust the scheduling plan until the DRL iteration termination condition is triggered, so that the problems existing in the preliminary scheduling plan can be continuously optimized to reduce the problems existing in the scheduling plan, so that the optimized scheduling plan is more in line with the needs of the current scenario.
[0164] S406: Determine the fourth scheduling scheme as the target scheduling scheme.
[0165] Through the above steps S401-S406, iterative optimization of the preliminary scheduling plan is achieved, and the problems existing in the preliminary scheduling plan are continuously optimized according to real-time data, so that the final target scheduling plan is the optimal scheduling plan at the current moment, and the method can adapt to a dynamically changing environment, which is beneficial to improving the power consumption scheduling effect of the server.
[0166] S104: Adjust the power consumption allocation of the server according to the target scheduling plan.
[0167] In step S103, the preliminary scheduling plan is further optimized using DRL. After obtaining the target scheduling plan, the power consumption distribution (such as working status) of the server is adjusted according to the target scheduling plan, including starting or shutting down the server, adjusting the load distribution, etc., to achieve real-time response and resource optimization, and 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 status 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 plan, the power consumption usage of the server is monitored in real time. When the power consumption of the server is capped (that is, the power consumption reaches the maximum value), the power consumption can be reduced by adjusting the rotation speed through heat dissipation, or the CPU can be downgraded to reduce power consumption without affecting business operations. Then read the latest operating data of the server through the sensor, and then continue to predict the next round of power consumption of the server through the above steps S101-S104 based on the latest operating data, and continue to use GA and DRL to optimize the scheduling plan based on the next round of power consumption prediction results, so as to continuously dynamically adjust the power consumption allocation of the server to make the power consumption allocation of the server more reasonable.
[0170] In summary, the data processing method proposed in this application predicts the power consumption of the preprocessed server operation data based on the power consumption prediction model of CNN and LSTM, and obtains the power consumption prediction results of the server at multiple moments in the future. GA is then used to process the power consumption prediction results to obtain a preliminary scheduling plan, and then the preliminary scheduling plan is further optimized using DRL to obtain a target scheduling plan. Through the target scheduling plan, power consumption is allocated to the server, and intelligent dynamic scheduling of the server is realized, which effectively improves the energy utilization efficiency and system performance of the data center, reduces operating costs, and ensures service quality.
[0171] Moreover, the data processing method proposed in this 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. It is suitable for a variety of application scenarios, optimizes the overall performance, and has significant application value and economic benefits.
[0172] In addition, the data processing method proposed in this application, through the power consumption prediction model, GA and DRL, continuously optimizes the power consumption prediction and scheduling scheme according to real-time data, so as to meet the real-time scheduling requirements and effectively handle the dynamic changes of the environment and load.
[0173] Combine the following Figure 5, a complete and detailed explanation of the data processing method provided in the embodiments of the present application is given.
[0174] First, the server's operating data (such as CPU usage, memory adaptation rate, device temperature, fan speed, etc.) is collected through the IPMI interface or Simple Network Management Protocol (English: Simple Network Management Protocol, abbreviated as SNMP), and the operating data is transmitted to the data preprocessing module.
[0175] In the data preprocessing module, data cleaning, missing value processing, data normalization and other preprocessing operations are performed on the received operating data to obtain the data to be processed, which is then input into the power consumption prediction model.
[0176] In the power consumption prediction model, the received data to be processed is first input into CNN. The local spatial features of the data to be processed are extracted through the convolution layer, activation function and pooling layer in CNN, and then the extracted local spatial features are flattened to form a one-dimensional feature vector. Then, the one-dimensional feature vector is output to LSTM. LSTM captures the temporal relationship between the data in the one-dimensional feature vector and generates power consumption prediction results for multiple moments in the future. The power consumption prediction results are then 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, it is necessary to train the CNN-LSTM with 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 continued to be input into the CNN-LSTM with adjusted parameters until the training termination condition of the power consumption prediction model is met, so that the CNN-LSTM that finally predicts 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 results are first processed by GA to generate a preliminary scheduling plan.
[0179] Specifically, first, based on the power consumption prediction results, an initial population including multiple scheduling schemes is generated. Secondly, the fitness of each scheduling scheme in the initial population is calculated. Then, based on the fitness, multiple first scheduling schemes are selected from the initial population. Next, a crossover operation is performed on the multiple first scheduling schemes to generate multiple second scheduling schemes. Then, a mutation operation is performed on the multiple second scheduling schemes to generate multiple third scheduling schemes. Then, the multiple scheduling schemes in the initial population are replaced with multiple third scheduling schemes to obtain a new population, thereby realizing the update of the population. If the GA iteration termination condition is not triggered, the initial population is replaced with the new population, so as to continue to poll the above scheduling scheme optimization operations (i.e., calculate fitness, select operations, crossover operations, mutation operations, and population updates) based on the replaced initial population until the GA iteration termination condition is triggered, and the multiple scheduling schemes in the new population finally obtained are used as preliminary scheduling schemes.
[0180] The preliminary scheduling plan is then transmitted to the DRL optimization module in the scheduling algorithm module.
[0181] In the DRL optimization module in the scheduling algorithm module, the preliminary scheduling plan is further optimized through DRL to obtain the target scheduling plan.
[0182] Specifically, first, initialize DRL according to the preliminary scheduling plan. Then, collect the operating data of the server. Then build an experience replay pool, and store the operating data of the server in the experience replay pool. Then, update the policy network according to the data in the experience replay pool. Then, according to the updated policy network, select the scheduling action and execute the scheduling action. Then, according to the execution result of the scheduling action, update the experience replay pool, adjust the preliminary scheduling plan, and obtain the fourth scheduling plan. If the DRL iteration termination condition is not triggered, adjust the power consumption distribution of the server according to the fourth scheduling plan, collect the latest operating data of the server, and store the latest operating data in the experience replay pool, and then continue to poll the optimization steps of the above scheduling plan based on the latest experience replay pool until the DRL iteration termination condition is triggered, and use the final scheduling plan as the target scheduling plan.
[0183] The target scheduling plan is then transmitted to the BMC real-time monitoring module.
[0184] In the BMC real-time monitoring module, the power consumption allocation of the server is first adjusted according to the received target scheduling plan. Then, the BMC real-time monitoring module monitors the power consumption status of the server in real time. If it is determined that the power consumption of the server has reached the maximum value (i.e., the power consumption is capped), the power consumption is reduced by adjusting the speed of the heat dissipation condition, or the CPU is down-clocked without affecting the business operation, thereby reducing the power consumption; and the latest operation data of the server is read through the sensor. Then, the latest operation data of the server is collected through the IMPI interface or SNMP, and transmitted to the data preprocessing module, so as to perform the next round of power consumption prediction and power consumption scheduling based on the latest operation data.
[0185] Based on the same inventive concept, the present application also provides a data processing device, such as Figure 6 The figure is a schematic diagram of the structure of a data processing device provided by the present application, the device comprising:
[0186] The power consumption prediction module 601 is used to predict the power consumption of the server through the power consumption prediction model, and obtain the power consumption prediction results of the server at multiple moments in the future;
[0187] A first optimization module 602 is used to process the power consumption prediction result by using a genetic algorithm GA to generate a preliminary scheduling plan for the server;
[0188] The second optimization module 603 is used to optimize the preliminary scheduling solution through deep reinforcement learning (DRL) to obtain a target scheduling solution;
[0189] The processing module 604 is used 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 used to collect the operating data of the server; preprocess the operating data to obtain the 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.
[0191] 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 601 is specifically used to extract the local spatial features of the data to be processed of the server through the CNN to obtain a one-dimensional feature vector; and to capture the temporal relationship in the one-dimensional feature vector through the LSTM to obtain the power consumption prediction results of the server at multiple moments in the future.
[0192] In one possible implementation, the first optimization module 602 is specifically used to generate an initial population based on the power consumption prediction result; wherein the initial population includes multiple scheduling schemes; calculate the fitness of each scheduling scheme in the initial population; select multiple first scheduling schemes from the initial population according to the fitness corresponding to each scheduling scheme in the initial population; perform crossover operations on the multiple first scheduling schemes to generate multiple second scheduling schemes; perform mutation operations 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 the 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; if the GA iteration termination condition is triggered, determine that the multiple scheduling schemes in the new population are the preliminary scheduling schemes.
[0193] In one possible implementation, the second optimization module 603 is specifically used to initialize the DRL according to the preliminary scheduling plan; obtain the operating data of the server; build an experience replay pool and store the operating data in the experience replay pool; and iteratively optimize the preliminary scheduling plan based on the experience replay pool to obtain the target scheduling plan.
[0194] In one possible implementation, the second optimization module 603 is specifically used to update the policy network according to the latest data in the experience replay pool; select a scheduling action according to the updated policy network, and execute the scheduling action; update the experience replay pool according to the execution result of the scheduling action, and adjust 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, 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.
[0195] In a possible implementation, the processing module 604 is specifically used to monitor the power consumption status of the server; and collect the latest operation data of the server; wherein the latest operation data is used for the next round of power consumption prediction and power consumption allocation of the server.
[0196] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application. The electronic device can realize the functions of the aforementioned data processing device. Figure 7 , the electronic equipment includes:
[0197] At least one processor 701, and a memory 702 connected to the at least one processor 701. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present application. Figure 7 In the example, the processor 701 and the memory 702 are connected via a bus 700. Figure 7 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 701 can also be called a controller, and there is no limitation on the name.
[0198] In the embodiment of the present application, the memory 702 stores instructions that can be executed by 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 implement Figure 6 The functions of each module in the device shown.
[0199] Among them, the processor 701 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, the various functions of the device and process data, the device can be monitored as a whole.
[0200] In one possible design, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0201] 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 implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the data processing method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or can be executed by a combination of hardware and software modules in the processor.
[0202] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, abbreviated as RAM), a static random access memory (English: Static Random Access Memory, abbreviated as SRAM), a programmable read-only memory (English: Programmable Read Only Memory, abbreviated as PROM), a read-only memory (English: Read Only Memory, abbreviated as ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0203] By designing and programming the processor 701, the code corresponding to the data processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the data processing method when it is running. Figure 1 The steps of the data processing method of the embodiment shown are as follows: How to design and program the processor 701 is a technology well known to those skilled in the art and will not be described in detail here.
[0204] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the data processing method discussed above.
[0205] In some possible implementations, various aspects of the data processing method provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the data processing method according to various exemplary implementations of the present application described above in this specification.
[0206] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0207] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0208] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0210] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method, It is 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; The preliminary scheduling scheme is optimized by deep reinforcement learning (DRL) to obtain a target scheduling scheme; According to the target scheduling scheme, the power consumption allocation of the server is adjusted.
2. The method according to claim 1, It is characterized in that Before predicting the power consumption of the server by using the power consumption prediction model to obtain the 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 the 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, It is characterized in that 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 to obtain power consumption prediction results of the server at multiple moments in the future, including: Extracting local spatial features of the data to be processed from 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, and obtain the power consumption prediction results of the server at multiple moments in the future.
4. The method according to claim 1, It is characterized in that The step of processing the power consumption prediction result by a genetic algorithm GA to generate a preliminary scheduling plan for the server includes: Generate 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 a 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 a plurality of scheduling schemes in the initial population with a plurality of the 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 as the preliminary scheduling schemes.
5. The method according to claim 1, It is characterized in that The method of optimizing the preliminary scheduling scheme by deep reinforcement learning (DRL) to obtain a target scheduling scheme includes: Initializing the DRL according to the preliminary scheduling scheme; Obtaining operation data of the server; Constructing an experience replay pool, and storing the operating data in the experience replay pool; Based on the experience replay pool, the preliminary scheduling solution is iteratively optimized to obtain the target scheduling solution.
6. The method according to claim 5, It is characterized in that The iterative optimization of the preliminary scheduling solution based on the experience replay pool to obtain the target scheduling solution includes: Update the policy network based on the latest data in the experience replay pool; Selecting a scheduling action according to the updated policy network and executing the scheduling action; According to the execution result of the scheduling action, the experience replay pool is updated, and according to the execution result of the scheduling action, the preliminary scheduling plan is adjusted 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 operation data of the server, storing the operation data in the experience replay pool, and re-adjusting the scheduling scheme; If the DRL iteration termination condition is triggered, the fourth scheduling scheme is determined to be the target scheduling scheme.
7. The method according to claim 1, It is characterized in that 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 operation data of the server; wherein the latest operation data is used for the next round of power consumption prediction and power consumption allocation of the server.
8. A data processing device, It is characterized in that include: The power consumption prediction module is used to predict the power consumption of the server through 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, used for processing 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 used to optimize the preliminary scheduling plan through deep reinforcement learning (DRL) to obtain a target scheduling plan; A processing module is used to adjust the power consumption allocation of the server according to the target scheduling scheme.
9. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, It is 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 described in any one of claims 1 to 7 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
System and method for optimizing energy consumption by processors
EP3089034A1
Multi-chiller scheduling using reinforcement learning with transfer learning for power consumption prediction
US20210303998A1
Cited By
Distributed heterogeneous task scheduling method and system based on evolutionary algorithm
CN119987975A
Server power consumption optimization method and system, electronic equipment and storage medium
CN120492092A
Method and system for optimizing server power consumption, electronic device, and storage medium
CN120492092B
Energy consumption optimization method of server, electronic equipment, storage medium and program product
CN120743718A
Spatial heterogeneous computing resource scheduling method and device based on dynamic power consumption budget, terminal, medium and product
CN121029380A
