Prediction model training method and device and nonvolatile storage medium

The machine learning model predicts the optimal temperature value of the data center and adjusts the temperature control equipment to optimize energy consumption, solving the problem of inaccurate energy consumption management in the data center and achieving more efficient energy utilization.

CN118625656APending Publication Date: 2024-09-10CHINA TELECOM CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410635620.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology makes it difficult to accurately control the energy consumption of data centers, resulting in energy consumption that is too high or too low, affecting equipment operation and business processing efficiency.

Method used

By obtaining the energy consumption data and temperature data of the data center, we generate training data and test data, use the machine learning model to train a prediction model that predicts the optimal temperature value, adjust the temperature of the temperature control equipment to optimize energy consumption, and ensure that the data center is in The least amount of power consumed during the preset period.

Benefits of technology

On the premise of ensuring data processing efficiency, it is possible to more accurately control the energy consumption of the data center, avoid the problem of too high or too low energy consumption, and improve the accuracy of energy consumption management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118625656A
    Figure CN118625656A
Patent Text Reader

Abstract

The invention discloses a prediction model training method and device and a nonvolatile storage medium. The method comprises the following steps: acquiring energy consumption data and temperature data of a data center in a preset time period; generating training data and test data according to the energy consumption data and the temperature data, and training a machine learning model by using the training data to obtain a plurality of initial models; screening a target initial model from the plurality of initial models by using the test data, and generating a prediction model for predicting an optimal temperature value based on the target initial model; and acquiring an arithmetic progression composed of a plurality of to-be-measured temperature values as verification data, and determining whether the training of the prediction model is ended or not by using the verification data. According to the method and the device, the technical problems of inaccurate control result and low business processing efficiency of the data center caused by over-high or over-low energy consumption due to the fact that the energy consumption generated by the data center is controlled by adjusting the number of the running servers are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data center energy-saving technology, and more specifically, to a prediction model training method and device, and a non-volatile storage medium. Background Art

[0002] With the rapid development of artificial intelligence and the Internet of Things (IoT) technologies, data center energy consumption is receiving increasing attention. Currently, data center energy management is mostly based on experience or fixed energy management rules. Operations and maintenance personnel adjust the number of servers running in the data center based on their experience to control energy consumption. However, due to the variability of the services handled by data centers, energy consumption varies depending on the services they handle. Simply adjusting the number of running servers to manage energy consumption often results in excessively high or low energy consumption, which neither saves energy nor affects equipment operation, making it impossible to accurately manage data center energy consumption.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0004] The embodiments of the present application provide a prediction model training method and device, and a non-volatile storage medium to at least solve the technical problems of inaccurate control results and low business processing efficiency of the data center due to excessive or low energy consumption caused by controlling the energy consumption generated by the data center by adjusting the number of running servers.

[0005] According to one aspect of an embodiment of the present application, a method for training a prediction model is provided, including: obtaining energy consumption data and temperature data of a data center during a preset time period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset time period, and the temperature data is the temperature value set when the temperature control device of the data center is running during the preset time period; generating training data and test data based on the energy consumption data and the temperature data, and using the training data to train a machine learning model to obtain multiple initial models; using the test data to screen a target initial model from the multiple initial models, and generating a prediction model for predicting an optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least electric energy during the preset time period; and obtaining an arithmetic progression consisting of multiple temperature values ​​to be measured as verification data, and using the verification data to determine whether the training of the prediction model has ended.

[0006] Optionally, the preset time period includes multiple time intervals, and the duration corresponding to the time interval is less than the duration corresponding to the preset time period. The energy consumption data includes: the total energy consumption value corresponding to each time interval, wherein the total energy consumption value corresponding to each time interval is determined by the following method: classifying the target devices that consume electrical energy in the data center into temperature control devices and other devices; determining the first unit energy consumption of the temperature control device, and determining the first type of energy consumption data for indicating the electrical energy consumed by the temperature control device when operating in each time interval based on the first unit energy consumption; and determining the second unit energy consumption of each other device, and determining the second type of energy consumption data for indicating the electrical energy consumed by other devices when operating in each time interval based on the second unit energy consumption; and determining the sum of the first type of energy consumption data and the second type of energy consumption data corresponding to each time interval as the total energy consumption value corresponding to each time interval.

[0007] Optionally, training data and test data are generated based on energy consumption data and temperature data, including: combining energy consumption data and temperature data corresponding to the same time interval into a data set to obtain multiple data sets, wherein the number of data sets is the same as the number of time intervals included in the preset time period, and the duration corresponding to the time interval is less than the duration corresponding to the preset time period; and dividing the multiple data sets into training sets and test sets on average, wherein the data in the multiple training sets are training data, and the data in the multiple test sets are test data.

