Server firmware cluster upgrade method, server and storage medium

By calculating the time difference when the server reaches the power peak during the upgrade process and using the ant colony algorithm to optimize, the peak-staggered upgrade of the server firmware cluster is realized, which solves the problem of pressure and business interruption on the data center power supply and distribution system in the traditional method. Improved upgrade efficiency and customer experience.

CN118259948BActive Publication Date: 2024-09-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410695878.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-20
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The baseboard management controller (BMC) firmware batch upgrade method of traditional data center servers. Because a large number of servers reach high power at the same time, the data center power supply and distribution system is under pressure and there is a risk of power outage. The business needs to be suspended for shutdown upgrade, which affects customer business. run.

Method used

By obtaining the current power-on status of the server, calculate the time for each server to reach the power peak during the upgrade process, calculate the time difference of different servers based on the cabinet and power supply location, and use the ant colony algorithm to optimize the total time for all servers to reach the peak power consumption during peak staggering. Time, obtain the upgrade sequence and peak-staggered upgrade time, realize batch upgrades in non-shutdown state, and avoid multiple servers reaching power peaks at the same time.

Benefits of technology

It realizes off-peak upgrade of server firmware clusters, reduces the pressure on the data center power supply and distribution system, avoids business interruption, and improves upgrade efficiency and customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118259948B
    Figure CN118259948B
Patent Text Reader

Abstract

The invention provides a server firmware cluster upgrade method, a server and a storage medium, and relates to the technical field of computers. The method comprises the following steps: obtaining the current on / off state of the server; calculating the time taken by a single server to reach a power peak value during an upgrade process according to the current on / off state of the server; calculating the total time taken by all servers to reach a power consumption peak value during an off-peak period according to the time difference of the time taken by different servers to reach the power peak value, optimizing the total time taken by all servers to reach a power consumption peak value during an off-peak period, obtaining the upgrade sequence and off-peak upgrade time of a server firmware cluster, upgrading the server firmware cluster without affecting the business operation of customers, avoiding to the greatest extent that multiple servers reach a power peak value during an upgrade process at the same time, realizing off-peak upgrade of servers, and reducing the pressure on a power supply and distribution system of a data center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a server firmware cluster upgrade method, a server and a storage medium. Background Art

[0002] With the continuous development of technologies such as cloud computing, artificial intelligence, and large models, servers are welcoming new development opportunities. With the increase in the number of servers and the update of technology, the comprehensive management of data center servers is becoming increasingly important. The comprehensive management of data center servers includes the update and maintenance of server firmware clusters. The batch upgrade of the baseboard management controller (BMC) firmware of traditional data center servers mostly adopts batch serial upgrade or batch parallel upgrade methods. The batch serial upgrade method will cause the overall cluster upgrade time to be long. The batch parallel upgrade method will cause the data center power supply and distribution system to be under pressure because a large number of servers reach high power at the same time, and there is a risk of power failure due to overvoltage. In addition, the traditional BMC batch upgrade method usually suspends the server's running business and shuts down the batch servers before upgrading. This requires customers to suspend some businesses or temporarily transfer businesses to other data centers, thereby affecting customers' business operations. Summary of the invention

[0003] The present invention provides a server firmware cluster upgrade method, a server and a storage medium, which are used to solve the defects of the traditional baseboard management controller cluster upgrade method that a large number of servers reach high power at the same time, causing the power supply and distribution system of the data center to be under pressure, and the server operation will be suspended to affect the customer's business operation.

[0004] The present invention provides a server firmware cluster upgrade method, comprising:

[0005] Get the current power on / off status of the server;

[0006] Calculate the time it takes for a single server to reach peak power during the upgrade process according to the current power-on / power-off status of the server;

[0007] Based on the cabinet where the server is located, the power supply location of the cabinet, and the time it takes for each server to reach the peak power during the upgrade process, calculate the time difference between different servers reaching the peak power;

[0008] The total time for all servers to reach the power consumption peak off-peak is calculated according to the time difference between the times when different servers reach the power peak, the total time for all servers to reach the power consumption peak off-peak is optimized, the upgrade sequence and off-peak upgrade time of the server firmware cluster are obtained, and the server firmware cluster is upgraded according to the upgrade sequence and off-peak upgrade time of the server firmware cluster.

[0009] According to the server firmware cluster upgrade method provided by the present invention, the time taken for a single server to reach a power peak during the upgrade process is calculated according to the historical upgrade records corresponding to different power-on and power-off states of the server, including:

[0010] If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time;

[0011] Obtaining the upgrade time of the baseboard management controller;

[0012] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained;

[0013] Get the time to reach the power peak based on user habits;

[0014] The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, the time to reach the power peak after startup, and the time to reach the power peak based on user habits.

[0015] According to the server firmware cluster upgrade method provided by the present invention, the time taken by a single server to reach the power peak during the upgrade process is calculated according to the historical upgrade records corresponding to different power-on and power-off states of the server, and further includes:

[0016] If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time;

[0017] Obtaining the upgrade time of the baseboard management controller;

[0018] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0019] The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, and the time when the power peak is reached based on user habits.

[0020] According to the server firmware cluster upgrade method provided by the present invention, the time taken by a single server to reach the power peak during the upgrade process is calculated according to the historical upgrade records corresponding to different power-on and power-off states of the server, and further includes:

[0021] If the current power-on / off state of the server is in the power-on state, obtain the version information of the baseboard management controller; if the version information of the baseboard management controller does not include an upgrade-required shutdown flag, obtain the time when the upgrade reaches the power peak when the server is powered on;

[0022] Obtaining the upgrade time of the baseboard management controller;

[0023] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0024] The time for each server to reach the power peak during the upgrade process is the sum of the time for the upgrade to reach the power peak in the boot state, the upgrade time of the baseboard management controller, and the time to reach the power peak based on user habits.

