Software operation energy consumption prediction method and device, electronic equipment and storage medium

By extracting and combining software configuration parameters, cluster operation operating parameters and operating operating time, and using deep learning models for energy consumption prediction, solving the problem of not high energy consumption prediction accuracy in existing technologies, realizing more High energy consumption certainty and accuracy.

CN119377040APending Publication Date: 2025-01-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411390485.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art has low accuracy in predicting the energy consumption of software operations, resulting in indirect and inaccurate problems in energy consumption monitoring and task allocation.

Method used

By obtaining the software configuration parameters of the target software, the operation parameters of cluster operation, and the total time of operation operation, the feature extraction and combination are performed, the input features are generated, and the energy consumption of deep learning model is used for energy consumption prediction. This model is based on a large number of testing data training, which can more accurately capture the inherent connection between software configuration, cluster operation parameters and operating operation time and energy consumption.

Benefits of technology

Improve the certainty and accuracy of software operation energy consumption, and continuously optimize the results of energy consumption prediction through training and updating of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377040A_ABST
    Figure CN119377040A_ABST
Patent Text Reader

Abstract

The invention provides a software operation energy consumption prediction method and device, electronic equipment and a storage medium. The method comprises the steps that software configuration parameters of target software, cluster operation parameters of a computing cluster for operating the target software and total operation time of the computing cluster for operating the target software are acquired; performing feature extraction on the software configuration parameters, the cluster job operation parameters and the total job operation time, and combining the extracted features to generate input features; and inputting the input features into the energy consumption prediction deep learning model to obtain operation energy consumption data output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model learns complex feature representation and mapping relations through a large amount of training data, so that internal relations between factors such as software configuration, cluster job operation parameters and job operation time and energy consumption can be more accurately captured, and the accuracy of determining the software job energy consumption is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for predicting energy consumption of software operations. Background Art

[0002] As the scale of high-performance computing clusters increases, the scale of problems solved by high-performance computing application software also increases, and the resulting energy consumption problem becomes increasingly prominent. It is necessary to study and predict the energy consumption of different application software in different fields when they are running.

[0003] In existing methods, the energy consumption of software jobs is generally determined indirectly by predicting the power consumption of a single server based on parameters such as CPU utilization and memory bandwidth, and monitoring the power consumption of clusters and allocating tasks. The indirect determination method results in low accuracy in determining the energy consumption of software jobs. Summary of the invention

[0004] The present invention provides a software operation energy consumption prediction method, device, electronic equipment and storage medium, which are used to improve the accuracy of determining software operation energy consumption.

[0005] The present invention provides a method for predicting software operation energy consumption, comprising the following steps: Acquire software configuration parameters of the target software, cluster job running parameters of a computing cluster running the target software, and a total job running time of the computing cluster running the target software; Extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time respectively, and combining the extracted features to generate input features; The input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software and the job energy consumption data of the test software.

[0006] According to a method for predicting software job energy consumption provided by the present invention, after obtaining the job energy consumption data of the target software output by the energy consumption prediction deep learning model, the method further includes: Determining feedback information on the operation energy consumption data of the target software; Based on the operation energy consumption data of the target software and its corresponding feedback information, the model parameters of the energy consumption prediction deep learning model are updated.

[0007] According to a software job energy consumption prediction method provided by the present invention, the updating of the model parameters of the energy consumption prediction deep learning model based on the job energy consumption data of the target software and its corresponding feedback information includes: Based on the target software's job energy consumption data and its corresponding feedback information, generate positive and negative samples of the energy consumption prediction deep learning model; Based on contrastive learning, the energy consumption prediction deep learning model is trained according to the positive and negative samples to update model parameters of the energy consumption prediction deep learning model.

[0008] According to a method for predicting software job energy consumption provided by the present invention, the step of combining the extracted features to generate input features includes: The extracted features are weighted based on a predetermined weight coefficient, and feature crossover is performed on the weighted features to obtain the input features.

[0009] According to a software job energy consumption prediction method provided by the present invention, obtaining the total job running time of the computing cluster running the target software includes: Extracting features from the software configuration parameters and the cluster job operation parameters respectively, weighting the extracted features based on a predetermined weight coefficient, and performing feature crossover on the weighted features to obtain performance combination features; Inputting the performance combination feature into a job running time prediction model to obtain a total job running time of the computing cluster running the target software output by the job running time prediction model; The training process of the job running time prediction model includes: Obtaining software configuration parameters of the test software in the test software set and cluster job running parameters of the computing cluster running the test software; Extracting features of the software configuration parameters of the test software and the cluster job running parameters, and combining the extracted features to obtain test software combination features; Based on the test software combination characteristics and the software running time of the test software, the initial job running time prediction model is trained to obtain the job running time prediction model.

[0010] According to a method for predicting software job energy consumption provided by the present invention, after obtaining the job energy consumption data of the target software output by the energy consumption prediction deep learning model, the method further includes: Determining the energy consumption ratio of the target software based on the job energy consumption data of the target software and the total job running time of the target software; Based on the energy consumption ratio of the target software, the running process of the target software is adjusted.

[0011] According to a software job energy consumption prediction method provided by the present invention, the energy consumption ratio of the target software is: ; Wherein, R is the energy consumption ratio of the target software, E is the job energy consumption data of the target software, and T is the total job running time of the target software.

[0012] The present invention also provides a software operation energy consumption prediction device, comprising the following modules: A parameter acquisition module, used to acquire software configuration parameters of the target software, cluster job running parameters of the computing cluster running the target software, and the total job running time of the computing cluster running the target software; A feature generation module, used to extract features from the software configuration parameters, the cluster job running parameters and the total job running time, and combine the extracted features to generate input features; A prediction module is used to input the input features into an energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software, and the job energy consumption data of the test software.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the software job energy consumption prediction methods described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the software job energy consumption prediction method described in any one of the above is implemented.

[0015] The software job energy consumption prediction method, device, electronic device and storage medium provided by the present invention obtain the software configuration parameters of the target software, the cluster job operation parameters and the total operation time of the target software to determine the input features, and predict the input features based on the pre-trained energy consumption prediction deep learning model, so as to realize the accurate determination process of the target software's job energy consumption data. The energy consumption prediction deep learning model learns complex feature representations and mapping relationships through a large amount of training data, so it can more accurately capture the inherent relationship between factors such as software configuration, cluster job operation parameters and job operation time and energy consumption, and improve the accuracy of software job energy consumption determination. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of the software operation energy consumption prediction method provided by the present invention.

[0018] Figure 2 It is a schematic diagram of the prediction process of the energy consumption prediction deep learning model provided by the present invention.

[0019] Figure 3 It is a schematic diagram of the job judgment execution flow provided by the present invention.

[0020] Figure 4 The present invention provides a schematic diagram of a process for predicting job energy consumption based on the predicted total job running time.

[0021] Figure 5 It is a structural schematic diagram of the software operation energy consumption prediction device provided by the present invention.

[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The present invention provides a method for predicting energy consumption of software operations. Figure 1 is a flow chart of the software operation energy consumption prediction method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 110, obtaining software configuration parameters of the target software, cluster job running parameters of the computing cluster running the target software, and the total job running time of the computing cluster running the target software; Step 120, extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time, respectively, and combining the extracted features to generate input features; Step 130, input the input features into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model, wherein the energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software, and the job energy consumption data of the test software.

[0025] The execution subject of the software operation energy consumption prediction method provided by the present invention can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), or a personal computer (PC), etc., which is not specifically limited by the present invention.

[0026] The following takes the method for predicting energy consumption of software operations provided by the present invention executed by a computer as an example to describe the technical solution of the present invention in detail.