[0008] Optionally, the machine learning model is trained using the training data to obtain multiple initial models, including: using multiple training sets in the training data to train the machine learning model separately to obtain multiple initial models, wherein the number of initial models is the same as the number of training sets; using the test data to screen the target initial model from the multiple initial models, including: using multiple test sets in the test data to test each initial model separately, wherein each test set includes energy consumption data and temperature data, the temperature data is used as the input of the initial model, and the initial model outputs the predicted energy consumption value for the temperature data; and screening the target initial model from the multiple initial models according to the multiple predicted energy consumption values.

[0009] Optionally, a target initial model is screened from multiple initial models based on multiple predicted energy consumption values, including: for each initial model, determining the difference between the predicted energy consumption value and the actual energy consumption value in the test set; and determining the initial model corresponding to the smallest difference among the multiple differences as the target initial model.

[0010] Optionally, verification data is used to determine whether the prediction model has ended training, including: determining the total energy consumption corresponding to each temperature value to be measured, wherein the total energy consumption is the electric energy consumed by the data center during a preset period when the temperature control device is set to the temperature value to be measured; determining the temperature value to be measured corresponding to the total energy consumption with the smallest value among multiple energy consumption sums as the first temperature value; and determining whether the prediction model has ended training based on the first temperature value.

[0011] Optionally, determining whether to end training of the prediction model is based on the first temperature value includes: performing basic operation processing on the first temperature value and the preset value to obtain multiple second temperature values, wherein the preset value is less than the constant difference corresponding to the arithmetic progression, and the basic operation processing includes: addition and subtraction; when the first energy consumption value corresponding to the first temperature value is less than the second energy consumption value corresponding to any second temperature value, determining to end training; when the first energy consumption value is greater than or equal to any second energy consumption value, continuing to train the prediction model until the first energy consumption value is less than any second energy consumption value.

[0012] Optionally, determining whether to end training of the prediction model based on the first temperature value further includes: inputting the first temperature value into the particle swarm algorithm model to obtain the moving speed corresponding to the first temperature value and the coordinates of the first temperature value in the target coordinate system, wherein the target coordinate system is established based on time and temperature; when the moving speed belongs to a preset speed range and the coordinates belong to a preset coordinate range, determining to end training; when the moving speed does not belong to the preset speed range or the coordinates do not belong to the preset coordinate range, continuing to train the prediction model until the moving speed belongs to the preset speed range and the coordinates belong to the preset coordinate range.

[0013] According to another aspect of an embodiment of the present application, a training device for a prediction model is also provided, including: an acquisition module for acquiring energy consumption data and temperature data of a data center in a preset time period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center in the preset time period, and the temperature data is the temperature value set when the temperature control device of the data center is running in the preset time period; a training module for generating training data and test data based on the energy consumption data and temperature data, and using the training data to train a machine learning model to obtain multiple initial models; a screening module for using the test data to screen a target initial model from multiple initial models, and generating a prediction model for predicting the optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least electric energy in the preset time period; and a determination module for obtaining an arithmetic progression composed of multiple temperature values ​​to be measured as verification data, and using the verification data to determine whether the training of the prediction model has ended.

[0014] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, in which a computer program is stored. The device where the non-volatile storage medium is located executes the above-mentioned prediction model training method by running the computer program.

[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned prediction model training method through the computer program.

[0016] According to another aspect of an embodiment of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the steps of the above-mentioned prediction model training method.

[0017] In an embodiment of the present application, energy consumption data and temperature data of a data center in a preset time period are obtained, wherein the energy consumption data is used to indicate the electric energy consumed by the data center in the preset time period, and the temperature data is the temperature value set when the temperature control device of the data center is running in the preset time period; training data and test data are generated according to the energy consumption data and the temperature data, and the training data is used to train a machine learning model to obtain multiple initial models; the test data is used to screen a target initial model from the multiple initial models, and a prediction model for predicting the optimal temperature value is generated based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least electric energy in the preset time period; and an arithmetic progression consisting of multiple temperature values ​​to be measured is obtained as verification data, and the verification data is used to determine whether the prediction model has ended training. The method of training is to use a large amount of historical energy consumption data of the data center as training data, use deep learning technology and training data to train the machine learning model, and obtain a prediction model for predicting temperature. The prediction model can explore the intrinsic relationship and rules between energy consumption and various factors of the data center, and output the control temperature that can minimize the energy consumption of the data center; only adjusting the energy consumption generated by the temperature control equipment of the data center does not affect the operation of the data processing equipment of the data center, and achieves the purpose of not reducing the data processing efficiency of the data center, thereby achieving the technical effect of more accurately controlling the energy consumption of the data center under the premise of ensuring the normal operation of the data center, and thus solving the technical problem of inaccurate control results and business processing efficiency of the data center caused by controlling the energy consumption generated by the data center by adjusting the number of running servers. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a training method for a prediction model according to an embodiment of the present application;

[0020] Figure 2is a flowchart of a method for training a prediction model according to an embodiment of the present application;

[0021] Figure 3 It is a structural diagram of a training device for a prediction model according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0025] Data center: A centralized facility consisting of servers, storage devices, network equipment, and other hardware facilities used to store, manage, and process large amounts of data and information, provide network connections and computing resources, and offer cloud computing, virtualization, disaster recovery, and other services.

