Power supply control method and device, storage medium and electronic equipment
By judging the power supply fault based on the power supply status signal during the server startup process and powering off in a timely manner, the difficulty of power supply fault diagnosis in the existing technology is solved, and the accuracy of fault detection and equipment safety are improved.
Patent Information
- Application Number
- CN202411215668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-31
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art is difficult to accurately locate power failures during server startup, resulting in difficulty in troubleshooting and power failure affecting the normal startup of the equipment.
When receiving the power-on command, multiple power supplies are controlled according to the preset timing and judged whether the power supply is faulty based on the power supply status signal. If it fails, the power supply will be stopped, so as to accurately locate the power failure and power off in time.
Improve the accuracy and efficiency of power failure detection, ensure the safety and stability of the equipment, and avoid power-on failure caused by power failure.
Smart Images

Figure CN119088192A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a power control method, device, computer-readable storage medium, and electronic device. Background Art
[0002] With the development of high-end server performance, server design, testing, and debugging are becoming more and more complex. Servers have high requirements for power-on timing. Failure of the power sequence will affect the normal startup of the server. Sometimes the server cannot be started due to a problem with one power supply. In addition, since power failures often occur during the server startup process, the server's baseboard management controller (BMC) does not have a serial port log output, so it is difficult to diagnose power failure problems.
[0003] In the related art, in order to detect power supply failure, a special power supply detection chip is usually designed to obtain the voltage and current of each power supply in real time to achieve fault detection.
[0004] However, the server power-on process is fast and there are many power supply signals. The related technical methods can only detect which power supplies are faulty, but cannot accurately locate the faulty power supply. Summary of the invention
[0005] The embodiments of the present application provide a power supply control method, device, computer-readable storage medium, and electronic device, which can accurately locate a faulty power supply and, when a power supply fault is detected, promptly control the power supply to be powered off.
[0006] According to an embodiment of the present application, a power supply control method is provided, the method comprising: in case of receiving a power-on instruction, controlling a first power supply among multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after power supply, wherein the first power supply is any power supply among the multiple power supplies; in case of determining according to the power supply status signal that the first power supply has not failed, controlling a second power supply among the multiple power supplies to supply power, wherein the second power supply is the next power supply of the first power supply indicated by the first preset timing; in case of determining according to the power supply status signal that the first power supply has failed, controlling the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing.
[0007] In an exemplary embodiment, when a power-on instruction is received, a first power supply among multiple power supplies is controlled to supply power according to a first preset timing, and a power supply status signal of the first power supply after power supply is obtained, including: when a power-on instruction is received, a first control signal is issued to control the first power supply to supply power; when it is detected that the first control signal is issued, timing is started; when the timing duration reaches a preset duration, a power supply status signal of the first power supply after power supply is obtained.
[0008] In an exemplary embodiment, when it is determined according to the power supply status signal that the first power supply has not failed, controlling the second power supply among the multiple power supplies to supply power includes: determining whether the first power supply is supplying power according to the power supply status signal; when the power supply status signal indicates that the first power supply is supplying power, determining that the first power supply has not failed; when it is determined that the first power supply has not failed, determining the second power supply according to the indication of the first preset timing; controlling the second power supply to supply power; when it is determined according to the power supply status signal that the first power supply has failed, sequentially controlling the power supplies that have started supplying power to stop supplying power according to the second preset timing. The invention relates to a method for controlling a power supply of a power supply of a computer system, comprising: determining that a fault occurs in the first power supply when the power supply status signal indicates that the first power supply is not supplying power; determining a third power supply when the first power supply is determined to be faulty, wherein the third power supply is the previous power supply of the first power supply indicated by the first preset timing, and wherein the first preset timing and the second preset timing are opposite timings to each other; controlling the third power supply to stop supplying power; after controlling the third power supply to stop supplying power, determining a fourth power supply and controlling the fourth power supply to stop supplying power according to the second preset timing until all power supplies stop supplying power, wherein the fourth power supply is the previous power supply of the third power supply indicated by the first preset timing.
[0009] In an exemplary embodiment, controlling the third power supply to stop supplying power includes: sending a second control signal to the third power supply to control the third power supply to stop supplying power; after controlling the third power supply to stop supplying power, determining the fourth power supply and controlling the fourth power supply to stop supplying power according to the second preset timing, includes: starting timing when detecting that the second control signal is sent; when the timing reaches a set duration, determining the fourth power supply according to the second preset timing, and sending the second control signal to the fourth power supply to control the fourth power supply to stop supplying power.
[0010] In an exemplary embodiment, the power supply control method further includes: when it is determined that the multiple power supplies are all supplying power, determining that power-on of a target device of the multiple power supplies is complete; when it is determined that power-on of the target device is complete, acquiring power supply status signals of the multiple power supplies in real time; when it is determined that any power supply fails based on the power supply status signals of the multiple power supplies, controlling the power supplies that have started supplying power to stop supplying power in sequence according to the second preset timing.
[0011] In an exemplary embodiment, the power supply control method also includes: in the process of controlling multiple power supplies to supply power in sequence according to a first preset timing, if it is determined according to the power supply status signal that the first power supply fails, recording first fault information, wherein the first fault information is used to indicate the power supply that fails during the power-on process of the target device; after determining that the target device of the multiple power supplies has been powered on, if it is determined according to the power supply status signal that any power supply fails, recording second fault information, wherein the second fault information is used to indicate the power supply that fails after the target device has been powered on; and generating a power supply fault report based on the first fault information and the second fault information.
[0012] In an exemplary embodiment, the power supply control method further includes: continuously acquiring a plurality of power supply status signals; and when the plurality of continuously acquired power supply status signals are the same, determining whether the first power supply fails according to the power supply status signals.
[0013] According to another embodiment of the present application, a power supply control device is further provided, the device comprising:
[0014] A first power supply control module, configured to control a first power supply among the multiple power supplies to supply power according to a first preset timing when a power-on instruction is received, and obtain a power supply status signal of the first power supply after supplying power, wherein the first power supply is any power supply among the multiple power supplies;
[0015] A second power supply control module, configured to control a second power supply among the multiple power supplies to supply power when it is determined according to the power supply status signal that the first power supply has not failed, wherein the second power supply is a next power supply of the first power supply indicated by the first preset timing;
[0016] The power supply stopping module is used to control the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing when it is determined according to the power supply status signal that the first power supply fails.
[0017] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0018] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0019] According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0020] According to the power control method of the present application, first, when a power-on instruction is received, the first power supply among multiple power supplies is controlled to supply power according to the first preset timing, and the power supply status signal of the first power supply after power supply is obtained, so that after the first power supply is controlled to be powered on, the power supply status of the first power supply is detected, so as to obtain the power supply status of the first power supply in a timely manner. In the case where it is determined that the first power supply has not failed according to the power supply status signal, the second power supply among multiple power supplies is controlled to supply power, so as to first determine whether the first power supply has failed. Only when the first power supply has not failed, the second power supply will be controlled to supply power, so as to accurately locate the power supply with a fault. In the case where it is determined that the first power supply has failed according to the power supply status signal, the power supply that has started to supply power is controlled to stop supplying power in sequence according to the second preset timing, so that in the case of a power failure, in order to ensure the safety of the equipment, the power supply that has started to supply power is controlled to power off in sequence. In summary, the method of the present application can accurately locate the power supply with a fault, and when a power failure is found, the power supply is controlled to power off in a timely manner, thereby improving the efficiency and safety of fault detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 It is a hardware structure block diagram of a server device according to a power supply control method of an embodiment of the present application;
[0023] Figure 2 is a flow chart of a power supply control method according to an embodiment of the present application;
[0024] Figure 3is a flow chart of a method for acquiring a power supply status signal according to an embodiment of the present application;
[0025] Figure 4 is a second flow chart of a method for controlling a power supply according to an embodiment of the present application;
[0026] Figure 5 is a flow chart of a method for controlling a power supply to stop supplying power according to an embodiment of the present application;
[0027] Figure 6 is a third flow chart of a power supply control method according to an embodiment of the present application;
[0028] Figure 7 is a flow chart of a method for determining whether a power supply is faulty according to an embodiment of the present application;
[0029] Figure 8 is a flow chart of a method for generating a power failure report according to an embodiment of the present application;
[0030] Fig. 9 is a structural block diagram of a hardware device of a power supply control method according to an embodiment of the present application;
[0031] Fig.10 This is a second structural block diagram of a hardware device of a power supply control method according to an embodiment of the present application;
[0032] Fig.11 This is a third structural block diagram of a hardware device of a power supply control method according to an embodiment of the present application;
[0033] Fig.12 This is a fourth structural block diagram of a hardware device of a power supply control method according to an embodiment of the present application;
[0034] Fig.13 is a structural block diagram of a power supply control device according to an embodiment of the present application;
[0035] Fig.14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0038] The power control method embodiment provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a power supply control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0039] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the power control method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] As described in the background technology, the power supply detection method in the related art cannot quickly and accurately locate the faulty power supply. The inventors have found that this is because with the rapid development of data center business, the demand for data center switches is also increasing rapidly, the switch switching capacity, the number of panel ports and the port rate are also increasing, and the power consumption of equipment is also increasing significantly, requiring more voltage regulation (Voltage Regulated, VR) chips to provide power supplies of various voltages. Usually, the voltage and current detection is completed by a dedicated VR detection chip, and the power plane management is completed by the baseboard management controller (Baseboard Management Controller, BMC). However, the power plane detection management can only view the current VR voltage and current in real time, and cannot respond to the abnormality of a certain power supply in time.
[0042] In view of the above problems, a power supply control method is provided in this embodiment. Figure 2 As shown, the method includes the following steps S200-220:
[0043] Step S200, when a power-on instruction is received, controlling a first power supply among the multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power.
[0044] The first power source is any one of multiple power sources.
[0045] The power-on instruction may be an instruction transmitted by a baseboard management controller (Baseboard Management Controller, BMC), or an instruction input by an external user, as long as it can trigger the power-on process.
[0046] The first preset timing may be a power-on timing of a target object (eg, a server), and its internal components (eg, a switch, a network card) need to be powered on in a certain timing to ensure normal operation.
[0047] Taking Intel platform as an example, the time between VCCFA_EHV_FIVRA and VCCINFAON should not be too close, the time should be more than 2uS, and the time between VCCINFAON and VNN should be between 2uS and 2mS. If the timing is incorrect, it will cause failure to boot or abnormal booting.
[0048] The power supply status signal may be obtained from an external power supply detection module, which can detect the power-on status of multiple power supplies and feed back the power supply status signal.
[0049] Step S210: When it is determined according to the power supply status signal that the first power supply has not failed, control a second power supply among the multiple power supplies to supply power.
[0050] The second power source is the next power source of the first power source indicated by the first preset timing.
[0051] Step S220: When it is determined according to the power supply status signal that the first power supply fails, the power supplies that have started supplying power are sequentially controlled to stop supplying power according to a second preset timing.
[0052] The second preset timing sequence may be a timing sequence opposite to the first preset timing sequence, that is, the power supplies are controlled to be powered off in the order in which the power supplies are powered on. When it is determined that the first power supply fails, the failure of the first power supply may be recorded so as to locate the fault location, and an alarm may be issued so as to promptly remind the user.
[0053] In this embodiment, first, when a power-on instruction is received, the first power supply among multiple power supplies is controlled to supply power according to the first preset timing, and the power supply status signal of the first power supply after power supply is obtained, so that after the first power supply is controlled to be powered on, the power supply status of the first power supply is detected, so as to obtain the power supply status of the first power supply in a timely manner. In the case where it is determined that the first power supply has not failed according to the power supply status signal, the second power supply among multiple power supplies is controlled to supply power, so as to first determine whether the first power supply has failed. Only when the first power supply has not failed, the second power supply will be controlled to supply power, so as to accurately locate the power supply with a fault. In the case where it is determined that the first power supply has failed according to the power supply status signal, the power supplies that have started to supply power are controlled to stop supplying power in sequence according to the second preset timing, so that in the case of a power failure, in order to ensure the safety of the equipment, the power supplies that have started to supply power are controlled to power off in sequence. In summary, the method of the present application can accurately locate the power supply with a fault, and when a power failure is found, the power supply can be controlled to power off in a timely manner, thereby improving the efficiency and safety of fault detection.
[0054] In one embodiment, Figure 3 As shown, in step S200, upon receiving a power-on instruction, controlling a first power supply among multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power. It includes: steps S300-320. Among them,
[0055] Step S300, when a power-on instruction is received, a first control signal is issued to control the first power supply to supply power.
[0056] When a power-on instruction is received, it means that multiple power supplies need to be controlled to power on in sequence, so a first control signal is sent out, and the first control signal is used to control the first power supply to supply power.
[0057] Step S310, when it is detected that the first control signal is sent, start timing.
[0058] The first control signal may be detected, and timing is started only when the first control signal is detected, thereby ensuring the accuracy of timing.
[0059] Exemplarily, the first control signal can be received by a shift register to detect the first control signal. For example, if the first control signal is a high-level signal, the first control signal can be received by a 2-bit shift register, and then a rising edge can be detected in the 2-bit shift register. If a rising edge occurs, it means that a high-level first control signal is received. Start timing.
[0060] Step S320: When the timing duration reaches a preset duration, a power supply status signal of the first power supply after power supply is supplied is obtained.
[0061] The preset time length of the timing may be 200ms. Since the response of the first power source requires time, obtaining the power supply status signal of the first power source after the preset time length can ensure that the first power source has responded to the indication of the first control signal.
[0062] In this embodiment, after the first control signal is issued, a preset time interval is used to obtain the power supply status signal of the first power supply after power supply, thereby leaving a certain response time for the first power supply, ensuring that the obtained power supply status signal is accurate and can accurately represent the power supply status of the first power supply.
[0063] In one embodiment, Figure 4 As shown, step S210, when it is determined according to the power supply status signal that the first power supply has not failed, the second power supply among the multiple power supplies is controlled to supply power. It includes: steps S400-410. Among them:
[0064] Step S400: determining whether the first power source is supplying power according to the power supply status signal.
[0065] Among them, the power supply status signal is used to indicate whether the first power supply is supplying power. For example, if the power supply status signal is at a high level, it means that the first power supply is supplying power. If the power supply status signal is at a low level, it means that the first power supply is not supplying power. Therefore, whether the first power supply is supplying power can be determined by the power supply status signal.
[0066] Step S401: when the power supply status signal indicates that the first power supply is supplying power, determine that the first power supply has not failed.
[0067] Step S402: when it is determined that the first power source has not failed, determine the second power source according to the indication of the first preset timing.
[0068] Step S403, controlling the second power supply to supply power.
[0069] Wherein, after controlling the second power supply to supply power.
[0070] Step S404: Use the second power source as a new first power source, and then return to step S400 until all power sources start to supply power.
[0071] Please continue to see Figure 4 Step S220, when it is determined according to the power supply status signal that the first power supply fails, the power supplies that have started to supply power are sequentially controlled to stop supplying power according to a second preset timing, including:
[0072] Step S405: when the power supply status signal indicates that the first power supply is not supplying power, determine that the first power supply fails.
[0073] Among them, the power supply status signal indicates that the first power supply is not supplying power, which means that the first power supply has received the first control signal and the first power supply should supply power, but the first power supply does not supply power, so the first power supply is faulty.
[0074] Step S406: When it is determined that the first power supply fails, determine a third power supply.
[0075] The third power source is a power supply previous to the first power source indicated by the first preset timing, and the first preset timing and the second preset timing are opposite timings to each other.
[0076] Step S407, controlling the third power source to stop supplying power.
[0077] Step S408, determining a fourth power source according to the second preset timing.
[0078] The fourth power source is the previous power source of the third power source indicated by the first preset timing, that is, the next power source of the third power source indicated by the second preset timing.
[0079] Step S409: use the fourth power source as a new third power source.
[0080] Step S410, determine whether all power sources have stopped supplying power. If all power sources have stopped supplying power, then the process ends. If there is a power source that is still supplying power, then the process returns to step S407.
[0081] In this embodiment, the power supply status signal is first used to determine whether the first power supply is supplying power, so that it can be determined whether the first power supply is faulty based on whether the first power supply is supplying power. If the first power supply is not faulty, the next power supply is controlled to supply power according to the first preset timing, thereby realizing the sequential power-on of multiple power supplies. If the first power supply fails, the power supplies that have started supplying power are controlled to stop supplying power in sequence, so that the faulty power supply can be accurately located, and when a power supply failure is found, the power supply is promptly controlled to be powered off, thereby improving the efficiency and safety of fault detection.
[0082] In one embodiment, Figure 5 As shown, step S407, controlling the third power supply to stop supplying power. The process includes: step S500.
[0083] Step S500: sending a second control signal to the third power source to control the third power source to stop supplying power.
[0084] The second control signal is a signal used to control the first power supply to stop supplying power.
[0085] Please continue to see Figure 5 , after controlling the third power supply to stop supplying power, determining the fourth power supply and controlling the fourth power supply to stop supplying power according to the second preset timing, including: steps S510-520.
[0086] Step S510, when it is detected that the second control signal is sent, start timing.
[0087] The second control signal may be detected, and timing is started only when the second control signal is detected, thereby ensuring the accuracy of timing.
[0088] Step S520, when the timing duration reaches the set duration, the fourth power source is determined according to the second preset timing, and a second control signal is sent to the fourth power source to control the fourth power source to stop supplying power.
[0089] In this embodiment, after controlling the third power supply to stop supplying power, the timing starts, and after a set period of time, the fourth power supply is controlled to stop supplying power, thereby ensuring that the two power supplies that are powered off in sequence are powered off at an interval of a certain period of time, ensuring the power-off sequence, and improving the safety of the equipment.
[0090] In one embodiment, please continue to see Figure 4 The power control method further includes: step S411. Wherein:
[0091] Step S411 , when it is determined that the multiple power sources are all supplying power, it is determined that the target devices of the multiple power sources have completed powering on.
[0092] The target device may be a server.
[0093] like Figure 6 As shown, the power control method further includes: steps S600-610. Among them:
[0094] Step S600: When it is determined that the target device has been powered on, power supply status signals of multiple power supplies are acquired in real time.
[0095] When the target device is powered on, power supply status signals of multiple power supplies are still obtained in real time, so as to monitor the power supply status of multiple power supplies in real time.
[0096] Step S610: When it is determined according to the power supply status signals of the multiple power supplies that any power supply fails, the power supplies that have started supplying power are sequentially controlled to stop supplying power according to a second preset timing.
[0097] If any power supply fails, it means that there is a failed power supply. In order to ensure the safety of the equipment, the power supply that has started to supply power is controlled to stop supplying power. The failed power supply can also be recorded and an alarm can be issued to remind the user in time.
[0098] In this embodiment, after the device is powered on, real-time monitoring of the power supply status of multiple power supplies is still maintained, so that when a power supply failure is found, the device can be promptly controlled to be powered off, and the user can be promptly reminded. The faulty power supply can also be recorded to facilitate accurate positioning of the faulty power supply.
[0099] In one embodiment, Figure 7 As shown, the power control method further includes: steps S700-710.
[0100] Step S700: continuously acquiring a plurality of power supply status signals.
[0101] For example, when the power supply status signal is 1, it indicates that the power supply is supplying power, and when the power supply status signal is 0, it indicates that the power supply is not supplying power. Then, multiple power supply status signals are obtained continuously, for example, five are obtained continuously.
[0102] Step S710: When the multiple power supply status signals obtained continuously are the same, determine whether the first power supply fails according to the power supply status signal.
[0103] Among them, when the multiple power supply status signals obtained continuously are the same, it can be determined that the power supply status signal is correct. For example, if five power supply status signals are obtained continuously and all are 1, then the power supply status signal is determined to be 1, or if five power supply status signals are obtained continuously and all are 0, then the power supply status signal is determined to be 0. Then, it is determined whether the first power supply fails according to the power supply status signal.
[0104] Exemplarily, the judgment may be made through a 5-bit shift register, where the power supply status signal passes through the 5-bit shift register to determine whether all bits in the 5-bit shift register are 1 or all bits are 0.
[0105] In this embodiment, it is first determined whether a plurality of consecutive power supply status signals are the same, and only when the plurality of power supply status signals are the same is it determined whether the first power supply fails according to the power supply status signal. This avoids the problem of inaccurate signals due to slow signal edges or signal jitter, thereby improving the accuracy and reliability of determining whether the first power supply fails according to the power supply status signal.
[0106] In one embodiment, Figure 8 As shown, the power control method further includes: steps S800-820. Among them:
[0107] Step S800: in the process of controlling a plurality of power supplies to supply power in sequence according to a first preset timing, if it is determined according to a power supply status signal that a first power supply fails, first failure information is recorded.
[0108] The first fault information is used to indicate a power source that fails during the power-on process of the target device.
[0109] Step S810: after the target device of the multiple power supplies is powered on, if it is determined according to the power supply status signal that any power supply fails, then second fault information is recorded.
[0110] The second fault information is used to indicate a power source that fails after the target device is powered on.
[0111] Step S820: Generate a power supply fault report according to the first fault information and the second fault information.
[0112] In this embodiment, by recording the power supply failure condition that occurs during the power-on process as the first fault information, and recording the power supply failure condition that occurs after the power-on is completed as the second fault information, the fault information of the power supply in the two stages of the power-on stage and the power-on completion stage are recorded separately, so that when performing subsequent fault detection, it is convenient to determine the time period when the power supply fails, thereby facilitating finding the cause of the fault.
[0113] In one embodiment, Fig. 9 As shown, it is a hardware structure block diagram of the execution body of the power control method of the present application. The execution body of the method of the present application can be a CMOS programmable logic device 10 (CMOS Programmable Logic Device, CPLD). The CPLD includes a clock management module 11, a bus (Inter-Integrated Circuit, I2C) slave module 12, a basic register 13, a power control module 14, a voltage regulation fault register 15, a power status register 16, and a miscellaneous register 17. Among them,
[0114] The bus slave module 12 is communicatively connected to the bus master module 21 of the baseboard management controller 20 for receiving a power-on instruction.
[0115] The clock management module 11 is used for managing the clock signal and reset signal inside the CPLD.
[0116] The basic register 13 is used to store information such as the firmware version number, hardware version number, and firmware release date.
[0117] The power control module 14 is used to control power on and off and reset the power supply.
[0118] Specifically, Fig.10 As shown, the power control module 14 includes: a system reset unit 141, a timing unit 142, a voltage regulation enable register unit 143, a voltage regulation enable control unit 144, and a power state signal synchronization unit 145. Among them,
[0119] The system reset unit 141 is used to reset the process.
[0120] The timing unit 142 is used to implement the timing of the signal, for example, to implement 1ms / 2ms timing on the signal.
[0121] The voltage regulation enable register unit 143 is used to implement register address mapping of the voltage regulation enable signal.
[0122] The voltage regulation enabling control unit 144 is used to control power on and off of the power supply.
[0123] The power state signal synchronization unit 145 is used to synchronize the power supply state signal.
[0124] The voltage regulation fault register 15 is used for power fault detection, power fault register allocation and power fault reporting.
[0125] Specifically, Fig.11As shown, the voltage regulation fault register 15 includes: a power-on fault detection unit 151, a real-time fault detection unit 152, a SOC (System On Chip) power fault alarm unit 153, a FPGA (Field Programmable Gate Array) power fault alarm unit 154, and a fault register unit 155. Among them:
[0126] The power-on fault detection unit 151 is used to perform fault detection when the power source is powered on.
[0127] The real-time fault detection unit 152 is used to perform fault detection on the power supply after the power supply is powered on.
[0128] The SOC power supply fault alarm unit 153 is used to aggregate fault alarms of relevant power supplies of the SOC and assign the fault alarms to registers to facilitate fault diagnosis.
[0129] The FPGA power supply fault alarm unit 154 is used to aggregate the fault alarms of the relevant power supplies of the FPGA and distribute the fault alarms to registers to facilitate fault diagnosis.
[0130] The fault register unit 155 is used to store power fault information and map the power fault information to a corresponding fault register address.
[0131] The power status register 16 is used for synchronization of power status signals and register allocation.
[0132] Specifically, Fig.12 As shown, the power state register 16 includes a signal synchronization module 161 and a voltage state register module 162. The signal synchronization module 161 is used to de-jitter the power state signal. The voltage state register module 162 is used to allocate the register address of the power state signal.
[0133] Miscellaneous registers 17 are used to store global information such as field replaceable units (FRUs), board interrupts, and manufacturers.
[0134] Among them, the connection relationship between the above modules is only for illustration, and the specific connection relationship can be understood by referring to the figure. It is not limited as long as the power control method in this application can be implemented.
[0135] Exemplarily, the CPLD used in this application may be a Lattice Machxo3LF 4300C chip, and the design language may be Verilog.
[0136] In this embodiment, by developing the CPLD, the CPLD can realize the power control method in this application. Therefore, the hardware modification is small, the logic reusability is good, the development cost is low, the development risk is small, and there is no impact on the existing hardware design. The upper-layer software only needs to add the corresponding interrupt processing function and record the power failure log in time, which reduces the complexity of the system hardware solution design, facilitates the unified processing of subsequent software, reduces the complexity of software processing, thereby reducing the difficulty and risk of development, reducing operating costs, and improving economic benefits.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0138] In this embodiment, a power supply control device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0139] Fig.13 1 is a structural block diagram of a power supply control device according to an embodiment of the present application, the device comprising: a first power supply control module 1301, a second power supply control module 1302, and a power supply stop module 1303, wherein:
[0140] The first power supply control module 1301 is used to control the first power supply among multiple power supplies to supply power according to a first preset timing when a power-on instruction is received, and obtain a power supply status signal of the first power supply after power supply, wherein the first power supply is any power supply among the multiple power supplies.
[0141] The second power supply control module 1302 is used to control a second power supply among the multiple power supplies to supply power when it is determined according to the power supply status signal that the first power supply has not failed, wherein the second power supply is the next power supply of the first power supply indicated by the first preset timing.
[0142] The power supply stopping module 1303 is used to control the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing when it is determined according to the power supply status signal that the first power supply fails.
[0143] The above device, first, in the case of receiving a power-on instruction, controls the first power supply among multiple power supplies to supply power according to the first preset timing, and obtains the power supply status signal of the first power supply after power supply, so that after controlling the first power supply to power on, the power supply status of the first power supply is detected, so as to obtain the power supply status of the first power supply in time. In the case that it is determined that the first power supply has not failed according to the power supply status signal, the second power supply among multiple power supplies is controlled to supply power, so as to first determine whether the first power supply has failed. Only when the first power supply has not failed, the second power supply will be controlled to supply power, so as to accurately locate the power supply with a fault. In the case that it is determined that the first power supply has failed according to the power supply status signal, the power supplies that have started to supply power are controlled to stop supplying power in sequence according to the second preset timing, so that in the case of a power failure, in order to ensure the safety of the equipment, the power supplies that have started to supply power are controlled to power off in sequence. In summary, the method of the present application can accurately locate the faulty power supply, and when a power failure is found, the power supply can be controlled to power off in time, thereby improving the efficiency and safety of fault detection.
[0144] In an exemplary embodiment, the first power supply control module 1301 includes: a first power supply control unit, configured to send a first control signal to control the first power supply to supply power when a power-on instruction is received; and a first timing unit, configured to start timing when the first control signal is detected.
[0145] The first state acquisition unit is used to acquire a power supply state signal of the first power supply after power supply when the timing duration reaches a preset duration.
[0146] In an exemplary embodiment, the second power supply control module 1302 includes: a first power supply determination unit, configured to determine whether the first power supply is supplying power according to a power supply status signal; a first judgment unit, configured to determine that the first power supply is not faulty when the power supply status signal indicates that the first power supply is supplying power; and a power supply determination unit, configured to determine the second power supply according to an indication of a first preset timing when it is determined that the first power supply is not faulty.
[0147] The second power supply control unit is used to control the second power supply to supply power.
[0148] In an exemplary embodiment, the power supply stop module 1303 includes: a first fault determination unit, which is used to determine that the first power supply has failed when the power supply status signal indicates that the first power supply is not supplying power. A power supply determination unit, which is used to determine the third power supply when it is determined that the first power supply has failed, wherein the third power supply is the previous power supply of the first power supply indicated by the first preset timing, wherein the first preset timing and the second preset timing are opposite timings to each other. A third power supply control unit, which is used to control the third power supply to stop supplying power. A fourth power supply control unit, which is used to determine the fourth power supply and control the fourth power supply to stop supplying power according to the second preset timing after controlling the third power supply to supply power, until all power supplies stop supplying power, wherein the fourth power supply is the previous power supply of the third power supply indicated by the first preset timing.
[0149] In an exemplary embodiment, the third power supply control unit includes:
[0150] The fifth power supply control unit is used to send a second control signal to the third power supply to control the third power supply to stop supplying power.
[0151] The sixth power supply control unit is used to determine the fourth power supply and control the fourth power supply to stop supplying power according to the second preset timing after controlling the third power supply to stop supplying power, including:
[0152] The second timing unit is used to start timing when detecting that the second control signal is sent.
[0153] The seventh power supply control unit is used to determine the fourth power supply according to the second preset timing when the timing duration reaches the set duration, and send a second control signal to the fourth power supply to control the fourth power supply to stop supplying power.
[0154] In an exemplary embodiment, the apparatus further includes: a status acquisition module, configured to acquire power supply status signals of multiple power supplies in real time when it is determined that the target device has completed power-on. A second power supply control module, configured to control the power supplies that have started power supply to stop supplying power in sequence according to a second preset timing when it is determined that any power supply fails according to the power supply status signals of the multiple power supplies.
[0155] In an exemplary embodiment, the device further comprises: a status acquisition module for continuously acquiring multiple power supply status signals; and a judgment module for judging whether the first power supply fails according to the power supply status signals when the multiple power supply status signals continuously acquired are the same.
[0156] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0157] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0158] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0159] S1, when a power-on instruction is received, controlling a first power supply among multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power, wherein the first power supply is any power supply among the multiple power supplies.
[0160] S2, when it is determined according to the power supply status signal that the first power supply has not failed, controlling a second power supply among the multiple power supplies to supply power, wherein the second power supply is a next power supply of the first power supply indicated by the first preset timing.
[0161] S3, when it is determined according to the power supply status signal that the first power supply fails, controlling the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing.
[0162] 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.
[0163] The embodiment of the present application also provides an electronic device, such as Fig.14 As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0164] Optionally, in this embodiment, the processor 1404 may be configured to perform the following steps through a computer program:
[0165] S1, when a power-on instruction is received, controlling a first power supply among multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power, wherein the first power supply is any power supply among the multiple power supplies.
[0166] S2, when it is determined according to the power supply status signal that the first power supply has not failed, controlling a second power supply among the multiple power supplies to supply power, wherein the second power supply is a next power supply of the first power supply indicated by the first preset timing.
[0167] S3, when it is determined according to the power supply status signal that the first power supply fails, controlling the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing.
[0168] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0169] Alternatively, a person skilled in the art may understand that: Fig.14 The structure shown is for illustration only. Fig.14 The structure of the electronic device is not limited. For example, the electronic device may also include Fig.14 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.14 Different configurations are shown.
[0170] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the power control method and the power control device in the embodiment of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned power control method. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely located relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1402 can be specifically, but not limited to, used to store information such as system configuration files. As an example, such as Fig.14 As shown, the memory 1402 may include, but is not limited to, the first power supply control module 1201, the second power supply control module 1202, and the power supply stop module 1203 in the power supply control device. In addition, other module units in the power supply control device may also be included but are not limited to, which will not be repeated in this example.
[0171] Optionally, the transmission device 1406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0172] In addition, the electronic device further includes: a display 1408; and a connection bus 1410, which is used to connect various module components in the electronic device.
[0173] In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0174] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0175] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0176] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0177] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0178] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling a power supply, characterized in that: The method comprises: When a power-on instruction is received, controlling a first power supply among the multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power, wherein the first power supply is any power supply among the multiple power supplies; When it is determined according to the power supply status signal that the first power supply has not failed, controlling a second power supply among the multiple power supplies to supply power, wherein the second power supply is a next power supply of the first power supply indicated by the first preset timing; When it is determined according to the power supply status signal that the first power supply fails, the power supplies that have started supplying power are sequentially controlled to stop supplying power according to a second preset timing.
2. The power control method according to claim 1, characterized in that: When a power-on instruction is received, controlling a first power supply among the multiple power supplies to supply power according to a first preset timing, and obtaining a power supply status signal of the first power supply after supplying power, includes: When receiving a power-on instruction, sending a first control signal to control the first power supply to supply power; When the first control signal is detected, start timing; When the timing duration reaches a preset duration, a power supply status signal of the first power supply after power supply is obtained.
3. The power control method according to claim 1, characterized in that: When it is determined according to the power supply status signal that the first power supply has not failed, controlling a second power supply among the multiple power supplies to supply power includes: determining, according to the power supply status signal, whether the first power supply is supplying power; When the power supply status signal indicates that the first power supply is supplying power, determining that the first power supply has not failed; When it is determined that the first power supply has not failed, determining a second power supply according to an indication of the first preset timing; controlling the second power supply to supply power; When it is determined according to the power supply status signal that the first power supply fails, controlling the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing sequence includes: When the power supply status signal indicates that the first power supply is not supplying power, determining that the first power supply fails; In the case where it is determined that the first power supply fails, a third power supply is determined, wherein the third power supply is a previous power supply of the first power supply indicated by the first preset timing, wherein the first preset timing and the second preset timing are opposite timings to each other; Controlling the third power supply to stop supplying power; After controlling the third power supply to stop supplying power, according to the second preset timing, determine the fourth power supply and control the fourth power supply to stop supplying power until all power supplies stop supplying power, wherein the fourth power supply is the previous power supply of the third power supply indicated by the first preset timing.
4. The power control method according to claim 3, characterized in that: The controlling the third power supply to stop supplying power comprises: Sending a second control signal to the third power supply to control the third power supply to stop supplying power; After controlling the third power supply to stop supplying power, determining the fourth power supply and controlling the fourth power supply to stop supplying power according to the second preset timing sequence includes: When the second control signal is detected, start timing; When the timing duration reaches the set duration, the fourth power source is determined according to the second preset timing, and the second control signal is sent to the fourth power source to control the fourth power source to stop supplying power.
5. The power control method according to any one of claims 1 to 4, characterized in that: The method further comprises: When it is determined that the multiple power supplies are all supplying power, determining that power-on of the target devices of the multiple power supplies is completed; When it is determined that the target device has completed powering on, obtaining power supply status signals of the multiple power supplies in real time; When it is determined according to the power supply status signals of the multiple power supplies that any power supply fails, the power supplies that have started supplying power are sequentially controlled to stop supplying power according to the second preset timing.
6. The power control method according to claim 5, characterized in that: The method further comprises: In the process of controlling the multiple power supplies to supply power in sequence according to the first preset timing, if it is determined according to the power supply status signal that the first power supply fails, first fault information is recorded, wherein the first fault information is used to indicate the power supply that fails during the power-on of the target device; After determining that the target device of the multiple power supplies has been powered on, if it is determined according to the power supply status signal that any power supply has failed, then recording second fault information, wherein the second fault information is used to indicate the power supply that has failed after the target device has been powered on; A power supply failure report is generated according to the first failure information and the second failure information.
7. The power control method according to any one of claims 1 to 4, characterized in that: The method further comprises: Continuously obtain multiple power supply status signals; When a plurality of power supply status signals acquired continuously are the same, it is determined whether the first power supply fails according to the power supply status signal.
8. A power supply control device, characterized in that: The device comprises: A first power supply control module, configured to control a first power supply among the multiple power supplies to supply power according to a first preset timing when a power-on instruction is received, and obtain a power supply status signal of the first power supply after supplying power, wherein the first power supply is any power supply among the multiple power supplies; A second power supply control module, configured to control a second power supply among the multiple power supplies to supply power when it is determined according to the power supply status signal that the first power supply has not failed, wherein the second power supply is a next power supply of the first power supply indicated by the first preset timing; The power supply stopping module is used to control the power supplies that have started supplying power to stop supplying power in sequence according to a second preset timing when it is determined according to the power supply status signal that the first power supply fails.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Control method for bus device power source, device, storage medium and electronic device
WO2026137727A1