[0025] According to the server firmware cluster upgrade method provided by the present invention, the step of obtaining the server shutdown time includes:

[0026] If the server is shut down for the first time, a preset value is used as the server shutdown time;

[0027] If the server is not shut down for the first time, obtain multiple historical shutdown times of the server, and calculate an average value of the multiple historical shutdown times as the shutdown time of the server;

[0028] The obtaining the upgrade time of the baseboard management controller includes:

[0029] If the server is upgraded for the first time, a preset value is used as the upgrade time of the baseboard management controller;

[0030] If the server is not upgraded for the first time, obtaining multiple historical upgrade times of the server, and calculating an average upgrade time of the baseboard management controller according to the multiple historical upgrade times of the baseboard management controller;

[0031] The obtaining of the time to reach the power peak after startup includes:

[0032] If the server is powered on for the first time, a preset value is used as the time for reaching the power peak after the power is powered on;

[0033] If the server is not powered on for the first time, obtain multiple historical power peak times of the server after being powered on, and calculate the power peak time after being powered on according to the multiple historical power peak times;

[0034] The obtaining of the time when the power peak is reached based on the user's habit includes:

[0035] After the server upgrade is completed, the user operation is obtained. If the user operation is a power-on operation, the server power consumption reaches a peak value after the server is powered on, and the current user operation, operation time, and peak time are recorded;

[0036] If the user operation is to power off and replace some equipment, the server is powered on after the equipment is replaced. If the server is configured with a power-on operation, the server records the user's current operation, operation time, and peak time after it is powered on.

[0037] If the user operation is based on the scheduled startup time set by the user and the server automatically starts up when the preset startup time is reached, the current user operation, operation time, and peak time are recorded;

[0038] According to a plurality of current user operations, the user's habitual operation is obtained, and according to the operation time corresponding to the habitual operation and the peak reaching time, the time to reach the power peak based on the user's habitual operation is obtained.

[0039] According to the server firmware cluster upgrade method provided by the present invention, the time taken by a single server to reach the power peak during the upgrade process is calculated according to the historical upgrade records corresponding to different power-on and power-off states of the server, and further includes:

[0040] If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller;

[0041] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained;

[0042] Get the time to reach the power peak based on user habits;

[0043] The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller, the time when the power peak is reached after startup, and the time when the power peak is reached based on user habits.

[0044] According to the server firmware cluster upgrade method provided by the present invention, the time taken by a single server to reach the power peak during the upgrade process is calculated according to the historical upgrade records corresponding to different power-on and power-off states of the server, and further includes:

[0045] If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller;

[0046] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0047] The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller and the time when the power peak is reached based on user habits.

[0048] According to the server firmware cluster upgrade method provided by the present invention, the time difference of reaching the power peak time of different servers is calculated based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak during the upgrade process, including:

[0049] If the two servers are not in the same cabinet and the cabinets where the two servers are located do not use the same power distribution cabinet, the time difference between the times when the different servers reach the power peak is equal to the time difference between the times taken by each server to reach the power peak during the upgrade process.

[0050] According to the server firmware cluster upgrade method provided by the present invention, the time difference of the time for different servers to reach the power peak is calculated based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak during the upgrade process, and further includes:

[0051] If two servers are in the same cabinet, the time difference between the times when the different servers reach the power peak is equal to the sum of the time difference between the times when each server reaches the power peak during the upgrade process and the cabinet peak time.

[0052] According to the server firmware cluster upgrade method provided by the present invention, the time difference of different servers reaching the power peak time is calculated based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak during the upgrade process, and further includes:

[0053] If two servers are not in the same cabinet and the cabinets where the two servers are located use the same power distribution cabinet, the time difference between the different servers reaching the power peak is equal to the sum of the time difference between the time taken for each server to reach the power peak during the upgrade process and the off-peak time of the power distribution cabinet, and the off-peak time of the power distribution cabinet is less than the off-peak time of the cabinet.

[0054] According to the server firmware cluster upgrade method provided by the present invention, the total time for all servers to reach the peak power consumption during off-peak hours is optimized to obtain the upgrade sequence and off-peak upgrade time of the server firmware cluster, including:

[0055] Set the ants to use the taboo table to record the currently upgraded servers during their movement, and use the to-be-upgraded table to record the servers that are allowed to be upgraded next, and initialize the pheromone amount at each time difference;

[0056] When the end condition is not met, for each ant, a server is randomly selected from the to-be-upgraded table, and the server upgrade sequence is constructed. For each ant, the next server is selected from the to-be-upgraded table based on the state transition probability calculated based on the heuristic information and pheromone concentration; after the upgrade is completed, it is recorded in the taboo table;

[0057] When all ants are included in the taboo table, the total time for the server peak to reach the peak power consumption generated by the server upgrade sequence selected by each ant is calculated;

[0058] Obtain the pheromone left by each ant on the time difference in this iteration, and calculate the pheromone increment on the time difference in each iteration according to the pheromone left by each ant on the time difference in this iteration;

[0059] The pheromone volatilization rate at the future moment is obtained according to the pheromone increment on the time difference in each iteration, and the total time for the server to reach the peak power consumption during off-peak hours is updated according to the pheromone left on the time difference in each iteration and the pheromone volatilization rate at the future moment, until the termination condition is met, and the upgrade order and off-peak upgrade time of the server firmware cluster are obtained.

[0060] According to the server firmware cluster upgrade method provided by the present invention, the state transition probability calculation method includes:

[0061] Obtaining residual information of the ant based on each time difference and heuristic information of each time difference, wherein the heuristic information of each time difference is the reciprocal of the time difference of the different servers reaching the power peak;