[0026] In related technologies, operations and maintenance personnel control data center energy consumption by adjusting the number of servers running in the data center or the number of other devices used to implement the data center's services. This results in an inability to accurately adjust data center energy consumption and reduces the data processing efficiency of the data center. To address this issue, the present application provides a solution, which is described in detail below.

[0027] According to an embodiment of the present application, a method embodiment of a method for training a prediction model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal for implementing a training method for a prediction model. Figure 1 As shown, the computer terminal 10 may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0029] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0030] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the training method of the prediction model in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned training method of the prediction model. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0031] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0032] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0033] The present application embodiment provides a method for training a prediction model that can be run in the above-mentioned operating environment. Figure 2 is a flowchart of the steps of the training method of the prediction model provided in the embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:

[0034] Step S202, obtaining energy consumption data and temperature data of the data center during a preset period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset period, and the temperature data is the temperature value set when the temperature control equipment of the data center is running during the preset period.

[0035] The prediction model trained according to the method provided in the embodiment of the present application is used to predict the temperature value. By setting the temperature control equipment of the data center to the temperature value output by the prediction model, the energy consumption generated by the temperature control equipment is reduced, thereby reducing the energy consumption generated by the control center, wherein the prediction model is trained using the historical energy consumption data of the control center as training data. In step S202, the energy consumption data generated by the data center during the operation period (i.e., the preset period) before the current moment and the temperature data of the data center are obtained; wherein the preset period can be one or more. In this embodiment, the energy consumption data of the data center in each preset period is used to indicate the electrical energy consumed by the data center in each operation period, which can be expressed in terms of power. The temperature data of each preset period is the temperature value set to the temperature control equipment (external temperature control equipment used to adjust the temperature of the data center) contained therein when the data center is operating in each preset period; within a complete preset period, the temperature control equipment can be always set to one temperature value or to multiple different temperature values.

[0036] Optionally, the preset time period includes multiple time intervals, wherein the duration corresponding to the time interval is less than the duration corresponding to the preset time period, and the energy consumption data includes: the total energy consumption value corresponding to each time interval, wherein the total energy consumption value corresponding to each time interval is determined by the following method: classifying the target devices that consume electrical energy in the data center into temperature control devices and other devices; determining the first unit energy consumption of the temperature control device, and determining the first type of energy consumption data for indicating the electrical energy consumed by the temperature control device when operating in each time interval based on the first unit energy consumption; and determining the second unit energy consumption of each other device, and determining the second type of energy consumption data for indicating the electrical energy consumed by other devices when operating in each time interval based on the second unit energy consumption; and determining the sum of the first type of energy consumption data and the second type of energy consumption data corresponding to each time interval as the total energy consumption value corresponding to each time interval.

