CN106416133A - Method, apparatus and device for determining optimal heartbeat period - Google Patents

Method, apparatus and device for determining optimal heartbeat period Download PDF

Info

Publication number
CN106416133A
CN106416133A CN201580029631.9A CN201580029631A CN106416133A CN 106416133 A CN106416133 A CN 106416133A CN 201580029631 A CN201580029631 A CN 201580029631A CN 106416133 A CN106416133 A CN 106416133A
Authority
CN
China
Prior art keywords
heart beat
beat cycle
connection
optimal
interval
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
Application number
CN201580029631.9A
Other languages
Chinese (zh)
Other versions
CN106416133B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN106416133A publication Critical patent/CN106416133A/en
Application granted granted Critical
Publication of CN106416133B publication Critical patent/CN106416133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Details Of Connecting Devices For Male And Female Coupling (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)

Abstract

An embodiment of the present invention relates to a method apparatus and device for determining an optimal heartbeat period. The method comprises: acquiring a first interval range in which lies an optimal heartbeat period between two devices; establishing a plurality of connections between the two devices and setting different heartbeat periods, within the first interval range, for each connection; detecting whether a connection of the plurality of connections is broken within the maximum heartbeat period of the different heartbeat periods; if so, determining the heartbeat period of the disconnection as a first heartbeat period, and, of the different heartbeat periods, determining a heartbeat period less than the first heartbeat period as an optimal heartbeat period. Thus, the embodiment of the present invention, by establishing a plurality of connections between two devices, and setting different heartbeat periods for each connection, effectively shortens a time for determining the optimal heartbeat period, thereby determining the optimal heartbeat period with a high efficiency.

Description