[0062] The state transition probability is calculated according to the amount of information remaining at each time difference, the heuristic information of each time difference, the importance of the amount of information remaining, and the importance of the information sent by the ant.

[0063] The present invention also provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the server firmware cluster upgrade method as described in any one of the above items is implemented.

[0064] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the server firmware cluster upgrade method described in any one of the above items is implemented.

[0065] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the server firmware cluster upgrade method described in any one of the above items is implemented.

[0066] The server firmware cluster upgrade method, server and storage medium provided by the present invention obtain the current power on / off state of the server; calculate the time taken by a single server to reach the power peak during the upgrade process according to the current power on / off state of the server; calculate the time difference of the time taken by different servers to reach the power peak based on the cabinet where the server is located, the power supply position of the cabinet and the time taken by each server to reach the power peak during the upgrade process; calculate the total time taken by all servers to reach the power consumption peak during the staggered peak according to the time difference of the time taken by the different servers to reach the power peak, optimize the total time taken by all servers to reach the power consumption peak during the staggered peak, obtain the upgrade sequence and the staggered upgrade time of the server firmware cluster, upgrade the server firmware cluster according to the upgrade sequence and the staggered upgrade time of the server firmware cluster, do not need to perform cluster batch upgrade in the shutdown state, do not affect the business operation of customers, and avoid multiple servers reaching the power peak simultaneously during the upgrade process to the greatest extent based on the cabinet where the server is located, the power supply position of the cabinet and the time taken by the server itself to reach the power peak, thereby realizing the staggered upgrade of the server and reducing the pressure on the power supply and distribution system of the data center. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0068] Figure 1 This is one of the flow diagrams of the server firmware cluster upgrade method provided by an embodiment of the present invention;

[0069] Figure 2 It is a schematic diagram of the cluster BMC architecture provided by an embodiment of the present invention;

[0070] Figure 3 This is a second flow chart of the server firmware cluster upgrade method provided by an embodiment of the present invention;

[0071] Figure 4This is a third flow chart of the server firmware cluster upgrade method provided by an embodiment of the present invention;

[0072] Figure 5 This is a fourth flow chart of the server firmware cluster upgrade method provided by an embodiment of the present invention;

[0073] Figure 6 It is a functional structure diagram of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0075] Figure 1 A flow chart of a server firmware cluster upgrade method provided by an embodiment of the present invention, such as Figure 1 As shown, the server firmware cluster upgrade method provided by the embodiment of the present invention includes:

[0076] Step 101, obtaining the current power on / off status of the server;

[0077] Step 102: Calculate the time it takes for a single server to reach a power peak during the upgrade process according to the current power-on / power-off state of the server;

[0078] Step 103: Calculate the time difference between the time when different servers reach the peak power based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken for each server to reach the peak power during the upgrade process;

[0079] Step 104: calculate the total time for all servers to reach the power consumption peak value according to the time difference between the times when different servers reach the power peak value, optimize the total time for all servers to reach the power consumption peak value, obtain the upgrade sequence and the peak-shifting upgrade time of the server firmware cluster, and upgrade the server firmware cluster according to the upgrade sequence and the peak-shifting upgrade time of the server firmware cluster.

[0080] The batch upgrade of the baseboard management controller firmware of traditional data center servers mostly adopts batch serial upgrade or batch parallel upgrade methods. The batch serial upgrade method will lead to the problem of long overall cluster upgrade time, and the batch parallel upgrade method will cause the power supply and distribution system of the data center to be stressed because a large number of servers reach high power at the same time, and there is a risk of power failure due to overvoltage. In addition, the traditional BMC batch upgrade method usually suspends the business of the server and shuts down the batch servers before upgrading, which requires customers to suspend some businesses or temporarily transfer businesses to other data centers, thus affecting the business operation of customers.

[0081] The server firmware cluster upgrade method provided by the embodiment of the present invention obtains the current power on / off state of the server; calculates the time taken for a single server to reach the power peak during the upgrade process according to the current power on / off state of the server; calculates the time difference of the time taken for different servers to reach the power peak based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken for each server to reach the power peak during the upgrade process; calculates the total time taken for all servers to reach the power consumption peak during the staggered peak according to the time difference of the time taken for different servers to reach the power peak, optimizes the total time taken for all servers to reach the power consumption peak during the staggered peak, obtains the upgrade sequence and the staggered upgrade time of the server firmware cluster, upgrades the server firmware cluster according to the upgrade sequence and the staggered upgrade time of the server firmware cluster, does not need to perform cluster batch upgrade in the shutdown state, does not affect the business operation of customers, and avoids the situation where multiple servers reach the power peak at the same time during the upgrade process to the greatest extent based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken for the server itself to reach the power peak after the upgrade, thereby realizing the staggered upgrade of the server and reducing the pressure on the power supply and distribution system of the data center.

[0082] Based on any of the above embodiments, calculating the time taken for a single server to reach the power peak during the upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server includes:

[0083] If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time;

[0084] Obtaining the upgrade time of the baseboard management controller;

[0085] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained;

[0086] Get the time to reach the power peak based on user habits;

[0087] The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, the time to reach the power peak after startup, and the time to reach the power peak based on user habits.

[0088] In an embodiment of the present invention, the step of calculating the time taken by a single server to reach a power peak value during an upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes:

[0089] If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time;

[0090] Obtaining the upgrade time of the baseboard management controller;

[0091] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0092] The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, and the time when the power peak is reached based on user habits.

[0093] In an embodiment of the present invention, the step of calculating the time taken by a single server to reach a power peak value during an upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes:

[0094] If the current power-on / off state of the server is in the power-on state, obtain the version information of the baseboard management controller; if the version information of the baseboard management controller does not include an upgrade-required shutdown flag, obtain the time when the upgrade reaches the power peak when the server is powered on;