[0037] In this embodiment, each preset time period (operation period) includes multiple time intervals. Therefore, the duration corresponding to a time interval is shorter than the duration corresponding to the preset time period. For example, if the preset time period is (9:00-12:00), the preset interval is 1 hour. The energy consumption data for the preset time period obtained in step S202 is the total energy consumption (i.e., the total energy consumption value) generated by the data center during the preset time period. Since the preset time period includes multiple time intervals, the energy consumption data of the data center during the preset time period can be obtained by summing the total energy consumption generated by the data center during each time interval. In this embodiment, the total energy consumption generated by the operation of the data center in each time interval is calculated by the following method: first, the devices that consume electricity in the data center are classified into two categories: temperature control devices and other devices. Next, the (first) unit energy consumption of the temperature control device and the (second) unit energy consumption of the other devices are determined respectively, wherein the (first) unit energy consumption of the temperature control device refers to the energy consumption kac generated by the temperature control device per second, and the (second) unit energy consumption of the other devices refers to the energy consumption kra generated by the other devices per second; next, the (first category) energy consumption generated by the temperature control device in each time interval and the (first category) energy consumption generated by other devices in each time interval are calculated respectively; the sum of the (first category) energy consumption and the (second category) energy consumption in the same time interval is determined as the total energy consumption corresponding to the time interval. For example, the temperature control device is a rack, the other devices are racks, the time interval is set to 1 hour (1h), the data collection frequency is once per minute, and the energy consumption (krah) generated by each rack in a time interval is i )=∑kra*16, where i represents the i-th rack. The energy consumption of the air conditioner in a time interval is recorded as kac t The energy consumption data (first category) generated by the air conditioner during the preset period constitutes the rack energy consumption data set M1 = [ho t ,kac t ,kac (t+1) ,kac (t+2) ...kac (t+n) ] Among them, ho t The timestamp vector n represents the current time and is the number of time intervals contained in a running period. The energy consumption data (second category) generated by other devices in the preset period constitute the rack energy consumption data set M2 = [ho t ,krah it ,krah i(t+1) ,krah i(t+2) ...krah i(t+n) ]; then the energy consumption data of the data center during the preset period is M3 = [ho t ,krah it +kac t ,krah i(t+1) +kac (t+1) ,krahi(t+2) +kac (t+2) .....krah i(t+n) +kac (t+n) ], among which kto (t+n) =krah i(t+n) +kac (t+n) .

[0038] Step S204: Generate training data and test data based on the energy consumption data and the temperature data, and use the training data to train a machine learning model to obtain multiple initial models.

[0039] In step S204, training data and test data are generated based on the energy consumption data and temperature data obtained in step S202 to train a machine learning model (such as a neural network model, a random forest model) to obtain multiple initial models, wherein each initial model can output the energy consumption generated by the data center running at the input temperature for a corresponding operating period.

[0040] Step S206, using the test data to screen the target initial model from multiple initial models, and generating a prediction model for predicting the optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models. When the temperature control device is set to the optimal temperature value, the data center consumes the least amount of electricity during the preset period.

[0041] In step S206, the multiple initial models generated in step S206 are tested using the test data to screen out the initial model with the highest accuracy (i.e., the target initial model). The energy consumption data and temperature data obtained in step S202 are used to continue training the initial model with the highest accuracy (i.e., the target initial model), and a prediction model (P Mod ), wherein the prediction model includes a target initial model and another model for determining an optimal temperature value based on multiple predicted energy consumption values ​​output by the target initial model. Specifically, the other model is used to determine the predicted energy consumption value with the minimum value among the multiple predicted energy consumption values ​​output by the target initial model, and output the temperature value corresponding to the predicted energy consumption value with the minimum value as the optimal temperature value. The optimal temperature value is when the temperature control device is set to the optimal temperature value, and the data center generates the least energy consumption (consumes the least electricity) during the preset time period. That is, when the temperature control device is set to the optimal temperature value, the calculated total energy consumption value of the data center is less than the calculated total energy consumption value of the data center when the temperature control device is set to other temperature values. When the data center enters the next operating period, the temperature of the temperature control device is set to the optimal temperature value output by the prediction model, and the temperature control device controls the temperature value of the data center to be the optimal temperature value.

[0042] According to an optional embodiment of the present application, training data and test data are generated based on energy consumption data and temperature data, including: combining energy consumption data and temperature data corresponding to the same time interval into a data set to obtain multiple data sets, wherein the number of data sets is the same as the number of time intervals included in the preset time period, and the duration corresponding to the time interval is less than the duration corresponding to the preset time period; and dividing the multiple data sets into training sets and test sets on an equal basis, wherein the data in the multiple training sets are training data, and the data in the multiple test sets are test data.

[0043] In this embodiment, the temperature data and energy consumption data belonging to the same time interval are combined into one data set. 3n =[T (t+n) ,kto (t+n) ], where t represents the start time of the current running period, T (t+n) It is the temperature value set by the temperature control device in the nth time interval. If the preset period contains n time intervals, then n data sets can be obtained. Half of all the generated data sets are used as training sets, and the data contained therein is the training data; the other half of the data sets are used as test sets, and the data contained therein is the test data. Therefore, both training data and test data are composed of data in the form of multiple sets. For example, if the preset period contains n time intervals, then n data sets are generated, each of which contains temperature data and energy consumption data; datasets as training sets, and dataset as the test set.

