Data notification method of network equipment, storage medium and electronic equipment

By using GPIO ports to connect the switch module and the charging and discharging module in network equipment, the data flow is detected in real time and alarms are triggered, which solves the problem of network equipment not being able to alert in time when power is out of power or network, and realizes timely detection and rapid positioning of abnormal situations , improves the stability of network services.

CN119155222AInactive Publication Date: 2024-12-17UNIPOE IOT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411614857.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Network equipment cannot transmit abnormal situations in a timely manner when power is cut off or network is cut off, making it difficult for operation and maintenance personnel to quickly locate faults, delay fault processing time, and affect the stability of network services.

Method used

By connecting the switch module and the charge and discharge module to the GPIO port of the network device, the port data flow can be detected in real time. If it is lower than the preset threshold, the low level will be output to close the switch module, trigger the alarm device, and send notification messages to achieve abnormal situations. timely alarm and positioning.

Benefits of technology

It realizes timely detection and rapid positioning of network equipment abnormalities, reduces the difficulty of network operation and maintenance, reduces the time to deal with faults, and improves the stability of network services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155222A_ABST
    Figure CN119155222A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network equipment fault detection, in particular to a data notification method of network equipment, which comprises the following steps: detecting data traffic of each port of the network equipment, presetting a traffic threshold value, comparing the traffic threshold value with the data traffic of each port, and judging whether the data traffic of each port is in a normal working range or not. According to the technical scheme of the invention, whether the network equipment is powered off and network is cut off is judged through the Gpio port, and then the gpio port outputs a high level or a low level to control the opening or closing of the switch module so as to control the alarm equipment to give an alarm or be closed, so that the network abnormity can be found in time, the loss caused by the network abnormity is effectively reduced, and the network operation and maintenance difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network equipment failure detection, and in particular to a data notification method for network equipment. Background Art

[0002] With the development of society and the continuous advancement of Internet technology, the network environment has become more and more popular, and the number of network devices has also increased. Network devices play an important role in many scenarios such as data centers, offices, and homes. However, during the operation of network devices, power outages or network disconnections may occur, which will directly affect the normal operation of the network and the continuity of services.

[0003] Currently, when network equipment loses power or the Internet, it is often unable to promptly transmit abnormal conditions to surrounding devices or directly reflect them. This problem causes maintenance personnel or operators to be unable to promptly discover faults and take countermeasures, thus delaying the time for fault handling and affecting the stability of network services.

[0004] Although some devices can immediately show the phenomenon of network disconnection when the power is off, due to the lack of a clear alarm mechanism, it is difficult for operation and maintenance personnel to quickly locate which device has failed. For example, in a data center or office, multiple switches, routers and other devices are usually deployed. Once a power outage or network disconnection occurs, the operation and maintenance personnel need to check one by one to find the source of the fault, which is not only time-consuming and labor-intensive, but also reduces the efficiency of fault handling.

[0005] In order to solve the above problems, a network device alarm mechanism is needed that can timely transmit abnormal information and quickly locate faulty devices. Summary of the invention

[0006] The present invention aims to solve the problems in the prior art and provides a data notification method for network equipment, which can timely discover network anomalies, effectively reduce the losses caused by network anomalies, and reduce the difficulty of network operation and maintenance.

[0007] In order to solve the above technical problems, the first aspect of the present invention discloses the following technical solution: a data notification method for a network device, wherein a GPIO port of the network device is connected to a switch module and a charge and discharge module, and the data notification method comprises the following steps: Read the status of each port of the network device's transmission traffic. If the port is in a connected state, the port's data traffic will be recorded in real time; A threshold value of data flow of a preset port is set, and the real-time data flow of the port is compared with the preset threshold value; If the real-time data flow of the port is greater than or equal to the preset threshold, it means that the network device is working normally, so the gpio port of the network device outputs a high level to disconnect the switch module and turn off the alarm device connected to the switch module; If the real-time data flow of the port is less than the preset threshold, it means that the network device is disconnected, and the GPIO port of the network device is made to output a low level to close the switch module and cause the alarm device connected to the switch module to sound an alarm; During the period when the switch module is closed and the charge-discharge module discharges to the gpio port of the network device, the network device sends a notification message to the external management device.

[0008] Preferably, the method further comprises the following: The time interval for reading the status of each port of the transmission traffic of the network device is 2s.

[0009] Preferably, each port of the network device is compared with a preset threshold one by one to form a loop port detection; when the data flow of one of the ports is lower than the preset threshold and the gpio port outputs a low level, the current loop port detection is terminated.

[0010] Preferably, the switch module includes a relay, a resistor R239 and a resistor R240; Pin 8 of the relay is connected to the external power supply, pin 1 of the relay is connected to the gpio port of the network device through resistor R239, and pin 1 of the relay is connected to the ground through resistor R240 at the same time; when the circuit is in working state, the external power supply flows to the gpio port and ground of the network device through the relay, when the gpio port of the network device outputs a high level and is in a disconnected state for a short period of time, when the gpio port of the network device outputs a low level, the relay is in a closed state.

[0011] Preferably, the charging and discharging module includes a resistor R96, a resistor R98 and a capacitor C102; The resistor R96, the resistor R98 and the capacitor C102 form an RC series-parallel circuit, and the connection point between the capacitor C102 and the resistor R96 is connected to the gpio port of the network device.

[0012] A second aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the data notification method of the above network device.

[0013] A third aspect of the present invention discloses an electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to execute the data notification method of the network device as described above.

[0014] Beneficial effects of the present invention: The present invention provides a data notification method for a network device, which detects the data flow of each port of the network device and presets a flow threshold to compare with the data flow of each port, and then determines whether the network device is powered off or disconnected from the network by whether the data flow of the port is within the normal working range, and then controls the opening or closing of the switch module by outputting a high level or a low level through the GPIO port to control the alarm device to sound an alarm or close. Therefore, the present invention can timely discover network anomalies, effectively reduce the losses caused by network anomalies, and reduce the difficulty of network operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flow chart of the present invention; Figure 2 is a circuit schematic diagram of the switch module of the present invention; Figure 3 It is a circuit schematic diagram of the charge and discharge module of the present invention; Figure 4 It is a logic diagram of the present invention. DETAILED DESCRIPTION

[0016] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with the embodiments and drawings, and the contents mentioned in the embodiments are not intended to limit the present invention. The present invention is described in detail below in conjunction with the drawings.

[0017] Embodiment 1: This embodiment provides a data notification method for a network device, such as Figures 1 to 4 The gpio port of the network device is connected to a switch module and a charge and discharge module, and the data notification method includes the following steps: A. Read the status of each port of the network device's transmission traffic. If the port is in a connected state, the port's data traffic will be recorded in real time; B. Preset a threshold value of the data flow of the port, and compare the real-time data flow of the port with the preset threshold value; C. If the real-time data flow of the port is greater than or equal to the preset threshold, it means that the network device is working normally, then the gpio port of the network device is made to output a high level to make the switch module disconnected and the alarm device connected to the switch module closed; if the real-time data flow of the port is less than the preset threshold, it means that the network device is disconnected, then the gpio port of the network device is made to output a low level to make the switch module closed and the alarm device connected to the switch module alarmed; D. When the switch module is closed and the charge-discharge module discharges to the gpio port of the network device, the network device sends a notification message to the external management device.

[0018] Specifically, this embodiment can use the controller and control module of the network device to realize the transmission control of the signal, and can also be realized by an external controller, which is not limited in this embodiment. The function of recording the data of each port by transmitting the network device flow is used to record the flow of the port when the network device is working normally. When the flow on the port for a period of time is lower than the preset threshold, the gpio port of the network device control device outputs a low level, so that the relay is closed to achieve the effect of the external alarm device alarming; when the port flow is higher than the set threshold, the gpio port of the network device control device outputs a high level, so that the relay is disconnected to achieve the effect of closing the external alarm device. The relay closure is realized by a low level, so the network device will always be transmitted to the external alarm device in the form of an alarm when the power is abnormally cut off. Secondly, the network device uses the charging and discharging characteristics of the capacitor and the transient state of the RC circuit when the power is abnormally cut off, and transmits the snmp trap message to the surrounding snmp agent or snmp management in the last few seconds of the network device to inform that the device has been powered off. Finally, the network device can report the status in real time through the data message transmission between the cloud platform and the database. When the port message information uploaded by the network device is disconnected and the port flow is lower than the set threshold, the port alarm information can be recorded through the cloud platform alarm or database. In addition, this embodiment can solve the problem that when an abnormality occurs in a network device in a network environment, it is impossible to quickly know the abnormality and quickly determine the source of the abnormality, so that the network abnormality can be discovered in time, the source of the abnormality can be quickly determined, and the loss caused by the network abnormality can be effectively reduced, and the difficulty of network operation and maintenance can be reduced.

[0019] Furthermore, most of the chips of current network devices have built-in management functions, and devices without management functions can also add management functions in the form of external MCUs. Based on the management function of network devices, data notification solutions are implemented by modifying software and hardware. Taking advantage of the characteristics of data storage and forwarding of network devices, a process for monitoring port traffic is created. The UP state of the port is read at intervals of 2 seconds, and the traffic of the port in the UP state (connected state) of the network device is recorded. The software compares the ports one by one according to the port link interruption alarm configured by the user. When the port is configured with a link interruption alarm, the GPIO is controlled to output a low level and the cycle detection ends; when the port is in the UP state, the traffic value recorded by the network device is continued to be judged according to the traffic alarm value configured by the user. When the traffic is lower than the set minimum value, GPIO29 is controlled to output a low level; when the traffic is higher than or equal to the set minimum value, GPIO29 is controlled to output a high level.

[0020] The switch module of this embodiment includes a relay, a resistor R239 and a resistor R240, and the specific connection method is as follows Figure 2As shown. The 8th pin of relay HFD42 / 4.5 is connected to VDDH3 (3.3V), the 1st pin of relay HFD42 / 4.5 is connected to GPIO29 through R239, and the 1st pin of relay HFD42 / 4.5 is connected to the ground through R240 at the same time. When the circuit is in working state, 3.3V flows to GPIO29 and the ground through HFD42 / 4.5. When GPIO29 outputs a high level, HFD42 / 4.5 is in the open state, and when GPIO29 outputs a low level, HFD42 / 4.5 is in the closed state, and R240 plays a shunt role.

[0021] The charging and discharging module of this embodiment includes a resistor R96, a resistor R98 and a capacitor C102, and also includes other auxiliary components. The specific connection method is as follows: Figure 3 As shown. Resistors R96, R98 and C102 form an RC series-parallel circuit. The connection between capacitor C102 and resistor R96 is connected to the gpio port of the network device, that is, PWRMON is connected to the gpio port of the network device. The network device monitors the stability of the device power supply. When the response in the transient process of the circuit enters a zero input response, the network device monitors the change rapidly and sends out an SNMP TRAP message to inform the network environment that the device is offline.

[0022] Based on the detection and control of the above signals and combined with hardware, it is then connected to the cloud platform and database, and by reporting the port information, the alarm information of port disconnection and port traffic below the set threshold is given to the cloud platform or database.

[0023] More specifically, if Figure 4 As shown, the logical control relationship of this embodiment is: At present, network devices will perform store-and-forward operations on the data on the port. Based on this action, we create a process to monitor the port and port traffic. After the process is created, perform the following operations at a periodic interval of 2 seconds: Read the link interruption alarm configuration of the port (including the switch module, the charge and discharge module, and the alarm device), and obtain the port alarm flag and the port connection status. When the port alarm flag is disconnected (down) or the port connection status is not connected (up) (or operation, any one of the two conditions is true), perform an AND operation with the link interruption alarm configuration of the port (and operation, both of the two conditions are true). When the AND operation is 1, that is, the AND operation is true, the type of the alarm flag of the port is identified as a link interruption alarm. After the alarm type is identified, the serial port (Serial) notifies the user of the down alarm in the form of a log locally. The notification method here includes but is not limited to alarms such as web, http, https, SSH, telnet, SNMP, and cloud platform.

[0024] After the notification, the GPIO is controlled to output a high level by a hardware alarm (sound alarm, light alarm, sound and light alarm), and then a delay of 2 seconds is made before the GPIO is controlled to output a low level (pulse alarm), and then the next round of detection is carried out. The operation of delaying 2 seconds before controlling the GPIO to output a low level can be omitted here, and the hardware alarm will continue to alarm (i.e., the relay is normally closed alarm). Among them, the port alarm flag is a flag generated when the physical connection of the port changes. This flag is generated by using the port connection properties that are basically possessed by network devices. When the port connection property changes to disconnected, the port alarm flag will change to disconnected; the port connection status is an attribute or identifier of the network device management port status. The identifiers include administrator disconnection (A-down), loop (lookback), blocking (block), and prohibition (disable), which are the management status of the second-layer operation of the network device; When the above link interruption alarm is not generated, continue to read the traffic alarm enablement status and traffic alarm threshold configuration of the port inlet direction, obtain the current traffic status of the port inlet direction (it can also be the past few seconds or minutes), if the port traffic alarm enablement status is enabled, and the port current traffic is lower than the set traffic alarm threshold (and operation), the alarm type will be marked as traffic alarm, and then the alarm will be implemented in the way of the above link interruption alarm. The traffic alarm in the port egress direction is consistent with the traffic alarm in the inlet direction.

[0025] Embodiment 2:

[0026] This embodiment discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the data notification method of a network device described in the first embodiment.

[0027] Embodiment three:

[0028] This embodiment discloses an electronic device, wherein the electronic device includes: a processor; and a memory arranged to store computer executable instructions (program code), the memory may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory has a storage space for storing program codes for executing any method steps in the embodiment. For example, the storage space for program codes may include various program codes for implementing various steps in the above method respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is generally a computer-readable storage medium of embodiment 4. The computer-readable storage medium may have storage units such as storage segments and storage spaces arranged similarly to the memory in the electronic device of this embodiment. The program code may be compressed, for example, in an appropriate form. Generally, the storage unit stores program codes for executing the method steps according to the present invention, that is, program codes that can be read by a processor such as, when these program codes are run by the electronic device, the electronic device performs the various steps in the method described above.

[0029] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention is disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes by using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent changes and modifications made to the above embodiments according to the technology of the present invention are within the scope of the technical solution of the present invention without departing from the content of the technical solution of the present invention.

Claims

1. A data notification method for a network device, characterized in that: The gpio port of the network device is connected to a switch module and a charge and discharge module, and the data notification method includes the following steps: Read the status of each port of the network device's transmission traffic. If the port is in a connected state, the port's data traffic will be recorded in real time; A threshold value of data flow of a preset port is set, and the real-time data flow of the port is compared with the preset threshold value; If the real-time data flow of the port is greater than or equal to the preset threshold, it means that the network device is working normally, so the gpio port of the network device outputs a high level to disconnect the switch module and turn off the alarm device connected to the switch module; If the real-time data flow of the port is less than the preset threshold, it means that the network device is disconnected, and the GPIO port of the network device is made to output a low level to close the switch module and cause the alarm device connected to the switch module to sound an alarm; During the period when the switch module is closed and the charge-discharge module discharges to the gpio port of the network device, the network device sends a notification message to the external management device.

2. A data notification method for a network device according to claim 1, characterized in that: Also includes the following methods: The time interval for reading the status of each port of the transmission traffic of the network device is 2s.

3. The data notification method of a network device according to claim 1, characterized in that: Each port of the network device is compared with the preset threshold one by one to form a circular port detection; when the data flow of one of the ports is lower than the preset threshold and the gpio port outputs a low level, the circular port detection is terminated.

4. The data notification method of a network device according to claim 1, characterized in that: The switch module includes a relay, a resistor R239 and a resistor R240; Pin 8 of the relay is connected to the external power supply, pin 1 of the relay is connected to the gpio port of the network device through resistor R239, and pin 1 of the relay is also connected to the ground through resistor R240; when the circuit is in working state, the external power supply flows to the gpio port and ground of the network device through the relay, when the gpio port of the network device outputs a high level and is in a disconnected state for a short period of time, when the gpio port of the network device outputs a low level, the relay is in a closed state.

5. The data notification method of a network device according to claim 1, characterized in that: The charging and discharging module includes a resistor R96, a resistor R98 and a capacitor C102; The resistor R96, the resistor R98 and the capacitor C102 form an RC series-parallel circuit, and the connection point between the capacitor C102 and the resistor R96 is connected to the gpio port of the network device.

6. A computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the data notification method according to any one of claims 1 to 5.

7. An electronic device, wherein: The electronic device comprises: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the data notification method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Communication equipment and power failure alarming method

    CN102307367A

  • Outage and network breakage fault detection and report system

    CN110837062A

  • Switch traffic abnormality alarm method and device

    CN111106961A

  • Service flow alarm method and device based on intelligent substation switch

    CN111865822A

  • OLT equipment offline intelligent diagnosis method and system

    CN112636944A