[0095] Obtaining the upgrade time of the baseboard management controller;

[0096] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0097] The time for each server to reach the power peak during the upgrade process is the sum of the time for the upgrade to reach the power peak in the boot state, the upgrade time of the baseboard management controller, and the time to reach the power peak based on user habits.

[0098] In the embodiment of the present invention, obtaining the server shutdown time includes:

[0099] If the server is shut down for the first time, a preset value is used as the server shutdown time;

[0100] If the server is not shut down for the first time, obtain multiple historical shutdown times of the server, and calculate an average value of the multiple historical shutdown times as the shutdown time of the server;

[0101] The obtaining the upgrade time of the baseboard management controller includes:

[0102] If the server is upgraded for the first time, a preset value is used as the upgrade time of the baseboard management controller;

[0103] If the server is not upgraded for the first time, obtaining multiple historical upgrade times of the server, and calculating an average upgrade time of the baseboard management controller according to the multiple historical upgrade times of the baseboard management controller;

[0104] The obtaining of the time to reach the power peak after startup includes:

[0105] If the server is powered on for the first time, a preset value is used as the time for reaching the power peak after the power is powered on;

[0106] If the server is not powered on for the first time, obtain multiple historical power peak times of the server after being powered on, and calculate the power peak time after being powered on according to the multiple historical power peak times;

[0107] The obtaining of the time when the power peak is reached based on the user's habit includes:

[0108] After the server upgrade is completed, the user operation is obtained. If the user operation is a power-on operation, the server power consumption reaches a peak value after the server is powered on, and the current user operation, operation time, and peak time are recorded;

[0109] If the user operation is to power off and replace some equipment, the server is powered on after the equipment is replaced. If the server is configured with a power-on operation, the server records the user's current operation, operation time, and peak time after it is powered on.

[0110] If the user operation is based on the scheduled startup time set by the user and the server automatically starts up when the preset startup time is reached, the current user operation, operation time, and peak time are recorded;

[0111] According to a plurality of current user operations, the user's habitual operation is obtained, and according to the operation time corresponding to the habitual operation and the peak reaching time, the time to reach the power peak based on the user's habitual operation is obtained.

[0112] In an embodiment of the present invention, the step of calculating the time taken by a single server to reach a power peak value during an upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes:

[0113] If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller;

[0114] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained;

[0115] Get the time to reach the power peak based on user habits;

[0116] The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller, the time when the power peak is reached after startup, and the time when the power peak is reached based on user habits.

[0117] In an embodiment of the present invention, the step of calculating the time taken by a single server to reach a power peak value during an upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes:

[0118] If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller;

[0119] After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained;

[0120] The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller and the time when the power peak is reached based on user habits.

[0121] The embodiment of the present invention provides a cluster BMC system architecture, such as Figure 2 As shown in Figure 1, a data center generally has multiple power distribution cabinets and multiple server cabinets. A power distribution cabinet generally supplies power to multiple cabinets, and a cabinet generally deploys multiple servers. The upgrade workstation is connected to all servers in the data center through the network. The time when each server reaches the peak power during the upgrade process is t i .

[0122] The time t when the server reaches the peak power during the upgrade process i Calculation method: Figure 3 As shown, the specific steps are as follows:

[0123] Step S201: triggering the upgrade process to reach the power peak time t i The calculation can be performed by sending a query command from the upgrade workstation to the server BMC, and the BMC triggers the time calculation.

[0124] Step S202: Determine whether the server is powered on, if so, execute step S203, if not, execute step S205.

[0125] Step S203: Determine whether the upgrade process requires shutdown, if yes, execute step S204, if no, execute step S209.

[0126] Step S204: time plus server shutdown time t c , t c The initial value is 0. This time is the average value calculated based on the historical shutdown time of the current server. If it is the first shutdown, the default shutdown time of the preset value is used.

[0127] Step S205: time plus BMC upgrade time t u , t u The initial value is 0. This time is the average value calculated based on the historical upgrade time of the current server. If it is the first upgrade, the default upgrade time of the preset value is used.

[0128] Step S206: Determine whether the upgrade needs to be restarted. If yes, execute step S207; if no, execute step S208.

[0129] Step S207: time plus the time t to reach the power peak after startup o , t o The initial value is 0. This time is calculated based on the average time of reaching the power peak after the current server is powered on. If it is the first time to power on, the default time of reaching the power peak after power on is used.

[0130] Step S208: time plus the time t to reach the power peak based on the user's habits e , t e The initial value is 0. This time is the average value calculated based on the user's operating habits and the time it takes for the server to reach its power peak after the upgrade is completed based on the user's operations.

[0131] Step S209: time plus the time t when the power is turned on and the upgrade reaches the power peak f , t fThe initial value is 0. This time is the average value calculated based on the time it takes for the fan speed to increase to a fixed value when the fan control is transferred from BMC control to complex programmable logic device (CPLD) control.

[0132] The time ti at which each server reaches its peak power during the upgrade process is calculated as follows:

[0133] (1)

[0134] The embodiment of the present invention can accurately calculate the time it takes for a single server to reach the power peak during the upgrade process through the different states of the server and the historical upgrade records, thereby providing data support for subsequent peak-shifting upgrades.

[0135] Based on any of the above embodiments, the time difference of different servers reaching the power peak time is calculated based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken for each server to reach the power peak during the upgrade process, including:

[0136] If the two servers are not in the same cabinet and the cabinets where the two servers are located do not use the same power distribution cabinet, the time difference between the times when the different servers reach the power peak is equal to the time difference between the times taken by each server to reach the power peak during the upgrade process.

[0137] In the embodiment of the present invention, the calculating of the time difference of the time when different servers reach the power peak value based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak value during the upgrade process also includes:

[0138] If two servers are in the same cabinet, the time difference between the times when the different servers reach the power peak is equal to the sum of the time difference between the times when each server reaches the power peak during the upgrade process and the cabinet peak time.

[0139] Cabinet peak time t r This means that because the servers are in the same cabinet, the upgrade time needs to be staggered to reduce the probability of servers in the same cabinet being upgraded at the same time, thereby reducing the situation where the power peak of a single server cabinet is too high during the upgrade process. r The initial value is 0. If t r is a fixed value x. Assuming A, B, and C are in the same cabinet, then B and C may both add x to A, and there must be a difference of x between B and C. Therefore, the peak-shifting time of the cabinets in the same cabinet takes a random number within the preset value range, that is, t r = Random(0,x).

[0140] In the embodiment of the present invention, the calculation of the time difference of different servers reaching the power peak time based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken for each server to reach the power peak during the upgrade process also includes:

[0141] If two servers are not in the same cabinet and the cabinets where the two servers are located use the same power distribution cabinet, the time difference between the different servers reaching the power peak is equal to the sum of the time difference between the time taken for each server to reach the power peak during the upgrade process and the off-peak time of the power distribution cabinet, and the off-peak time of the power distribution cabinet is less than the off-peak time of the cabinet.

[0142] In the embodiment of the present invention, t d This means that because the cabinets where the servers are located use the same power distribution cabinet, the upgrade time needs to be staggered appropriately to reduce the power peak of the power distribution cabinet during the server upgrade process. d The initial value is 0. Since the power carrying capacity of the distribution cabinet is higher than that of a single server cabinet, the peak-shifting time of the distribution cabinet can be smaller than the peak-shifting time of the cabinet, that is, t r >t d .

[0143] In the embodiment of the present invention, Figure 4 As shown in Figure 2, the time difference between triggering servers to reach power peak The calculation is triggered by the upgrade workstation. The specific steps of the calculation are as follows:

[0144] Step S301: Determine whether the two servers are in the same cabinet. If yes, execute step S304; if not, execute step S302.

[0145] Step S302: Determine whether the cabinets where the two servers are located use the same power distribution cabinet. If yes, execute step S305; if not, execute step S303.

[0146] Step S303: The time difference is equal to the time when each server reaches the power peak during the upgrade process minus the time when each server reaches the power peak during the upgrade process. The calculation formula is as follows:

[0147] (2)

[0148] Step S304: The time difference is equal to the time when each server reaches the power peak during the upgrade process minus the time added , time, time difference The calculation formula is as follows:

[0149] (3)

[0150] Step S305: The time difference is equal to the time when each server reaches the power peak during the upgrade process minus the time added , time difference The calculation formula is as follows:

[0151] (4)

[0152] In summary, the time difference between servers reaching peak power The calculation formula is as follows:

[0153] (5)

[0154] The embodiment of the present invention calculates the time difference between servers reaching power peaks based on the cabinets where the servers are located, the power supply locations of the cabinets, and the time when the servers themselves reach power peaks during upgrades, thereby avoiding the situation where multiple servers reach power peaks at the same time during the upgrade process to the greatest extent possible, thereby achieving staggered upgrades of servers.

[0155] Ant Colony Optimization (ACO) is a swarm intelligence optimization algorithm. It is based on the study of the collective foraging behavior of real ant colonies in nature and simulates the collaboration process of real ant colonies. The ant colony algorithm has been successfully applied to a series of combinatorial optimization problems such as the traveling salesman problem. The upgrade of the BMC cluster of data center servers can be transformed into a combinatorial optimization problem. Given a set of m servers S = {s 1 ,s 2 ,…,s m} and the time difference between the servers reaching the power peak during the upgrade process t ij (1≤i≤m, 1≤j≤m, i≠j), and then start the upgrade from a certain server to complete the baseboard management controller upgrade of all servers, and under the premise of staggering the server power peaks, achieve the shortest baseboard management controller upgrade time for all servers.

[0156] Based on any of the above embodiments, the optimizing the total time for all the servers to reach the peak power consumption during off-peak hours to obtain the upgrade sequence and off-peak upgrade time of the server firmware cluster includes:

[0157] Set the ants to use the taboo table to record the currently upgraded servers during their movement, and use the to-be-upgraded table to record the servers that are allowed to be upgraded next, and initialize the pheromone amount at each time difference;

[0158] When the end condition is not met, for each ant, a server is randomly selected from the to-be-upgraded table, and the server upgrade sequence is constructed. For each ant, the next server is selected from the to-be-upgraded table based on the state transition probability calculated based on the heuristic information and pheromone concentration; after the upgrade is completed, it is recorded in the taboo table;

[0159] In the present example, let the number of cycles be N. c , initialize N c =0, N in each cycle c =N c +1. Set the maximum number of loops G, if the number of loops N c >=G, the loop ends.

[0160] When all ants are included in the taboo table, the total time for the server peak to reach the peak power consumption generated by the server upgrade sequence selected by each ant is calculated;

[0161] Obtain the pheromone left by each ant on the time difference in this iteration, and calculate the pheromone increment on the time difference in each iteration according to the pheromone left by each ant on the time difference in this iteration;

[0162] The pheromone volatilization rate at the future moment is obtained according to the pheromone increment on the time difference in each iteration, and the total time for the server to reach the peak power consumption during off-peak hours is updated according to the pheromone left on the time difference in each iteration and the pheromone volatilization rate at the future moment, until the termination condition is met, and the upgrade order and off-peak upgrade time of the server firmware cluster are obtained.

[0163] According to the server firmware cluster upgrade method provided by the present invention, the state transition probability calculation method includes:

[0164] Obtaining residual information of the ant based on each time difference and heuristic information of each time difference, wherein the heuristic information of each time difference is the reciprocal of the time difference of the different servers reaching the power peak;