[0027] High performance computing refers to the technology of using large-scale parallel computer clusters to solve complex scientific and engineering problems. High performance computing clusters are widely used in a wide range of fields, such as weather forecasting and climate forecasting in the field of atmospheric science, drug design and vaccine development in the field of life science, and composition-structure-property research of materials in the field of materials science.

[0028] As the scale of high-performance computing clusters increases, the scale of problems solved by high-performance computing application software in different fields also continues to increase, and the resulting energy consumption problem is becoming increasingly prominent. However, the resource usage characteristics of application software in different fields are different when running on high-performance computing clusters. For example, the CPU utilization of some application software is close to 100%, while the CPU utilization of others fluctuates greatly or is low. Some application software has high memory bandwidth while others have low memory bandwidth. Therefore, the power consumption of the server is different when different application software is running. Considering other situations, such as the different IO and communication characteristics of different application software, it is very necessary to study and predict the energy consumption of different application software in different fields when running.

[0029] In step 110, software configuration parameters of the target software, cluster job running parameters of a computing cluster running the target software, and the total job running time of the computing cluster running the target software are obtained.

[0030] Software configuration parameters are some options or variables that need to be set when using the software.

[0031] Cluster job running parameters refer to a series of parameters that need to be set when running a job on a computing cluster. These parameters are used to control the job execution mode, resource allocation, and task scheduling.

[0032] The total running time of a job running the target software on a computing cluster refers to the total time it takes from the start of the job to the completion of the job. This time includes all processing processes of the job on the cluster, such as data loading, computing processing, and result output.

[0033] Optional, taking the WRF mesoscale weather forecast model widely used in the meteorological field as an example, the software configuration parameters include application software version, compiler and version, compilation options and other application software related parameters as well as simulation start time, end time, forecast time, number of nested layers of simulation area, number of horizontal grid points, horizontal resolution, number of vertical layers, integration step, output forecast result file interval, output file format, parameterization scheme options used and other example related parameters.

[0034] Cluster job running parameters include the number of nodes, cores, processes and / or threads, CPU parameters, memory parameters, etc. used when the job is running.

[0035] In step 120, feature extraction is performed on the software configuration parameters, the cluster job running parameters, and the total job running time, respectively, and the extracted features are combined to generate input features.

[0036] Based on the software configuration parameters, the cluster job running parameters and the total job running time, feature extraction can be performed to obtain features corresponding to the three parameters. The three features obtained are combined to obtain an input feature.

[0037] The combination of features is used to generate a comprehensive feature to improve the prediction accuracy of subsequent prediction models.

[0038] The combination of three features can be achieved based on feature crossover, which creates a new feature by combining three individual features together, thereby capturing the potential relationship between these features.

[0039] In step 130, the input features are input into an energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software, and the job energy consumption data of the test software.

[0040] The prediction process based on the energy consumption prediction deep learning model can be as follows: Figure 2 The prediction process diagram of the energy consumption prediction deep learning model provided by the present invention is shown in the following figure. Before model training, a comprehensive set of test software should be collected. This set should contain software of various types, configurations, and operating characteristics so that the model can learn a wide range of energy consumption characteristics.

[0041] For each test software, record its software configuration parameters (such as memory settings, CPU usage limits, etc.), total job running time, and cluster job running parameters (such as resource requests, priorities, etc.). At the same time, collect the energy consumption data of these test software during actual operation.

[0042] The collected data is subjected to feature extraction and preprocessing to generate input feature vectors, which will serve as the input of the model.

[0043] Choose a deep learning architecture that performs the prediction task to build an energy consumption prediction model. This could be a multi-layer perceptron (MLP), convolutional neural network (CNN), recurrent neural network (RNN). Design the model's hierarchy, activation function, loss function, and optimizer to effectively learn from the input features and predict energy consumption data.

[0044] The model is trained based on the determined input feature vector and the corresponding energy consumption data. The model parameters (weights and biases) are iteratively adjusted to minimize the difference between the predicted energy consumption and the actual energy consumption.

