Network connection state monitoring method and device for network equipment

By performing dual detection of Internet Control Message Protocol (ICP) and Transmission Control Protocol (TCP) on network devices, the problem of maintenance personnel being unable to obtain timely information about network device status was solved, enabling timely offline notifications and improving the accuracy of device management and user experience.

CN115941535BActive Publication Date: 2025-12-12CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211573771.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2025-12-12
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

In existing technologies, maintenance personnel cannot obtain the network connection status of network devices in a timely manner, which makes it difficult to quickly handle network device failures and affects user experience.

Method used

By periodically detecting the network connectivity status of network devices, using both Internet Control Message Protocol (ICP) and Transmission Control Protocol (TCP) for dual detection, setting thresholds to determine the offline status of devices, and promptly sending offline notification messages to terminals.

Benefits of technology

Ensuring the accuracy of test results and promptly notifying maintenance personnel of equipment offline status improves the efficiency of equipment monitoring and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941535B_ABST
    Figure CN115941535B_ABST
Patent Text Reader

Abstract

The application discloses a network connection state monitoring method and device of a network device. The method comprises the following steps: periodically detecting the network connection state of a target network device according to an Internet Control Message Protocol; when the number of times of detecting that the target network device has an Internet Control Message Protocol communication timeout continuously exceeds a first preset threshold, detecting the network connection state of the target network device according to a Transmission Control Protocol; when the number of times of detecting that the target network device has a Transmission Control Protocol communication timeout continuously exceeds a second preset threshold, determining that the target network device is offline; and sending an offline notification message to a target terminal, wherein the offline notification message at least comprises device information and an offline time of the target network device. The application solves the technical problem that maintenance personnel cannot learn the network connection state of a network device in time in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the network monitoring technical field, in particular to a network connection state monitoring method and device of network equipment. BACKGROUND

[0002] In today's information communication network equipment function is increasingly perfect, networking is increasingly complex, the management and monitoring of the device has become a necessary means to ensure the stable and normal operation of the device, and the monitoring of the underlying communication network equipment is the core and basis of the whole monitoring management system.

[0003] However, the current communication network equipment lacks perfect monitoring management and relevant log information of alarm and system running state, so that the maintenance personnel cannot accurately master the running state of the equipment, and the equipment operation cannot meet the stability and safety requirements required by the user. In particular, when the network equipment fails and causes network interruption, the maintenance personnel on the front line cannot timely obtain the information of the network equipment failure, and cannot quickly handle the failure, resulting in long-time network interruption of the user, which greatly affects the user experience.

[0004] For the above problems, there is no effective solution at present. SUMMARY

[0005] The network connection state monitoring method and device of network equipment provided by the embodiments of the present application can at least solve the technical problem that the maintenance personnel cannot timely obtain the network connection state of the network equipment in the related art.

[0006] According to an aspect of an embodiment of the present application, a network connection state monitoring method of network equipment is provided, comprising: periodically detecting the network connection state of a target network equipment according to the Internet Control Message Protocol; when the number of times of continuously detecting that the target network equipment has Internet Control Message Protocol communication timeout exceeds a first preset threshold, detecting the network connection state of the target network equipment according to the Transmission Control Protocol; when the number of times of continuously detecting that the target network equipment has Transmission Control Protocol communication timeout exceeds a second preset threshold, 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 includes device information of the target network equipment and offline time.

[0007] Optionally, when it is detected that the target network equipment recovers from the offline state to the online state, a network recovery notification message is sent to the target terminal, wherein the network recovery notification message at least includes device information of the target network equipment, network recovery time and offline duration.

[0008] Optionally, before periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol, device information of the target network device is obtained from a database, wherein the device information comprises a device name, a device identifier and historical offline information of the target network device.

[0009] Optionally, periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol comprises periodically invoking a first thread to execute a first timeout detection subprogram, wherein the first timeout detection subprogram is configured to detect whether the target network device has experienced an Internet Control Message Protocol communication timeout.

[0010] Optionally, detecting the network connection state of the target network device according to the Transmission Control Protocol comprises invoking a second thread to execute a second timeout detection subprogram, wherein the second timeout detection subprogram is configured to detect whether the target network device has experienced a Transmission Control Protocol communication timeout.

