A kind of coarseness distribution method of dynamic bandwidth
Technical field
The invention belongs to data communication field, relate in the shared channel distribution method to a plurality of network access equipment bandwidth, a kind of coarseness distribution method of dynamic bandwidth specifically, can be applicable to be that network access equipment distributes bandwidth in real time according to network service flow flow characteristic and current system state, and in the network environment of as far as possible little introducing extra bandwidth computing cost.
Background technology
The develop rapidly of the communication technology is so that increasing user accessing Internet easily.Meanwhile, the rapid growth of multimedia service is so that the user presents diversified trend to the demand of network.Therefore, how limited bandwidth is distributed to rationally, fast the user of demand, thereby for more user provides service, improve the utilance of Internet resources and obtain better user and experience, become each Internet Service Provider problem in the urgent need to address.
The allocated bandwidth mode mainly is divided into two types of Static and dynamics.Static bandwidth allocation is the user assignment fixed-bandwidth by definition CIR (committed information rate), no matter whether there is this moment the bandwidth of transfer of data and transfer of data actual in what, has all taken the fixed-bandwidth that is assigned to.Dynamic Bandwidth Allocation is according to bandwidth and the qos policy of data flow, according to DBA (Dynamic Bandwidth Allocation) algorithm, the available bandwidth of system carried out dynamic assignment by system.
The static bandwidth allocation method is simple, but very flexible can not reasonably be distributed bandwidth according to the business load state, has reduced the utilance of communication system bandwidth.General real-time Dynamic Bandwidth Allocation mode although well overcome above-mentioned shortcoming, implements too meticulously, needs the in real time accurate bandwidth value that obtains each user's actual needs, is the required bandwidth of user assignment according to this bandwidth value then.Therefore require the CPU that carries out the DBA algorithm that stronger disposal ability is arranged, and along with the increasing of access user quantity, the increase of bandwidth and the significant variation of demand bandwidth value, the capital sharply increases the amount of calculation of the CPU that carries out the DBA algorithm, exceeds the controlled range of communication system.So a kind of processing pressure that can alleviate communication system need to be proposed, again can be well be that each user is quick, the method for reasonable distribution bandwidth according to the dynamic characteristic of Business Stream.
Summary of the invention
The object of the invention is to overcome the deficiency of above-mentioned Dynamic Bandwidth Allocation mode, a kind of coarseness distribution method of dynamic bandwidth is provided.The coarseness distribution method of dynamic bandwidth that this method adopts does not need the bandwidth value of accurate Calculation user needs, only need by to the statistics of service traffics characteristic and to the collection of the medium data queue status waiting for transmission of current cache, when the bandwidth allocation cycle of regulation arrives, be each user assignment bandwidth, and the variable quantity of each bandwidth value is the integral multiple that bandwidth is upgraded step-length.
The technical scheme that realizes the object of the invention is as follows:
Coarseness distribution method of dynamic bandwidth of the present invention comprises the steps:
(1) according to user's demand and network environment, configuration-system bandwidth allocation cycle t, user's bandwidth parameter, cache quene threshold, weight coefficient β and damping coefficient p, m, the value of n is initialized as 0 with user's allocated bandwidth sign F;
(2) judged whether that the user raises one's hand, the user that namely raises one's hand if do not have, forwards step (3) for there being for the first time data to need transmission to, if having, is the user assignment agreement bandwidth B of raising one's hand
c, and the weighted average bandwidth B that begins to add up this user
a, in first measurement period t, do not do weighting and process, through M bandwidth allocation cycle t, obtain stable weighted average bandwidth B
a, the user that raises one's hand does not carry out following bandwidth allocation algorithm;
(3) to not raising one's hand but satisfy M bandwidth allocation cycle t of statistics and a upper period allocated bandwidth value B
N-1Greater than initial bandwidth B
MinThe user of condition carries out following allocated bandwidth operation according to weighted average bandwidth and the current queue state of statistics, to not raising one's hand not satisfy the user of above-mentioned condition, does not carry out following bandwidth allocation algorithm;
(3.1) according to current cache queue length G
nThe user is divided into two groups, G
nLess than or equal to guaranteeing thresholding G
oBe divided into A group, G
nGreater than G
oBe divided into B group;
(3.2) user in the A group being carried out allocated bandwidth, according to user's allocated bandwidth sign F the user is divided into two groups, is that 0 user is divided into the A0 group with F, is that 1 user is divided into the A1 group with F;
3.2.1) user in the A0 group is carried out allocated bandwidth;
3.2.1.a) be this user's bandwidth decision threshold upper limit G
(n-1) uAssignment guarantees thresholding G
o, bandwidth decision threshold lower limit G
(n-1) dAssignment G
D1, distributing bandwidth is the agreement bandwidth B
c, juxtaposition allocated bandwidth sign F is 1, forwards step 3.2.1.b to);
3.2.1.b) judge whether in this bandwidth allocation cycle all A0 group users have been finished allocated bandwidth, if so, finish the allocated bandwidth to A0 group user, if not, circulate for the user in the next A0 group and to carry out 3.2.1.a);
3.2.2) take to increase soon and subtract slowly strategy the user in the A1 group is carried out allocated bandwidth;
3.2.2.a) judge this user's bandwidth decision threshold lower limit G
(n-1) dWhether be less than or equal to G
D1, if so, forward step 3.2.2.b to), if not, this user is moved to the B1 group, forward step 3.2.2.e to);
3.2.2.b) judge this user's current cache queue length G
nWhether more than or equal to bandwidth decision threshold upper limit G
(n-1) u, if so, be this user G
(n-1) uAssignment guarantees thresholding G
o, bandwidth decision threshold lower limit G
(n-1) dAssignment G
D1, distribute bandwidth to increase to the agreement bandwidth B
c, forward step 3.2.2.e to), if not, judge this user's weighted average bandwidth B
aWhether more than or equal to G
(n-1) uCorresponding B
e, if so, be this user G
(n-1) uAssignment G
o, G
(n-1) dAssignment G
D1, the distribution bandwidth is B
c, forward step 3.2.2.e to), if not forwarding step 3.2.2.c to);
3.2.2.c) judge this user's G
nWhether continuously p time less than bandwidth decision threshold lower limit G
(n-1) d, if not, for this user assignment bandwidth is upper period allocated bandwidth B
N-1, forward step 3.2.2.e to), if so, judge this user's B
aWhether less than bandwidth decision threshold upper limit G
(n-1) dCorresponding equivalent bandwidth B
eIf be not less than, for this user assignment bandwidth is upper period allocated bandwidth B
N-1, forward step 3.2.2.e to), if less than, be this user bandwidth decision threshold upper limit G
(n-1) uAssignment bandwidth decision threshold lower limit G
(n-1) d, with G
(n-1) dCorresponding G
DjNext thresholding G
D (j+1)Be assigned to G
(n-1) dIf, G
(n-1) dBe G
MinThen do not change G
(n-1) dValue, for this user assignment bandwidth is B
N-1Subtract Δ B
d, forward step 3.2.2.d to);
3.2.2.d) bandwidth of judging this user initial bandwidth B whether
Min, if so, this user's F is set to 0, forward step 3.2.2.e to), if not then directly forwarding step 3.2.2.e to);
3.2.2.e) judge whether in this bandwidth allocation cycle all A1 group users have been finished allocated bandwidth, if so, finish the allocated bandwidth to A1 group user, if not, circulate for the user in the next A1 group and to carry out 3.2.2.a);
(3.3) to all the user's preassignment agreement bandwidth B in the B group
c, preallocated bandwidth is not counted in remaining bandwidth B
s, according to user's allocated bandwidth sign F the user is divided into two groups, be that 0 user is divided into the B0 group with F, be that 1 user is divided into the B1 group with F;
3.3.1) user in the B0 group is carried out allocated bandwidth;
3.3.1.a) to this user bandwidth decision threshold upper limit G
(n-1) uAssignment G
U1, bandwidth decision threshold lower limit G
(n-1) dAssignment guarantees thresholding G
o, be this user assignment bandwidth B
c, juxtaposition F is 1, forwards step 3.3.1.b to);
3.3.1.b) judge whether in this bandwidth allocation cycle all B0 group users have been finished allocated bandwidth, if so, finish the allocated bandwidth to B0 group user, if not, circulate for the user in the next B0 group and to carry out 3.3.1.a);
3.3.2) take to speed slowly and subtract strategy the user in the B1 group is carried out allocated bandwidth;
3.3.2.a) judge whether unappropriated bandwidth is arranged, if do not have, forward step 3.4 in the current network), if unappropriated bandwidth is arranged, forward step 3.3.2.b to);
3.3.2.b) judge this user bandwidth decision threshold upper limit G
(n-1) uWhether more than or equal to G
U1, if not, be this user G
(n-1) uAssignment G
U1, bandwidth decision threshold lower limit G
(n-1) dAssignment guarantees thresholding G
oAnd distributorship agreement bandwidth B
c, forward step 3.3.2.h to), if so, forward step 3.3.2.c to);
3.3.2.c) judge this user's current cache queue length G
nWhether continuously m time more than or equal to G
(n-1) u, if not, forward step 3.3.2.e to), if so, judge this user's upper period allocated bandwidth B
N-1Whether less than this user's high bandwidth B
Max, if so, forward step 3.3.2.d to), if not, judge remaining bandwidth B
sWhether more than or equal to B
MaxSubtract the agreement bandwidth B
c, if so, for this user assignment bandwidth is B
Max, forward step 3.3.2.f to), if not, for this user assignment bandwidth is B
cAdd B
s, forward step (3.4) to;
3.3.2.d) judgement remaining bandwidth B
sWhether more than or equal to this user's upper period allocated bandwidth B
N-1Subtract B
cAdd Δ B
u, if so, to this user G
(n-1) dAssignment G
(n-1) u, G
(n-1) uCorresponding G
UiNext thresholding G
U (i+1)Be assigned to G
(n-1) uIf, G
(n-1) uBe G
MaxThen do not change G
(n-1) uValue, for this user assignment bandwidth is B
N-1Add Δ B
u, and distribute bandwidth to be no more than B
Max, forward step 3.3.2.h to), if not, for this user assignment bandwidth is B
N-1Add remaining bandwidth B
s, forward step (3.4) to;
3.3.2.e) judge this user's current cache queue length G
nWhether continuously n time less than G
(n-1) d, if so, represent G with y
nContinuously n time less than G
(n-1) dNumber of times, forward step 3.3.2.f to), if not, judge the residue of network organization bandwidth B
sWhether more than or equal to this user's B
N-1Subtract B
c, if so, for this user assignment bandwidth is upper period allocated bandwidth B
N-1, forward step 3.3.2.h to), if not, for this user assignment bandwidth is the agreement bandwidth B
cAdd remaining bandwidth B
s, forward step (3.4) to;
3.3.2.f) judgement (B
N-1-y* Δ B
u) whether less than B
c, if so, forward step 3.3.2.g to), if not, to this user G
(n--1) dAssignment is G
(n-1) dCorresponding G
UiLower n threshold value G
U (i-n), G
(n-1) uAssignment is G
U (i-n+1), for this user assignment bandwidth is (B
N-1-y* Δ B
u), forward step 3.3.2.h to);
3.3.2.g) to G
(n-1) uAssignment G
U1, G
(n-1) dAssignment G
oAnd distributorship agreement bandwidth B
c, forward step 3.3.2.h to);
3.3.2.h) judge whether in this bandwidth allocation cycle, all B1 group users to have been finished allocated bandwidth, if so, finish the allocated bandwidth to B1 group user, forward step (4) to, if not, circulate for the user in the next B1 group and to carry out 3.3.2.a);
(3.4) be the user assignment agreement bandwidth B of B1 group unassigned bandwidth
c
(4) finish this allocated bandwidth, forward step (2) to and enter next bandwidth allocation cycle.
The weighted average bandwidth B of the present invention in step (3)
a: in the time interval of allocated bandwidth t user's network traffics are added up, the packet by statistics t transmitted in the time calculates the average bandwidth B in this user this cycle t time interval
t, again with the superposed average bandwidth B in a upper cycle
T-1 *Carry out arithmetic average, obtain the superposed average bandwidth B in this cycle
t *, and then obtain the weighted average bandwidth B of this section period
a, i.e. B
a=β * B
t+ (1-β) * B
T-1 *, β is weight coefficient, 0≤β≤1.
The present invention is at step 3.2.2) in increase soon and subtract slowly strategy: if the bandwidth B that the user obtains at a upper bandwidth allocation cycle
N-1Less than the agreement bandwidth B
c, this user adopted to increase soon in the bandwidth adjustment of this bandwidth allocation cycle subtract slowly strategy, when namely data packet queue length to be sent was more than or equal to certain threshold value, the distribution bandwidth with this user was increased to the agreement bandwidth B fast immediately
c, and when continuous p t cycle of data packet queue length to be sent is less than or equal to certain threshold value, 1≤p≤5, and B
aBe less than or equal to equivalent bandwidth B corresponding to this threshold value
eThe time, just the distribution bandwidth with the user reduces by a fixed amount Δ B
d
The present invention is at step 3.3.2) in speed slowly and subtract strategy: if the user B
N-1More than or equal to B
cThe time, this user's bandwidth adjustment adopted to speed slowly subtract strategy, namely continuous m t cycle of data packet queue length to be sent be more than or equal to certain threshold value, 1≤m≤5, and when unappropriated extra bandwidth resource was arranged in the network, just the bandwidth with the user increased a fixed amount Δ B
u, and work as continuous n time the t cycle of data packet queue length to be sent less than certain threshold value, 1≤n≤5 are with fixed amount Δ B of bandwidth minimizing of user
uIf the next cycle formation continues to reduce also continuously n t cycle less than another threshold value, then the bandwidth with the user reduces by a fixed amount 2* Δ B
u, by that analogy, until bandwidth reduces to B
c, perhaps have other users need to increase bandwidth to B in the network
cBut, do not have remaining bandwidth resource B in the network
sThe time, active user's bandwidth also can reduce immediately.
By a plurality of threshold values being set as the reference quantity of judging allocated bandwidth, by the agreement bandwidth B
c* the t thresholding G that is guaranteed
o, by initial bandwidth B
Min* t obtains minimum threshold G
Min, by high bandwidth B
Max* t obtains max threshold G
Max, arrange above and below G respectively
oThe quene threshold value, be lower than G
oThe thresholding number be N
d, be higher than G
oThe thresholding number be N
u, by (G
o-G
Min)/(N
d+ 1) obtains quene threshold interval delta G
d, and then the thresholding G that is guaranteed
oFollowing quene threshold value G
Di, 1≤i≤N
d, G
DiValue reduce along with reducing of i, by (G
Max-G
o)/(N
u+ 1) obtains quene threshold interval delta G
u, and then the thresholding G that is guaranteed
oAbove quene threshold value G
Uj, 1≤j≤N
u, G
UjValue increase and increase along with j.Pass through G
D1/ t obtains corresponding equivalent bandwidth B
Edi, as the weighted average bandwidth B
aComparison reference.According to Δ G
d/ t obtains the agreement bandwidth B
cFollowing bandwidth is upgraded step delta B
d, Δ G
u/ t obtains the agreement bandwidth B
cOn bandwidth upgrade step delta B
u
The present invention is compared with the prior art the characteristics that have:
1, the present invention is take user's agreement bandwidth as the basis, only carrying out bandwidth allocation algorithm when the bandwidth allocation cycle of regulation arrives is each user assignment bandwidth, do not need to calculate accurately the bandwidth value of user's needs, only need by the user traffic flow flow characteristic being added up and the medium data queue status waiting for transmission of current cache being gathered, the bandwidth variation judgment condition of statistics and the parameter that collects and setting is compared, after satisfying specific condition, just user's bandwidth is adjusted, do not satisfy condition and do not change user's bandwidth value, the bandwidth value that adopts this coarseness distribution method of dynamic bandwidth can predictive user to need, overcome the blindness of allocated bandwidth, avoid the significant concussion in the bandwidth allocation, also saved the system resource overhead of allocated bandwidth simultaneously.
2, the present invention adopts the fast strategy that reduces slowly that increases when user's distribution bandwidth is higher than the agreement bandwidth, makes the user when burst transfers of data is arranged, and can obtain rapidly high bandwidth.When user's distribution bandwidth is lower than the agreement bandwidth, adopt and increase slowly the fast strategy that reduces, can allow the user in network, have and obtain larger bandwidth in the situation of remaining bandwidth, increase fast the minimizing and allow the extra bandwidth of obtaining that the user can fair relatively and wait a moment, simultaneously when the user does not need extra bandwidth, also can discharge rapidly bandwidth, for other users.
3, according to quene state and allocated bandwidth sign the user is divided into groups, every group of user taked different bandwidth allocation methods, make bandwidth allocation methods more accurately, fast, effectively, save simultaneously the computational resource of CPU, therefore can control well the system resource overhead of bandwidth allocation algorithm.
Description of drawings
Fig. 1 is allocated bandwidth schematic diagram of the present invention;
Fig. 2 is that quene threshold of the present invention arranges schematic diagram;
Fig. 3 is allocated bandwidth overview flow chart of the present invention;
Fig. 4 is that A0 of the present invention organizes allocated bandwidth branch flow chart;
Fig. 5 is that A1 of the present invention organizes allocated bandwidth branch flow chart;
Fig. 6 is that B0 of the present invention organizes allocated bandwidth branch flow chart;
Fig. 7 is that B1 of the present invention organizes allocated bandwidth branch flow chart.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, referring to the accompanying drawing examples, the present invention is carried out nearly step ground describe in detail.
With reference to Fig. 1, a kind of coarseness distribution method of dynamic bandwidth provided by the invention at first arranges bandwidth allocation parameters, comprising: bandwidth allocation cycle t, agreement bandwidth B
c, initial bandwidth B
Min, high bandwidth B
Max, the weighted average bandwidth B
a, equivalent bandwidth B
e, quene threshold G, bandwidth adjustment strategy comprises: pick me, increase slowly soon and subtract, speed slowly and subtract, wherein:
The agreement bandwidth B
c: the Internet Service Provider promises to undertake a bandwidth amount that gives the user, i.e. agreement bandwidth B when user access network
cThis bandwidth value is that the Internet Service Provider must guarantee that the user can obtain when needed.
Initial bandwidth B
Min: behind the user access network, when not having data to transmit, distribute to user's bandwidth value B
Min, 0≤B
Min≤ B
c
High bandwidth B
Max: the maximum network bandwidth value B that allows CU
Max, prevent the excessive occupied bandwidth of user, cause other user can't be assigned to extra bandwidth, B when needed
c≤ B
Max
The weighted average bandwidth B
a: in the time interval of allocated bandwidth t user's network traffics are added up, the packet by statistics t transmitted in the time calculates the average bandwidth B in this user this cycle t time interval
t, again with the superposed average bandwidth B in a upper cycle
T-1 *Carry out arithmetic average, obtain the superposed average bandwidth B in this cycle
t *, and then obtain the weighted average bandwidth B of this section period
a, i.e. B
a=β * B
t+ (1-β) * B
T-1 *, β is weight coefficient, 0≤β≤1.
Quene threshold G: reflect current quene state by some quene threshold values are set, carry out allocated bandwidth thereby take appropriate measures.
Equivalent bandwidth B
e: according to the quene threshold value G of correspondence and the bandwidth B of bandwidth allocation cycle t acquisition
e, i.e. B
e=G/t.
Increase soon and subtract slowly strategy: if the bandwidth B that the user obtains at a upper bandwidth allocation cycle
N-1Less than the agreement bandwidth B
c, this user adopted to increase soon in the bandwidth adjustment of this bandwidth allocation cycle subtract slowly strategy, when namely data packet queue length to be sent was more than or equal to certain threshold value, the distribution bandwidth with this user was increased to the agreement bandwidth B fast immediately
c, and when continuous p t cycle of data packet queue length to be sent is less than or equal to certain threshold value, 1≤p≤5, and B
aBe less than or equal to equivalent bandwidth B corresponding to this threshold value
eThe time, just the distribution bandwidth with the user reduces by a fixed amount Δ B
d
Slowly speed and subtract strategy: if the user is B
N-1More than or equal to B
cThe time, this user's bandwidth adjustment adopted to speed slowly subtract strategy, namely continuous m t cycle of data packet queue length to be sent be more than or equal to certain threshold value, 1≤m≤5, and when unappropriated extra bandwidth resource was arranged in the network, just the bandwidth with the user increased a fixed amount Δ B
u, and work as continuous n time the t cycle of data packet queue length to be sent less than certain threshold value, 1≤n≤5 are with fixed amount Δ B of bandwidth minimizing of user
uIf the next cycle formation continues to reduce also continuously n t cycle less than another threshold value, then the bandwidth with the user reduces by a fixed amount 2* Δ B
u, by that analogy, until bandwidth reduces to B
c, perhaps have other users need to increase bandwidth to B in the network
cBut, do not have remaining bandwidth resource B in the network
sThe time, active user's bandwidth also can reduce immediately.
Pick me: the user does not have the professional transmission time-division to wear wide B
Min, as long as the user has the service needed transmission with regard to reporting system, that namely calls picks me, system is its distributorship agreement bandwidth B at once
c, and beginning statistical weight average bandwidth B
aOnly for example three users in the network participate in allocated bandwidth, and the setting of each user's concrete bandwidth parameter is as shown in table 1:
Table 1 user bandwidth parameter list
The user |
The agreement bandwidth B
c |
Initial bandwidth B
min |
High bandwidth B
max |
1 |
3Mbps |
0Mpbs |
5Mbps |
2 |
3Mbps |
0Mpbs |
5Mbps |
3 |
6Mbps |
0Mpbs |
10Mbps |
With reference to Fig. 2, a kind of coarseness distribution method of dynamic bandwidth provided by the invention, the method to set up of quene threshold is as follows:
By the agreement bandwidth B
c* the t thresholding G that is guaranteed
o, by initial bandwidth B
Min* t obtains minimum threshold G
Min, by high bandwidth B
Max* t obtains max threshold G
Max, arrange above and below G respectively
oThe quene threshold value, be lower than G
oThe thresholding number be N
d, be higher than G
oThe thresholding number be N
u, N wherein
d, N
uFor more than or equal to 1 positive integer, by (G
o-G
Min)/(N
d+ 1) obtains quene threshold interval delta G
d, and then the thresholding G that is guaranteed
oFollowing quene threshold value G
Di, 1≤i≤N
d, G
DiValue reduce along with reducing of i, by (G
Max-G
o)/(N
u+ 1) obtains quene threshold interval delta G
u, and then the thresholding G that is guaranteed
oAbove quene threshold value G
Uj, 1≤j≤N
u, G
UjValue increase and increase along with j.The setting of concrete threshold parameter is as shown in table 2:
Table 2 user threshold parameter table
? |
The user 1 |
The user 2 |
The user 3 |
Max threshold G
max |
10Kb |
10Kb |
20Kb |
G
u3 |
9Kb |
9Kb |
18Kb |
G
u2 |
8Kb |
8Kb |
16Kb |
G
u1 |
7Kb |
7Kb |
14Kb |
Guarantee thresholding G
o |
6Kb |
6Kb |
12Kb |
Gd
1 |
4.5Kb |
4.5Kb |
9Kb |
Gd
2 |
3Kb |
3Kb |
6Kb |
Gd
3 |
1.5Kb |
1.5Kb |
3Kb |
Minimum threshold G
min |
0Kb |
0Kb |
0Kb |
Pass through G
D1/ t obtains corresponding equivalent bandwidth B
Edi, as the weighted average bandwidth B
aComparison reference.The value of concrete equivalent bandwidth is as shown in table 3:
Table 3 user equivalent bandwidth parameter list
? |
The user 1 |
The user 2 |
The user 3 |
Equivalent bandwidth B
ed1 |
2.25Mbps |
2.25Mbps |
4.5Mbps |
Equivalent bandwidth B
ed2 |
1.5Mbps |
1.5Mbps |
3Mbps |
Equivalent bandwidth B
ed3 |
0.75Mbps |
0.75Mbps |
1.5Mbps |
According to Δ G
d/ t obtains the agreement bandwidth B
cFollowing bandwidth is upgraded step delta B
d, Δ G
u/ t obtains the agreement bandwidth B
cOn bandwidth upgrade step delta B
uThe value that concrete bandwidth is upgraded step-length is as shown in table 4:
Table 4 user bandwidth is upgraded step parameter
? |
The user 1 |
The user 2 |
The user 3 |
Upgrade step delta B under the agreement bandwidth
d |
0.75Mbps |
0.75Mbps |
1.5Mbps |
Upgrade step delta B on the agreement bandwidth
u |
0.5Mbps |
0.5Mbps |
1Mbps |
Below with reference to Fig. 3 and specific embodiment the coarseness distribution method of dynamic bandwidth is described:
At first according to user's demand and network environment, the configuration-system bandwidth allocation parameters, concrete parameter value is shown in table 1-table 4.Network total bandwidth resource is 30Mbps, determines that bandwidth allocation cycle t is 2ms.
It is 0.7 that weight coefficient β is set, damping coefficient m, and n, p is 2.User's allocated bandwidth sign F is initialized as 0.
Embodiment 1 is the allocated bandwidth in original bandwidth allocation cycle
Step 1: user 1, user 3 have data to need transmission, and reporting system namely picks me.System is user's 1 distributorship agreement bandwidth B
c(3Mbps), be user's 3 distributorship agreement bandwidth B
c(6Mbps), and the weighted average bandwidth B that begins to add up this user 1 and user 3
aA counting user 1 and user's 3 weighted average bandwidth in these 100 bandwidth allocation cycles does not change the bandwidth value of its distribution, and user 1, user 3 do not carry out following wide allocation algorithm.User 2 does not raise one's hand;
Step 2: user 2 does not satisfy the condition of timing statistics and the upper non-minimum bandwidth of period allocated bandwidth, so user 2 does not carry out wide allocation algorithm afterwards.Finish this allocated bandwidth, wait for next bandwidth allocation cycle, bandwidth allocation algorithm is carried out in circulation.
Embodiment 2 is the allocated bandwidth of the 101st bandwidth allocation cycle
Step 3: user 2 has data to need transmission, and reporting system namely picks me.System is B for user's 2 distributorship agreement bandwidth
c(3Mbps), begin to add up this user's 2 weighted average bandwidth B
aUser 2 does not carry out following bandwidth allocation algorithm, and user 1, user 3 do not raise one's hand;
Step 4: user 1, user 3 satisfy the condition of timing statistics and the upper non-minimum bandwidth of period allocated bandwidth, therefore user 1, user 3 are carried out following bandwidth allocation algorithm;
4.1) user 1 current cache queue length G
n(1.6Kb), guarantee thresholding G less than it
o(6Kb), user 1 is divided into the A group.User 3 current cache queue length G
n(17Kb), guarantee thresholding G greater than it
o(12Kb), user 3 is divided into the B group;
4.2) user of A group is carried out allocated bandwidth.According to user 1 allocated bandwidth sign F (0), determine that user 1 is the A0 group;
4.2.1) with reference to Fig. 4 A0 group user is carried out allocated bandwidth;
4.2.1.a) be user 1 bandwidth decision threshold upper limit G
(n-1) uAssignment guarantees thresholding G
o(6Kb), bandwidth decision threshold lower limit G
(n-1) dAssignment G
D1(4.5Kb), distributing bandwidth is the agreement bandwidth B
c(3Mbps), to be masked as F be 1 to the juxtaposition allocated bandwidth;
4.2.1.b) A0 group only has a user, therefore finished the allocated bandwidth to A0 group user;
4.2.2) A1 group do not have the user, therefore finished the allocated bandwidth to A1 group user;
4.3) to all the user's preassignment agreement band B in the B group
c, be user's 3 preassignment agreement bandwidth B
c(6Mbps).According to user 3 allocated bandwidth flag bit F (0), determine that user 3 is the B0 group;
4.3.1) with reference to Fig. 6 the user in the B0 group is carried out allocated bandwidth;
4.3.1.a) be user 3 bandwidth decision threshold upper limit G
(n-1) uAssignment G
U1(14Kb), bandwidth decision threshold lower limit G
(n-1) dAssignment guarantees thresholding G
o(12Kb), be user's 3 distributorship agreement bandwidth B
c(6Mbps), juxtaposition F is 1;
4.3.1.b) B0 group only has a user, therefore finished the allocated bandwidth to B0 group user;
4.3.2) B1 group do not have the user, therefore finished the allocated bandwidth to B1 group user;
Step 5: finish this allocated bandwidth, wait for next bandwidth allocation cycle, bandwidth allocation algorithm is carried out in circulation.
Embodiment 3 is the allocated bandwidth of the 201st bandwidth allocation cycle
Step 6: user 1, user 2, user 3 do not raise one's hand;
Step 7: user 1, user 2, user 3 satisfy the condition of timing statistics and the upper non-minimum bandwidth of period allocated bandwidth, and user 1, user 2, user 3 are carried out following bandwidth allocation algorithm;
7.1) user 1 current cache queue length G
n(9.7Kb), guarantee thresholding G greater than it
o(6Kb), user 1 is divided into B group, user 2 current cache queue length G
n(7.8Kb), guarantee thresholding G greater than it
o(6Kb), user 2 is divided into B group, user 3 current cache queue length G
n(6.3Kb), guarantee thresholding G less than it
o(12Kb), user 3 is divided into the A group;
7.2) user of A group is carried out allocated bandwidth, according to user 3 allocated bandwidth sign F (1), determine that user 1 is the A1 group;
7.2.1) A0 group do not have the user, finish A0 group allocated bandwidth;
7.2.2) with reference to Fig. 5 A1 group user is carried out allocated bandwidth, take to increase soon and subtract slowly strategy;
7.2.2.a) user 3 bandwidth decision threshold lower limit G
(n-1) d(3Kb) less than G
D1(9Kb);
7.2.2.b) user 3 current cache queue length G
n(6.3Kb) greater than its bandwidth decision threshold upper limit G
(n-1) u(6Kb), be user 3 bandwidth decision threshold upper limit G therefore
(n-1) uAssignment G
o(12Kb), bandwidth decision threshold lower limit G
(n-1) dAssignment G
D1(9Kb), and be user's 3 distributorship agreement bandwidth B
c(6Mbps);
7.2.2.c) A1 group only has a user, therefore finished the allocated bandwidth to A0 group user;
7.3) to all the user's preassignment agreement bandwidth B in the B group
c, be user's 1 preassignment agreement bandwidth B
c(6Mbps), be user's 2 preassignment agreement bandwidth B
c(6Mbps), according to user 1 allocated bandwidth flag bit F (1), determine user 3 for the B1 group, according to user 2 allocated bandwidth flag bit F (0), determine that user 2 is the B0 group;
7.3.1) with reference to Fig. 6 the user in the B0 group is carried out allocated bandwidth;
7.3.1.a) be user 2 bandwidth decision threshold upper limit G
(n-1) uAssignment G
U1(7Kb), bandwidth decision threshold lower limit G
(n-1) dAssignment guarantees thresholding G
o(6Kb), be user's 2 distributorship agreement bandwidth B
c(3Mbps), juxtaposition F is 1;
7.3.1.b) B0 group only has a user, therefore finished the allocated bandwidth to B0 group user;
7.3.2) with reference to Fig. 7 the user in the B1 group is carried out allocated bandwidth, take to speed slowly and subtract strategy;
7.3.2.a) current network has unappropriated bandwidth (18Mbps);
7.3.2.b) user 1 bandwidth decision threshold upper limit G
(n-1) u(9Kb) whether more than or equal to G
U1(7Kb);
7.3.2.c) user 1 current cache queue length G
n(9.7Kb) for the second time in succession greater than its bandwidth decision threshold upper limit G
(n-1) u(9Kb), upper period allocated bandwidth B of the user 1
N-1(4Mbps) less than this user's high bandwidth B
Max(5Mbps);
7.3.2.d) the residue of network organization bandwidth B
s(18Mbps) greater than 1.5Mbps (B
N-1Subtract B
cAdd Δ B
u), be user 1 bandwidth decision threshold lower limit G
(n-1) dAssignment bandwidth decision threshold upper limit G
(n-1) u(9Kb), bandwidth decision threshold upper limit G
(n-1) uAssignment max threshold G
Max(10Kb), distribute bandwidth 4.5Mbps (B for user 1
N-1Add Δ B
u);
7.3.2.e) B1 group only has a user, therefore finished the allocated bandwidth to B1 group user;
Step 8: finish this allocated bandwidth, wait for next bandwidth allocation cycle, bandwidth allocation algorithm is carried out in circulation.