Gateway equipment power-off alarm method
By monitoring the power status in real time within the gateway device and sending SNMP alarm packets, the problem of delay and dependence of power outage alarm in the existing technology of gateway devices is solved, efficient and real-time power outage alarm is achieved, and the system stability is improved and data security.
Patent Information
- Application Number
- CN202411379836.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-07
AI Technical Summary
The existing gateway equipment power outage alarm systems have problems with high delay and strong dependence. They cannot send alarm information in time at the moment of power outage, and lack detailed description and accurate positioning of alarm information.
Design a method integrated into the gateway device, and monitor the power state in real time through the power detection module. When the power is abnormal, a signal is sent to the CPU, trigger an interrupt signal, the driver captures the interrupt signal, prepares and sends an SNMP alarm packet to the specified IP address and ports.
It realizes timely generation and sends detailed alarm information when the gateway equipment is powered off, improves the stability of the system and data security, improves the real-time, flexibility and automation level of the powered off alarm system, and reduces hardware costs and system Complexity.
Smart Images

Figure CN119396648A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for warning of power failure of gateway equipment, belonging to the technical field of communication equipment. Background Art
[0002] With the advancement of information technology, gateway devices play a vital role in modern communication networks, not only transmitting data but also managing network security, data storage, and processing. However, gateway devices can experience power outages during operation for various reasons. Power outages can not only lead to data loss and communication interruptions, but can also cause security issues. Therefore, how to promptly generate alerts when a gateway device loses power and notify relevant personnel for action has become a pressing issue.
[0003] Existing gateway device power outage alarm systems mostly rely on external monitoring systems. This approach suffers from high latency and strong dependencies, and is unable to send timely alarm information at the moment of power outage. Furthermore, most traditional methods are limited to simple power outage alarms and lack detailed descriptions and accurate location of alarm information.
[0004] Therefore, it is necessary to design a method that can be integrated into the gateway device to monitor the power status in real time and send detailed alarm information in time when the power is off. Summary of the Invention
[0005] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method for gateway device power failure alarm, which generates alarm information in time when power is off and sends it to a preset terminal to ensure the stability of the system and the security of data.
[0006] The purpose of the present invention is achieved through the following technical solutions:
[0007] The method for warning of power failure of a gateway device is characterized by comprising the following steps:
[0008] a) Configure alarm parameters. When the device is powered on, the upper-layer application writes the power-off alarm IP address, port number, and SNMP alarm packet content into the device's running memory through the API interface.
[0009] b) Monitor the power status of the gateway device in real time through the power detection module;
[0010] c) Detecting power anomalies: When the power detection module detects that the voltage is lower than the set threshold, it sends a signal to the central processing unit (CPU);
[0011] d) Confirming a power outage event: the CPU determines whether a power outage event has occurred based on the received signal. If a power outage event is confirmed to have occurred, an interrupt signal is triggered;
[0012] e) Processing interrupt signals: the driver captures the interrupt signals, reads the alarm parameters written into the running memory, and prepares and sends SNMP alarm packets through the socket interface;
[0013] f) Send alarm information. The driver sends the prepared SNMP alarm package to the specified IP address and port through the network interface;
[0014] g) Emergency processing: the alarm information is received by the receiving terminal and triggers emergency measures.
[0015] Furthermore, in the above-mentioned method for power-off alarm of gateway device, in step a), in the initial operation stage after the device is powered on, the upper-layer application automatically or manually configures the IP address, port number and SNMP alarm package content, and the SNMP alarm package content includes device ID, power-off time, device location and device status information.
[0016] Furthermore, in the above-mentioned method of power-off alarm for gateway devices, in step b), the power detection module monitors the power status of the device in real time through a voltage detection circuit or a power monitoring chip, and when the voltage is lower than a set threshold, a power abnormality signal is sent to the CPU.
[0017] Furthermore, in the above-mentioned method for power failure alarm of the gateway device, in step d), the CPU performs multiple determinations based on the received signal to ensure the accuracy of the detection result, and then triggers an interrupt signal to start the power failure alarm process.
[0018] Furthermore, in the above-mentioned method for warning of power failure of a gateway device, in step e), the driver sends an SNMP alarm package through the socket interface, and the SNMP alarm package includes device ID, power failure time, device location and current status information.
[0019] Furthermore, in the above-mentioned method for power failure alarm of gateway device, in step f), the SNMP alarm package is sent via TCP / IP protocol, so that the alarm information is reliably transmitted and received by the monitoring center in real time, and the alarm package contains predefined device status information and fault type.
[0020] Furthermore, in the above-mentioned method for warning of power failure of the gateway device, in step g), the receiving terminal immediately activates a preset emergency processing mechanism after receiving the warning information, notifies maintenance personnel, starts a backup power supply, or performs data backup.
[0021] Furthermore, in the above-mentioned method of power-off alarm for gateway devices, the driver automatically initializes the alarm parameters when the device is powered on, and sends an alarm packet to the specified IP and port through the network interface after a power-off event occurs, so that the alarm information can be sent smoothly in the event of power abnormality.
[0022] Compared with the prior art, the present invention has significant advantages and beneficial effects, which are specifically reflected in the following aspects:
[0023] The present invention provides an efficient gateway device power failure alarm implementation method. By detecting the power status, an alarm message is generated in a timely manner when a power failure occurs, and the message is sent to a designated receiving terminal through a preset communication method. Through an integrated interrupt processing mechanism and SNMP protocol, an alarm is ensured in a timely manner when a power failure occurs, thereby improving the stability of the system and the security of the data, and enhancing the real-time, flexibility and automation level of the power failure alarm system, while reducing the hardware cost and system complexity.
[0024] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the specific embodiments of the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 : Schematic diagram of system hardware architecture;
[0027] Figure 2 : Schematic diagram of the present invention. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, directional terms and order terms are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0030] like Figures 1-2 As shown, the method for the gateway device power failure alarm specifically includes the following steps:
[0031] a) Configure alarm parameters. When the device is powered on, the upper-layer application writes the power-off alarm IP address, port number, and SNMP alarm packet content into the device's running memory through the API interface.
[0032] During the initial operation phase after the device is powered on, the upper-layer application automatically or manually configures the IP address, port number, and SNMP alarm packet content. The SNMP alarm packet content includes the device ID, power-off time, device location, and device status information. The SNMP alarm packet information is transmitted through the SNMP protocol when the power is off.
[0033] b) Monitor the power status of the gateway device in real time through the power detection module;
[0034] The power detection module monitors the device power status in real time through a voltage detection circuit or power monitoring chip. When the voltage is lower than the set threshold, it sends a power abnormality signal to the CPU.
[0035] c) Detecting power anomalies: When the power detection module detects that the voltage is lower than the set threshold, it sends a signal to the central processing unit (CPU);
[0036] d) Confirming a power outage event: the CPU determines whether a power outage event has occurred based on the received signal. If a power outage event is confirmed to have occurred, an interrupt signal is triggered;
[0037] The CPU makes multiple determinations based on the received signal to ensure the accuracy of the detection results, and then triggers an interrupt signal to start the power-off alarm process;
[0038] e) Processing interrupt signals: the driver captures the interrupt signals, reads the alarm parameters written into the running memory, and prepares and sends SNMP alarm packets through the socket interface;
[0039] The driver sends SNMP alarm packets through the socket interface. The SNMP alarm packets contain device ID, power failure time, device location and current status information.
[0040] f) Send alarm information. The driver sends the prepared SNMP alarm package to the specified IP address and port through the network interface;
[0041] SNMP alarm packets are sent via TCP / IP protocol, enabling reliable transmission of alarm information and real-time reception by the monitoring center. The alarm packets contain pre-defined device status information and fault types.
[0042] g) Emergency processing: the alarm information is received by the receiving terminal and emergency measures are triggered;
[0043] After receiving the alarm information, the receiving terminal immediately activates the preset emergency response mechanism to notify maintenance personnel, start the backup power supply or perform data backup.
[0044] The driver automatically initializes the alarm parameters when the device is powered on, and sends the alarm packet to the specified IP and port through the network interface after a power failure event occurs, so that the alarm information can be sent smoothly in the event of power anomalies.
[0045] Example
[0046] Configure alarm parameters at the application layer: Configure alarm parameters through the upper-layer application; the configuration is as follows:
[0047] IP address: 192.168.1.100
[0048] Port number: 162
[0049] The alarm package contains information such as device ID, power outage time, and location;
[0050] Detecting power status: During normal operation of the gateway device, the power detection module monitors the power status in real time. If the power voltage is detected to be lower than the set threshold (for example, 10V), the power detection module immediately sends a power anomaly signal to the CPU.
[0051] Determine power-off events: After receiving the signal, the CPU determines whether it is a power-off event. If it is confirmed to be a power-off event, the CPU triggers an interrupt signal to notify the driver to handle it.
[0052] Interrupt processing: After the driver captures the CPU interrupt signal, it immediately executes the interrupt handler; the interrupt handler reads the alarm parameters stored in the running memory and prepares to send the SNMP alarm packet through the socket interface;
[0053] Sending alarm information: The driver sends SNMP alarm packets to the configured IP address 192.168.1.100 and port 162 through the socket interface; the SNMP alarm packets contain detailed device information, such as device ID, power failure time, location, and current device status information;
[0054] Initiate emergency measures: After receiving the SNMP alarm package, the receiving terminal parses the alarm content, identifies the power outage event, and immediately notifies maintenance personnel to handle it. At the same time, it initiates emergency measures, such as switching to the backup power supply and backing up data.
[0055] Compared with the existing power failure alarm method, the present invention has the following characteristics:
[0056] No persistent storage is required and no dependency is placed on persistent storage. Alarm parameters are automatically written to the running memory each time the device is powered on. In the event of a power outage, alarms are sent directly using runtime data. This simplifies the hardware structure, reduces dependency on persistent storage, and reduces memory wear.
[0057] Real-time performance and fast response: The power detection module embedded in the gateway device monitors the power status in real time. Once a power anomaly is detected, the driver immediately triggers an interrupt and sends an SNMP alarm package; this significantly improves the real-time performance and response speed of the alarm system, ensuring rapid processing when power anomalies occur.
[0058] Based on the flexible configuration of running memory, alarm parameters such as IP address, port number and alarm package content are automatically written to the running memory through the upper-layer application after each device startup; this makes the alarm parameter configuration more flexible and can be dynamically adjusted according to different business needs, improving the configurability and adaptability of the system.
[0059] The interrupt-driven alarm mechanism adopts an interrupt-driven mechanism. When the power supply is abnormal, the power detection module triggers an interrupt signal and the CPU immediately starts the interrupt handler. The interrupt-driven design improves the immediacy of response, avoids the delay that may be caused by polling, and improves efficiency.
[0060] The hardware design is simplified, the hardware cost is reduced, the system is more compact, and an efficient power failure alarm function can be achieved without increasing the hardware complexity.
[0061] The standardized SNMP alarm mechanism uses SNMP (Simple Network Management Protocol) to send alarm packages. This universal and standardized protocol can be seamlessly integrated with various network monitoring and management systems, enhancing the system's compatibility and scalability.
[0062] Efficient emergency response support not only issues alarm information, but also automatically interacts with the emergency response mechanism of the receiving terminal, such as starting the backup power supply, performing data backup, or notifying maintenance personnel, significantly improving the efficiency and automation level of emergency response.
[0063] The low-power design uses an interrupt mechanism that triggers an interrupt only when a power anomaly is detected. The system is normally in a low-power state. By eliminating frequent persistent storage reads and writes, system power consumption is further reduced.
[0064] To sum up, the present invention's efficient gateway device power off alarm implementation method generates alarm information in a timely manner when a power off occurs by detecting the power status, and sends it to the designated receiving terminal through a preset communication method. Through the integrated interrupt processing mechanism and SNMP protocol, it ensures timely alarm when a power off event occurs, improves the system stability and data security, and enhances the real-time, flexibility and automation level of the power off alarm system, while reducing hardware costs and system complexity.
[0065] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Various modifications and variations are readily apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention. It should be noted that similar reference numerals and letters denote similar items in the following figures. Therefore, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
[0066] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
[0067] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. A method for warning a power failure of a gateway device, characterized in that: The following steps are involved: a) Configure alarm parameters. When the device is powered on, the upper-layer application writes the IP address, port number and SNMP alarm package content of the power-off alarm into the device's running memory through the API interface; b) Monitor the power status and monitor the power status of the gateway device in real time through the power detection module; c) Detect power supply abnormality. When the power supply detection module detects that the voltage is lower than the set threshold, a signal is sent to the central processing unit CPU; d) Confirming a power failure event: the CPU determines whether a power failure event has occurred based on the received signal, and if a power failure event is confirmed to have occurred, an interrupt signal is triggered; e) Processing interrupt signals, the driver captures the interrupt signals, reads the alarm parameters written into the running memory, and prepares and sends SNMP alarm packets through the socket interface; f) Send alarm information. The driver sends the prepared SNMP alarm package to the specified IP address and port through the network interface; g) Emergency processing: the alarm information is received by the receiving terminal and emergency measures are triggered.
2. The method for warning a power failure of a gateway device according to claim 1, characterized in that: Step a), in the initial operation stage after the device is powered on, the upper layer application automatically or manually configures the IP address, port number and SNMP alarm package content, and the SNMP alarm package content includes device ID, power failure time, device location and device status information.
3. The method for warning a power failure of a gateway device according to claim 1, characterized in that: Step b), the power detection module monitors the power status of the device in real time through a voltage detection circuit or a power monitoring chip, and sends a power abnormality signal to the CPU when the voltage is lower than a set threshold.
4. The method for warning a power failure of a gateway device according to claim 1, characterized in that: In step d), the CPU makes multiple determinations based on the received signal to ensure the accuracy of the detection result, and then triggers an interrupt signal to start the power-off alarm process.
5. The method for warning a power failure of a gateway device according to claim 1, characterized in that: Step e), the driver sends an SNMP alarm package through the socket interface, and the SNMP alarm package includes device ID, power failure time, device location and current status information.
6. The method for warning a power failure of a gateway device according to claim 1, characterized in that: Step f), SNMP alarm packets are sent via TCP / IP protocol, so that the alarm information can be reliably transmitted and received by the monitoring center in real time. The alarm packets contain predefined device status information and fault types.
7. The method for warning a power failure of a gateway device according to claim 1, characterized in that: Step g), after receiving the alarm information, the receiving terminal immediately starts the preset emergency processing mechanism to notify the maintenance personnel, start the backup power supply or perform data backup.
8. The method for warning a power failure of a gateway device according to claim 1, characterized in that: The driver automatically initializes the alarm parameters when the device is powered on, and sends the alarm packet to the specified IP and port through the network interface after a power failure event occurs, so that the alarm information can be sent smoothly in the event of power anomalies.