[0011] Optionally, before sending the offline notification message to the target terminal, a security identifier in a browser interface in the monitoring terminal is updated according to the offline notification message, and offline log information is generated, wherein the offline log information comprises device information and an offline time of the target network device; the network connection state of the target network device in the database is updated, and the offline log information is written into a log table in the database.

[0012] Optionally, before sending the network recovery notification message to the target terminal, an offline duration is determined according to an offline time and a network recovery time of the target network device, and network recovery log information is generated, wherein the network recovery log information comprises at least device information, the network recovery time and the offline duration of the target network device; the network connection state of the target network device in the database is updated, and the network recovery log information is written into a log table in the database; and a security identifier in a browser interface in the monitoring terminal is updated according to the network recovery notification message.

[0013] According to another aspect of the embodiments of the present application, a network connection state monitoring device of a network device is further provided, comprising: a first detection module configured to periodically detect the network connection state of a target network device according to an Internet Control Message Protocol; a second detection module configured to detect the network connection state of the target network device according to a Transmission Control Protocol when the number of times of continuously detecting that the target network device has experienced an Internet Control Message Protocol communication timeout exceeds a first preset threshold value; a determination module configured to determine that the target network device is offline when the number of times of continuously detecting that the target network device has experienced a Transmission Control Protocol communication timeout exceeds a second preset threshold value; and a notification module configured to send an offline notification message to a target terminal, wherein the offline notification message comprises at least device information and an offline time of the target network device.

[0014] According to a further aspect of the embodiments of the present application, there is also provided a non-transitory storage medium comprising a stored program, wherein a device in which the non-transitory storage medium is located executes the network connection state monitoring method of the network device by running the program.

[0015] According to a further aspect of the embodiments of the present application, there is also provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the network connection state monitoring method of the network device by running the computer program.

[0016] In the embodiments of the present application, first, the network connection state of the target network device is detected periodically according to the Internet Control Message Protocol, and when the number of times of detecting that the target network device has Internet Control Message Protocol communication timeout continuously exceeds a first preset threshold, the network connection state of the target network device is detected according to the Transmission Control Protocol, and when the number of times of detecting that the target network device has Transmission Control Protocol communication timeout continuously exceeds a second preset threshold, it is determined that the target network device is offline; then an offline notification message is sent to the target terminal, and the offline notification message at least includes the device information of the target network device and the offline time. Wherein, the network connection state of the target network device is detected by the Internet Control Message Protocol and the Transmission Control Protocol, which ensures the accuracy of the detection result; at the same time, when the target network device is detected to be offline, the offline notification message is sent to the target terminal of the maintenance personnel in time, which effectively solves the technical problem that the maintenance personnel cannot know the network connection state of the network device in time in the related art. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate certain illustrative embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0018] Figure 1 is a flow diagram of an optional network connection state monitoring method of a network device according to an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of an offline notification reminding interface of a target terminal according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a recovery notification reminding interface of a target terminal according to an embodiment of the present application;

[0021] Figure 4 is a structural schematic diagram of an optional network connection state monitoring device of a network device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to better understand the present application, 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. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a list of steps or units need not be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products or devices.

[0024] In order to better understand the embodiments of the present application, first, the following translation explanation is given for some nouns or terms appearing in the description of the embodiments of the present application:

[0025] Transmission Control Protocol (TCP): It is a connection-oriented, reliable, byte stream-based transport layer communication protocol, which is designed to adapt to a layered protocol hierarchy supporting multi-network applications. Reliable communication services are provided between pairs of processes in host computers connected to different but interconnected computer communication networks through TCP.

[0026] Internet Control Message Protocol (ICMP): It is a sub-protocol of the TCP / IP protocol suite, which is used to transmit control messages between IP hosts and routers. Control messages are messages about the network itself, such as whether the network is connected, whether the host is reachable, whether the route is available, etc. These control messages, although not transmitting user data, play an important role in the transmission of user data.

[0027] ACK (Acknowledge character): This is a transmission control character sent by the receiving station to the sending station in data communication. It indicates that the received data has been acknowledged and is generally sent by the receiver to the sender. Typically, in the TCP / IP protocol, if the receiver successfully receives data, it will reply with an ACK message. The ACK message has its own fixed format and length.

[0028] Example 1

