CN101980482A - Method for monitoring network connection and system thereof - Google Patents
Method for monitoring network connection and system thereof Download PDFInfo
- Publication number
- CN101980482A CN101980482A CN2010105470077A CN201010547007A CN101980482A CN 101980482 A CN101980482 A CN 101980482A CN 2010105470077 A CN2010105470077 A CN 2010105470077A CN 201010547007 A CN201010547007 A CN 201010547007A CN 101980482 A CN101980482 A CN 101980482A
- 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.)
- Granted
Links
Images
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
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 by the keep-alive packet, reach real-time monitoring communications link and disconnect.The technology that generally adopts is after creating link at present, 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 that disconnects 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 as follows:
A kind of network connects method for supervising, is used for the link stability between client control and the server, and described 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 described 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 disconnects and being connected of server, otherwise repeated execution of steps (1).
As a kind of preferred version, described server also is provided with counter, in startup of server, and the count value zero clearing of counter, in described step (2), after server received keep-alive message, server was carried out corresponding operating according to server state:
If the server free time, then count value increases progressively;
If server is busy, then count value does not increase progressively;
Described 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, described method also comprises:
Step (3) client disconnect 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, described method also comprises:
Client executing step (1) sends 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) sends keep-alive message to server; in the predefined keep-alive time, do not receive the keep-alive response that server returns; then client disconnects and being connected of server; and connect with server again; after connecting, client re-executes step (1) and sends 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 that disconnects 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 as follows:
A kind of network connects supervisory control system, comprise server and with the client of server communication, described 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, described 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 disconnects and being connected of server, and sends to server and protects message otherwise repeat to call the keep-alive message sending module.
As a kind of preferred version, described 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 the server free time, 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, described keep-alive response is provided with the count value field, is used to deposit the count value of counting module.
As further preferred version; described system also comprises the module that reconnects that is arranged on client; monitoring module disconnect 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, described 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
The present invention will be further described in detail below in conjunction with the drawings and specific embodiments.
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 automatically according to the situation of institute's monitor task 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, thereby adjusts the load of 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 the counter content is come the passing service end in the message content by 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, illustrate that server end has been reset; Do not become if numerical value, the disconnection that connects before illustrating 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 improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (9)
1. a network connects method for supervising, is used for the link stability between client control and the server, it is characterized in that described 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 described 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 disconnects and being connected of server, otherwise repeated execution of steps (1).
2. network according to claim 1 connects method for supervising; it is characterized in that; described server also is provided with counter; in startup of server; the count value zero clearing of counter; in described step (2), after server received keep-alive message, server was carried out corresponding operating according to server state:
If the server free time, then count value increases progressively;
If server is busy, then count value does not increase progressively;
Described server state information is a count value, and server returns keep-alive response as server state information to client with count value.
3. network according to claim 2 connects method for supervising, it is characterized in that described method also comprises:
Step (3) client disconnect 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.
4. network according to claim 3 connects method for supervising, it is characterized in that described method also comprises:
Client executing step (1) sends 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) sends keep-alive message to server; in the predefined keep-alive time, do not receive the keep-alive response that server returns; then client disconnects and being connected of server; and connect with server again; after connecting, client re-executes step (1) and sends 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 that disconnects 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.
5. a network connects supervisory control system, comprise server and with the client of server communication, it is characterized in that described 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, described 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 disconnects and being connected of server, and sends to server and protects message otherwise repeat to call the keep-alive message sending module.
6. network according to claim 5 connects supervisory control system; it is characterized in that; described 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 the server free time, 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.
7. network according to claim 6 connects monitoring module, it is characterized in that, described keep-alive response is provided with the count value field, is used to deposit the count value of counting module.
8. network according to claim 6 connects monitoring module; it is characterized in that; described system also comprises the module that reconnects that is arranged on client; monitoring module disconnect 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.
9. network according to claim 8 connects monitoring module, it is characterized in that described 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.
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 true CN101980482A (en) | 2011-02-23 |
CN101980482B 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) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103209100A (en) * | 2012-01-12 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | Service monitoring method and system |
CN103916411A (en) * | 2012-12-31 | 2014-07-09 | 北京新媒传信科技有限公司 | Processing method and device for request timeout of hypertext transfer protocol |
CN105357577A (en) * | 2014-08-22 | 2016-02-24 | 中兴通讯股份有限公司 | Packet loss retransmission method and device |
CN106293934A (en) * | 2016-07-19 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A kind of cluster system management optimization method and platform |
CN111356017A (en) * | 2018-12-24 | 2020-06-30 | 浙江宇视科技有限公司 | 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 |
CN115022384A (en) * | 2022-05-05 | 2022-09-06 | 北京北方华创微电子装备有限公司 | HSMS communication connection method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1490984A (en) * | 2002-10-14 | 2004-04-21 | 华为技术有限公司 | Radio local network terminal on-line realtime testing method |
CN1848754A (en) * | 2005-04-13 | 2006-10-18 | 华为技术有限公司 | Control method for switching server |
CN101227347A (en) * | 2008-01-07 | 2008-07-23 | 上海颐东网络信息有限公司 | Method and apparatus for remote monitoring mainframe network state |
CN101299689A (en) * | 2008-06-19 | 2008-11-05 | 北京立通无限科技有限公司 | On-line detection method as well as mail server |
-
2010
- 2010-11-17 CN CN2010105470077A patent/CN101980482B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1490984A (en) * | 2002-10-14 | 2004-04-21 | 华为技术有限公司 | Radio local network terminal on-line realtime testing method |
CN1848754A (en) * | 2005-04-13 | 2006-10-18 | 华为技术有限公司 | Control method for switching server |
CN101227347A (en) * | 2008-01-07 | 2008-07-23 | 上海颐东网络信息有限公司 | Method and apparatus for remote monitoring mainframe network state |
CN101299689A (en) * | 2008-06-19 | 2008-11-05 | 北京立通无限科技有限公司 | On-line detection method as well as mail server |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103209100B (en) * | 2012-01-12 | 2015-12-16 | 百度在线网络技术(北京)有限公司 | service monitoring method and system |
CN103209100A (en) * | 2012-01-12 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | 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 |
CN103916411A (en) * | 2012-12-31 | 2014-07-09 | 北京新媒传信科技有限公司 | Processing method and device for request timeout of hypertext transfer protocol |
CN105357577A (en) * | 2014-08-22 | 2016-02-24 | 中兴通讯股份有限公司 | Packet loss retransmission method and device |
WO2016026299A1 (en) * | 2014-08-22 | 2016-02-25 | 中兴通讯股份有限公司 | Method and device for retransmitting lost packet |
CN106293934A (en) * | 2016-07-19 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A kind of cluster system management optimization method and platform |
CN106293934B (en) * | 2016-07-19 | 2019-02-01 | 浪潮(北京)电子信息产业有限公司 | A kind of cluster system management optimization method and platform |
CN111356017A (en) * | 2018-12-24 | 2020-06-30 | 浙江宇视科技有限公司 | Video monitoring network equipment keep-alive method and device |
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 |
CN115022384A (en) * | 2022-05-05 | 2022-09-06 | 北京北方华创微电子装备有限公司 | HSMS communication connection method and device |
CN115022384B (en) * | 2022-05-05 | 2023-10-13 | 北京北方华创微电子装备有限公司 | HSMS communication connection method and device |
Also Published As
Publication number | Publication date |
---|---|
CN101980482B (en) | 2012-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101980482B (en) | Method for monitoring network connection and system thereof | |
EP2510651B1 (en) | Connectivity fault management timeout period control | |
CN105610913A (en) | Heartbeat keep-alive method and apparatus for long connection in communication network | |
CN101826984A (en) | Log information processing method and device thereof | |
CN101296135A (en) | Fault information processing method and device | |
CN106713036A (en) | Fault processing method and system of mobile terminal payment system | |
CN102780593B (en) | Based on the method for BFD protocol detection link, device and network processing unit | |
CN101729567A (en) | Web alarm monitoring system and method based on Socket protocol | |
CN101796774A (en) | Method and system for checking automatically connectivity status of an IP link on IP network | |
CN105391573A (en) | Data acquisition system, data analysis system and monitoring analysis system based on intelligent terminal | |
CN101051957B (en) | Dynamically regulating method and device for link state and bundled link state | |
US8929243B2 (en) | Network monitoring device | |
CN102437943A (en) | Method and device for surfing Internet based on 3G ( 3rd Generation Telecommunication) data card | |
CN101420770A (en) | Fault connection processing method and system in wireless transmission | |
CN102882708A (en) | Operation and maintenance auditing method, device and system | |
CN103716815A (en) | Method for vehicle-mounted communication terminal to achieve dial-up internet access | |
CN101841424A (en) | EMS network management system and method based on SOCKS proxy connection | |
CN102413191A (en) | Web instant communication method based on browser | |
CN101977396B (en) | System and method for realizing network element service switching in multimedia messaging service | |
CN101232406A (en) | OAM fast detecting method, apparatus and system | |
CN103391303B (en) | Service fault noticing method and server using same | |
CN102082677A (en) | Alarm information processing method, device and system | |
CN103746842A (en) | Method and system for detecting fault restarting of line card | |
WO2013074081A1 (en) | Link status buffer flow control management | |
CN102710470B (en) | A kind of M2M communication means and treatment facility |
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 |