[0045] After the model training is completed, the trained energy consumption prediction model is input based on the input features of the determined target software to obtain the energy consumption prediction result of the target software output by the energy consumption prediction model, thereby determining the operation energy consumption data of the target software.

[0046] Optional, such as Figure 3As shown in the schematic diagram of the job judgment execution flow provided by the present invention, the target software can be selected as the WRF (Weather Research and Forecasting Model) mesoscale weather forecast software widely used in the meteorological field as an example for specific description. Since there are differences in performance between different WRF versions, the description is based on the latest WRF v4.6 version. The default compilation parameters are used when compiling the software, and the software is compiled and installed using the "dm+sm" or "process+thread" method. After installation, WRF can run in parallel on a single node and multiple nodes on a high-performance computing cluster.

[0047] Different prediction processes can be adopted based on whether the job is completed, which is reflected in whether the total running time of the job needs to be predicted.

[0048] After the above is completed, the application software version, compiler and version, compilation options and other application software related parameters in the software configuration parameters are determined. Before running the WRF model for weather forecasting, you must first prepare the case, that is, determine the simulation start time, end time, forecast time, number of nested layers of the simulation area, number of horizontal grid points, horizontal resolution, number of vertical layers, integration step, output forecast result file interval, output file format, parameterization scheme options used and other case related parameters. These parameters will affect the running time of the WRF model and are all set in the namelist.input file of the WRF model. After setting, they are part of the input required for the WRF model to run. For example, as shown in Table 1: Table 1. Examples of relevant parameters in WRF model

[0049] The next step is to run different WRF examples at different scales to create a training data set. Before submitting a task, you need to set the number of nodes, cores, processes, and threads used when the job is running, that is, the cluster job running parameters. In addition, application performance is also related to the CPU model and memory model of the cluster, so the cluster job running parameters also include the CPU parameters (base frequency, number of cores, cache size) and memory parameters (memory frequency and number of channels) of the cluster used. After submitting the task, collect the real-time power consumption of the server running the job at time intervals t to obtain the total energy consumption from the start to the end of the job; after the task is completed, collect the total running time of the job. In this way, a sample data will be generated for each task; submitting jobs with different WRF versions, different examples, and different computing scales on different clusters will form a very large and comprehensive training data set.

[0050] After having the training data set, the input array can be organized into a one-dimensional vector or a two-dimensional data form, etc., to train the energy consumption prediction deep learning model and the job running time prediction model respectively. It should be pointed out that the training data set is constantly increasing and updated, and the energy consumption prediction deep learning model and the job running time prediction model can also be updated accordingly.

[0051] First, it is necessary to determine whether the job has been completed. If the job has been completed, the total running time of the job can be directly obtained to predict the total energy consumption of the job based on the software configuration parameters, cluster job running parameters, and the total running time of the job. If the job has not been completed, it is necessary to predict the total running time of the job based on the job running time prediction model, and then predict the total energy consumption of the job based on the predicted total running time of the job, software configuration parameters, and cluster job running parameters.

[0052] After training the above energy consumption prediction deep learning model and job running time prediction model, energy consumption prediction can be performed for completed jobs and jobs that have not yet been completed. For jobs that have not yet been submitted but have determined cluster job running parameters, energy consumption prediction can also be performed using performance prediction models and energy consumption prediction models.

[0053] The energy consumption ratio of the job can be obtained by the following formula based on the predicted total energy consumption of the job and the known total running time of the job or the predicted total running time of the job. The lower the energy consumption ratio, the better. Due to the different scalability of different applications, the total running time does not always decrease with the increase in the number of computing nodes / computing servers, that is, high energy consumption does not necessarily lead to a reduction in total running time. Therefore, the energy consumption ratio is of guiding significance for how different applications can run at a lower energy consumption ratio.