[0029] According to an embodiment of this application, a method for monitoring the network connection status of a network device is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] Figure 1 This is a flowchart illustrating an optional network device network connection status monitoring method according to an embodiment of this application, as shown below. Figure 1 As shown, the method includes at least steps S102-S108, wherein:

[0031] Step S102: Periodically detect the network connection status of the target network device according to the Internet Control Message Protocol.

[0032] One approach is to use a clock to periodically start tasks.

[0033] As an optional implementation, before periodically detecting the network connection status of the target network device according to the Internet Control Message Protocol, the device information of the target network device can also be obtained from the database. The device information includes: the device name, device identifier, and historical offline information of the target network device.

[0034] Optionally, after obtaining the device information of the network device, the first timeout detection subroutine can be executed by periodically calling the first thread, thereby detecting whether the target network device has experienced an Internet Control Message Protocol (ICP) communication timeout.

[0035] Generally, ICMP messages are encapsulated in IP packets, and ICMP messages work as an assistant of IP protocol, which can work in network layer. There is a field called TTL (Time To Live) in IP packet, which prevents IP packets from being endlessly forwarded on the network when the router control encounters problems and enters a loop condition. The value is reduced by 1 when passing through a router, and when the value is reduced to 0, it means that the IP packet will be discarded, and at the same time, the IP router sends an ICMP timeout message to the sending host, notifying that the IP packet has been discarded.

[0036] ICMP can be used to send control messages in IP protocol, that is, ICMP sends information according to IP protocol. Therefore, ICMP can be divided into two main functions, one is to confirm whether the IP packet can successfully reach the target address, and the other is to diagnose the network, wherein the two terminal programs using ICMP packets are Ping and Traceroute. The Traceroute program is used to display the possible path between two network devices and measure the time delay of the packet on the IP network, and the Ping program is a simplified version of the Traceroute program, so in actual application, the Ping program is usually used.

[0037] Ping is a commonly used tool for detecting network connectivity, and it can also collect and report other related information such as the time taken by the packet to reach the receiving end and return to the sending end. Therefore, the running principle of Ping is to send an ICMP Echo request message to the receiving end and wait for the response of the ICMP Echo reply message, and according to whether the echo reply message is received, it is judged whether the receiving end network is reachable.

[0038] In addition, users can customize different parameters in the Ping command, such as the length of the ICMP message, the number of sent ICMP messages, the timeout time for waiting for a reply response, etc. Network devices can construct and send ICMP messages according to the configuration parameters and perform Ping testing. The output information in the Ping command includes: receiving end address, ICMP message length, sequence number, TTL value and round-trip time. The sequence number is contained in the variable parameter field of the ICMP Echo reply message, and the TTL and round-trip time are contained in the IP packet header of the message. Different uses can be achieved when different parameters of the Ping command are configured, which can be intuitively shown in Table 1.

[0039] Table 1

[0040]

[0041]

[0042] Step S104, when the number of times of detecting that the target network device has Internet Control Message Protocol communication timeout exceeds the first preset threshold, detecting the network connection state of the target network device according to the Transmission Control Protocol.

[0043] For example, if the first timeout detection subprogram executed in the first thread detects that the number of times of Internet Control Message Protocol communication timeout of the target network device exceeds 10 times, the device information of the target network device is sent to another thread for detection.

[0044] Specifically, the second thread is called to execute the second timeout detection subprogram, and the second timeout detection subprogram is used to detect whether the target network device has Transmission Control Protocol communication timeout.

[0045] Generally, in the communication process of the TCP protocol, a series of confirmation information is returned by the receiving end of the TCP to determine whether an error occurs, and once a packet loss occurs, a timeout retransmission operation needs to be started to retransmit the data that has not been confirmed. Therefore, retransmission is an important mechanism for the TCP protocol (i.e., Transmission Control Protocol) to ensure data reliability.

[0046] There are two ways of TCP retransmission, one is based on time, and the other is based on confirmation information, that is, the confirmation and retransmission of the TCP protocol are based on whether the data message is confirmed. Therefore, when the TCP sends a message, a retransmission timer is started, which can be divided into the following two cases: one is that the ACK (acknowledgment character) message of the specific message is received before the timer expires, and the timer is canceled; two is that the ACK (acknowledgment character) message of the specific message is not received before the timer expires, and the data message needs to be retransmitted, and the timer is reset. The timer timeout is commonly referred to as retransmission timeout (RTO).

[0047] In actual application, setting a suitable RTO can effectively reduce the waste of network device resources. If RTO is too small, there may be unnecessary retransmission operation due to congestion or poor network delay. If RTO is too large, the sending end needs to wait for a long time to find data loss, thereby affecting the network transmission efficiency. Therefore, RTO needs to be adjusted according to the actual network situation and the RTT (Round-Trip Time, transmission round-trip time) in the network.

[0048] Step S106, when the number of times of detecting that the target network device has Transmission Control Protocol communication timeout exceeds the second preset threshold, determining that the target network device is offline.

[0049] For example, when the second timeout detection subprogram executed in the second thread detects that the number of times of transmission control protocol communication timeout of the target network device exceeds 15, it is determined that the target network device is offline.

[0050] In step S108, an offline notification message is sent to the target terminal, wherein the offline notification message at least includes the device information and offline time of the target network device.

[0051] The target terminal can be, but is not limited to, a mobile phone, a computer, etc.

[0052] For example, Figure 2 An optional schematic diagram of an offline notification reminding interface of the target terminal is shown, which is generated by Figure 2 As can be seen, the user can view the device name, device IP address and offline time of the target network device through the target terminal, thereby effectively improving the efficiency of device monitoring.

[0053] As an optional implementation, before the offline notification message is sent to the target terminal, the device information of the target network device can also be sent to a message pushing module, a log module and a data operation gateway.

[0054] Specifically, first, the message pushing module accesses a Web SID API interface after sorting the offline notification message, updates the security identifier (SID) in the browser interface in the monitoring terminal according to the offline notification message, and generates offline log information, wherein the offline log information includes the device information and offline time of the target network device; then, the log module sends the related information to the database operation gateway after sorting; finally, the database operation gateway updates the network connection state of the target network device in the database, and writes the offline log information into the log table of the database.

[0055] Optionally, when it is detected that the target network device is restored from the offline state to the online state, a network recovery notification message is sent to the target terminal, wherein the network recovery notification message at least includes the device information, network recovery time and offline duration of the target network device.

[0056] For example, Figure 3 An optional schematic diagram of an offline notification reminding interface of the target terminal is shown, which is generated by Figure 3 As can be seen, the user can view the device name, device IP address, network recovery time and offline duration of the target network device through the target terminal.

[0057] As another optional implementation, before sending the network recovery notification message to the target terminal, the offline duration can also be determined according to the offline time and the network recovery time of the target network device, and the network recovery log information is generated and stored in the log module, wherein the network recovery log information at least includes the device information of the target network device, the network recovery time and the offline duration; then, the data operation gateway updates the network connection state of the target network device in the database, and writes the network recovery log information into the log table of the database; finally, the message pushing module updates the security identifier in the browser interface in the monitoring terminal according to the network recovery notification message.

[0058] In the embodiments of the present application, first, the network connection state of the target network device is periodically detected according to the Internet Control Message Protocol, and when the number of times of continuously detecting that the target network device has Internet Control Message Protocol communication timeout exceeds the first preset threshold, the network connection state of the target network device is detected according to the Transmission Control Protocol, and when the number of times of continuously detecting that the target network device has Transmission Control Protocol communication timeout exceeds the second preset threshold, it is determined that the target network device is offline; then, an offline notification message is sent to the target terminal, and the offline notification message at least includes the device information of the target network device and the offline time. Wherein, the network connection state of the target network device is detected by Internet Control Message Protocol and Transmission Control Protocol, which ensures the accuracy of the detection result; at the same time, when the target network device is detected to be offline, the offline notification message is sent to the target terminal of the maintenance personnel in time, which effectively solves the technical problem that the maintenance personnel cannot know the network connection state of the network device in time in the related art.

[0059] Embodiment 2

[0060] According to the embodiments of the present application, a network device network connection state monitoring device for implementing the network device network connection state monitoring method in embodiment 1 is also provided, as shown in Figure 4 The network device network connection state monitoring device at least includes a first detection module 41, a second detection module 42, a determination module 43 and a notification module 44, wherein:

[0061] The first detection module 41 is configured to periodically detect the network connection state of the target network device according to the Internet Control Message Protocol.

