Method and device for determining power consumption of equipment and equipment
By grouping and least squares fitting processing of computer room equipment, the problem of inaccurate collection of power consumption information in the computer room equipment is solved, and the accuracy and efficiency of power consumption information is improved.
Patent Information
- Application Number
- CN202410072610.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the collection of power consumption information of equipment in the computer room is inaccurate and incomplete, resulting in low accuracy in determining power consumption information of each device type.
By grouping the equipment of each cabinet in the computer room, the historical power consumption of each cabinet is obtained, and the least squares method is used for fitting, and combining the equipment group information and power consumption constraints, the power consumption of each equipment type in the computer room is determined.
It improves the accuracy of equipment power consumption information, avoids the problems of inaccurate and incomplete collection, and is fitted through the least squares method, which has the effect of filtering noise and saves the abnormal filtering process.
Smart Images

Figure CN120336109A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular, to a method, apparatus, and device for determining device power consumption. Background Art
[0002] A computer room may include multiple cabinets, and each cabinet may include multiple devices such as servers or network devices. In actual work, the power consumption information of each device can be obtained to optimize the power consumption of the computer room.
[0003] In the related art, the actual power consumption of each device can be collected for statistics and analysis to obtain the power consumption information of various types of devices. However, in the actual collection process, there are usually inaccurate and incomplete collection situations, resulting in low accuracy in determining the power consumption information of various types of devices. Summary of the Invention
[0004] Multiple aspects of this application provide a method, apparatus, and device for determining device power consumption to improve the accuracy of determining the power consumption information of each device type.
[0005] In a first aspect, an embodiment of this application provides a method for determining device power consumption, including:
[0006] Group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet, where the device types of the devices in the device group are the same;
[0007] Obtain the historical power consumption of each cabinet, where the historical power consumption is the sum of the power consumption of the devices in the cabinet;
[0008] Determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, where the device group information includes the device type and the number of devices.
[0009] In a possible implementation manner, determining the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet includes:
[0010] Determine multiple device types and the power consumption constraint conditions corresponding to the multiple device types, where the power consumption constraint conditions include at least one of the following: the power consumption range of the device type, the power consumption relationship between different device types;
[0011] Perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint condition by the least squares method until the accuracy of the obtained fitting result is greater than or equal to the preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process;
[0012] Among them, the fitting result includes the estimated device power consumption corresponding to each device type.
[0013] In a possible implementation manner, performing at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint condition by the least squares method until the accuracy of the obtained fitting result is greater than or equal to the preset threshold, and then determining the device power consumption corresponding to each device type according to the fitting result of the last fitting process, includes:
[0014] Determine the i-th cabinet set among the multiple cabinets;
[0015] Perform the i-th fitting process on the historical power consumption of each cabinet in the i-th cabinet set, the device group information of at least one device group corresponding to each cabinet in the i-th cabinet set, and the power consumption constraint condition corresponding to the i-th cabinet set by the least squares method, obtain the i-th fitting result, and determine the accuracy of the i-th fitting result;
[0016] Among them, i takes 1, 2,..., until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, and then determine the device power consumption corresponding to each device type according to the i-th fitting result.
[0017] In a possible implementation manner, determining the i-th cabinet set among the multiple cabinets includes:
[0018] If i is 1, then determine the multiple cabinets as the i-th cabinet set;
[0019] If i is greater than 1, then determine the i-th cabinet set according to the (i - 1)-th fitting result in the (i - 1)-th cabinet set, and the cabinets in the (i - 1)-th cabinet set are the cabinets participating in the (i - 1)-th fitting process.
[0020] In a possible implementation manner, determining the i-th cabinet set according to the (i - 1)-th fitting result in the (i - 1)-th cabinet set includes:
[0021] For any cabinet in the $(i - 1)$-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the $(i - 1)$-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the estimated deviation degree of the cabinet according to the estimated power consumption of the cabinet and the historical power consumption of the cabinet;
[0022] Determine the cabinets in the $(i - 1)$-th cabinet set with an estimated deviation degree less than or equal to the first threshold as the cabinets in the $i$-th cabinet set.
[0023] In a possible implementation manner, perform the $i$-th fitting process on the historical power consumption of each cabinet in the $i$-th cabinet set, the device group information of at least one device group corresponding to each cabinet in the $i$-th cabinet set, and the power consumption constraint condition corresponding to the $i$-th cabinet set by the least squares method to obtain the $i$-th fitting result, including:
[0024] For any cabinet in the $i$-th cabinet set, generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet, where the cabinet vector includes the device quantities corresponding to each device type included in the cabinet;
[0025] Perform a splicing process on the cabinet vectors corresponding to each cabinet in the $i$-th cabinet set to obtain an independent variable matrix;
[0026] Determine a dependent variable matrix according to the historical power consumption of each cabinet in the $i$-th cabinet set;
[0027] Perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the $i$-th cabinet set by the least squares method to obtain the $i$-th fitting result.
[0028] In a possible implementation manner, determine the accuracy of the $i$-th fitting result, including:
[0029] For any cabinet in the $i$-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the $i$-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet as the estimated deviation degree corresponding to the cabinet;
[0030] Determine the accuracy of the $i$-th fitting result according to the estimated deviation degrees corresponding to each cabinet in the $i$-th cabinet set.
[0031] In a possible implementation manner, determining the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set includes:
[0032] If the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set are respectively less than or equal to the first threshold, it is determined that the accuracy of the i-th fitting result is greater than or equal to the preset threshold;
[0033] If there is a cabinet in the i-th cabinet set whose corresponding estimated deviation degree is greater than the first threshold, it is determined that the accuracy of the i-th fitting result is less than the preset threshold.
[0034] In a possible implementation manner, determining the device power consumption corresponding to each device type according to the i-th fitting result includes:
[0035] For any one device type, obtain the estimated device power consumption corresponding to the device type in the i-th fitting result, and determine the estimated device power consumption as the device power consumption corresponding to the device type.
[0036] In a possible implementation manner, for any one cabinet in the computer room; performing grouping processing on the devices in the cabinet in the computer room to obtain at least one device group corresponding to the cabinet, including:
[0037] Determine a preset plurality of device types and the standard device information corresponding to each device type;
[0038] Obtain the device information of each device in the cabinet;
[0039] For any one device in the cabinet, perform matching processing on the device information of the device with the standard device information corresponding to each device type to determine the device type corresponding to the device;
[0040] Divide the devices with the same device type in the cabinet into one device group to obtain the at least one device group.
[0041] In a second aspect, an embodiment of the present application provides a device power consumption determination device, including: a grouping module, an acquisition module, and a determination module, where,
[0042] The grouping module is configured to perform grouping processing on the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet, and the device types of the devices in the device group are the same;
[0043] The acquisition module is configured to acquire the historical power consumption of each cabinet, and the historical power consumption is the sum of the power consumptions of the devices in the cabinet;
[0044] The determining module is configured to determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, where the device group information includes the device type and the number of devices.
[0045] In a possible implementation manner, the determining module is specifically configured to:
[0046] Determine multiple device types and the power consumption constraint conditions corresponding to the multiple device types, where the power consumption constraint conditions include at least one of the following: the power consumption range of the device type, the power consumption relationship between different device types;
[0047] Perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by using the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process;
[0048] Wherein, the fitting result includes the estimated device power consumption corresponding to each device type.
[0049] In a possible implementation manner, the determining module is specifically configured to:
[0050] Determine the i-th cabinet set in the multiple cabinets;
[0051] Perform the i-th fitting process on the historical power consumption of each cabinet in the i-th cabinet set, the device group information of at least one device group corresponding to each cabinet in the i-th cabinet set, and the power consumption constraint conditions corresponding to the i-th cabinet set by using the least squares method, obtain the i-th fitting result, and determine the accuracy of the i-th fitting result;
[0052] Wherein, i takes values of 1, 2,..., until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, and then determine the device power consumption corresponding to each device type according to the i-th fitting result.
[0053] In a possible implementation manner, the determining module is specifically configured to:
[0054] If i is 1, then determine the multiple cabinets as the i-th cabinet set;
[0055] If i is greater than 1, then determine the i-th cabinet set in the (i - 1)-th cabinet set according to the (i - 1)-th fitting result, and the cabinets in the (i - 1)-th cabinet set are the cabinets participating in the (i - 1)-th fitting process.
[0056] In a possible implementation manner, the determining module is specifically configured to:
[0057] For any cabinet in the (i - 1)-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumptions corresponding to each device type in the (i - 1)-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the estimated deviation degree of the cabinet according to the estimated power consumption of the cabinet and the historical power consumption of the cabinet;
[0058] Determine the cabinets in the (i - 1)-th cabinet set with an estimated deviation degree less than or equal to the first threshold as the cabinets in the i-th cabinet set.
[0059] In a possible implementation manner, the determining module is specifically configured to:
[0060] For any cabinet in the i-th cabinet set, generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet, where the cabinet vector includes the number of devices corresponding to each device type included in the cabinet;
[0061] Perform a splicing process on the cabinet vectors corresponding to the cabinets in the i-th cabinet set to obtain an independent variable matrix;
[0062] Determine a dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set;
[0063] Perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set through the least squares method to obtain the i-th fitting result.
[0064] In a possible implementation manner, the determining module is specifically configured to:
[0065] For any cabinet in the i-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumptions corresponding to each device type in the i-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet as the estimated deviation degree corresponding to the cabinet;
[0066] Determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set.
[0067] In a possible implementation manner, the determining module is specifically configured to:
[0068] If the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set are respectively less than or equal to the first threshold, determine that the accuracy of the i-th fitting result is greater than or equal to the preset threshold;
[0069] If the estimated deviation degree corresponding to a cabinet in the i-th cabinet set is greater than the first threshold, it is determined that the accuracy of the i-th fitting result is less than the preset threshold.
[0070] In a possible implementation manner, the determining module is specifically configured to:
[0071] For any device type, obtain the estimated device power consumption corresponding to the device type in the i-th fitting result, and determine the estimated device power consumption as the device power consumption corresponding to the device type.
[0072] In a possible implementation manner, for any cabinet in the computer room; the grouping module is specifically configured to:
[0073] Determine a plurality of preset device types and the standard device information corresponding to each device type;
[0074] Obtain the device information of each device in the cabinet;
[0075] For any device in the cabinet, perform a matching process on the device information of the device and the standard device information corresponding to each device type to determine the device type corresponding to the device;
[0076] Divide the devices with the same device type in the cabinet into one device group to obtain the at least one device group.
[0077] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;
[0078] The memory stores computer execution instructions;
[0079] The processor executes the computer execution instructions stored in the memory, so that the processor executes the method according to any one of the first aspect.
[0080] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the method according to any one of the first aspect.
[0081] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the first aspect.
[0082] The embodiments of the present application provide a method, an apparatus, and a device for determining device power consumption. An electronic device can group the devices in each cabinet in a computer room to obtain at least one device group corresponding to each cabinet. The electronic device can obtain the historical power consumption of each cabinet, and then can determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet. The device group information includes the device type and the number of devices. Since the device power consumption corresponding to each device type in the computer room can be determined according to the historical power consumption of each cabinet and by device group, without collecting the actual power consumption of each device, the problems of inaccurate and incomplete collection are avoided; and through the least squares method for fitting processing, it has the effect of filtering noise, can save the complex abnormal filtering process, and comprehensively improves the accuracy of determining the power consumption information of each device type in the computer room. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0084] Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of the present application;
[0085] Figure 2 is a schematic flowchart of a method for determining device power consumption provided by an exemplary embodiment of the present application;
[0086] Figure 3 is a schematic diagram of the process of another method for determining device power consumption provided by an exemplary embodiment of the present application;
[0087] Figure 4 is a schematic diagram of the process of a method for determining device power consumption provided by an exemplary embodiment of the present application;
[0088] Figure 5 is a schematic structural diagram of a device for determining device power consumption provided by an exemplary embodiment of the present application;
[0089] Figure 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0090] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0091] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments of this application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application.
[0092] Figure 1 A schematic diagram of a scenario provided for an exemplary embodiment of this application. Please refer to Figure 1 , and the computer room may include multiple cabinets. For example, the multiple cabinets may be Cabinet 1, Cabinet 2,..., Cabinet n respectively, where n is an integer greater than or equal to 1.
[0093] Each cabinet may include multiple device groups. Each device group may include multiple devices. For example, Cabinet 1 may include 5 device groups, namely Device Group 1, Device Group 2, Device Group 3, Device Group 4, and Device Group 5. Device Group 1 may include 8 devices, namely Device 1-1, Device 1-2,..., Device 1-8.
[0094] The historical power consumption corresponding to each cabinet can be obtained. For example, the historical power consumption 1 corresponding to Cabinet 1, the historical power consumption 2 corresponding to Cabinet 2,..., and the historical power consumption n corresponding to Cabinet n can be obtained.
[0095] The electronic device can determine the device power consumption corresponding to various devices in the computer room according to the n historical power consumptions according to the device type, that is, the device power consumption corresponding to each device can be determined.
[0096] In the related art, the actual power consumption of each device can be collected for statistics and analysis to obtain the power consumption information of each device. However, in the actual collection process, there are usually inaccurate and incomplete collection situations, resulting in low accuracy in determining the power consumption information of each device.
[0097] In the embodiments of the present application, an electronic device may group the devices in each cabinet in a computer room to obtain at least one device group corresponding to each cabinet, and obtain the historical power consumption of each cabinet. Furthermore, the power consumption of each device type in the computer room may be determined according to the historical power consumption of each cabinet and the device group information corresponding to each cabinet. Since the power consumption of each device type in the computer room can be determined according to the historical power consumption of each cabinet and by device group, without collecting the actual power consumption of each device, the problems of inaccurate and incomplete collection are avoided, and the accuracy of determining the power consumption information of each device is improved.
[0098] Next, the technical solution shown in the present application will be described in detail through specific embodiments. It should be noted that the following several embodiments may exist independently or may be combined with each other. For the same or similar content, it will not be repeated in different embodiments.
[0099] Figure 2 A flowchart of a method for determining device power consumption provided for an exemplary embodiment of the present application. Please refer to Figure 2 The method may include:
[0100] S201. Group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet.
[0101] The execution subject of the embodiments of the present application may be an electronic device or a device power consumption determination device provided in the electronic device. The device power consumption determination device may be implemented by software or by a combination of software and hardware. The device power consumption determination device may be a processor in the electronic device. For the sake of easy understanding, in the following, the execution subject is taken as an electronic device for illustration.
[0102] The device types of the devices in the device group are the same, that is, the device information of the devices in the device group is the same in multiple preset dimensions.
[0103] In an optional embodiment, for any cabinet in the computer room; group the devices in the cabinet in the computer room to obtain at least one device group corresponding to the cabinet: determine a plurality of preset device types and the standard device information corresponding to each device type; obtain the device information of each device in the cabinet; for any device in the cabinet, match the device information of the device with the standard device information corresponding to each device type to determine the device type corresponding to the device; divide the devices with the same device type in the cabinet into one device group to obtain at least one device group.
[0104] The standard device information may include device information corresponding to multiple preset dimensions. For example, the preset dimensions may be device model, bandwidth range, running task, and running status, etc.
[0105] For example, the standard device information 1 corresponding to device type 1 may include: the device model is model 1, the bandwidth range is 1M (mega) to 5M, the running task is calculation, and the running status is online.
[0106] For example, if there are 15 preset device types, the standard device information corresponding to these 15 device types is shown in Table 1:
[0107] Table 1
[0108]
[0109]
[0110] If there are 20 devices in cabinet 1, the device information of these 20 devices can be obtained, and the device information of these 20 devices can be matched with the standard device information corresponding to each device type to determine the device types corresponding to these 20 devices respectively. As shown in Table 1, 5 device groups corresponding to cabinet 1 can be determined.
[0111] Specifically, for example, if device 1, device 2, and device 3 are all of model 1, the bandwidth range is all 1M to 5M, the running tasks are all calculation, and the running status is all online status, then it can be determined that these 3 devices correspond to device type 1, and these 3 devices can be divided into device group 1; similarly, device 4, device 5, device 6, device 7, device 8, and device 9 can be divided into device group 2;...; device 19 and device 20 can be divided into device group 5.
[0112] For example, if there are 10 cabinets, namely cabinet 1, cabinet 2,..., cabinet 10, then at least one device group corresponding to each of these 10 cabinets can be determined by the above method.
[0113] S202. Obtain the historical power consumption of each cabinet.
[0114] The historical power consumption is the sum of the power consumptions of the devices in the cabinet. The historical power consumption can be represented by power, and the unit is watt (W).
[0115] Optionally, for any cabinet, the electronic device can obtain multiple initial historical power consumptions of the cabinet, and perform outlier removal processing and statistical processing on the multiple initial historical power consumptions to obtain the historical power consumption, which may include the historical power consumption mean and the historical power consumption variance.
[0116] Optionally, the initial historical power consumption can be obtained in the Energy Management System (EMS). Obtaining the initial historical power consumption of each cabinet in the EMS system can simplify the data collection process.
[0117] For any cabinet, multiple initial historical power consumptions can be collected at each historical moment within a preset time period according to the collection period. For example, if the preset time period is 24h and the collection period is 30min, then according to the collection period of 30min, 48 initial historical power consumptions of cabinet 1 can be collected at 48 historical moments within 24h.
[0118] An outlier refers to a power consumption value that is significantly unreasonable. For example, if the power of each device in cabinet 1 is at least 100W, then when cabinet 1 is running, the initial historical power consumption of cabinet 1 is at least 100W. If the initial historical power consumption 1 is 5W, then it can be determined that the initial historical power consumption 1 is an outlier.
[0119] For example, if 48 initial historical power consumptions of cabinet 1 are collected, outliers can be removed from these 48 initial historical power consumptions. Suppose there are 45 initial historical power consumptions left after removing the outliers, then statistical processing can be performed on these 45 initial historical power consumptions to obtain the historical power consumption mean 1 and the historical power consumption variance 1 of cabinet 1, and it can be determined that the historical power consumption of cabinet 1 includes the historical power consumption mean 1 and the historical power consumption variance 1.
[0120] For example, if there are 10 cabinets, the historical power consumptions corresponding to the 10 cabinets can be obtained. Suppose the historical power consumptions corresponding to the 10 cabinets are as shown in Table 2:
[0121] Table 2
[0122]
[0123]
[0124] S203. Determine the device power consumptions corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet.
[0125] For any device group, the device group information of the device group may include the device type and the number of devices. The number of devices refers to the number of devices in the device group.
[0126] For example, for device group 1 in Table 1, the device group information 1 may include device type 1 and the number of devices is 3 (indicating that there are 3 devices in device group 1).
[0127] For example, if there are 10 cabinets, suppose the device group information of at least one device group corresponding to the 10 cabinets is as shown in Table 3:
[0128] Table 3
[0129]
[0130] As shown in Table 3, for cabinet 1, cabinet 1 can have 5 corresponding device groups, namely device group 1-1, device group 1-2, device group 1-3, device group 1-4, and device group 1-5. Among them, the device group information 1-1 of device group 1-1 includes device type 1 and the number of devices is 3; the device group information 1-2 of device group 1-2 includes device type 2 and the number of devices is 6;...; the device group information 1-5 of device group 1-5 includes device type 5 and the number of devices is 2.
[0131] For cabinet 2, cabinet 2 can have 4 corresponding device groups, namely device group 2-1, device group 2-2, device group 2-3, and device group 2-4. Among them, the device group information 2-1 of device group 2-1 can include device type 2 and the number of devices is 5; the device group information 2-2 of device group 2-2 can include device type 3 and the number of devices is 7;...; the device group information 2-4 of device group 2-4 can include device type 15 and the number of devices is 7.
[0132] In an optional embodiment, the device power consumption corresponding to each device type in the computer room can be determined by the following method according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet: determine multiple device types and the power consumption constraint conditions corresponding to the multiple device types; perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process.
[0133] Optionally, for any device type, the device power consumption corresponding to the device type may include: the average device power consumption and the variance of the device power consumption.
[0134] The power consumption constraint conditions can be preset manually. Optionally, the power consumption constraint conditions include at least one of the following: the power consumption range of the device type, the power consumption relationship between different device types.
[0135] For example, the power consumption range of the device type can be: the power consumption range of device type 1 is greater than 100; the power consumption relationship between different device types can be: the device power consumption corresponding to device type 2 is greater than the device power consumption corresponding to device type 3.
[0136] The fitting result may include the estimated device power consumption corresponding to each device type. The estimated device power consumption may include the estimated average device power consumption and the variance of the estimated device power consumption.
[0137] For example, if there are 15 device types, the power consumption constraint conditions corresponding to the 15 device types can be determined. If there are 10 cabinets, and the historical power consumption of the 10 cabinets is as shown in Table 2, and the device group information of at least one device group corresponding to the 10 cabinets is as shown in Table 3, then at least one fitting process can be performed on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by using the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold. At this time, the device power consumption corresponding to each of the 15 device types is determined according to the fitting result of the last fitting process.
[0138] For any device type, the device power consumption corresponding to the device type is the device power consumption of the device corresponding to the device type.
[0139] For example, if it is determined that the device power consumption corresponding to device type 1 includes a device power consumption mean of 200W and a device power consumption variance of 310W, and if device 1, device 2, and device 3 correspond to device type 1, then it can be determined that the device power consumption of device 1, device 2, and device 3 all includes: a device power consumption mean of 200W and a device power consumption variance of 310W.
[0140] Optionally, after determining the device power consumption corresponding to each device type, the device power consumption of all devices can be output, or the device power consumption of some devices can be selectively output. For example, the device power consumption of devices with an operating status of "online" can be output.
[0141] In the embodiments of the present application, the electronic device can group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet. The electronic device can obtain the historical power consumption of each cabinet, and then can determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet. The device group information includes the device type and the number of devices. Since the device power consumption corresponding to each device type in the computer room can be determined according to the historical power consumption of each cabinet according to the device group, without collecting the actual power consumption of each device, the problems of inaccurate and incomplete collection are avoided; and through the fitting process using the least squares method, the effect of filtering noise can be achieved, which can save the complex abnormal filtering process and comprehensively improve the accuracy of determining the power consumption information of each device type in the computer room.
[0142] In an optional embodiment, the device power consumption corresponding to each device type can be determined by the least squares method in the following manner: determine the i-th cabinet set among multiple cabinets; perform the i-th fitting process on the historical power consumption of each cabinet in the i-th cabinet set, the device group information of at least one device group corresponding to each cabinet in the i-th cabinet set, and the power consumption constraint condition corresponding to the i-th cabinet set by the least squares method to obtain the i-th fitting result, and determine the accuracy of the i-th fitting result; where i takes values of 1, 2,..., until the accuracy of the i-th fitting result is greater than or equal to a preset threshold, and determine the device power consumption corresponding to each device type according to the i-th fitting result.
[0143] Next, in conjunction with Figure 3 , the above process will be described in detail.
[0144] Figure 3 It is a schematic process diagram of another method for determining device power consumption provided by an exemplary embodiment of the present application. Please refer to Figure 3 , the method may include:
[0145] S301. Initialize i to 1.
[0146] i is an integer greater than or equal to 1 and can take values of 1, 2,.... Initializing i to 1 means starting from i = 1.
[0147] S302. Determine the i-th cabinet set among multiple cabinets.
[0148] Optionally, determining the i-th cabinet set among multiple cabinets includes the following two cases:
[0149] Case 1: i = 1.
[0150] In this case, multiple cabinets can be determined as the i-th cabinet set.
[0151] For example, if there are 10 cabinets, then these 10 cabinets can be determined as the 1st cabinet set, and the 1st cabinet set includes 10 cabinets, namely cabinet 1, cabinet 2,..., cabinet 10.
[0152] Case 2: i > 1.
[0153] In this case, the i-th cabinet set can be determined in the (i - 1)-th cabinet set according to the (i - 1)-th fitting result.
[0154] The cabinets in the (i - 1)-th cabinet set are the cabinets participating in the (i - 1)-th fitting process.
[0155] In an optional embodiment, the i-th cabinet set can be determined from the (i - 1)-th cabinet set according to the (i - 1)-th fitting result in the following manner: for any cabinet in the (i - 1)-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the (i - 1)-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the estimated deviation degree of the cabinet according to the estimated power consumption of the cabinet and the historical power consumption of the cabinet; determine the cabinets in the (i - 1)-th cabinet set with an estimated deviation degree less than or equal to the first threshold as the cabinets in the i-th cabinet set.
[0156] The (i - 1)-th fitting result may include the estimated device power consumption corresponding to each device type. The estimated device power consumption may include the estimated device power consumption mean and the estimated device power consumption variance.
[0157] The estimated power consumption of the cabinet may include the estimated power consumption mean and the estimated power consumption variance.
[0158] For any cabinet, the estimated deviation degree of the cabinet can be determined by taking the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption to the historical power consumption mean. Since the estimated power consumption includes the estimated power consumption mean and the estimated power consumption variance, and the historical power consumption includes the historical power consumption mean and the historical power consumption variance, the ratio of the absolute value of the difference between the estimated power consumption mean and the historical power consumption mean to the historical power consumption mean can be determined as the estimated deviation degree of the cabinet.
[0159] The first threshold can be preset manually. For example, the first threshold can be 15%.
[0160] For example, if there are 15 device types and i - 1 is 1, the (i - 1)-th fitting result may include the estimated device power consumption corresponding to the 15 device types, as shown in Table 4 for example:
[0161] Table 4
[0162]
[0163]
[0164] For example, if the first cabinet set includes 10 cabinets, and the device group information of these 10 cabinets is shown in Table 3. If Cabinet 1 corresponds to 5 device groups, then the estimated power consumption of Cabinet 1 can be determined based on the device group information of these 5 device groups and the estimated device power consumption corresponding to each device type in Table 4, including: the average estimated power consumption 1 is 3 * 200 + 6 * 150 + 5 * 230 + 4 * 170 + 2 * 300 + 100 = 4030W, and the variance of the estimated power consumption 1 is 3 * 310 + 6 * 100 + 5 * 160 + 4 * 190 + 2 * 180 + 100 = 3550W. If the historical power consumption of Cabinet 1 includes a historical average power consumption of 4500W and a historical power consumption variance of 3970W, then the estimated deviation degree 1 of Cabinet 1 can be determined as Similarly, the estimated deviation degrees 1 of Cabinet 2, ……, Cabinet 10 can be determined respectively. Assume that the estimated deviation degrees 1 of these 10 cabinets are shown in Table 5 as follows:
[0165] Table 5
[0166] Cabinet Estimated deviation 1 Cabinet 1 10% Cabinet 2 14% Cabinet 3 15% Cabinet 4 60% Cabinet 5 13% Cabinet 6 32% Cabinet 7 11% Cabinet 8 15% Cabinet 9 13% Cabinet 10 12%
[0167] If the first threshold is 15%, then the cabinets in these 10 cabinets with estimated deviation degrees 1 less than or equal to 15% respectively can be determined as the cabinets in the second cabinet set. Then the second cabinet set may include Cabinet 1, Cabinet 2, Cabinet 3, Cabinet 5, Cabinet 7, Cabinet 8, Cabinet 9, and Cabinet 10.
[0168] S303. For any cabinet in the i-th cabinet set, generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet.
[0169] The cabinet vector may include the number of devices corresponding to each device type included in the cabinet.
[0170] For example, if i is 2, the second cabinet set includes 8 cabinets, namely cabinet 1, cabinet 2, cabinet 3, cabinet 5, cabinet 7, cabinet 8, cabinet 9, and cabinet 10. If the device group information corresponding to each cabinet is as shown in Table 3, then for cabinet 1, since cabinet 1 corresponds to 5 device groups, the device group information 1-1 of device group 1-1 includes device type 1 and device quantity 3, the device group information 1-2 of device group 1-2 includes device type 2 and device quantity 6,..., the device group information 1-5 of device group 1-5 includes device type 5 and device quantity 2. Then, the cabinet vector 1 corresponding to cabinet 1 can be determined as (3, 6, 5, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) according to the 5 device group information. In the cabinet vector 1, "3" represents the device quantity 3 corresponding to device type 1 in device group 1; "6" represents the device quantity 6 corresponding to device type 2 in device group 2;...; "2" represents the device quantity 2 corresponding to device type 5 in device group 5. Since there are no devices corresponding to device types 6 to 15 in cabinet 1, the 6th to 15th positions in the cabinet vector 1 are 0.
[0171] Similarly, the cabinet vector 2 of cabinet 2 can be determined as (0, 5, 7, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3); the cabinet vector 3 of cabinet 3 can be determined as (2, 3, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);...; the cabinet vector 10 of cabinet 10 can be determined as (5, 4, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5).
[0172] S304. Concatenate the cabinet vectors corresponding to each cabinet in the i-th cabinet set to obtain an independent variable matrix.
[0173] For example, if there are 8 cabinets in the second cabinet set and the cabinet vectors corresponding to each cabinet are as shown in the above example, then the 8 cabinet vectors can be concatenated to obtain the independent variable matrix corresponding to the second cabinet set, as shown in matrix X2 below:
[0174]
[0175] In the independent variable matrix X2, the j-th row represents the cabinet vector corresponding to the j-th cabinet. For example, the first row represents the cabinet vector 1 corresponding to the first cabinet (i.e., cabinet 1), the second row represents the cabinet vector 2 corresponding to the second cabinet (i.e., cabinet 2),..., and the 8th row represents the cabinet vector 10 corresponding to the 8th cabinet (i.e., cabinet 10).
[0176] S305. Determine the dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set.
[0177] Optionally, the dependent variable matrix may include a historical power consumption mean matrix and a historical power consumption variance matrix.
[0178] For example, if i is 2, the second cabinet set includes 8 cabinets, namely cabinet 1, cabinet 2, cabinet 3, cabinet 5, cabinet 7, cabinet 8, cabinet 9, and cabinet 10. If the historical power consumption of each cabinet is as shown in Table 2, the historical power consumption mean and historical power consumption variance of these 8 cabinets can be determined in Table 2. Furthermore, the historical power consumption mean matrix can be determined based on the 8 historical power consumption means, such as matrix Y 2-1 as shown:
[0179]
[0180] Among them, the j-th element represents the historical power consumption mean corresponding to the j-th cabinet. For example, the first element represents the historical power consumption mean of 4500W corresponding to the first cabinet (i.e., cabinet 1); the second element represents the historical power consumption mean of 5590W corresponding to the second cabinet (i.e., cabinet 2);...; the eighth element represents the historical power consumption mean of 5810W corresponding to the eighth cabinet (i.e., cabinet 10).
[0181] Similarly, the historical power consumption variance matrix can be determined based on the 8 historical power consumption variances, such as matrix Y 2-2 as shown:
[0182]
[0183] Among them, the j-th element represents the historical power consumption variance corresponding to the j-th cabinet. For example, the first element represents the historical power consumption variance of 3970W corresponding to the first cabinet (i.e., cabinet 1); the second element represents the historical power consumption variance of 3900W corresponding to the second cabinet (i.e., cabinet 2);...; the eighth element represents the historical power consumption variance of 5200W corresponding to the eighth cabinet (i.e., cabinet 10).
[0184] S306. Perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set by the least squares method to obtain the i-th fitting result.
[0185] Optionally, in the least squares method, the fitting formula used is as follows in formula (1):
[0186] Y i = β * X i + b formula (1)
[0187] Among them, b can be a preset constant; X i represents the independent variable matrix of the i-th fitting; Y iDenote the dependent variable matrix for the i-th fitting, including the historical power consumption mean matrix and the historical power consumption variance matrix. When the dependent variable matrix is the historical power consumption mean matrix, β can be β1, and when the dependent variable matrix is the historical power consumption variance matrix, β can be β2.
[0188] If the cabinets in the second cabinet set correspond to a total of 15 device types, then β1 can include 15 values, namely A1, B1, C1, ……, O1; β2 can include 15 values, namely A2, B2, C2, ……, O2;
[0189] Since the i-th fitting result can include the estimated device power consumption mean corresponding to each device type and the estimated device power consumption variance, when determining the estimated device power consumption mean corresponding to each device type, the independent variable matrix X2 and the historical power consumption mean matrix Y 2-1 can be substituted into the fitting formula of the least squares method. If b is 100, the following formula (2) can be obtained:
[0190]
[0191] If i is 2, the power consumption constraint condition corresponding to the second cabinet set is: the power consumption range of device type 1 is greater than 100, and the device power consumption corresponding to device type 2 is greater than the device power consumption corresponding to device type 3. Then this constraint condition can be expressed as the following formula (3) and formula (4):
[0192] A1 > 100 Formula (3)
[0193] A1 > B1 Formula (4)
[0194] Then, the fitting process can be carried out by combining formula (2), formula (3), and formula (4) to obtain A1, B1, C1, ……, O1. Among them, A1 is the estimated device power consumption mean corresponding to device type 1; B1 is the estimated device power consumption mean corresponding to device type 2; ……; O1 is the estimated device power consumption mean corresponding to device type 15.
[0195] When determining the estimated device power consumption variance corresponding to each device type, the independent variable matrix X2 and the historical power consumption variance matrix Y 2-2 can be substituted into the fitting formula of the least squares method. If b is 100, the following formula (5) can be obtained:
[0196]
[0197] Then, the formula (5) can be fitted to obtain A2, B2, C2, ……, O2. Among them, A2 is the estimated variance of the device power consumption corresponding to device type 1; B2 is the estimated variance of the device power consumption corresponding to device type 2; ……; O2 is the estimated variance of the device power consumption corresponding to device type 15.
[0198] The second fitting result may include the estimated average device power consumption and the estimated variance of the device power consumption corresponding to each device type, as shown in Table 6:
[0199] Table 6
[0200]
[0201] S307. For any cabinet in the i-th cabinet set, according to the estimated device power consumption corresponding to each device type in the i-th fitting result and the device group information of at least one device group corresponding to the cabinet, determine the estimated power consumption of the cabinet, and determine the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet as the estimated deviation degree corresponding to the cabinet.
[0202] Optionally, since β1 and β2 can be obtained by fitting through the least squares method, where β1 includes A1, B1, C1, ……, O1; β2 includes A2, B2, C2, ……, O2, β1 can be substituted into the fitting formula to calculate the estimated average power consumption of each cabinet; β2 can be substituted into the fitting formula to calculate the estimated variance of the device power consumption of each cabinet.
[0203] For example, if i is 2, the preset device power consumption corresponding to each device type in the second fitting result is as shown in Table 6, and the device group information is as shown in Table 3, then β1 can be substituted into formula (1) to obtain the following formula (6):
[0204]
[0205] Assume that it can be calculated that
[0206] Then, it can be determined that the estimated average power consumption 2 of the first cabinet (i.e., cabinet 1) is 4180W; the estimated average power consumption 2 of the second cabinet (i.e., cabinet 2) is 4810W; ……; the estimated average power consumption 2 of the eighth cabinet (i.e., cabinet 10) is 5290W.
[0207] Similarly, β2 can be substituted into formula (2) to obtain the following formula (7):
[0208]
[0209] Assume that it can be calculated that
[0210] Then, it can be determined that the estimated power consumption variance 2 corresponding to the first cabinet (i.e., Cabinet 1) is 3380 W; the estimated power consumption variance 2 corresponding to the second cabinet (i.e., Cabinet 2) is 3400 W;...; the estimated power consumption variance 2 corresponding to the eighth cabinet (i.e., Cabinet 10) is 5110 W.
[0211] Since the estimated power consumption includes the estimated power consumption mean and the estimated power consumption variance, and the historical power consumption includes the historical power consumption mean and the historical power consumption variance, if the estimated deviation degree of the cabinet is determined according to the estimated power consumption mean and the historical power consumption mean, then for the first cabinet (i.e., Cabinet 1), the estimated deviation degree 2 corresponding to Cabinet 1 can be determined as For the second cabinet (i.e., Cabinet 2), the estimated deviation degree 2 corresponding to Cabinet 2 can be determined as For the eighth cabinet (i.e., Cabinet 10), the estimated deviation degree 2 corresponding to Cabinet 10 can be determined as
[0212] S308. Determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set.
[0213] In an optional embodiment, the accuracy of the i-th fitting result can be determined according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set in the following manner: if the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set are respectively less than the first threshold, it is determined that the accuracy of the i-th fitting result is greater than or equal to the preset threshold; if there is a cabinet in the i-th cabinet set whose estimated deviation degree is greater than or less than the first threshold, it is determined that the accuracy of the i-th fitting result is less than the preset threshold.
[0214] The preset threshold can be preset manually. For example, the preset threshold can be 85%.
[0215] For example, if i is 2, the second cabinet set includes 8 cabinets, and the estimated deviation degrees 2 corresponding to each cabinet are as shown in the above example. If the first threshold is 15%, and the estimated deviation degrees 2 of these 8 cabinets are respectively less than 15%, then it can be determined that the accuracy of the second fitting result is greater than or equal to 15%; if there is a cabinet in the 8 cabinets included in the second cabinet set whose estimated deviation degree is greater than 15%, then it can be determined that the accuracy of the second fitting result is greater than 85%.
[0216] S309. When the accuracy of the i-th fitting result is less than the preset threshold, update i to i + 1.
[0217] For example, if i is 2, and if the accuracy of the second fitting result is less than the preset threshold, then 2 can be updated to 3, and the third fitting is performed.
[0218] S310. Until the accuracy of the i-th fitting result is greater than or equal to a preset threshold, determine the device power consumption corresponding to each device type according to the i-th fitting result.
[0219] In an alternative embodiment, the device power consumption corresponding to each device type can be determined according to the i-th fitting result in the following manner: for any device type, obtain the estimated device power consumption corresponding to the device type in the i-th fitting result, and determine the estimated device power consumption as the device power consumption corresponding to the device type.
[0220] For example, if the accuracy of the second fitting result is greater than or equal to the preset threshold, and the second fitting result is as shown in Table 6, then in Table 6, the average estimated device power consumption of 200W and the variance of the estimated device power consumption of 310W corresponding to device type 1 can be determined as the average device power consumption of 200W and the variance of the device power consumption of 310W corresponding to device type 1; the average estimated device power consumption of 160W and the variance of the estimated device power consumption of 100W corresponding to device type 2 can be determined as the average device power consumption of 160W and the variance of the device power consumption of 100W corresponding to device type 2;...; the average estimated device power consumption of 310W and the variance of the estimated device power consumption of 330W corresponding to device type 15 can be determined as the average device power consumption of 310W and the variance of the device power consumption of 330W corresponding to device type 15.
[0221] In an embodiment of the present application, the electronic device may initialize i to 1 and determine the i-th cabinet set among multiple cabinets. For any cabinet in the i-th cabinet set, the electronic device may generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet, and then splice the cabinet vectors corresponding to the cabinets in the i-th cabinet set to obtain an independent variable matrix. The electronic device may determine a dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set. The electronic device may perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set through the least squares method to obtain the i-th fitting result. For any cabinet in the i-th cabinet set, the estimated power consumption of the cabinet may be determined according to the estimated device power consumption corresponding to each device type in the i-th fitting result and the device group information of at least one device group corresponding to the cabinet, and the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet may be determined as the estimated deviation degree corresponding to the cabinet. The electronic device may determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set, and update i to i + 1 when the accuracy of the i-th fitting result is less than a preset threshold. Until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, the device power consumption corresponding to each device type may be determined according to the i-th fitting result. Since the device power consumption corresponding to each device type in the computer room can be determined according to the historical power consumption of each cabinet by device group without collecting the actual power consumption of each device, the problems of inaccurate and incomplete collection are avoided; and through the fitting process by the least squares method, the effect of filtering noise can be achieved, which can save the complex abnormal filtering process and comprehensively improve the accuracy of determining the power consumption information of each device type in the computer room.
[0222] Next, on the basis of any of the above embodiments, in combination with Figure 4 , the above device power consumption determination method will be further described.
[0223] Figure 4 It is a schematic process diagram of a device power consumption determination method provided by an exemplary embodiment of the present application. Please refer to Figure 4 , including steps ①②③④⑤⑥⑦⑧⑨⑩
[0224] The computer room may include multiple cabinets, and each cabinet may include multiple devices. For example, the computer room may include 10 cabinets, and cabinet 1 may include 20 devices.
[0225] In step ①, the devices in each cabinet in the computer room can be grouped to obtain at least one device group corresponding to each cabinet. For example, the 20 devices in cabinet 1 can be grouped to obtain 5 device groups. Device group 1 may include device 1, device 2, and device 3; device group 2 may include device 4, device 5, device 6, device 7, device 8, and device 9; device group 3 may include device 10, device 11, device 12, device 13, and device 14; device group 5 may include device 15, device 16, device 17, and device 18; device group 5 may include device 19 and device 20. Similarly, each of cabinet 2, …, cabinet 10 may include at least one device group.
[0226] In step ②, multiple initial historical power consumptions corresponding to each cabinet can be obtained in the EMS system. For example, multiple initial historical power consumptions corresponding to cabinet 1, multiple initial historical power consumptions corresponding to cabinet 2, …, multiple initial historical power consumptions corresponding to cabinet 10 can be obtained.
[0227] In step ③, the multiple initial historical power consumptions corresponding to each cabinet can be processed to remove outliers and statistically processed to obtain the historical power consumption corresponding to each cabinet. The historical power consumption may include the historical power consumption mean and the historical power consumption variance. For example, the historical power consumption mean 1 and the historical power consumption variance 1 corresponding to cabinet 1, the historical power consumption mean 2 and the historical power consumption variance 2 corresponding to cabinet 2, …, the historical power consumption mean 10 and the historical power consumption variance 10 corresponding to cabinet 10 can be obtained.
[0228] When performing the i-th fitting process, the multiple cabinets included in the i-th cabinet set can be determined.
[0229] Each device group has corresponding device group information, and the device group information may include the device type and the number of devices. For example, the device group information 1 of device group 1 in cabinet 1 may include device type 1 and the number of devices 3. Therefore, in step ④, the device group information of at least one device group corresponding to each cabinet in the i-th cabinet set can be determined, as shown in Table 3.
[0230] In step ⑤, an independent variable matrix can be determined according to the device group information of at least one device group corresponding to each cabinet. Specifically, for any cabinet in the i-th cabinet set, a cabinet vector corresponding to the cabinet can be determined according to the device group information of at least one device group corresponding to the cabinet, and then the cabinet vectors corresponding to the cabinets in the i-th cabinet set are concatenated to obtain an independent variable matrix. For example, if i is 2, the independent variable matrix may be the matrix X2 shown above.
[0231] In step ⑥, the dependent variable matrix can be determined according to the historical power consumption of each cabinet in the i-th cabinet set. The dependent variable matrix can include the historical power consumption mean matrix and the historical power consumption variance matrix.
[0232] For example, if i is 2, the historical power consumption mean matrix can be like the above matrix Y 2-1 shown, and the historical power consumption variance matrix can be like the above matrix Y 2-2 shown.
[0233] In step ⑦, the independent variable matrix can be input into the least squares method model.
[0234] In step ⑧, the dependent variable matrix can be input into the least squares method model.
[0235] In step ⑨, the power consumption constraint condition corresponding to the i-th cabinet set can be determined and input into the least squares method model.
[0236] In step ⑩, the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set can be fitted through the least squares method model to obtain the i-th fitting result.
[0237] The i-th fitting result can include the estimated device power consumption i corresponding to each device type. The estimated device power consumption i can include the estimated device power consumption mean i and the estimated device power consumption variance i.
[0238] For example, if i is 2, the 2nd fitting result can be as shown in Table 6.
[0239] In step , the estimated deviation degree corresponding to each cabinet in the i-th cabinet set can be determined, and according to the estimated deviation degree corresponding to each cabinet in the i-th cabinet set, the accuracy of the i-th fitting result can be determined. When the accuracy of the i-th fitting result is less than the preset threshold, i is updated to i + 1 to perform the (i + 1)-th fitting process; until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, the device power consumption corresponding to each device type is determined according to the i-th fitting result.
[0240] For example, if i is 2 and the accuracy of the 2nd fitting result is greater than or equal to the preset threshold, the estimated device power consumption corresponding to each device type in the 2nd fitting result shown in Table 6 can be determined as the device power consumption corresponding to each device.
[0241] Optionally, if the last fitting result still does not meet the expectation, fine-tuning can be performed in the following way:
[0242] Method 1: If there are fewer cabinets in the computer room, the power consumption data of each device in the cabinet can be brought in as reference information, and training can be performed at the granularity of the device group. If necessary, the training weight of the power consumption data can be adjusted.
[0243] Method 2: A power consumption dictionary can be used for adjustment to improve the accuracy of the fitting result.
[0244] Optionally, after determining the device power consumption corresponding to each device type, for any device in the cabinet, the maximum value at the 99.99% quantile under the normal distribution can be calculated according to the device power consumption mean + 3.719 * device power consumption variance, and then the corresponding maximum value of the cabinet can be obtained to verify whether there is a risk of overvoltage in the cabinet under extreme conditions.
[0245] In the embodiment of the present application, the electronic device can group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet. The electronic device can obtain the historical power consumption of each cabinet. When performing the i-th fitting process, the electronic device can determine the i-th cabinet set among multiple cabinets. For any cabinet in the i-th cabinet set, the electronic device can generate a cabinet vector corresponding to the cabinet according to the device group information of the at least one device group corresponding to the cabinet, and then perform a splicing process on the cabinet vectors corresponding to the cabinets in the i-th cabinet set to obtain an independent variable matrix. The electronic device can determine a dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set. The electronic device can perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set through the least squares method to obtain the i-th fitting result. For any cabinet in the i-th cabinet set, the estimated deviation degree corresponding to the cabinet can be determined according to the estimated device power consumption corresponding to each device type in the i-th fitting result and the device group information of the at least one device group corresponding to the cabinet. The electronic device can determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set, and when the accuracy of the i-th fitting result is less than the preset threshold, update i to i + 1. Until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, the device power consumption corresponding to each device type can be determined according to the i-th fitting result. Since the device power consumption corresponding to each device type in the computer room can be determined according to the historical power consumption of each cabinet according to the device group, without collecting the actual power consumption of each device, the problems of inaccurate and incomplete collection are avoided; and through the fitting process by the least squares method, it has the effect of filtering noise, can save the complex abnormal filtering process, and comprehensively improves the accuracy of determining the power consumption information of each device type in the computer room.
[0246] Figure 5 The structural schematic diagram of a device power consumption determination device provided by an exemplary embodiment of the present application. Please refer to Figure 5 The device power consumption determination device 10 includes: a grouping module 11, an acquisition module 12, and a determination module 13, where
[0247] The grouping module 11 is configured to group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet, where the device types of the devices in the device group are the same;
[0248] The obtaining module 12 is configured to obtain the historical power consumption of each cabinet, where the historical power consumption is the sum of the power consumptions of the devices in the cabinet;
[0249] The determining module 13 is configured to determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, where the device group information includes the device type and the number of devices.
[0250] The device power consumption determining device provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principle and beneficial effects are similar, and will not be described in detail here.
[0251] In a possible implementation manner, the determining module 13 is specifically configured to:
[0252] Determine multiple device types and the power consumption constraint conditions corresponding to the multiple device types, where the power consumption constraint conditions include at least one of the following: the power consumption range of the device type, the power consumption relationship between different device types;
[0253] Perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by using the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process;
[0254] Wherein, the fitting result includes the estimated device power consumption corresponding to each device type.
[0255] In a possible implementation manner, the determining module 13 is specifically configured to:
[0256] Determine the i-th cabinet set in the multiple cabinets;
[0257] Perform the i-th fitting process on the historical power consumption of the cabinets in the i-th cabinet set, the device group information of at least one device group corresponding to the cabinets in the i-th cabinet set, and the power consumption constraint conditions corresponding to the i-th cabinet set by using the least squares method to obtain the i-th fitting result, and determine the accuracy of the i-th fitting result;
[0258] Wherein, i takes 1, 2,..., until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, and then determine the device power consumption corresponding to each device type according to the i-th fitting result.
[0259] In a possible implementation manner, the determining module 13 is specifically configured to:
[0260] If i is 1, determine the multiple cabinets as the i-th cabinet set;
[0261] If i is greater than 1, determine the i-th cabinet set according to the (i - 1)-th fitting result in the (i - 1)-th cabinet set, and the cabinets in the (i - 1)-th cabinet set are the cabinets participating in the (i - 1)-th fitting process.
[0262] In a possible implementation manner, the determining module 13 is specifically configured to:
[0263] For any one cabinet in the (i - 1)-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the (i - 1)-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the estimated deviation degree of the cabinet according to the estimated power consumption of the cabinet and the historical power consumption of the cabinet;
[0264] Determine the cabinets in the (i - 1)-th cabinet set with an estimated deviation degree less than or equal to the first threshold as the cabinets in the i-th cabinet set.
[0265] In a possible implementation manner, the determining module 13 is specifically configured to:
[0266] For any one cabinet in the i-th cabinet set, generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet, and the cabinet vector includes the number of devices corresponding to each device type included in the cabinet;
[0267] Perform splicing processing on the cabinet vectors corresponding to the cabinets in the i-th cabinet set to obtain an independent variable matrix;
[0268] Determine a dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set;
[0269] Perform fitting processing on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set through the least squares method to obtain the i-th fitting result.
[0270] In a possible implementation manner, the determining module 13 is specifically configured to:
[0271] For any cabinet in the i-th cabinet set, based on the estimated device power consumption corresponding to each device type in the i-th fitting result and the device group information of at least one device group corresponding to the cabinet, determine the estimated power consumption of the cabinet, and determine the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet as the estimated deviation degree corresponding to the cabinet;
[0272] Based on the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set, determine the accuracy of the i-th fitting result.
[0273] In a possible implementation manner, the determining module 13 is specifically configured to:
[0274] If the estimated deviation degrees corresponding to the cabinets in the i-th cabinet set are respectively less than or equal to the first threshold, determine that the accuracy of the i-th fitting result is greater than or equal to the preset threshold;
[0275] If there is a cabinet in the i-th cabinet set whose corresponding estimated deviation degree is greater than the first threshold, determine that the accuracy of the i-th fitting result is less than the preset threshold.
[0276] In a possible implementation manner, the determining module 13 is specifically configured to:
[0277] For any device type, obtain the estimated device power consumption corresponding to the device type in the i-th fitting result, and determine the estimated device power consumption as the device power consumption corresponding to the device type.
[0278] In a possible implementation manner, for any cabinet in the computer room; the grouping module 11 is specifically configured to:
[0279] Determine a preset plurality of device types and the standard device information corresponding to each device type;
[0280] Obtain the device information of each device in the cabinet;
[0281] For any device in the cabinet, perform a matching process on the device information of the device and the standard device information corresponding to each device type to determine the device type corresponding to the device;
[0282] Divide the devices with the same device type in the cabinet into one device group to obtain the at least one device group.
[0283] The device power consumption determination device provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principles and beneficial effects are similar, and will not be elaborated here.
[0284] The exemplary embodiment of the present application provides a schematic structural diagram of an electronic device. Please refer to Figure 6 , the electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected with each other through a bus 23.
[0285] The memory 22 stores computer-executable instructions;
[0286] The processor 21 executes the computer-executable instructions stored in the memory 22, so that the processor 21 executes the method as shown in the above method embodiment.
[0287] Correspondingly, the embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the above method embodiment.
[0288] Correspondingly, the embodiment of the present application can also provide a computer program product, including a computer program, which when executed by a processor, can implement the method shown in the above method embodiment.
[0289] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0290] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0291] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the process inFigure 1 one or more processes and / or blocks Figure 1 the functions specified in one or more blocks.
[0292] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more processes and / or blocks Figure 1 one or more blocks.
[0293] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0294] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
[0295] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0296] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0297] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and variations can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for determining the power consumption of a device, characterized in that, Including: Group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet, where the device types of the devices in the device group are the same; Obtain the historical power consumption of each cabinet, where the historical power consumption is the sum of the power consumptions of the devices in the cabinet; Determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, where the device group information includes the device type and the number of devices.
2. The method according to claim 1, wherein Determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, including: Determine multiple device types and the power consumption constraint conditions corresponding to the multiple device types, where the power consumption constraint conditions include at least one of the following: the power consumption range of the device type, the power consumption relationship between different device types; Perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process; Wherein, the fitting result includes the estimated device power consumption corresponding to each device type.
3. The method according to claim 2, wherein Perform at least one fitting process on the historical power consumption of each cabinet, the device group information of at least one device group corresponding to each cabinet, and the power consumption constraint conditions by the least squares method until the accuracy of the obtained fitting result is greater than or equal to a preset threshold, and then determine the device power consumption corresponding to each device type according to the fitting result of the last fitting process, including: Determine the i-th cabinet set among the multiple cabinets; Perform the i-th fitting process on the historical power consumption of the cabinets in the i-th cabinet set, the device group information of at least one device group corresponding to the cabinets in the i-th cabinet set, and the power consumption constraint conditions corresponding to the i-th cabinet set by the least squares method to obtain the i-th fitting result, and determine the accuracy of the i-th fitting result; Wherein, i takes 1, 2,..., until the accuracy of the i-th fitting result is greater than or equal to the preset threshold, and then determine the device power consumption corresponding to each device type according to the i-th fitting result.
4. The method according to claim 3, wherein Determine the i-th cabinet set among the multiple cabinets, including: If i is 1, then determine the multiple cabinets as the i-th cabinet set; If i is greater than 1, then determine the i-th cabinet set in the (i - 1)-th cabinet set according to the (i - 1)-th fitting result, and the cabinets in the (i - 1)-th cabinet set are the cabinets participating in the (i - 1)-th fitting process.
5. The method according to claim 4, wherein Determine the i-th cabinet set in the (i - 1)-th cabinet set according to the (i - 1)-th fitting result, including: For any cabinet in the (i - 1)-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the (i - 1)-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the estimated deviation degree of the cabinet according to the estimated power consumption of the cabinet and the historical power consumption of the cabinet; Determine the cabinets in the (i - 1)-th cabinet set with an estimated deviation degree less than or equal to the first threshold as the cabinets in the i-th cabinet set.
6. The method according to any one of claims 3 to 5, characterized in that, Perform the i-th fitting process on the historical power consumption of each cabinet in the i-th cabinet set, the device group information of at least one device group corresponding to each cabinet in the i-th cabinet set, and the power consumption constraint condition corresponding to the i-th cabinet set by the least squares method to obtain the i-th fitting result, including: For any cabinet in the i-th cabinet set, generate a cabinet vector corresponding to the cabinet according to the device group information of at least one device group corresponding to the cabinet, where the cabinet vector includes the number of devices corresponding to each device type included in the cabinet; Perform a splicing process on the cabinet vectors corresponding to each cabinet in the i-th cabinet set to obtain an independent variable matrix; Determine a dependent variable matrix according to the historical power consumption of each cabinet in the i-th cabinet set; Perform a fitting process on the independent variable matrix, the dependent variable matrix, and the power consumption constraint condition corresponding to the i-th cabinet set by the least squares method to obtain the i-th fitting result.
7. The method according to any one of claims 3-6, characterized in that, Determine the accuracy of the i-th fitting result, including: For any cabinet in the i-th cabinet set, determine the estimated power consumption of the cabinet according to the estimated device power consumption corresponding to each device type in the i-th fitting result and the device group information of at least one device group corresponding to the cabinet, and determine the ratio of the absolute value of the difference between the estimated power consumption of the cabinet and the historical power consumption of the cabinet to the historical power consumption of the cabinet as the estimated deviation degree corresponding to the cabinet; Determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to each cabinet in the i-th cabinet set.
8. The method according to claim 7, characterized in that, Determine the accuracy of the i-th fitting result according to the estimated deviation degrees corresponding to each cabinet in the i-th cabinet set, including: If the estimated deviation degrees corresponding to each cabinet in the i-th cabinet set are respectively less than or equal to the first threshold, determine that the accuracy of the i-th fitting result is greater than or equal to the preset threshold; If there is a cabinet in the i-th cabinet set with an estimated deviation degree greater than the first threshold, determine that the accuracy of the i-th fitting result is less than the preset threshold.
9. The method according to any one of claims 3-8, characterized in that Determine the device power consumption corresponding to each device type according to the i-th fitting result, including: For any device type, obtain the estimated device power consumption corresponding to the device type in the i-th fitting result and determine the estimated device power consumption as the device power consumption corresponding to the device type.
10. The method according to any one of claims 1-9, characterized in that, For any cabinet in the computer room; perform a grouping process on the devices in the cabinet in the computer room to obtain at least one device group corresponding to the cabinet, including: Determine a plurality of preset device types and the standard device information corresponding to each device type; Obtain the device information of each device in the cabinet; For any one device in the cabinet, match the device information of the device with the standard device information corresponding to each device type to determine the device type corresponding to the device; Divide the devices with the same device type in the cabinet into one device group to obtain the at least one device group.
11. An apparatus for determining device power consumption, characterized in that, It includes: A grouping module, an obtaining module, and a determining module, where The grouping module is used to group the devices in each cabinet in the computer room to obtain at least one device group corresponding to each cabinet, and the device types of the devices in the device group are the same; The obtaining module is used to obtain the historical power consumption of each cabinet, and the historical power consumption is the sum of the power consumptions of the devices in the cabinet; The determining module is used to determine the device power consumption corresponding to each device type in the computer room according to the historical power consumption of each cabinet and the device group information of at least one device group corresponding to each cabinet, and the device group information includes the device type and the number of devices.
12. An electronic device, characterized in that, It includes: At least one processor; And A memory communicatively connected to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the method according to any one of claims 1-10 is implemented.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1-10 is implemented.