CN104333465B - A kind of method, apparatus and system of eartbeat interval setting - Google Patents

A kind of method, apparatus and system of eartbeat interval setting Download PDF

Info

Publication number
CN104333465B
CN104333465B CN201410602722.4A CN201410602722A CN104333465B CN 104333465 B CN104333465 B CN 104333465B CN 201410602722 A CN201410602722 A CN 201410602722A CN 104333465 B CN104333465 B CN 104333465B
Authority
CN
China
Prior art keywords
eartbeat interval
adjusted
eartbeat
terminal
network
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
CN201410602722.4A
Other languages
Chinese (zh)
Other versions
CN104333465A (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.)
Qianxin Technology Group Co Ltd
Original Assignee
Beijing Qianxin Technology 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 Beijing Qianxin Technology Co Ltd filed Critical Beijing Qianxin Technology Co Ltd
Priority to CN201410602722.4A priority Critical patent/CN104333465B/en
Publication of CN104333465A publication Critical patent/CN104333465A/en
Application granted granted Critical
Publication of CN104333465B publication Critical patent/CN104333465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses the method, apparatus and system of a kind of setting of eartbeat interval, are related to Internet technical field, solve the problems such as fixed brought network load of terminal eartbeat interval is excessive or service response speed is slow.The method comprise the steps that obtaining the state parameter of current network running environment;According to the current eartbeat interval of the state parameter adjust automatically;Eartbeat interval adjusted is handed down to terminal, so that the terminal reports heartbeat message according to the eartbeat interval adjusted.Present invention is mainly used for the network systems in local area network.

Description

