Power supply control method, device, power on / off management system, server and medium
By identifying the trigger signal and duration of the power switch button, combining it with preset configuration information, introducing a safety switch mechanism and composite key sequence verification, the problem of unexpected shutdown caused by component failure of electronic power switch buttons in harsh environments is solved, thereby improving server reliability and data security.
Patent Information
- Application Number
- CN202511072473.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-07-31
AI Technical Summary
Existing electronic power switch buttons are prone to corrosion and aging in high-humidity, high-temperature or corrosive environments, causing component failures to mistakenly trigger server shutdowns, resulting in data loss and economic losses. Existing protection mechanisms are not sufficient to deal with unexpected shutdowns caused by hardware failures.
By obtaining the power switch trigger signal, identifying the number and duration of button triggering, and combining it with preset configuration information, it intelligently determines the power on/off operation, introduces a safety switch mechanism and composite button sequence verification, and prevents accidental shutdown caused by misoperation and component failure.
It improves the server's ability to resist misoperation and operational reliability, avoids unexpected shutdowns, ensures data integrity and business continuity, extends equipment life and reduces maintenance costs.
Smart Images

Figure CN120560485B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a power control method, device, power on / off management system, server, and medium. Background Art
[0002] In data centers, industrial control, and other applications requiring extremely high reliability, servers and other electronic equipment require a power switch to start and stop the system. This switch is often located on the front control panel of the chassis. When pressed, a signal is transmitted through the motherboard's electronic circuitry to the BMC (Baseboard Management Controller) chip, the CPLD (Complex Programmable Logic Device) timing control chip, and finally to the PCH (Platform Controller Hub) chip to complete the startup process. The BMC chip also records power-on and power-off information for basic power management.
[0003] Existing electronic power on / off buttons present numerous practical challenges. When servers are exposed to high humidity, high temperature, or corrosive environments for extended periods, the electronic components within the on / off buttons are susceptible to corrosion, aging, or even short circuits. Component failures can erroneously trigger a system shutdown, disrupting server operations. When servers operate for extended periods, unexpected shutdowns, especially when processing large amounts of important data, can cause immeasurable economic losses and data integrity risks. While existing designs include basic protection mechanisms, such as setting a single press duration or triggering logic, they cannot fully address unexpected shutdowns caused by component failures.
[0004] Therefore, there is an urgent need for a more robust and intelligent power control mechanism to fundamentally eliminate unexpected interruptions of server systems caused by hardware failures and ensure data security and the stability of continuous system operation. Summary of the Invention
[0005] The present invention provides a power control method, device, power on / off management system, server and medium to at least solve the problem of faulty malfunction of electronic power switch buttons due to environmental factors or component aging, which may cause the power to be shut down incorrectly.
[0006] The present invention provides a power control method, comprising the following steps: obtaining the current state of a device to be controlled and a power switch trigger signal; identifying the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal based on the power switch trigger signal; and controlling the device to be controlled to be turned on or off based on the current state, the number of power button triggers, the duration of each trigger, and the total duration based on preset power control configuration information.
[0007] The present invention also provides a power control device, including: an acquisition module for acquiring the current state of the device to be controlled and a power switch trigger signal; an identification module for identifying the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal based on the power switch trigger signal; a control module for controlling the device to be controlled to turn on or off according to the current state, the number of power button triggers, the duration of each trigger, and the total duration based on preset power control configuration information.
[0008] The present invention also provides a power on / off management system, comprising: a first controller, a complex programmable logic device and a second controller, wherein the first controller is used to output a power on control signal or a power off control signal based on preset power control configuration information, according to the current state of the device to be controlled, the number of times the power button is triggered, the duration of each trigger and the total duration of the power switch trigger signal; the complex programmable logic device is used to send the power on control signal or the power off control signal to the second controller; the second controller is used to control the device to be controlled to power on according to the power on control signal, or to control the device to be controlled to shut down according to the shutdown control signal.
[0009] The present invention also provides a server, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned power control method.
[0010] The present invention also provides a non-volatile computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the power control method described above are implemented.
[0011] The present invention obtains the current state of the device to be controlled and the power switch trigger signal; identifies the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal based on the power switch trigger signal; and controls the device to be controlled to turn on or off based on the current state, the number of power button triggers, the duration of each trigger, and the total duration, based on preset power control configuration information. This solves the problem of existing electronic power switch buttons being mistriggered and shut down due to environmental factors or component aging, improves the server power switch's ability to resist misoperation and the reliability of system operation, effectively avoids accidental shutdowns caused by power button hardware failures, and thus ensures server data integrity and business continuity. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 A flowchart of a power supply control method according to an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of a circuit design for power supply control according to an embodiment of the present invention;
[0015] Figure 3 is a flow chart of a power supply control method according to an embodiment of the present invention;
[0016] Figure 4 is a schematic diagram of a power control device according to an embodiment of the present invention;
[0017] Figure 5 is a schematic diagram of a power on / off management system according to an embodiment of the present invention;
[0018] Figure 6 FIG. 1 is a schematic diagram of a server structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.
[0021] In today's data centers, industrial control, and other applications with stringent high reliability requirements, servers and other electronic devices are typically equipped with electronic power on / off buttons to power the system on and off. These on / off buttons are often prominently located on the front control panel of the chassis. When pressed, electronic circuitry on the motherboard transmits the power-on signal to the BMC (baseboard management controller) chip, the CPLD (complex programmable logic device) timing control chip, and finally the PCH (platform controller hub) chip, completing the entire boot process. During this process, the BMC chip plays a crucial role, recording detailed information such as the number of system power on / off cycles and the specific times, thereby implementing basic power management functions.
[0022] However, existing electronic power switch buttons face many difficult challenges in actual application. When the server is in a high-humidity, high-temperature or corrosive external environment for a long time, the electronic components inside the switch button are easily corroded, and problems such as corrosion and aging may occur. In severe cases, a short circuit may even occur. Once an electronic component fails, it may mistakenly trigger a system shutdown operation without any human intervention, thereby causing the server to interrupt operation. Considering that servers usually need to run uninterrupted for a long time, once they are accidentally shut down due to a false trigger, especially when they are processing those critical and data-intensive tasks, the consequences will be unimaginable. Not only may it cause immeasurable economic losses, but it will also pose a serious threat to data integrity.
[0023] While existing designs may already have some basic protection mechanisms, such as setting a single press duration or specific trigger logic, these measures are insufficient to address unexpected shutdowns caused by component failures (such as internal short circuits) and are far from sufficient to provide comprehensive and effective protection. Therefore, there is an urgent need to develop a more robust and intelligent power control mechanism to fundamentally eliminate server system outages caused by hardware failures, effectively ensuring data security and continuous and stable system operation.
[0024] An embodiment of the present invention provides a power supply control method.
[0025] like Figure 1 As shown, the power control method includes the following steps:
[0026] Step S101: Acquire the current state of the device to be controlled and a power switch trigger signal.
[0027] Step S102 , identifying the number of power button triggering times, the duration of each triggering, and the total duration of the power switch triggering signal according to the power switch triggering signal.
[0028] Among them, the state of the device to be controlled can be the power-on state or the power-off state. The power switch trigger signal is an electrical signal sequence generated by the user through a physical button or virtual contact for controlling the power supply of the device. The power switch trigger signal includes the number of times the power button is triggered, the duration of each trigger and the total duration of the power switch trigger signal.
[0029] Specifically, in an embodiment of the present invention, the baseboard management controller uses the power button input general input output pin (PWRBTN_IN_GPIO) to accurately record the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal, providing basic data for subsequent power on / off operations of the device to be controlled. The power control circuit design of the present invention is as follows: Figure 2 As shown, the baseboard management controller BMC is connected to the complex programmable logic device CPLD, and the complex programmable logic device is connected to the platform controller set PCH.
[0030] Step S103 , based on the preset power control configuration information, the device to be controlled is controlled to be turned on or off according to the current state, the number of times the power button is triggered, the duration of each triggering, and the total duration.
[0031] In some embodiments, the preset power control configuration information includes at least one set of mapping relationships between the number of power button triggering times, each triggering duration, and the total duration and the power on / off signal.
[0032] Specifically, the present invention configures the corresponding GPIO pins through firmware programming in the BMC chip. This, combined with the electronic logic circuitry on the motherboard, creates an innovative power control configuration information table. This table precisely defines system behavior under different switching states, including normal power on / off operations, short-circuit faults, and forced shutdowns, ensuring reliable power control for servers under various complex operating conditions.
[0033] The preset power control configuration information table is shown in Table 1. The preset power control configuration information includes at least one set of mapping relationships between the number of power button triggers, each trigger duration, and the total duration and the power on / off signal.
[0034] Table 1
[0035]
[0036] The preset power control configuration information table specifies the current switch state (closed, shorted), disconnected state, number of power button triggers, each trigger duration, and total duration of the device to be controlled. It also specifies the current state and power-on / off signals of the corresponding BMC internal power button input / output pins (PWRBTN_IN_GPIO) and output / output pins (PWRBTN_OUT_GPIO). If the device to be controlled is disconnected and the number of power button triggers, each trigger duration, and total duration are all 0, the device is considered inactive. The voltage of PWRBTN_IN_GPIO is 0V, and the voltage of PWRBTN_OUT_GPIO is 3.3V.
[0037] Through the above technical solution, an intelligent power control configuration information table is formed by combining the number of power button triggers, the duration of each trigger, the total duration and the power on / off signal, so as to accurately judge the current operation intention according to different button trigger modes and durations, and execute the shutdown or startup process in a targeted manner. It also effectively distinguishes between the normal power on / off operations of maintenance personnel, forced shutdown operations, misoperations and signals caused by component failures, fundamentally preventing accidental forced shutdown of the system due to power button failure, and accidental startup or shutdown due to misoperation.
[0038] Optionally, in some embodiments, based on the preset power control configuration information, it is determined whether the power switch has been misoperated according to the number of times the power button is triggered, the duration of each triggering, and the total duration, including: querying whether there is an action corresponding to the number of times the power button is triggered, the duration of each triggering, and the total duration in the preset power control configuration information; if there is no action corresponding to the number of times the power button is triggered, the duration of each triggering, and the total duration, it is determined that the power switch has been misoperated.
[0039] It should be understood that the number of power button triggers, the duration of each trigger and the total duration are matched with the number of power button triggers, the duration of each trigger and the total duration in the preset power control configuration information. If the corresponding action is not matched from the preset power control configuration information, it is determined that the power switch has been misoperated.
[0040] For example, if the power button is in the closed state, that is, the current state of the device to be controlled is the power-on state, if the power button is triggered once within the total duration (for example, 3 seconds), and the triggering duration is 1 second, it is determined that there is an erroneous operation of the power switch. At this time, the erroneously triggered electrical signal is directly discarded, and the shutdown operation is not performed; if the power button is in the disconnected state, if the power button is triggered once within the total duration (for example, 3 seconds), and the triggering duration is less than 1 second, it is determined that there is an erroneous operation of the power switch. At this time, the erroneously triggered electrical signal is directly discarded, and the power-on operation is not performed.
[0041] Through the above technical solution, by identifying unexpected power triggering behaviors, file system damage caused by accidental shutdown or power waste caused by server system startup due to malfunction can be avoided, which can significantly improve the security, stability and user experience of the device.
[0042] Optionally, in some embodiments, after determining that the power switch has malfunctioned, the method further includes: discarding the power switch trigger signal.
[0043] Specifically, after determining that the power switch has been misoperated, the mistriggered electrical signal is directly discarded to prevent the mistriggered electrical signal from entering the main control logic, thereby eliminating the risk of misstartup / misshutdown from the source.
[0044] Through the above technical solution, discarding the falsely triggered power switch trigger signal can block the execution of erroneous instructions from the signal source, thereby avoiding risks such as abnormal start and stop of equipment, data loss, and hardware damage.
[0045] Optionally, in some embodiments, based on preset power control configuration information, the device to be controlled is powered on or off according to the current state, the number of times the power button is triggered, the duration of each trigger and the total duration, including: based on the preset power control configuration information, judging whether there is any misoperation of the power switch according to the number of times the power button is triggered, the duration of each trigger and the total duration; if there is no misoperation of the power switch, determining the target action based on the current state according to the number of times the power button is triggered, the duration of each trigger and the total duration, and controlling the device to be controlled to be powered on or off according to the target action.
[0046] It can be understood that when there is no misoperation of the power switch, based on the current state, the target action is determined according to the number of times the power button is triggered, the duration of each trigger and the total duration, and the device to be controlled is turned on or off according to the target action.
[0047] For example, if the current state of the device to be controlled is the power-on state, that is, the power switch button is in the closed state, if it is detected that the power button is triggered twice within a total duration of 3 seconds, the target action is determined to be a normal shutdown action, and the device to be controlled is shut down.
[0048] If the current state of the device to be controlled is the shutdown state, that is, the power switch button is in the disconnected state, and it is detected that the power button is triggered once within a total duration of 3 seconds, and the triggering duration is 3 seconds, then the target action is determined to be a power-on action. At this time, the device to be controlled is controlled to power on.
[0049] The above technical solution accurately combines and determines the timing, frequency, and duration of the power button signal, enabling the system to reliably distinguish between three different scenarios: normal maintenance operations, accidental single false triggers, and component fault short circuits. Specifically, for component fault short circuits, the design intelligently ignores persistent short circuit signals unless they match a specific pattern of high-frequency short presses followed by long presses. This fundamentally eliminates the risk of accidental server shutdowns due to power button hardware failures, significantly improving system operational continuity and data security.
[0050] Optionally, in some embodiments, based on the current state, the target action is determined according to the number of times the power button is triggered, the duration of each trigger and the total duration, and the device to be controlled is controlled to be turned on or off according to the target action, including: judging whether the number of times the power button is triggered is single; if the number of times the power button is triggered is single, judging whether the total duration is less than the fifth preset duration; if the total duration is less than the fifth preset duration, if the current state is the shutdown state, controlling the device to be controlled to be turned on.
[0051] The fifth preset time length may be a threshold value pre-set by the user, a threshold value obtained through a limited number of experiments, or a threshold value obtained through a limited number of computer simulations. In an embodiment of the present invention, the fifth preset time length is 3 seconds.
[0052] Specifically, if a single power button trigger is detected and the total duration of the single power button is less than the fifth preset duration, if the current state of the device to be controlled is the off state, the device to be controlled is controlled to power on.
[0053] For example, Figure 3 As shown, when the current state of the device to be controlled is the shutdown state, if it is detected that the power button is pressed once and the power button is released after 3 seconds, the device to be controlled is turned on.
[0054] Through the above technical solution, the fifth preset time is defined as the total operation time threshold. The user needs to complete a single continuous press operation within the total duration to eliminate accidental power-on caused by long-term pressing or slow operation, and avoid false triggering of power-on to consume power.
[0055] Optionally, in some embodiments, a safety switch is provided between the power signal input terminal and the power signal control terminal of the baseboard management controller of the device to be controlled. After controlling the device to be controlled to start up, it also includes: controlling the safety switch to switch from a closed state to an open state.
[0056] It is understandable that a safety switch is provided between the power signal input terminal PWRBTN_IN_GPIO and the power signal control terminal PWRBTN_OUT_GPIO. Specifically, Figure 2 As shown in FIG, after the server successfully completes the normal startup process, the safety switch between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO inside the BMC chip is automatically switched from the default closed state to the open state.
[0057] When the server system is powered on for the first time and the power button is pressed, the 3.2K and 10K resistors form a voltage divider of 2.5V to turn on the N-channel metal oxide semiconductor field effect transistor. Figure 2 As shown in the figure, the voltage of the power button digital-to-analog conversion pin PWRBTN_ADC_GPIO of the BMC chip changes from 0V to 2.5V, and the voltage of the power button input general input and output pin PWRBTN_IN_GPIO changes from 3.3V to 0V. After the BMC firmware recognizes this falling edge signal, it uses internal logic (such as Figure 3 The CPLD transmits this signal to the PCH chip (PWRBTN_OUT_GPIO), causing the power button's general-purpose input / output pin (PWRBTN_OUT_GPIO) to output a 0V signal to the CPLD's baseboard management controller's power button output pin (BMC_PWRBTN_OUT_N). After receiving this signal, the CPLD transmits it to the PCH chip's PWRBTN pin via its platform controller's power button pin (PCH_PWRBTN_N). The PCH then controls the controlled device to complete the power-on process.
[0058] After the system successfully boots up, the CPLD sends a system power-ready signal, PWRGD_SYS_PWROK, to the BMC chip and PCH. Upon receiving this signal, the BMC chip not only records the system boot time and system status (the BMC firmware can use this signal to determine whether the server system is powered on or off), but more importantly, the BMC firmware automatically modifies the logical connection between its internal power button input general-purpose input / output pin, PWRBTN_IN_GPIO, and its internal power button output general-purpose input / output pin, PWRBTN_OUT_GPIO, from the default on state to the off state. This state change is one of the core innovations of this invention. Once the system is operating normally, it immediately cuts off the power button's "pass-through" shutdown path, effectively preventing accidental system shutdowns due to accidental touches or short-term failures of the button component (such as intermittent short circuits).
[0059] Through the above technical solution, a safety switch is provided between the power signal input terminal and the power signal control terminal of the baseboard management controller of the device to be controlled, so that during normal operation of the device to be controlled, the "direct-through" shutdown path of the power button is fundamentally cut off, effectively filtering and preventing accidental system shutdowns caused by accidental single false touches of the power button or occasional (such as short-term, intermittent) component failures (such as poor internal contact jitter, temporary short circuit), significantly improving the reliability and anti-interference ability of the server in daily operation.
[0060] Optionally, in some embodiments, based on the current state, the target action is determined according to the number of times the power button is triggered, the duration of each trigger and the total duration, and the device to be controlled is controlled to be turned on or off according to the target action, including: judging whether the number of times the power button is triggered is a first preset number, and whether the duration of each trigger is less than the first preset duration, and whether the total duration is less than a second preset duration; when the number of times the power button is triggered is a first preset number, and the duration of each trigger is less than the first preset duration, and the total duration is less than the second preset duration, based on the preset normal shutdown strategy, the device to be controlled is controlled to shut down.
[0061] Among them, the first preset number of times, the first preset duration and the second preset duration can be thresholds set in advance by the user, can be thresholds obtained through a limited number of experiments, or can be thresholds obtained through a limited number of computer simulations. In an embodiment of the present invention, the first preset number of times is 2 times, the first preset duration is 2 seconds, and the second preset duration is 3 seconds.
[0062] It can be understood that if the power button is triggered twice, and the triggering duration of each time is less than 2 seconds, and the total duration is less than 3 seconds, it means that there is no misoperation of the power switch at this time, and the device to be controlled can be shut down based on the preset normal shutdown strategy. Among them, the preset normal shutdown strategy is that the logical connection between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO inside the BMC is temporarily restored to the on state (i.e., closed state), and then the shutdown program is executed to control the shutdown of the device to be controlled.
[0063] Specifically, when maintenance personnel need to perform a normal shutdown of a running server, they need to press the power button a second time. At this point, because the PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO pins within the BMC are open, a single press will not trigger a shutdown. Only when the BMC firmware detects two consecutive, valid power button presses within a very strict time window (e.g., within 3 seconds) will the BMC's internal logic module temporarily restore the connection between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO to a conductive state, allowing the shutdown signal to pass and executing the shutdown procedure.
[0064] Through the above technical solution, the system is shut down through a double short press verification mechanism, which significantly improves the safety of operation and effectively avoids the risk of system shutdown caused by a single unintentional touch.
[0065] Furthermore, in some embodiments, when it is determined that the power button is triggered a first preset number of times, and the triggering duration of each time is less than the first preset duration, and the total duration is less than the second preset duration, it also includes: controlling the safety switch to switch from an open state to a closed state.
[0066] Specifically, if the power button is triggered twice, and the triggering duration of each time is less than 2 seconds, and the total duration is less than 3 seconds, it means that there is no misoperation of the power switch at this time, and the controlled device can be shut down based on the preset normal shutdown strategy. At this time, the control safety switch is switched from the open state to the closed state, specifically: the logical connection state between the specific GPIO pins (PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO) used for power button control in the BMC chip is automatically switched from the open state to the closed state.
[0067] Through the above technical solution, the safety switch is closed only when the power button is triggered a first preset number of times, the triggering duration of each time is less than the first preset duration, and the total duration is less than the second preset duration. This forms a hardware-level protection mechanism. Even if a fault occurs in the software layer, the hardware switch can still block the power path, enhancing system reliability and significantly improving the reliability and anti-interference ability of the server in daily operation.
[0068] Optionally, in some embodiments, based on the current state, the target action is determined according to the number of power button triggers, the duration of each trigger and the total duration, and the device to be controlled is controlled to be turned on or off according to the target action, including: judging whether the number of power button triggers is the second preset number, and whether the duration of each trigger except the last trigger is less than the third preset duration, and whether the duration of the last trigger is greater than the fourth preset duration; when the number of power button triggers is the second preset number, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, based on the preset forced shutdown strategy, the device to be controlled to shut down.
[0069] Among them, the second preset number of times, the third preset duration and the fourth preset duration can be thresholds set in advance by the user, can be thresholds obtained through a limited number of experiments, or can be thresholds obtained through a limited number of computer simulations. In an embodiment of the present invention, the second preset number of times is 4 times, the third preset duration is 3 seconds, and the fourth preset duration is 4 seconds.
[0070] It can be understood that if it is detected that the power button is triggered 4 times, and the trigger duration of each of the first 3 times is less than 1 second, and the trigger duration of the fourth time is greater than 4 seconds, the controlled device is controlled to shut down based on the preset forced shutdown strategy, where the preset forced shutdown strategy is to activate the logical connection between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO inside the BMC and execute the shutdown procedure.
[0071] Specifically, to address the extreme case of a short circuit in the power button's internal components (i.e., if the button remains pressed for an extended period), this invention improves upon the traditional "forced shutdown" logic of a press for more than four seconds. With this new design, the system no longer simply shuts down based on the duration of a press.
[0072] Instead, the BMC firmware will require the power button trigger signal to meet a more complex sequence: such as Figure 3As shown in the figure, if three valid triggers of the power button transitioning from high to low are detected within 3 seconds (for example, pressing the power button three times in rapid succession), and then the power button is detected to be pressed for 4 seconds, only when this specific, unconventional composite sequence is fully satisfied will the logic connection between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO inside the BMC be activated and turned on, and the controlled device will be shut down.
[0073] Through the above technical solution, through the dual verification mechanism of "number of times + segment duration", it is ensured that the forced shutdown action is triggered with the user's explicit intention, avoiding accidental shutdown due to false touch (such as a single long press) or short continuous press (such as quick clicks when debugging the device), significantly improving the reliability and anti-interference ability of the server in daily operation.
[0074] Furthermore, in some embodiments, when it is determined that the power button is triggered a second preset number of times, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, it also includes: controlling the safety switch to switch from an open state to a closed state.
[0075] It can be understood that if it is detected that the power button is triggered 4 times, and the triggering duration of each of the first 3 times is less than 1 second (that is, 3 consecutive presses within 3 seconds), and the triggering duration of the fourth button is greater than 4 seconds, the controlled device is shut down based on the preset forced shutdown strategy, and the safety switch is controlled to switch from the open state to the closed state. The preset forced shutdown strategy is that the logical connection between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO inside the BMC is switched from the open state to the conductive state, and the shutdown procedure is executed.
[0076] Through the above technical solution, the safety switch is closed only when the power button is triggered a second preset number of times, the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration. This forms a hardware-level protection mechanism. Even if a fault occurs in the software layer, the hardware switch can still block the power path, enhance system reliability, and significantly improve the reliability and anti-interference ability of the server in daily operation.
[0077] Optionally, in some embodiments, after determining whether the total duration is less than the fifth preset duration, it also includes: when the total duration is greater than or equal to the fifth preset duration, determining whether the total duration is greater than the sixth preset duration; when the total duration is greater than the sixth preset duration, if the current state is the power-on state, it is determined that a short circuit fault exists in the device to be controlled.
[0078] Among them, the sixth preset time length can be a threshold value set in advance by the user, a threshold value obtained through a limited number of experiments, or a threshold value obtained through a limited number of computer simulations. In an embodiment of the present invention, the sixth preset time length is set to 10 seconds.
[0079] It can be understood that when the current state of the device to be controlled is the power-on state, that is, when the switch state of the power button is in the closed state, if a single power button trigger is detected and the total duration of the single power button trigger is greater than or equal to the fifth preset duration, it means that the user's intention is to force the device to be controlled to shut down. If the total duration is detected to be greater than the sixth preset duration at this time, it means that the device to be controlled has not been shut down after the sixth preset time. At this time, it can be determined that there is a short circuit fault in the device to be controlled.
[0080] For example, when the current state of the device to be controlled is the power-on state, if it is detected that the power button is pressed once and is pressed continuously for more than 10 seconds, but the current state of the device to be controlled is still the power-on state, it indicates that there is a short circuit fault in the device to be controlled, that is, a short circuit occurs in the power button.
[0081] Through the above technical solution, a critical threshold for short-circuit faults (such as 10 seconds) is defined to identify continuous abnormal triggers, avoid misjudging forced shutdown operations as faults, ensure the accuracy of fault judgment, and avoid false alarms.
[0082] Optionally, in some embodiments, after determining that a short circuit fault exists in the device to be controlled, the method further includes: generating short circuit fault reminder information; and sending the short circuit fault reminder information to a preset mobile terminal.
[0083] The pre-defined mobile terminals include, but are not limited to, smartphones, tablet computers, PDAs, and other terminal devices with data processing capabilities. Generally, a smart terminal is a device with an independent operating system, allowing users to install software, games, and other programs provided by third-party service providers to continuously expand the functionality of the handheld device through such programs, and capable of wireless network access via mobile communication networks.
[0084] Optionally, in some embodiments, after generating the short-circuit fault reminder information, the method further includes: performing a fault reminder according to the short-circuit fault reminder information.
[0085] Optionally, in some embodiments, performing a fault reminder according to the short-circuit fault reminder information includes: performing an acoustic fault reminder according to the short-circuit fault reminder information; and / or performing an optical fault reminder according to the short-circuit fault reminder information.
[0086] Specifically, after the baseboard management controller determines that a short circuit fault exists in the device to be controlled, it generates a reminder message that a short circuit fault exists in the device to be controlled, and sends the short circuit fault reminder message to a preset mobile terminal, such as a smart phone, tablet computer, etc., and displays the short circuit fault reminder message through the smart phone or tablet computer.
[0087] The built-in speaker of the mobile terminal is preset to realize acoustic fault reminder, and / or the screen flashes or the flashlight flashes to realize optical fault reminder.
[0088] For example, after determining that a short circuit fault exists in the device to be controlled, a medium-high frequency tone (such as 600-800Hz) is continuously sounded through the built-in speaker of the preset mobile terminal, with a slightly longer interval (such as 0.5 seconds to ring and 0.3 seconds to stop). The screen of the preset mobile terminal displays red at the highest brightness (such as 3 times per second), and it can be triggered through the sidebar or screen-off display even if the device is in lock screen state.
[0089] Through the above technical solution, after a short circuit fault is detected in the controlled device, the fault information is transmitted to the user or maintenance personnel through acoustic fault reminders and / or optical fault reminders, ensuring that the user can quickly perceive the fault in different scenarios so that maintenance personnel can perform corresponding repairs on the equipment.
[0090] Optionally, in some embodiments, after determining that a short circuit fault exists in the device to be controlled, the method further includes: maintaining the safety switch in an off state.
[0091] Specifically, after determining that a short circuit fault exists in the device to be controlled, the safety switch is maintained in an off state, that is, the state between the specific GPIO pins (PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO) used for power button control in the BMC chip is maintained in an off state, that is, the safety switch between PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO is maintained in an off state.
[0092] Through the above technical solution, after determining that a short circuit fault exists in the device to be controlled, maintaining the safety switch in the disconnected state can cut off the physical path of the fault current, thereby preventing further damage to the device.
[0093] In summary, the technical effects brought about by the embodiments of the present invention are as follows:
[0094] (1) Greatly improved the reliability and stability of system operation:
[0095] This invention introduces a safety switch mechanism by automatically switching the PWRBTN_IN_GPIO and PWRBTN_OUT_GPIO pins of the power button control circuit from the on state to the off state after the system is powered on. This fundamentally eliminates the risk of unexpected server shutdowns due to accidental power button activation (e.g., unintentional touch) or transient, sporadic faults (e.g., momentary short circuits, poor contact, or vibration).
[0096] Especially in harsh environments such as high humidity, high temperature or dust, this mechanism effectively reduces the probability of system interruption caused by component failure due to aging, corrosion or dust ingress of electronic components, greatly enhancing the operational reliability of the server system.
[0097] (2) Significantly enhanced the system's ability to resist misoperation and hardware failure:
[0098] For maintenance personnel performing normal shutdown operations, a dual verification mechanism has been introduced: "press the key twice within three seconds." This compound key sequence effectively filters out single, unintentional presses, making operations safer and more accurate, and avoiding critical system downtime caused by inadvertent operation.
[0099] The logic for handling power button component short circuits has been upgraded from a single "press duration" check to a multi-compound trigger sequence of "three short presses within three seconds, followed by a four-second long press." This enables the system to intelligently distinguish between the maintenance personnel's specific operational intent and the component's inherent abnormal state, completely eliminating the possibility of forced shutdowns due to persistent power button failures (such as internal permanent short circuits), ensuring the highest level of server data integrity and business continuity.
[0100] (3) Effectively extend the service life and maintenance cycle of servers and related components:
[0101] By placing the power button in the "off" state during system operation, the circuit load and internal component wear are reduced during non-essential moments, thereby indirectly extending the life of the power button itself.
[0102] Since data corruption and business interruption caused by unexpected shutdowns are greatly reduced, unplanned server downtime is significantly reduced, thereby reducing manual maintenance costs and improving operation and maintenance efficiency.
[0103] (4) Improved data security and avoided potential economic losses:
[0104] The present invention provides active protection measures at the hardware control level, avoiding the interruption of important data processing due to power button failure, thereby minimizing the risk of data loss or damage.
[0105] For data centers and critical business systems, this means avoiding huge business interruption losses and data recovery costs, and has significant economic benefits.
[0106] (5) No additional hardware cost or structural complexity:
[0107] This is achieved through intelligent logic programming of the BMC chip firmware and flexible configuration of existing GPIO pins, without the need to add additional dedicated hardware components or significantly modify the motherboard circuit layout. This achieves a breakthrough reliability improvement without significantly increasing material costs and design complexity.
[0108] According to the power control method proposed in an embodiment of the present invention, the current state of the device to be controlled and the power switch trigger signal are obtained; the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal are identified based on the power switch trigger signal; based on the preset power control configuration information, the device to be controlled is turned on or off according to the current state, the number of power button triggers, the duration of each trigger, and the total duration. This solves the problem of faulty triggering and shutdown of existing electronic power switch buttons due to environmental factors or component aging. By integrating multi-channel signal detection, firmware intelligent logic judgment, and a composite key sequence verification mechanism, the server power switch's anti-misoperation capability and system operation reliability are significantly improved, effectively avoiding accidental shutdowns caused by power button hardware failures, thereby ensuring the integrity of server data and business continuity.
[0109] Next, a power control device according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0110] Figure 4 FIG. 1 is a schematic diagram of a power control device according to an embodiment of the present invention.
[0111] like Figure 4 As shown, the power control device 10 includes: an acquisition module 100 , an identification module 200 and a control module 300 .
[0112] Among them, the acquisition module 100 is used to obtain the current state of the device to be controlled and the power switch trigger signal; the identification module 200 is used to identify the number of power button triggers, the duration of each trigger and the total duration of the power switch trigger signal according to the power switch trigger signal; the control module 300 is used to control the power on or off of the device to be controlled based on the preset power control configuration information according to the current state, the number of power button triggers, the duration of each trigger and the total duration.
[0113] Optionally, in some embodiments, the control module 300 is further used to: based on preset power control configuration information, determine whether there is any misoperation of the power switch according to the number of times the power button is triggered, the duration of each triggering, and the total duration; if there is no misoperation of the power switch, based on the current state, determine the target action according to the number of times the power button is triggered, the duration of each triggering, and the total duration, and control the device to be controlled to turn on or off according to the target action.
[0114] Optionally, in some embodiments, the control module 300 is further used to: query whether there is an action corresponding to the number of times the power button is triggered, the duration of each trigger, and the total duration in the preset power control configuration information; if there is no action corresponding to the number of times the power button is triggered, the duration of each trigger, and the total duration, determine that there is an erroneous operation of the power switch.
[0115] Optionally, in some embodiments, the control module 300 is also used to: determine whether the number of times the power button is triggered is a first preset number, and whether the triggering duration of each time is less than the first preset duration, and whether the total duration is less than a second preset duration; when the number of times the power button is triggered is a first preset number, and the triggering duration of each time is less than the first preset duration, and the total duration is less than the second preset duration, control the shutdown of the device to be controlled based on the preset normal shutdown strategy.
[0116] Optionally, in some embodiments, the control module 300 is also used to: determine whether the number of times the power button is triggered is the second preset number, and whether the duration of each trigger except the last trigger is less than the third preset duration, and whether the duration of the last trigger is greater than the fourth preset duration; when the number of times the power button is triggered is the second preset number, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, control the shutdown of the device to be controlled based on the preset forced shutdown strategy.
[0117] Optionally, in some embodiments, the control module 300 is also used to: determine whether the power button is triggered once; if the power button is triggered once, determine whether the total duration is less than the fifth preset duration; if the total duration is less than the fifth preset duration, if the current state is the off state, control the device to be controlled to power on.
[0118] Optionally, in some embodiments, after determining whether the total duration is less than the fifth preset duration, the control module 300 is also used to: when the total duration is greater than or equal to the fifth preset duration, determine whether the total duration is greater than the sixth preset duration; when the total duration is greater than the sixth preset duration, if the current state is the power-on state, determine that a short circuit fault exists in the device to be controlled.
[0119] Optionally, in some embodiments, after determining that a short circuit fault exists in the device to be controlled, the control module 300 is further configured to: generate short circuit fault reminder information; and send the short circuit fault reminder information to a preset mobile terminal.
[0120] Optionally, in some embodiments, after generating the short-circuit fault reminder information, the control module 300 is further configured to: perform a fault reminder according to the short-circuit fault reminder information.
[0121] Optionally, in some embodiments, the control module 300 is further configured to: perform an acoustic fault reminder according to the short-circuit fault reminder information; and / or perform an optical fault reminder according to the short-circuit fault reminder information.
[0122] Optionally, in some embodiments, a safety switch is provided between the power signal input terminal and the power signal control terminal of the baseboard management controller of the device to be controlled. After controlling the device to be controlled to start up, it also includes: controlling the safety switch to switch from a closed state to an open state.
[0123] Optionally, in some embodiments, the control module 300 is further configured to maintain the safety switch in an off state.
[0124] Optionally, in some embodiments, when it is determined that the power button is triggered a first preset number of times, and the triggering duration of each time is less than the first preset duration, and the total duration is less than the second preset duration, the control module 300 is also used to: control the safety switch to switch from an open state to a closed state.
[0125] Optionally, in some embodiments, when it is determined that the power button is triggered a second preset number of times, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, the control module 300 is also used to: control the safety switch to switch from an open state to a closed state.
[0126] Optionally, in some embodiments, after determining that the power switch has malfunctioned, the control module 300 is further configured to discard the power switch trigger signal.
[0127] Optionally, in some embodiments, the preset power control configuration information includes at least one set of mapping relationships between the number of power button triggering times, each triggering duration, and the total duration and the power on / off signal.
[0128] It should be noted that, for the description of the features in the embodiment corresponding to the power control device, reference can be made to the relevant description of the embodiment corresponding to the above-mentioned power control method, and no further details will be given here.
[0129] Next, refer to the attached Figure 5The power on / off management system proposed according to an embodiment of the present invention is described.
[0130] like Figure 5 As shown, the power on / off management system 20 includes: a first controller 400, a complex programmable logic device 500 and a second controller 600, wherein the first controller 400 is used to output a power on control signal or a power off control signal based on preset power control configuration information, according to the current state of the device to be controlled, the number of times the power button is triggered, the duration of each trigger and the total duration of the power switch trigger signal; the complex programmable logic device 500 is used to send a power on control signal or a power off control signal to the second controller; the second controller 600 is used to control the device to be controlled to start up according to the power on control signal, or to control the device to be controlled to shut down according to the shutdown control signal.
[0131] In the embodiment of the present invention, the first controller 400 is a baseboard management controller BMC, and the second controller 600 is a platform controller hub PCH.
[0132] It should be understood that the baseboard management controller determines the target action based on the current state of the device to be controlled, the number of times the power button is triggered, the duration of each trigger and the total duration of the power switch trigger signal, and determines whether the power button of the device to be controlled has a short circuit fault based on the current state of the device to be controlled, the number of times the power button is triggered, the duration of each trigger and the total duration of the power switch trigger signal.
[0133] The target action may be a false action, a normal shutdown action, a startup action, or a forced shutdown action.
[0134] Furthermore, the baseboard management controller outputs a power-on control signal or a power-off control signal to the complex programmable logic device timing control chip according to the target action, and finally the platform controller chip controls the power-on of the device to be controlled according to the power-on control signal, or controls the power-off of the device to be controlled according to the power-off control signal.
[0135] Optionally, in some embodiments, the complex programmable logic device 500 includes: a processing unit for performing signal processing on a power-on control signal to obtain a processed power-on signal, or performing signal processing on a power-off control signal to obtain a processed power-off signal; and a sending unit for sending the processed power-on signal or the processed power-off signal to the second controller 600.
[0136] For example, the processing unit of the complex programmable logic device 500 receives the power-on control signal and the power-off control signal from the baseboard management controller, processes the power-on control signal and the power-off control signal, including eliminating the glitches and jitters of the power-on control signal and the power-off control signal, ensuring that the signal edges are steep, and obtaining a processed power-on signal or a processed power-off signal.
[0137] Finally, the processed power-on signal or the processed power-off signal is sent to the platform controller set PCH, and the platform controller set PCH controls the device to be controlled to power on or off according to the processed power-on signal or the processed power-off signal.
[0138] According to the power on / off management system proposed in an embodiment of the present invention, a first controller outputs a power on control signal or a power off control signal based on preset power control configuration information according to the current state of the device to be controlled, the number of times the power button is triggered, the duration of each trigger, and the total duration of the power switch trigger signal. The complex programmable logic device sends the power on control signal or the power off control signal to the second controller, and the second controller controls the device to be controlled to turn on according to the power on control signal, or controls the device to be controlled to turn off according to the power off control signal. In this way, the problem of the existing electronic power switch button causing a faulty malfunction and causing shutdown due to environmental factors or component aging is solved. By integrating multi-channel signal detection, firmware intelligent logic judgment, and a composite key sequence verification mechanism, the server power switch's anti-misoperation capability and the reliability of the system operation are significantly improved, effectively avoiding accidental shutdowns caused by power button hardware failures, thereby ensuring the integrity of server data and business continuity.
[0139] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present invention. Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present invention. The server may include:
[0140] Processor 60, storage device 61 and communication device 62; the number of processors 60 in the server can be one or more, Figure 6 In the example, a processor 60 is used; the processor 60, the storage device 61 and the communication device 62 in the server can be connected by a bus or other means. Figure 6 Taking the bus connection as an example, the storage device 61 is used to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors execute the steps in any of the above power control method embodiments.
[0141] An embodiment of the present invention further provides a non-volatile computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above power control method embodiments when running.
[0142] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0143] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0144] The above is a detailed introduction to a power control method, device, power on / off management system, server, and medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A power supply control method, characterized in that: The following steps are involved: Get the current status of the device to be controlled and the power switch trigger signal; Identify the number of power button triggering times, the duration of each triggering, and the total duration of the power switch triggering signal according to the power switch triggering signal; Based on the preset power control configuration information, controlling the device to be controlled to turn on or off according to the current state, the number of times the power button is triggered, the duration of each triggering, and the total duration; Based on the current state, determining a target action according to the number of times the power button is triggered, the duration of each triggering, and the total duration, and controlling the device to be controlled to turn on or off according to the target action, including: judging whether the number of times the power button is triggered is a first preset number, whether the duration of each triggering is less than the first preset duration, and whether the total duration is less than a second preset duration; if the number of times the power button is triggered is the first preset number, the duration of each triggering is less than the first preset duration, and the total duration is less than the second preset duration, controlling the device to be controlled to shut down based on a preset common shutdown strategy; Based on the current state, determining a target action according to the number of power button triggers, the trigger duration of each trigger, and the total duration, and controlling the device to be controlled to turn on or off according to the target action, further comprising: judging whether the number of power button triggers is a second preset number, and whether the duration of each trigger except the last trigger is less than a third preset duration, and whether the duration of the last trigger is greater than a fourth preset duration; if the number of power button triggers is the second preset number, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, controlling the device to be controlled to shut down based on a preset forced shutdown strategy; Based on the current state, the target action is determined according to the number of times the power button is triggered, the duration of each triggering and the total duration, and the device to be controlled is controlled to be turned on or off according to the target action. It also includes: judging whether the number of times the power button is triggered is single; when the number of times the power button is triggered is single, judging whether the total duration is less than the fifth preset duration; when the total duration is less than the fifth preset duration, if the current state is the shutdown state, controlling the device to be controlled to be turned on.
2. The power control method according to claim 1, wherein: The controlling the device to be controlled to turn on or off based on the preset power control configuration information and according to the current state, the number of times the power button is triggered, the duration of each triggering, and the total duration includes: Based on the preset power control configuration information, determining whether there is an erroneous operation of the power switch according to the number of times the power button is triggered, the duration of each triggering, and the total duration; In the absence of any misoperation of the power switch, based on the current state, the target action is determined according to the number of times the power button is triggered, the duration of each trigger and the total duration, and the device to be controlled is controlled to be turned on or off according to the target action.
3. The power control method according to claim 2, wherein: The determining whether there is a misoperation of the power switch based on the preset power control configuration information and according to the number of times the power button is triggered, the duration of each triggering, and the total duration includes: Querying the preset power control configuration information for an action corresponding to the number of power button triggering times, the duration of each triggering time, and the total duration; In the absence of an action corresponding to the number of power button triggering times, the triggering duration of each time, and the total duration, it is determined that the power switch has been erroneously operated.
4. The power control method according to claim 1, wherein: After determining whether the total duration is less than a fifth preset duration, the method further includes: If the total duration is greater than or equal to the fifth preset duration, determining whether the total duration is greater than a sixth preset duration; In a case where the total duration is greater than the sixth preset duration, if the current state is a power-on state, it is determined that a short circuit fault exists in the device to be controlled.
5. The power control method according to claim 4, wherein: After determining that the device to be controlled has a short circuit fault, the method further includes: Generate short circuit fault reminder information; Send the short circuit fault reminder information to a preset mobile terminal.
6. The power control method according to claim 5, wherein: After generating the short circuit fault reminder information, the method further includes: A fault reminder is performed according to the short-circuit fault reminder information.
7. The power control method according to claim 6, wherein: The performing a fault reminder according to the short-circuit fault reminder information includes: Performing an acoustic fault reminder according to the short circuit fault reminder information; And / or, performing an optical fault reminder according to the short circuit fault reminder information.
8. The power control method according to claim 1, wherein: A safety switch is provided between the power signal input terminal and the power signal control terminal of the baseboard management controller of the device to be controlled. After controlling the device to be controlled to start up, the method further includes: Control the safety switch to switch from a closed state to an open state.
9. The power control method according to claim 8, wherein: After determining that the device to be controlled has a short circuit fault, the method further includes: Maintaining the safety switch in the off state.
10. The power control method according to claim 8, wherein: When it is determined that the power button is triggered a number of times equal to the first preset number of times, and the duration of each triggering is less than the first preset duration, and the total duration is less than the second preset duration, the method further includes: The safety switch is controlled to switch from the open state to the closed state.
11. The power control method according to claim 8, wherein: When it is determined that the power button is triggered a second number of times, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, the method further includes: The safety switch is controlled to switch from the open state to the closed state.
12. The power control method according to claim 2, wherein: After determining that the power switch has been misoperated, the method further includes: The power switch trigger signal is discarded.
13. The power control method according to claim 1, wherein: The preset power control configuration information includes at least one set of mapping relationships between the number of power button triggering times, each triggering duration, and the total duration and the power on / off signal.
14. A power supply control device, characterized in that: include: The acquisition module is used to obtain the current status of the device to be controlled and the power switch trigger signal; an identification module, configured to identify the number of power button triggering times, the duration of each triggering, and the total duration of the power switch triggering signal according to the power switch triggering signal; A control module, configured to control the device to be controlled to turn on or off based on the preset power control configuration information and according to the current state, the number of times the power button is triggered, the duration of each triggering, and the total duration; The control module is further configured to: determine whether the number of times the power button is triggered is a first preset number of times, whether the duration of each triggering is less than the first preset duration, and whether the total duration is less than a second preset duration; if the number of times the power button is triggered is the first preset number of times, the duration of each triggering is less than the first preset duration, and the total duration is less than the second preset duration, control the device to be controlled to shut down based on a preset common shutdown strategy; The control module is further configured to: determine whether the number of times the power button is triggered is a second preset number of times, and whether the duration of each trigger except the last trigger is less than the third preset duration, and whether the duration of the last trigger is greater than the fourth preset duration; if the number of times the power button is triggered is the second preset number of times, and the duration of each trigger except the last trigger is less than the third preset duration, and the duration of the last trigger is greater than the fourth preset duration, control the device to be controlled to shut down based on the preset forced shutdown strategy; The control module is also used to: determine whether the power button is triggered once; if the power button is triggered once, determine whether the total duration is less than the fifth preset duration; if the total duration is less than the fifth preset duration, if the current state is the shutdown state, control the device to be controlled to power on.
15. A power on / off management system, characterized in that: include: a first controller, a complex programmable logic device, and a second controller, wherein: The first controller is configured to output a power-on control signal or a power-off control signal based on preset power control configuration information and according to the current state of the device to be controlled, the number of power button triggers, the duration of each trigger, and the total duration of the power switch trigger signal; The complex programmable logic device is used to send the power-on control signal or the power-off control signal to the second controller; The second controller is configured to control the device to be controlled to power on according to the power-on control signal, or to control the device to be controlled to power off according to the power-off control signal.
16. The power on / off management system according to claim 15, characterized in that: The complex programmable logic device comprises: a processing unit, configured to perform signal processing on the power-on control signal to obtain a processed power-on signal, or to perform signal processing on the power-off control signal to obtain a processed power-off signal; A sending unit is used to send the processed power-on signal or the processed power-off signal to the second controller.
17. A server, characterized in that: include: one or more processors; A storage device, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the power control method according to any one of claims 1 to 13.
18. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the power control method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Server and key control method thereof
CN115657929A
Power supply control method and device of server, equipment and medium
CN119336142A