[0054] The software job energy consumption prediction method provided by the present invention obtains the software configuration parameters of the target software, the cluster job running parameters and the total job running time of the target software, determines the input features, and predicts the input features based on the pre-trained energy consumption prediction deep learning model, thereby realizing the accurate determination process of the target software job energy consumption data. The energy consumption prediction deep learning model learns complex feature representations and mapping relationships through a large amount of training data, so it can more accurately capture the inherent relationship between factors such as software configuration, cluster job running parameters and job running time and energy consumption, and improve the accuracy of software job energy consumption determination.

[0055] In one embodiment, after obtaining the operating energy consumption data of the target software output by the energy consumption prediction deep learning model, it also includes: determining feedback information on the operating energy consumption data of the target software; and updating the model parameters of the energy consumption prediction deep learning model based on the operating energy consumption data of the target software and its corresponding feedback information.

[0056] Based on the operation energy consumption data of the target software and its corresponding feedback information, the model parameters of the energy consumption prediction deep learning model are updated, including: based on the operation energy consumption data of the target software and its corresponding feedback information, positive and negative samples of the energy consumption prediction deep learning model are generated; based on comparative learning, the energy consumption prediction deep learning model is trained according to the positive and negative samples to update the model parameters of the energy consumption prediction deep learning model.

[0057] Based on the target software's job energy consumption data and its corresponding feedback information, positive and negative samples for training can be generated.

[0058] When the energy consumption data predicted by the model is highly consistent with the actual measured value or user evaluation, these data pairs can be regarded as positive samples. Positive samples mean that the model makes accurate predictions in this specific case.

[0059] On the contrary, when the energy consumption data predicted by the model differs significantly from the actual measured values ​​or user reviews, these data pairs are considered negative samples. Negative samples reveal in which cases the model's predictions are inaccurate and need further optimization.

[0060] After generating positive and negative samples, the contrastive learning method can be used to train the energy consumption prediction deep learning model: The core of contrastive learning is to construct a loss function that can distinguish between positive and negative samples. This loss function usually aims to maximize the similarity between positive samples and minimize the similarity between negative samples. In the scenario of energy consumption prediction, we can design a loss function so that the difference between the energy consumption data predicted by the model and the actual measured value (or the predicted value regarded as a positive sample) is as small as possible, while the difference with the negative sample is as large as possible.

[0061] The model is trained using a dataset containing positive and negative samples. During the training process, the model continuously adjusts its parameters to minimize the contrast loss function. Through iterative training, the model will gradually learn how to more accurately predict the job energy consumption data of the target software.

[0062] In each iteration, the model parameters are updated based on the gradient information of the loss function. This is usually achieved through the back-propagation algorithm, which calculates the gradient of the loss function with respect to the model parameters and updates the parameter values ​​accordingly.

[0063] It is understandable that the entire training process is an iterative optimization process. As the training progresses, the performance of the model on positive and negative samples will gradually improve, and the accuracy of the prediction will continue to improve.

[0064] In one embodiment, the extracted features are combined to generate input features, including: weighting the extracted features based on a predetermined weight coefficient, and performing feature crossover on the weighted features to obtain the input features.

[0065] The extracted features are weighted according to the predetermined weight coefficients. The purpose of weighting is to emphasize those features that have a greater impact on the prediction results, while weakening those features with less impact. The weighted features will better reflect the key information in the original data.

[0066] Feature crossover is an effective feature combination method that can generate new features by combining two or more features. These newly generated features may capture the complex interaction relationship between the original features, thereby improving the predictive ability of the model.

[0067] The weighted features are combined with the new features generated by cross-pollination to form the final input features. These input features will be used as inputs to the deep learning model for training the model and predicting energy consumption.

[0068] In one embodiment, the total job running time of the computing cluster running the target software is obtained, including: performing feature extraction on the software configuration parameters and the cluster job running parameters respectively, and weighting the extracted features based on a predetermined weight coefficient, and performing feature cross-feature on the weighted features to obtain performance combination features; inputting the performance combination features into a job running time prediction model to obtain the total job running time of the computing cluster running the target software output by the job running time prediction model; the training process of the job running time prediction model includes: obtaining the software configuration parameters of the test software in the test software set and the cluster job running parameters of the computing cluster running the test software; performing feature extraction on the software configuration parameters of the test software and the cluster job running parameters, and combining the extracted features to obtain the test software combination features; training the initial job running time prediction model based on the test software combination features and the software running time of the test software to obtain the job running time prediction model.

[0069] Specifically, the job energy consumption prediction process after predicting the job running time is as follows: Figure 4 The present invention provides a schematic diagram of a process for predicting job energy consumption based on the predicted total job running time.

[0070] Based on the relevant data of the test software in the test software set, the initial job running time prediction model is trained, and the job running time prediction model is obtained after the training is completed.

[0071] Obtain software configuration parameters and cluster job running parameters of the test software in the test software set. These test software are used to simulate job running in real scenarios to evaluate the performance of the prediction model.

[0072] The software configuration parameters of the test software and the cluster job running parameters are subjected to feature extraction, weighting and crossover to generate test software combination features. These combination features are used as inputs to the job running time prediction model.

[0073] Based on the test software combination features and the corresponding software running time (i.e., the actual measured job completion time), the initial job running time prediction model is trained. The training process includes the optimization of model parameters to minimize the difference between the predicted time and the actual time.

[0074] The trained job running time prediction model can be used to predict the total running time of the job running the target software in the computing cluster. This prediction result not only helps to evaluate the performance of the job, but also serves as an important basis for subsequent energy consumption prediction.

[0075] After predicting the total job running time of the computing cluster running the target software based on the job running time prediction model, feature extraction is performed based on the software configuration parameters of the target software, the cluster job running parameters of the computing cluster running the target software, and the predicted total job running time of the target software, and the extracted features are combined to generate input features, and the input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model.

[0076] In one embodiment, after obtaining the job energy consumption data of the target software output by the energy consumption prediction deep learning model, the method further includes: Determining the energy consumption ratio of the target software based on the job energy consumption data of the target software and the total job running time of the target software; Based on the energy consumption ratio of the target software, the running process of the target software is adjusted.

[0077] The energy consumption ratio of the target software is: ; Wherein, R is the energy consumption ratio of the target software, E is the job energy consumption data of the target software, and T is the total job running time of the target software.

[0078] After obtaining the energy consumption ratio, it needs to be analyzed. A low energy consumption ratio may mean that there are efficiency problems in the software during operation, such as low resource utilization and inefficient algorithms. A high energy consumption ratio may indicate that the software has done a good job in performance optimization, but there is still room for further optimization.

[0079] The energy consumption ratio of the job can be obtained by the above energy consumption ratio formula using the predicted total energy consumption of the job and the known total running time of the job or the predicted total running time of the job. The lower the energy consumption ratio, the better. Due to the different scalability of different applications, the total running time does not always decrease with the increase in the number of computing nodes / computing servers, that is, high energy consumption does not necessarily lead to a reduction in total running time. Therefore, the following energy consumption ratio formula is of guiding significance for how different applications can run at a lower energy consumption ratio.

[0080] The software operation energy consumption prediction device provided by the present invention is described below. The software operation energy consumption prediction device described below and the software operation energy consumption prediction method described above can be referenced to each other.

[0081] like Figure 5 As shown, the device comprises: The parameter acquisition module 510 is used to acquire the software configuration parameters of the target software, the cluster job running parameters of the computing cluster running the target software, and the total job running time of the computing cluster running the target software; A feature generation module 520 is used to extract features from the software configuration parameters, the cluster job running parameters, and the total job running time, and combine the extracted features to generate input features; The prediction module 520 is used to input the input features into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software, and the job energy consumption data of the test software.

