(19)
(11)EP 3 197 110 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
26.07.2017 Bulletin 2017/30

(21)Application number: 15758045.7

(22)Date of filing:  22.01.2015
(51)Int. Cl.: 
H04L 12/911  (2013.01)
(86)International application number:
PCT/CN2015/071331
(87)International publication number:
WO 2015/131692 (11.09.2015 Gazette  2015/36)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME

(30)Priority: 17.09.2014 CN 201410475540

(71)Applicant: ZTE Corporation
Shenzhen, Guangdong 518057 (CN)

(72)Inventor:
  • SHAO, Changchun
    Shenzhen Guangdong 518057 (CN)

(74)Representative: Novagraaf Technologies 
Bâtiment O2 2, rue Sarah Bernhardt CS90017
92665 Asnières-sur-Seine Cedex
92665 Asnières-sur-Seine Cedex (FR)

  


(54)BANDWIDTH ALLOCATION METHOD AND APPARATUS


(57) Provided are a bandwidth allocation method and apparatus. According to a preset allocation ratio, an uplink/downlink total bandwidth of a router is divided into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth. Bandwidth traffic of each device linked to the router is monitored. Each device having bandwidth traffic exceeding a preset threshold is classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold is classified as a second-class device. According to a monitoring result, the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth are allocated to first-class devices and second-class devices respectively. The technical solution uses a bandwidth control function already present in a Hierarchical Token Bucket (HTB) algorithm and adopts mechanisms of threshold setting and device bandwidth dynamic configuration. By virtue of the technical solution, all users are able to equally pre-empt and share bandwidths in real time under the premise that less of a total bandwidth is wasted, and the objective of equitable sharing of the bandwidth can be achieved, thereby enhancing the user experience of enjoying network service.




Description

Technical Field



[0001] The present disclosure relates to the field of communications, and in particular to a bandwidth allocation method and apparatus.

Background



[0002] At present, a plurality of devices may be linked to one router to share network bandwidths. If one device uses, for example, Thunder Download to pre-empt the entire bandwidth, other devices are unlikely to pre-empt the bandwidth, and thus the other devices cannot use network service normally.

[0003] Some Peer to Peer (P2P) download software, such as Thunder download software, Bit Torrent (BT) download software, Funshion download software, Tudou online video and Youku online video, use a special download mechanism. This special download mechanism enables the software using this mechanism to quickly pre-empt a large bandwidth during downloading until the software pre-empts the entire bandwidth. When a multi-thread mode is activated, all bandwidths may be pre-empted during downloading of a plurality of movies, thereby preventing other devices from pre-empting the bandwidth and influencing the normal use of network services, for example, the other devices even cannot browse a web page.

[0004] In the related art, even if a total bandwidth may be equally allocated to each device by using a Hierarchical Token Bucket (HTB) algorithm, this problem cannot be well solved. Analysis may be done considering two situations described below. In the first situation, the bandwidth is equally allocated and is allowed to be borrowed. Under this situation, after a certain device pre-empts the entire bandwidth, other devices cannot pre-empt the bandwidth since the device pre-empting the entire bandwidth is not obligated to repay bandwidths to the other devices. Fig. 1 is a first diagram of bandwidth allocation to two devices based on an HTB algorithm according to the related art. As shown in Fig. 1, device A in Fig. 1 pre-empts a majority of the total bandwidth, and device B cannot pre-empt more bandwidths. In the second situation, the bandwidth is equally allocated but is not allowed to be borrowed. Under this situation, although the situation that some devices cannot pre-empt bandwidths does not exist, waste of the entire bandwidth is serious when some devices use small bandwidth. Fig. 2 is a second diagram of bandwidth allocation to two devices based on an HTB algorithm according to the related art. As shown in Fig. 2, device A can only pre-empt part of the bandwidth at most, and device B pre-empts small bandwidth, thus causing waste of remaining bandwidth resources. It can be concluded from the aforementioned analysis that multiple devices cannot equitably use the total bandwidth due to inherent characteristics of the HTB algorithm.

[0005] Any effective solution has not been proposed yet at present for the problem in the related art where a bandwidth allocation method is not proper.

Summary