[0044] It should be noted that before generating training data and test data based on energy consumption data, preprocessing is required. Preprocessing includes but is not limited to data cleaning, missing value filling, outlier processing, data normalization, etc., which are used to improve data quality and algorithm training effects. Among them, missing value filling is to fill the mean with the missing data. For example, when collecting energy consumption data, the data of the time point (t+1) is lost, then the average of the time point before (t+1) and the time point after (t+2) is taken as the energy consumption data, that is, or,

[0045] According to another optional embodiment of the present application, a machine learning model is trained using training data to obtain multiple initial models, including: using multiple training sets in the training data to train the machine learning model respectively to obtain multiple initial models, wherein the number of initial models is the same as the number of training sets; using test data to filter a target initial model from the multiple initial models, including: using multiple test sets in the test data to test each initial model respectively, wherein each test set includes energy consumption data and temperature data, the temperature data is used as the input of the initial model, and the initial model outputs the predicted energy consumption value for the temperature data; filtering the target initial model from the multiple initial models according to the multiple predicted energy consumption values.

[0046] As mentioned in the above embodiment, the training data is data from multiple data sets as training sets. In this embodiment, when using the training data to train the machine learning model, each training set trains a corresponding machine learning model. Therefore, as many initial models as there are training sets can be obtained. Because there are multiple initial models, it is necessary to use the test data to screen out the (target) initial model with the highest accuracy, and use the screened initial model as the basic version of the prediction model, and continue to train it using the test data and training data. The accuracy of each initial model is determined by the following method. As mentioned in the above embodiment, both the training data and the test data contain multiple data sets, and the number of test sets is equal to the number of data sets. Therefore, each test set can be used to test an initial model to determine the accuracy of the initial model. Specifically, for each initial model, the temperature data in the test set is input as input data into the initial model to obtain the output value (i.e., the predicted energy consumption value) output by the initial model for the input data. The accuracy of each initial model is determined based on the output value (i.e., the predicted energy consumption value) of the initial model, and based on this, the initial model with the highest accuracy is screened out from the multiple initial models as the target initial model.

[0047] Optionally, a target initial model is screened from multiple initial models based on multiple predicted energy consumption values, including: for each initial model, determining the difference between the predicted energy consumption value and the actual energy consumption value in the test set; and determining the initial model corresponding to the smallest difference among the multiple differences as the target initial model.

[0048] In this embodiment, the accuracy of each initial model is determined by the following method: the output value (predicted energy consumption value) of each initial model is subtracted from the energy consumption value (actual energy consumption value) in the test set serving as its test data to obtain a difference. After the above processing, each initial model has a corresponding difference, where the smaller the difference, the higher the accuracy. The initial model corresponding to the minimum difference among the multiple differences is determined as the initial model with the highest accuracy (i.e., the target initial model).

[0049] Step S208: obtaining an arithmetic progression consisting of a plurality of temperature values ​​to be measured as verification data, and using the verification data to determine whether the prediction model has finished training.

[0050] In step S208, after the prediction model is screened out in step S206, the energy consumption data and temperature data obtained in step S202 will be used to continue training the prediction model. During the training process of the prediction model, verification data is used to determine whether the prediction model training is complete, wherein the verification data is an arithmetic progression composed of multiple temperature values, and the difference between any two adjacent temperature values ​​in the arithmetic progression is the same; the trained prediction model will output the optimal temperature value after receiving the input of multiple temperature values. When the temperature control equipment of the data center is set to the optimal temperature value in the next operating period, the energy consumption generated by the data center is minimized.

[0051] According to an optional embodiment of the present application, verification data is used to determine whether the prediction model has ended training, including: determining the total energy consumption corresponding to each temperature value to be measured, wherein the total energy consumption is the electric energy consumed by the data center during a preset time period when the temperature control device is set to the temperature value to be measured; determining the temperature value to be measured corresponding to the total energy consumption with the smallest value among multiple energy consumption sums as the first temperature value; and determining whether the prediction model has ended training based on the first temperature value.

[0052] In this embodiment, each temperature value to be measured as verification data is input into the prediction model, and the prediction model calls the target initial model contained therein to output the total energy consumption predicted for each temperature value to be measured (i.e., kto (t+n) ), then, each energy consumption sum is input into other models included in the prediction model, and the other models determine the energy consumption sum with the smallest value among the multiple energy consumption sums, and output the corresponding input temperature value to be measured as the first temperature value; based on the first temperature value, further judgment is made to determine whether the prediction model training is complete. For example, the verification data is T 12 、T 13 、T 14 、T 15 ...T 30 , where T 12 Indicates that the temperature to be measured is 12 degrees Celsius (℃), T 13 Indicates that the temperature to be measured is 13°C, and so on. Then the target initial model is for each verification data (T 12 ~T 30 ) Output a predicted total energy consumption of the data center, and obtain the total energy consumption corresponding to each temperature value to be measured kto (12) ~kto (30) , and select the energy consumption with the smallest value.