Determination method, device and the equipment of optimal heart beat cycle Technical field
The present invention relates to determination method, device and the equipment of network technique field, more particularly to optimal heart beat cycle.
Background technology
Need to keep two the long of equipment room to connect in some systems, but the connection deleted for a long time without message transmission for the network element meeting timing having in network, such as fire wall, in order to prevent connection upper for a long time without data transmission, and disconnected by middle network element, packet periodically can be sent in two equipment rooms, the action that this periodicity sends packet is referred to as heartbeat.
Heart beat cycle is long, can cause the disconnection of connection;Heart beat cycle is too short, can cause the unnecessary consumption of the flow, electricity and performance of equipment, so an it needs to be determined that optimal heart beat cycle.
The optimal heart beat cycle of two equipment rooms is generally determined using following manner in the prior art, specific handling process is as follows:
Step one, the scope of the optimal heart beat cycle of two equipment rooms is obtained according to statistical information, maximum heart beat cycle value is H and minimum heart beat cycle value is L.
Step 2, a connection is set up in two equipment rooms, and the heart beat cycle for setting the connection is C=L.
After step 3, elapsed time C, if the connection does not disconnect, the heart beat cycle for setting the connection is C=C+1.
Step 3 is repeated, until the connection disconnects, then step 4 is performed, or, until C=H, the connection does not disconnect, then performs step 5.
Step 4, if the connection disconnects, it is determined that the optimal heart beat cycle of two equipment rooms is C=C-1.
Step 5, if the C=H connections do not disconnect, it is determined that the optimal heart beat cycle of two equipment rooms is C=H.
The optimal heart beat cycle of two equipment rooms is determined using method of the prior art, it is necessary to longer time can determine the concrete numerical value of optimal heart beat cycle, determines that the efficiency of optimal heart beat cycle is low.
The content of the invention
The embodiments of the invention provide determination method, device and the equipment of optimal heart beat cycle, it can effectively shorten the time determined used in optimal heart beat cycle, improve the efficiency for determining optimal heart beat cycle.
First aspect includes there is provided a kind of determination method of optimal heart beat cycle, methods described:
Obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
Multiple connections are set up in described two equipment rooms, and are that each connection sets different heart beat cycles in the range of the first interval;
In the different heart beat cycle in the time of maximum heart beat cycle, detect in the multiple connection the connection disconnected whether occur;
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
With reference to first aspect, in the first possible implementation of first aspect, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
It is described to set up multiple connections in described two equipment rooms in second of possible implementation of first aspect with reference to the first possible implementation of first aspect or first aspect, and described first Different heart beat cycles are set for each connection in interval range, including:
Multiple connections, and the precision for needing to meet according to the optimal heart beat cycle are set up in described two equipment rooms, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval.
With reference to the first or second of possible implementation of first aspect or first aspect, in the third possible implementation of first aspect, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
Judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the second interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
With reference to the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, methods described also includes:
When the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
With reference to the first any implementation into the 4th kind of possible implementation of first aspect or first aspect, in the 5th kind of possible implementation of first aspect, methods described also includes:
When testing result is the connection disconnected do not occur in the multiple connection, by the different heartbeat Maximum heart beat cycle in cycle is defined as the optimal heart beat cycle.
With reference to the 5th kind of possible implementation of first aspect, in the 6th kind of possible implementation of first aspect, it is described when testing result be the multiple connection in there is not the connection disconnected when, maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
Judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
With reference to the 6th kind of possible implementation of first aspect, in the 7th kind of possible implementation of first aspect, methods described also includes:
When the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
Second aspect includes there is provided a kind of determining device of optimal heart beat cycle, described device:
Acquiring unit, for obtaining the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
Connection establishment unit, is that each connection sets different heart beat cycles for setting up multiple connections in described two equipment rooms, and in the range of the first interval that the acquiring unit is obtained;
Detection unit, in the time of maximum heart beat cycle in the different heart beat cycles that the connection establishment unit is set, detecting in the multiple connection the connection disconnected whether occur;
Determining unit, for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection being defined as into the first heart beat cycle, by the difference Heart beat cycle in the heart beat cycle less than first heart beat cycle be defined as the optimal heart beat cycle.
With reference to second aspect, in the first possible implementation of second aspect, the determining unit, specifically for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
With reference to the first possible implementation of second aspect or second aspect, in second of possible implementation of second aspect, the connection establishment unit, specifically for setting up multiple connections in described two equipment rooms, and the precision for needing to meet according to the optimal heart beat cycle, it is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval that the acquiring unit is obtained.
With reference to the first or second of possible implementation of second aspect or second aspect, in the third possible implementation of second aspect, the determining unit includes:
First interval determination subelement, for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
First judgment sub-unit, for judging whether the siding-to-siding block length for the second interval scope that the first interval determination subelement is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
First optimal heart beat cycle determination subelement, during for judging that the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs are met when first judgment sub-unit, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
With reference to the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, described device also includes:
First circulation triggers subelement, during for judging that the siding-to-siding block length of the second interval scope is more than the precision that the optimal heart beat cycle needs are met when first judgment sub-unit, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in connection establishment unit execution, and are the step of each connection sets different heart beat cycles in the range of the first interval.
With reference to the first any implementation into the 4th kind of possible implementation of second aspect or second aspect, in the 5th kind of possible implementation of second aspect, the determining unit, it is additionally operable to, when the testing result of the detection unit is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as into the optimal heart beat cycle.
With reference to the 5th kind of possible implementation of second aspect, in the 6th kind of possible implementation of second aspect, the determining unit includes:
Second interval determination subelement, for when the testing result of the detection unit is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
Second judgment sub-unit, for judging whether the siding-to-siding block length for the 3rd interval scope that the second interval determination subelement is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
Second optimal heart beat cycle determination subelement, during for judging that the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs are met when second judgment sub-unit, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
With reference to the 6th kind of possible implementation of second aspect, in the 7th kind of possible implementation of second aspect, described device also includes:
Second circulation triggers subelement, during for judging that the siding-to-siding block length of the 3rd interval scope is more than the precision that the optimal heart beat cycle needs are met when second judgment sub-unit, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in connection establishment unit execution, and are that each connection sets different heart beat cycles in the range of the first interval The step of.
The third aspect includes there is provided a kind of equipment, the equipment:
Memory;
Processor;
The memory, for storage program instruction;
The processor, for performing following operate according to the programmed instruction stored in the memory:
Obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
Multiple connections are set up in described two equipment rooms, and are that each connection sets different heart beat cycles in the range of the first interval;
In the different heart beat cycle in the time of maximum heart beat cycle, detect in the multiple connection the connection disconnected whether occur;
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
With reference to the third aspect, in the first possible implementation of the third aspect, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
With reference to the first possible implementation of the third aspect or the third aspect, in second of possible implementation of the third aspect, it is described to set up multiple connections in described two equipment rooms, and be that each connection sets different heart beat cycles in the range of the first interval, including:
Multiple connections are set up in described two equipment rooms, and need what is met according to the optimal heart beat cycle Precision, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval.
With reference to the first or second of possible implementation of the third aspect or the third aspect, in the third possible implementation of the third aspect, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
Judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the second interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
With reference to the third possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect, the processor is additionally operable to perform following operate according to the programmed instruction stored in the memory:
When the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
With reference to the first any implementation into the 4th kind of possible implementation of the third aspect or the third aspect, in the 5th kind of possible implementation of the third aspect, the processor, is additionally operable to perform following operate according to the programmed instruction stored in the memory:
When testing result is the connection disconnected do not occur in the multiple connection, by the different heartbeat Maximum heart beat cycle in cycle is defined as the optimal heart beat cycle.
With reference to the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation of the third aspect, it is described when testing result be the multiple connection in there is not the connection disconnected when, maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
Judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
With reference to the 6th kind of possible implementation of the third aspect, in the 7th kind of possible implementation of the third aspect, the processor is additionally operable to perform following operate according to the programmed instruction stored in the memory:
When the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
Fourth aspect has program stored therein there is provided a kind of computer-readable storage medium, the computer-readable storage medium, and the step of described program is performed includes the step as described in any in the possible implementation such as first aspect or first aspect.
The embodiments of the invention provide a kind of determination method of optimal heart beat cycle, first obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to, then multiple connections are set up in two equipment rooms, and be that each connection sets different heart beat cycles in the range of first interval, and, in different heart beat cycles in the time of maximum heart beat cycle, detect in multiple connections the connection disconnected whether occur, work as detection When as a result to there is the connection disconnected in multiple connections, the heart beat cycle for the connection that will be switched off is defined as the first heart beat cycle, and the heart beat cycle less than the first heart beat cycle in different heart beat cycles is defined as into optimal heart beat cycle.Therefore, the embodiment of the present invention, to set different heart beat cycles per each connection, so as to effectively shorten the time determined used in optimal heart beat cycle, improves the efficiency for determining optimal heart beat cycle by setting up multiple connections in two equipment rooms.
Brief description of the drawings
Fig. 1 is the determination method flow diagram for the optimal heart beat cycle that the embodiment of the present invention one is provided;
Fig. 2 sets up schematic diagram for the connection of the embodiment of the present invention;
Fig. 3 is the determination method flow diagram for the optimal heart beat cycle that the embodiment of the present invention two is provided;
Fig. 4 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention three is provided;
Fig. 5 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention four is provided;
Fig. 6 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention five is provided;
Fig. 7 is the determination structure drawing of device for the optimal heart beat cycle that the embodiment of the present invention six is provided;
Fig. 8 is the equipment structure chart that the embodiment of the present invention seven is provided.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is described, it is clear that, described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made belongs to the scope of protection of the invention.
When the embodiment of the present invention refers to the ordinal numbers such as " first ", " second ", unless the based on context meaning of its certain order of representation, it should be understood that only play differentiation.
The embodiments of the invention provide a kind of determination method of optimal heart beat cycle, this method is determined for needing to keep the optimal heart beat cycle of any two equipment room of long connection, the tool applied for this method The body scene present invention is not limited, for example, above-mentioned two equipment can be the equipment in internet, or the equipment in LAN;It can be terminal and server, can also be terminal, or, it is server.It is specifically described in the embodiment of the present invention exemplified by determining the optimal heart beat cycle between terminal A and server B, the sender of heartbeat can be terminal or server, and the sender in description below only using terminal as heartbeat illustrates.
Fig. 1 is the determination method flow diagram for the optimal heart beat cycle that the embodiment of the present invention one is provided, and the executive agent of this method is terminal, and this method includes:
Step 101, the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to is obtained.
In the embodiment of the present invention, it is not specifically limited for the mode for obtaining first interval scope, can be by analyzing statistical information, so as to obtain the first interval scope that the optimal heart beat cycle between terminal A and server B belongs to;First interval scope can also be set by rule of thumb by technical staff, so as to obtain the first interval scope that the optimal heart beat cycle between terminal A and server B belongs to.Above-mentioned first interval scope can be expressed as T ∈ [Tmin, Tmax], wherein, T represents optimal heart beat cycle, and Tmin represents the lower limit of optimal heart beat cycle, and Tmax represents the upper limit of optimal heart beat cycle.First interval scope can be a larger interval range, for example, siding-to-siding block length is 10 minutes;First interval scope can also be a less interval range, for example, siding-to-siding block length is 2 minutes.
Step 102, multiple connections are set up in described two equipment rooms, and is that each connection sets different heart beat cycles in the range of the first interval.
It will be appreciated by those skilled in the art that, above-mentioned multiple connections can be understood as at least two connections, the time span that above-mentioned different heart beat cycle refers specifically to heart beat cycle is different, for example, when the heart beat cycle for setting a connection is 1 minute, the heart beat cycle of another connection could be arranged to 2 minutes or 3 minutes, and can not be set to 1 minute.
Schematic diagram is set up in connection shown in reference picture 2, in order to find the optimal heart beat cycle T between terminal A and server B, starts k connection between terminal A and server B, wherein 1<K, above-mentioned connection is specifically as follows socket (socket) connection.The heart beat cycle of i-th, j socket connection is respectively set to Ti, Tj, Ti<Tj(i<Also, Ti, Tj are in the range of first interval j),.
Normally, the requirement of system or technical staff according to where two equipment, it can determine that optimal heart beat cycle needs the precision met, above-mentioned precision can be understood as the chronomere of optimal heart beat cycle, in the embodiment of the present invention, when setting heart beat cycle for each connection, the precision met can be needed according to the optimal heart beat cycle, it is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval, it is above-mentioned accordingly specifically to can be understood as precision and chronomere's numerically equal.For example, first interval scope is 5min, linking number is 5, when it is 1min that optimal heart beat cycle, which needs the precision met, for each connection heart beat cycle can be set to be respectively 1min, 2min, 3min, 4min, 5min;When it is 0.5min that optimal heart beat cycle, which needs the precision met, for each connection heart beat cycle can be set to be respectively 0.5min, 1min, 1.5min, 2min, 2.5min.
Step 103, detect in the multiple connection the connection disconnected whether occur in the time of maximum heart beat cycle in the different heart beat cycle.
Above-mentioned maximum heart beat cycle is time most long that heart beat cycle in the different heart beat cycle.
When the maximum heart beat cycle in the heart beat cycle of k socket connection is Tk, the connection for whether occurring disconnecting in the multiple connection is detected within the Tk times.
Step 104, when testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as optimal heart beat cycle.
In the embodiment of the present invention, when occurring the connection of multiple disconnections in the multiple connection, it is only necessary to that connection that detection disconnects at first.Wherein, the heart beat cycle less than first heart beat cycle in different heart beat cycles may be multiple heart beat cycles, can be according in the heart beat cycle less than first heart beat cycle of the preset rules in the different heart beat cycle, one heart beat cycle of selection is defined as the optimal heart beat cycle.Preferably, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.For example, the heart beat cycle of i-th, j socket connection is respectively set into Ti, Tj, Ti in a step 102<Tj(i<J), if i-th of socket connection there occurs socket disconnections, can determine optimal heart beat cycle T ∈ [Ti-1, Ti), now can directly by Ti-1 be defined as it is described most Excellent heart beat cycle.
When optimal heart beat cycle needs the precision difference met in view of different systems, in the embodiment of the present invention, determining optimal heart beat cycle T ∈ [Ti-1, Ti after), can first judge it is interval [Ti-1, Ti) siding-to-siding block length whether be less than or equal to the precision that optimal heart beat cycle needs to meet.When judge it is interval [Ti-1, Ti) siding-to-siding block length be less than or equal to optimal heart beat cycle and need the precision met when, then Ti-1 is defined as the optimal heart beat cycle;When judge it is interval [Ti-1, Ti) siding-to-siding block length be more than optimal heart beat cycle and need the precision met when, with it is interval [Ti-1, Ti) as first interval scope, jump to step 102.
In the determination method of optimal heart beat cycle provided in an embodiment of the present invention, the handling process of the optimal heart beat cycle of determination when testing result is the connection disconnected do not occur in the multiple connection can also be included, now, in the different heart beat cycle heart beat cycle can be selected to be defined as the optimal heart beat cycle.Preferably, when testing result is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
For example, establishing k connection in a step 102, the heart beat cycle of i-th, j socket connection is respectively set to Ti, Tj, Ti<Tj(i<J), if not occurring socket disconnections within the Tk times, optimal heart beat cycle T ∈ [Tk, Tmax] can be determined, now Tk directly can be defined as the optimal heart beat cycle.
When optimal heart beat cycle needs the precision difference met in view of different systems, in the embodiment of the present invention, determining optimal heart beat cycle T ∈ [Tk, Tmax] after, it can first judge whether the siding-to-siding block length of interval [Tk, Tmax] is less than or equal to the precision that optimal heart beat cycle needs to meet.It is defined as the optimal heart beat cycle when the siding-to-siding block length for judging interval [Tk, Tmax], which is less than or equal to optimal heart beat cycle, needs the precision met, then by Tk;When the siding-to-siding block length for judging interval [Tk, Tmax], which is more than optimal heart beat cycle, needs the precision met, with interval [Tk, Tmax] as first interval scope, step 102 is jumped to.
Therefore, the embodiment of the present invention sets different heart beat cycles by setting up multiple connections in two equipment rooms for each connection, so as to effectively shorten the time determined used in optimal heart beat cycle, efficiency high.
Fig. 3 is the determination method flow diagram for the optimal heart beat cycle that the embodiment of the present invention two is provided, wherein, it is determined that during optimal heart beat cycle, it is contemplated that optimal heart beat cycle needs that the precision met is different in different systems, and this method includes:
Step 301, the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to is obtained.
Step 302, multiple connections, and the precision for needing to meet according to the optimal heart beat cycle are set up in described two equipment rooms, is that each connection sets different heart beat cycles in the range of the first interval.
Step 303, detect in the multiple connection the connection disconnected whether occur in the time of maximum heart beat cycle in the different heart beat cycle.
Step 304, when testing result is the connection disconnected occur in multiple connections, the heart beat cycle for the connection that will be switched off is defined as the first heart beat cycle, and, determine the second interval scope that optimal heart beat cycle belongs to, the lower limit of second interval scope is the heart beat cycle less than the first heart beat cycle in different heart beat cycles, and the upper limit of second interval scope is the first heart beat cycle.
In the embodiment of the present invention, when occurring the connection of multiple disconnections in the multiple connection, it is only necessary to that connection that detection disconnects at first.Wherein, the heart beat cycle less than first heart beat cycle in different heart beat cycles may be multiple heart beat cycles, can be according in the heart beat cycle less than first heart beat cycle of the preset rules in the different heart beat cycle, one heart beat cycle of selection is defined as the lower limit of the second interval scope.Preferably, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as to the lower limit of the second interval scope.
For example, the heart beat cycle of i-th, j socket connection is respectively set into Ti, Tj, Ti in step 302<Tj(i<J), if i-th of socket connection there occurs socket disconnections, can determine optimal heart beat cycle T ∈ [Ti-1, Ti), that is, determine second interval scope for [Ti-1, Ti).Step 305, judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet.
Step 306, when the siding-to-siding block length for judging the second interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the lower limit of the second interval scope is defined as the optimal heartbeat Cycle.
Due in step 304, it is preferable that in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as to the lower limit of the second interval scope.Correspondingly, within step 306, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
In the determination method of optimal heart beat cycle provided in an embodiment of the present invention, it can also include when the siding-to-siding block length for judging the second interval scope is more than the handling process of the optimal heart beat cycle of determination when the optimal heart beat cycle needs the precision met.
Step 307, when the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, using the second interval scope as the first interval scope, step 302 is jumped to.
Step 308, when testing result is the connection disconnected do not occur in the multiple connection, the 3rd interval scope that optimal heart beat cycle belongs to is determined, the lower limit of 3rd interval scope is the maximum heart beat cycle in different heart beat cycles, and the upper limit of 3rd interval scope is the upper limit of first interval scope.
For example, establishing k connection in step 302, the heart beat cycle of i-th, j socket connection is respectively set to Ti, Tj, Ti<Tj(i<J), if not occurring socket disconnections within the Tk times, optimal heart beat cycle T ∈ [Tk, Tmax] can be determined, that is, it is [Tk, Tmax] to determine the 3rd interval scope.
Step 309, judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet.
Step 310, when the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Step 311, when the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, using the 3rd interval scope as the first interval scope, step 302 is jumped to.
The precision that the embodiment of the present invention needs to meet according to the optimal heart beat cycle, is that each connection sets different heart beat cycles in the range of the first interval, so as to avoid difference between the different heart beat cycles that set too small, wastes unnecessary process resource;Also, the optimal heart beat cycle for meeting required precision can be obtained by cycle detection.
Fig. 4 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention three is provided, terminal A periodically sends heartbeat to server B, the scope of optimal heart beat cycle T between terminal A and server B is [1min, 5min], it is required that T precision is integer minute, to be quickly found out the optimal heart beat cycle T (assuming that optimal heart beat cycle is 4min) between A, B, 5 connections are set up between A and B, the step of this method is performed is as follows:
Step 401,5 socket (S1, S2, S3, S4, S5) connections are set up between A and B.
Step 402, the heart beat cycle of each connection is set, and starts timing.
Wherein, the heart beat cycle respectively connected is respectively:T1=1min, T2=2min, T3=3min, T4=4min, T5=5min.
Step 403,1 minutes are arrived, and terminal A sends the heartbeat request of S1 connections to server B, and the heartbeat that server B sends S1 connections is responsive to terminal A.
Step 404,2 minutes are arrived, and terminal A sends the heartbeat request of S2 connections to server B, and the heartbeat that server B sends S2 connections is responsive to terminal A.
Step 405,3 minutes are arrived, and terminal A sends the heartbeat request of S3 connections to server B, and the heartbeat that server B sends S3 connections is responsive to terminal A.
Step 406,4 minutes are arrived, and terminal A sends the heartbeat request of S4 connections to server B, and the heartbeat that server B sends S4 connections is responsive to terminal A.
Step 407, arrive within 5 minutes, S5 connections disconnect, it is 4 minutes to determine optimal heart beat cycle.
Arrive within 5 minutes, after S5 connections disconnect, now, the optimal heart beat cycle T redefined scope is [4min, 5min), siding-to-siding block length is 1min, it is desirable to which T precision is 1min for integer minute, because siding-to-siding block length is equal to T precision, therefore the interval lower limit 4min can be defined as optimal heart beat cycle.
The method of the embodiment of the present invention determines that time used time of optimal heart beat cycle is 5 minutes, and existing Method in technology determines that time used time of optimal heart beat cycle is 15 minutes, and therefore, the method for the embodiment of the present invention can effectively shorten time used time for determining optimal heart beat cycle.
Fig. 5 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention four is provided, terminal A periodically sends heartbeat to server B, the scope of optimal heart beat cycle T between terminal A and server B is [1min, 5min], it is required that T precision is integer minute, to be quickly found out the optimal heart beat cycle T (assuming that optimal heart beat cycle is 4min) between A, B, 2 connections are set up between A and B, the step of this method is performed is as follows:
Step 501,2 socket (S1, S2) connections are set up between A and B.
Step 502, the heart beat cycle of each connection is set, and starts timing.
Wherein, the heart beat cycle respectively connected is respectively:T1=1min, T2=3min.
Step 503,1 minutes are arrived, and terminal A sends the heartbeat request of S1 connections to server B, and the heartbeat that server B sends S1 connections is responsive to terminal A.
Step 504,3 minutes are arrived, and terminal A sends the heartbeat request of S2 connections to server B, and the heartbeat that server B sends S2 connections is responsive to terminal A.
Now, the optimal heart beat cycle T redefined scope is [3min, 5min], siding-to-siding block length is 2min, it is required that T precision is 1min for integer minute, because siding-to-siding block length is more than T precision, it is therefore desirable in optimal heart beat cycle T scope [3min, 5min] in, continue to determine optimal heart beat cycle.
Step 505, setting S1, S2 heart beat cycle is respectively:T1=4min, T2=5min, and reclocking.
Step 506,4 minutes are arrived, and terminal A sends the heartbeat request of S1 connections to server B, and the heartbeat that server B sends S1 connections is responsive to terminal A.
Step 507,5 minutes are arrived, and S2 connections disconnect, and it is 4 minutes to determine optimal heart beat cycle.
The method of the embodiment of the present invention determines that time used time of optimal heart beat cycle is 8 minutes, and method of the prior art determines that time used time of optimal heart beat cycle is 15 minutes, therefore, the method for the embodiment of the present invention can effectively shorten time used time for determining optimal heart beat cycle.
Fig. 6 is the determination method signal flow diagram for the optimal heart beat cycle that the embodiment of the present invention five is provided, terminal A Heartbeat is periodically sent to server B, the scope of optimal heart beat cycle T between terminal A and server B is [1min, 5min], it is required that T precision is integer minute, to be quickly found out the optimal heart beat cycle T (assuming that optimal heart beat cycle is 4min) between A, B, 3 connections are set up between A and B, the step of this method is performed is as follows:
Step 601,3 socket (S1, S2, S3) connections are set up between A and B.
Step 602, their heart beat cycle is respectively:T1=1min, T2=3min, T3=5min simultaneously start timing.
Step 603,1 minutes are arrived, and terminal A sends the heartbeat request of S1 connections to server B, and the heartbeat that server B sends S1 connections is responsive to terminal A.
Step 604,3 minutes are arrived, and terminal A sends the heartbeat request of S2 connections to server B, and the heartbeat that server B sends S2 connections is responsive to terminal A.
Step 605,5 minutes are arrived, and S3 disconnects, and set T2=4min, and reclocking.
5 minutes are arrived, after S3 disconnects, now, the optimal heart beat cycle T redefined scope for [3min, 5min), siding-to-siding block length is 2min, it is required that T precision is 1min for integer minute, because siding-to-siding block length is more than T precision, it is therefore desirable in optimal heart beat cycle T scope [3min, in 5min), continue to determine optimal heart beat cycle.
Step 606,4 minutes are arrived, and terminal A sends the heartbeat request of S2 connections to server B, and the heartbeat that server B sends S2 connections is responsive to terminal A.
Step 607, it is 4min to determine optimal heart beat cycle.
The method of the embodiment of the present invention determines that time used time of optimal heart beat cycle is 9 minutes, and method of the prior art determines that time used time of optimal heart beat cycle is 15 minutes, therefore, the method for the embodiment of the present invention can effectively shorten time used time for determining optimal heart beat cycle.
Fig. 7 is the determination structure drawing of device for the optimal heart beat cycle that the embodiment of the present invention six is provided, and the device is used for the determination method for performing optimal heart beat cycle provided in an embodiment of the present invention, and described device includes:
Acquiring unit 701, for obtaining the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
Connection establishment unit 702, is that each connection sets different heart beat cycles for setting up multiple connections in described two equipment rooms, and in the range of the first interval that the acquiring unit 701 is obtained;
Detection unit 703, in the time of maximum heart beat cycle in the different heart beat cycles that the connection establishment unit 702 is set, detecting in the multiple connection the connection disconnected whether occur;
Determining unit 704, for when the testing result of the detection unit 703 is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Preferably, the determining unit 704, specifically for when the testing result of the detection unit 703 is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
Preferably, the connection establishment unit 702, specifically for setting up multiple connections in described two equipment rooms, and the precision for needing to meet according to the optimal heart beat cycle, it is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval that the acquiring unit 701 is obtained.
Preferably, the determining unit 704 includes:
First interval determination subelement 7041, for when the testing result of the detection unit 703 is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
First judgment sub-unit 7042, for judging whether the siding-to-siding block length for the second interval scope that the first interval determination subelement 7041 is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
First optimal heart beat cycle determination subelement 7043, needs what is met for judging that the siding-to-siding block length of the second interval scope is less than or equal to the optimal heart beat cycle when first judgment sub-unit 7042 During precision, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
Preferably, described device also includes:
First circulation triggers subelement 7044, during for judging that the siding-to-siding block length of the second interval scope is more than the precision that the optimal heart beat cycle needs are met when first judgment sub-unit 7042, it regard the second interval scope as the first interval scope, by the connection establishment unit 702 perform it is described set up multiple connections in described two equipment rooms, and be the step of each connection sets different heart beat cycles in the range of the first interval.
Preferably, the determining unit 704, is additionally operable to, when the testing result of the detection unit 703 is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as into the optimal heart beat cycle.
Preferably, the determining unit 704 includes:
Second interval determination subelement 7045, for when the testing result of the detection unit 703 is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
Second judgment sub-unit 7046, for judging whether the siding-to-siding block length for the 3rd interval scope that the second interval determination subelement 7045 is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
Second optimal heart beat cycle determination subelement 7047, during for judging that the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs are met when second judgment sub-unit 7046, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Preferably, described device also includes:
Second circulation triggers subelement 7048, during for judging that the siding-to-siding block length of the 3rd interval scope is more than the precision that the optimal heart beat cycle needs are met when second judgment sub-unit 7046, it regard the 3rd interval scope as the first interval scope, by the connection establishment unit 702 perform it is described set up multiple connections in described two equipment rooms, and be the step of each connection sets different heart beat cycles in the range of the first interval.
Fig. 8 is the equipment structure chart that the embodiment of the present invention seven is provided, and the equipment is used for the determination method for performing optimal heart beat cycle provided in an embodiment of the present invention, and the equipment includes:
Memory 801;
Processor 802;
The memory 801, for storage program instruction;
The processor 802, for performing following operate according to the programmed instruction stored in the memory 801:
Obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
Multiple connections are set up in described two equipment rooms, and are that each connection sets different heart beat cycles in the range of the first interval;
In the different heart beat cycle in the time of maximum heart beat cycle, detect in the multiple connection the connection disconnected whether occur;
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Wherein, the equipment can also include transmitter and receiver, after described two equipment rooms set up multiple connections, send signal by transmitter, signal is received by receiver.
Preferably, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
Preferably, it is described to set up multiple connections in described two equipment rooms, and be that each connection sets different heart beat cycles in the range of the first interval, including:
Multiple connections, and the precision for needing to meet according to the optimal heart beat cycle are set up in described two equipment rooms, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval.
Preferably, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
Judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the second interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
Preferably, the processor 802, is additionally operable to perform following operate according to the programmed instruction stored in the memory 801:
When the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
Preferably, the processor 802, is additionally operable to perform following operate according to the programmed instruction stored in the memory 801:
When testing result is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Preferably, it is described that the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle when testing result is the connection disconnected do not occur in the multiple connection, including:
When testing result is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
Judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
When the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
Preferably, the processor 802, is additionally operable to perform following operate according to the programmed instruction stored in the memory 801:
When the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, and the computer-readable storage medium has program stored therein, the step of determination method of the step of described program is performed including optimal heart beat cycle provided in an embodiment of the present invention.
Professional should further appreciate that, the unit and algorithm steps of each example described with reference to the embodiments described herein, it can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate the interchangeability of hardware and software, the composition and step of each example are generally described according to function in the above description.These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel can realize described function to each specific application using distinct methods, but this realization is it is not considered that beyond the scope of this invention.
One of ordinary skill in the art will appreciate that all or part of step for realizing in above-described embodiment method, which can be by program, carrys out instruction processing unit completion, described program can be stored in computer-readable storage In medium, the storage medium is non-transitory (English:Non-transitory) medium, such as random access memory, read-only storage, flash memory, hard disk, solid state hard disc, tape (English:Magnetic tape), floppy disk (English:Floppy disk), CD (English:Optical disc) and its any combination.
It is described above; the only present invention preferably embodiment, but protection scope of the present invention is not limited thereto, any one skilled in the art the invention discloses technical scope in; the change or replacement that can be readily occurred in, should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (25)

  1. A kind of determination method of optimal heart beat cycle, it is characterised in that methods described includes:
    Obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
    Multiple connections are set up in described two equipment rooms, and are that each connection sets different heart beat cycles in the range of the first interval;
    In the different heart beat cycle in the time of maximum heart beat cycle, detect in the multiple connection the connection disconnected whether occur;
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  2. The method as described in claim 1, it is characterized in that, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
  3. Method as claimed in claim 1 or 2, it is characterised in that described to set up multiple connections in described two equipment rooms, and be that each connection sets different heart beat cycles in the range of the first interval, including:
    Multiple connections, and the precision for needing to meet according to the optimal heart beat cycle are set up in described two equipment rooms, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval.
  4. Method as described in any claim in claims 1 to 3, it is characterised in that described when testing result is the connection disconnected occur in the multiple connection, by the heartbeat week of the connection of the disconnection Phase is defined as the first heart beat cycle, and the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as into the optimal heart beat cycle, including:
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
    Judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
    When the siding-to-siding block length for judging the second interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
  5. Method as claimed in claim 4, it is characterised in that methods described also includes:
    When the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
  6. Method as described in any claim in claim 1 to 5, it is characterised in that methods described also includes:
    When testing result is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  7. Method as claimed in claim 6, it is characterised in that described that the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle when testing result is the connection disconnected do not occur in the multiple connection, including:
    When testing result is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
    Judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the optimal heart beat cycle and needs The precision to be met;
    When the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  8. Method as claimed in claim 7, it is characterised in that methods described also includes:
    When the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
  9. A kind of determining device of optimal heart beat cycle, it is characterised in that described device includes:
    Acquiring unit, for obtaining the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
    Connection establishment unit, is that each connection sets different heart beat cycles for setting up multiple connections in described two equipment rooms, and in the range of the first interval that the acquiring unit is obtained;
    Detection unit, in the time of maximum heart beat cycle in the different heart beat cycles that the connection establishment unit is set, detecting in the multiple connection the connection disconnected whether occur;
    Determining unit, for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  10. Device as claimed in claim 9, it is characterized in that, the determining unit, specifically for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
  11. Device as described in claim 9 or 10, it is characterised in that the connection establishment unit, specifically for setting up multiple connections in described two equipment rooms, and needs completely according to the optimal heart beat cycle The precision of foot, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval that the acquiring unit is obtained.
  12. Device as described in any claim in claim 9 to 11, it is characterised in that the determining unit includes:
    First interval determination subelement, for when the testing result of the detection unit is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
    First judgment sub-unit, for judging whether the siding-to-siding block length for the second interval scope that the first interval determination subelement is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
    First optimal heart beat cycle determination subelement, during for judging that the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs are met when first judgment sub-unit, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
  13. Device as claimed in claim 12, it is characterised in that described device also includes:
    First circulation triggers subelement, during for judging that the siding-to-siding block length of the second interval scope is more than the precision that the optimal heart beat cycle needs are met when first judgment sub-unit, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in connection establishment unit execution, and are the step of each connection sets different heart beat cycles in the range of the first interval.
  14. Device as described in any claim in claim 9 to 13, it is characterized in that, the determining unit, it is additionally operable to, when the testing result of the detection unit is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as into the optimal heart beat cycle.
  15. Device as claimed in claim 14, it is characterised in that the determining unit includes:
    Second interval determination subelement, for being the multiple connection when the testing result of the detection unit In when there is not the connection disconnected, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
    Second judgment sub-unit, for judging whether the siding-to-siding block length for the 3rd interval scope that the second interval determination subelement is determined is less than or equal to the precision that the optimal heart beat cycle needs to meet;
    Second optimal heart beat cycle determination subelement, during for judging that the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs are met when second judgment sub-unit, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  16. Device as claimed in claim 15, it is characterised in that described device also includes:
    Second circulation triggers subelement, during for judging that the siding-to-siding block length of the 3rd interval scope is more than the precision that the optimal heart beat cycle needs are met when second judgment sub-unit, it regard the 3rd interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in connection establishment unit execution, and are the step of each connection sets different heart beat cycles in the range of the first interval.
  17. A kind of equipment, it is characterised in that the equipment includes:
    Memory;
    Processor;
    The memory, for storage program instruction;
    The processor, for performing following operate according to the programmed instruction stored in the memory:
    Obtain the first interval scope that the optimal heart beat cycle of two equipment rooms belongs to;
    Multiple connections are set up in described two equipment rooms, and are that each connection sets different heart beat cycles in the range of the first interval;
    In the different heart beat cycle in the time of maximum heart beat cycle, detect in the multiple connection the connection disconnected whether occur;
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, first heart will be less than in the different heart beat cycle The heart beat cycle of hop cycle is defined as the optimal heart beat cycle.
  18. Equipment as claimed in claim 17, it is characterized in that, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, in the heart beat cycle less than first heart beat cycle in the different heart beat cycle, the minimum heart beat cycle of the difference with first heart beat cycle is defined as the optimal heart beat cycle.
  19. Equipment as described in claim 17 or 18, it is characterised in that described to set up multiple connections in described two equipment rooms, and be that each connection sets different heart beat cycles in the range of the first interval, including:
    Multiple connections, and the precision for needing to meet according to the optimal heart beat cycle are set up in described two equipment rooms, is that each connection sets the different heart beat cycles with chronomere corresponding with the precision in the range of the first interval.
  20. Equipment as described in any claim in claim 17 to 19, it is characterized in that, it is described when testing result be the multiple connection in there is the connection disconnected when, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, the heart beat cycle less than first heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle, including:
    When testing result is the connection disconnected occur in the multiple connection, the heart beat cycle of the connection of the disconnection is defined as the first heart beat cycle, and, determine the second interval scope that the optimal heart beat cycle belongs to, the lower limit of the second interval scope is the heart beat cycle less than first heart beat cycle in the different heart beat cycle, and the upper limit of the second interval scope is first heart beat cycle;
    Judge whether the siding-to-siding block length of the second interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
    Needed when the siding-to-siding block length for judging the second interval scope is less than or equal to the optimal heart beat cycle During the precision to be met, the lower limit of the second interval scope is defined as the optimal heart beat cycle.
  21. Equipment as claimed in claim 20, it is characterised in that the processor, is additionally operable to perform following operate according to the programmed instruction stored in the memory:
    When the siding-to-siding block length for judging the second interval scope, which is more than the optimal heart beat cycle, needs the precision met, it regard the second interval scope as the first interval scope, multiple connections are set up in described two equipment rooms described in performing, and are the step of each connection sets different heart beat cycles in the range of the first interval.
  22. Equipment as described in any claim in claim 17 to 21, it is characterised in that the processor, is additionally operable to perform following operate according to the programmed instruction stored in the memory:
    When testing result is the connection disconnected do not occur in the multiple connection, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  23. Equipment as claimed in claim 22, it is characterised in that described that the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle when testing result is the connection disconnected do not occur in the multiple connection, including:
    When testing result is the connection disconnected do not occur in the multiple connection, determine the 3rd interval scope that the optimal heart beat cycle belongs to, the lower limit of the 3rd interval scope is the maximum heart beat cycle in the different heart beat cycle, and the upper limit of the 3rd interval scope is the upper limit of the first interval scope;
    Judge whether the siding-to-siding block length of the 3rd interval scope is less than or equal to the precision that the optimal heart beat cycle needs to meet;
    When the siding-to-siding block length for judging the 3rd interval scope, which is less than or equal to the optimal heart beat cycle, needs the precision met, the maximum heart beat cycle in the different heart beat cycle is defined as the optimal heart beat cycle.
  24. Equipment as claimed in claim 23, it is characterised in that the processor, is additionally operable to perform following operate according to the programmed instruction stored in the memory:
    When the siding-to-siding block length for judging the 3rd interval scope, which is more than the optimal heart beat cycle, needs the precision met, using the 3rd interval scope as the first interval scope, perform described described two Individual equipment room sets up multiple connections, and is the step of each connection sets different heart beat cycles in the range of the first interval.
  25. A kind of computer-readable storage medium, it is characterised in that the computer-readable storage medium has program stored therein, the step of the step of described program is performed is included as any one of claim 1 to 8.