A kind of method, apparatus and system of eartbeat interval setting
Technical field
The present invention relates to Internet technical fields, more particularly to the method, apparatus and system of a kind of setting of eartbeat interval.
Background technique
With the rapid development of Internet, the quantity of terminal especially mobile terminal user group is more and more huger.Company, In the environment of the deployment of the large scale networks such as organ, the terminal quantity in network is generally more.In existing network environment, terminal Mainly pass through hypertext transfer protocol (Hypertext transfer protocol, abbreviation HTTP) link between network Mode carries out data interaction, and in this on-link mode (OLM), terminal needs periodically to send heartbeat message, these heartbeat reports to server Literary data volume is smaller, does not have practical significance.Network side is monitored by connection status of the heartbeat message to terminal, is only existed When receiving the heartbeat message that terminal reports, network side can just respond heartbeat message, and different service orders is issued to terminal.
In current network environment, the interval that terminal to server sends heartbeat message is fixed.When transmission heartbeat When the interval of message is too short, heartbeat message is sent frequently, can occupy many signal resources and data resource, due to sending heartbeat report Text it is periodically strong, high using concentration degree the problems such as, the bearing capacity of server be likely to be unable to satisfy terminal and server it Between data so frequent and signal resource interaction, cause huge burden to server, even will cause clothes when serious Business device paralysis.When the interval for sending heartbeat message is too long, issuing for service order needs to wait the long period, and it is real to generate business Now not in time the problem of.
Summary of the invention
In view of this, the invention proposes the method, apparatus and system of a kind of setting of eartbeat interval, main purpose is to solve The certainly fixed brought corresponding problem of terminal eartbeat interval.
First aspect according to the present invention, the present invention provides a kind of methods of eartbeat interval setting, comprising:
Obtain the state parameter of current network running environment;
According to the current eartbeat interval of state parameter adjust automatically;
Eartbeat interval adjusted is handed down to terminal, so that terminal reports heartbeat report according to eartbeat interval adjusted Text.
The second aspect according to the present invention, the present invention also provides a kind of device of eartbeat interval setting, the device packets It includes:
Acquiring unit, for obtaining the state parameter of current network running environment;
Adjustment unit, the current eartbeat interval of state parameter adjust automatically for being obtained according to acquiring unit;
Issuance unit, for adjustment unit eartbeat interval adjusted to be handed down to terminal, so that terminal is according to adjustment Eartbeat interval afterwards reports heartbeat message.
In terms of third according to the present invention, the present invention also provides a kind of system of eartbeat interval setting, which is The network as composed by server and terminal.Wherein, server includes the device such as preceding the second aspect meaning.
By above-mentioned technical proposal, the method, apparatus and system of eartbeat interval setting provided in an embodiment of the present invention can According to the state parameter of the current network running environment got, adjust automatically sends the eartbeat interval of heartbeat message, and existing Technology is compared, and the present invention can be according to current network running environment dynamic adjustment eartbeat interval, thus meeting network load Under the premise of shorten eartbeat interval as far as possible, accelerate the response speed of business.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the method for eartbeat interval setting of the offer of the embodiment of the present invention one;
Fig. 2 shows the flow charts for the method that another eartbeat interval that the embodiment of the present invention one provides is arranged;
Fig. 3 shows a kind of structural schematic diagram of the device of eartbeat interval setting provided by Embodiment 2 of the present invention;
Fig. 4 shows the structural schematic diagram of the device of another eartbeat interval setting provided by Embodiment 2 of the present invention;
Fig. 5 shows the structural schematic diagram of the device of another eartbeat interval setting provided by Embodiment 2 of the present invention;
Fig. 6 shows the structural schematic diagram of the device of another eartbeat interval setting provided by Embodiment 2 of the present invention;
Fig. 7 shows a kind of schematic diagram of the system of eartbeat interval setting of the offer of the embodiment of the present invention three.
Specific embodiment
It is described more fully the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although showing this public affairs in attached drawing The exemplary embodiment opened, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated here Example is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the model of the disclosure It encloses and is fully disclosed to those skilled in the art.
To solve the problems, such as that terminal eartbeat interval is corresponding brought by fixed, the embodiment of the present invention one is provided between a kind of heartbeat Every the method for setting, as shown in Figure 1, this method comprises:
101, the state parameter of current network running environment is obtained.
Networking operational environment in reality is not fixed and invariable, and state parameter is the process of a dynamic change, according to State parameter can monitor the operating condition of network in real time, to be adjusted correspondingly network to guarantee that the network operation is logical Freely.When obtaining the state parameter of current network running environment, packet capturing can be carried out by network analysis software, automatically analyzed out These parameters, thus it is apparent that the operating status and performance of network.These network analysis softwares will be disposed correctly, The data of the whole network can be captured.Alternatively, Simple Network Management Protocol (Simple Network Management can also be passed through Protocol, abbreviation SNMP) make network administrator can in network node (server, work station, router and interchanger etc.) Network efficiency is managed, finds and solves network problem and planning network increases, random message and event report are received by SNMP It accuses, supports whether the equipment that is connected on network of Network Management System monitoring has any to cause the case where managing concern.In addition, The operating status of each terminal in a network can also be obtained by terminal management system.Obtaining current network running environment When state parameter, whole state parameters of available the whole network, also available partial status parameter, the present embodiment do not make this Limitation.
It, can according to the preset time interval periodically on the opportunity for the state parameter for obtaining current network running environment Acquisition state parameter, such as can preset every 10 seconds or every five seconds obtain a current network running environment state parameter; State parameter can also be obtained after receiving the instruction that user issues.
102, the eartbeat interval current according to state parameter adjust automatically.
The case where current networking operational environment is able to reflect due to state parameter, when judge obtain state parameter not When can guarantee that current networking operational environment is unobstructed, eartbeat interval will be suitably turned up, to alleviate the pressure of the network operation; When judging that the state parameter obtained guarantees that current network running environment is unobstructed or even Internet resources have more than needed enough, between heartbeat Every can suitably be turned down, so that network is in optimal operating status, accelerate the speed of service response.In practical applications, may be used To adjust current eartbeat interval according to whole state parameters of the whole network running environment, can also be adjusted according to partial status parameter Current eartbeat interval, the present embodiment to obtain state parameter range with no restriction.
103, eartbeat interval adjusted is handed down to terminal.
Terminal reports heartbeat message after receiving eartbeat interval adjusted, according to eartbeat interval adjusted.It is inciting somebody to action When eartbeat interval adjusted is handed down to terminal, can choose different opportunitys is issued.Such as it can be steady in networking operational environment Eartbeat interval adjusted is issued after fixed, or can also be issued immediately after the adjustment.It in practical applications, can will be after adjustment Eartbeat interval be handed down to whole terminals in network, part terminal can also be handed down to.The present embodiment is not to issuing terminal Range is restricted.
The method of eartbeat interval setting provided in an embodiment of the present invention, can be according to the current network running environment got State parameter, adjust automatically send heartbeat message eartbeat interval, compared with prior art, the present invention can be according to current net Network running environment dynamic adjustment eartbeat interval accelerates industry to shorten eartbeat interval as far as possible under the premise of meeting network load The response speed of business.
Further, as the refinement and extension to above-described embodiment one, as shown in Fig. 2, what above-described embodiment one provided The method of eartbeat interval setting can also be implemented by following manner, and implementation process includes:
201, the state parameter of current network running environment is obtained.
Acquisition state described in step 101 in the mode and above-described embodiment one of state parameter is obtained described in this step The mode of parameter is identical, and details are not described herein again.The state parameter is for characterizing current network load state, network load shape State is proportional with eartbeat interval.The proportional relation can be between the numerical value and heartbeat by representing network load state height Every numerical value between mapping relations embody.Illustratively, current network is obtained by obtaining the state parameter of a certain period Proportional relationship between the numerical value of the corresponding eartbeat interval of the numerical value of load condition can be with are as follows:
1->10s
2->20s
3->30s
4->60s
……
9->160s
10->180s
It should be noted that the number for representing network load state height can be set in illustrative embodiment The upper limit of value is 10, and lower limit 0, the section for representing the numerical value of network load state height can be divided into 100 numerical value, and unit is 0.1.It certainly also include: 1.5- > 15s, 2.2- > 22s, 9.8- > 178s etc., other each numerical value in above-mentioned proportional relationship table Between corresponding relationship do not enumerate herein.The foundation that above-mentioned proportional relationship table is arranged can also be in following step 203 It is embodied in the adjusting relationship of a kind of state parameter and eartbeat interval that are provided in the illustrative embodiment that will be enumerated.
The state parameter may include: dynamic environment parameter and static environment parameter.Wherein, dynamic environment parameter can be with Including number of terminals, CPU occupation proportion, EMS memory occupation ratio, network usage, the network stabilization etc. in network.Static environment Parameter may include memory size, network interface card speed, hard disk speed, hard disk size, network bandwidth, cpu cache size and CPU deposit Device width etc..Such as the terminal quantity in network is more, network load state is higher;CPU occupation proportion is bigger, network load shape State is higher;Network stabilization is poorer, and network load state is higher.
If meeting the terminal quantity run in network in order to as much as possible, the model that will acquire state parameter can choose The number of terminals for being limited in and connecting in network is enclosed, does not consider temporarily to obtain other state parameters.If in order to guarantee the operation of the whole network Environment is unobstructed, then can choose and obtain whole state parameters in network.Illustratively, the state parameter of acquisition can be " network Interior terminal quantity+CPU occupation proportion+network stabilization " or " terminal quantity in network ".
When the state parameter of acquisition is used to characterize network load state, it can be realized by way of column diagram, it is cylindrical Height is used to represent the height of network load state;Corresponding network load can also be corresponded by preset parameter list State.
202, current eartbeat interval is improved according to preset duration increment.
Optionally, since networking operational environment under full load condition there may be running, work as terminal first When the secondary transmission heartbeat message to server, the terminal newly connected in order to prevent makes network excess load, or in order in adjustment heartbeat It is spaced the normal work for avoiding unstable networks before and influencing other terminals, the server can increase according to preset duration Amount improves current eartbeat interval, and network operation pressure can be alleviated before eartbeat interval adjustment in advance by doing so, and avoids new There is the phenomenon that unstable networks when terminal is added.The first time sends heartbeat message to server and refers to have new terminal to connect It sends when tapping into network to server and is again introduced into network after heartbeat message or terminal open connection from network interruption and to clothes Business device sends the case where heartbeat message also belongs to the first time and sends heartbeat message to server.The preset duration increases Amount is a progressive numerical value, be can be set as 0.01 second, that is, when thering is a new terminal connection to enter network, the current heart Jump space increases by 0.01 second automatically, subsequent when not influencing the stability of the network operation to adjust eartbeat interval again.Correspondingly, when having When one terminal opens connection from network interruption, current eartbeat interval can also reduce 0.01 second automatically, after network stabilization again Eartbeat interval is adjusted according to the state parameter of networking operational environment.
203, the eartbeat interval current according to state parameter adjust automatically.
Adjustment eartbeat interval can choose different embodiments.There is a kind of embodiment can be by preset mapping table Search the eartbeat interval of corresponding different conditions parameter.Each state parameter in the mapping table containing networking operational environment, when It, can be according to eartbeat interval corresponding in mapping table between current heartbeat when the state parameter got is occurred in the mapping table Every being adjusted.It, can be in its correspondence if the state parameter got is located in mapping table between two neighboring state parameter Two neighboring eartbeat interval between one eartbeat interval of setting as eartbeat interval adjusted, to enrich covering for mapping table Range facilitates the adjustment at subsequent heartbeats interval.
Another embodiment can also be adjusted eartbeat interval by preset step value, and the step value can To be set as 0.01 second, when the state parameter of acquisition changes, corresponding eartbeat interval is corresponding according to the step value of setting Variation.For example, current eartbeat interval is increased by 0.01 second when one terminal of every increase in network;When CPU occupation proportion When improving 0.1%, current eartbeat interval is increased by 0.01 second;It, will be between current heartbeat when network usage decline 0.1% Every reduction 0.01 second.Illustratively, specific as follows the present embodiment provides the adjusting relationship of a kind of state parameter and eartbeat interval:
1) relationship of number of terminals and eartbeat interval:
(0,100)->10s
(100-2000)->20s
(2000-5000)->30s
(5000-10000)->60s
(10000-20000)->120s
(20000-)->180s
2) relationship of network usage and eartbeat interval:
10%- > 10s
30%- > 30s
50%- > 60s
70%- > 120s
90%- > 170s
3) relationship of CPU usage and eartbeat interval:
10%- > 10s
30%- > 30s
50%- > 60s
70%- > 120s
90%- > 170s
The state parameter of above-mentioned example and the adjusting relationship of eartbeat interval are a kind of embodiment, this specific implementation With no restriction to this, the relationship between state parameter and eartbeat interval can also be adjusted example by other means.
In actual network environment, if the state parameter of networking operational environment once changes, server is just stood Eartbeat interval is adjusted, this may cause server to adjust eartbeat interval repeatedly within a certain period of time, so that system be made to provide Source consumes excessively.Accordingly, it is considered to which the problem of arriving server reasonable employment, can choose and periodically adjusted automatically according to state parameter Whole current eartbeat interval, such as can be every 50 seconds adjust automatically eartbeat intervals, or it can also be in the touching for receiving user After sending instructions, according to the current eartbeat interval of state parameter adjust automatically.Eartbeat interval is adjusted by this kind of selection different opportunitys Mode, can be to avoid eartbeat interval be frequently adjusted when the state parameter of networking operational environment is unstable, in network operation ring Border once adjusts after stablizing, and effectively reduces the waste to server process resource.
204, current eartbeat interval is handed down to terminal.
Optionally, when terminal sends heartbeat message to server for the first time, the server can be first by the current heart It is handed down to the terminal in jump space.This is done because in actual networking operational environment there may be such a case, After i.e. terminal is adjusted according to the eartbeat interval adjusted received, the state parameter of networking operational environment becomes again Change, eartbeat interval be restored to again before eartbeat interval or become other eartbeat intervals.If sent in heartbeat message unstable Frequent changes send frequency under fixed environment, and network will generate concussion effect due to frequently adjusting eartbeat interval, cause net Network fluctuation of service.It therefore, first will be current when can access new terminal in a network in order to avoid network generates concussion effect Eartbeat interval is sent to terminal, and heartbeat message adjusted is sent to terminal again after networking operational environment is stablized.
205, judge whether eartbeat interval adjusted exceeds preset eartbeat interval section.
In actual networking operational environment, it will usually according to each state parameter at full capacity under conditions of calculate one Theoretical eartbeat interval lower limit value can also be arranged an eartbeat interval upper limit value according to actual business demand, thus be formed One preset eartbeat interval section.Eartbeat interval adjusted fall in this section can not only guarantee the unobstructed of the network operation but also Guarantee that service response is quick.
The eartbeat interval obtained after adjust automatically is optimal state, it is possible that being more than preset eartbeat interval area Between.Therefore, eartbeat interval adjusted can be judged as optional step.If eartbeat interval adjusted is beyond default Eartbeat interval section, then carry out step 206 and secondary treatment carried out to the eartbeat interval adjusted.In practical situations may be used To implement in the following way: if eartbeat interval adjusted is greater than the upper limit value in preset eartbeat interval section, by institute The upper limit value for stating preset eartbeat interval section is used as eartbeat interval adjusted;If eartbeat interval adjusted is less than The lower limit value in preset eartbeat interval section, then using the lower limit value in the preset eartbeat interval section as heartbeat adjusted Interval uses.Alternatively, can also directly abandon the eartbeat interval after adjustment more than preset eartbeat interval section, continue to use Eartbeat interval before adjustment.
It should be noted that a kind of optional way of the step 205 as the present embodiment, can execute after step 204, Certainly, when not executing step 205, scheme shown in Fig. 2 can also only have step 201,202,203,204 and step 207 To realize.Likewise, step 202, step 204 respectively as a kind of optional way, can both individually participate in step 201, 203 and step 207 in form a kind of embodiment, can also participate in jointly in step 201,203 and step 207 formed it is another Kind embodiment.In the embodiment for thering is any one optional step 202,204 and step 205 to participate in, equally it can achieve According to current network running environment dynamic adjustment eartbeat interval, shorten eartbeat interval as far as possible under the premise of meeting network load, The response speed of quickening business.
206, secondary treatment is carried out to eartbeat interval adjusted.
When judging result is that eartbeat interval adjusted is greater than (or being less than) preset eartbeat interval section in step 205 When upper limit value (or lower limit value), this step is executed.Specific implementation procedure is referred to the mode provided in above-mentioned steps 205 reality It applies.
207, eartbeat interval adjusted is handed down to terminal.
When the eartbeat interval fallen in preset eartbeat interval section after adjustment is handed down to terminal, after can choose adjustment It issues immediately, also can choose deferred delivery.Deferred delivery eartbeat interval adjusted can be to avoid network operation unstable state There is terminal and frequently changes the phenomenon that sending heartbeat message frequency in timing, reduces the waste to server process resource and eliminates net The concussion effect generated in network due to frequently adjusting eartbeat interval thereby guarantees that the stable operation of network system.
It is similar in acquisition of different opportunitys state parameter from above-mentioned steps 201, implementing deferred delivery heartbeat adjusted When interval, eartbeat interval adjusted is issued to terminal when can send instructions in the case where user triggers, it can also prolonging according to setting Slow time delay issues eartbeat interval adjusted, such as can pass through delay in 5 seconds or 10 seconds after eartbeat interval adjustment It is sent again to terminal.How the present embodiment is to issuing eartbeat interval adjusted with no restriction.
For the implementation to send instructions under user's triggering, when user feels to need to adjust according to the experience of network actual motion When eartbeat interval, server calls issue functional interface and provide interface or the window of human-computer interaction for network management personnel, for network management people Send instructions under member's triggering eartbeat interval.
By above-mentioned technical proposal, the method for the eartbeat interval setting that the embodiment of the present invention one provides can be according to acquisition The state parameter of the current network running environment arrived, adjust automatically send the eartbeat interval of heartbeat message, compared with prior art, The embodiment of the present invention one can be according to current network running environment dynamic adjustment eartbeat interval, thus before meeting network load Shortening eartbeat interval as far as possible is put, the response speed of business is accelerated.
In addition, the method for the eartbeat interval setting that the embodiment of the present invention one provides is being adjusted when accessing new terminal in network It is first improved between current eartbeat interval and deferred delivery heartbeat adjusted according to preset duration increment before whole eartbeat interval Every can not only reduce influence of the terminal being newly added to network stabilization and can be avoided network operation unstable state timing There is terminal and frequently change the phenomenon that sending heartbeat message frequency, reduce the waste to server process resource and eliminates in network The concussion effect generated due to frequently adjusting eartbeat interval thereby guarantees that the stable operation of network system.
Further, as an implementation of the above method, second embodiment of the present invention provides a kind of settings of eartbeat interval Device, the device can be located in server, can also have data interaction relationship independently of server but between server, To realize above-mentioned method shown in fig. 1 or fig. 2.As shown in figure 3, the device include: acquiring unit 31, adjustment unit 32 and Issuance unit 33, wherein
Acquiring unit 31, for obtaining the state parameter of current network running environment;
Adjustment unit 32, the current eartbeat interval of state parameter adjust automatically for being obtained according to acquiring unit 31;
Issuance unit 33, for the eartbeat interval adjusted of adjustment unit 32 to be handed down to terminal so that terminal according to Eartbeat interval adjusted reports heartbeat message.
Further, as shown in figure 4, the adjustment unit 32 includes:
Searching module 321, for searching the eartbeat interval of the corresponding state parameter by preset mapping table;
Module 322 is adjusted, for being adjusted by preset step value to the eartbeat interval.
Further, the adjustment unit 32 is for periodically according between the current heartbeat of the state parameter adjust automatically Every the adjustment unit 32 is also used to after receiving the triggering command of user, current according to the state parameter adjust automatically Eartbeat interval.
Further, as shown in figure 5, the issuing unit 33 includes:
Selecting module 331, for selecting current eartbeat interval when terminal sends heartbeat message to server for the first time It is handed down to the terminal.
Further, as shown in figure 5, the issuing unit 33 includes:
Postponement module 332 is used for when terminal sends heartbeat message to server for the first time, after adjusting described in deferred delivery Eartbeat interval.
Further, as shown in fig. 6, the adjustment unit 32 includes:
Module 323 is improved, is used for when terminal sends heartbeat message to server for the first time, according to preset duration increment Improve current eartbeat interval.
Further, as shown in fig. 6, the adjustment unit 32 includes:
Judgment module 324, for judging whether the eartbeat interval adjusted exceeds preset eartbeat interval section, if The eartbeat interval adjusted exceeds preset eartbeat interval section, then carries out secondary place to the eartbeat interval adjusted Reason.
Further, as shown in fig. 6, the adjustment unit 32 includes:
Processing module 325, when for being greater than the upper limit value in the eartbeat interval section when the eartbeat interval adjusted, The upper limit value in the eartbeat interval section is used as eartbeat interval adjusted, alternatively, for working as the heart adjusted When jump space is less than the lower limit value in the eartbeat interval section, using the lower limit value in the eartbeat interval section as the heart adjusted Jump space uses.
Further, as shown in fig. 6, the adjustment unit 32 includes:
Discard module 326 continues to use adjustment for abandoning the eartbeat interval beyond default eartbeat interval section after adjustment Preceding eartbeat interval.
By above-mentioned technical proposal, the device of eartbeat interval setting provided by Embodiment 2 of the present invention can be according to acquisition The state parameter of the current network running environment arrived, adjust automatically send the eartbeat interval of heartbeat message, compared with prior art, The embodiment of the present invention two can be according to current network running environment dynamic adjustment eartbeat interval, thus before meeting network load Shortening eartbeat interval as far as possible is put, the response speed of business is accelerated.
In addition, the device of eartbeat interval setting provided by Embodiment 2 of the present invention is being adjusted when accessing new terminal in network It is first improved between current eartbeat interval and deferred delivery heartbeat adjusted according to preset duration increment before whole eartbeat interval Every can not only reduce influence of the terminal being newly added to network stabilization and can be avoided network operation unstable state timing There is terminal and frequently change the phenomenon that sending heartbeat message frequency, reduce the waste to server process resource and eliminates in network The concussion effect generated due to frequently adjusting eartbeat interval thereby guarantees that the stable operation of network system.
Further, as an implementation of the above method and the application of above-mentioned apparatus, as shown in fig. 7, the present invention is implemented Example three additionally provides a kind of system of eartbeat interval setting, which is to be made of server 71 and terminal 72.Server 71 wraps Contain device shown in any width in Fig. 3, Fig. 4, Fig. 5 and Fig. 6 in embodiment two.
By above-mentioned technical proposal, the system for the eartbeat interval setting that the embodiment of the present invention three provides can be according to acquisition The state parameter of the current network running environment arrived, adjust automatically send the eartbeat interval of heartbeat message, compared with prior art, The embodiment of the present invention three can be according to current network running environment dynamic adjustment eartbeat interval, thus before meeting network load Shortening eartbeat interval as far as possible is put, the response speed of business is accelerated.
In addition, the system for the eartbeat interval setting that the embodiment of the present invention three provides is being adjusted when accessing new terminal in network It is first improved between current eartbeat interval and deferred delivery heartbeat adjusted according to preset duration increment before whole eartbeat interval Every can not only reduce influence of the terminal being newly added to network stabilization and can be avoided network operation unstable state timing There is terminal and frequently change the phenomenon that sending heartbeat message frequency, reduce the waste to server process resource and eliminates in network The concussion effect generated due to frequently adjusting eartbeat interval thereby guarantees that the stable operation of network system.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be and not represent the superiority and inferiority of each embodiment for distinguishing each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the denomination of invention according to an embodiment of the present invention (as determined in website The device of Hyperlink rank) in some or all components some or all functions.The present invention is also implemented as being used for Some or all device or device programs of method as described herein are executed (for example, computer program and calculating Machine program product).It is such to realize that program of the invention can store on a computer-readable medium, or can have one Or the form of multiple signals.Such signal can be downloaded from an internet website to obtain, or be provided on the carrier signal, Or it is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (8)

