Background technology
Transmission Control Protocol is a most widely used agreement in the Internet, and it provides reliable end-to-end service, and as the WWW that we use always, the TCP that TELNET, EMAIL etc. are to use is as transport layer protocol.Just show that in the statistics of Bell Laboratory in 1997 byte that Transmission Control Protocol is born and message communication business are respectively to account for 95% and 90%, so Transmission Control Protocol is most important for the quality of network service.The application of Transmission Control Protocol is at present moved towards wireless network from cable network, and the roaming problem has then been brought the research of Transmission Control Protocol in heterogeneous wireless network between the different wireless access technologys.
Since V.Jacobson proposed the TCP congestion avoidance algorithm, the researcher had a large amount of work that its performance is optimized both at home and abroad.Wherein have a class to improve algorithm, as TCP-Vegas, TCP-Westwood, TCP-Veno etc., they need minimum MIN-RTT two-way time (Minimum Round Trip Time) as one of key parameter of algorithm.If it is inaccurate that calculate minimum two-way time,, make network utilization descend with the decreased performance that causes in various degree.
Be the no buffer memory two-way time RTT (Round Trip Time) of bottleneck routing node buffer queue when being zero minimum two-way time.But because the observation problem can not directly obtain actual minimum two-way time, but sample each two-way time, then the minimum two-way time that obtains estimating by certain calculation method by observation.At present minimum two-way time of the algorithm that adopted of researcher is deeply considered the situation in heterogeneous wireless network, and minimum two-way time of the computational methods that adopt in the existing Transmission Control Protocol mainly contain two kinds, and are as follows:
1. the minimum two-way time of adopting whole TCP to connect to monitor in life cycle, TCP-Vegas and TCP-Westwood adopted this scheme exactly as its minimum two-way time.Shown in Fig. 1 (a) flow process, concrete grammar be each two-way time sampling and existing record minimum two-way time compare, if sampling two-way time less than minimum two-way time, then this two-way time sampled value as minimum two-way time; If sampling two-way time more than or equal to minimum two-way time, then keeps current minimum two-way time constant.
2. in TCP-Veno be exactly to adopt this scheme as its minimum two-way time the minimum two-way time that monitors in the employing special time period.With scheme 1 contrast, this scheme has added the judgement of replacement trigger point, and be the minimum two-way time of replacement trigger point the minimum two-way time that draws at last.Concrete grammar is by shown in Fig. 1 (b) flow process, judges whether to be in the replacement trigger point earlier for each sampling two-way time and promptly takes place overtime or during three duplicate answer ACKS (Acknowledgements).If then minimum is changed to the current round trip time sampling two-way time; If not, then compare the minimum two-way time with existing record, if two-way time sampling less than minimum two-way time, then this two-way time sampled value as minimum two-way time; If sampling two-way time more than or equal to minimum two-way time, then keeps current minimum two-way time constant.
The computational methods of above-mentioned two kinds of minimum two-way times can not adapt in the heterogeneous wireless network variable link delay situation, may cause error two-way time that obtains excessive.Be depicted as low delay network 200 seconds time the (no buffer memory two-way time 75 milliseconds) under the situation of high latency network (no buffer memory two-way time 305 milliseconds) switching as Fig. 2 (a), employing scheme 1 can not be updated to value bigger in the high latency network to a less minimum two-way time, thereby cause significant error.Fig. 2 (b) is the simulation result of employing scheme 1, because the trigger point is provided with problem, employing scheme 2 causes long-time minimum two-way time excessive, for example about 350 seconds.
Summary of the invention
To calculate minimum error two-way time in heterogeneous wireless network excessive in order to overcome existing computational methods, can not accurately obtain the problem of minimum two-way time, the present invention launches research to this, has proposed a kind of general accurate minimum computational methods two-way time that can be applicable to various link delay states-minimum passive increasing two-way time and has actively reduced PIAD algorithm ((Passive-Increase Aggressive-Decrease) computational methods and calculation element.This scheme specifically comprises: the two-way time of sampling module sampling heterogeneous wireless network, obtain sampling two-way time; Comparison module will be sampled two-way time and system compares minimum two-way time; Judge module according to comparison module return value, timer state and two-way time sample states judge next mode hopping piece; Control treatment module determines to carry out the mode of minimum algorithm two-way time according to the court verdict of judge module, if two-way time sampling is less than system minimum two-way time, then carry out and actively reduce the AD algorithm, promptly directly system is reduced to the current round trip time sampling minimum two-way time fully, if timer 2 is in opening, then close; If two-way time sampling is not less than system minimum two-way time, then carry out the passive PI of increasing algorithm, be to enter corresponding PI process after judge module is judged sample two-way time minimum state and timer 1 timeout mode, and determine to trigger effective sampling time two-way time of adopting after the PI process and put T, last sampling two-way time is less than or equal to the time interval T3 of minimum value two-way time according to distance, current congestion window size cwnd, current round trip time sampling rtt determines the changeable weight factor mu; The PI algoritic module is according to minimum minrtt two-way time (k-1) of preceding subsystem, set up the difference equation of minimum two-way time and the two-way time sampling curve f of current system (t), minrtt (k)=minrtt (k-1) * μ+f (T) * (1-μ), PI algoritic module call minimum minrtt two-way time (k) of the current system of this Equation for Calculating.If the PI algoritic module is that then T is this minimum sampling time two-way time point by minimum triggering two-way time; If by timer 1 overtime triggering, T is interval inner curve f (t) minimum value of timer 1 this a timing time point.The throughput judge module judge timer 2 in time-count cycle throughput whether increase, if minimum rollback two-way time is not carried out in throughput increase then to represent that previous timer 1 triggers the PI process that enters effective; If throughput does not increase, then carry out minimum rollback two-way time, minimum is return back to previous minimum value two-way time two-way time.
Timer 2 is in closed condition at ordinary times, and is overtime and enter the PI process and activate timing by timer 1.Overtime back timer will cut out and wait for next timer 1 overtime activation.
The present invention uses different computational methods according to sampling two-way time, and the employing changeable weight factor, can calculate minimum two-way time comparatively accurately, the TCP that depends on minimum two-way time is improved agreement accomplished the normal performance of performance in heterogeneous wireless network, not have to occur owing to switch and cause the minimum two-way time inaccurate performance that causes seriously to descend.
Embodiment
The present invention proposes a kind of network minimum round-trip time PIAD calculation element, comprises, and sampling module, comparison module, judge module, control treatment module, obtains the current round trip time sampling at the two-way time of sampling module sampling heterogeneous wireless network; Comparison module compares current round trip time sampling and system minimum two-way time; Judge module according to comparison module return value, timer state and two-way time sample states judge next mode hopping bulk state; Control treatment module determines to carry out the mode of minimum algorithm two-way time according to the court verdict of judge module; If carrying out less than system minimum two-way time, the current round trip time sampling actively reduces the AD algorithm; Otherwise carry out the passive PI of increasing algorithm.The described AD algorithm that actively reduces is directly minimum to be reduced to the current round trip time sampling two-way time fully, if the timer 2 unlatching is then closed; The passive PI algorithm that increases is that by minimum or the timer 1 overtime triggering of sampling a two-way time, control treatment module determines to trigger the effective sampling time two-way time point T that adopts after the PI process according to triggering mode; And according to the time interval T3 that is less than or equal to minimum value two-way time apart from last sampling two-way time, current congestion window size cwnd, current round trip time sampling rtt determines the changeable weight factor mu; According to minimum minrtt two-way time (k-1) of preceding subsystem, the PI algoritic module is set up the difference equation of current minimum two-way time and two-way time sampling curve f (t), minrtt (k)=minrtt (k-1) * μ+f (T) * (1-μ) calls current minimum minrtt two-way time (k) of this Equation for Calculating.
Be illustrated in figure 3 as minimum round-trip time PIAD algorithm flow chart of the present invention.The two-way time of sampling module sampling heterogeneous wireless network, obtain sampling two-way time, after each sampling, comparison module will be sampled two-way time and current system minimum two-way time (PIAD algorithm result of calculation minimum two-way time of last time) compares, judge module is judged current two-way time of sampling whether less than current system minimum two-way time, carries out and actively reduces AD algorithm (Aggressive-Decrease) if call the AD algoritic module; Otherwise call the PI algoritic module and carry out the passive PI algorithm (Passive-Increase algorithm) that increases.
Partly carry out AD algorithm and PI algorithm respectively by the AD algorithm in algoritic module part and PI algorithm, AD algorithm and PI algorithm specifically comprise the steps,
AD algorithm implementation:
AD algorithm part directly is reduced to the current round trip time sampling fully with minimum two-way time, that is, and and minimum two-way time=current round trip time.And the state of judgement timer 2, if timer 2 is opened, then transmitting control commands is closed this timer.
PI algorithm implementation:
PI algorithm implementation comprises that triggering enters the PI process and minimum rollback two parts flow process two-way time is formed, if the current round trip time sampling that sampling module obtains is not less than current system minimum two-way time, PI algorithm part to sampling two-way time carry out trigger its enter the PI process and minimum two-way time rollback.
1. trigger and enter the PI process and may further comprise the steps:
Judge module judges whether to be triggered or timer 1 overtime triggering PI process by the minimum of sampling a two-way time, effective sampling time two-way time point T that control treatment module is determined to adopt in the PI process according to triggering mode, if triggered by the minimum of sampling a two-way time, then T is this minimum sampling time two-way time point; If by timer 1 overtime triggering, T is interval inner curve f (t) minimum value of this timing of timer 1 time point (asking method with reference to minimum value between in the higher mathematics full curve closed zone).
The PI algoritic module calls formula: minrtt (k)=minrtt (k-1) * μ+f (T) * (1-μ) calculates current minimum minrtt two-way time (k).
Below two kinds of triggering modes are specifically described.
A. two-way time, sampling was triggered by a minimum, and then effectively sampling time two-way time point T is this minimum sampling time two-way time point.Consider that TCP adopts the unit of clock ticktack as two-way time in actual applications, in fact all be the integral multiple of clock ticktack the two-way time that observes, and this kind timing mode also can cause sampling two-way time and actual value to have the error that is a clock ticktack to the maximum.In order to eliminate error effect, so the minimum of locating to use also has a precondition, that be exactly sample this minimum and nearest two-way time the difference of maximum must be greater than a clock ticktack.
B. by timer 1 overtime triggering, and Active Timer 2 timing, effectively sampling time two-way time point T is interval inner curve f (t) minimum value of timer 1 this timing time point.Timer 1 value is T1, and timing refreshes upgrades (carrying out PI or AD process) minimum two-way time, and promptly T1=current time-last time PI or AD process are carried out constantly.If timer 1 overtime thresholding T1
Timeout=current round trip time sampling * current congestion window size, T1
TimeoutBe used to trigger extra PI process, because in some cases, sampling two-way time will be tending towards a comparatively fixing value, can't adopt this moment triggering A mode to calculate.
Last sampling two-way time is less than or equal to the time interval T3 of system's minimum two-way time of value according to distance, current congestion window size cwnd, and current round trip time sampling rtt determines PI process changeable weight factor mu by following formula.
The consideration of weight factor μ value is, two-way time, sampling increased with congestion window (cwnd) in congestion avoidance phase, and sampling two-way time is increased to the peaked time and equals cwnd and be increased to the maximum time behind fast quick-recovery.In the PIAD algorithm, the conservative bigger time rtt*cwnd that gets is the time that sampling two-way time keeps increase.When surpassing the rtt*cwnd time, two-way time sampling fails to be less than or equal to once more current system minimum two-way time, just expression may increase actual minimum two-way time, and the big more this possibility of T3 is just big more, adopts cube that this possibility is increased with index at last.As T3-rtt*cwnd〉0 the time, what μ was can be in a second too fast is reduced to 0, consider that sampling two-way time is generally tens to the hundreds of millisecond in the real network, because two-way time, sampling was big more, the observation of sampling two-way time and the hysteresis of actual value are just big more, so adopt 10*rtt and amassing of rtt*cwnd to limit reduction rate, fast quick-recovery-μ is reduced to 0 in the congested cycle promptly to be illustrated in 10*rtt
2. by the overtime triggering of timer 2 minimum two-way time of rollback flow process.Setting up this flow process reason is in order to prevent that irrational PI process from causing network congestion.Timer 2 is in closed condition at ordinary times, and by timer 1 overtime triggering timing, clocking value is T2.The overtime thresholding T2 of timer 2
Timeout=T1
Timeout, overtime back timer will cut out and wait for next timer 1 overtime activation.In addition, enter AD algorithm part also with timeing closing device 2 if trigger.
Timer 2 is activated after also overtime triggering minimum two-way time of the rollback flow process, the throughput judge module judge timer 2 in time-count cycle throughput whether increase, if minimum rollback two-way time is not carried out in throughput increase then to represent that previous timer 1 triggers the PI process that enters effective; If throughput does not increase, then carry out minimum rollback two-way time, minimum is return back to previous minimum value two-way time two-way time, be about to a minimum two-way time as current minimum two-way time.
Be illustrated in figure 4 as the performance schematic diagram that adopts minimum two-way time of PIAD algorithm computation (MIN-RTT), RTT represents sampling curve two-way time, and MIN-RTT represents to calculate gained system minimum two-way time of curve.From Fig. 4 (a) (b) (c) represent the operating position of PIAD among TCP-Vegas, TCP-Westwood, TCP-Veno respectively, the visible PIAD of comparison diagram 2 calculate gained MIN-RTT and have eliminated original error, are applicable to heterogeneous wireless network accurately.4 oval signs among Fig. 4 (c) wherein indicate the corresponding timer 1 overtime PI of entering process No. 1; It is overtime to indicate corresponding timer 2 for No. 2, and judges that the timer 1 overtime PI process that enters is reasonable, owing to set T2
Timeout=T1
Timeout, once more by the timer 1 overtime PI process that enters; Indicate 3 correspondences and enter the PI process by minimum point; Indicate the 4 corresponding AD of execution processes.Owing to adopt the changeable weight factor mu, in the time of can observing each execution PI process, the value of increase is dynamic.
Figure 5 shows that the performance boost block diagram after the minimum round-trip time PIAD algorithm application arrives different TCP improvement projects, the height of post is represented enhancing rate.For example in the error rate 10
-3The time, PIAD has promoted TCP-Vegas performance 691%, TCP-Veno 1%, TCP-Westwood 18%, and actual minimum two-way time is relevant before and after specifically promoting degree and switching.
Can reach a conclusion, the present invention can calculate minimum two-way time comparatively accurately, and the TCP that depends on minimum two-way time is improved agreement accomplished the normal performance of performance in heterogeneous wireless network, not have to occur owing to switch and cause the minimum two-way time inaccurate performance that causes seriously to descend.