CN201580029631.9A 2015-04-08 2015-04-08 The determination method, apparatus and equipment of optimal heart beat cycle Active CN106416133B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/076066 WO2016161577A1 (en) 2015-04-08 2015-04-08 Method, apparatus and device for determining optimal heartbeat period

Publications (2)

Publication Number Publication Date
CN106416133A true CN106416133A (en) 2017-02-15
CN106416133B CN106416133B (en) 2019-06-28

Family

ID=57071682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580029631.9A Active CN106416133B (en) 2015-04-08 2015-04-08 The determination method, apparatus and equipment of optimal heart beat cycle

Country Status (2)

Country Link
CN (1) CN106416133B (en)
WO (1) WO2016161577A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547293A (en) * 2018-12-20 2019-03-29 上海数果科技有限公司 Heartbeat data packet transmission method
CN115695251A (en) * 2022-09-13 2023-02-03 浪潮云信息技术股份公司 Self-adaptive heartbeat interval adjusting method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111245946B (en) * 2020-01-15 2022-06-03 郑州春泉节能股份有限公司 Method and device for judging reliability of equipment signal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080310443A1 (en) * 2007-06-18 2008-12-18 Qualcomm Incorporated Communication link allocation based on dynamic trend analysis
US20100262680A1 (en) * 2009-04-13 2010-10-14 Samsung Electronics Co., Ltd. Apparatus and method for determining heartbeat interval of activesync service in wireless communication system
CN103684815A (en) * 2012-09-03 2014-03-26 中国移动通信集团公司 Keep-alive method, device and system for data transmission link
CN104426714A (en) * 2013-08-30 2015-03-18 联想(北京)有限公司 Heart-beat testing method and device for keeping connection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080310443A1 (en) * 2007-06-18 2008-12-18 Qualcomm Incorporated Communication link allocation based on dynamic trend analysis
US20100262680A1 (en) * 2009-04-13 2010-10-14 Samsung Electronics Co., Ltd. Apparatus and method for determining heartbeat interval of activesync service in wireless communication system
CN103684815A (en) * 2012-09-03 2014-03-26 中国移动通信集团公司 Keep-alive method, device and system for data transmission link
CN104426714A (en) * 2013-08-30 2015-03-18 联想(北京)有限公司 Heart-beat testing method and device for keeping connection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547293A (en) * 2018-12-20 2019-03-29 上海数果科技有限公司 Heartbeat data packet transmission method
CN115695251A (en) * 2022-09-13 2023-02-03 浪潮云信息技术股份公司 Self-adaptive heartbeat interval adjusting method and system