1. a kind of method of eartbeat interval setting, which is characterized in that the described method includes:
The state parameter of current network running environment is obtained, the state parameter is for characterizing network load state, the network Load condition and the eartbeat interval are proportional;
According to the current eartbeat interval of the state parameter adjust automatically, comprising: searched by preset mapping table described in corresponding to The eartbeat interval of state parameter;Alternatively, being adjusted by preset step value to the eartbeat interval;
Judge whether the eartbeat interval adjusted exceeds preset eartbeat interval section;
If the eartbeat interval adjusted exceeds preset eartbeat interval section, the eartbeat interval adjusted is carried out Secondary treatment further comprises: when the eartbeat interval adjusted is greater than the upper limit value in the eartbeat interval section, by institute The upper limit value for stating eartbeat interval section is used as eartbeat interval adjusted, when the eartbeat interval adjusted is less than described When the lower limit value in eartbeat interval section, the lower limit value in the eartbeat interval section is used as eartbeat interval adjusted;With/ Or, the eartbeat interval adjusted is abandoned, the eartbeat interval before continuing to use adjustment;
Eartbeat interval adjusted is handed down to terminal, so that the terminal reports the heart according to the eartbeat interval adjusted Jump message;
It is described eartbeat interval adjusted is handed down to terminal before, comprising: when terminal for the first time to server send heartbeat When message, current eartbeat interval is handed down to the terminal by the server;And/or
Before the eartbeat interval current according to the state parameter adjust automatically, comprising: when terminal is for the first time to service When device sends heartbeat message, the server improves current eartbeat interval according to preset duration increment.
2. the method according to claim 1, wherein the heart current according to the state parameter adjust automatically Jump space, comprising:
Eartbeat interval periodically current according to the state parameter adjust automatically;Alternatively,
After receiving the triggering command of user, according to the current eartbeat interval of the state parameter adjust automatically.
3. being wrapped the method according to claim 1, wherein described be handed down to terminal for eartbeat interval adjusted It includes:
When terminal sends heartbeat message to server for the first time, the server delays are issued between the heartbeat adjusted Every.
4. according to the method in any one of claims 1 to 3, which is characterized in that the state of the networking operational environment is joined Number includes:
Number of terminals, network bandwidth, hard disk speed in network, memory size, EMS memory occupation ratio, network interface card speed, cpu cache are big Small, CPU register width and CPU occupation proportion.
5. a kind of device of eartbeat interval setting, which is characterized in that described device includes:
Acquiring unit, for obtaining the state parameter of current network running environment;
Adjustment unit, the current eartbeat interval of the state parameter adjust automatically for being obtained according to the acquiring unit;
The adjustment unit includes: searching module, adjustment module, judgment module, processing module and discard module;
Searching module, for searching the eartbeat interval of the corresponding state parameter by preset mapping table;
Module is adjusted, for being adjusted by preset step value to the eartbeat interval;
Judgment module, for judging whether the eartbeat interval adjusted exceeds preset eartbeat interval section, if the tune Eartbeat interval after whole exceeds preset eartbeat interval section, then carries out secondary treatment to the eartbeat interval adjusted;
Processing module will be described when for being greater than the upper limit value in the eartbeat interval section when the eartbeat interval adjusted The upper limit value in eartbeat interval section is used as eartbeat interval adjusted, alternatively, for working as the eartbeat interval adjusted Less than the eartbeat interval section lower limit value when, using the lower limit value in the eartbeat interval section as eartbeat interval adjusted It uses;
Discard module, for abandoning the heart after adjusted beyond the eartbeat interval for presetting eartbeat interval section, before continuing to use adjustment Jump space;
Issuance unit, for adjustment unit eartbeat interval adjusted to be handed down to terminal so that the terminal according to The eartbeat interval adjusted reports heartbeat message;
The issuing unit includes: selecting module, for when terminal sends heartbeat message to server for the first time, selection to be current Eartbeat interval be handed down to the terminal;
The adjustment unit includes: raising module, is used for the service when terminal sends heartbeat message to server for the first time Device improves current eartbeat interval according to preset duration increment.
6. device according to claim 5, which is characterized in that the adjustment unit is used for:
Eartbeat interval periodically current according to the state parameter adjust automatically;
After receiving the triggering command of user, according to the current eartbeat interval of the state parameter adjust automatically.
7. device according to claim 5, which is characterized in that the issuing unit includes:
Postponement module is used for the heartbeat adjusted described in deferred delivery when terminal sends heartbeat message to server for the first time Interval.
8. a kind of system of eartbeat interval setting, which is characterized in that the system is the network as composed by server and terminal, Wherein, the server includes the device as described in any one of claim 5 to claim 7.
CN201410602722.4A 2014-10-31 2014-10-31 A kind of method, apparatus and system of eartbeat interval setting Active CN104333465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410602722.4A CN104333465B (en) 2014-10-31 2014-10-31 A kind of method, apparatus and system of eartbeat interval setting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410602722.4A CN104333465B (en) 2014-10-31 2014-10-31 A kind of method, apparatus and system of eartbeat interval setting