[0006] Some embodiments of the present disclosure provide a bandwidth allocation method and apparatus, so as to solve the technical problem in the related art where a bandwidth allocation method is not proper.

[0007] An embodiment of the present disclosure provides a bandwidth allocation method, which may include the following acts. An uplink/downlink total bandwidth of a router may be divided into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio. Bandwidth traffic of each device linked to the router may be monitored. In this act, each device having bandwidth traffic exceeding a preset threshold may be classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold may be classified as a second-class device. The uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth may be allocated to first-class devices and second-class devices respectively according to a monitoring result.

[0008] In an exemplary embodiment, a situation that the bandwidth traffic exceeds the preset threshold may include one of the following four situations. A first situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold. A second situation is that downlink bandwidth traffic of each device exceeds a downlink preset threshold. A third situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold. A fourth situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.

[0009] In an exemplary embodiment, the act that the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth are allocated to the first-class devices and the second-class devices respectively according to the monitoring result may include the following acts. The uplink/downlink parent-class bandwidth may be allocated to the first-class devices. A remaining bandwidth may be allocated to the second-class devices. The remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth.

[0010] In an exemplary embodiment, the uplink preset threshold may be less than the uplink reserved bandwidth, and/or the downlink preset threshold may be less than the downlink reserved bandwidth.

[0011] In an exemplary embodiment, the uplink/downlink parent-class bandwidth may be allocated to the first-class devices in at least one of the following modes: average allocation, allocation in a preset proportion, and priority-based allocation.

[0012] An embodiment of the present disclosure provides a bandwidth allocation apparatus, which may include a bandwidth division module, a traffic monitoring module and a bandwidth allocation module. The bandwidth division module is arranged to divide an uplink/downlink total bandwidth of a router into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio. The traffic monitoring module is arranged to monitor bandwidth traffic of each device linked to the router. Each device having bandwidth traffic exceeding a preset threshold may be classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold may be classified as a second-class device. The bandwidth allocation module is arranged to allocate the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth to first-class devices and second-class devices respectively according to a monitoring result.

[0013] In an exemplary embodiment, a situation that the bandwidth traffic exceeds the preset threshold may include one of the following four situations. A first situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold. A second situation is that downlink bandwidth traffic of each device exceeds a downlink preset threshold. A third situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold. A fourth situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.

[0014] In an exemplary embodiment, the bandwidth allocation module may include a first allocation unit and a second allocation unit. The first allocation unit is arranged to allocate the uplink/downlink parent-class bandwidth to the first-class devices. The second allocation unit is arranged to allocate a remaining bandwidth to the second-class devices. The remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth.

[0015] In an exemplary embodiment, the uplink preset threshold may be less than the uplink reserved bandwidth, and/or the downlink preset threshold may be less than the downlink reserved bandwidth.

[0016] In an exemplary embodiment, the bandwidth allocation module may be arranged to allocate the uplink/downlink parent-class bandwidth to the first-class devices in at least one of the following modes: average allocation, allocation in a preset proportion, and priority-based allocation.

[0017] An embodiment of the present disclosure provides a computer program. Another embodiment of the present disclosure provides a carrier for carrying a computer program. The computer program may include program instructions which, when executed by a routing device, cause the routing device to implement the aforementioned bandwidth allocation method.

[0018] The technical solution provided by the embodiments of the present disclosure has the following beneficial effects.

[0019] The technical solution uses a bandwidth control function already present in an HTB algorithm and adopts mechanisms of reserving a bandwidth in a total bandwidth, setting a threshold and dynamically configuring the device bandwidth. By virtue of the technical solution, all users are able to equally pre-empt and share bandwidths in real time under the premise that less of a total bandwidth is wasted, and the objective of equitable sharing of the bandwidth can be achieved, thereby enhancing the user experience of enjoying network service.

Brief Description of the Drawings



[0020] 

Fig. 1 is a first diagram of bandwidth allocation to two devices based on an HTB algorithm according to the related art;

Fig. 2 is a second diagram of bandwidth allocation to two devices based on an HTB algorithm according to the related art;

Fig. 3 is a flowchart of a bandwidth allocation method according to an embodiment of the present disclosure;

Fig. 4 is a first diagram of bandwidth allocation according to an embodiment of the present disclosure;