Also Published As

Publication number Publication date
WO2016161577A1 (en) 2016-10-13
CN106416133B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
US10560315B2 (en) Method and device for processing failure in at least one distributed cluster, and system
US8185753B2 (en) Storage medium for storing power consumption monitor program, power consumption monitor apparatus and power consumption monitor method
CN106797370B (en) SAS system and traversal method and device thereof
JP6370547B2 (en) Wide area management system, wide area management apparatus, building management apparatus, wide area management method, sensor information transmission method, data acquisition method, and program
CN107666493B (en) Database configuration method and equipment thereof
CN106416133A (en) Method, apparatus and device for determining optimal heartbeat period
CN103645975A (en) Abnormality recovery method and serial bus transmission device
CN109033814A (en) intelligent contract triggering method, device, equipment and storage medium
CN108280020A (en) Monitoring method, device, terminal and the computer storage media of computer equipment
CN105183585A (en) Data backup method and device
JP6039694B2 (en) Wireless scanning and advertisement in electronic devices
CN111198662A (en) Data storage method and device and computer readable storage medium
WO2024082471A1 (en) Inter-node link status monitoring method and apparatus
CN115865701B (en) Node control method, device and system based on daisy chain network
US9081614B2 (en) Managing shared resources in a multi-computer system with failover support
US9575866B1 (en) Diagnostic module for monitoring electronic data transmission
CN116938953A (en) Block chain-based data processing method and device, electronic equipment and storage medium
CN110704198B (en) Data operation method, device, storage medium and processor
KR20170047810A (en) System and method for optimizing network performance based on profiling
CN110636090B (en) Data synchronization method and device under narrow bandwidth condition
CN113625946A (en) Method, system and computer equipment for implementing arbitration of storage cluster
CN109039770B (en) Server CMC refreshing method and device and related equipment
CN103329107B (en) Change message broadcast error detection
CN110381178A (en) NVR module and its out drawing method and POE-NVR mould group
US9882739B2 (en) Method for disabling a legacy loop detect circuit in a beta node

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant