Summary of the invention
The present invention be in order to overcome occur congested in the transmission of 3G network in prior art time treatment effeciency difference problem, according to an aspect of the present invention, a kind of method of network speed congestion control is proposed.
According to the method for the web impact factor of the embodiment of the present invention, comprising:
The step of congestion control when judging whether to carry out long;
Judge whether the step of carrying out congestion control in short-term;
Judge whether to adopt MIMD congestion avoidance algorithm to carry out the step of sending rate control;
When judging whether to carry out long, the step of congestion control comprises: detect whether have data-bag lost, if there is data-bag lost, then exits slowstart algorithm and record RTT value;
Judge whether that the step of carrying out congestion control in short-term comprises: calculate average RTT value, if current RTT value is greater than the 1.2-2 of average RTT value doubly, then actual transmission rate is reduced to the 50%-75% of current transmission rate;
Judge whether that the step adopting MIMD congestion avoidance algorithm to carry out sending rate control comprises: if current RTT value is less than the 1.2-2 of average RTT value doubly, then detect and whether have data-bag lost, if there is no data-bag lost, then actual transmission rate is changed into the 1.1-1.5 of current transmission rate doubly;
If there is data-bag lost, then calculates TCP throughput, compare TCP throughput and current transmission rate, if the difference of TCP throughput and current transmission rate is less than predetermined threshold value, then change actual transmission rate into TCP throughput; If difference is greater than predetermined threshold value, then actual transmission rate is changed into the 0.75-0.95 of current transmission rate doubly.
The present invention be in order to overcome occur congested in the transmission of 3G network in prior art time treatment effeciency difference problem, according to another aspect of the present invention, a kind of device of web impact factor is proposed.
According to the device of the web impact factor of the embodiment of the present invention, comprising:
First judge module, congestion control during for judging whether to carry out long;
Second judge module, for judging whether the step of carrying out congestion control in short-term;
3rd judge module, adopts MIMD congestion avoidance algorithm to carry out sending rate control for judging whether;
First judge module, specifically for detecting whether have data-bag lost, if there is data-bag lost, then exits slowstart algorithm and records RTT value;
Actual transmission rate, specifically for calculating average RTT value, if current RTT value is greater than the 1.2-2 of average RTT value doubly, is then reduced to the 50%-75% of current transmission rate by the second judge module;
3rd judge module comprises: the first congestion control submodule, the second congestion control submodule, if the first congestion control submodule is used for current RTT value and is less than the 1.2-2 of average RTT value doubly, then detect and whether have data-bag lost, if there is no data-bag lost, then actual transmission rate is changed into the 1.1-1.5 of current transmission rate doubly;
If the second congestion control submodule is used for there is data-bag lost, then calculate TCP throughput, relatively TCP throughput and current transmission rate, if the difference of TCP throughput and current transmission rate is less than predetermined threshold value, then change actual transmission rate into TCP throughput; If difference is greater than predetermined threshold value, then actual transmission rate is changed into the 0.75-0.95 of current transmission rate doubly.
The method and apparatus of web impact factor of the present invention, ask for the mean value of RTT by record RTT size, distinguish congested time congested, long in short-term, realize sending rate control fast and effectively, thus the Internet resources that can more effectively utilize channel current.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from specification, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write specification, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail, but is to be understood that protection scope of the present invention not by the restriction of embodiment.
In order to solve the problem for the treatment of effeciency difference when the 3G network transmission existed in prior art occurs congested, propose a kind of method for controlling network congestion according to an aspect of the present invention.
As shown in Figure 1, the specific works flow process of the method for controlling network congestion of the embodiment of the present invention is as follows:
Step 101: after Internet Transmission starts, adopts slowstart algorithm to control network transmission speed, and each RTT value in record transmitting procedure also calculates average RTT value (RTT0).
RTT(Round-Trip Time, the winding time) refer to that transmitting terminal sends data, receive the confirmation (receiving terminal sends confirmation after receiving data immediately) from receiving terminal to transmitting terminal, the time delay experienced.
Step 102: judge whether have data-bag lost in the transmitting procedure of step 101, if had, then exit slowstart algorithm, congestion control policy when entering long, proceeds to step 103; If no, then continue to adopt slowstart algorithm to control network transmission speed.
When congestion control policy is and congested or data-bag lost occur in Internet Transmission time long, constantly reduce the speed sending data terminal, control congested object to reach.
Step 103: the average RTT value RTT0 calculated in the RTT value (a RTT value RTT1) of current network transmission and step 101 is compared, if a RTT value is greater than m doubly (the i.e. RTT1>m*RTT0 of average RTT value, the scope of m is 1.2-2, preferred m=1.4), then proceed to congestion control in short-term, the 50%-75%(actual for data transmission rate R' being changed into current transmission rate R is preferred, actual transmission rate R' is changed into 2/3 of current transmission rate R); If a RTT value is less than the m of average RTT value doubly (i.e. RTT1<m*RTT0), then proceed to step 104.
In real network transmitting procedure, under different transmission rates, the throughput degradation of lasting very short time (being generally the several seconds) often can occur to very low phenomenon, this phenomenon is called as congested in short-term.In short-term during congested generation, lasting very short time (being generally the several seconds) just can recover rapidly original throughput performance afterwards.When congested generation in short-term, if continued according to congestion control time long, the significant wastage of Internet resources can be caused.
Step 104: judge now whether data-bag lost occurs, if not, then adopt MIMD(a, b) algorithm controls network congestion, actual transmission rate R' is changed into (1+a) * R, and the scope of a is 0.1-0.5, preferably, a=0.2, changes 1.2R into by actual transmission rate R';
If so, then TFRC algorithm is first adopted to calculate TCP throughput (i.e. the first transmission rate) R
l; TCP throughput R
lfor when there is no data-bag lost, the maximum rate of Internet Transmission.
Step 105: by the first transmission rate R
lcompare with current transmission rate R, judge R
lwhether being greater than R(R with the difference of R is predetermined threshold value, can set, as network transmission speed, substitute rate, congestion situation etc. according to network actual transmissions situation), namely | R
lwhether-R| is greater than
Step 106: if
then adopt MIMD algorithm, now will reduce to (1-b) * R by actual transmission rate R', the scope of b is 0.75-0.95, preferably, and b=0.9; If
then change actual transmission rate R' into R
l.
Below slowstart algorithm, TFRC algorithm and MIMD algorithm are described:
Slowstart algorithm
Slowstart algorithm is a kind of TCP(Transmission Control Protocol, transmission control protocol) congestion control mechanism, the basic thought of slowstart algorithm is when TCP starts transmit data in one network or find loss of data and start to retransmit, souning out network actual capacity first slowly, avoids causing owing to have sent excessive data blocking.
Main frame will stop after have sent a message wait acknowledge, often receive a response, and congestion window just increases by a segment length, until equal the threshold value set.
TFRC algorithm
RTO represents the re-transmission time of TCP, in above formula, s is the class interval time according to the setting of real network transmission situation, namely carries out the test of packet loss every the s time, parameter RTT(winding time Round-TripTime) and p(packet loss rate) play a decisive role.The calculating of packet loss rate p should be carried out at receiving terminal; And parameter RTT both can calculate at receiving terminal, also can calculate at transmitting terminal.Every several RTT times, receiving terminal feeds back to transmitting terminal parameter p and RTT.
Transmitting terminal utilizes receiving terminal feedack, calculates transmission rate, increases or reduce current transmission rate according to transmission rate.The topmost object of TFRC congestion avoidance algorithm be not aggressiveness find and use the available bandwidth of network, but when running into network congestion, while keeping TCP close friend, make transmission rate keep relative stability as much as possible.
MIMD algorithm
In MIMD (a, b) (Multiplicative Increase Multiplicative Decrease, MIMD multiple-instruction-stream multiple-data stream), a and b is that the speed of MIMD (a, b) model increases and reduces parameter.First, we define the beginning of a congestion point as the new congestion control cycle, and within this congestion control cycle (one or several RTT time), the transmission rate of transmitting terminal is R.If do not have packet loss to occur within this congested cycle, then the transmission rate of transmitting terminal is (a+1) * R, otherwise the transmission rate of transmitting terminal is (1-b) * R.
The length increasing and reduce the transmission rate congestion control cycle can be different, generally speaking, the congestion control cycle reducing transmission rate is smaller than the congestion control cycle increasing transmission rate, this is done to the congestion control policy of simulating TCP as best one can, to meet the friendly character of TCP.The congestion control cycle that we get minimizing is 1 RTT time, and the congestion control cycle of increase is 3 RTT times, and reason clearly, is done like this and more accurately and reasonably can be regulated transmission rate.
In order to solve the problem for the treatment of effeciency difference when the 3G network transmission existed in prior art occurs congested, proposing a kind of web impact factor device according to an aspect of the present invention, as shown in Figure 2, comprising:
First judge module 20, congestion control during for judging whether to carry out long;
Second judge module 40, for judging whether the step of carrying out congestion control in short-term;
3rd judge module 60, adopts MIMD congestion avoidance algorithm to carry out sending rate control for judging whether;
Described first judge module 20, specifically for detecting whether have data-bag lost, if there is data-bag lost, then exits slowstart algorithm and records RTT value;
Actual transmission rate, specifically for calculating average RTT value, if current RTT value is greater than the 1.2-2 of described average RTT value doubly, is then reduced to the 50%-75% of current transmission rate by described second judge module 40;
Described 3rd judge module 60 comprises: the first congestion control submodule 601, second congestion control submodule 602, if described first congestion control submodule 601 is less than the 1.2-2 of described average RTT value doubly for described current RTT value, then detect and whether have data-bag lost, if there is no data-bag lost, then actual transmission rate is changed into the 1.1-1.5 of current transmission rate doubly;
If described second congestion control submodule 602 is for there being data-bag lost, then calculate TCP throughput, more described TCP throughput and current transmission rate, if the difference of described TCP throughput and described current transmission rate is less than predetermined threshold value, then change actual transmission rate into described TCP throughput; If described difference is greater than predetermined threshold value, then actual transmission rate is changed into the 0.75-0.95 of described current transmission rate doubly.
In technique scheme, the second congestion control submodule 602 is according to following formulae discovery TCP throughput R
l:
S is packet loss test interval, and RTO is the data packet retransmission time, and p is packet packet loss.
In technique scheme, the large I of predetermined threshold value sets, as network transmission speed, substitute rate, congestion situation etc. according to real network transmission situation.
Preferably, the web impact factor device of the embodiment of the present invention comprises:
First judge module 20, congestion control during for judging whether to carry out long;
Second judge module 40, carries out congestion control in short-term for judging whether;
3rd judge module 60, adopts MIMD congestion avoidance algorithm to carry out sending rate control for judging whether;
First judge module 20, specifically for detecting whether have data-bag lost, if there is data-bag lost, then exits slowstart algorithm and records RTT value;
Actual transmission rate, specifically for calculating average RTT value, if current RTT value is greater than 1.4 times of average RTT value, is then reduced to 2/3rds of current transmission rate by the second judge module 40;
3rd judge module 60 specifically comprises: the first congestion control submodule 601, second congestion control submodule 602, if the first congestion control submodule 601 is less than 1.4 times of average RTT value specifically for current RTT value, then detect and whether have data-bag lost, if there is no data-bag lost, then actual transmission rate is changed into 1.2 times of current transmission rate;
If the second congestion control submodule 602 is specifically for there being data-bag lost, then calculate TCP throughput, relatively TCP throughput and current transmission rate, if the difference of TCP throughput and current transmission rate is less than predetermined threshold value, then change actual transmission rate into TCP throughput; If difference is greater than predetermined threshold value, then actual transmission rate is changed into 0.9 times of current transmission rate.
In technique scheme, the second congestion control submodule 602 is according to following formulae discovery TCP throughput R
l:
S is packet loss test interval, and RTO is the data packet retransmission time, and p is packet packet loss.
In technique scheme, the large I of predetermined threshold value sets, as network transmission speed, substitute rate, congestion situation etc. according to real network transmission situation.
The present invention can have multiple multi-form embodiment; above for Fig. 1-Fig. 2 by reference to the accompanying drawings to technical scheme of the present invention explanation for example; this does not also mean that the instantiation that the present invention applies can only be confined in specific flow process or example structure; those of ordinary skill in the art should understand; specific embodiments provided above is some examples in multiple its preferred usage, and the execution mode of any embodiment the claims in the present invention all should within technical solution of the present invention scope required for protection.
Last it is noted that the foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment to invention has been detailed description, for a person skilled in the art, it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.