[0053] Optionally, determining whether to end training of the prediction model is based on the first temperature value includes: performing basic operation processing on the first temperature value and the preset value to obtain multiple second temperature values, wherein the preset value is less than the constant difference corresponding to the arithmetic progression, and the basic operation processing includes: addition and subtraction; when the first energy consumption value corresponding to the first temperature value is less than the second energy consumption value corresponding to any second temperature value, determining to end training; when the first energy consumption value is greater than or equal to any second energy consumption value, continuing to train the prediction model until the first energy consumption value is less than any second energy consumption value.

[0054] Next, when further judging based on the first temperature value to determine whether the prediction model training is completed, a difference value (preset difference value) is first obtained. The purpose of further judging is to avoid the optimal temperature value appearing in the temperature value not included in the arithmetic progression. Therefore, in this embodiment, by using the preset difference value and the first temperature value for calculation, a (second) temperature value that is not much different from the first temperature value but is not included in the arithmetic progression is obtained; therefore, the preset difference value should be ensured to be less than the difference between any two adjacent temperature values ​​to be measured in the arithmetic progression (i.e., a constant difference). For example, in this embodiment, the verification data is T 12 ~T 30 , the constant difference is 1, then the preset difference can be set to 0.5. The first temperature value and the preset difference are added and subtracted respectively to obtain two other temperature values ​​(second temperature values) different from the first temperature value, and the target initial model is used to determine the first energy consumption value corresponding to the first temperature value, and the second energy consumption value corresponding to each second temperature value. If the first energy consumption value is the smallest, it means that the target initial model can already output the optimal temperature value, and the prediction model training is completed. Otherwise, continue to use the energy consumption data and temperature data to train the prediction model, specifically to train the target initial model included in the prediction model. For example, the minimum total energy consumption (first energy consumption value) is kto (d) , the preset difference is 0.5, where d represents the first temperature value. When further determining whether the prediction model training is completed based on the first temperature value, the second temperature values ​​are first obtained: (d+0.5) and (d-0.5). Next, the target initial model is used to predict the (second) energy consumption value kto corresponding to (d+0.5). (d+0.5) , and the (second) energy consumption value kto corresponding to (d-0.5) (d-0.5) , judge kto (d) Is it kto (d) 、kto (d+0.5) and kto (d-0.5) If the value is the smallest of the three, it is determined that the prediction model training is complete, otherwise continue to train the prediction model.

[0055] According to some optional embodiments of the present application, determining whether to end training of the prediction model based on the first temperature value also includes: inputting the first temperature value into the particle swarm algorithm model to obtain the moving speed corresponding to the first temperature value and the coordinates of the first temperature value in the target coordinate system, wherein the target coordinate system is established based on time and temperature; when the moving speed belongs to a preset speed range and the coordinates belong to a preset coordinate range, determining to end training; when the moving speed does not belong to the preset speed range or the coordinates do not belong to the preset coordinate range, continuing to train the prediction model until the moving speed belongs to the preset speed range and the coordinates belong to the preset coordinate range.

[0056] In this embodiment, a particle swarm optimization algorithm (PSO) is used to determine whether the prediction model is trained. The specific process is as follows:

[0057] (1) Establish a particle swarm algorithm model and set the model parameters: group size N = 40, inertia factor (ω ini and ω end )ω ini =0.9,ω end =0.4, the learning factors (c1 and c2) are set to 2, and the maximum number of iterations (Gk) = 100.

[0058] (2) Input the first temperature value (T t+n+1 ) into the particle swarm optimization model and pass the prediction model P Mod Calculate T t+n+1 The corresponding first energy consumption value (kto t+n+1 ).

[0059] (3) The particle swarm algorithm model calculates the input particle (i.e. the first temperature value (T t+n+1 ))'s moving speed and position, and judging whether the particle meets the convergence condition according to a certain speed and position. Among them, only when the value of the moving speed belongs to the preset speed range and the position of the particle belongs to the preset position range, it is determined that the particle meets the convergence condition.

[0060] (4) If not, continue training the prediction model. Input the arithmetic progression of the temperature values ​​to be measured into the trained prediction model. The trained prediction model outputs the total energy consumption corresponding to each temperature value to be measured, and selects the energy consumption sum with the smallest value (i.e., the first energy consumption value). Determine the temperature value (i.e., the first temperature value) corresponding to the minimum energy consumption sum (i.e., the first energy consumption value), and repeat step (3).

