CN115941535A - Network connection state monitoring method and device of network equipment - Google Patents

Network connection state monitoring method and device of network equipment Download PDF

Info

Publication number
CN115941535A
CN115941535A CN202211573771.0A CN202211573771A CN115941535A CN 115941535 A CN115941535 A CN 115941535A CN 202211573771 A CN202211573771 A CN 202211573771A CN 115941535 A CN115941535 A CN 115941535A
Authority
CN
China
Prior art keywords
offline
target network
network
target
network equipment
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.)
Pending
Application number
CN202211573771.0A
Other languages
Chinese (zh)
Inventor
张博雅
刘岩
王尧
王海洋
王佐之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211573771.0A priority Critical patent/CN115941535A/en
Publication of CN115941535A publication Critical patent/CN115941535A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network connection state monitoring method and device of network equipment. Wherein, the method comprises the following steps: periodically detecting the network connection state of the target network equipment according to an internet control message protocol; when the number of times of the target network equipment for carrying out the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, detecting the network connection state of the target network equipment according to a transmission control protocol; when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and offline time of the target network device. The method and the device solve the technical problem that in the related technology, a maintainer cannot timely know the network connection state of the network equipment.

Description

Network connection state monitoring method and device of network equipment
Technical Field
The present application relates to the field of network monitoring technologies, and in particular, to a method and an apparatus for monitoring a network connection state of a network device.
Background
At present, the functions of the information communication network devices are increasingly perfect, and the networking is increasingly complex, the management and monitoring of the devices become necessary means for ensuring the stable and normal operation of the devices, wherein the monitoring of the bottom layer communication network devices is the core and the foundation of the whole monitoring and management system.
However, the current communication network device lacks of alarm and log information related to the system running state due to imperfect monitoring management, so that the maintenance personnel cannot accurately grasp the running state of the device, and the device operation cannot meet the stability and safety requirements necessary for users. Especially, when the network device fails to work and causes network interruption, a maintenance person on the same line cannot timely know the information that the network device fails to work, and cannot rapidly process the failure, so that the user breaks the network for a long time, and the user experience is greatly influenced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a network connection state monitoring method and device for network equipment, and aims to at least solve the technical problem that in the related art, a maintainer cannot timely know the network connection state of the network equipment.
According to an aspect of an embodiment of the present application, there is provided a network connection status monitoring method for a network device, including: periodically detecting the network connection state of the target network equipment according to an internet control message protocol; when the number of times of internet control message protocol communication overtime of the target network equipment is continuously detected to exceed a first preset threshold value, detecting the network connection state of the target network equipment according to a transmission control protocol; when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
Optionally, when it is detected that the target network device is restored from the offline state to the online state, a network restoration notification message is sent to the target terminal, where the network restoration notification message at least includes device information of the target network device, network restoration time, and offline duration.
Optionally, before the network connection state of the target network device is periodically detected according to the internet control packet protocol, device information of the target network device is obtained from the database, where the device information includes: device name, device identification, and historical offline information of the target network device.
Optionally, periodically detecting the network connection state of the target network device according to the internet control packet protocol includes: and periodically calling a first thread to execute a first overtime detection subprogram, wherein the first overtime detection subprogram is used for detecting whether the Internet control message protocol communication overtime occurs in the target network equipment.
Optionally, detecting the network connection status of the target network device according to the tcp includes: and calling a second thread to execute a second overtime detection subprogram, wherein the second overtime detection subprogram is used for detecting whether the transmission control protocol communication overtime occurs in the target network equipment.
Optionally, before sending the offline notification message to the target terminal, updating a security identifier in a browser interface in the monitoring terminal according to the offline notification message, and generating offline log information, where the offline log information includes device information and offline time of the target network device; and updating the network connection state of the target network equipment in the database, and writing offline log information into a log table of the database.
Optionally, before sending the network recovery notification message to the target terminal, determining an offline duration according to the offline time and the network recovery time of the target network device, and generating network recovery log information, where the network recovery log information at least includes device information of the target network device, the network recovery time, and the offline duration; updating the network connection state of the target network equipment in the database, and writing the network recovery log information into a log table of the database; and updating the security identifier in the browser interface in the monitoring terminal according to the network recovery notification message.
According to another aspect of the embodiments of the present application, there is also provided a network connection status monitoring apparatus for a network device, including: the first detection module is used for periodically detecting the network connection state of the target network equipment according to the Internet control message protocol; the second detection module is used for detecting the network connection state of the target network equipment according to the transmission control protocol when the number of times of the target network equipment for overtime internet control message protocol communication exceeds a first preset threshold value is continuously detected; the determining module is used for determining that the target network equipment is offline when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value; and the notification module is used for sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, where the non-volatile storage medium includes a stored program, and a device in which the non-volatile storage medium is located executes the above-mentioned network connection state monitoring method for a network device by running the program.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory in which a computer program is stored, and a processor configured to execute the network connection state monitoring method of the network device described above by the computer program.
In the embodiment of the application, the network connection state of the target network equipment is detected periodically according to an internet control message protocol, when the number of times of the target network equipment for generating the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, the network connection state of the target network equipment is detected according to a transmission control protocol, and when the number of times of the target network equipment for generating the transmission control protocol communication overtime exceeds a second preset threshold value is continuously detected, the target network equipment is determined to be offline; and then sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and offline time of the target network device. The network connection state of the target network equipment is subjected to double detection through an internet control message protocol and a transmission control protocol, so that the accuracy of a detection result is ensured; meanwhile, when the target network equipment is detected to be offline, an offline notification message is sent to a target terminal of a maintainer in time, so that the technical problem that the maintainer cannot know the network connection state of the network equipment in time in the related technology is effectively solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of an alternative network connection status monitoring method for a network device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an optional offline notification reminder interface of a target terminal according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative recovery notification alert interface of a target terminal according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an alternative network connection status monitoring apparatus of a network device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For better understanding of the embodiments of the present application, the partial terms or term translations appearing during the description of the embodiments of the present application are explained as follows:
transmission Control Protocol (TCP): is a connection-oriented, reliable, byte-stream based transport-layer communication protocol that is intended to accommodate layered protocol hierarchies that support multi-network applications. Reliable communication services are provided by means of TCP between pairs of processes in host computers connected to different but interconnected computer communication networks.
Internet Control Message Protocol (ICMP): is a subprotocol of TCP/IP protocol cluster, which is used to transfer control message between IP host and router. The control messages refer to messages of the network itself, such as network failure, whether a host is reachable, whether a route is available, and the like, and the control messages play an important role in the transmission of user data although not transmitting the user data.
ACK (acknowledgement character): the transmission control character is used to indicate that the data sent from the receiving station has been received correctly, and is generally returned to the sending station by the receiving station. Generally, in the TCP/IP protocol, if the receiving side successfully receives the data, an ACK message is replied, wherein the ACK message has a fixed format and a fixed length.
Example 1
According to an embodiment of the present application, there is provided a network connection status monitoring method for a network device, it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that here.
Fig. 1 is a schematic flowchart of an optional network connection status monitoring method for a network device according to an embodiment of the present application, where as shown in fig. 1, the method at least includes steps S102-S108, where:
step S102, the network connection state of the target network device is periodically detected according to the Internet control message protocol.
Wherein, a clock mode can be adopted for periodically starting tasks.
As an optional implementation manner, before periodically detecting the network connection state of the target network device according to the internet control packet protocol, device information of the target network device may be further obtained from the database, where the device information includes: device name, device identification, and historical offline information of the target network device.
Optionally, after the device information of the network device is acquired, the first thread may be periodically invoked to execute the first timeout detecting sub-program, so as to detect whether the internet control message protocol communication timeout occurs in the target network device through the first timeout detecting sub-program.
Generally, an ICMP message is encapsulated in an IP packet, and the ICMP message, which is an aid to the IP protocol, may operate at the network layer. There is a field called TTL (Time To Live) in the IP packet To prevent the IP packet from being forwarded endlessly on the network when the router control encounters a problem and a loop condition occurs. The value is decremented by 1 for each pass through a router until the value is 0, indicating that the IP packet is discarded, and at the same time, the IP router sends an ICMP timeout message to the sender host, informing that the IP packet is discarded.
ICMP may be used in the IP protocol for sending control messages, i.e. ICMP sends information according to the IP protocol. Therefore, ICMP can be divided into two main functions, one is to determine whether an IP packet can successfully reach a target address, and the other is to diagnose a network, where two terminal programs using ICMP data packets are Ping and Traceroute, respectively, the Traceroute program is used to display a possible path between two network devices and measure a delay of the data packet on the IP network, and the Ping program is a simplified version of the Traceroute program, and thus, the Ping program is usually used in practical applications.
Ping is a common tool for detecting network connectivity, and can also collect other relevant information such as time consumed by a report packet arriving at a receiving end and returning to a sending end, so that the Ping operation principle is to send an ICMP Echo request message to the receiving end, wait for the response of the ICMP Echo response message, and judge whether the receiving end network can be reached according to whether the Echo response message is received.
In addition, the user may customize different parameters in the Ping command, such as ICMP message length, number of ICMP messages sent, timeout time waiting for reply response, etc., and the network device may construct and send an ICMP message according to the configuration parameters, and perform the Ping test, where the output information in the Ping command includes: the receiver address, the length of the ICMP message, the sequence number, the TTL value and the round trip time, wherein the sequence number is contained in the variable parameter field in the ICMP Echo reply message, and the TTL and the round trip time are contained in the IP data packet head of the message. Different purposes that can be realized when the Ping command configures different parameters can be visually shown through table 1.
TABLE 1
Figure BDA0003989120710000051
/>
Figure BDA0003989120710000061
And step S104, when the number of times of the target network equipment for generating the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, detecting the network connection state of the target network equipment according to the transmission control protocol.
For example, if the first timeout detection subroutine executed by the first thread detects that the timeout times of the internet control message protocol communication of the target network device exceed 10 times, the device information of the target network device is sent to another thread for detection.
Specifically, a second thread is called to execute a second timeout detection subroutine, where the second timeout detection subroutine is used to detect whether a transmission control protocol communication timeout occurs in the target network device.
Generally, in the communication process of the TCP protocol, a receiving end of the TCP returns a series of acknowledgement information to determine whether an error occurs, and once a packet loss occurs, a timeout retransmission operation needs to be started to retransmit data that has not been acknowledged. Therefore, retransmission is an important mechanism for ensuring data reliability in the TCP protocol (i.e., transmission control protocol).
There are two ways for TCP retransmission, one is time-based and the other is acknowledgement information, that is, the TCP protocol acknowledgement and retransmission are based on the premise that the data packet is acknowledged or not. Therefore, when TCP sends a message, it starts a retransmission timer, which can be divided into the following two cases: firstly, when an ACK (acknowledge character) message of a specific message is received before the timer is overtime, the timer is cancelled; secondly, if the ACK (acknowledgement character) message of a specific message is not received before the timer expires, the data message needs to be retransmitted, and the timer is reset, where the expiration of the timer is generally called Retransmission Timeout (RTO).
In practical application, a proper RTO is required to be set, so that the waste of network equipment resources can be effectively reduced, and if the RTO is too small, part of data messages are likely to be congested or the network is not good and has larger delay, so that unnecessary retransmission operation is caused; if the RTO is too large, the sending end needs to wait for a long time to find the data loss, thereby affecting the network transmission efficiency. Therefore, it is necessary to adaptively adjust the RTO according to the RTT (Round-Trip Time) in the network in combination with the actual network condition.
And step S106, when the number of times of the transmission control protocol communication timeout of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline.
For example, when the second timeout detecting subroutine executed by the second thread detects that the number of times of timeout of transmission control protocol communication of the target network device exceeds 15, the target network device is determined to be offline.
Step S108, sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
The target terminal may be, but not limited to, a mobile phone, a computer, or the like.
For example, fig. 2 shows a schematic diagram of an optional offline notification reminding interface of the target terminal, and as can be seen from fig. 2, a user can view information such as a device name, a device IP address, and device offline time of the target network device through the target terminal, thereby effectively improving the efficiency of device monitoring.
As an optional implementation manner, before sending the offline notification message to the target terminal, the device information of the target network device may also be sent to the message pushing module, the log module, and the data operation gateway.
Specifically, the message pushing module firstly sorts the offline notification messages and then accesses a Web SID API interface, updates Security Identifiers (SIDs) in a browser interface in the monitoring terminal according to the offline notification messages, and generates offline log information, where the offline log information includes device information and offline time of the target network device; then, the log module sorts the related information and sends the information to the database operation gateway; and finally, the database operation gateway updates the network connection state of the target network equipment in the database and writes offline log information into a log table of the database.
Optionally, when it is detected that the target network device is restored from the offline state to the online state, a network restoration notification message is sent to the target terminal, where the network restoration notification message at least includes device information of the target network device, network restoration time, and offline duration.
For example, fig. 3 shows a schematic diagram of an optional offline notification reminding interface of the target terminal, and as can be seen from fig. 3, a user can view information such as a device name, a device IP address, a network recovery time, and a device offline duration of the target network device through the target terminal.
As another optional implementation, before sending the network recovery notification message to the target terminal, the offline duration may also be determined according to the offline time and the network recovery time of the target network device, and network recovery log information is generated and stored in the log module, where the network recovery log information at least includes the device information, the network recovery time, and the offline duration of the target network device; then, the data operation gateway updates the network connection state of the target network equipment in the database and writes the network recovery log information into a log table of the database; and finally, the message pushing module updates the security identifier in the browser interface in the monitoring terminal according to the network recovery notification message.
In the embodiment of the application, the network connection state of the target network equipment is detected periodically according to an internet control message protocol, when the number of times of the target network equipment for generating the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, the network connection state of the target network equipment is detected according to a transmission control protocol, and when the number of times of the target network equipment for generating the transmission control protocol communication overtime exceeds a second preset threshold value is continuously detected, the target network equipment is determined to be offline; and then sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and offline time of the target network device. The network connection state of the target network equipment is subjected to double detection through an internet control message protocol and a transmission control protocol, so that the accuracy of a detection result is ensured; meanwhile, when the target network equipment is detected to be offline, the offline notification message is sent to the target terminal of the maintainer in time, and the technical problem that the maintainer cannot know the network connection state of the network equipment in time in the related technology is effectively solved.
Example 2
According to an embodiment of the present application, there is further provided a network connection status monitoring apparatus of a network device for implementing the network connection status monitoring method of the network device in embodiment 1, as shown in fig. 4, the network connection status monitoring apparatus of the network device at least includes a first detecting module 41, a second detecting module 42, a determining module 43 and a notifying module 44, where:
the first detecting module 41 is configured to periodically detect a network connection status of the target network device according to an internet control packet protocol.
As an optional implementation manner, before periodically detecting the network connection state of the target network device according to the internet control packet protocol, the first detecting module 41 may further obtain device information of the target network device from a database, where the device information includes: device name, device identification, and historical offline information of the target network device.
Optionally, after acquiring the device information of the network device, the first detecting module 41 may execute a first timeout detecting sub-routine by periodically calling a first thread, so as to detect whether an internet control messaging protocol communication timeout occurs in the target network device through the first timeout detecting sub-routine
The second detecting module 42 is configured to detect a network connection status of the target network device according to the tcp when the number of times of timeout of the tcp communication of the target network device is continuously detected to exceed a first preset threshold.
Alternatively, the second detection module 42 may invoke a second thread to execute a second timeout detection subroutine to detect whether a transmission control protocol communication timeout occurs for the target network device.
And a determining module 43, configured to determine that the target network device is offline when it is continuously detected that the number of times of timeout of tcp communication occurring in the target network device exceeds a second preset threshold.
For example, when the second timeout detecting subroutine executed by the second thread detects that the number of times of the transmission control protocol communication timeout of the target network device exceeds 15 times, the determining module 43 determines that the target network device is offline.
And the notification module 44 is configured to send an offline notification message to the target terminal, where the offline notification message at least includes device information of the target network device and offline time.
As an optional implementation manner, before sending the offline notification message to the target terminal, the notification module 44 may further update the security identifier in the browser interface in the monitoring terminal according to the offline notification message, and generate offline log information, where the offline log information includes device information and offline time of the target network device; and updating the network connection state of the target network equipment in the database, and writing offline log information into a log table of the database.
Specifically, when it is detected that the target network device is restored from the offline state to the online state, the notification module 44 may send a network restoration notification message to the target terminal, where the network restoration notification message at least includes device information of the target network device, network restoration time, and offline duration.
In addition, before sending the network recovery notification message to the target terminal, the notification module 44 may further determine an offline duration according to the offline time and the network recovery time of the target network device, and generate network recovery log information, where the network recovery log information at least includes device information of the target network device, the network recovery time, and the offline duration; updating the network connection state of the target network equipment in the database, and writing the network recovery log information into a log table of the database; and updating the security identifier in the browser interface in the monitoring terminal according to the network recovery notification message.
It should be noted that, in the embodiment of the present application, each module in the network connection status monitoring apparatus of the network device corresponds to each implementation step of the network connection status monitoring method of the network device in embodiment 1 one to one, and since the detailed description has been already made in embodiment 1, details that are not partially embodied in this embodiment may refer to embodiment 1, and are not described herein again.
Example 3
According to an embodiment of the present application, a nonvolatile storage medium is further provided, where the nonvolatile storage medium includes a stored program, and a device in which the nonvolatile storage medium is located executes the method for monitoring a network connection state of a network device in embodiment 1 by running the program.
Specifically, the device in which the nonvolatile storage medium is located executes the following steps by executing the program: periodically detecting the network connection state of the target network equipment according to an internet control message protocol; when the number of times of the target network equipment for carrying out the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, detecting the network connection state of the target network equipment according to a transmission control protocol; when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
According to an embodiment of the present application, there is also provided a processor configured to execute a program, where the program executes the network connection state monitoring method of the network device in embodiment 1.
Specifically, the program executes the following steps when running: periodically detecting the network connection state of the target network equipment according to an internet control message protocol; when the number of times of the target network equipment for carrying out the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected, detecting the network connection state of the target network equipment according to a transmission control protocol; when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
According to an embodiment of the present application, there is also provided an electronic device, including: a memory in which a computer program is stored, and a processor configured to execute the network connection state monitoring method of the network device in embodiment 1 by the computer program.
In particular, the processor is configured to implement the following steps by computer program execution: periodically detecting the network connection state of the target network equipment according to an internet control message protocol; when the number of times of internet control message protocol communication overtime of the target network equipment is continuously detected to exceed a first preset threshold value, detecting the network connection state of the target network equipment according to a transmission control protocol; when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, or portions or all or portions of the technical solutions that contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A network connection state monitoring method of a network device is characterized by comprising the following steps:
periodically detecting the network connection state of the target network equipment according to an internet control message protocol;
when the number of times of the target network equipment that the Internet control message protocol communication is overtime exceeds a first preset threshold value is continuously detected, detecting the network connection state of the target network equipment according to a transmission control protocol;
when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold value, determining that the target network equipment is offline;
and sending an offline notification message to a target terminal, wherein the offline notification message at least comprises the device information and offline time of the target network device.
2. The method of claim 1, further comprising:
and when the target network equipment is detected to be restored from the offline state to the online state, sending a network restoration notification message to the target terminal, wherein the network restoration notification message at least comprises the equipment information, the network restoration time and the offline duration of the target network equipment.
3. The method of claim 1, wherein prior to periodically detecting the network connection status of the target network device according to the internet control messaging protocol, the method further comprises:
acquiring the device information of the target network device from a database, wherein the device information comprises: the device name, device identification and historical offline information of the target network device.
4. The method of claim 1, wherein periodically detecting the network connection status of the target network device according to the internet control messaging protocol comprises:
and periodically calling a first thread to execute a first overtime detection subprogram, wherein the first overtime detection subprogram is used for detecting whether the target network equipment generates Internet control message protocol communication overtime or not.
5. The method of claim 4, wherein detecting the network connection status of the target network device according to a transmission control protocol comprises:
and calling a second thread to execute a second overtime detection subprogram, wherein the second overtime detection subprogram is used for detecting whether the transmission control protocol communication overtime occurs in the target network equipment.
6. The method of claim 1, wherein before sending the offline notification message to the target terminal, the method further comprises:
updating a security identifier in a browser interface in a monitoring terminal according to the offline notification message, and generating offline log information, wherein the offline log information comprises the device information and the offline time of the target network device;
and updating the network connection state of the target network equipment in a database, and writing the offline log information into a log table of the database.
7. The method of claim 2, wherein before sending the network recovery notification message to the target terminal, the method further comprises:
determining the offline time according to the offline time and the network recovery time of the target network device, and generating network recovery log information, wherein the network recovery log information at least comprises the device information, the network recovery time and the offline time of the target network device;
updating the network connection state of the target network equipment in a database, and writing the network recovery log information into a log table of the database;
and updating the security identifier in the browser interface in the monitoring terminal according to the network recovery notification message.
8. A network connection status monitoring apparatus of a network device, comprising:
the first detection module is used for periodically detecting the network connection state of the target network equipment according to the Internet control message protocol;
the second detection module is used for detecting the network connection state of the target network equipment according to a transmission control protocol when the number of times of the target network equipment for generating the internet control message protocol communication overtime exceeds a first preset threshold value is continuously detected;
the determining module is used for determining that the target network equipment is off-line when the number of times of transmission control protocol communication overtime of the target network equipment is continuously detected to exceed a second preset threshold;
and the notification module is used for sending an offline notification message to the target terminal, wherein the offline notification message at least comprises the device information and the offline time of the target network device.
9. A nonvolatile storage medium, characterized in that the nonvolatile storage medium includes a stored program, wherein a device in which the nonvolatile storage medium is installed executes the network connection state monitoring method of the network device according to any one of claims 1 to 7 by executing the program.
10. An electronic device, comprising: a memory in which a computer program is stored, and a processor configured to execute the network connection state monitoring method of the network device according to any one of claims 1 to 7 by the computer program.
CN202211573771.0A 2022-12-08 2022-12-08 Network connection state monitoring method and device of network equipment Pending CN115941535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211573771.0A CN115941535A (en) 2022-12-08 2022-12-08 Network connection state monitoring method and device of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211573771.0A CN115941535A (en) 2022-12-08 2022-12-08 Network connection state monitoring method and device of network equipment

Publications (1)

Publication Number Publication Date
CN115941535A true CN115941535A (en) 2023-04-07

Family

ID=86650215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211573771.0A Pending CN115941535A (en) 2022-12-08 2022-12-08 Network connection state monitoring method and device of network equipment

Country Status (1)

Country Link
CN (1) CN115941535A (en)

Similar Documents

Publication Publication Date Title
JP4509545B2 (en) Reliable messaging system with configurable settings
Mills Exterior gateway protocol formal specification
EP1524600B1 (en) A method for providing a reliable distributed failure notification
US6813634B1 (en) Network fault alerting system and method
CN101056194B (en) A SNMP message transfer method and device
WO2011100882A1 (en) Link detecting method, apparatus and system
CN112202635B (en) Link monitoring method and device, storage medium and electronic device
CA2633720A1 (en) A method and system for obtaining path maximum transfer unit in network
CN102263651A (en) Method for detecting connection state of local end equipment in SNMP (simple network management protocol) network management system (NMS)
WO2004030277A2 (en) Monitoring telecommunication network elements
CN114301676B (en) Nondestructive asset detection method and device for power monitoring system and storage medium
CN103036696A (en) Achievement method and system and corresponding device of online business
CN107360020A (en) A kind of Large Volume Data business unit keep-alive system and its application method
CN109873719A (en) A kind of fault detection method and device
US20120327776A1 (en) Alarm Threshold For BGP Flapping Detection
CN102711159A (en) ZigBee protocol-based method and system for processing lost node
CN115941535A (en) Network connection state monitoring method and device of network equipment
CN103999406A (en) Communication path processing method and apparatus
Clark Fault isolation and recovery
CN102394773A (en) Trap message submission method and equipment
CN111049741B (en) Method for improving communication reliability, communication system and terminal equipment
JP3509847B2 (en) Method of improving communication reliability in NMS system and NMS system
Cisco SNMP Inform Requests
CN110099001B (en) Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment
Cisco Stream Control Transmission Protocol (SCTP) Release 1

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