[0062] As an optional implementation, before periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol, the first detection module 41 can also obtain the device information of the target network device from the database, wherein the device information includes the device name, device identifier and historical offline information of the target network device.

[0063] Optionally, after obtaining the device information of the network device, the first detection module 41 can execute the first timeout detection subprogram by periodically calling the first thread, so as to detect whether the target network device has Internet Control Message Protocol communication timeout by the first timeout detection subprogram.

[0064] The second detection module 42 is configured to, when the number of times of detecting that the target network device has Internet Control Message Protocol communication timeout continuously exceeds the first preset threshold, detect the network connection state of the target network device according to the Transmission Control Protocol.

[0065] Optionally, the second detection module 42 can execute the second timeout detection subprogram by calling the second thread, so as to detect whether the target network device has Transmission Control Protocol communication timeout.

[0066] The determination module 43 is configured to, when the number of times of detecting that the target network device has Transmission Control Protocol communication timeout continuously exceeds the second preset threshold, determine that the target network device is offline.

[0067] For example, when the second timeout detection subprogram executed by the second thread detects that the number of times of detecting that the target network device has Transmission Control Protocol communication timeout exceeds 15 times, the determination module 43 determines that the target network device is offline.

[0068] The notification module 44 is configured to send an offline notification message to the target terminal, wherein the offline notification message at least includes the device information of the target network device and the offline time.

[0069] As an optional implementation, before sending the offline notification message to the target terminal, the notification module 44 can also update the security identifier in the browser interface of the monitoring terminal according to the offline notification message, and generate offline log information, wherein the offline log information includes the device information of the target network device and the offline time; update the network connection state of the target network device in the database, and write the offline log information into the log table of the database.

[0070] Specifically, when it is detected that the target network device is restored from the offline state to the online state, the notification module 44 can send a network recovery notification message to the target terminal, wherein the network recovery notification message at least includes the device information of the target network device, the network recovery time and the offline duration.

[0071] In addition, before sending the network recovery notification message to the target terminal, the notification module 44 can also determine the offline duration according to the offline time and the network recovery time of the target network device, and generate network recovery log information, wherein the network recovery log information at least includes the device information of the target network device, the network recovery time and the offline duration; update the network connection state of the target network device in the database, and write the network recovery log information into the log table of the database; and update the security identifier in the browser interface of the monitoring terminal according to the network recovery notification message.

[0072] It should be noted that each module in the network connection state monitoring apparatus of the network device in the embodiments of the present application corresponds to each implementation step of the network connection state monitoring method of the network device in Embodiment 1. Since Embodiment 1 has been described in detail, the details not embodied in this embodiment can be referred to Embodiment 1, and will not be described in detail here.

[0073] Embodiment 3

[0074] According to the embodiments of the present application, a non-volatile storage medium is also provided, which includes a stored program, wherein the device where the non-volatile storage medium is located executes the network connection state monitoring method of the network device in Embodiment 1 by running the program.

[0075] Specifically, the device where the non-volatile storage medium is located executes the following steps by running the program: periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol; when the number of times of continuously detecting that the target network device occurs Internet Control Message Protocol communication timeout exceeds the first preset threshold, detecting the network connection state of the target network device according to the Transmission Control Protocol; when the number of times of continuously detecting that the target network device occurs Transmission Control Protocol communication timeout exceeds the second preset threshold, determining that the target network device is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least includes the device information of the target network device and the offline time.

[0076] According to the embodiments of the present application, a processor is also provided, which is used to run a program, wherein the program executes the network connection state monitoring method of the network device in Embodiment 1 when running.

[0077] Specifically, the program is run to implement the following steps: periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol; when the number of times of continuously detecting that the target network device has Internet Control Message Protocol communication timeout exceeds a first preset threshold, detecting the network connection state of the target network device according to the Transmission Control Protocol; when the number of times of continuously detecting that the target network device has Transmission Control Protocol communication timeout exceeds a second preset threshold, determining that the target network device is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least includes device information and offline time of the target network device.

[0078] According to the embodiments of the application, an electronic device is also provided, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the network connection state monitoring method of the network device in the embodiment 1 through the computer program.

[0079] Specifically, the processor is configured to execute the following steps through the computer program: periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol; when the number of times of continuously detecting that the target network device has Internet Control Message Protocol communication timeout exceeds a first preset threshold, detecting the network connection state of the target network device according to the Transmission Control Protocol; when the number of times of continuously detecting that the target network device has Transmission Control Protocol communication timeout exceeds a second preset threshold, determining that the target network device is offline; and sending an offline notification message to the target terminal, wherein the offline notification message at least includes device information and offline time of the target network device.

[0080] The above sequence numbers of the embodiments of the application are only for description, and do not represent advantages or disadvantages of the embodiments.

[0081] In the above embodiments of the application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0082] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit division in the above device embodiment is only a logical function division, and there can be another division manner during actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, and can be electrical or other forms.

[0083] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed to multiple units. Part or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0084] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit.

[0085] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, the essential part or contribution to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various program code storage media.

[0086] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered as the protection scope of the present application.

Claims

1. A network connection state monitoring method of a network device, characterized by, The method comprises: periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol; when the number of times of continuously detecting that the target network device has an Internet Control Message Protocol communication timeout exceeds a first preset threshold, detecting the network connection state of the target network device according to the Transmission Control Protocol; when the number of times of continuously detecting that the target network device has a Transmission Control Protocol communication timeout exceeds a second preset threshold, determining that the target network device is offline, wherein the Transmission Control Protocol communication timeout comprises a retransmission timeout when receiving the acknowledgement information returned by the target network device; sending an offline notification message to the target terminal, and updating the security identifier in the browser interface of the monitoring terminal according to the offline notification message, wherein the offline notification message at least comprises the device information and the offline time of the target network device.

2. The method of claim 1, wherein, The method further comprises: when detecting that the target network device recovers from the offline state to the online state, sending a network recovery notification message to the target terminal, wherein the network recovery notification message at least comprises the device information, the network recovery time and the offline duration of the target network device.

3. The method of claim 1, wherein, Before periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol, the method further comprises: obtaining the device information of the target network device from a database, wherein the device information comprises the device name, the device identifier and the historical offline information of the target network device.

4. The method of claim 1, wherein, Periodically detecting the network connection state of the target network device according to the Internet Control Message Protocol comprises: periodically calling a first thread to execute a first timeout detection subroutine, wherein the first timeout detection subroutine is used to detect whether the target network device has an Internet Control Message Protocol communication timeout.

5. The method of claim 4, wherein, Detecting the network connection state of the target network device according to the Transmission Control Protocol comprises: calling a second thread to execute a second timeout detection subroutine, wherein the second timeout detection subroutine is used to detect whether the target network device has a Transmission Control Protocol communication timeout.

6. The method of claim 1, wherein, Before sending the offline notification message to the target terminal, the method further comprises: generating offline log information, wherein the offline log information comprises the device information and the offline time of the target network device; updating the network connection state of the target network device in the 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 duration 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 duration of the target network device; updating the network connection state of the target network device in the database, and writing the network recovery log information into a log table of the database; updating the security identifier in the browser interface of the monitoring terminal according to the network recovery notification message.

8. A network connection state monitoring apparatus of a network device, characterized by comprising: The method comprises: The first detection module is configured to periodically detect the network connection state of the target network device according to the Internet Control Message Protocol (ICMP). The second detection module is configured to detect the network connection state of the target network device according to the Transmission Control Protocol (TCP) when the number of times of detecting that the target network device has an ICMP communication timeout continuously exceeds a first preset threshold. The determination module is configured to determine that the target network device is offline when the number of times of detecting that the target network device has a TCP communication timeout continuously exceeds a second preset threshold, wherein the TCP communication timeout includes a retransmission timeout when receiving the acknowledgement information returned by the target network device. The notification module is configured to send an offline notification message to a target terminal and update a security identifier in a browser interface of a monitoring terminal according to the offline notification message, wherein the offline notification message at least includes device information and an offline time of the target network device.

9. A non-volatile storage medium, characterized by, The non-volatile storage medium includes a stored program, wherein a device in which the non-volatile storage medium is located executes the network connection state monitoring method of the network device according to any one of claims 1 to 7 by running the program.

10. An electronic device, comprising: Comprise: A memory and a processor, wherein the memory stores a computer program, and the processor is 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.

Citation Information

Patent Citations

  • Method and apparatus of detecting accessibility of objective equipment

    CN101159623A