[0082] The software job energy consumption prediction device provided by the present invention obtains the software configuration parameters of the target software, the cluster job running parameters and the total job running time of the target software, determines the input features, and predicts the input features based on the pre-trained energy consumption prediction deep learning model, thereby realizing the accurate determination process of the target software job energy consumption data. The energy consumption prediction deep learning model learns complex feature representations and mapping relationships through a large amount of training data, so it can more accurately capture the inherent relationship between factors such as software configuration, cluster job running parameters and job running time and energy consumption, and improve the accuracy of software job energy consumption determination.

[0083] In one embodiment, the prediction module 520 is specifically used to: After obtaining the target software's job energy consumption data output by the energy consumption prediction deep learning model, the method further includes: Determining feedback information on the operation energy consumption data of the target software; Based on the operation energy consumption data of the target software and its corresponding feedback information, the model parameters of the energy consumption prediction deep learning model are updated.

[0084] In one embodiment, the prediction module 520 is further specifically configured to: The updating of the model parameters of the energy consumption prediction deep learning model based on the target software's job energy consumption data and its corresponding feedback information includes: Based on the target software's job energy consumption data and its corresponding feedback information, generate positive and negative samples of the energy consumption prediction deep learning model; Based on contrastive learning, the energy consumption prediction deep learning model is trained according to the positive and negative samples to update model parameters of the energy consumption prediction deep learning model.

[0085] In one embodiment, the feature generation module 520 is specifically used to: The step of combining the extracted features to generate input features includes: The extracted features are weighted based on a predetermined weight coefficient, and feature crossover is performed on the weighted features to obtain the input features.

[0086] In one embodiment, the parameter acquisition module 510 is specifically used for: Obtaining the total running time of the job of the computing cluster running the target software, including: Extracting features from the software configuration parameters and the cluster job operation parameters respectively, weighting the extracted features based on a predetermined weight coefficient, and performing feature crossover on the weighted features to obtain performance combination features; Inputting the performance combination feature into a job running time prediction model to obtain a total job running time of the computing cluster running the target software output by the job running time prediction model; The training process of the job running time prediction model includes: Obtaining software configuration parameters of the test software in the test software set and cluster job running parameters of the computing cluster running the test software; Extracting features of the software configuration parameters of the test software and the cluster job running parameters, and combining the extracted features to obtain test software combination features; Based on the test software combination characteristics and the software running time of the test software, the initial job running time prediction model is trained to obtain the job running time prediction model.

[0087] In one embodiment, the prediction module 520 is further specifically configured to: After obtaining the target software's job energy consumption data output by the energy consumption prediction deep learning model, the method further includes: Determining the energy consumption ratio of the target software based on the job energy consumption data of the target software and the total job running time of the target software; Based on the energy consumption ratio of the target software, the running process of the target software is adjusted.

[0088] In one embodiment, the prediction module 520 is further specifically configured to: The energy consumption ratio of the target software is: ; Wherein, R is the energy consumption ratio of the target software, E is the job energy consumption data of the target software, and T is the total job running time of the target software.

[0089] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the software job energy consumption prediction method, which includes: obtaining software configuration parameters of the target software, cluster job running parameters of the computing cluster running the target software and the total job running time of the computing cluster running the target software; Extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time respectively, and combining the extracted features to generate input features; The input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software and the job energy consumption data of the test software.

[0090] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0091] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the software job energy consumption prediction method provided by the above methods, the method includes: obtaining software configuration parameters of the target software, cluster job running parameters of the computing cluster running the target software, and the total job running time of the computing cluster running the target software; Extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time respectively, and combining the extracted features to generate input features; The input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software and the job energy consumption data of the test software.

[0092] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the software job energy consumption prediction method provided by the above methods, the method comprising: obtaining software configuration parameters of the target software, cluster job running parameters of a computing cluster running the target software, and the total job running time of the computing cluster running the target software; Extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time respectively, and combining the extracted features to generate input features; The input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software and the job energy consumption data of the test software.