Publications (2)

Publication Number Publication Date
CN104333465A CN104333465A (en) 2015-02-04
CN104333465B true CN104333465B (en) 2019-06-11

Family

ID=52408124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410602722.4A Active CN104333465B (en) 2014-10-31 2014-10-31 A kind of method, apparatus and system of eartbeat interval setting

Country Status (1)

Country Link
CN (1) CN104333465B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378844B (en) * 2014-10-22 2018-04-10 新华三技术有限公司 A kind of transmission method and equipment of tunnel keepalive message
MX2018000946A (en) 2015-09-16 2018-06-07 Guangdong Oppo Mobile Telecommunications Corp Ltd Method and device for adjusting communication parameters.
CN105471626A (en) * 2015-11-16 2016-04-06 北京奇虎科技有限公司 Method and system for distributing storage data of internal memory
CN105897499A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Distributed storage system node state monitoring method, center code and system
CN107517136A (en) * 2016-06-16 2017-12-26 中兴通讯股份有限公司 The implementation method of heartbeat keep-alive, apparatus and system
CN107645529B (en) * 2016-07-21 2020-06-30 腾讯科技(深圳)有限公司 Heartbeat packet sending method and device
CN107995235A (en) * 2016-10-26 2018-05-04 中国移动通信有限公司研究院 The method and terminal that a kind of keep-alive time determines
CN106452978A (en) * 2016-11-25 2017-02-22 深圳怡化电脑股份有限公司 Method and device for detecting communication abnormity
CN106788888B (en) * 2016-12-09 2020-10-16 武汉斗鱼网络科技有限公司 Method and system for improving communication success rate of android mobile terminal in weak network environment
CN108616903A (en) * 2016-12-19 2018-10-02 南宁富桂精密工业有限公司 Link keep-alive method between AC and AP and system
CN107249136A (en) * 2017-06-07 2017-10-13 北京潘达互娱科技有限公司 Method for connecting network and device
CN107589436A (en) * 2017-09-21 2018-01-16 深圳市中兴物联科技有限公司 The compensation method of vehicle driving trace and device, computer-readable recording medium
CN110958154A (en) * 2019-11-06 2020-04-03 长沙理工大学 Heartbeat interval dynamic adjustment method, device and system based on node heat

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148722A (en) * 2011-01-20 2011-08-10 深圳市同洲电子股份有限公司 Method and system for detecting data interaction state by using heartbeats, and proxy server
CN102843250A (en) * 2011-06-21 2012-12-26 中兴通讯股份有限公司 Adaptive method and adaptive device of heartbeat cycle
CN103685241A (en) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 Adaptive heartbeat method and adaptive heartbeat system for maintaining long connection of TCP (transmission control protocol)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080165796A1 (en) * 2007-01-05 2008-07-10 International Business Machines Corporation Method for a heartbeat algorithm for a dynamically changing network environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148722A (en) * 2011-01-20 2011-08-10 深圳市同洲电子股份有限公司 Method and system for detecting data interaction state by using heartbeats, and proxy server
CN102843250A (en) * 2011-06-21 2012-12-26 中兴通讯股份有限公司 Adaptive method and adaptive device of heartbeat cycle
CN103685241A (en) * 2013-11-26 2014-03-26 中国科学院计算技术研究所 Adaptive heartbeat method and adaptive heartbeat system for maintaining long connection of TCP (transmission control protocol)