[0165] The state transition probability is calculated according to the amount of information remaining at each time difference, the heuristic information of each time difference, the importance of the amount of information remaining, and the importance of the information sent by the ant.

[0166] For example, let the number of servers in the data center be m, the total number of ants in the ant colony be n, and during the BMC upgrade process, the time difference between server i and server j reaching the peak power is t ij (1≤i≤m, 1≤j≤m, i≠j), the pheromone concentration at the time difference (i, j) at time x is y ij (x), the pheromone concentration at each time difference at the initial moment is the same, which is a constant y 0 .

[0167] Ant k (k=1, 2, ..., n) uses the taboo table to finish during the movement. k To record the currently upgraded server, use update k To record the servers that are allowed to be upgraded in the next step, update k ={S-finish k Then, the ants calculate the residual information y at each time difference. ij (x) and the heuristic information g of each time difference ij To calculate the state transition probability. The state transition probability of ant k transferring from server i to server j at time x is It can be expressed as formula (6):

[0168] (6)

[0169] Among them, the inspiration information g ij = 1 / t ij , α is the importance of the residual information, β is the importance of the information sent, for The pheromone concentration at the time difference within the set, for Heuristic information on time differences within a set.

[0170] After all ants complete a server traversal, the pheromone at each time difference is updated according to equations (7), (8), and (9).

[0171] (7)

[0172] (8)

[0173] (9)

[0174] in, is a coefficient that indicates the persistence of the path. As time goes by, the pheromone left behind gradually evaporates. Indicates the volatility of pheromones. Indicates the calculation of the update degree of path pheromone corresponding to tij during the algorithm iteration process. The current pheromone of the corresponding path, Indicates that the pheromone concentration increases or evaporates, depending on , , pheromone increment . Represents the pheromone increment at the time difference (i, j) in this iteration; represents the pheromone left by the kth ant at the time difference (i, j) in this iteration; Q is a positive constant, It represents the total time when all servers of the kth ant reach the peak power consumption during the BMC upgrade of this server cluster.

[0175] In the embodiment of the present invention, assuming that the ant path is server A->D->C->B, t ad is the time difference between when server A reaches the peak power consumption after upgrading and when server D reaches the peak power consumption after upgrading, t dc The time difference between when server D reaches the peak power consumption after upgrading and when server C reaches the peak power consumption after upgrading, t cb is the time difference between when server C reaches its peak power consumption after upgrading and when server B reaches its peak power consumption after upgrading. =t ad +t dc +t cb .

[0176] The embodiment of the present invention can improve the speed of cluster BMC upgrade by optimizing the total time for all servers to reach the peak power consumption in staggered peaks, so as to minimize the total time for all servers to reach the peak power consumption in staggered peaks. The parallel upgrade of cluster BMC is realized, and the great advantage of ant colony algorithm in combinatorial optimization problems is utilized to achieve the shortest cluster BMC upgrade time under the premise of staggering the power peak during the upgrade process of each server.

[0177] The cluster BMC upgrade method based on ant colony algorithm proposed in the present invention is as follows: Figure 5 As shown, the specific steps are as follows:

[0178] Step S401: Initialize the pheromone quantity at each time difference.

[0179] Step S402: Whether the end condition is met, if yes, execute step S410, if not, execute step S403.

[0180] Step S403: For each ant, a server is randomly selected to start building a server upgrade sequence.

[0181] Step S404: i = 1, initializing loop parameters.

[0182] Step S405: Is i less than the number of servers m? If yes, execute step S406; if no, execute step S408.

[0183] Step S406: For each ant, the next server is selected according to the heuristic information and the pheromone concentration, and the next server is selected according to the state transition probability calculated by formula (6).

[0184] Step S407: i = i + 1, then execute step S405 to determine whether to end the loop execution.

[0185] Step S408: Calculate the total time it takes for the server peaks to reach the peak power consumption when the server upgrade sequence selected by each ant is staggered.

[0186] Step S409: Update the pheromone quantity at each time difference, calculate and update according to equations (7), (8), and (9), and then execute step S402 to determine whether to end.

[0187] Step S410: End the cluster BMC upgrade method process based on the ant colony algorithm.

[0188] The cluster BMC upgrade is transformed into a combinatorial optimization problem. The great advantages of the ant colony algorithm in combinatorial optimization problems are utilized to achieve the shortest BMC upgrade time for all servers while staggering the power peak during the upgrade of each server.

[0189] It should be noted that the present invention is not limited to the BMC upgrade method of the server node, but can also be applied to nodes such as computers, switches, and industrial computers equipped with BMC.

[0190] The server firmware cluster upgrade method provided by the present invention calculates the time when the server reaches the power peak during the upgrade process, and calculates the time difference between the servers to reach the power peak. The calculation method avoids multiple servers from reaching the power peak at the same time during the upgrade process to the greatest extent, thereby realizing the staggered upgrade of the server. A cluster BMC upgrade system based on an ant colony algorithm is proposed to provide system support for the cluster BMC upgrade method based on an ant colony algorithm proposed by the present invention; and reduces the pressure brought by batch upgrades of servers to the power supply system of the data center. Based on the cabinet where the server is located, the power supply position of the cabinet, and the time when the server itself reaches the power peak during the upgrade, multiple servers are avoided from reaching the power peak at the same time during the upgrade process to the greatest extent, thereby realizing the staggered upgrade of the server and reducing the pressure on the power supply and distribution system of the data center. The intelligence of the server cluster upgrade is improved. During the server cluster upgrade process, the server system is selectively shut down, rather than the batch shutdown in the traditional cluster upgrade, thereby reducing the impact on the customer business system, improving the customer experience, and prompting the intelligence of the server cluster upgrade.

[0191] Figure 6 An example of a server physical structure diagram is shown below: Figure 6As shown, the server may include: a processor 610 , a communications interface 620 , a memory 630 and a communications bus 640 , wherein the processor 610 , the communications interface 620 , and the memory 630 communicate with each other via the communications bus 640 . The memory 630 includes a computer program, an operating system, and acquired graph structure data. The processor 610 can call the logic instructions in the memory 630 to execute the server firmware cluster upgrade method, which includes: obtaining the current power on / off status of the server; calculating the time taken for a single server to reach the power peak during the upgrade process based on the current power on / off status of the server; calculating the time difference between different servers reaching the power peak based on the cabinet where the server is located, the power supply location of the cabinet, and the time taken for each server to reach the power peak during the upgrade process; calculating the total time taken for all servers to reach the power consumption peak during off-peak hours based on the time difference between the different servers reaching the power peak, optimizing the total time taken for all servers to reach the power consumption peak during off-peak hours, obtaining the upgrade order and off-peak upgrade time of the server firmware cluster, and upgrading the server firmware cluster according to the upgrade order and off-peak upgrade time of the server firmware cluster.

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

[0193] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the server firmware cluster upgrade method provided by the above-mentioned methods, the method comprising: obtaining the current power on / off state of the server; calculating the time taken for a single server to reach a power peak during the upgrade process according to the current power on / off state of the server; calculating the time difference in time for different servers to reach the power peak based on the cabinet in which the server is located, the power supply position of the cabinet, and the time taken for each server to reach the power peak during the upgrade process; calculating the total time for all servers to reach the power consumption peak during off-peak hours according to the time difference in time for different servers to reach the power peak, optimizing the total time for all servers to reach the power consumption peak during off-peak hours, obtaining the upgrade order and off-peak upgrade time of the server firmware cluster, and upgrading the server firmware cluster according to the upgrade order and off-peak upgrade time of the server firmware cluster.

[0194] On the other hand, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned server firmware cluster upgrade methods, the method including: obtaining the current power on / off state of the server; calculating the time taken for a single server to reach a power peak during the upgrade process based on the current power on / off state of the server; calculating the time difference in time for different servers to reach the power peak based on the cabinet in which the server is located, the power supply position of the cabinet, and the time taken for each server to reach the power peak during the upgrade process; calculating the total time for all servers to reach the power consumption peak during off-peak hours based on the time difference in time for different servers to reach the power peak, optimizing the total time for all servers to reach the power consumption peak during off-peak hours, obtaining the upgrade order and off-peak upgrade time of the server firmware cluster, and upgrading the server firmware cluster according to the upgrade order and off-peak upgrade time of the server firmware cluster.

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

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

Claims

1. A server firmware cluster upgrade method, characterized in that: include: Get the current power on / off status of the server; Calculate the time it takes for a single server to reach peak power during the upgrade process according to the current power-on / power-off status of the server; Based on the cabinet where the server is located, the power supply location of the cabinet, and the time it takes for each server to reach the peak power during the upgrade process, calculate the time difference between different servers reaching the peak power; According to the time difference of the time when different servers reach the power peak, the total time for all servers to reach the power consumption peak during off-peak hours is calculated, the total time for all servers to reach the power consumption peak during off-peak hours is optimized, the upgrade sequence and off-peak upgrade time of the server firmware cluster are obtained, and the server firmware cluster is upgraded according to the upgrade sequence and off-peak upgrade time of the server firmware cluster; The calculating, according to the historical upgrade records corresponding to the different power-on and power-off states of the server, the time taken for a single server to reach the power peak during the upgrade process includes: If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time; Obtaining the upgrade time of the baseboard management controller; After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained; Get the time to reach the power peak based on user habits; The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, the time to reach the power peak after startup, and the time to reach the power peak based on user habits.

2. The server firmware cluster upgrade method according to claim 1, characterized in that: The step of calculating the time taken by a single server to reach the power peak value during the upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes: If the current power-on / off state of the server is in the power-on state, obtaining the version information of the baseboard management controller, and if the version information of the baseboard management controller includes an upgrade-needed shutdown flag, obtaining the server shutdown time; Obtaining the upgrade time of the baseboard management controller; After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained; The time when each server reaches the power peak during the upgrade process is the sum of the server shutdown time, the baseboard management controller upgrade time, and the time when the power peak is reached based on user habits.

3. The server firmware cluster upgrade method according to claim 1, characterized in that: The step of calculating the time taken by a single server to reach the power peak value during the upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes: If the current power-on / off state of the server is in the power-on state, obtain the version information of the baseboard management controller; if the version information of the baseboard management controller does not include an upgrade-required shutdown flag, obtain the time when the upgrade reaches the power peak when the server is powered on; Obtaining the upgrade time of the baseboard management controller; After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained; The time for each server to reach the power peak during the upgrade process is the sum of the time for the upgrade to reach the power peak in the boot state, the upgrade time of the baseboard management controller, and the time to reach the power peak based on user habits.

4. The server firmware cluster upgrade method according to claim 1, characterized in that: The obtaining of the server shutdown time includes: If the server is shut down for the first time, a preset value is used as the server shutdown time; If the server is not shut down for the first time, obtain multiple historical shutdown times of the server, and calculate an average value of the multiple historical shutdown times as the shutdown time of the server; The obtaining the upgrade time of the baseboard management controller includes: If the server is upgraded for the first time, a preset value is used as the upgrade time of the baseboard management controller; If the server is not upgraded for the first time, obtaining multiple historical upgrade times of the server, and calculating an average upgrade time of the baseboard management controller according to the multiple historical upgrade times of the baseboard management controller; The obtaining of the time to reach the power peak after startup includes: If the server is powered on for the first time, a preset value is used as the time for reaching the power peak after the power is powered on; If the server is not powered on for the first time, obtain multiple historical power peak times of the server after being powered on, and calculate the power peak time after being powered on according to the multiple historical power peak times; The obtaining of the time when the power peak is reached based on the user's habit includes: After the server upgrade is completed, the user operation is obtained. If the user operation is a power-on operation, the server power consumption reaches a peak value after the server is powered on, and the current user operation, operation time, and peak time are recorded; If the user operation is to power off and replace some equipment, the server is powered on after the equipment is replaced. If the server is configured with a power-on operation, the server records the user's current operation, operation time, and peak time after it is powered on. If the user operation is based on the scheduled startup time set by the user and the server automatically starts up when the preset startup time is reached, the current user operation, operation time, and peak time are recorded; According to a plurality of current user operations, the user's habitual operation is obtained, and according to the operation time corresponding to the habitual operation and the peak reaching time, the time to reach the power peak based on the user's habitual operation is obtained.

5. The server firmware cluster upgrade method according to claim 1, characterized in that: The step of calculating the time taken by a single server to reach the power peak value during the upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes: If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller; After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a power-on state, the time to reach the power peak after the power-on is obtained; Get the time to reach the power peak based on user habits; The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller, the time when the power peak is reached after startup, and the time when the power peak is reached based on user habits.

6. The server firmware cluster upgrade method according to claim 5, characterized in that: The step of calculating the time taken by a single server to reach the power peak value during the upgrade process according to the historical upgrade records corresponding to different power-on and power-off states of the server further includes: If the current power-on / off state of the server is in the power-off state, obtaining the upgrade time of the baseboard management controller; After the upgrade is completed, the device status information before the upgrade in the specified offset address of the non-volatile memory is read, and if the device status information before the upgrade is a shutdown state, the time to reach the power peak based on the user's habits is obtained; The time when each server reaches the power peak during the upgrade process is the sum of the upgrade time of the baseboard management controller and the time when the power peak is reached based on user habits.

7. The server firmware cluster upgrade method according to claim 1, characterized in that: The calculating of the time difference of the time when different servers reach the peak power value based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the peak power value during the upgrade process includes: If the two servers are not in the same cabinet and the cabinets where the two servers are located do not use the same power distribution cabinet, the time difference between the times when the different servers reach the power peak is equal to the time difference between the times taken by each server to reach the power peak during the upgrade process.

8. The server firmware cluster upgrade method according to claim 7, characterized in that: The method of calculating the time difference of different servers reaching the power peak time based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak during the upgrade process, further includes: If two servers are in the same cabinet, the time difference between the times when the different servers reach the power peak is equal to the sum of the time difference between the times when each server reaches the power peak during the upgrade process and the cabinet peak time.

9. The server firmware cluster upgrade method according to claim 8, characterized in that: The method of calculating the time difference of different servers reaching the power peak time based on the cabinet where the server is located, the power supply position of the cabinet, and the time taken by each server to reach the power peak during the upgrade process, further includes: If two servers are not in the same cabinet and the cabinets where the two servers are located use the same power distribution cabinet, the time difference between the different servers reaching the power peak is equal to the sum of the time difference between the time taken for each server to reach the power peak during the upgrade process and the off-peak time of the power distribution cabinet, and the off-peak time of the power distribution cabinet is less than the off-peak time of the cabinet.

10. The server firmware cluster upgrade method according to any one of claims 1 to 9, characterized in that: The step of optimizing the total time for all servers to reach the peak power consumption during off-peak hours to obtain the upgrade sequence and off-peak upgrade time of the server firmware cluster includes: Set the ants to use the taboo table to record the currently upgraded servers during their movement, and use the to-be-upgraded table to record the servers that are allowed to be upgraded next, and initialize the pheromone amount at each time difference; When the end condition is not met, for each ant, a server is randomly selected from the to-be-upgraded table, and the server upgrade sequence is constructed. For each ant, the next server is selected from the to-be-upgraded table based on the state transition probability calculated based on the heuristic information and pheromone concentration; after the upgrade is completed, it is recorded in the taboo table; When all ants are included in the taboo table, the total time for the server peak to reach the peak power consumption generated by the server upgrade sequence selected by each ant is calculated; Obtain the pheromone left by each ant on the time difference in this iteration, and calculate the pheromone increment on the time difference in each iteration according to the pheromone left by each ant on the time difference in this iteration; The pheromone volatilization rate at the future moment is obtained according to the pheromone increment on the time difference in each iteration, and the total time for the server to reach the peak power consumption during off-peak hours is updated according to the pheromone left on the time difference in each iteration and the pheromone volatilization rate at the future moment, until the termination condition is met, and the upgrade order and off-peak upgrade time of the server firmware cluster are obtained.

11. The server firmware cluster upgrade method according to claim 10, characterized in that: The state transition probability calculation method comprises: Obtaining residual information of the ant based on each time difference and heuristic information of each time difference, wherein the heuristic information of each time difference is the reciprocal of the time difference of the different servers reaching the power peak; The state transition probability is calculated according to the amount of information remaining at each time difference and the heuristic information of each time difference, as well as the relative importance of the amount of information remaining and the relative importance of the heuristic information.

12. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the server firmware cluster upgrade method according to any one of claims 1 to 11 is implemented.

13. A non-transitory readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the server firmware cluster upgrade method according to any one of claims 1 to 11 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the server firmware cluster upgrade method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Automatic control method and system for peak shifting startup of computer cluster

    CN112486661A

  • Server peak shifting power-on method and device, equipment and storage medium

    CN115525352A

  • Energy-saving control method and control system for electric power data center machine room

    CN115933859A

  • Firmware version upgrading method and device

    CN116760815A

  • Service flow staggered scheduling method and related device

    WO2022160728A1