[0093] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting energy consumption of software operations, characterized in that: The method comprises: Acquire software configuration parameters of the target software, cluster job running parameters of a computing cluster running the target software, and a total job running time of the computing cluster running the target software; Extracting features from the software configuration parameters, the cluster job running parameters, and the total job running time respectively, and combining the extracted features to generate input features; The input features are input into the energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software and the job energy consumption data of the test software.

2. The method for predicting software operation energy consumption according to claim 1, characterized in that: After obtaining the target software's job energy consumption data output by the energy consumption prediction deep learning model, the method further includes: Determining feedback information on the operation energy consumption data of the target software; Based on the operation energy consumption data of the target software and its corresponding feedback information, the model parameters of the energy consumption prediction deep learning model are updated.

3. The method for predicting software operation energy consumption according to claim 2, characterized in that: The updating of the model parameters of the energy consumption prediction deep learning model based on the target software's job energy consumption data and its corresponding feedback information includes: Based on the target software's job energy consumption data and its corresponding feedback information, generate positive and negative samples of the energy consumption prediction deep learning model; Based on contrastive learning, the energy consumption prediction deep learning model is trained according to the positive and negative samples to update model parameters of the energy consumption prediction deep learning model.

4. The method for predicting software operation energy consumption according to claim 1, characterized in that: The step of combining the extracted features to generate input features includes: The extracted features are weighted based on a predetermined weight coefficient, and feature crossover is performed on the weighted features to obtain the input features.

5. The method for predicting software operation energy consumption according to claim 1, characterized in that: Obtaining the total running time of the job of the computing cluster running the target software, including: Extracting features from the software configuration parameters and the cluster job operation parameters respectively, weighting the extracted features based on a predetermined weight coefficient, and performing feature crossover on the weighted features to obtain performance combination features; Inputting the performance combination feature into a job running time prediction model to obtain a total job running time of the computing cluster running the target software output by the job running time prediction model; The training process of the job running time prediction model includes: Obtaining software configuration parameters of the test software in the test software set and cluster job running parameters of the computing cluster running the test software; Extracting features of the software configuration parameters of the test software and the cluster job running parameters, and combining the extracted features to obtain test software combination features; Based on the test software combination characteristics and the software running time of the test software, the initial job running time prediction model is trained to obtain the job running time prediction model.

6. The method for predicting software operation energy consumption according to claim 1, characterized in that: After obtaining the target software's job energy consumption data output by the energy consumption prediction deep learning model, the method further includes: Determining the energy consumption ratio of the target software based on the job energy consumption data of the target software and the total job running time of the target software; Based on the energy consumption ratio of the target software, the running process of the target software is adjusted.

7. The method for predicting software operation energy consumption according to claim 6, characterized in that: The energy consumption ratio of the target software is: ; Wherein, R is the energy consumption ratio of the target software, E is the job energy consumption data of the target software, and T is the total job running time of the target software.

8. A software operation energy consumption prediction device, characterized in that: include: A parameter acquisition module, used to acquire software configuration parameters of the target software, cluster job running parameters of the computing cluster running the target software, and the total job running time of the computing cluster running the target software; A feature generation module, used to extract features from the software configuration parameters, the cluster job running parameters and the total job running time, and combine the extracted features to generate input features; A prediction module is used to input the input features into an energy consumption prediction deep learning model to obtain the job energy consumption data of the target software output by the energy consumption prediction deep learning model. The energy consumption prediction deep learning model is trained based on the software configuration parameters of the test software in the test software set, the total job running time of the test software, the cluster job running parameters of the test software, and the job energy consumption data of the test software.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for predicting energy consumption of software tasks as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting energy consumption of software tasks as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Parallel program energy consumption simulation estimating method based on progressive trace update

    CN102567079A

  • Processor power consumption optimization method suitable for Android games

    CN108919938A

  • Game scene power consumption regulation and control method and device and computer readable storage medium

    CN113769390A

  • Performance prediction method and device, electronic equipment and storage medium

    CN113868106A

  • Energy-saving scheduling method and system based on job power consumption prediction

    CN115220900A