[0061] (5) If the particles meet the convergence conditions, it is determined that the prediction model training is completed.

[0062] Through the above steps, the business changes and energy change implementation of the data center are fully considered, which can improve the accuracy of the data center energy consumption prediction and provide effective decisions for subsequent optimal control decisions.

[0063] Figure 3 FIG. 1 is a structural diagram of a training device for a prediction model provided in accordance with an embodiment of the present application. Figure 3 As shown, the training device of the prediction model includes: an acquisition module 30, which is used to obtain energy consumption data and temperature data of the data center in a preset time period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center in the preset time period, and the temperature data is the temperature value set when the temperature control equipment of the data center is running in the preset time period; a training module 32, which is used to generate training data and test data based on the energy consumption data and temperature data, and use the training data to train the machine learning model to obtain multiple initial models; a screening module 34, which is used to use the test data to screen the target initial model from the multiple initial models, and generate a prediction model for predicting the optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control equipment is set to the optimal temperature value, the data center consumes the least electric energy in the preset time period; and a determination module 36, which is used to obtain an arithmetic progression composed of multiple temperature values ​​to be measured as verification data, and use the verification data to determine whether the training of the prediction model has ended.

[0064] It should be noted that Figure 3 The preferred implementation of the embodiment shown can be found in Figure 2 The relevant description of the illustrated embodiment will not be repeated here.

[0065] An embodiment of the present application further provides a non-volatile storage medium, in which a computer program is stored. The device where the non-volatile storage medium is located executes the above prediction model training method by running the computer program.

[0066] The above-mentioned non-volatile storage medium is used to store a program that performs the following functions: obtaining energy consumption data and temperature data of a data center during a preset period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset period, and the temperature data is the temperature value set when the temperature control device of the data center is running during the preset period; generating training data and test data based on the energy consumption data and temperature data, and using the training data to train a machine learning model to obtain multiple initial models; using the test data to screen a target initial model from multiple initial models, and generating a prediction model for predicting the optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least electric energy during the preset period; and obtaining an arithmetic progression consisting of multiple temperature values ​​to be measured as verification data, and using the verification data to determine whether the training of the prediction model has ended.

[0067] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above prediction model training method through the computer program.

[0068] The processor in the above-mentioned electronic device is used to run a program that performs the following functions: obtaining energy consumption data and temperature data of the data center during a preset period, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset period, and the temperature data is the temperature value set when the temperature control device of the data center is running during the preset period; generating training data and test data based on the energy consumption data and temperature data, and using the training data to train the machine learning model to obtain multiple initial models; using the test data to screen the target initial model from the multiple initial models, and generating a prediction model for predicting the optimal temperature value based on the target initial model, wherein the target model is the model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least electric energy during the preset period; and obtaining an arithmetic progression consisting of multiple temperature values ​​to be measured as verification data, and using the verification data to determine whether the training of the prediction model has ended.

[0069] According to another aspect of an embodiment of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the steps of the above prediction model training method.

[0070] It should be noted that the various modules in the training device of the above-mentioned prediction model can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0071] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0072] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0074] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0075] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0076] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the relevant technology or all or 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 enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0077] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A prediction model training method, characterized in that: include: Acquire energy consumption data and temperature data of the data center during a preset period of time, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset period of time, and the temperature data is the temperature value set when the temperature control device of the data center is running during the preset period of time; Generate training data and test data according to the energy consumption data and the temperature data, and use the training data to train a machine learning model to obtain multiple initial models; Using the test data to select a target initial model from the multiple initial models, and generating a prediction model for predicting an optimal temperature value based on the target initial model, wherein the target model is a model with the highest accuracy among the multiple initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least amount of power during the preset period; and An arithmetic progression consisting of a plurality of temperature values ​​to be measured is obtained as verification data, and the verification data is used to determine whether the prediction model has finished training.

2. The method according to claim 1, characterized in that The preset time period includes multiple time intervals, the duration corresponding to the time interval is less than the duration corresponding to the preset time period, and the energy consumption data includes: the total energy consumption value corresponding to each of the time intervals, wherein the total energy consumption value corresponding to each of the time intervals is determined by the following method: Classifying target devices consuming electric energy in the data center into the temperature control devices and other devices; Determining a first unit energy consumption of the temperature control device, and determining, according to the first unit energy consumption, first type of energy consumption data indicating the electric energy consumed by the temperature control device when it is running in each of the time intervals; and Determine a second unit energy consumption of each of the other devices, and determine, according to the second unit energy consumption, second type of energy consumption data indicating the electric energy consumed by the other devices when running in each of the time intervals; The sum of the first-category energy consumption data and the second-category energy consumption data corresponding to each of the time intervals is determined as the total energy consumption value corresponding to each of the time intervals.

