Summary of the invention
(1) technical problem that will solve
The algorithm of tradition traffic engineering is the shortest path finding in network, then data are just only along this shortest path transmission, until volume of transmitted data reaches the maximum load in this path, cause the congested of this path, just unnecessary data are forwarded by all the other paths.Known, conventional flow quantity algorithm has three problems:
A. only transmit the idle one waste to Internet resources beyond doubt in all the other paths by shortest path;
B. a certain amount of flow, from source to egress, if only by a paths (even shortest path), and separates flow by a certain percentage, transmits respectively by mulitpath, and the time used must be that the former is far longer than the latter;
C. after shortest path appearance is congested, just considers data to forward by other paths, and judge that whether certain paths is congested and all can expend a lot of unnecessary time to congested processing.
(2) technical scheme
Be different from traditional algorithm, the invention provides one and utilize allocated bandwidth, progressively a complex network is reduced to an equivalent simple network, thereby carry out the novel routing algorithm of assignment of traffic.It is characterized in that according to the network of simplifying, by the flow of source by a certain percentage (this ratio is determined by the bandwidth in each path) be divided into n part, be distributed to respectively n paths (bandwidth of every paths is determined by this path minimum bandwidth) transmission.Specifically there are following steps.
Step 1, a given network G
1=(V, E), has certain flow need to pass through source v
ssend to egress v
t;
Step 2, network G
1each limit e
1(i, j) has two attributes:
A. the cost w of this edge
1(i, j);
B. this edge flow f that can pass through at most per second
1(i, j), i.e. bandwidth;
Step 3, according to the cost w on every limit
1(i, j), finds out source v with shortest path first
sto egress v
tshortest path P
1;
Step 4, at shortest path P
1in, find out the limit of bandwidth minimum, using the bandwidth on this limit as shortest path P
1bandwidth; So this shortest path is reduced to a limit e
1(s, t), the two ends of this edge are source v
swith egress v
t, and:
Limit e
1the cost of (s, t) is as shown in formula (1)
Limit e
1the bandwidth of (s, t) is as shown in formula (2)
Wherein,
p
1the set on all limits.
Step 5, in network G
1in,
If limit
the bandwidth value after this edge renewal is as shown in formula (3):
f
2(i,j)=f
1(i,j)-f
1(s,t) (3)
Like this, obtain a new network G
2=(V, E).At G
2in:
w
2(i,j)=w
1(i,j)
Step 6, at G
2in, (easily know, these limits are exactly shortest path P to remove all bandwidth and be 0 limit
1the limit of middle bandwidth minimum).Find out G
2in by source v
sto egress v
tshortest path P
2.
Step 7, at shortest path P
2in, find out the limit (may more than) of bandwidth minimum, using the bandwidth on this limit as shortest path P
2bandwidth; So this shortest path is reduced to a limit e
2(s, t), the two ends of this edge are source v
swith egress v
t, and:
Limit e
2the cost of (s, t) is as shown in formula (4):
Limit e
2the bandwidth of (s, t) is as shown in formula (5):
Wherein,
p
2the set on all limits.
Step 8, repetition above-mentioned steps, can obtain new network, new shortest path P, and new limit e (s, t).Suppose in new network G
n+1in, do not have path can make v
sarrive v
t, stop; The now network G of " remaining " of record
n+1, like this, just obtained n bar from v
sto v
tpath.
Step 9, network G
1finally can be reduced to such network G (V, E):
Only has v
sand v
ttwo end points, and between these two end points, have n bar limit to be connected: e
1(s, t), e
2(s, t) ... e
n(s, t).
Step 10, at every paths P
ion the flow value that should distribute as shown in formula (6)
Wherein, F is total flow, f
i(s, t) is path P
ibandwidth
Step 11, New Algorithm can draw following result
From v
sto v
tspeed as shown in formula (7)
v=∑f
i(s,t) (7)
Utilize New Algorithm, can be with the flow that is F by size of the shortest time from source v
spass to egress v
t, the time used is as shown in formula (8)
Network bandwidth utilization factor is as shown in formula (9)
Preferably, two of the network described in step 2 attributes: cost and bandwidth.It is characterized in that: so-called " bandwidth ", refer to this link flow that can transmit at most per second, wherein consider the time of the processing to data of router, so be not simple bandwidth.But discuss for convenient, regarded for the time being as bandwidth here.Such as, A is to the 80M/s that can transmit at most per second between B, and these data are that the factor such as bandwidth and route A and the time of B to data processing that has considered link draws, also can be described as in actual transmissions, A, to the B maximum stream flow that can transmit per second, is the value that can measure.Determine the factor of cost and " bandwidth ", some is common, also have impact even between the two, but how do not need specifically to know between them affects, because the shortest path (comprising former network) of the new network constantly generating on former network foundation is just found in the effect of this parameter of cost.Meanwhile, also it should be noted that any is, is not that cost is higher, and " bandwidth " is just necessarily less, because be not the relation of positive inverse ratio between the two.
Preferably, in described step 4, shortest path is reduced to a limit, it is characterized in that: the limit end points of this simplification is source v
swith egress v
t, cost is each limit cost sum of this shortest path, bandwidth is on this shortest path, the bandwidth on the limit of bandwidth minimum.
Preferably, the new network being obtained by legacy network in described step 5, is characterized in that: newly-generated network is to obtain after some limit of former network changes bandwidth value.These limits are the limits on shortest path, and its new bandwidth value is that original bandwidth has deducted on this shortest path minimum bandwidth and obtains.So just obtain new network.In new network, the bandwidth value on inevitable some limit has become 0, can remove these bandwidth and be 0 limit.
Preferably, described step 6, seven, eight, is on the basis of new network, finds the shortest path of new network, and according to similar before step, it is source v that new shortest path can be simplified to again an end points
swith egress v
tlimit, then new network is carried out according to new shortest path " transformation ", just generated the network of a renewal, like this, repeat down, until new network is the network of " remaining " always.The feature of the network of " remaining " is: in described step H, the network of " remaining " does not have path can make v
sarrive v
t.
Preferably, in described step 9, legacy network can be simplified to a very simple network, it is characterized in that: the network after simplification only has v
sand v
ttwo end points, and between these two end points, have n bar limit to be connected: e
1(s, t), e
2(s, t) ... e
n(s, t).
Preferably, the flow of source is divided into n part by described step 10, transmits respectively by n paths, between the data volume of every paths transmission, is proportional, it is characterized in that: every paths P
ion the flow value that should distribute be
Wherein, F is total flow, f
iit is path P in the network of simplifying
ibandwidth.
Preferably, three data (transmission rate, transmission time and network bandwidth utilization factor) that described step 11 obtains, it is characterized in that: these three data obtain after flow distributes according to step J, compare with traditional algorithm, there is transmission rate faster, shorter transmission time and the network bandwidth utilization factor of Geng Gao.
Accompanying drawing 1 is algorithm flow chart.
(3) beneficial effect
Adopt the present invention, can solve three problems of conventional data transmission algorithm, can realize following three beneficial effects:
A. make network bandwidth utilization factor be improved to greatest extent: all links are utilized, there will not be the situation of resources idle;
B. with the shortest time, flow is sent to egress from source: a certain amount of flow is transmitted by mulitpath, instead of single-pathway, transmission rate improves greatly;
C. make network bandwidth utilization factor be improved to greatest extent and realize flow equalization: only have in the time that flow exceedes the total load of whole Internet resources, just there will be congestion situation, instead of in traditional algorithm, the load that flow exceedes single path just there will be congested.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for illustrating the present invention, but are not used for limiting the scope of the invention.
Network by algorithm application in accompanying drawing 2, step is as follows.
1) utilize shortest path first to find out the shortest path P in accompanying drawing 2
1:
A→B→D→E→F
Path P
1total cost be 7, bandwidth is 50M/s (getting the minimum bandwidth on path).
2), according to algorithm, on the basis of accompanying drawing 2, obtain accompanying drawing 3
Accompanying drawing 3 is with the difference of accompanying drawing 2, belongs to P
1the bandwidth value on the limit in path has deducted 50M/s, and wherein DE limit bandwidth value has become 0, so DE limit is removed.Find out the shortest path P in accompanying drawing 3 with shortest path first
2:
A→B→C→F
Path P
2total cost be 10, bandwidth is 60M/s.
3), according to algorithm, on the basis of accompanying drawing 3, obtain accompanying drawing 4
Find out the shortest path P in accompanying drawing 4
3:
A→D→C→F
P
3cost is 12, and bandwidth is 30M/s.
4), according to algorithm, on the basis of accompanying drawing 4, obtain accompanying drawing 5
Find out the shortest path P in accompanying drawing 5
4:
A→D→B→C→E→F
P
4cost is 19, and bandwidth is 10M/s
5), according to algorithm, on the basis of accompanying drawing 5, obtain accompanying drawing 6
In accompanying drawing 6, having can not find the path from A to F, is " the remaining network " defining in algorithm, so to this termination.
6) final, network accompanying drawing 2 is simplified for as shown in Figure 7
Suppose to have 300M flow to pass to F from A, according to formula
Known, the flow that need to distribute respectively to path P 1, P2, P3, P4 is 100M, 120M, 60M and 20M.
By formula
Known, the transmission rate from A to F is 150M/s.
By formula
Known, 300M flow passes to F from A, only needs the time of 2 seconds.
By formula
Known, network broadband utilance is 91.23%.
For network manager, need make 33.3% flow walk P1 path,
A→B→D→E→F
Make 40% flow walk P2 path,
A→B→C→F
Make 20% flow walk P3 path,
A→D→C→F
Make 6.7% flow walk P4 path,
A→D→B→C→E→F
Further application of the present invention
From example above, can see, network bandwidth utilization factor has reached 91.23%, can network bandwidth utilization factor reach 100% so?
If according to the network of accompanying drawing 2,91.23% the utilance that TDBB algorithm obtains is exactly the peak use rate of this network, can not promote again.But, can consider now so a kind of situation, with reference to accompanying drawing 6, accompanying drawing 2 is carried out to some amendments, amended network is as shown in Figure 8
Comparative drawings figs 2 and accompanying drawing 8 can be found, limit AD, and BD, CE has reduced respectively 10M/s, the bandwidth of 10M/s and 30M/s (note that accompanying drawing 6 only has three limit: AD, BD, CE, the bandwidth on these three limits is respectively 10M/s, 10M/s and 30M/s).Now accompanying drawing 8 is used to TDBB algorithm, we can find, the result finally obtaining and the result of using TDBB algorithm to obtain to accompanying drawing 2 are in full accord, unique difference is, the network bandwidth utilization factor of accompanying drawing 8 has reached 100%, and (network of final " remaining " has only been left end points, do not have limit, i.e. the set on limit is empty set).It can be seen, build a network in real life time, can adjust according to TDBB algorithm the bandwidth of each link completely, make network bandwidth utilization factor reach 100%, such as the network in accompanying drawing 2, its AD link, BD link and CE link are many respectively 10M/s, the unnecessary bandwidth of 10M/s and 30M/s.That is to say that the network in accompanying drawing 2 can reconstruct as the network in accompanying drawing 8, thereby Internet resources are utilized to the fullest.