Fig. 5 is a second diagram of bandwidth allocation according to an embodiment of the present disclosure;

Fig. 6 is a third diagram of bandwidth allocation according to an embodiment of the present disclosure;

Fig. 7 is a fourth diagram of bandwidth allocation according to an embodiment of the present disclosure; and

Fig. 8 is a structural diagram of a bandwidth allocation apparatus according to an embodiment of the present disclosure.


Detailed Description of the Embodiments



[0021] In order to solve the problem in the conventional art where a bandwidth allocation method is not proper, the embodiments of the present disclosure provide a bandwidth allocation method and apparatus.

[0022] The embodiments of the present disclosure will be illustrated hereinbelow in conjunction with the drawings in detail. It is important to note that the embodiments in the present application and the characteristics in the embodiments may be combined under the condition of no conflicts. In addition, although a logic sequence is shown in the flowchart, the shown or described acts may be executed in a sequence different from the sequence here under certain conditions. It shall be understood that specific embodiments described herein are merely used to explain the present disclosure and do not limit the present disclosure.

[0023] An embodiment provides a bandwidth allocation method which may be implemented at a router side. Fig. 3 is a flowchart of a bandwidth allocation method according to the embodiment of the present disclosure. As shown in Fig. 3, the method may include the following acts (S302 to S306).

[0024] At S302, an uplink/downlink total bandwidth of a router may be divided into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio. The preset allocation ratio may be determined according to a practical situation. As an example only, the uplink/downlink parent-class bandwidth accounts for 80%, and the uplink/downlink reserved bandwidth accounts for 20%.

[0025] At S304, the bandwidth traffic of each device linked to the router may be monitored. Each device having bandwidth traffic exceeding a preset threshold may be classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold may be classified as a second-class device. The value of the preset threshold may be set according to a practical operation situation.

[0026] In the present embodiment, taking the fact that a router has an uplink channel and a downlink channel into consideration, a situation that the bandwidth traffic exceeds the preset threshold may include one of the following four situations.
  1. (1) Uplink bandwidth traffic of each device exceeds an uplink preset threshold.
  2. (2) Downlink bandwidth traffic of each device exceeds a downlink preset threshold.
  3. (3) Uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold.
  4. (4) Uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.


[0027] The uplink preset threshold may be less than the uplink reserved bandwidth, and/or the downlink preset threshold may be less than the downlink reserved bandwidth.

[0028] At S306, the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth are allocated to first-class devices and second-class devices respectively according to a monitoring result.

[0029] In this act, the bandwidth allocation method may be implemented in the following manner. The uplink/downlink parent-class bandwidth may be allocated to the first-class devices. A remaining bandwidth may be allocated to the second-class devices. The remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth. In a practical operation process, a bandwidth used by the first-class devices may not be equal to the uplink/downlink parent-class bandwidth allocated to the first-class devices, that is, the first-class device may not use the entirety of the uplink/downlink parent-class bandwidth allocated to the first-class device.

[0030] The present embodiment uses a bandwidth control function already present in an HTB algorithm and adopts mechanisms of reserving a bandwidth in a total bandwidth, setting a threshold and dynamically configuring the device bandwidth. By virtue of the technical solution, all users are able to equally pre-empt and share bandwidths in real time under the premise that less of a total bandwidth is wasted, and the objective of equitable sharing of the bandwidth can be achieved, thereby enhancing the user experience of enjoying network service.

[0031] The bandwidth may be allocated to the first-class device in at least one of the following modes: average allocation, allocation in a preset proportion, and priority-based allocation. All devices exceeding the preset threshold share the parent-class bandwidth, and are not allowed to re-borrow bandwidth other than the parent-class bandwidth in the total bandwidth.

[0032] In the present embodiment, part of the total bandwidth is reserved as a burst bandwidth (i.e., reserved bandwidth). The remaining bandwidth (i.e., parent-class bandwidth) is dynamically and equally allocated to the linked devices. All devices are allowed to pre-empt the bandwidth in a burst manner during initialization. In the present embodiment, the parent-class bandwidth is defined as the remaining bandwidth obtained by subtracting the reserved bandwidth from the total bandwidth. In an HTB algorithm, a child class may borrow bandwidth from the parent-class, and is not obligated to repay the bandwidth, thereby leading to 'starvation' of other child classes easily. According to the technical solution provided by the embodiments of the present disclosure, part of the total bandwidth is reserved, and child classes having pre-empted all the remaining bandwidth in the total bandwidth are not allowed to borrow the reserved bandwidth, so other child classes may burst via the reserved bandwidth. In the technical solution provided by the embodiments of the present disclosure, a preset threshold value is provided. When the burst traffic of a certain child classes exceeds the preset threshold, this child classes may share the parent-class bandwidth with all of the other child classes having the burst traffic exceeding the threshold value.

[0033] The total bandwidth may include an uplink total bandwidth and a downlink total bandwidth.

[0034] The reserved bandwidth may include an uplink reserved bandwidth and a downlink reserved bandwidth.

[0035] The parent-class bandwidth may include an uplink parent-class bandwidth and a downlink parent-class bandwidth.

[0036] Each device corresponds to one child class, and the bandwidth is allocated to each child class based on a device Media Access Control (MAC).

[0037] The reserved bandwidth may be reserved according to a ratio, e.g., a percentage, of the total bandwidth. Generally, the reserved bandwidth is required to ensure that, for example, a web page may be normally browsed under a non pre-empting condition. That is, the reversed bandwidth is generally a non-zero value. The size of the reserved bandwidth may be limited in conjunction with an absolute value of the total bandwidth. That is, a minimum value and a maximum value may be limited on the basis of the percentage of the total bandwidth. The reserved bandwidth may include an uplink reserved bandwidth and a downlink reserved bandwidth. When there is only one device at present, the reserved bandwidth may be zero, that is, no bandwidth is reserved, and the device may use the entire bandwidth. The reserved bandwidth is set to be as small as possible on the basis of ensuring that the bandwidth can be successfully pre-empted.

[0038] The preset threshold is a minimum traffic value for sharing the parent-class bandwidth. A device with traffic exceeding the minimum value is allowed to equitably share the parent-class bandwidth. The preset threshold may be divided into an uplink bandwidth preset threshold and a downlink bandwidth preset threshold. The preset threshold is generally smaller than the reserved bandwidth.

[0039] A smaller preset threshold is easier to trigger dynamic equal bandwidth allocation, but it is easy to cause bandwidth waste due to frequent equal bandwidth allocation, especially when some devices only use smaller traffic. The bandwidth pre-empting sensitivity is associated with the preset threshold. The sensitivity is higher while the preset threshold is lower, and the sensitivity is lower while the preset threshold is higher.

[0040] In the present embodiment, as an optional implementation, a timer may be arranged to detect the traffic of each device in real time. The bandwidth pre-empting sensitivity is associated with a time interval of the timer. The sensitivity is higher while the time interval is smaller, and the sensitivity is lower while the time interval is larger. It is not true that the smaller the time interval is, the better the performance is. A smaller time interval occupies a longer time of a Central Processing Unit (CPU), thus influencing running of other services on a system. The time interval is suggested to be set to achieve the best user experience (that is, the sensitivity is higher) on the basis of no influence on the system performance.

[0041] When it is detected that the device traffic exceeding the preset threshold is lower than the preset threshold after a period of time, the device no longer shares the parent-class bandwidth with other devices. For the device, it is only guaranteed that the minimum bandwidth is an average bandwidth after the total bandwidth is equally allocated to all the users, and the device is allowed to borrow the total bandwidth. When the router only has one online device, the device may use the entire total bandwidth.

[0042] A specific implementation mode of this embodiment will be illustrated hereinbelow.

[0043] The implementation solution is that: during initialization, 20% of the total bandwidth is reserved, and the remaining 80% of the total bandwidth is equally allocated to all linked devices. If the reserved 20% of the total bandwidth exceeds 1 Million bits per second (Mbps), only 1 Mbps is reserved. The remaining 80% of the total bandwidth is called as the parent-class bandwidth. The timer is started to be capable of detecting uplink/downlink network traffic at an interval of 1s. If the uplink or downlink traffic of N devices exceeds a certain preset threshold, the parent-class bandwidth is equally allocated to the N devices (not allowed to borrow bandwidth), and other devices are allowed to burst to the parent-class bandwidth on the basis of equal allocation of the parent-class bandwidth. A device of which the uplink/downlink traffic does not exceed the preset threshold may use the reserved bandwidth in the total bandwidth to pre-empt the bandwidth in a burst manner until the device equally shares the bandwidth with other devices exceeding the preset threshold.

[0044] If the downlink total bandwidth of a network environment is 10Mbps and the uplink total bandwidth is 1 Mbps, then according to the aforementioned implementation solution, the downlink reserved bandwidth is 1 Mbps, the downlink parent-class bandwidth is 9Mbps, the uplink reserved bandwidth is 200Kbps, and the uplink parent-class bandwidth is 800Kbps. If the uplink bandwidth preset threshold and the downlink bandwidth preset threshold are both 50Kbps, the type of a dynamic bandwidth allocation triggering mechanism is that the traffic exceeds the uplink preset threshold or exceeds the downlink preset threshold.
  1. A. When only one device is linked to the router, the device is allowed to occupy all bandwidths, and a Traffic Control (TC) rule may be configured as follows.

    tc class add dev ifb0 parent 1:2 classid 1:101 htb rate 10000kbit ceil 10000kbit prio 0

    tc class add dev eth0 parent 1:2 classid 1:101 htb rate 1000kbit ceil 1000kbit prio 0

    where ifb0 is a downlink convergence interface device, and eth0 is an uplink convergence interface device.
  2. B. When four devices are linked to the router, when traffic of two of the devices (device 101 and device 102) exceeds a preset threshold, a TC rule may be configured as follows.

Downlink:



[0045] 

tc class add dev ifb0 parent 1:2 classid 1:101 htb rate 4500kbit ceil 4500kbit prio 0

tc class add dev ifb0 parent 1:2 classid 1:102 htb rate 4500kbit ceil 4500kbit prio 0

tc class add dev ifb0 parent 1:2 classid 1:103 htb rate 2500kbit ceil 10000kbit prio 0

tc class add dev ifb0 parent 1:2 classid 1:104 htb rate 2500kbit ceil 10000kbit prio 0



[0046] Available bandwidth resources of the aforementioned device 103 and device 104 may be limited to be 2500kbit to 10000kbit, where 2500kbit is obtained by dividing a downlink total bandwidth 10Mbps by 4 (total number of devices).

Uplink:



[0047] 

tc class add dev eth0 parent 1:2 classid 1:101 htb rate 400kbit ceil 400kbit prio 0

tc class add dev eth0 parent 1:2 classid 1:102 htb rate 400kbit ceil 400kbit prio 0

tc class add dev eth0 parent 1:2 classid 1:103 htb rate 250kbit ceil 1000kbit prio 0

tc class add dev eth0 parent 1:2 classid 1:104 htb rate 250kbit ceil 1000kbit prio 0



[0048] Available bandwidth resources of the aforementioned device 103 and device 104 may be limited to be 250kbit to 1000kbit, where 250kbit is obtained by dividing a downlink total bandwidth 1 Mbps by 4 (total number of devices).

[0049] When the traffic of device 101 or 102 exceeds 50Kbps, the two devices may use a downlink parent-class bandwidth 4.5Mbps, and cannot pre-empt more bandwidths, referring to a first diagram of bandwidth allocation as shown in Fig. 4.

[0050] At this time, device 103 or 104 may pre-empt the bandwidth by borrowing downlink reserved bandwidth 1 Mbps of downlink total bandwidth+(4.5Mbps-bandwidth used by device)*2 (note: two devices 101 and 102). Once the traffic of device 103 or 104 exceeds the preset threshold, device 103 or 104 may equally share the downlink parent-class bandwidth 9Mbps with device 101 and 102. The bandwidth used by the device may not be equal to 3Mbps or 2.25Mbps, that is, the downlink parent-class bandwidth allocated to device 103 or 104 may not be completely used by device 103 or 104.

[0051] When the bandwidth traffic of device 103 exceeds the preset threshold, the bandwidth allocation is shown in a second diagram of bandwidth allocation in Fig. 5.

[0052] When the bandwidth traffic of device 104 also exceeds the preset threshold, the bandwidth allocation is shown in a third diagram of bandwidth allocation in Fig. 6.

[0053] When the bandwidth traffic of device 102, 103 and 104 exceeds the preset threshold, the bandwidth allocation is shown in a fourth diagram of bandwidth allocation in Fig. 7.

[0054] In correspondence to the bandwidth allocation method introduced in the aforementioned embodiments, the present embodiment provides a bandwidth allocation apparatus. The apparatus may be arranged at a router side, and arranged to implement the aforementioned embodiment. The router may include a processor, a program memory and a data memory. Fig. 8 is a structural diagram of a bandwidth allocation apparatus according to an embodiment of the present disclosure. As shown in Fig. 8, the apparatus may include: a bandwidth division module 10, a traffic monitoring module 20 and a bandwidth allocation module 30. The structure will be introduced hereinbelow in detail.

[0055] The bandwidth division module 10 is arranged to divide an uplink/downlink total bandwidth of a router into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio.

[0056] The traffic monitoring module 20 is connected to the bandwidth division module 10 and arranged to monitor bandwidth traffic of each device linked to the router. Each device having bandwidth traffic exceeding a preset threshold may be classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold may be classified as a second-class device.

[0057] The bandwidth allocation module 30 is connected to the traffic monitoring module 20 and arranged to allocate the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth to first-class devices and second-class devices respectively according to a monitoring result.

[0058] The present embodiment uses a bandwidth control function already present in an HTB algorithm and adopts mechanisms of reserving a bandwidth in a total bandwidth, setting a threshold and dynamically configuring the device bandwidth. By virtue of the technical solution, all users are able to equally pre-empt and share bandwidths in real time under the premise that less of a total bandwidth is wasted, and the objective of equitable sharing of the bandwidth can be achieved, thereby enhancing the user experience of enjoying network service.

[0059] A situation that the bandwidth traffic exceeds the preset threshold may include one of the following four situations. A first situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold. A second situation is that downlink bandwidth traffic of each device exceeds a downlink preset threshold. A third situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold. A fourth situation is that uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.

[0060] In an exemplary embodiment, the bandwidth allocation module 30 may include a first allocation unit and a second allocation unit. The first allocation unit is arranged to allocate the uplink/downlink parent-class bandwidth to the first-class devices. The second allocation unit is arranged to allocate a remaining bandwidth to the second-class devices. The remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth.

[0061] In the present embodiment, the uplink preset threshold may be less than the uplink reserved bandwidth, and/or the downlink preset threshold may be less than the downlink reserved bandwidth.

[0062] In the present embodiment, the uplink/downlink parent-class bandwidth may be allocated to the first-class devices in at least one of the following modes: average allocation, allocation in a preset proportion, and priority-based allocation.

[0063] Some P2P download software, such as Thunder download software, BT download software, Funshion download software, Tudou online video and Youku online video, use a special download mechanism. This special download mechanism enables the software using this mechanism to quickly pre-empt a large bandwidth during downloading until the software pre-empts the entire bandwidth. When a multi-thread mode is activated, all bandwidths may be pre-empted during downloading of a plurality of movies, thereby preventing other devices from pre-empting the bandwidth and influencing the normal use of network services, for example, the other devices even cannot browse a web page. By means of the present disclosure, these pieces of software pre-empting the bandwidth cannot pre-empt all bandwidths, and other devices may pre-empt the bandwidth and equitably share the bandwidth.

[0064] Those of ordinary skill in the art may understand that all or some acts in the aforementioned method may be completed by instructing relevant hardware via a program, and the program may be stored in a computer-readable storage medium such as a read-only memory, a magnetic disk or an optical disc. Alternatively, all or some acts in the aforementioned embodiments may be implemented by using one or more integrated circuits. Correspondingly, each module/unit in the aforementioned embodiments may be implemented in a hardware form or may be implemented in a software function module form. The present disclosure is not limited to combination of any specific hardware and software.

[0065] Certainly, the present disclosure may also have various other embodiments. Those skilled in the art may make various corresponding variations and transformations according to the present disclosure without departing from the essence of the present disclosure, but these corresponding variations and transformations shall fall within the scope of protection of the claims of the present disclosure.

Industrial Applicability



[0066] The technical solution provided in the embodiments of the present disclosure uses a bandwidth control function already present in an HTB algorithm and adopts mechanisms of reserving a bandwidth in a total bandwidth, setting a threshold and dynamically configuring the device bandwidth. By virtue of the technical solution, all users are able to equally pre-empt and share bandwidths in real time under the premise that less of a total bandwidth is wasted, and the objective of equitable sharing of the bandwidth can be achieved, thereby enhancing the user experience of enjoying network service


Claims

1. A bandwidth allocation method, comprising:

dividing an uplink/downlink total bandwidth of a router into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio;

monitoring bandwidth traffic of each device linked to the router, wherein each device having bandwidth traffic exceeding a preset threshold is classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold is classified as a second-class device; and

allocating the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth to first-class devices and second-class devices respectively according to a monitoring result.


 
2. The method as claimed in claim 1, wherein a situation that the bandwidth traffic exceeds the preset threshold comprises one of the following four situations:

uplink bandwidth traffic of each device exceeds an uplink preset threshold;

downlink bandwidth traffic of each device exceeds a downlink preset threshold;

uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold;

uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.


 
3. The method as claimed in claim 1, wherein allocating the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth to the first-class devices and the second-class devices respectively according to the monitoring result comprises:

allocating the uplink/downlink parent-class bandwidth to the first-class devices; and

allocating a remaining bandwidth to the second-class devices, wherein the remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth.


 
4. The method as claimed in claim 2, wherein the uplink preset threshold is less than the uplink reserved bandwidth, and/or the downlink preset threshold is less than the downlink reserved bandwidth.
 
5. The method as claimed in claim 1, wherein the uplink/downlink parent-class bandwidth is allocated to the first-class devices in at least one of the following modes:

average allocation, allocation in a preset proportion, and priority-based allocation.


 
6. A bandwidth allocation apparatus, comprising:

a bandwidth division module, arranged to divide an uplink/downlink total bandwidth of a router into an uplink/downlink parent-class bandwidth and an uplink/downlink reserved bandwidth according to a preset allocation ratio;

a traffic monitoring module, arranged to monitor bandwidth traffic of each device linked to the router, wherein each device having bandwidth traffic exceeding a preset threshold is classified as a first-class device, and each device having bandwidth traffic not exceeding the preset threshold is classified as a second-class device; and

a bandwidth allocation module, arranged to allocate the uplink/downlink parent-class bandwidth and the uplink/downlink reserved bandwidth to first-class devices and second-class devices respectively according to a monitoring result.


 
7. The apparatus as claimed in claim 6, wherein a situation that the bandwidth traffic exceeds the preset threshold comprises one of the following four situations:

uplink bandwidth traffic of each device exceeds an uplink preset threshold;

downlink bandwidth traffic of each device exceeds a downlink preset threshold;

uplink bandwidth traffic of each device exceeds an uplink preset threshold, and downlink bandwidth traffic of each device exceeds a downlink preset threshold;

uplink bandwidth traffic of each device exceeds an uplink preset threshold, or downlink bandwidth traffic of each device exceeds a downlink preset threshold.


 
8. The apparatus as claimed in claim 6, wherein the bandwidth allocation module comprises:

a first allocation unit, arranged to allocate the uplink/downlink parent-class bandwidth to the first-class devices; and

a second allocation unit, arranged to allocate a remaining bandwidth to the second-class devices, wherein the remaining bandwidth is equal to a sum of the uplink/downlink reserved bandwidth and a value obtained by subtracting a bandwidth used by the first-class devices from the uplink/downlink parent-class bandwidth.


 
9. The apparatus as claimed in claim 7, wherein the uplink preset threshold is less than the uplink reserved bandwidth, and/or the downlink preset threshold is less than the downlink reserved bandwidth.
 
10. The apparatus as claimed in claim 6, wherein the bandwidth allocation module is arranged to allocate the uplink/downlink parent-class bandwidth to the first-class devices in at least one of the following modes: average allocation, allocation in a preset proportion, and priority-based allocation.
 
11. A computer program, comprising program instructions which, when executed by a routing device, cause the routing device to implement the bandwidth allocation method according to any one of claims 1 to 5.
 
12. A carrier, carrying the computer program as claimed in claim 11.
 




Drawing