A device power-on control method, device and storage medium
By obtaining and analyzing the power-on status information of the target device and the current power-on number, and using the power-on probability and duration to determine the power-on waiting time, the equipment is staggered power-on, solving the problem of failure of equipment power-on in the data center, and improving the stability of power management.
Patent Information
- Application Number
- CN202110449769.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-04-25
AI Technical Summary
In the computer room of the Internet data center, the server powers on at the same time after the power is restored, resulting in the instantaneous power of the power supply being too high, causing current limit, and resulting in power-on failure.
By obtaining the power-on status information of the target device and the current power-on number, the selected state of the device is determined based on the power-on probability and the number of power-on retry times, and the power-on waiting time is determined based on the power-on time and the number of retry times, and the control device is powered off-peak.
It avoids the instantaneous current shock caused by the simultaneous power-on of batch equipment, ensures the successful power-on of the equipment, and improves the stability of power management.
Smart Images

Figure CN115237005B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of management tools, and in particular to a method, device and storage medium for controlling power-on of a device. Background Art
[0002] After the equipment in the Internet Data Center (IDC) computer room is installed, in scenarios where the entire computer room needs to be powered on, such as power switching and fault recovery in the IDC computer room, all servers in the computer room are powered on at the same time after being powered on, which will cause the instantaneous power of the power supply in the IDC computer room to be too high, causing the power supply in the IDC computer room to be limited, thereby causing the problem of server power-on failure.
[0003] At present, the power-on operation for the server is generally to specify that the server be powered on again through the Basic Input Output System (BIOS) interface or the Baseboard Manager Controller (BMC) interface after the power of the server is restored. There are usually three ways to power on the server. The first is power on, that is, the server is powered on directly after the power is turned on again; the second is power off, that is, the server is powered off by default after the power is turned on again; the third is the latest state, that is, after the server power is turned on again, the server is powered on and off according to the state of the last abnormal power off.
[0004] However, when any of the above methods is used to power on the servers in the IDC computer room, it is necessary to power on all the servers to be powered on in the IDC computer room at the same time after the server power is turned on. Therefore, an instantaneous high current impact will be formed on the IDC computer room, resulting in power-on failure of the servers in the IDC computer room. Summary of the invention
[0005] The present application provides a device power-on control method and related devices to avoid the problem of batch power-on failure caused by instantaneous excessive current impact caused by simultaneous power-on of batch devices.
[0006] On the one hand, an embodiment of the present application provides a method for controlling powering on a device, including:
[0007] Obtain the power-on status information and current power-on times of the target device, where the power-on status information includes power-on duration, power-on probability, and power-on retry times;
[0008] If the current power-on number is less than or equal to the power-on retry number, the selected state of the target device in the current cycle is determined according to the power-on probability, where the power-on probability represents the probability of selecting the target device from K devices, and K is an integer greater than or equal to 1;
[0009] If the selected state of the target device in the current cycle is the selected state, the power-on waiting time is determined according to the power-on duration and the number of power-on retries, where the power-on duration represents the maximum power-on duration set for K devices, and the number of power-on retries represents the maximum number of power-ons allowed for the target device within the power-on duration;
[0010] The target device is controlled to perform a power-on operation according to the power-on wait time.
[0011] Another aspect of the present application provides a device power-on control apparatus, including:
[0012] An acquisition unit, used to acquire power-on status information and current power-on times of the target device, wherein the power-on status information includes power-on duration, power-on probability, and power-on retry times;
[0013] A first determining unit is configured to determine the selected state of the target device in the current cycle according to the power-on probability if the current power-on number is less than or equal to the power-on retry number, wherein the power-on probability represents the probability of selecting the target device from K devices, and K is an integer greater than or equal to 1;
[0014] A second determining unit is configured to determine the power-on waiting time according to the power-on duration and the number of power-on retries if the selected state of the target device in the current cycle is the selected state, wherein the power-on duration represents the maximum power-on duration set for the K devices, and the number of power-on retries represents the maximum number of power-ons allowed for the target device within the power-on duration;
[0015] The control unit is used to control the target device to perform a power-on operation according to the power-on waiting time.
[0016] In a possible design, the second determining unit is specifically configured to:
[0017] Determine the ratio of power-on duration to the number of power-on retries;
[0018] Determine the power-on waiting time range of the target device according to the ratio of the power-on time to the number of power-on retries;
[0019] Determine the power-on waiting time within the power-on waiting time range.
[0020] In a possible design, the control unit is further configured to update the current power-on count if the selected state of the target device in the current cycle is an unselected state;
[0021] The first determining unit is further configured to determine the selected state of the target device in a next cycle after the current cycle according to the power-on probability if the updated current power-on number is less than or equal to the power-on retry number.
[0022] In a possible design, the second determining unit is further used to determine the remaining power consumption quotas corresponding to the K devices;
[0023] The control unit is further used to control the non-powered devices among the K devices to perform a power-on operation if the remaining power consumption quota is greater than the total power consumption of the non-powered devices among the K devices.
[0024] In one possible design, the control unit is further configured to control the target device to perform a power-on operation if the current power-on number is greater than the power-on retry number;
[0025] or,
[0026] The control unit is further used to perform a power-on operation on the target device if the current power-on times are greater than the power-on retry times and the remaining power consumption quotas corresponding to the K devices are greater than the maximum power consumption of the target device.
[0027] In a possible design, the second determining unit is further used for:
[0028] Determine the power-on probability weight of the target device according to the priority of the target device;
[0029] The power-on probability is weighted according to the power-on probability weight;
[0030] The first determining unit is further specifically configured to:
[0031] The selected state of the target device in the current cycle is determined according to the weighted power-on probability.
[0032] In a possible design, the acquisition unit is also used to:
[0033] Periodically obtain the operating status of each of N devices, where N is an integer greater than or equal to 1;
[0034] If N devices are in the power-off recovery phase, K devices are obtained according to the operating status of each device in the N devices, and the K devices are the devices to be powered on in the N devices;
[0035] Select any one device from K devices as the target device.
[0036] On the other hand, an embodiment of the present application provides a computer device, which includes at least one connected processor, memory and transceiver, wherein the memory is used to store program code, and the processor is used to call the program code in the memory to execute the above-mentioned device power-on control method.
[0037] On the other hand, an embodiment of the present application provides a computer storage medium, which includes instructions, and when the instructions are executed on a computer, the computer executes the above-mentioned method for controlling power-on of a device.
[0038] In summary, it can be seen that in the embodiment of the present application, by obtaining the power-on duration, power-on probability and power-on retry times of the target device, wherein the target device is included in K devices, and then when the current power-on times of the target device are less than or equal to the power-on retry times, the probability of the target device being selected in the current cycle is determined according to the power-on probability, and when the selected state of the device is the selected state, the power-on waiting time is determined according to the power-on duration and the power-on retry times, and then the target device is controlled to perform the power-on operation according to the power-on waiting time. In this way, since the selected state of the device is determined by the selected probability of the target device, and at the same time when the target device is in the selected state, the power-on waiting time is determined according to the power-on duration and the power-on retry times, and then the target device is controlled to perform the power-on operation according to the power-on waiting time, it can be ensured that each device in the K devices performs staggered power-on, avoiding all devices in the K devices from being powered on at the same time, thereby avoiding the impact of excessive instantaneous current caused by the simultaneous power-on of batch devices, resulting in power-on failure of batch devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 The following is a schematic diagram of the architecture of the device power-on control system provided for the embodiment of the present application:
[0040] Figure 2 A schematic flow chart of a method for controlling powering on a device provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the configuration of the intelligent peak-shifting power-on mode and power-on status information provided in an embodiment of the present application;
[0042] Figure 4 Another schematic diagram of a flow chart of a method for controlling powering on a device provided in an embodiment of the present application;
[0043] Figure 5 Another schematic diagram of a flow chart of a method for controlling powering on a device provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram comparing power-on ratios and time distribution curves of two staggered power-on modes for staggered power-on of batch servers provided in an embodiment of the present application;
[0045] Figure 7 A virtual structural diagram of a device power-on control device provided in an embodiment of the present application;
[0046] Figure 8 A schematic diagram of the hardware structure of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0048] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or modules need not be limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules that appear in this application is only a logical division. There may be other division modes when implemented in practical applications, for example, multiple modules may be combined into or integrated in another system, or some feature vectors may be ignored, or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection between modules may be electrical or other similar forms, which are not limited in this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0049] The function of controlling the batch power-on of devices can provide power-off recovery or initial power-on assistance for the IDC computer room, avoiding the impact of instantaneous excessive current on the IDC computer room caused by the simultaneous power-on of batch devices, resulting in power-on failure. The present application provides a device power-on control method that can be implemented based on cloud computing technology, which powers on batch servers in the IDC computer room in batches to avoid the problem of power-on failure of devices in the IDC computer room due to the simultaneous power-on of batch devices. Cloud computing refers to the delivery and use model of Internet Technology (IT) infrastructure, which refers to obtaining required resources through the network in an on-demand, easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which refers to obtaining required services through the network in an on-demand, easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model in terms of concept.
[0050] The realization of cloud computing relies on cloud technology, which refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and it needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0051] See also Figure 1 , Figure 1FIG. 1 is a schematic diagram of an architecture of a device power-on control system in an embodiment of the present application. Figure 1 As shown, the device power-on control system includes K servers to be powered on 101, a network 102 and a management server 103, wherein the K servers to be powered on 101 are connected to the management server 103 through the network 102 for communication. The server involved in this application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. This application will be introduced using a cloud gaming server as an example.
[0052] Combined with the above introduction, the following will introduce the control method of device power-on in this application from the perspective of the server, please refer to Figure 2 , an embodiment of a method for controlling powering on a device in an embodiment of the present application includes:
[0053] 201. Obtain power-on status information and current power-on times of a target device.
[0054] In this embodiment, the server can respond to the mode setting instruction and the parameter setting instruction, set the intelligent peak-shifting power-on mode of the target device in advance, and set the power-on status information of the target device, and then the server can obtain the power-on status and the current power-on times of the target device, wherein the power-on status information includes the power-on duration, the power-on probability, and the power-on retry times. Specifically, the server can periodically obtain the operating status of each of the N devices, where N is an integer greater than or equal to 1.
[0055] It is understandable that the N devices can be N terminal devices in a certain office area, or they can be servers in an Internet Data Center (IDC), without specific limitation. The N devices can be terminal devices, or servers, and of course they can also be other devices to be powered on, without specific limitation. The terminal devices can be smart phones, tablet computers, laptops, PDAs, personal computers, smart TVs, smart watches, etc., but are not limited to them. The connection method between the N devices and the server is not specifically limited here. The N devices and the server can be directly or indirectly connected through wired or wireless communication, and the amount of data between the server and the device to be powered on is not limited.
[0056] In addition, the operating status of each device refers to whether each device is turned on under normal circumstances. If the operating status of the device is turned on, the device can be restored after power failure. If the operating status of the device is not turned on, the device does not need to be restored after power failure. That is, in actual applications, the server maintains a power-on status table of all devices among N devices. Among the N devices, there will be a group of devices in a standby and non-operating state. For the devices in the non-operating state, when the N devices are in the power failure recovery stage, these devices in the standby and non-operating state do not need to be restored. In addition, the current power-on count indicates the number of times the target device has attempted to power on before the current moment.
[0057] It should be noted that IDC refers to a service platform with complete equipment (including high-speed Internet access bandwidth, high-performance local area network, and a safe and reliable computer room environment, etc.), professional management, and complete applications.
[0058] After periodically obtaining the operating status of each of the N devices, the server can determine in real time whether the N devices are in the power-off recovery stage. If it is determined that the N devices are in the power-off recovery stage, K devices are obtained according to the operating status of each of the N devices, and the K devices are the devices to be powered on among the N devices; any one device is selected from the K devices as the target device.
[0059] Combine the following Figure 2 For an explanation of the intelligent peak-shifting power-on mode and power-on status information of the target device configured by the server, see Figure 3 , Figure 3 The configuration diagram of the intelligent peak-shifting power-on mode and power-on status information provided in the embodiment of the present application includes:
[0060] 301. In response to the mode setting instruction, the server sets whether the target device uses the intelligent staggered power-on mode through the Basic Input Output System (BIOS) menu interface of the target device (such as setting whether to execute the Restore AC Power Loss intelligent staggered power-on mode in the BIOS menu interface of the target device). At the same time, the server can respond to the parameter setting instruction to set the power-on status information of the target device, and the power-on status information includes the power-on duration, the power-on probability and the number of power-on retries, wherein the power-on duration represents the maximum power-on duration set for K devices, the number of power-on retries represents the maximum number of power-ons allowed for the target device within the power-on duration, and the power-on probability represents the probability of selecting the target device from the K devices (that is, the probability that the server selects the target device and powers on it in the current cycle).
[0061] 302. In response to the mode setting instruction, the server sets the intelligent peak-shifting power-on mode on the web interface through the baseboard manager controller (BMC) global wide area network (World Wide Web, web) operation interface of the target device (such as adding an intelligent peak-shifting power-on function interface on the web to notify the BMC of the target device of the current power-on mode and use the intelligent peak-shifting power-on mode); in response to the parameter setting instruction, the server sets the power-on status information of the target device to a default value or sets the target power-on status information according to actual conditions.
[0062] 303. In response to the mode setting instruction, the server sets the intelligent peak-shifting power-on mode through the command line interface of the BMC of the target device (restful or ipmi command, or bmc command, that is, encapsulating ipmi, restful and other BMC command line interfaces, and using the intelligent peak-shifting power-on mode through the current power-on mode of the BMC of the target device); in response to the parameter setting instruction, the server sets the power-on status information of the target device to a default value or sets the power-on status information of the target device according to actual conditions.
[0063] 304. In response to the parameter setting instruction, the server sets specific values of the power-on duration, power-on probability and number of power-on retries in the power-on status information. For example, the power-on duration, power-on probability and number of power-on retries can be set to default values, such as the power-on duration T is set to 300 seconds (second, s), the number of power-on retries N is set to 10 times, and the power-on probability P is set to 50% by default; of course, the power-on duration, power-on probability and number of power-on retries can also be set according to actual conditions, without specific limitation.
[0064] It should be noted that the server can detect in real time whether the target device is in the Restore AC Power Loss state (the Restore AC Power Loss state refers to the state in which the target device is in the Alternating Current (AC) power failure and the power is reconnected). If it is determined that the target device is in the Restore AC Power Loss state, since the intelligent off-peak power-on mode has been set in advance according to the mode setting instruction, it can be judged here whether the target device is in the intelligent off-peak power-on mode (the BIOS interface, the BMC web interface or the BMC command line interface contains whether the intelligent off-peak power-on mode is selected, the power-on duration T, the number of power-on retries N, and the power-on probability P. Through the interface, it can be determined whether the target device is in the intelligent off-peak power-on mode, and the power-on duration, the number of power-on retries and the power-on probability can be obtained. If the target device is in the intelligent off-peak power-on mode, the power-on status information and the current number of power-on times of the target device are obtained. If the target device is not in the intelligent off-peak power-on mode, the target device is powered on according to other power-on modes, for example, the administrator is notified to perform manual power-on.
[0065] In one embodiment, the operation of generating a mode setting instruction includes at least one of a gesture operation, a sliding operation, a click operation, and a voice control operation. For example, when a user triggers a click operation through a terminal device, the terminal device generates a corresponding instruction, and the server can respond to the instruction. At this time, the click operation generates the mode setting instruction. That is to say, the operation instruction can be defined in advance, for example, the sliding operation is defined in advance as an operation for setting the intelligent staggered power-on mode of the target device (such as a left slide operation, a right slide operation, an up slide operation, and a down slide operation, etc.), or the click operation is defined as an operation for setting the intelligent staggered power-on mode of the target device (such as a double-click operation, a mouse slide operation, a long press operation, a single click operation, a simultaneous press of the left and right mouse buttons, and a scroll wheel mouse middle button, etc.), or the gesture operation is defined as an operation for setting the intelligent staggered power-on mode of the target device (such as swinging the wrist or arm to the left, swinging the wrist or arm to the right, such as a four-finger pinch operation or a three-finger up slide operation, etc.), or the voice control operation is defined as an operation for setting the intelligent staggered power-on mode of the target device (such as receiving a request to set the power-on mode of the target device to the intelligent staggered power-on mode). The above is only an example and does not represent a limitation on the operation of generating a mode setting instruction. Of course, the mode setting instruction can also be generated by setting a corresponding shortcut key on an input device. For example, if the input device is a keyboard, the "CTRL+A key" on the keyboard is set as the operation for setting the intelligent staggered power-on mode of the target device, without specific limitation.
[0066] It should also be noted that the operation of generating parameter setting instructions is similar to the operation of generating mode setting instructions. The operation of generating mode setting instructions has been described in detail above and will not be repeated here.
[0067] It should be noted that when the server obtains the power-on status information, current power-on times and running status of the target device, it can send an acquisition request to the BMC of the target device, and the BMC obtains the corresponding information and returns it to the server, or the BMC of the target device reports the power-on status information, current power-on times and running status in real time, without specific limitation.
[0068] 202. If the current power-on times are less than or equal to the power-on retry times, determine the selected state of the target device in the current cycle according to the power-on probability.
[0069] In this embodiment, after obtaining the power-on status information and the current power-on times of the target device, the server can determine whether the current power-on times of the target device are less than or equal to the power-on retry times. If the current power-on times of the target device are less than or equal to the power-on retry times, the selected state of the target device in the current cycle is determined according to the power-on probability. The selected state includes a selected state and an unselected state. The selected state indicates that the target device is selected to perform the power-on operation in the current cycle, and the unselected state indicates that the target device is not selected to perform the power-on operation in the current cycle. In other words, the server divides the power-on duration T into N small time slices according to the power-on retry times N, and each time slice is a cycle. When the current power-on times of the target device are less than or equal to the power-on retry times, the server can determine whether the target device is selected to perform the power-on operation in the current cycle according to the power-on probability.
[0070] It should be noted that before the server determines the selected state of the target device in the current cycle according to the power-on probability, since the priorities of the various devices are different according to the different services run by each device among the K devices, the server can first obtain the priority of the target device, and then determine the power-on probability weight of the target device according to the mapping relationship between the priority maintained in advance and the power-on probability weight, and then weight the power-on probability of the target device according to the power-on probability, and determine the selected state of the target device in the current cycle according to the weighted power-on probability. For example, the priority is divided into 1 to 10, with a total of 10 levels. The priority of the target device is level 8, and the corresponding power-on probability weight of level 8 is 40%. The initial power-on probability is 50%. It can be determined that the power-on probability of the target device after weighting is 90%, and then the selected state of the target device in the current cycle can be determined according to the 90% power-on probability. In this way, while ensuring staggered power-on, it can also ensure that the device with high priority among the K devices is powered on in advance.
[0071] It should be noted that when the server determines that the current power-on times are greater than the power-on retry times, it means that the overall power-on time of the K devices has exceeded the maximum power-on time allowed by the intelligent staggered power-on mode, and then the target device is directly controlled to perform the power-on operation.
[0072] 203. If the selected state of the target device in the current cycle is the selected state, determine the power-on waiting time according to the power-on duration and the number of power-on retries.
[0073] In this embodiment, when the server determines that the selected state of the target device in the current cycle is the selected state, the power-on waiting time can be determined according to the power-on duration and the number of power-on retries. Specifically, the server can first determine the ratio of the power-on duration to the number of power-on retries, then determine the power-on waiting time range of the target device according to the ratio of the power-on duration to the number of power-on retries, and finally determine the power-on waiting time according to the power-on waiting time range. That is, the server can generate a random number as the power-on waiting time within the range of 0 and T / N (T / N represents the ratio of the power-on duration to the number of power-on retries) (of course, it can also be other ranges, such as 1 to T / N, which is not specifically limited).
[0074] 204. Control the target device to perform a power-on operation according to the power-on waiting time.
[0075] In this embodiment, after determining the power-on waiting time of the target device, the server can control the target device to perform a power-on operation according to the power-on waiting time. It can be understood that the power-on waiting time can be a moment, for example, the current moment is 17:00:00, and the power-on waiting time is 17:00:05. When the power-on waiting time is reached at the current moment, the target device is controlled to perform a power-on operation; the power-on waiting time can also be a duration, for example, the current moment is 17:00:00, and the power-on waiting time is 5 seconds, then wait for 5 seconds after the current moment, and control the target device to perform a power-on operation, such as sending a power-on instruction to the BMC of the target device, and the BMC controls the target device to perform a power-on operation.
[0076] In one embodiment, if the selected state of the target device in the current cycle is an unselected state, the current power-on count is updated;
[0077] If the updated current power-on number is less than or equal to the power-on retry number, the selected state of the target device in the next cycle after the current cycle is determined according to the power-on probability.
[0078] In this embodiment, when the server determines that the selected state of the target device in the current cycle is the unselected state, the server can add 1 to the current power-on number. For example, if the current power-on number is 5 times, the server will update the power-on number of the target device to 6 times when the server determines that the selected state of the target device in the current cycle is the unselected state. After that, the server can determine whether the updated current power-on number reaches the power-on retry number. If the updated current power-on number is less than or equal to the power-on retry number, the server will continue to determine the selected state of the target device in the next cycle after the current cycle according to the power-on probability, and so on, until the target device is powered on.
[0079] In one embodiment, the server further performs the following operations:
[0080] Determine the remaining power consumption quotas corresponding to K devices;
[0081] If the remaining power consumption quota is greater than the total power consumption of the non-powered devices among the K devices, the non-powered devices among the K devices are controlled to perform a power-on operation.
[0082] In this embodiment, the server can also determine the remaining power consumption quota corresponding to K devices. For example, for an IDC computer room, the server can read the total power consumption of the IDC computer room and determine the total power consumption of the powered-on devices among the K devices. Then, the remaining power consumption quota corresponding to the K devices can be determined based on the total power consumption and the total power consumption of the powered-on devices among the K devices. Then, it is determined whether the remaining power consumption quota is greater than the total power consumption of the unpowered devices among the K devices. If the remaining power consumption quota is greater than the total power consumption of the unpowered devices among the K devices, it means that even if the unpowered devices among the K devices are powered on at the same time, it will not cause the instantaneous current to be too high. Therefore, in order to further reduce the power-on time of batch devices, the unpowered devices among the K devices can be controlled to perform the power-on operation at the same time.
[0083] In addition, if the current number of power-on times is greater than the number of power-on retries, and the remaining quota of power consumption corresponding to the K devices is greater than the maximum power consumption of the target device, the target device is powered on. That is, when the current number of power-on times of the target device is greater than the number of power-on retries, it means that the number of power-on retries allocated to the target device has been used up. If the target device has not been powered on at this time, the target device can be powered on directly, or it can be determined whether the remaining quota of power consumption corresponding to the K devices is greater than the maximum power consumption of the target device. When it is determined that the remaining quota of power consumption corresponding to the K devices is greater than the maximum power consumption of the target device, the target device is powered on.
[0084] It should also be noted that before controlling the target device to perform a power-on operation, the server can also determine whether the target device has the power-on capability. If the target device has the power-on capability, the server controls the target device to perform the power-on operation. That is, the server can determine whether the target device has the power-on capability from two aspects. On the one hand, it can be determined by determining the power-on status of the target device, and on the other hand, it can be determined by determining the hardware status of the target device.
[0085] On the one hand, when K devices are in the power-off recovery stage, due to the presence of the administrator, one or several of the K devices may have been manually powered on and recovered by the administrator. At this time, the power-on status of the target device can be obtained to determine whether the target device has the power-on capability. If the target device is not powered on, the target device is controlled to perform the power-on operation;
[0086] On the other hand, since power failure may cause the hardware of the target device to be abnormal, the server can also send a check instruction to the BMC of the target device, and the BMC checks the target device to determine whether the hardware of the target device is suitable for powering on, such as checking whether the temperature of the central processor of the target device is too high or checking whether the sensor of the target device is abnormal, etc. If the BMC determines that the hardware of the target device is suitable for powering on, the target device is controlled to perform the power-on operation. If the BMC determines that the hardware of the target device is not suitable for powering on, a prompt message is sent to the administrator to notify the administrator to repair the target device. It is understandable that before controlling the target device to perform the power-on operation, the server can also comprehensively determine whether the target device has the power-on capability, that is, simultaneously judge the power-on status of the target device and the hardware status of the target device to determine whether to perform the power-on operation on the target device. Only when the power-on status of the target device and the hardware status of the target device are both met, the target device is controlled to perform the power-on operation.
[0087] It should be noted that in the operation scenario of large quantities of devices, the Restore ACPower Loss item will be set to Power Off in the default menu of the device by default, that is, all devices in the large quantity of devices will not perform the power-on operation after power failure recovery by default. An additional server is set up, which controls the power-on of all devices in turn according to the device power-on control method provided in this application.
[0088] To sum up, it can be seen that in the embodiment provided by the present application, when a batch of devices are powered on at the same time, the selected state of the device is determined by the selection probability of the target device. At the same time, when the target device is in the selected state, the power-on waiting time is determined according to the power-on time and the number of power-on retries, and then the target device is controlled to perform the power-on operation through the power-on waiting time, which can ensure that each device in the K devices is powered on at off-peak times, avoiding the simultaneous power-on of all the K devices, thereby avoiding the impact of excessive instantaneous current caused by the simultaneous power-on of the batch devices, resulting in the failure of the batch devices to power on.
[0089] In actual applications, there are two application scenarios. One is that when batch devices are powered on at off-peak times, each device in the batch is controlled by the BMC of each device to perform power-on operations. That is, the BMC of the device is responsible for determining whether the device is in the intelligent off-peak power-on mode, whether the current power-on times of the device are less than or equal to the power-on retry times, the selected state of the device in the current cycle, the power-on waiting time, and the control of the device to perform power-on operations. The other is the application scenario for the power-on operation of batch devices. The power-on operation of batch devices is uniformly deployed and controlled by the management server. Figure 4 as well as Figure 5 The following description assumes that the device to be powered on is a server:
[0090] See also Figure 4 , Figure 4 Another flowchart of a method for controlling power-on of a device provided in an embodiment of the present application includes:
[0091] 401. Determine whether the server is in the intelligent peak-shifting power-on mode. If so, execute step 402; if not, execute step 407.
[0092] In this embodiment, when the server is in the power-off recovery stage, the BMC of the server can determine whether the server is in the intelligent staggered power-on mode. The setting of the intelligent staggered power-on mode has been described in detail above, and the details will not be repeated here. Here, when judging whether the server is in the intelligent staggered power-on mode, a status can be obtained from different interfaces according to the different setting methods of the intelligent staggered power-on mode, and whether the server is in the intelligent staggered power-on mode can be determined according to the status. If the server is in the intelligent staggered power-on mode, execute step 402; if the server is not in the intelligent staggered power-on mode, execute step 407. The server is any one of the multiple servers to be powered on.
[0093] 402. Obtain power-on status information of the server.
[0094] In this embodiment, after determining that the server is in the intelligent staggered power-on mode, the BMC can obtain the power-on status information of the server, which includes the power-on duration, the number of power-on retries, and the power-on probability. Figure 2 The power-on status of the server and the method for obtaining it have been described in detail in step 201, and will not be repeated here.
[0095] 403. Determine whether the current power-on times of the server are less than or equal to the power-on retry times. If the current power-on times of the server are less than or equal to the power-on retry times, execute step 404. If the current power-on retry times of the server are greater than the power-on retry times, execute step 407.
[0096] In this embodiment, the BMC can obtain the value of the current power-on number n of the server and determine whether the current power-on number is less than or equal to the power-on retry number. If the current power-on number of the server is less than or equal to the power-on retry number, execute step 404; if the current power-on number of the server is greater than the power-on retry number, execute step 407.
[0097] 404. Determine the selected state of the server in the current cycle according to the power-on probability of the server. If the selected state of the server in the current cycle is the selected state, execute step 405. If the selected state of the server in the current cycle is the unselected state, execute step 407.
[0098] In this embodiment, after determining that the current power-on times of the server are less than or equal to the power-on retry times, the BMC can judge the selected state of the server in the current cycle according to the power-on probability of the server, and the selected state includes a selected state and an unselected state, wherein the selected state indicates whether the server is selected to perform the power-on operation in the current cycle, and the unselected state indicates that the server is not selected to perform the power-on operation in the current cycle. If it is determined that the selected state of the server in the current cycle is the selected state according to the power-on probability of the server, step 405 is executed; if it is determined that the selected state of the server in the current cycle is the unselected state according to the power-on state of the server, step 407 is executed.
[0099] 405. Determine the power-on waiting time according to the power-on time and the number of power-on retries.
[0100] 406. Control the server to perform a power-on operation according to the power-on waiting time.
[0101] It should be noted that step 405 to step 406 are Figure 2 Steps 203 to 204 in the above are similar. Figure 2 The details have been explained in detail in the article, so I will not repeat them here.
[0102] 407. Perform other operations.
[0103] In this embodiment, if the BMC determines that the server is not in the intelligent staggered power-on mode, the server is controlled to perform power-on operations in other modes, such as powering on according to a specified time gradient; if the BMC determines that the current power-on times of the server are greater than the power-on retries, it means that the power-on time of the server is greater than the overall intelligent staggered power-on duration, and the server is directly controlled to perform the power-on operation; if it is determined according to the power-on probability of the server that the selected state of the server in the current cycle is unselected, the current power-on times are updated, that is, the current power-on times are increased by 1, and then steps 401 to 404 are repeated until the server is controlled to perform the power-on operation, or the current power-on times are greater than the power-on retries.
[0104] It should be noted that when controlling the server to perform a power-on operation, it is also possible to determine whether the server has the power-on capability. Specifically, the BMC can determine whether the server has the power-on capability from two aspects: one is to determine by determining the power-on status of the server, and the other is to determine by determining the hardware status of the server.
[0105] On the one hand, when the server is in the power-off recovery stage, due to the presence of the administrator, the server may have been manually powered on and recovered by the administrator. At this time, the power-on status of the server can be obtained to determine whether the server has the power-on capability. If the server is not powered on, the server is controlled to perform the power-on operation;
[0106] On the other hand, since power failure may cause abnormalities in the server's hardware, the BMC can also check the server's hardware to determine whether the server's hardware is suitable for powering on, such as checking whether the server's central processor temperature is too high or checking whether the server's sensor is abnormal, etc. If the BMC determines that the server's hardware is suitable for powering on, it controls the server to perform a power-on operation. If the BMC determines that the server's hardware is not suitable for powering on, it sends a prompt message to the administrator to notify the administrator to repair the server. It is understandable that before controlling the server to perform a power-on operation, the BMC can also comprehensively determine whether the server has the ability to power on, that is, simultaneously judge the server's power-on status and the server's hardware status to determine whether to perform a power-on operation on the server. Only when the server's power-on status and the server's hardware status are both met, the server is controlled to perform a power-on operation.
[0107] To sum up, it can be seen that in the embodiment provided by the present application, when power failure recovery is performed on multiple servers, the BMC determines the selected state of the device by the selection probability of the server, and at the same time, when the server is in the selected state, the power-on waiting time is determined according to the power-on time and the number of power-on retries, and then the server is controlled to perform the power-on operation by the power-on waiting time, which can ensure that each server in the multiple servers performs staggered power-on, avoiding the simultaneous power-on of all servers in the multiple servers, thereby avoiding the impact of excessive instantaneous current caused by the simultaneous power-on of batch servers, resulting in the problem of power-on failure of batch servers.
[0108] See also Figure 5 , Figure 5 Another flowchart of a method for controlling power-on of a device provided in an embodiment of the present application includes:
[0109] 501. The management server periodically reads the power-on status of the server in the target computer room.
[0110] In this embodiment, the management server can periodically read the power-on status of the servers in the target computer room. Specifically, the management server can poll the power-on status of all servers every 5-10 minutes according to the control scale of the target computer room, and store the power-on status of the servers in the target computer room in the power-on status file F. Among them, the target computer room can be an IDC computer room, and the power-on status indicates the power-on status of the server. If the server is powered on, its power-on status is powered on, and if the server is not powered on, its power-on status is not powered on, that is, there may be one or a batch of servers in the target computer room that are not powered on. At this time, the management server can determine the power-on status of each server in the target computer room in the current cycle by periodically reading the power-on status of the servers in the target computer room.
[0111] 502. If the target computer room is in the power-off recovery stage, the management server determines whether the target computer room implements the intelligent peak-shifting power-on strategy. If the target computer room implements the intelligent peak-shifting power-on strategy, step 503 is executed; if the target computer room does not implement the intelligent peak-shifting power-on strategy, step 509 is executed.
[0112] In this embodiment, if the target computer room is in the power failure recovery stage, the management server can determine whether the target computer room is in the intelligent peak-shifting power-on mode through the pre-configured power-on strategy file. If the target computer room implements the intelligent peak-shifting power-on strategy, step 503 is executed; if the target computer room does not implement the intelligent peak-shifting power-on strategy, step 509 is executed.
[0113] 503. The management server determines K servers to be powered on in the target computer room in the current cycle according to the power-on status of the servers.
[0114] In this embodiment, the management server obtains the power-on status file F stored in the current cycle, and takes the servers that are in the powered-on state in the power-on status file F but are currently in the unpowered state as K servers to be powered on, where K is a positive integer greater than or equal to 1.
[0115] It should be noted that, through step 502, it can be determined whether to implement the intelligent staggered power-on strategy for the target computer room, and through step 503, the K servers to be powered on in the target computer room in the current cycle can be obtained. However, there is no restriction on the order of execution between these two steps. Step 502 can be executed first, or step 503 can be executed first, or they can be executed at the same time, without specific limitation.
[0116] 504. The management server obtains the power-on status information and current power-on times corresponding to the target server.
[0117] It should be noted that the target server is any one of the K servers, and the power-on status information includes the power-on duration, the number of power-on retries, and the power-on probability. Step 504 is the same as the above Figure 2 Similar to step 201 in the above Figure 2 A detailed description has been given and will not be repeated here.
[0118] 505. The management server determines whether the current power-on times are less than or equal to the power-on retry times. If the current power-on times are less than or equal to the power-on retry times, execute step 506. If the current power-on times are greater than the power-on retry times, execute step 509.
[0119] In this embodiment, after obtaining the power-on retry times and the current power-on times, the management server may determine whether the power-on times are less than or equal to the power-on retry times. If so, step 506 is executed; if not, step 509 is executed.
[0120] 506. The management server determines the selected state of the target server in the current cycle according to the power-on probability of the target server. If the selected state of the target server in the current cycle is the selected state, execute step 507; if the selected state of the target server in the current cycle is the unselected state, execute step 509.
[0121] It should be noted that step 506 is similar to the above Figure 2 Similar to step 202 in the above Figure 2 In addition, when the management server determines the selected state of the target server in the current cycle according to the power-on probability of the target server, it can also adjust the power-on probability of the target server according to the priority of the target service, and determine the selected state of the target server in the current cycle according to the adjusted power-on probability of the target server.
[0122] 507. The server determines the power-on waiting time according to the power-on duration and the number of power-on retries.
[0123] 508. The management server controls the server to perform a power-on operation according to the power-on waiting time.
[0124] It should be noted that steps 507 to 508 are similar to the above Figure 2 Similar to steps 203 to 204 in the above Figure 2 A detailed description has been given and will not be repeated here.
[0125] In addition, the management server can also determine the remaining power consumption quota corresponding to the target computer room. For example, for an IDC computer room, the management server can read the total power consumption of the IDC computer room and determine the total power consumption of the powered-on servers among the K servers. Then, the remaining power consumption quota corresponding to the IDC computer room can be determined based on the total power consumption and the total power consumption of the powered-on servers among the K servers. Then, it is determined whether the remaining power consumption quota is greater than the total power consumption of the non-powered servers among the K servers. If the remaining power consumption quota is greater than the total power consumption of the non-powered servers among the K servers, it means that even if the non-powered servers among the K servers are powered on at the same time, it will not cause the instantaneous current to be too high. Therefore, in order to further reduce the power-on time of batch equipment, the non-powered servers among the K servers can be controlled to perform the power-on operation at the same time.
[0126] In addition, if the current power-on times are greater than the power-on retry times, and the remaining power consumption quota corresponding to the K servers is greater than the maximum power consumption of the target server, the target server is powered on. That is, when the current power-on times of the target server are greater than the power-on retry times, it means that the power-on retry times allocated to the target server have been used up. If the target server has not been powered on at this time, the target server can be powered on directly, or it can be determined whether the remaining power consumption quota corresponding to the target computer room is greater than the maximum power consumption of the target server. When it is determined that the remaining power consumption quota corresponding to the target computer room is greater than the maximum power consumption of the target server, the target server is powered on.
[0127] It should be noted that when controlling the server to perform a power-on operation, it is also possible to determine whether the server has the ability to power on. Specifically, determining whether the server has the ability to power on can be done from two aspects: on the one hand, by determining the power-on status of the server; and on the other hand, by determining the hardware status of the server.
[0128] On the one hand, when the server is in the power-off recovery stage, due to the presence of the administrator, the server may have been manually powered on and recovered by the administrator. At this time, the power-on status of the server can be obtained to determine whether the server has the power-on capability. If the server is not powered on, the server is controlled to perform the power-on operation;
[0129] On the other hand, since power failure may cause abnormalities in the server's hardware, the server's hardware can also be checked to determine whether the server's hardware is suitable for powering on, such as checking whether the server's central processor temperature is too high or checking whether the server's sensor is abnormal, etc. If it is determined that the server's hardware is suitable for powering on, the server is controlled to perform a power-on operation. If it is determined that the server's hardware is not suitable for powering on, a prompt message is sent to the administrator to notify the administrator to inspect the server. It is understandable that before controlling the server to perform a power-on operation, the above two aspects can also be combined to determine whether the server has the ability to power on, that is, the server's power-on status and the server's hardware status are simultaneously judged to determine whether to perform a power-on operation on the server. Only when the server's power-on status and the server's hardware status are both met, the server is controlled to perform a power-on operation.
[0130] 509. Perform other operations.
[0131] In this embodiment, if it is determined that the target computer room does not implement the intelligent staggered power-on strategy, the server to be powered on in the target computer room is powered on in other modes, such as powering on according to a specified time gradient; if it is determined that the current number of power-ons is greater than the number of power-on retries, it means that the power-on time of the target server is already greater than the overall intelligent staggered power-on duration, and the target server is directly controlled to perform the power-on operation; if it is determined that the selected state of the target server in the current cycle is unselected according to the power-on probability of the target server, the current number of power-ons is updated, that is, the current number of power-ons is increased by 1, and then steps 503 to 506 are repeated until the target server is controlled to perform the power-on operation, or the current number of power-ons is greater than the number of power-on retries.
[0132] To sum up, it can be seen that in the embodiment provided by the present application, when power failure recovery is performed on multiple servers, the management server determines the selected state of the device by the selection probability of a single server. At the same time, when a single server is in the selected state, the power-on waiting time is determined according to the power-on time and the number of power-on retries. Then, the server is controlled to perform the power-on operation through the power-on waiting time, which can ensure that each server in the multiple servers performs staggered power-on, avoiding power-on of all servers in the multiple servers at the same time, thereby avoiding the impact of excessive instantaneous current caused by powering on batch servers at the same time, resulting in power-on failure of batch servers.
[0133] See also Figure 6 , Figure 6 A schematic diagram comparing the power-on ratio-time distribution curves of the two staggered power-on modes provided in the embodiment of the present application for staggered power-on of batch servers, wherein 601 is the power-on ratio-time distribution curve of staggered power-on of all servers in the IDC computer room through the intelligent staggered power-on strategy provided in the embodiment of the present application, 602 is the power-on ratio-time distribution curve of powering on all servers in the IDC computer room through uniformly distributed time, T1 is the moment when 90% of the servers are successfully powered on using the solution provided by the present application, T2 is the moment when 90% of the servers are successfully powered on using the uniformly distributed time, T3 is the moment when all servers are powered on, and Figure 6 It can be clearly seen that compared with the uniform distribution method for powering on batch servers, the solution provided by the present application can power on the largest number of servers in the shortest time, which not only avoids the risk of instantaneous current shock in the IDC, but also ensures that the IDC computer room can power on most (>90%) of the servers in a short time, ensuring that the services running on the servers can be quickly restored.
[0134] The above describes the embodiment of the present application from the perspective of a method for controlling powering on a device, and the following describes the embodiment of the present application from the perspective of a device powering on control apparatus.
[0135] See also Figure 7 In an embodiment of the present application, a device power-on control device is provided, and the device power-on control device 700 includes:
[0136] The acquisition unit 701 is used to acquire the power-on status information and the current power-on times of the target device, wherein the power-on status information includes the power-on duration, the power-on probability and the power-on retry times;
[0137] A first determining unit 702 is configured to determine the selected state of the target device in the current cycle according to the power-on probability if the current power-on number is less than or equal to the power-on retry number, wherein the power-on probability represents the probability of selecting the target device from K devices, and K is an integer greater than or equal to 1;
[0138] The second determining unit 703 is configured to determine the power-on waiting time according to the power-on duration and the number of power-on retries if the selected state of the target device in the current cycle is the selected state, wherein the power-on duration represents the maximum power-on duration set for the K devices, and the number of power-on retries represents the maximum number of power-ons allowed for the target device within the power-on duration;
[0139] The control unit 704 is used to control the target device to perform a power-on operation according to the power-on waiting time.
[0140] In a possible design, the second determining unit 703 is specifically configured to:
[0141] Determine the ratio of power-on duration to the number of power-on retries;
[0142] Determine the power-on waiting time range of the target device according to the ratio of the power-on time to the number of power-on retries;
[0143] Determine the power-on waiting time within the power-on waiting time range.
[0144] In one possible design, the control unit 704 is further configured to update the current power-on count if the selected state of the target device in the current cycle is an unselected state;
[0145] The first determining unit 702 is further configured to determine a selected state of the target device in a next cycle after the current cycle according to the power-on probability if the updated current power-on number is less than or equal to the power-on retry number.
[0146] In a possible design, the second determining unit 703 is further used to determine the remaining power consumption quotas corresponding to the K devices;
[0147] The control unit 704 is further configured to control the non-powered devices among the K devices to perform a power-on operation if the remaining power consumption quota is greater than the total power consumption of the non-powered devices among the K devices.
[0148] In one possible design, the control unit 704 is further configured to control the target device to perform a power-on operation if the current power-on number is greater than the power-on retry number;
[0149] or,
[0150] The control unit 704 is further configured to perform a power-on operation on the target device if the current power-on times are greater than the power-on retry times and the remaining power consumption quotas corresponding to the K devices are greater than the maximum power consumption of the target device.
[0151] In a possible design, the second determining unit 703 is further configured to:
[0152] Determine the power-on probability weight of the target device according to the priority of the target device;
[0153] The power-on probability is weighted according to the power-on probability weight;
[0154] The first determining unit 702 is further specifically configured to:
[0155] The selected state of the target device in the current cycle is determined according to the weighted power-on probability.
[0156] In a possible design, the acquisition unit 701 is further used for:
[0157] Periodically obtain the operating status of each of N devices, where N is an integer greater than or equal to 1;
[0158] If N devices are in the power-off recovery phase, K devices are obtained according to the operating status of each device in the N devices, and the K devices are the devices to be powered on in the N devices;
[0159] Select any one device from K devices as the target device.
[0160] In summary, it can be seen that in the embodiments provided by the present application, when powering on batch devices, the selected state of the device is determined by the selection probability of the target device, and the target device is any device to be powered on in the batch devices. At the same time, when the target device is in the selected state, the power-on waiting time is determined according to the power-on time of the target device and the number of power-on retries, and then the target device is controlled to perform the power-on operation through the power-on waiting time, which can ensure that each device in the K devices performs staggered power-on, avoids powering on all the K devices at the same time, and thus avoids the impact of excessive instantaneous current caused by powering on the batch devices at the same time, resulting in power-on failure of the batch devices.
[0161] The embodiment of the present application also provides another device power-on control device, which is deployed on a server, which can be a server. Figure 8 , Figure 8 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 822 (e.g., one or more processors) and memory 832, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 may be short-term storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 may be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800.
[0162] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0163] The steps performed by the server in the above embodiment can be based on the Figure 8 The server structure shown.
[0164] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer executes the computer program, the method flow related to the device power-on control device in any of the above method embodiments is implemented. Correspondingly, the computer can be the above device power-on control device.
[0165] The present application also provides a computer program or a computer program product including the computer program, which, when executed on a computer, enables the computer to implement the method flow related to the device power-on control device in any of the above method embodiments. Correspondingly, the computer may be the above device power-on control device.
[0166] In the above Figures 2 to 5 In the embodiments corresponding to any of the figures in the drawings, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product.
[0167] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0168] It should be understood that the processor mentioned in the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0169] It should also be understood that the number of processors in the present application can be one or more, which can be adjusted according to the actual application scenario, which is only an exemplary description and not limited here. The number of memories in the embodiments of the present application can be one or more, which can be adjusted according to the actual application scenario, which is only an exemplary description and not limited here.
[0170] It should also be noted that when the power-on control device of the equipment includes a processor (or processing unit) and a memory, the processor in this application can be integrated with the memory, or the processor and the memory can be connected through an interface. The specific adjustment can be made according to the actual application scenario and is not limited.
[0171] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0172] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0173] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0174] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or other device, etc.) to execute the present application. Figures 2 to 5 All or part of the steps of the method described in the embodiment corresponding to any one of the accompanying drawings.
[0176] It should be understood that the storage medium or memory mentioned in the present application may include volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
[0177] It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0178] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling powering on a device, characterized in that: include: Obtaining power-on status information and current power-on times of the target device, wherein the power-on status information includes power-on duration, power-on probability, and power-on retry times; If the current power-on number is less than or equal to the power-on retry number, determining the selected state of the target device in the current cycle according to the power-on probability, wherein the power-on probability represents the probability of selecting the target device from K devices, and K is an integer greater than or equal to 1; If the selected state of the target device in the current cycle is the selected state, the power-on waiting time range of the target device is determined according to the ratio of the power-on time to the power-on retry number, and the power-on waiting time is determined according to the power-on waiting time range, wherein the power-on time represents the maximum power-on time set for the K devices, and the power-on retry number represents the maximum power-on times allowed for the target device within the power-on time; The target device is controlled to perform a power-on operation according to the power-on waiting time.
2. The control method according to claim 1, characterized in that: The method further comprises: If the selected state of the target device in the current cycle is unselected, updating the current power-on times; If the updated current power-on number is less than or equal to the power-on retry number, the selected state of the target device in a next cycle after the current cycle is determined according to the power-on probability.
3. The control method according to claim 2, characterized in that: The method further comprises: Determine the remaining power consumption quotas corresponding to the K devices; If the remaining quota of power consumption is greater than the total power consumption of the non-powered devices among the K devices, the non-powered devices among the K devices are controlled to perform a power-on operation.
4. The control method according to claim 3, characterized in that: The method further comprises: If the current power-on number is greater than the power-on retry number, controlling the target device to perform a power-on operation; Or, the method further comprises: If the current power-on times are greater than the power-on retry times, and the remaining power consumption quotas corresponding to the K devices are greater than the maximum power consumption of the target device, a power-on operation is performed on the target device.
5. The control method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining a power-on probability weight of the target device according to the priority of the target device; Weighting the power-on probability according to the power-on probability weight; The determining the selected state of the target device in the current cycle according to the power-on probability includes: The selected state of the target device in the current cycle is determined according to the weighted power-on probability.
6. The control method according to any one of claims 1 to 4, characterized in that: Before obtaining the power-on status information and the current power-on times of the target device, the method further includes: Periodically obtaining the operating status of each of N devices, where N is an integer greater than or equal to 1; If the N devices are in a power-off recovery phase, the K devices are acquired according to the operating status of each device in the N devices, and the K devices are the devices to be powered on in the N devices; Any one device is selected from the K devices as the target device.
7. A device for controlling power on of equipment, characterized in that: include: An acquisition unit, configured to acquire power-on status information and a current power-on number of the target device, wherein the power-on status information includes a power-on duration, a power-on probability, and a power-on retry number; a first determining unit, configured to determine, if the current power-on number is less than or equal to the power-on retry number, a selected state of the target device in a current cycle according to the power-on probability, wherein the power-on probability represents a probability of selecting the target device from K devices, and K is an integer greater than or equal to 1; A second determining unit is used to determine a power-on waiting time range of the target device according to a ratio of the power-on time to the power-on retry number if the selected state of the target device in the current cycle is the selected state, and determine the power-on waiting time within the power-on waiting time range, wherein the power-on time represents a maximum power-on time set for the K devices, and the power-on retry number represents a maximum power-on number allowed for the target device within the power-on time; A control unit is used to control the target device to perform a power-on operation according to the power-on waiting time.
8. The control device according to claim 7, characterized in that: The control unit is further configured to update the current power-on times if the selected state of the target device in the current cycle is an unselected state; The first determining unit is further configured to determine a selected state of the target device in a next cycle after the current cycle according to the power-on probability if the updated current power-on number is less than or equal to the power-on retry number.
9. The control device according to claim 8, characterized in that: The second determining unit is further used to determine the remaining power consumption quotas corresponding to the K devices; The control unit is further configured to control the non-powered devices among the K devices to perform a power-on operation if the remaining power consumption quota is greater than the total power consumption of the non-powered devices among the K devices.
10. The control device according to claim 9, characterized in that: The control unit is further configured to control the target device to perform a power-on operation if the current power-on number is greater than the power-on retry number; Alternatively, the control unit is further configured to perform a power-on operation on the target device if the current power-on number is greater than the power-on retry number and the remaining power consumption quota corresponding to the K devices is greater than the maximum power consumption of the target device.
11. The control device according to any one of claims 7 to 10, characterized in that: The second determining unit is further configured to determine a power-on probability weight of the target device according to the priority of the target device; and weight the power-on probability according to the power-on probability weight; The first determining unit is specifically configured to determine a selected state of the target device in the current cycle according to the weighted power-on probability.
12. The control device according to any one of claims 7 to 10, characterized in that: The acquisition unit is also used for: Before obtaining the power-on status information and the current power-on times of the target device, periodically obtain the operating status of each device in the N devices, where N is an integer greater than or equal to 1; If the N devices are in a power-off recovery phase, the K devices are acquired according to the operating status of each device in the N devices, and the K devices are the devices to be powered on in the N devices; Any one device is selected from the K devices as the target device.
13. A computer device, characterized in that: include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, and the processor is used to execute the control method according to any one of claims 1 to 6 according to the instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
14. A computer storage medium, characterized in that: The device comprises instructions, which, when executed on a computer, enable the computer to execute the control method according to any one of claims 1 to 6.
15. A computer program product, characterized in that The invention comprises a computer program, which, when executed on a computer, enables the computer to implement the control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Device for controlling power-on of hard disks and storage equipment
CN111796653A