3. The method according to claim 1, characterized in that Generating training data and test data according to the energy consumption data and the temperature data includes: The energy consumption data and the temperature data corresponding to the same time interval are combined into one data set to obtain a plurality of data sets, wherein the number of the data sets is the same as the number of time intervals included in the preset time period, and the duration corresponding to the time interval is less than the duration corresponding to the preset time period; The multiple data sets are evenly divided into training sets and test sets, wherein the data in the multiple training sets are the training data, and the data in the multiple test sets are the test data.

4. The method according to claim 1, characterized in that: The training data is used to train a machine learning model to obtain multiple initial models, including: Using a plurality of training sets in the training data to respectively train the machine learning model to obtain a plurality of initial models, wherein the number of the initial models is the same as the number of the training sets; Using the test data to select a target initial model from the plurality of initial models comprises: Using a plurality of test sets in the test data to test each of the initial models respectively, wherein each of the test sets includes the energy consumption data and the temperature data, the temperature data is used as the input of the initial model, and the initial model outputs a predicted energy consumption value for the temperature data; The target initial model is selected from the multiple initial models according to the multiple predicted energy consumption values.

5. The method according to claim 4, characterized in that Screening the target initial model from the plurality of initial models according to the plurality of predicted energy consumption values ​​comprises: For each of the initial models, determining a difference between the predicted energy consumption value and the actual energy consumption value in the test set; The initial model corresponding to the difference value with the smallest value among the multiple differences is determined as the target initial model.

6. The method according to claim 1, characterized in that Determining whether the prediction model has finished training using the verification data includes: Determine the total energy consumption corresponding to each of the temperature values ​​to be measured, wherein the total energy consumption is the electric energy consumed by the data center in the preset time period when the temperature control device is set to the temperature value to be measured; Determine the measured temperature value corresponding to the energy consumption sum with the smallest value among the plurality of energy consumption sums as the first temperature value; Determine whether the prediction model has finished training according to the first temperature value.

7. The method according to claim 6, characterized in that Determining whether the prediction model has finished training according to the first temperature value includes: Performing basic operation processing on the first temperature value and a preset value to obtain a plurality of second temperature values, wherein the preset value is less than a constant difference value corresponding to the arithmetic progression, and the basic operation processing includes: addition and subtraction; When a first energy consumption value corresponding to the first temperature value is less than a second energy consumption value corresponding to any one of the second temperature values, determining to end the training; When the first energy consumption value is greater than or equal to any one of the second energy consumption values, continue to train the prediction model until the first energy consumption value is less than any one of the second energy consumption values.

8. The method according to claim 6, characterized in that Determining whether the prediction model has finished training according to the first temperature value also includes: Inputting the first temperature value into a particle swarm algorithm model to obtain a moving speed corresponding to the first temperature value and a coordinate of the first temperature value in a target coordinate system, wherein the target coordinate system is established according to time and temperature; When the moving speed belongs to the preset speed interval and the coordinates belong to the preset coordinate interval, determining to end the training; When the moving speed does not belong to the preset speed interval or the coordinates do not belong to the preset coordinate interval, continue to train the prediction model until the moving speed belongs to the preset speed interval and the coordinates belong to the preset coordinate interval.

9. A prediction model training device, characterized in that: include: An acquisition module, used to acquire energy consumption data and temperature data of a data center during a preset period of time, wherein the energy consumption data is used to indicate the electric energy consumed by the data center during the preset period of time, and the temperature data is the temperature value set when the temperature control device of the data center is running during the preset period of time; A training module, used to generate training data and test data according to the energy consumption data and the temperature data, and train a machine learning model using the training data to obtain multiple initial models; a screening module, configured to screen a target initial model from the plurality of initial models using the test data, and generate a prediction model for predicting an optimal temperature value based on the target initial model, wherein the target model is a model with the highest accuracy among the plurality of initial models, and when the temperature control device is set to the optimal temperature value, the data center consumes the least amount of electrical energy during the preset period; and The determination module is used to obtain an arithmetic progression consisting of multiple temperature values ​​to be measured as verification data, and use the verification data to determine whether the prediction model has ended training.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the training method of the prediction model described in any one of claims 1 to 8 is executed by running the computer program on the device where the non-volatile storage medium is located.

11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the prediction model training method according to any one of claims 1 to 8 through the computer program.

12. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the training method of the prediction model described in any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Model training method and device, business execution method and device and storage medium

    CN119357672A