CN114564096B - Control method and system for standby power protection and related components - Google Patents
Control method and system for standby power protection and related components Download PDFInfo
- Publication number
- CN114564096B CN114564096B CN202210188741.1A CN202210188741A CN114564096B CN 114564096 B CN114564096 B CN 114564096B CN 202210188741 A CN202210188741 A CN 202210188741A CN 114564096 B CN114564096 B CN 114564096B
- Authority
- CN
- China
- Prior art keywords
- power
- power supply
- state
- supply state
- interrupt signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 119
- 230000008569 process Effects 0.000 claims abstract description 63
- 230000006870 function Effects 0.000 claims description 30
- 238000012544 monitoring process Methods 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 13
- 230000000903 blocking effect Effects 0.000 claims 2
- 230000002618 waking effect Effects 0.000 claims 2
- 230000008901 benefit Effects 0.000 abstract description 7
- 238000004891 communication Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 229920002492 poly(sulfone) Polymers 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000010079 rubber tapping Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/30—Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B70/00—Technologies for an efficient end-user side electric power management and consumption
- Y02B70/30—Systems integrating technologies related to power network operation and communication or information technologies for improving the carbon footprint of the management of residential or tertiary loads, i.e. smart grids as climate change mitigation technology in the buildings sector, including also the last stages of power distribution and the control, monitoring or operating management systems at local level
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S20/00—Management or operation of end-user stationary applications or the last stages of power distribution; Controlling, monitoring or operating thereof
- Y04S20/20—End-user application control systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
The application discloses a control method, a system and related components for standby power protection, wherein the method comprises the following steps: receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC; according to the NMI interrupt signal, running an interrupt processing function so that the interrupt processing function reads the AC power supply state in the GPIO and monitors an AC power-down thread when the AC power supply state is a power-down state; entering a standby power process; the control method further comprises the following steps: if NMI interrupt signal is lost in the standby power process, the AC power supply state is polled and read at preset time intervals, and the AC power failure process is monitored again when the AC power supply state is the power failure state. The control method takes the NMI interrupt signal as the premise, and polls and reads the AC power supply state when the NMI interrupt signal is lost, so that the control method has the advantage of quick sensing, can improve the efficiency of standby power protection, saves the power consumption of the standby power supply, and improves the reliability of data protection.
Description
Technical Field
The present application relates to the field of server control, and in particular, to a method and system for controlling standby power protection, and related components.
Background
The standby power protection of the server is to use a standby power supply (BBU) as a basis, and temporarily supply power to the system by using the standby power supply when the system AC is powered down, so that the data can be stored rapidly.
Currently, the standby power protection of a server generally monitors the standby power protection process in a form of directly polling a GPIO (General Purpose Input Output ), the polling has poor timeliness, waiting for a waiting delay of a polling response, and on the premise that the standby power is limited, the power consumption in the delay process is enough to influence the effect of the standby power protection, so that the standby power protection has the hidden trouble of data storage failure.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present application is directed to a method, a system and related components for controlling standby power protection. The specific scheme is as follows:
a control method for standby power protection, comprising:
receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC;
according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state;
entering a standby power process;
the control method further includes:
and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state.
Preferably, before the receiving CPLD detects an NMI interrupt signal sent when the PSU is powered down, the method further includes:
and sinking into a kernel service state, and waiting for receiving the NMI interrupt signal.
Preferably, the process of trapping in the kernel service state includes:
the trapped kernel service state is invoked by the ioctl system.
Preferably, after the standby power process is finished, the method further includes:
and closing the main system and the standby power supply by using the Linux ram system.
Preferably, before the main system and the standby power supply are turned off by the linux ram system, the method further includes:
and calling kexec to start the linux ram system.
Preferably, after the power backup process is entered, the method further includes:
and backing up the cache data and/or the kernel data to the hard disk.
Preferably, after the power-up process is completed, the method further includes:
and exiting the monitoring of the AC power-down thread.
Correspondingly, the application also discloses a control system for standby power protection, which comprises:
the receiving module is used for receiving an NMI interrupt signal sent when the CPLD detects that the PSU is powered down by AC;
the terminal module is used for running an interrupt processing function according to the NMI interrupt signal so that the interrupt processing function can read the AC power supply state in the GPIO and monitor an AC power-down thread when the AC power supply state is a power-down state;
the standby power module is used for entering a standby power process;
the terminal module is further configured to:
and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state.
Correspondingly, the application also discloses a control device for standby electric protection, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the control method for standby power protection as claimed in any one of the preceding claims when executing the computer program.
Correspondingly, the application also discloses a readable storage medium, wherein the readable storage medium is stored with a computer program, and the computer program realizes the steps of the control method for the standby power protection according to any one of the above steps when being executed by a processor.
The application discloses a control method for standby power protection, which comprises the following steps: receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC; according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state; entering a standby power process; the control method further includes: and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state. The control method takes the NMI interrupt signal as the premise, and polls and reads the AC power supply state when the NMI interrupt signal is lost, so that the control method has the advantage of quick sensing, can improve the efficiency of standby power protection, saves the power consumption of the standby power supply, and improves the reliability of data protection.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a method for controlling standby power protection according to an embodiment of the present application;
FIG. 2 is a diagram showing the information transmission of a control method for standby power protection according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a control system with electrical protection according to an embodiment of the present application;
fig. 4 is a structural diagram of an electrically protected control device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, the standby power protection of a server is generally monitored in a direct polling GPIO mode, the polling time is poor, waiting delay of a polling response is waited, and on the premise that the standby power is limited, the power consumption in the delay process is enough to influence the standby power protection effect, so that the standby power protection has hidden danger of data storage failure.
The control method takes the NMI interrupt signal as the premise, and polls and reads the AC power supply state when the NMI interrupt signal is lost, so that the control method has the advantage of quick sensing, can improve the efficiency of standby power protection, saves the power consumption of the standby power supply, and improves the reliability of data protection.
The embodiment of the application discloses a control method for standby power protection, which is shown in fig. 1 and comprises the following steps:
s1: receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC;
specifically, the generation of the NMI (Non Maskable Interrupt, non-maskable interrupt) interrupt signal is assumed to be a kernel service status, so the control method in this embodiment further includes, before receiving the NMI interrupt signal sent when the CPLD (Complex Programmable Logic Device ) detects that the PSU (Power Supply Unit, power module) has an AC power failure:
the core service state is trapped and the NMI interrupt signal is waited to be received.
Specifically, the process of trapping the kernel service state comprises calling the trapping kernel service state through the ioctl system, so that the quick perception of the user state program is realized.
S2: according to the NMI interrupt signal, running an interrupt processing function so that the interrupt processing function reads the AC power supply state in the GPIO and monitors an AC power-down thread when the AC power supply state is a power-down state;
s3: entering a standby power process;
it is understood that the standby process is performed according to a conventional standby current process.
Further, after entering the standby power process, the method further comprises: and backing up the cache data and/or the kernel data to the hard disk. It will be appreciated that the operation of backing up the cached data or kernel data to the hard disk is independent of the conventional power backup data protection, so as to further improve the security, reliability and integrity of the critical data.
The control method further comprises the following steps:
s4: if NMI interrupt signal is lost in the standby power process, the AC power supply state is polled and read at preset time intervals, and the AC power failure process is monitored again when the AC power supply state is the power failure state.
It can be appreciated that if the standby process can be monitored normally, whether the NMI interrupt signal is in place or not, once the NMI interrupt signal is lost, the AC power status must be polled for and read, and the AC power down process must be monitored again when it is determined that the status is a power down status.
It can be appreciated that after the power-up process is completed, the method further includes: the monitoring of the AC power down thread is exited. After the data protection of standby power is completed, the AC power-down process does not need to be monitored, so that the standby power-down process can be directly exited.
Further, after the standby power process is finished, the method further comprises:
and closing the main system and the standby power supply by using the Linux ram system.
It can be understood that the Linux ram system is utilized to actively close the main system, so that the situation of damage caused by sudden power failure of the main system can be avoided; the Linux ram system is utilized to actively turn off the standby power supply, so that the situation that the standby power supply cannot be turned off and the standby power supply is overdischarged and damaged due to the fact that the main system is powered down can be effectively prevented.
It can be understood that the Linux ram system should be started before use, that is, before the main system and the standby power supply are turned off by the Linux ram system, the Linux ram system further includes:
and calling kexec to start the linux ram system.
The application discloses a control method for standby power protection, which comprises the following steps: receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC; according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state; entering a standby power process; the control method further includes: and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state. The control method takes the NMI interrupt signal as the premise, and polls and reads the AC power supply state when the NMI interrupt signal is lost, so that the control method has the advantage of quick sensing, can improve the efficiency of standby power protection, saves the power consumption of the standby power supply, and improves the reliability of data protection.
The embodiment of the application discloses a specific control method for standby power protection, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Specifically, see fig. 2:
the control method of standby power protection in this embodiment is implemented as follows from the start of protection to the end of standby power protection through wdk, service_main, io_main, io_device and service_start in software:
a) Service_start startup service_main process Service
b) Service_main process Service initiation IO_main process Service
c) Service main startup initialization standby power BBU electrical parameter
d) Service_main enters a kernel Service state through the ioctl system call, acquires an AC power supply state through wdk drive, and if the AC power supply state is not the power-down state AC loss, the service_main falls into the kernel for a long time to block and wait until the AC loss occurs, namely the AC power supply state is the power-down state, wakes up an AC power-down process and exits the ioctl system call;
e) After AC loss, 2 PSUs are powered down, usually the PSUs support 3ms anti-shake, and then the add-in card is powered down after 6 ms.
f) Then PSU generates AC loss and sends the AC power-down signal to CPLD as interrupt;
g) The CPLD detects an AC power-down signal and switches the power supply mode to BBU power supply;
h) The CPLD sets an AC power-down signal and then triggers an NMI interrupt signal;
i) wdk drives and receives NMI interrupt signals sent by CPLD, triggers wdk interrupt processing functions in driving;
j) The interrupt processing function reads the AC power supply state in the GPIO, and sends out an AC_LOSS signal after confirming the AC power supply state as the power-down state AC LOSS so as to wake up a service_main monitoring AC power-down thread, namely an AC LOSS thread;
k) Service_main enters a standby power process;
l) if the MNI interrupt signal is lost in the standby power process, for example, the AC power supply state in the GPIO, that is, the ac_fail state, is read in every 50ms polling every preset time interval, and if the ac_fail state is an ac_loss signal, the service_main monitoring AC LOSS thread is awakened;
m) service_main terminates the IO_main process;
n) backing up the cached data hardendata in the memory to a hard disk;
o) the service_main monitoring process exits;
p) service_start starts executing the shutdown procedure:
q) service_start calls kexec to start the linux ram system;
r) closing the main system by the linux ram system;
s) the linux ram system turns off the standby power BBU.
It should be understood that, in the foregoing, the setting of wdk, service_main, io_main, io_device, and service_start is generally implemented in the form of a program or a function, and specific programming language is not limited herein, so long as the effect of each driver or function in the present embodiment can be implemented, and the technical feature belongs to the protection scope in the present embodiment.
Correspondingly, the application also discloses a control system for standby electric protection, which is shown in fig. 3 and comprises:
the receiving module 1 is used for receiving an NMI interrupt signal sent when the CPLD detects that the PSU is powered down by AC;
the terminal module 2 is configured to operate an interrupt processing function according to the NMI interrupt signal, so that the interrupt processing function reads an AC power supply state in the GPIO, and monitor an AC power failure thread when the AC power supply state is a power failure state;
the standby module 3 is used for entering a standby process;
the terminal module 2 is further configured to:
and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state.
In some specific embodiments, the receiving module 1 is further configured to: and before the CPLD receives an NMI interrupt signal sent when the PSU is powered down, the CPLD falls into a kernel service state and waits for receiving the NMI interrupt signal.
In some specific embodiments, the process of trapping in a kernel service state includes:
the trapped kernel service state is invoked by the ioctl system.
In some specific embodiments, the power backup module 3 is further configured to: and after the standby power process is finished, the Linux ram system is utilized to shut down the main system and the standby power supply.
In some specific embodiments, the power backup module 3 is further configured to: and before the main system and the standby power supply are closed by the linux ram system, calling kexec to start the linux ram system.
In some specific embodiments, the power backup module 3 is further configured to: and after the standby power process is started, the cache data and/or the kernel data are backed up to the hard disk.
In some specific embodiments, the power backup module 3 is further configured to: and after the standby power process is finished, exiting the monitoring of the AC power-down thread.
According to the embodiment of the application, the NMI interrupt signal is used as a premise, and the AC power supply state is polled and read when the NMI interrupt signal is lost, so that the method has the advantage of quick sensing, the efficiency of standby power protection can be improved, the power consumption of a standby power supply can be saved, and the reliability of data protection can be improved.
Correspondingly, the application also discloses a control device for standby power protection, which is shown in FIG. 4 and comprises a processor 11 and a memory 12; wherein the processor 11, when executing the computer program stored in the memory 12, performs the following steps:
receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC;
according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state;
entering a standby power process;
and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state.
According to the embodiment, the NMI interrupt signal is used as a premise, and the AC power supply state is polled and read when the NMI interrupt signal is lost, so that the method has the advantage of quick sensing, the efficiency of standby power protection can be improved, the power consumption of a standby power supply can be saved, and the reliability of data protection can be improved.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and sinking into a kernel service state, and waiting for receiving the NMI interrupt signal.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
the trapped kernel service state is invoked by the ioctl system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and closing the main system and the standby power supply by using the Linux ram system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and calling kexec to start the linux ram system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and backing up the cache data and/or the kernel data to the hard disk.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and exiting the monitoring of the AC power-down thread.
Further, the control device for standby electric protection in the embodiment may further include:
the input interface 13 is configured to acquire an externally imported computer program, store the acquired computer program in the memory 12, and also be configured to acquire various instructions and parameters transmitted by an external terminal device, and transmit the various instructions and parameters to the processor 11, so that the processor 11 uses the various instructions and parameters to develop corresponding processing. In this embodiment, the input interface 13 may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, and the like.
And an output interface 14 for outputting various data generated by the processor 11 to a terminal device connected thereto, so that other terminal devices connected to the output interface 14 can acquire various data generated by the processor 11. In this embodiment, the output interface 14 may specifically include, but is not limited to, a USB interface, a serial interface, and the like.
And the communication unit 15 is used for establishing remote communication connection between the control device with the standby power protection and the external server so that the control device with the standby power protection can mount the image file to the external server. In this embodiment, the communication unit 15 may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
A keyboard 16 for acquiring various parameter data or instructions inputted by a user by tapping the key cap in real time.
And the display 17 is used for displaying the related information of the standby power protection process in real time so as to facilitate the user to know the specific state of the current standby power protection in time.
The mouse 18 may be used to assist the user in inputting data and to simplify the user's operation.
Further, embodiments of the present application also disclose a readable storage medium, where the readable storage medium includes Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. A computer program is stored in a readable storage medium, which when executed by a processor, performs the steps of:
receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC;
according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state;
entering a standby power process;
and if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state.
According to the embodiment, the NMI interrupt signal is used as a premise, and the AC power supply state is polled and read when the NMI interrupt signal is lost, so that the method has the advantage of quick sensing, the efficiency of standby power protection can be improved, the power consumption of a standby power supply can be saved, and the reliability of data protection can be improved.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and sinking into a kernel service state, and waiting for receiving the NMI interrupt signal.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
the trapped kernel service state is invoked by the ioctl system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and closing the main system and the standby power supply by using the Linux ram system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and calling kexec to start the linux ram system.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and backing up the cache data and/or the kernel data to the hard disk.
In some specific embodiments, the following steps may be implemented when the processor 11 executes the computer subroutine stored in the memory 12:
and exiting the monitoring of the AC power-down thread.
Further, the control device for standby electric protection in the embodiment may further include:
the input interface 13 is configured to acquire an externally imported computer program, store the acquired computer program in the memory 12, and also be configured to acquire various instructions and parameters transmitted by an external terminal device, and transmit the various instructions and parameters to the processor 11, so that the processor 11 uses the various instructions and parameters to develop corresponding processing. In this embodiment, the input interface 13 may specifically include, but is not limited to, a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, and the like.
And an output interface 14 for outputting various data generated by the processor 11 to a terminal device connected thereto, so that other terminal devices connected to the output interface 14 can acquire various data generated by the processor 11. In this embodiment, the output interface 14 may specifically include, but is not limited to, a USB interface, a serial interface, and the like.
And the communication unit 15 is used for establishing remote communication connection between the control device with the standby power protection and the external server so that the control device with the standby power protection can mount the image file to the external server. In this embodiment, the communication unit 15 may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
A keyboard 16 for acquiring various parameter data or instructions inputted by a user by tapping the key cap in real time.
And the display 17 is used for displaying the related information of the standby power protection process in real time so as to facilitate the user to know the specific state of the current standby power protection in time.
The mouse 18 may be used to assist the user in inputting data and to simplify the user's operation.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above detailed description of the control method, system and related components for standby electric protection provided by the application applies specific examples to illustrate the principle and implementation of the application, and the above examples are only used to help understand the method and core idea of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
Claims (8)
1. A control method for standby power protection, comprising:
receiving an NMI interrupt signal sent by a CPLD when the CPLD detects that the PSU is powered down by AC;
according to the NMI interrupt signal, an interrupt processing function is operated, so that the interrupt processing function reads an AC power supply state in the GPIO, and an AC power failure thread is monitored when the AC power supply state is a power failure state;
entering a standby power process;
the control method further includes:
if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state;
before the receiving CPLD detects an NMI interrupt signal sent when the PSU is powered down, the receiving CPLD further comprises:
a core service state is trapped, and the NMI interrupt signal is waited to be received;
a trap to kernel service state, comprising:
entering a kernel Service state through an ioctl system call by using service_main, acquiring the AC power supply state through a wdk driver, trapping sleep blocking waiting in a kernel when the AC power supply state is not a power-down state, and waking up the AC power-down process and exiting the ioctl system call when the AC power supply state is the power-down state;
the CPLD detects that the PSU is powered down by AC, and comprises:
the CPLD detects that the PSU generates an AC power-down signal which is transmitted to the CPLD as an interruption;
according to the NMI interrupt signal, operating an interrupt processing function so that the interrupt processing function reads an AC power supply state in the GPIO, and monitoring an AC power-down process when the AC power supply state is a power-down state, wherein the method comprises the following steps:
triggering the interrupt processing function in the wdk driver by the wdk driver receiving the NMI interrupt signal sent by the CPLD;
and reading the AC power supply state in the GPIO by using the interrupt processing function, and sending an AC_LOSS signal to wake up the service_main monitoring AC power-down thread when the AC power supply state is confirmed to be a power-down state.
2. The control method according to claim 1, characterized in that after the standby process is finished, further comprising:
and closing the main system and the standby power supply by using the Linux ram system.
3. The control method according to claim 2, wherein before the main system and the standby power supply are turned off by the linux ram system, further comprising:
and calling kexec to start the linux ram system.
4. A control method according to any one of claims 1 to 3, further comprising, after the entering of the standby process:
and backing up the cache data and/or the kernel data to the hard disk.
5. The control method according to claim 4, further comprising, after the power backup process is completed:
and exiting the monitoring of the AC power-down thread.
6. A control system for backup power protection, comprising:
the receiving module is used for receiving an NMI interrupt signal sent when the CPLD detects that the PSU is powered down by AC;
the terminal module is used for running an interrupt processing function according to the NMI interrupt signal so that the interrupt processing function can read the AC power supply state in the GPIO and monitor an AC power-down thread when the AC power supply state is a power-down state;
the standby power module is used for entering a standby power process;
the terminal module is further configured to:
if the NMI interrupt signal is lost in the standby power process, polling and reading the AC power supply state at preset time intervals, and monitoring the AC power failure thread again when the AC power supply state is a power failure state;
the receiving module is further configured to:
before the receiving CPLD detects an NMI interrupt signal sent when the PSU is powered down, the receiving CPLD falls into a kernel service state and waits for receiving the NMI interrupt signal;
a trap to kernel service state, comprising:
entering a kernel Service state through an ioctl system call by using service_main, acquiring the AC power supply state through a wdk driver, trapping sleep blocking waiting in a kernel when the AC power supply state is not a power-down state, and waking up the AC power-down process and exiting the ioctl system call when the AC power supply state is the power-down state;
the CPLD detects that the PSU is powered down by AC, and comprises:
the CPLD detects that the PSU generates an AC power-down signal which is transmitted to the CPLD as an interruption;
the terminal module is specifically configured to:
triggering the interrupt processing function in the wdk driver by the wdk driver receiving the NMI interrupt signal sent by the CPLD;
and reading the AC power supply state in the GPIO by using the interrupt processing function, and sending an AC_LOSS signal to wake up the service_main monitoring AC power-down thread when the AC power supply state is confirmed to be a power-down state.
7. A control device for standby electric protection, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the control method for standby power protection according to any one of claims 1 to 5 when executing the computer program.
8. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the control method for standby electric protection according to any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188741.1A CN114564096B (en) | 2022-02-28 | 2022-02-28 | Control method and system for standby power protection and related components |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188741.1A CN114564096B (en) | 2022-02-28 | 2022-02-28 | Control method and system for standby power protection and related components |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114564096A CN114564096A (en) | 2022-05-31 |
CN114564096B true CN114564096B (en) | 2023-08-22 |
Family
ID=81715216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210188741.1A Active CN114564096B (en) | 2022-02-28 | 2022-02-28 | Control method and system for standby power protection and related components |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114564096B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354514A (en) * | 2010-06-02 | 2012-02-15 | 株式会社理光 | Image processing apparatus |
CN104090527A (en) * | 2014-07-01 | 2014-10-08 | 深圳市英威腾电气股份有限公司 | Power-down protection device |
CN107291207A (en) * | 2017-06-30 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of power-supply switching method and system |
CN108491058A (en) * | 2018-04-03 | 2018-09-04 | 郑州云海信息技术有限公司 | A kind of the powered-off fault data guard method and device of Nonvolatile memory |
CN110456897A (en) * | 2018-05-08 | 2019-11-15 | 杭州海康威视数字技术股份有限公司 | Power-off protection method, protective device and the server cluster of electronic equipment |
-
2022
- 2022-02-28 CN CN202210188741.1A patent/CN114564096B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354514A (en) * | 2010-06-02 | 2012-02-15 | 株式会社理光 | Image processing apparatus |
CN104090527A (en) * | 2014-07-01 | 2014-10-08 | 深圳市英威腾电气股份有限公司 | Power-down protection device |
CN107291207A (en) * | 2017-06-30 | 2017-10-24 | 郑州云海信息技术有限公司 | A kind of power-supply switching method and system |
CN108491058A (en) * | 2018-04-03 | 2018-09-04 | 郑州云海信息技术有限公司 | A kind of the powered-off fault data guard method and device of Nonvolatile memory |
CN110456897A (en) * | 2018-05-08 | 2019-11-15 | 杭州海康威视数字技术股份有限公司 | Power-off protection method, protective device and the server cluster of electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114564096A (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5974552A (en) | Method and apparatus for executing a scheduled operation after wake up from power off state | |
US8108704B2 (en) | Method for automatically switching power states | |
US20060090088A1 (en) | Method and apparatus for managing power of portable information device | |
CN111683287B (en) | Intelligent device starting method and device, intelligent device and readable storage medium | |
JP2004152304A (en) | System and method for holding state data of personal computer in standby state at ac power supply failure | |
JPH09212261A (en) | Power supply control system for information processor | |
CN102437917B (en) | A kind of network wake-up method, network wake-up device and computer | |
JPH11288334A (en) | Method and device for power down for computer system | |
CN111913669B (en) | SSD power-down speed improving method and device, computer equipment and storage medium | |
WO2023024863A1 (en) | System chip and electronic device | |
CN114564096B (en) | Control method and system for standby power protection and related components | |
CN113438362B (en) | Method for starting terminal at fixed time, terminal and storage medium | |
CN103546648B (en) | Method for managing timing information of terminal and terminal | |
JP4411014B2 (en) | Computer and power supply backup method thereof | |
CN112835826A (en) | Communication method, device, equipment and readable storage medium | |
CN114416483A (en) | Running state monitoring method and device for multi-processing unit, storage medium and equipment | |
CN115718628A (en) | Low-temperature power-on self-starting method, system, device and medium of edge server | |
CN111385416B (en) | Electronic equipment and alarm clock processing method | |
CN111104286B (en) | Power consumption management method, server, and computer-readable storage medium | |
CN116243987A (en) | Desktop remote control method, system, device and readable storage medium | |
JP3466240B2 (en) | Power control circuit | |
CN116700469A (en) | Equipment keep-alive method and device and related equipment | |
CN113721754A (en) | Control method and device and electronic equipment | |
CN116360578A (en) | System switching method and device, electronic equipment and computer readable storage medium | |
CN116955001A (en) | PCIE equipment information acquisition method, system, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |