CN101980482B - Method for monitoring network connection and system thereof - Google Patents

Method for monitoring network connection and system thereof Download PDF

Info

Publication number
CN101980482B
CN101980482B CN2010105470077A CN201010547007A CN101980482B CN 101980482 B CN101980482 B CN 101980482B CN 2010105470077 A CN2010105470077 A CN 2010105470077A CN 201010547007 A CN201010547007 A CN 201010547007A CN 101980482 B CN101980482 B CN 101980482B
Authority
CN
China
Prior art keywords
server
keep
alive
client
count value
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.)
Expired - Fee Related
Application number
CN2010105470077A
Other languages
Chinese (zh)
Other versions
CN101980482A (en
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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN2010105470077A priority Critical patent/CN101980482B/en
Publication of CN101980482A publication Critical patent/CN101980482A/en
Application granted granted Critical
Publication of CN101980482B publication Critical patent/CN101980482B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to the technical field of network connection, in particular to a method for monitoring network connection and a system thereof. The method comprises the following steps that: (1) a client sends a keep-alive message to a server; (2) after receiving the keep-alive message, the server returns a keep-alive response to the client, wherein the keep-alive response also comprises server state information; and (3) if the client does not receive the keep-alive response returned by the server within preset keep-alive time, the client is disconnected with the server, and if the client receives the keep-alive response returned by the server within the preset keep-alive time,, the step (1) is performed repeatedly. In the method, keep-alive packet information is processed so as to know whether a link of the opposite side is busy or not, a system of the opposite side is a newly-established link or not and the previous link disconnection is caused by the system reset of the opposite side or the interruption of a network link, so that the state of the system can be determined; simultaneously, the method has the advantage that the management of a keep-alive packet is simple.

Description

A kind of network connects method for supervising and system thereof
Technical field
The present invention relates to network interconnection technique field, particularly a kind of network connects method for supervising and system thereof.
Background technology
In the prior art, adopt the network keep alive bag that communication link is monitored.Whether the purpose of network keep alive bag is the timed sending through the keep-alive packet, reach real-time monitoring communications link and break off.The technology that generally adopts at present is after creating link, and network timing sends a keep-alive packet, when the other side's echo reply bag in official hour, just can judge whether this link is unimpeded.As shown in Figure 1, adopt following steps:
Step S11: client is set up a link to service end.
Step S12: client to repeating to send the keep-alive message packet to client, is waited for the correct response of this message bag then in certain gap periods.
Step S13: if client is waited for the overtime nothing response of keep-alive message, thereby get access to the other side's system busy, perhaps the obstructed information of network.
Step S14: client is break link initiatively.
The technical problem that this technology exists is: can't judge the reason of breaking off with service end.It is excessive and can't continue to handle to judge whether to occur the link data amount, and perhaps whether current device is newly-established link.These can't get access in client.
Summary of the invention
First goal of the invention of the present invention is to provide a kind of network to connect method for supervising, to solve the technical problem that prior art can't be judged the service end disconnect cause.
In order to realize first goal of the invention of the present invention, the technical scheme of employing is following:
A kind of network connects method for supervising, is used for the link stability between client control and the server, and said method comprises:
(1) user end to server sends keep-alive message;
(2) after server received keep-alive message, server returned the keep-alive response to client, and said keep-alive response also comprises server state information;
(3) if client does not receive the keep-alive response that server returns in the predefined keep-alive time, then client is broken off and being connected of server, otherwise repeated execution of steps (1).
As a kind of preferred version, said server also is provided with counter, in startup of server, and the count value zero clearing of counter, in said step (2), after server received keep-alive message, server was carried out corresponding operating according to server state:
If server is idle, then count value increases progressively;
If server is busy, then count value does not increase progressively;
Said server state information is a count value, and server returns keep-alive response as server state information to client with count value.
As further preferred version, said method also comprises:
Step (3) client break off with being connected of server after, is connected with server again and execution in step (1), and according to the count value of the keep-alive response that receives, judge and the reason of server disconnection.
As further preferred version again, said method also comprises:
Client executing step (1) is sent keep-alive message to server, and receives the keep-alive response that server returns, and obtains first count value of keep-alive response;
Client repeated execution of steps (1) is sent keep-alive message to server, in the predefined keep-alive time, does not receive the keep-alive response that server returns, and then client is broken off and being connected of server; And connect with server again; After connecting, client execution in step (1) is again sent keep-alive message to server, and receives the keep-alive response that server returns; According to second count value of the keep-alive response that receives, judge the reason of breaking off with server:
If second count value is 0, judges with the former of server disconnection and restart because of server;
If second count value equates that with first count value then the disconnection of judgement and server is former because network congestion.
Second goal of the invention of the present invention is to provide a kind of network to connect supervisory control system, with the method for supervising of realizing that first goal of the invention of the present invention is provided.
In order to realize second goal of the invention of the present invention, the technical scheme of employing is following:
A kind of network connects supervisory control system, comprise server and with the client of server communication, said system also comprises:
Be arranged on the keep-alive message sending module of client, be used for sending keep-alive message to server;
Be arranged on the protection respond module on the server, be used for server after the keep-alive message that receives the transmission of keep-alive message sending module, return the keep-alive response to client, said keep-alive response also comprises server state information;
Be arranged on the monitoring module of client; Be used for the keep-alive response that monitoring server returns; If in the predefined keep-alive time, do not receive the keep-alive response that server returns; Then client is broken off and being connected of server, otherwise recall keep-alive message sending module sends to server and protects message.
As a kind of preferred version, said system also comprises the counting module that is arranged on the server, in startup of server; The count value zero clearing of counting module; After server receives keep-alive message, counting module querying server state, carry out corresponding operating according to server state:
If server is idle, then count value increases progressively;
If server is busy, then count value does not increase progressively;
The count value that the keep-alive respond module is transferred counting module returns to client as the server state information that keep-alive responds.
As further preferred version, said keep-alive response is provided with the count value field, is used to deposit the count value of counting module.
As further preferred version; Said system also comprises the module that reconnects that is arranged on client; Monitoring module break off with being connected of server after, reconnect module and rebulid and being connected of server, and call the keep-alive message sending module and send keep-alive message to server.
As further preferred version again, said system also comprises the network condition analysis module, is used to write down and keep-alive response that the analysis monitoring module receives:
If the count value of the keep-alive that receives response is 0, then writes down server and restart;
If the count value of the keep-alive that receives response is identical with the count value of the last keep-alive response that receives, then write down network congestion.
Whether the present invention's proposition is handled the keep-alive package informatin, makes it can know whether the other side's link is too busy, be the new link of setting up to method, system, and it still is that network link interrupts causing that link disconnection before belongs to the other side's system reset.Thereby the state that makes system obtains judging.This method is by the simple management advantage that is keeping the keep-alive bag simultaneously.
Description of drawings
Fig. 1 is the flow chart of existing keep-alive packet technology;
Fig. 2 is the packet content of embodiment of the invention bag message alive;
The packet content that Fig. 3 lives and responds for embodiment of the invention bag;
Fig. 4 is the flow chart of the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is done further detailed explanation.
Be illustrated in figure 4 as the flow chart of the embodiment of the invention.
The link condition of monitoring of customer end adopted keep-alive packet communication and service end, Mission Monitor counter while and service end exist on same the equipment, are used for the monitoring of system.
Step S41: when the server device start powers on, will count the duration zero clearing.When client start simultaneously powers on, begin to connect with service end.
Step S42:: connect just often, the every certain interval of time of client just sends the keep-alive package informatin to service end.Service end is obtained current counting to counter, then counting is returned.If the counting that returns is 0, the expression system belongs to for the first time and connects, and client can judge whether service end once resetted with this.
Counter can add up according to the situation of institute's monitor task automatically at every turn, belongs to normal operation such as current task, and just accumulated counts automatically if there is task to be in busy state, does not just add up automatically.Whether client can have to add up according to the data of being returned is judged the pressure of service end load, thus the load of adjustment communication link.
As shown in Figure 2, the message structure of keep-alive bag comprises with the lower part:
Send packet content:
1. message packet header;
2. message content;
3. message end.
As shown in Figure 3, the message structure content of bag bag response alive comprises with the lower part:
1. message packet header;
2. message content has added the content that one 4 byte length transmits summary counter;
3. message end.
Increase the state information that counter is come the passing service end in the message content through the bag response of living at bag.
Step S43: the keep-alive bag that sends when client does not have when returning, and automatic disconnection is connected with service end.
Step S44: after rebuliding connection, client can be judged the reason of disconnection according to the return data counting that gets access to.If data are zero, explain that server end has been reset; Do not become if numerical value, the disconnection that connects before explaining causes owing to network link blocks.
Adopt the way to manage of this network keep alive bag, can be with the communication conditions of network, the situation of service end is managed simultaneously, has effectively utilized this data link of keep-alive bag.
The above only is a preferred implementation of the present invention; Should be pointed out that for the person of ordinary skill of the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (4)

1. a network connects method for supervising, is used for the link stability between client control and the server, it is characterized in that said method comprises:
(1) user end to server sends keep-alive message;
(2) after server received keep-alive message, server returned the keep-alive response to client, and said keep-alive response also comprises server state information;
(3) if client does not receive the keep-alive response that server returns in the predefined keep-alive time, then client is broken off and being connected of server, otherwise repeated execution of steps (1);
Said server also is provided with counter, in startup of server, and the count value zero clearing of counter, in said step (2), after server received keep-alive message, server was carried out corresponding operating according to server state:
If server is idle, then count value increases progressively;
If server is busy, then count value does not increase progressively;
Said server state information is a count value, and server returns keep-alive response as server state information to client with count value;
Client executing step (1) is sent keep-alive message to server, and receives the keep-alive response that server returns, and obtains first count value of keep-alive response;
Client repeated execution of steps (1) is sent keep-alive message to server, in the predefined keep-alive time, does not receive the keep-alive response that server returns, and then client is broken off and being connected of server; And connect with server again; After connecting, client execution in step (1) is again sent keep-alive message to server, and receives the keep-alive response that server returns; According to second count value of the keep-alive response that receives, judge the reason of breaking off with server:
If second count value is 0, judges with the former of server disconnection and restart because of server;
If second count value equates that with first count value then the disconnection of judgement and server is former because network congestion.
2. a network connects supervisory control system, comprise server and with the client of server communication, it is characterized in that said system also comprises:
Be arranged on the keep-alive message sending module of client, be used for sending keep-alive message to server;
Be arranged on the protection respond module on the server, be used for server after the keep-alive message that receives the transmission of keep-alive message sending module, return the keep-alive response to client, said keep-alive response also comprises server state information;
Be arranged on the monitoring module of client; Be used for the keep-alive response that monitoring server returns; If in the predefined keep-alive time, do not receive the keep-alive response that server returns; Then client is broken off and being connected of server, otherwise recall keep-alive message sending module sends to server and protects message;
Said system also comprises the counting module that is arranged on the server, in startup of server, and the count value zero clearing of counting module, after server receives keep-alive message, counting module querying server state, carry out corresponding operating according to server state:
If server is idle, then count value increases progressively;
If server is busy, then count value does not increase progressively;
The count value that the keep-alive respond module is transferred counting module returns to client as the server state information that keep-alive responds;
Said system also comprises the network condition analysis module, is used to write down and keep-alive response that the analysis monitoring module receives:
If the count value of the keep-alive that receives response is 0, then writes down server and restart;
If the count value of the keep-alive that receives response is identical with the count value of the last keep-alive response that receives, then write down network congestion.
3. network according to claim 2 connects supervisory control system, it is characterized in that, said keep-alive response is provided with the count value field, is used to deposit the count value of counting module.
4. network according to claim 2 connects supervisory control system; It is characterized in that; Said system also comprises the module that reconnects that is arranged on client; Monitoring module break off with being connected of server after, reconnect module and rebulid and being connected of server, and call the keep-alive message sending module and send keep-alive message to server.
CN2010105470077A 2010-11-17 2010-11-17 Method for monitoring network connection and system thereof Expired - Fee Related CN101980482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105470077A CN101980482B (en) 2010-11-17 2010-11-17 Method for monitoring network connection and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105470077A CN101980482B (en) 2010-11-17 2010-11-17 Method for monitoring network connection and system thereof

Publications (2)

Publication Number Publication Date
CN101980482A CN101980482A (en) 2011-02-23
CN101980482B true CN101980482B (en) 2012-10-31

Family

ID=43600967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105470077A Expired - Fee Related CN101980482B (en) 2010-11-17 2010-11-17 Method for monitoring network connection and system thereof

Country Status (1)

Country Link
CN (1) CN101980482B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209100B (en) * 2012-01-12 2015-12-16 百度在线网络技术(北京)有限公司 service monitoring method and system
CN103916411B (en) * 2012-12-31 2018-02-02 北京新媒传信科技有限公司 The processing method and processing device of hypertext transfer protocol requests time-out
CN105357577A (en) * 2014-08-22 2016-02-24 中兴通讯股份有限公司 Packet loss retransmission method and device
CN106293934B (en) * 2016-07-19 2019-02-01 浪潮(北京)电子信息产业有限公司 A kind of cluster system management optimization method and platform
CN111356017B (en) * 2018-12-24 2022-05-13 浙江宇视科技有限公司 Video monitoring network equipment keep-alive method and device
CN111385287A (en) * 2020-02-20 2020-07-07 视联动力信息技术股份有限公司 Network reconnection method and device for service system
CN115022384B (en) * 2022-05-05 2023-10-13 北京北方华创微电子装备有限公司 HSMS communication connection method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1234224C (en) * 2002-10-14 2005-12-28 华为技术有限公司 Radio local network terminal on-line realtime testing method
CN100391162C (en) * 2005-04-13 2008-05-28 华为技术有限公司 Control method for switching server
CN101227347B (en) * 2008-01-07 2010-08-25 上海颐东网络信息有限公司 Method and apparatus for remote monitoring mainframe network state
CN101299689B (en) * 2008-06-19 2011-06-15 北京立通无限科技有限公司 On-line detection method as well as mail server

Also Published As

Publication number Publication date
CN101980482A (en) 2011-02-23

Similar Documents

Publication Publication Date Title
CN101980482B (en) Method for monitoring network connection and system thereof
EP2510651B1 (en) Connectivity fault management timeout period control
CN102684949A (en) Method and device for processing heartbeat data packet under persistent connection, and client
CN101826984A (en) Log information processing method and device thereof
CN102780593B (en) Based on the method for BFD protocol detection link, device and network processing unit
CN103795554A (en) Terminal state managing method, device and system
CN105391573A (en) Data acquisition system, data analysis system and monitoring analysis system based on intelligent terminal
CN106713036A (en) Fault processing method and system of mobile terminal payment system
CN101796774A (en) Method and system for checking automatically connectivity status of an IP link on IP network
CN101051957B (en) Dynamically regulating method and device for link state and bundled link state
CN101409654B (en) Method for processing SNMP information in network management system
CN102437943A (en) Method and device for surfing Internet based on 3G ( 3rd Generation Telecommunication) data card
CN103716815A (en) Method for vehicle-mounted communication terminal to achieve dial-up internet access
CN102882708A (en) Operation and maintenance auditing method, device and system
CN103391303B (en) Service fault noticing method and server using same
CN101841424A (en) EMS network management system and method based on SOCKS proxy connection
CN101977396B (en) System and method for realizing network element service switching in multimedia messaging service
CN102413191A (en) Web instant communication method based on browser
CN101232406A (en) OAM fast detecting method, apparatus and system
EP4030691A1 (en) Data processing method, device, and system
CN103746842A (en) Method and system for detecting fault restarting of line card
CN101945007B (en) Method for monitoring dynamic IP access equipment
CN102905292B (en) Mobile terminal network port management method and device
CN106385384B (en) Message sending method and network equipment
CN101808103A (en) Device and method for realizing point to point protocol data service disconnection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 No. 6, color road, hi tech Industrial Development Zone, Guangdong, Guangzhou, China

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121031

Termination date: 20191117

CF01 Termination of patent right due to non-payment of annual fee