CN103684815B - Keep-alive method, device and system for data transmission link - Google Patents

Keep-alive method, device and system for data transmission link Download PDF

Info

Publication number
CN103684815B
CN103684815B CN201210322475.3A CN201210322475A CN103684815B CN 103684815 B CN103684815 B CN 103684815B CN 201210322475 A CN201210322475 A CN 201210322475A CN 103684815 B CN103684815 B CN 103684815B
Authority
CN
China
Prior art keywords
alive
keep
heart beat
transmission link
beat cycle
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.)
Active
Application number
CN201210322475.3A
Other languages
Chinese (zh)
Other versions
CN103684815A (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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201210322475.3A priority Critical patent/CN103684815B/en
Publication of CN103684815A publication Critical patent/CN103684815A/en
Application granted granted Critical
Publication of CN103684815B publication Critical patent/CN103684815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a keep-alive method, device and system for a data transmission link. The keep-alive method comprises the following steps: business data is transmitted through a first transmission link between a terminal side and a network side; heartbeat detection data and heartbeat detection response data are transmitted through a second transmission link between the terminal side and the network side, wherein the first transmission link and the second transmission link are in long connection between the terminal side and the network side based on IP (Internet Protocol) network in a same communication network, different TCP (Transmission Control Protocol) ports are used by the first transmission link and the second transmission link on the network side, and the first transmission link adopts a preset keep-alive heartbeat cycle to keep the long connection alive; according to the heartbeat detection data and the heartbeat detection response data, the actual keep-alive heartbeat cycles of keeping the long connection alive of the first transmission link can be determined and the actual keep-alive heartbeat cycles are synchronously transmitted to the first transmission link. By the adoption of the technical scheme, the accuracy of heartbeat detection results can be fairly improved.

Description

The keepalive method of data transmission link, apparatus and system
Technical field
The present invention relates to data processing technical field, especially relate to a kind of keepalive method of data transmission link, Apparatus and system.
Background technology
The data service with long online feature generally adopts heartbeat mechanism to realize the agreement based on interconnection between network The keep-alive of the transmission link of (ip, internet protocol), and in the context of mobile communication networks, by mobile terminal institute The core parameter configuration of access network is different, and the cycle leading to the long keep-alive connecting transmission link is also incomplete same, if Using fixing heart beat cycle, then it is likely to occur when heart beat cycle is more than the network keep alive cycle, connection cannot keep-alive;And take care When hop cycle is much smaller than the network keep alive cycle, heartbeat packet is excessively frequent, sending and during transmission heartbeat packet, to the power consumption of terminal and The consumption of Internet resources is excessive.
In order to solve the above problems, realize self adaptation under different communication network environment for the heart beat cycle, some business systems The method that system employs heartbeat detection, by the cooperation of end side and network side, realizes the keep-alive to different communication network environment The accuracy in cycle detects.As shown in Figure 1a, heartbeat detection generally includes end side and network side, and end side may be mounted at end On end, network side may be mounted in server, wherein, end side is provided with heartbeat detection engine modules, network side is arranged There is heartbeat detection service module, carry out growing connection by ip network between end side and network side, and, network side and end side Connect interaction heartbeat detection packet to determine the optimum heart beat cycle under this communication network environment also by this length.
The keepalive method of the data transmission link proposing in prior art, when determining keep-alive heart beat cycle, heartbeat detection Share a long connection transmission link with business transmission, during heartbeat detection, should with business while transmitting heartbeat packet With the transmission of the regular traffic data of system, occur that detection heart beat cycle is more than actual keep-alive duration during heartbeat detection And the situation that communication link is disconnected, the result accuracy that heartbeat detection obtains therefore can be made relatively low.
Content of the invention
Embodiments provide a kind of keepalive method of data transmission link, apparatus and system, can preferably carry High data transmission link, when carrying out keep-alive, determines the accuracy of keep-alive heart beat cycle.
A kind of keepalive method of data transmission link, comprising: pass through the first transmission link between end side and network side and pass Defeated business datum;Pass through the second transmission link between end side and network side and transmit heartbeat detection data and heartbeat detection number of responses According to, wherein said first transmission link and the second transmission link be end side and network side under identical communication network, be based on The long connection that Internet Protocol ip network is set up, described first transmission link and the second transmission link use different in network side Transmission control protocol tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle;According to institute State heartbeat detection data and heartbeat detection response data, determine that described first transmission link carries out growing the actual keep-alive connecting keep-alive Heart beat cycle is simultaneously synchronized to the first transmission link.
A kind of keep-alive device of data transmission link, this device is located at end side, comprising: the first connection management module, uses In and network side between pass through the first transmission link transmission services data;Second connection management module, for and network side between Heartbeat detection data and heartbeat detection response data are transmitted by the second transmission link;Heartbeat algorithm module, for according to described Heartbeat detection data and heartbeat detection response data, determine that described first transmission link carries out growing the actual keep-alive heart connecting keep-alive Hop cycle;Interface module, the actual keep-alive heart beat cycle for determining heartbeat algorithm module is synchronized to the first transmission link; Wherein, described first transmission link and the second transmission link be end side and network side under identical communication network, based on because The long connection that special fidonetFido ip network is set up, described first transmission link and the second transmission link use different in network side Tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle.
A kind of keep-alive device of data transmission link, this device is located at network side, comprising: the first connection management module, uses In and end side between pass through the first transmission link transmission services data;Second connection management module, for logical between end side Cross the second transmission link transmission heartbeat detection data and heartbeat detection response data;Session management module, for by second The end side that transmission link connects conversates management;Heart beat cycle statistical analysis module, for according to described heartbeat detection number According to heartbeat detection response data, determine that described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive;Connect Mouth module, the actual keep-alive heart beat cycle for determining heart beat cycle statistical analysis module is synchronized to the first transmission link; Wherein, described first transmission link and the second transmission link be end side and network side under identical communication network, based on because The long connection that special fidonetFido ip network is set up, described first transmission link and the second transmission link use different in network side Tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle.
Using technique scheme, when keep-alive is carried out to the long data transmission link connecting, business datum is passed through the One transmission link transmission, the heartbeat detection data and heartbeat detection response data that determine keep-alive heart beat cycle is passed through second and transmits Link transmission, wherein, the first transmission link and the second transmission link that end side and network side are set up, in networking side using different Tcp port so that during heartbeat detection, the transmission of heartbeat detection data will not be disturbed by business datum, pass Defeated heartbeat detection data and heartbeat detection response data do not interfere with the transmission of business datum such that it is able to preferably improve the heart yet Jump the accuracy of result of detection.
Brief description
Fig. 1 a is the keep-alive system architecture diagram of the data transmission link of proposition in prior art;
Fig. 1 b is the keep-alive system architecture diagram of the data transmission link of proposition in the embodiment of the present invention one;
Fig. 2 is the composition of the keep-alive device of the data transmission link positioned at end side of proposition in the embodiment of the present invention one Structural representation;
Fig. 3 is the composition of the keep-alive device of the data transmission link positioned at network side of proposition in the embodiment of the present invention one Structural representation;
Fig. 4 is the keepalive method flow chart of the data transmission link of proposition in the embodiment of the present invention two;
Fig. 5 is the keepalive method flow chart of the data transmission link of proposition in the embodiment of the present invention two;
Fig. 6 is the heartbeat algorithm schematic diagram of proposition in the embodiment of the present invention two.
Specific embodiment
For present in prior art, in the inaccurate problem of keep-alive heart beat cycle determining data link, the present invention is real Apply a technique proposed herein scheme, heartbeat detection data and the heartbeat detection response data of the transmission of keep-alive heart beat cycle will be determined Transmission link be transmitted independent of service transmission link, when keep-alive is carried out to the long data transmission link connecting, by industry Business data and determine keep-alive heart beat cycle heartbeat detection data by different ip network transmissions under same communication network environment, So that during heartbeat detection, the transmission of heartbeat detection data will not be disturbed by business datum, business datum is passing Also will not be affected by heartbeat detection data and heartbeat detection response data during defeated such that it is able to preferably improve heart beating The accuracy of result of detection.
Below in conjunction with each accompanying drawing to embodiment of the present invention technical scheme main realize principle, specific embodiment and It is set forth in the beneficial effect that should be able to reach.
Embodiment one
As shown in Figure 1 b, it is in the embodiment of the present invention one, the keep-alive system architecture diagram of the data transmission link of proposition, including End side and network side.Wherein: end side can include mobile terminal, wireless terminal etc., network side can include server.
End side, including the keep-alive device of service customer end data transmission link, service customer end and keep-alive device set Put in the terminal, for example, can be arranged in mobile terminal or wireless terminal.Wherein, pass through the between end side and network side One transmission link transmission services data, passes through the second transmission link and network side between and transmits heartbeat detection data and heartbeat detection Response data, according to described heartbeat detection data and heartbeat detection response data, determines that described first transmission link carries out growing even Connect the actual keep-alive heart beat cycle of keep-alive and be synchronized to the first transmission link.Wherein said first transmission link and the second chain Road be end side and network side under identical communication network, the long connection set up based on Internet Protocol ip network, described the One transmission link and the second transmission link use different transmission control protocol (tcp, transmission in network side Control protocol) port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle.
Specifically, as shown in Fig. 2 the keep-alive device being located at the data transmission link of end side includes the first connection management mould Block 201, the second connection management module 202, heartbeat algorithm module 203 and interface module 204, wherein:
First connection management module 201, for passing through the first transmission link transmission services data and network side between.
Second connection management module 202, transmits heartbeat detection data for passing through the second transmission link and network side between With heartbeat detection response data, wherein said first transmission link and the second transmission link are end side and network side in identical Under communication network, connected based on the length that Internet Protocol ip network is set up, described first transmission link and the second transmission link exist Network side uses different transmission control protocol tcp ports, and described first transmission link is carried out using default keep-alive heart beat cycle Long connection keep-alive.
Heartbeat algorithm module 203, for according to described heartbeat detection data and heartbeat detection response data, determining described One transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heartbeat algorithm module 203, specifically for according to described heartbeat detection data and heartbeat detection response Data, determines at least one first keep-alive heart beat cycle;Statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines Described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heartbeat algorithm module 203, specifically for counting to the first keep-alive heart beat cycle determined Analysis, when the absolute value of the difference of the two neighboring first keep-alive heart beat cycle determined is less than preset first threshold value, will really Preceding first keep-alive heart beat cycle of fixing time carries out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link; Or the first keep-alive heart beat cycle determined is carried out with statistical analysiss, determines the keep-alive ensureing that the first transmission link is in keep-alive Marginal value and the first transmission link are in the not keep-alive marginal value of not keep-alive, calculate the absolute value of the difference of the two, described absolutely During to value less than default Second Threshold, using corresponding for described keep-alive marginal value the first keep-alive heart beat cycle as the first transmission link Carry out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heartbeat algorithm module 203, specifically for by determine apart from current point in time the last time One keep-alive heart beat cycle is added with step-length Dynamic gene, and the value preset obtaining is as transmission heartbeat detection data next time and heartbeat detection First keep-alive heart beat cycle of response data.
Specifically, described step-length Dynamic gene includes detection direction and step sizes, and described heartbeat algorithm module is specifically adopted Determine at least one first keep-alive heart beat cycle: t with following formulai=ti-1+f(si-1, ri);
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission next time Heartbeat detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection side To riIt is step sizes, is determined with adjusting interval product by regulation coefficient, before detection direction determines, adjust interval Value is the first keep-alive heart beat cycle that the last time is determined, after detection method determines, the interval value of adjustment is The nearly data transmission link once determined can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive the The difference of one keep-alive heart beat cycle.
Interface module 204, the actual keep-alive heart beat cycle for determining heartbeat algorithm module 203 is synchronized to the first biography Transmission link.
Network side, including the server being arranged on network side, the keep-alive device of business service end data transmission link sets Put in the server of network side, between network side and end side, pass through the first transmission link transmission services data;And and eventually Pass through the second transmission link between side and transmit heartbeat detection data and heartbeat detection response data, according to described heartbeat detection number According to heartbeat detection response data, determine described first transmission link carry out growing the actual keep-alive heart beat cycle connecting keep-alive and with Walk to the first transmission link.Wherein, described first transmission link and the second transmission link are end side and network side in identical Under communication network, connected based on the length that Internet Protocol ip network is set up, described first transmission link and the second transmission link exist Network side uses different tcp ports, and described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle.
Specifically, as shown in figure 3, the keep-alive device being located at the data transmission link of network side includes the first connection management mould Block 301, the second connection management module 302, session management module 303, heart beat cycle statistical analysis module 304 and interface module 305, wherein:
First connection management module 301, for passing through the first transmission link transmission services data and end side between.
Second connection management module 302, transmits heartbeat detection data for passing through the second transmission link and end side between With heartbeat detection response data, wherein, described first transmission link and the second transmission link be end side with network side identical Communication network under, long connection, described first transmission link and the second transmission link set up based on Internet Protocol ip network Use different tcp ports in network side, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle.
Session management module 303, for conversating management to by the end side that the second transmission link connects.
Heart beat cycle statistical analysis module 304, for according to described heartbeat detection data and heartbeat detection response data, really Fixed described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heart beat cycle statistical analysis module 304, specifically for according to described heartbeat detection data and heart beating Probe response data, determines at least one first keep-alive heart beat cycle;The the first keep-alive heart beat cycle determined is counted Analysis, determines that described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heart beat cycle statistical analysis module 304, specifically for the first keep-alive heart beat cycle determined Carry out statistical analysiss, be less than preset first threshold value in the absolute value of the difference of the two neighboring first keep-alive heart beat cycle determined When, preceding for the time that determines the first keep-alive heart beat cycle is carried out growing the actual keep-alive heart connecting keep-alive as the first transmission link Hop cycle;Or the first keep-alive heart beat cycle determined is carried out with statistical analysiss, determines and ensure that the first transmission link is in guarantor The keep-alive marginal value lived and the first transmission link are in the not keep-alive marginal value of not keep-alive, calculate the absolute value of the difference of the two, When described absolute value is less than default Second Threshold, using corresponding for described keep-alive marginal value the first keep-alive heart beat cycle as first Transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, above-mentioned heart beat cycle statistical analysis module 304, by determine apart from current point in time the last time One keep-alive heart beat cycle is added with step-length Dynamic gene, and the value preset obtaining is as transmission heartbeat detection data next time and heartbeat detection First keep-alive heart beat cycle of response data.
Specifically, step-length Dynamic gene includes detection direction and step sizes, described heart beat cycle statistical analysis module tool Body determines at least one first keep-alive heart beat cycle: t using following formulai=ti-1+f(si-1, ri);
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission next time Heartbeat detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection side To riIt is step sizes, is determined with adjusting interval product by regulation coefficient, before detection direction determines, adjust interval Value is the first keep-alive heart beat cycle that the last time is determined, after detection method determines, the interval value of adjustment is The nearly data transmission link once determined can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive the The difference of one keep-alive heart beat cycle.
Interface module 305, the actual keep-alive heart beat cycle for determining heart beat cycle statistical analysis module is synchronized to First transmission link.
It should be noted that the keep-alive system of transmission link that the embodiment of the present invention proposes here, transmitting by second When link transmission heartbeat detection data and heartbeat detection response data, can be, but not limited to using following two methods:
First method: heartbeat detection data is sent by the lateral network side of terminal, the lateral end side of network sends heart beating and visits Survey response data.
Second method: heartbeat detection data is sent by the lateral end side of network, the lateral network side of terminal sends heart beating and visits Survey response data.
Embodiment two
The embodiment of the present invention two here to send heartbeat detection data by the lateral network side of terminal, send out by the lateral end side of network Send to be described in detail as a example heartbeat detection response data, in this way, setting data transmission link in the terminal Keep-alive device, when determining that the first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive, can consider , in the transmitting procedure of the second transmission link, the network of the second transmission link is even for heartbeat detection data and heartbeat detection response data Meet state and user to factors such as the operations of terminal, may further ensure that the accuracy of result of detection.That is, terminal In be provided with keep-alive device for data transmission link, be provided for the keep-alive of data transmission link in the server of network side Device, for ease of distinguishing, the part being used for realizing transmission services data function in terminal is referred to as by the embodiment of the present invention two here For service customer end, the part being used for realization transmission heartbeat detection data and heartbeat detection response data function is referred to as heart beating Detection engine, responsively, the part being used in server realizing receiving service data function is referred to as business service end, for reality Now the part of transmission heartbeat detection data and heartbeat detection response data function is referred to as heartbeat detection service unit.
Refer to the system architecture shown in Fig. 1 b, the keep-alive side of the data transmission link that the embodiment of the present invention two proposes here Method, as shown in figure 4, its specific implementation process is as follows:
Step 401, sets up the ip network connection between server and terminal.
Pass through the first transmission link transmission services between the business service end in service customer end server in terminal Data, passes through the second transmission link transmission between the heartbeat detection service unit in heartbeat detection engine server in terminal Heartbeat detection data and heartbeat detection response data.Wherein, described first transmission link and the second transmission link be end side and Network side under identical communication network, the long connection set up based on Internet Protocol ip network, described first transmission link and Second transmission link uses different tcp ports in network side, and described first transmission link is entered using default keep-alive heart beat cycle Row is long to connect keep-alive.
It should be noted that two set up between terminal server connect data transfer chain based on the long of ip network Road, it is possible to use identical ip address, but in network side, the tcp port numbers distributing to two transmission links are different.
Specifically, can be found in the system architecture shown in Fig. 1 b, the heartbeat detection engine in end side, terminal and business are objective Communicated by interface (if1 as shown in Figure 1 b) between the end of family, set up between service customer end and business service end and be based on First transmission link of ip network, it is not shown that tcp port numbers are assumed to be 102(in figure).Heartbeat detection engine is independent of business visitor Family end is run, and service customer end passes through the first transmission link and sends business datum to the business service end in server, distributes tcp In port numbers position tcp101, and the second connection management module of heartbeat detection engine and heartbeat detection service unit second is even Connect between management module, set up the second transmission link based on ip network, distribution tcp port numbers are tcp102, heartbeat detection draws Hold up and heartbeat detection data is sent to network side by the second transmission link, and receive the heartbeat detection number of responses of network side feedback According to.Pass through interface (as shown in Figure 1 b between the heartbeat detection service unit in network side, server and business service end If2) communicated, between business service end and service customer end, the first transmission link, service customer end are set up based on ip network In the first connection management module and business service end in the first connection management module between set up the first transmission link, service Heartbeat detection service unit in device runs independent of business service end, the second connection management mould in heartbeat detection service unit Between connection management module 201 in block 301 and heartbeat detection engine, second transmission link, business service are set up based on ip network End is by the business datum between the first transmission link transmission and service customer end, and passes through the second transmission link receiving terminal Side send heartbeat detection data and to end side send heartbeat detection response data.
It is preferred that setting up the long connection based on an ip network between end side and network side, and set up based on second After the long connection of ip network, can carry out growing the keep-alive of connection by default or system default keep-alive heart beat cycle.For example, System default keep-alive heart beat cycle is 8 minutes, then two transmission links after initialization, all can be with 8 minutes for heart beating keep-alive Cycle carries out keep-alive, and certainly, the first transmission link can also carry out keep-alive, the second chain with 8 minutes for heart beating keepalive period Road does not carry out keep-alive using any heart beating keepalive period.
Step 402, the lateral network side of terminal sends heartbeat detection data, and receives the heartbeat detection response of network side feedback Data.
Wherein, for same terminal, two transmission links based on ip network connection are set up respectively with external server In the case of, the keep-alive heart beat cycle of two transmitting two paths based on ip network having built up is identical, therefore can be by the heart The function that jump keepalive period detects is stripped out from business transmitting procedure and independently carries out, and the transmission of business datum is only long even at it Connect the interaction realizing business datum, and with default before actual heart beating keepalive period, (i.e. optimum heart beating keepalive period) was verified Or system default keep-alive heart beat cycle realizes the long keep-alive connecting it is ensured that keep-alive heart beat cycle detection process does not interfere with industry The normal operation of business system, keep-alive heart beat cycle detection process then realizes the reality to current network conditions in its independent connection The detection of border heart beating keepalive period (i.e. optimum heart beating keepalive period), and due to will not on keep-alive heart beat cycle detecting link Transmission services data, therefore avoids the interference to keep-alive heart beat cycle detection process for the business datum.
Specifically, the heartbeat detection engine of end side can be using the heart beating keepalive period of the second transmission link as initial week Phase, heartbeat detection data is sent to network side by the second transmission link, and receives the heart of network side feedback in regulation duration Jump probe response data.Can also be by way of pre-setting, end side is using a default time parameter as initial week Phase, heartbeat detection data is sent to network side by the second transmission link, and receives the heart of network side feedback in regulation duration Jump probe response data.
It is preferred that in the embodiment of the present invention two technique proposed herein scheme, in end side, heartbeat detection engine Two connection management modules, with the heart beating keepalive period of system default as start cycle, connect to second in heartbeat detection service unit Connect management module and send heartbeat detection data, and second receiving in regulation duration in network side heartbeat detection service unit connects Connect the heartbeat detection response data of management module transmission.The second connection management mould in network side, heartbeat detection service unit After block receives the heartbeat detection data that the second connection management module in heartbeat detection engine sends, the heartbeat detection of feedback response Response data.For example, it is assumed that system default heart beating keepalive period be 8 minutes it is stipulated that when a length of 3 minutes, current time be 9:00, Then the connection management module in heartbeat detection engine is in 9:08, by the second transmission link, to heartbeat detection service unit In the second connection management module send heartbeat detection data, and within 3 minutes, receive and count heartbeat detection service unit In the heartbeat detection response data sent of the second connection management module, more than 3 minutes afterwards, even if heartbeat detection service is single The second connection management module in unit still sends heartbeat detection response data, even if receive also no longer being counted.
Step 403, according to described heartbeat detection data and heartbeat detection response data, determines that described first transmission link enters The long actual keep-alive heart beat cycle connecting keep-alive of row.
Wherein, the heartbeat algorithm module in heartbeat detection engine is according to described heartbeat detection data and heartbeat detection number of responses According to, determine at least one first keep-alive heart beat cycle, and statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determination Described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
Specifically, the heartbeat algorithm module in heartbeat detection engine can be, but not limited to using following two ways, to true The the first keep-alive heart beat cycle made carries out statistical analysiss, determines that described first transmission link carries out growing the actual guarantor connecting keep-alive Heart beat cycle alive:
First kind of way: statistical analysiss are carried out to the first keep-alive heart beat cycle determined, two neighboring determine When the absolute value of the difference of the first keep-alive heart beat cycle is less than preset first threshold value, the time that will determine preceding first keep-alive heart beating Cycle carries out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.For example, it is assumed that determining one of First keep-alive heart beat cycle is 30 minutes, and preset first threshold value is 30 seconds, and now, the first transmission link remains in keep-alive shape State, according to heartbeat algorithm, the theoretical value being calculated next first keep-alive heart beat cycle should be 30 minutes 28 seconds, the difference of the two The absolute value of value is 28 seconds, then be less than 30 seconds, now can be using determine 30 minutes as actual keep-alive heart beat cycle.
The second way: the first keep-alive heart beat cycle determined is carried out with statistical analysiss, determines and ensure the first chain Road is in the keep-alive marginal value of keep-alive and the first transmission link is in the not keep-alive marginal value of not keep-alive, calculates the difference of the two Absolute value, when described absolute value is less than default Second Threshold, by corresponding for described keep-alive marginal value the first keep-alive heart beat cycle Carry out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.For example, it is assumed that a certain moment is through actual spy The the first keep-alive heart beat cycle recording is 40 minutes, now can determine that the first transmission link remains in keepalive state, warp Cross and detect again, obtained the first keep-alive heart beat cycle that numerical value is 50 minutes, but now the first transmission link is in Not keepalive state, then now can proceed to detect, when a certain moment being 40 minutes 50 seconds through detecting the numerical value obtaining, Now the first transmission link is still within not keepalive state, but the 40 minutes 50 seconds absolute values with the difference of 40 minutes are 50 Second, if now default Second Threshold is 1 minute, meets Rule of judgment, no longer carry out the detection of actual heart beating keepalive period, Using 40 minutes as actual keep-alive heart beat cycle.
It is preferred that the session management module in setting heartbeat detection service unit in the server, also to the heart connecting Jump detection engine to conversate management, for example, the heartbeat detection engine of first connection distributes session management unit, to detecting Have no progeny in journey and reconnect the terminal address that comes up to the session management unit distributed before etc..
It should be noted that statistical analysiss are carried out at least one determined the first keep-alive heart beat cycle it is also possible to by Heart beat cycle statistical analysis module in heartbeat detection service unit executing, it is preferred that the embodiment of the present invention two is here, at end Side, the heartbeat algorithm module in heartbeat detection engine, according to the maneuver result of heartbeat detection data, and combine present terminal Situation, determines at least one first keep-alive heart beat cycle, and carries out the judgement that heartbeat detection finishes, and to determine to A few first keep-alive heart beat cycle carries out statistical analysiss, then network side is counted by the heart beat cycle in heartbeat detection service unit Analysis module executes, and so, to execute statistic analysis result by the network side possessing powerful process resource, can preferably save The process resource of terminal.
Specifically, it is determined that at least one first keep-alive heart beat cycle, comprising: will be apart from the last determination of current point in time The the first keep-alive heart beat cycle going out is added with step-length Dynamic gene, and the value preset obtaining is as transmission heartbeat detection data next time and the heart Jump the first keep-alive heart beat cycle of probe response data.Wherein, step-length Dynamic gene includes detection direction and step sizes, permissible Determine at least one first keep-alive heart beat cycle: t using following formulai=ti-1+f(si-1, ri);Wherein, ti-1It is that distance is current The first keep-alive heart beat cycle that time point the last time is determined, tiIt is to transmit heartbeat detection data and heartbeat detection response next time First keep-alive heart beat cycle of data, f is step-length Dynamic gene, si-1It is detection direction, riIt is step sizes, by regulation coefficient Interval product determines with adjustment, and before detection direction determines, the interval value of adjustment is first determining the last time Keep-alive heart beat cycle, after detection method determines, the interval value of adjustment is the data transmission link that the last time is determined Can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive the first keep-alive heart beat cycle difference.
Step 404, the actual keep-alive heart beat cycle determined is synchronized to the first transmission link, and the first transmission link adopts Actual keep-alive heart beat cycle carries out keep-alive.
Wherein, after the heartbeat algorithm module of end side calculates multiple first keep-alive heart beat cycles, transmit by second The all first keep-alive heart beat cycles determined are sent to the heart beat cycle statistical analysis module of network side, heart beat cycle by link Statistical analysis module carries out sample statistics and analysis to the ip address of the first keep-alive heart beat cycle obtaining, according to the sample of configuration Require to judge further the actual keep-alive heart beat cycle of certain ip address, that is, the sample according to configuration requires to further determine that the The actual keep-alive heart beat cycle of one transmission link.
Wherein, the actual keep-alive heart beat cycle determined is synchronized to the first transmission link, under can be, but not limited to adopt State three kinds of modes:
First kind of way: by the setting of network side heartbeat detection service unit in the server and business service The actual keep-alive heart beat cycle determined is synchronized to the first transmission link by the interface module that end connects.
The second way: by being connected with service customer end in the setting of end side heartbeat detection engine in the terminal Interface module the actual heart beating keepalive period determined is synchronized to the first transmission link.
The third mode: comprehensively adopt above two mode, that is, determining the actual keep-alive heart beating of the first transmission link After cycle, the interface module being connected with service customer end in the heartbeat detection engine of end side is by the actual heart beating determined Keepalive period is synchronized to service customer end, meanwhile, being connected with business service end in the heartbeat detection service unit of network side The actual heart beating keepalive period determined is synchronized to business service end by interface module.So, the industry between terminal server Business transmission link, that is, the long connection of an ip network, can carry out keep-alive by the actual heart beating keepalive period determined, thus The seriality of guarantee business transmission.
It is preferred that after determining actual keep-alive heart beat cycle and being synchronized to the first transmission link, that is, step 404 it Afterwards, the second transmission link can also be disconnected, so can preferably save Internet resources, discharge tcp port numbers.
As shown in figure 5, the heart beating of the heartbeat detection engine and network side to elaborate end side below as one example is visited The specific embodiment of the survey service unit actual keep-alive heart beat cycle of determination:
Step 50, sets up the first transmission link of transmission services data between terminal server, and transmission heart beating is visited Survey the second transmission link of data and heartbeat detection response data.
Based on the system architecture shown in Fig. 1 b, between terminal server, set up the first transmission link and the second chain Road, is the long connection set up based on an ip network respectively, the length set up for transmission services data and based on the 2nd ip network Connect, for transmitting heartbeat detection data and heartbeat detection response data.It is preferred that after two long connection networks are set up, two Individual network can adopt the keep-alive heart beat cycle of system default to carry out keep-alive.First transmission link normal transmission business datum, In second transmission link, the heartbeat detection engine of terminal sends heartbeat detection number to the heartbeat detection service unit in server According to proceeding by heartbeat detection, to determine actual keep-alive heart beat cycle.
Wherein, the heartbeat detection engine in terminal is set up with the heartbeat detection service unit in server and is connected, server In session management module the heartbeat detection engine on connecting is conversated management, be the heartbeat detection engine on first connection Distribution session management unit, if the heartbeat detection reconnecting up after keep-alive heart beat cycle detection process terminal aborts Engine, then be addressed to, for this heartbeat detection engine, the session management unit distributed before.
Step 51, the connection management module in heartbeat detection engine passes through the second transmission link to heartbeat detection service unit In connection management module send heartbeat detection data, and send heartbeat detection data after judge whether in regulation duration Receive the heartbeat detection response data that the connection management module in heartbeat detection service unit sends.If it is, execution step 52, on the contrary execution step 53.
It is preferred that the embodiment of the present invention here taking heartbeat detection engine first connection heartbeat detection service unit as a example, After second transmission link is set up, the session management module in heartbeat detection service unit is that this heartbeat detection engine distributes session Administrative unit, for carrying out the management of session during heartbeat detection.Connection management module in heartbeat detection engine is with second The acquiescence keep-alive heart beat cycle of transmission link is initial detection cycle, sends heartbeat detection data to heartbeat detection service unit. For example, it is possible to by arranging an intervalometer, to carry out the setting of detection cycle by way of changing intervalometer.For example, false If the acquiescence keep-alive heart beat cycle of the second transmission link is 5 minutes, then, after the second transmission link foundation completes, time point is 8:00, intervalometer is set to 5 minutes, starts intervalometer and carries out timing, then the connection management module in heartbeat detection engine is 8: When 00, with 5 minutes as detection cycle, that is, it is spaced 5 minutes afterwards, intervalometer reaches when specifying time 8:05 to heartbeat detection service Unit sends heartbeat detection data, receives the heart that heartbeat detection service unit is sent within (such as 3 minutes) in regulation duration simultaneously Jump probe response data.
Step 52, according to heartbeat detection data and heartbeat detection response data, determined for the first keepalive period.
According to heartbeat detection data and heartbeat detection response data, the heartbeat algorithm module in heartbeat detection engine is according to the heart Jump algorithm calculated for the first keepalive period.Wherein, the basic principle of heartbeat algorithm be from the initial keep-alive heart beat cycle of acquiescence start into Keep-alive heart beat cycle is approached to theoretical keep-alive heart beat cycle (i.e. by the detection of row heart beating keepalive period by heartbeat algorithm Excellent keep-alive heart beat cycle, is also the actual keep-alive heart beat cycle of transmission link simultaneously).As shown in fig. 6, specifically can adopt following Formula:
ti=ti-1+f(si-1, ri)
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission next time Heartbeat detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection side To riIt is step sizes, determined by the interval product of regulation coefficient and adjustment, formula of stating specific as follows:
ri=α xi
Wherein, α is regulation coefficient, xiIt is that adjustment is interval, before detection direction determines, the interval value of adjustment is nearest The the first keep-alive heart beat cycle once determined, after detection direction determines, the interval value of adjustment is the last determination The data transmission link going out can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive the first keep-alive heart beating The difference in cycle.It is preferred that detection direction numerically can be distinguished with positive and negative.
The interval x of adjustmentiValue mode, when detection direction does not determine, xiValue be gradually increased, mesh Be as early as possible determination adjustment direction, now xiValue be on the occasion of, and work as detection direction determine after, xiValue be gradually to subtract Little, now xiValue be negative value it is therefore an objective to the numerical value of more accurate approximation theory keep-alive heart beating.For example, calculate through heart beating Method calculates, and the numerical value of the detection keep-alive heart beat cycle obtaining is 12 minutes, before detection direction is failed to understand, continues to increase this numerical value, The interval value of adjustment is on the occasion of detection next time can take 15 minutes, but if calculates through heartbeat algorithm, the spy obtaining Surveying keep-alive heart beat cycle is 35 minutes, and now the first transmission link is already at not keepalive state, that is, send detection data it Afterwards, in preset duration, do not receive probe response data, then now need to reduce the interval numerical value of adjustment, visit next time Survey can take to continue to detect for 20 minutes.
Step 53, if the connection management module in heartbeat detection engine is after sending heartbeat detection data, in regulation duration Heartbeat detection response data that the connection management module being inside not received by heartbeat detection service unit is sent is it is determined that now Second transmission link is in not keepalive state.Further, it is determined that the second transmission link be in not keepalive state the reason, if The reason second transmission link disconnects is because what user caused to the operation of terminal, such as opens offline mode, closes network even The behavior such as connect, now return execution step 50, in the connection management module in heartbeat detection engine and heartbeat detection service unit Connection management module set up the second transmission link.If instead being the not keep-alive of the second transmission link that heartbeat timeout causes, Then execution step 52, reduce the keep-alive heartbeat detection cycle, continue to send heartbeat detection data.
It is preferred that after determining the second transmission link not keep-alive reason, further, determining actual heart beating keep-alive week During phase, actual heart beating keepalive period can also be determined the reason comprehensive second transmission link not keep-alive.For example, if by Terminal is operated (as started offline mode) cause the second transmission link to disconnect in user, then not by this in calculating process List influence factor in, if because heartbeat detection data time-out causes the second transmission link to disconnect, then will in calculating process The number of times of time-out increases by 1.For example, heartbeat detection packet be sent to when network side it is stipulated that certain threshold value be 10 seconds, if It is not received by heartbeat detection response data, then in the case of this kind, by overtime time in heartbeat detection calculating process in 10 seconds Number increase by 1.
Step 54, judges whether the first keep-alive heart beat cycle determined in step 52 is actual heart beating keepalive period, such as It is really, then execution step 55, conversely, execution step 56.
Wherein, after determining the first keep-alive heart beat cycle, the first keep-alive heart beat cycle determined is counted Analysis, determines that described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.Specific embodiment can but It is not limited to using following two ways:
First kind of way: statistical analysiss are carried out to the first keep-alive heart beat cycle determined, two neighboring determine When the absolute value of the difference of the first keep-alive heart beat cycle is less than preset first threshold value, the time that will determine preceding first keep-alive heart beating Cycle carries out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.
The second way: the first keep-alive heart beat cycle determined is carried out with statistical analysiss, determines and ensure the first chain Road is in the keep-alive marginal value of keep-alive and the first transmission link is in the not keep-alive marginal value of not keep-alive, calculates the difference of the two Absolute value, when described absolute value is less than default Second Threshold, by corresponding for described keep-alive marginal value the first keep-alive heart beat cycle Carry out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.
Step 55, determines the actual keep-alive heart beat cycle that described first keep-alive heart beat cycle is the first transmission link, execution Step 57.
Step 56, with the first keep-alive heart beat cycle of determining as detection cycle, the setting of change intervalometer, return execution Step 51, heartbeat detection engine sends heartbeat detection data again to heartbeat detection service unit again, and in regulation duration Receive the heartbeat detection data that heartbeat detection service unit is sent.
For example, it is assumed that the first keep-alive heart beat cycle determined in step 53 is 7 minutes, default threshold value is 1 minute, this When through heartbeat algorithm calculating, the numerical value obtaining next the first keep-alive heart beat cycle is 9 minutes, then the two difference is 2 minutes, Obviously, the first keep-alive heart beat cycle determined not is actual keep-alive heart beat cycle, at this time, it may be necessary to proceed actual keep-alive The determination of heart beat cycle, with determine 9 minutes as detection cycle, the setting of change intervalometer, intervalometer is set to 9 points Clock, that is, detection cycle have been changed to 9 minutes, heartbeat detection engine need continue to heartbeat detection service unit send heartbeat detection Data, and receive the heartbeat detection data that heartbeat detection service unit is sent in regulation duration.And for example it is assumed that in step 53 really The the first keep-alive heart beat cycle made is 25 minutes, and default threshold value is 1 minute, and in the after actual detection, obtaining One keepalive period was 27 minutes, but in the keep-alive heart beat cycle of 27 minutes, the second transmission link was in not keep-alive, that is, receive Less than heartbeat detection response data it is clear that the first keep-alive heart beat cycle determined is not actual keep-alive heart beat cycle, but Now, heart beat cycle can not continue to increase, but needs to reduce the value of heart beat cycle further, adjusts in above-mentioned steps 52 X between main plotiValue progressively reduce.
Step 57, the actual keep-alive heart beat cycle determined is sent to heartbeat detection service unit by heartbeat detection engine, And, heartbeat detection engine passes through interface module and the actual keep-alive heart beat cycle determined is synchronized to the of transmission services data One transmission link, heartbeat detection service unit will be determined also by interface module after receiving actual keep-alive heart beat cycle Actual keep-alive heart beat cycle be synchronized to the first transmission link of transmission services data.
It is preferred that after the actual keep-alive heart beat cycle determined is synchronized to the first transmission link, can also include:
Step 58, heartbeat detection engine unit disconnects the connection with heartbeat detection service unit, that is, be used for transmitting heart beating spy Survey data and the second transmission link of heartbeat detection response data disconnects, the ip address of release the second transmission link.
Using embodiment of the present invention technique proposed herein scheme, will be used for transmitting the heart determining actual keep-alive heart beat cycle Jump detection data and heartbeat detection response data separate traffic data transmission link runs, to the long data transmission link connecting When carrying out keep-alive, by business datum with determine the heartbeat detection data of keep-alive heart beat cycle by different ip network transmissions, from And during making heartbeat detection, the transmission of heartbeat detection data will not be disturbed by business datum, transmit heartbeat detection number According to also will not disconnect with the transmission link of heartbeat detection response data such that it is able to preferably improve heartbeat detection result accurate Property.
Obviously, those skilled in the art can carry out the various changes and modification essence without deviating from the present invention to the present invention God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprise these changes and modification.

Claims (13)

1. a kind of keepalive method of data transmission link is it is characterised in that include:
Pass through the first transmission link transmission services data between end side and network side;
Pass through the second transmission link between end side and network side and transmit heartbeat detection data and heartbeat detection response data, wherein Described first transmission link and the second transmission link be end side and network side under identical communication network, based on internet protocol The long connection that view ip network is set up, described first transmission link and the second transmission link use different transmission to control in network side Agreement tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle;
According to described heartbeat detection data and heartbeat detection response data, determine that described first transmission link carries out growing connection keep-alive Actual keep-alive heart beat cycle and be synchronized to the first transmission link;Including:
According to described heartbeat detection data and heartbeat detection response data, determine at least one first keep-alive heart beat cycle;
Statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines that described first transmission link carries out growing connection keep-alive Actual keep-alive heart beat cycle.
2. the method for claim 1 is it is characterised in that carry out statistical to the first keep-alive heart beat cycle determined Analysis, determines that described first transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive, comprising:
Statistical analysiss are carried out to the first keep-alive heart beat cycle determined, in the two neighboring first keep-alive heart beat cycle determined Difference absolute value be less than preset first threshold value when, the time that will determine preceding first keep-alive heart beat cycle as first transmission Link carries out growing the actual keep-alive heart beat cycle connecting keep-alive;Or
The the first keep-alive heart beat cycle determined is carried out with statistical analysiss, determines the keep-alive ensureing that the first transmission link is in keep-alive Marginal value and the first transmission link are in the not keep-alive marginal value of not keep-alive, calculate the absolute value of the difference of the two, described absolutely During to value less than default Second Threshold, using corresponding for described keep-alive marginal value the first keep-alive heart beat cycle as the first transmission link Carry out growing the actual keep-alive heart beat cycle connecting keep-alive.
3. the method for claim 1 is it is characterised in that determine at least one first keep-alive heart beat cycle, comprising:
Determine apart from current point in time the last time first keep-alive heart beat cycle is added with step-length Dynamic gene, obtains Value preset is as the first keep-alive heart beat cycle of transmission heartbeat detection data next time and heartbeat detection response data.
4. method as claimed in claim 3 is it is characterised in that described step-length Dynamic gene includes detection direction and step-length is big It is little,
Determine at least one first keep-alive heart beat cycle using following formula:
ti=ti-1+f(si-1,ri);
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission heart beating next time Detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection direction, ri It is step sizes, riDetermined by the interval product of regulation coefficient and adjustment, before detection direction determines, the interval value of adjustment It is the first keep-alive heart beat cycle that the last time is determined, after detection direction determines, the interval value of adjustment is nearest one The secondary data transmission link determined can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive first guarantor The difference of heart beat cycle alive.
5. a kind of keep-alive device of data transmission link, this device is located at end side it is characterised in that including:
First connection management module, for passing through the first transmission link transmission services data and network side between;
Second connection management module, for passing through and network side between, the second transmission link transmits heartbeat detection data and heart beating is visited Survey response data;
Heartbeat algorithm module, for according to described heartbeat detection data and heartbeat detection response data, determining described first transmission Link carries out growing the actual keep-alive heart beat cycle connecting keep-alive;
Interface module, the actual keep-alive heart beat cycle for determining heartbeat algorithm module is synchronized to the first transmission link;
Wherein, described first transmission link and the second transmission link be end side and network side under identical communication network, base The long connection set up in Internet Protocol ip network, described first transmission link and the second transmission link are in network side using different Tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle;
Wherein, described heartbeat algorithm module, specifically for according to described heartbeat detection data and heartbeat detection response data, determining At least one first keep-alive heart beat cycle;Statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines described first Transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive.
6. device as claimed in claim 5 is it is characterised in that described heartbeat algorithm module, specifically for determining One keep-alive heart beat cycle carries out statistical analysiss, little in the absolute value of the difference of the two neighboring first keep-alive heart beat cycle determined When preset first threshold value, preceding for the time that determines the first keep-alive heart beat cycle is carried out growing connection guarantor as the first transmission link The actual keep-alive heart beat cycle lived;Or statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines guarantee first Transmission link is in the keep-alive marginal value of keep-alive and the first transmission link is in the not keep-alive marginal value of not keep-alive, calculates the two The absolute value of difference, when described absolute value is less than default Second Threshold, by corresponding for the described keep-alive marginal value first keep-alive heart Hop cycle carries out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.
7. device as claimed in claim 5 is it is characterised in that described heartbeat algorithm module, specifically for will apart from current when Between the first keep-alive heart beat cycle of determining of point the last time is added with step-length Dynamic gene, the value preset obtaining was transmitted as next time Heartbeat detection data and the first keep-alive heart beat cycle of heartbeat detection response data.
8. device as claimed in claim 7 is it is characterised in that described step-length Dynamic gene includes detection direction and step-length is big Little, described heartbeat algorithm module specifically determines at least one first keep-alive heart beat cycle using following formula:
ti=ti-1+f(si-1,ri);
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission heart beating next time Detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection direction, ri It is step sizes, riDetermined by the interval product of regulation coefficient and adjustment, before detection direction determines, the interval value of adjustment It is the first keep-alive heart beat cycle that the last time is determined, after detection direction determines, the interval value of adjustment is nearest one The secondary data transmission link determined can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive first guarantor The difference of heart beat cycle alive.
9. a kind of keep-alive device of data transmission link, this device is located at network side it is characterised in that including:
First connection management module, for passing through the first transmission link transmission services data and end side between;
Second connection management module, transmits heartbeat detection data and heartbeat detection for passing through the second transmission link between end side Response data;
Session management module, for conversating management to by the end side that the second transmission link connects;
Heart beat cycle statistical analysis module, described for according to described heartbeat detection data and heartbeat detection response data, determining First transmission link carries out growing the actual keep-alive heart beat cycle connecting keep-alive;
Interface module, the actual keep-alive heart beat cycle for determining heart beat cycle statistical analysis module is synchronized to the first transmission Link;
Wherein, described first transmission link and the second transmission link be end side and network side under identical communication network, base The long connection set up in Internet Protocol ip network, described first transmission link and the second transmission link are in network side using different Tcp port, described first transmission link carries out growing connection keep-alive using default keep-alive heart beat cycle;
Wherein said heart beat cycle statistical analysis module, specifically for according to described heartbeat detection data and heartbeat detection number of responses According to determining at least one first keep-alive heart beat cycle;Statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines institute State the first transmission link to carry out growing the actual keep-alive heart beat cycle connecting keep-alive.
10. device as claimed in claim 9 is it is characterised in that described heart beat cycle statistical analysis module, specifically for true The the first keep-alive heart beat cycle made carries out statistical analysiss, in the difference of the two neighboring first keep-alive heart beat cycle determined When absolute value is less than preset first threshold value, preceding for the time that determines the first keep-alive heart beat cycle is carried out as the first transmission link The long actual keep-alive heart beat cycle connecting keep-alive;Or statistical analysiss are carried out to the first keep-alive heart beat cycle determined, determines Ensure that the first transmission link is in the keep-alive marginal value of keep-alive and the first transmission link is in the not keep-alive marginal value of not keep-alive, meter Calculate the absolute value of the difference of the two, when described absolute value is less than default Second Threshold, by corresponding for described keep-alive marginal value the One keep-alive heart beat cycle carries out growing the actual keep-alive heart beat cycle connecting keep-alive as the first transmission link.
11. devices as claimed in claim 9 it is characterised in that described heart beat cycle statistical analysis module, will apart from current when Between the first keep-alive heart beat cycle of determining of point the last time is added with step-length Dynamic gene, the value preset obtaining was transmitted as next time Heartbeat detection data and the first keep-alive heart beat cycle of heartbeat detection response data.
12. devices as claimed in claim 11 are it is characterised in that described step-length Dynamic gene includes detection direction and step-length is big Little, described heart beat cycle statistical analysis module specifically determines at least one first keep-alive heart beat cycle using following formula:
ti=ti-1+f(si-1,ri);
Wherein, ti-1It is the first keep-alive heart beat cycle determined apart from current point in time the last time, tiIt is transmission heart beating next time Detection data and the first keep-alive heart beat cycle of heartbeat detection response data, f is step-length Dynamic gene, si-1It is detection direction, ri It is step sizes, riDetermined by the interval product of regulation coefficient and adjustment, before detection direction determines, the interval value of adjustment It is the first keep-alive heart beat cycle that the last time is determined, after detection direction determines, the interval value of adjustment is nearest one The secondary data transmission link determined can keep-alive the first keep-alive heart beat cycle data transmission link can not keep-alive first guarantor The difference of heart beat cycle alive.
A kind of keep-alive system of 13. data transmission links is it is characterised in that including being arranged on the terminal of end side and being arranged on net The server of network side, wherein:
Described terminal, including the keep-alive device of the arbitrary described data transmission link of claim 5~8;
Described server, including the keep-alive device of the arbitrary described data transmission link of claim 9~12.
CN201210322475.3A 2012-09-03 2012-09-03 Keep-alive method, device and system for data transmission link Active CN103684815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210322475.3A CN103684815B (en) 2012-09-03 2012-09-03 Keep-alive method, device and system for data transmission link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210322475.3A CN103684815B (en) 2012-09-03 2012-09-03 Keep-alive method, device and system for data transmission link

Publications (2)

Publication Number Publication Date
CN103684815A CN103684815A (en) 2014-03-26
CN103684815B true CN103684815B (en) 2017-02-01

Family

ID=50321205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210322475.3A Active CN103684815B (en) 2012-09-03 2012-09-03 Keep-alive method, device and system for data transmission link

Country Status (1)

Country Link
CN (1) CN103684815B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106416133B (en) * 2015-04-08 2019-06-28 华为技术有限公司 The determination method, apparatus and equipment of optimal heart beat cycle
CN105227398B (en) * 2015-09-08 2018-09-04 深圳创维-Rgb电子有限公司 Long connection method, system and its apparatus, terminal are shared in multi-service
CN105610913A (en) * 2015-12-22 2016-05-25 用友网络科技股份有限公司 Heartbeat keep-alive method and apparatus for long connection in communication network
CN106922039B (en) * 2015-12-25 2020-06-05 阿里巴巴集团控股有限公司 Heartbeat message sending method and device
CN105554151B (en) * 2015-12-29 2019-01-15 联想(北京)有限公司 A kind of keep-alive time determines method and electronic equipment
CN107995235A (en) * 2016-10-26 2018-05-04 中国移动通信有限公司研究院 The method and terminal that a kind of keep-alive time determines
CN107819642B (en) * 2017-09-15 2020-02-28 中国科学院计算技术研究所 Self-adaptive heartbeat method and system based on distribution
CN110235016A (en) * 2018-06-25 2019-09-13 深圳市大疆创新科技有限公司 Monitoring method, laser radar and the host computer of laser radar connection status
CN111193758A (en) * 2018-11-15 2020-05-22 西安诺瓦星云科技股份有限公司 Display management system and maintenance method thereof
CN109981800A (en) * 2019-04-19 2019-07-05 广州鲁邦通物联网科技有限公司 Method, heartbeat packet transmitting terminal and the interactive system of terminal quick sensing NAT keep-alive time
CN110855736B (en) * 2019-09-20 2023-04-18 深圳市有方科技股份有限公司 File transfer method, file transfer apparatus, and computer-readable storage medium
CN113055971A (en) * 2019-12-26 2021-06-29 天翼智慧家庭科技有限公司 Method and device for accessing intelligent terminal to network based on special SSID
CN113315802A (en) * 2020-07-27 2021-08-27 阿里巴巴集团控股有限公司 Method, device and equipment for processing network link abnormity
CN113434604B (en) * 2021-08-25 2021-12-03 西安热工研究院有限公司 Time sequence database synchronization method, system, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007089797A2 (en) * 2006-01-31 2007-08-09 Interdigital Technology Corporation Method and apparatus for providing and utilizing a non-contention based channel in a wireless communication system
CN101374116A (en) * 2007-08-23 2009-02-25 华为技术有限公司 Method and apparatus for implementing on-line business
CN101626591A (en) * 2009-07-30 2010-01-13 浙江中控软件技术有限公司 Detection method and detection device of data link
CN101772194A (en) * 2008-12-26 2010-07-07 中兴通讯股份有限公司 General packet radio service tunnel user plane path keep-alive method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007089797A2 (en) * 2006-01-31 2007-08-09 Interdigital Technology Corporation Method and apparatus for providing and utilizing a non-contention based channel in a wireless communication system
CN101374116A (en) * 2007-08-23 2009-02-25 华为技术有限公司 Method and apparatus for implementing on-line business
CN101772194A (en) * 2008-12-26 2010-07-07 中兴通讯股份有限公司 General packet radio service tunnel user plane path keep-alive method and system
CN101626591A (en) * 2009-07-30 2010-01-13 浙江中控软件技术有限公司 Detection method and detection device of data link

Also Published As

Publication number Publication date
CN103684815A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103684815B (en) Keep-alive method, device and system for data transmission link
WO2017107577A1 (en) Node probing method and device, path selection method and device, and network system
US8055759B2 (en) Determination of link qualities between an access point and a plurality of clients
CN107819642A (en) Based on distributed adaptive heartbeat method and system
US8081659B2 (en) Map message expediency monitoring and automatic delay adjustments in M-CMTS
CN100367714C (en) Method for implementig mechanism of variable speed heartbeat based on network and load in host
US9173111B2 (en) System and method for convergence and automatic disabling of access points in a wireless mesh network
CA2871832C (en) Ensure upstream channel quality measurement stability in an upstream channel bonding system using t4 timeout multiplier
JP6772330B2 (en) Bluetooth sub-circuit in multi-configuration personnel type bluetooth device
EP2760182B1 (en) Data communication apparatus, data transmission method, and computer system
CN103703453B (en) The system and method for the Push Service equalized for Message Payload are provided
CN102771103B (en) High-speed communication system and high-speed communication method
CN105992307B (en) Wireless sensor network and association request sending method
CN102118278B (en) Method and system for measuring network conditions as well as method for monitoring network coverage
WO2018232917A1 (en) Internet-of-things network congestion reduction method and router
JP2019193258A (en) Bluetooth main circuit in multi-component Bluetooth device
CN106302016B (en) The method and system of small flow quick obtaining network physical bandwidth
JP2019193257A (en) Multi-component bluetooth device capable of avoiding signal interruption
CN109618001A (en) Internet-of-things terminal data managing and control system and its method based on cloud platform
CN105591790B (en) Data communication connection pool management device
KR20150046372A (en) Information management method and device
CN109787861A (en) Network data delay control method
WO2009123202A1 (en) Monitoring system
CN103312621B (en) Flow control system and flow control methods
KR20120139302A (en) System for analyizing voip quality using packet forwarding type and method using the same

Legal Events

Date Code Title Description
PB01 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