Also Published As

Publication number Publication date
CN104333465A (en) 2015-02-04

Similar Documents

Publication Publication Date Title
Gan et al. An open-source benchmark suite for microservices and their hardware-software implications for cloud & edge systems
US10606662B2 (en) System and method for processing task resources
US9270521B2 (en) Provisioning and managing a cluster deployed on a cloud
US10320623B2 (en) Techniques for tracking resource usage statistics per transaction across multiple layers of protocols
CN105593823B (en) Method, system and computer readable storage medium for the data packet flows between the virtual machine VM in monitoring data center
CN103853812B (en) Method and system for providing web page
US9442827B2 (en) Simulation environment for distributed programs
CN103034517B (en) Browser controls tool loads method and apparatus
CN105100260B (en) A kind of method and device to be accessed by proxy server
US9420068B1 (en) Log streaming facilities for computing applications
JP4688224B2 (en) How to enable real-time testing of on-demand infrastructure to predict service quality assurance contract compliance
US7146563B2 (en) Maintaining screen and form state in portlets
Meng et al. Enhanced monitoring-as-a-service for effective cloud management
Lo et al. A comparative study of real workload traces and synthetic workload models for parallel job scheduling
CN102279884B (en) Data acquiring and displaying method, system and Web server based on Web pages
US9218203B2 (en) Packet scheduling in a multiprocessor system using inter-core switchover policy
US8533724B1 (en) Virtual resource provisioning by assigning colors to virtual resources in multi-tenant resource pool
CN104219316B (en) A kind of call request processing method and processing device in distributed system
US8793657B2 (en) Visual debugger for dynamic XSL transformations
US6424993B1 (en) Method, apparatus, and computer program product for server bandwidth utilization management
US10447789B2 (en) Distributed flow control
CN105389191B (en) A kind of method for upgrading software based on LAN, device and system
EP2141645A1 (en) Method and apparatus for distributed application context-aware transaction processing
Pries et al. An HTTP web traffic model based on the top one million visited web pages
CN104991850B (en) The heartbeat packet control method and device of a kind of application program

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20161116

Address after: 100088 Jiuxianqiao Chaoyang District Beijing Road No. 10, building 15, floor 17, layer 1701-26, 3

Applicant after: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

Applicant before: Qizhi Software (Beijing) Co., Ltd.

C41 Transfer of patent application or patent right or utility model
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: No. 32, Building 3, 102, 28 Xinjiekouwai Street, Xicheng District, Beijing

Patentee after: Qianxin Technology Group Co., Ltd.

Address before: Beijing Chaoyang District Jiuxianqiao Road 10, building 15, floor 17, layer 1701-26, 3

Patentee before: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD.

CP03 Change of name, title or address