CN110708262A - Method and apparatus for controlling bandwidth allocation - Google Patents

Method and apparatus for controlling bandwidth allocation Download PDF

Info

Publication number
CN110708262A
CN110708262A CN201911003248.2A CN201911003248A CN110708262A CN 110708262 A CN110708262 A CN 110708262A CN 201911003248 A CN201911003248 A CN 201911003248A CN 110708262 A CN110708262 A CN 110708262A
Authority
CN
China
Prior art keywords
bandwidth allocation
bandwidth
gateway device
current
upper limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911003248.2A
Other languages
Chinese (zh)
Other versions
CN110708262B (en
Inventor
周清志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911003248.2A priority Critical patent/CN110708262B/en
Publication of CN110708262A publication Critical patent/CN110708262A/en
Application granted granted Critical
Publication of CN110708262B publication Critical patent/CN110708262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/822Collecting or measuring resource availability data

Abstract

Embodiments of the present disclosure disclose methods and apparatus for controlling bandwidth allocation. One embodiment of the method comprises: acquiring a current actual used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value; determining whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value; in response to determining to request bandwidth reallocation, communicating with a target routing device to send a bandwidth request to the target routing device requesting bandwidth reallocation, wherein the communicating with the target routing device is performed only if bandwidth reallocation is requested; receiving a new bandwidth allocation upper limit value generated by the target routing equipment based on the bandwidth request; and taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission. This embodiment may save communication costs with the routing device.

Description

Method and apparatus for controlling bandwidth allocation
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and an apparatus for controlling bandwidth allocation.
Background
Currently, a cluster speed limit method is often implemented by a speed limit server. The speed limit server periodically (e.g., once per second) pulls the speed limit unit traffic information from the device. And then summarizing the flow values on the speed-taking limiting units. And if the flow value exceeds the upper limit flow value, issuing different speed limit strategies to the equipment. For example, the above strategies may be an even distribution by devices, or an actual proportional distribution, etc.
Disclosure of Invention
The present disclosure presents methods and apparatus for controlling bandwidth allocation.
In a first aspect, an embodiment of the present disclosure provides a method for controlling bandwidth allocation, the method including: acquiring a current actual used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value; determining whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value; in response to determining to request bandwidth reallocation, communicating with a target routing device to send a bandwidth request to the target routing device requesting bandwidth reallocation, wherein the communicating with the target routing device is performed only if bandwidth reallocation is requested; receiving a new bandwidth allocation upper limit value generated by the target routing equipment based on the bandwidth request; and taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to insufficient current bandwidth allocation, increasing a current bandwidth allocation weight; in response to the current bandwidth allocation being sufficient, the current bandwidth allocation weight is decreased.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight; and reducing the current bandwidth allocation weight in response to the current bandwidth allocation being sufficient and in response to the current bandwidth allocation weight belonging to the preset weight interval.
In some embodiments, the method further comprises: and responding to the fact that the local and target routing devices do not communicate for more than the preset time, and disconnecting the connection with the target routing devices.
In a second aspect, an embodiment of the present disclosure provides a method for controlling bandwidth allocation, the method including: receiving a bandwidth request which is sent by a gateway device in a target gateway device cluster and indicates that the gateway device requests to reallocate bandwidth, wherein the gateway device in the target gateway device cluster is communicated with the local only under the condition of requesting to reallocate bandwidth; generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received bandwidth requests; and respectively sending each generated new bandwidth allocation upper limit value to corresponding gateway equipment so that the gateway equipment can transmit data by taking the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device; in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device; and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to a preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
In some embodiments, generating a new bandwidth allocation ceiling value for the gateway devices in the target gateway device cluster based on the received respective bandwidth requests comprises: and generating a new bandwidth allocation upper limit value for the gateway device in the target gateway device cluster based on the bandwidth allocation weight contained in each received bandwidth request, wherein the new bandwidth allocation upper limit value corresponding to each gateway device with insufficient current bandwidth allocation in the target gateway device cluster is positively correlated with the bandwidth allocation weight.
In some embodiments, generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights included in the received bandwidth requests includes: and generating a new bandwidth allocation upper limit value for the gateway equipment in the target gateway equipment cluster based on the bandwidth allocation weight and the initial value contained in each received bandwidth request.
In some embodiments, the method further comprises: and responding to the gateway equipment which is not communicated with the local and exceeds the preset time length in the target gateway equipment cluster, and disconnecting the gateway equipment which is not communicated with the local and exceeds the preset time length.
In some embodiments, the sum of the current bandwidth allocation upper limit values of the gateway devices in the target gateway device cluster is less than or equal to the preset threshold.
In a third aspect, an embodiment of the present disclosure provides an apparatus for controlling bandwidth allocation, the apparatus including: an acquisition unit configured to acquire a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value; a determining unit configured to determine whether to request bandwidth reallocation based on a current actually used bandwidth value and a current bandwidth allocation upper limit value; a communication unit configured to communicate with a target routing device to transmit a bandwidth request for requesting bandwidth reallocation to the target routing device in response to determining that bandwidth reallocation is requested, wherein the communication is performed with the target routing device only in a case where bandwidth reallocation is requested; a first receiving unit configured to receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request; and the transmission unit is configured to transmit the data by taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to insufficient current bandwidth allocation, increasing a current bandwidth allocation weight; in response to the current bandwidth allocation being sufficient, the current bandwidth allocation weight is decreased.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight; and reducing the current bandwidth allocation weight in response to the current bandwidth allocation being sufficient and in response to the current bandwidth allocation weight belonging to the preset weight interval.
In some embodiments, the apparatus further comprises: and the first connection disconnection unit is configured to disconnect the connection with the target routing equipment in response to the local communication failure with the target routing equipment exceeding the preset time.
In a fourth aspect, an embodiment of the present disclosure provides yet another apparatus for controlling bandwidth allocation, the apparatus including: a second receiving unit, configured to receive a bandwidth request sent by a gateway device in a target gateway device cluster, where the gateway device requests to reallocate bandwidth, and the gateway device in the target gateway device cluster communicates with the local only when requesting to reallocate bandwidth; a generating unit configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received respective bandwidth requests; and the sending unit is configured to send each generated new bandwidth allocation upper limit value to the corresponding gateway device respectively, so that the gateway device transmits the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device; in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
In some embodiments, the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device; and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to a preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
In some embodiments, the generating unit comprises: and the generating module is configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights contained in the received bandwidth requests, wherein the new bandwidth allocation upper limit value corresponding to each gateway device with insufficient current bandwidth allocation in the target gateway device cluster is positively correlated with the bandwidth allocation weights.
In some embodiments, the generating module comprises: and the generation submodule is configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weight and the initial value contained in each received bandwidth request.
In some embodiments, the apparatus further comprises: and the second connection disconnection unit is configured to respond to the gateway device which is not communicated with the local and exceeds the preset time length in the target gateway device cluster, and disconnect the gateway device which is not communicated with the local and exceeds the preset time length.
In some embodiments, the sum of the current bandwidth allocation upper limit values of the gateway devices in the target gateway device cluster is less than or equal to the preset threshold.
In a fifth aspect, an embodiment of the present disclosure provides an electronic device for controlling bandwidth allocation, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments of the method for controlling bandwidth allocation as in the first or second aspect above.
In a sixth aspect, embodiments of the present disclosure provide a computer-readable medium for controlling bandwidth allocation, on which a computer program is stored, which when executed by a processor implements the method of any of the embodiments of the method for controlling bandwidth allocation as in the first or second aspect described above.
A first method and apparatus for controlling bandwidth allocation provided by embodiments of the present disclosure, by obtaining a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value, then determining whether to request bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value, then communicating with a target routing device to send a bandwidth request for requesting bandwidth reallocation to the target routing device in case of determining that bandwidth reallocation is requested, wherein communicating with the target routing device is performed only in case of requesting bandwidth reallocation, then receiving a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request, and finally performing data transmission with the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value, thereby not communicating with the target routing device in case of not requesting bandwidth reallocation, that is, communication is performed with the target routing device only in the case where bandwidth reallocation is requested, thereby reducing communication costs with the target routing device.
In addition, a second method and apparatus for controlling bandwidth allocation provided by the embodiments of the present disclosure receive a bandwidth request indicating that a gateway device in a target gateway device cluster requests to reallocate bandwidth, where the gateway device in the target gateway device cluster communicates with the local only when requesting to reallocate bandwidth, then generate a new bandwidth allocation upper limit value for the gateway device in the target gateway device cluster based on each received bandwidth request, and finally send each generated new bandwidth allocation upper limit value to a corresponding gateway device, respectively, so that the gateway device transmits the received new bandwidth allocation upper limit value as a current bandwidth allocation upper limit value for data transmission, and thus the gateway device in the target gateway device cluster communicates with the local only when needing to request to reallocate bandwidth, therefore, the number of gateway devices in a communication state with the local in unit time can be reduced, the communication cost between the local and the gateway devices is reduced, the complexity of bandwidth allocation is reduced, and the computing resources are saved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a first method for controlling bandwidth allocation according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario for the method for controlling bandwidth allocation of FIG. 2;
FIG. 4 is a flow diagram of one embodiment of a second method for controlling bandwidth allocation according to the present disclosure;
FIG. 5 is a schematic diagram of one application scenario for the method for controlling bandwidth allocation of FIG. 4;
FIG. 6 is a flow diagram of yet another embodiment of a second method for controlling bandwidth allocation according to the present disclosure;
FIG. 7 is a schematic diagram of an interaction process of a routing device and a gateway device for controlling a method of bandwidth allocation according to the present disclosure;
FIG. 8 is a schematic diagram illustrating an embodiment of an apparatus for controlling bandwidth allocation according to the present disclosure;
FIG. 9 is a schematic diagram illustrating an embodiment of an apparatus for controlling bandwidth allocation according to the second aspect of the present disclosure;
FIG. 10 is a schematic block diagram of a computer system suitable for use with an electronic device to implement some embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of an embodiment of a method for controlling bandwidth allocation or an apparatus for controlling bandwidth allocation to which embodiments of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include a routing device 101 and gateway devices 102, 103, 104. In a case where the routing device 101 and the gateway devices 102, 103, 104 need to communicate, the routing device 101 and the gateway devices 102, 103, 104 may communicate through a network provided therebetween. The network may provide a medium for communication links between routing device 101 and gateway devices 102, 103, 104. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
In practice, the routing device 101 may be arranged as a server for bandwidth allocation to a cluster of gateway devices ( e.g. gateway devices 102, 103, 104). The routing device 101 may generate a new bandwidth allocation upper limit value for the gateway devices in the gateway device cluster based on the received bandwidth request after receiving the bandwidth request indicating that the gateway device requests to reallocate the bandwidth, which is sent by the gateway device in the gateway device cluster, and send each generated new bandwidth allocation upper limit value to the corresponding gateway device, so that the gateway device transmits data by using the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value. As an example, the routing device 101 may be configured as a cloud server.
It should be noted that the routing device 101 may be hardware or software. When the routing device 101 is hardware, it may be implemented as a server for allocating bandwidth to a cluster of gateway devices. When the routing device 101 is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules running on a server for allocating bandwidth to a cluster of gateway devices), or as a single software or software module. And is not particularly limited herein.
The gateway devices 102, 103, 104 may perform data transmission with the electronic device based on the bandwidth allocated to them by the routing device 101, and the gateway devices 102, 103, 104 may be provided (or run) in a server or a user terminal. When the gateway devices 102, 103, 104 are located (or run) on a server, the server on which the gateway devices 102, 103, 104 are located (or run) may be used to provide various services, such as support for one or more applications installed locally or on other electronic devices. When the gateway devices 102, 103, 104 are installed (or run) in a user terminal, a user can use the user terminal to receive or send data through applications installed thereon (e.g., video playing software, news-type applications, image processing-type applications, web browser applications, shopping-type applications, search-type applications, instant messaging tools, mailbox clients, social platform software).
The gateway devices 102, 103, and 104 may be hardware or software. When the server is hardware, the gateway devices 102, 103, and 104 may be disposed in the server or the user terminal, in which case the gateway devices 102, 103, and 104 may perform data transmission with other electronic devices based on the bandwidth allocated to them by the routing device 101. When the gateway devices 102, 103, 104 are software, the gateway devices 102, 103, 104 may run on a server or a user terminal, in which case the gateway devices 102, 103, 104 may perform data transmission with other electronic devices based on the bandwidth allocated to them by the routing device 101.
It should also be noted that the first method for controlling bandwidth allocation provided by the embodiments of the present disclosure is generally performed by a gateway device. Accordingly, a first apparatus for controlling bandwidth allocation provided by the embodiments of the present disclosure is generally disposed in a gateway device. The second method for controlling bandwidth allocation provided by the embodiments of the present disclosure is generally performed by a routing device. Accordingly, the second apparatus for controlling bandwidth allocation provided by the embodiments of the present disclosure is generally disposed in a routing device.
It should be understood that the number of routing devices and gateway devices in fig. 1 is merely illustrative. There may be any number of routing devices and gateway devices, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a first method for controlling bandwidth allocation according to the present disclosure is shown. The method for controlling bandwidth allocation comprises the following steps:
step 201, obtaining a current actual used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value.
In this embodiment, an executing subject (for example, a gateway device shown in fig. 1) of the method for controlling bandwidth allocation may acquire a current actually-used bandwidth value locally and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value.
The bandwidth value actually used at the present time may be a bandwidth value actually used at the present time in a process of data transmission between the execution main body and the electronic device communicatively connected thereto. The current bandwidth allocation ceiling value may be a bandwidth value currently allocated to it by the target routing device. It is to be understood that, in general, an actually used bandwidth value (e.g., a current actually used bandwidth value) of the execution subject is less than or equal to a bandwidth allocation upper limit value (e.g., a current bandwidth allocation upper limit value) corresponding to the actually used bandwidth value. However, in some cases, the actual used bandwidth value may also be larger than the bandwidth allocation upper limit value corresponding to the actual used bandwidth value.
In practice, the target routing device may be used to allocate bandwidth for the cluster of target gateway devices. The execution subject may be one gateway device in the target gateway device cluster. It will be appreciated that in some usage scenarios, a user may purchase a certain amount of bandwidth for use by multiple gateway devices (i.e., the target gateway device cluster described above). In this case, the target routing device may allocate a bandwidth allocation upper limit value for each gateway device. In the process of allocating the bandwidth by the target routing device, the bandwidth allocation upper limit value allocated to each gateway device at each time may be dynamically changed.
The bandwidth allocation upper limit value (e.g., bandwidth allocation upper limit value) corresponding to the actual used bandwidth value (e.g., current actual used bandwidth value) may correspond in time. For example, the bandwidth allocation upper limit value corresponding to the actual used bandwidth value may be the bandwidth allocation upper limit value allocated to the gateway device by the target routing device at a time corresponding to the actual used bandwidth value (for example, at a time when the gateway device uses the actual used bandwidth value).
It should be noted that, due to limitations in terms of hardware performance, program execution order, and the like, the actual bandwidth value (for example, the current actual bandwidth value) and the bandwidth allocation upper limit value corresponding to the actual bandwidth value (for example, the current bandwidth allocation upper limit value) may be different from each other in time (that is, the actual bandwidth value and the bandwidth allocation upper limit value corresponding to the actual bandwidth value may correspond to the same time or different times).
Step 202, determining whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value.
In this embodiment, the executing entity may determine whether to request bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value acquired in step 201.
As an example, the executing agent may determine to request bandwidth reallocation when the current actually-used bandwidth value is greater than or equal to the current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value; and under the condition that the current actual used bandwidth value is smaller than the current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value, determining not to request bandwidth reallocation.
Optionally, the executing body may further determine a product of the current bandwidth allocation upper limit value obtained in step 201 and a preset percentage (e.g., 90%), and then determine to request bandwidth reallocation when the current actually-used bandwidth value is greater than or equal to the product; in the case where the current actually used bandwidth value is smaller than the above product, it is determined not to request reallocation of bandwidth.
Step 205, in response to determining to request bandwidth reallocation, communicates with the target routing device to send a bandwidth request to the target routing device requesting bandwidth reallocation.
In this embodiment, in a case where it is determined that bandwidth reallocation is requested, the execution main body may communicate with the target routing device to send a bandwidth request for requesting bandwidth reallocation to the target routing device. Wherein communication with the target routing device is only performed if a bandwidth reallocation is requested
Step 204, receiving a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request.
In this embodiment, the execution body may receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request.
Here, after the target routing device receives the bandwidth request transmitted by the execution principal in step 205, the target routing device may generate a new bandwidth allocation upper limit value corresponding to the execution principal by using various methods.
As a first example, the target routing device may record a current bandwidth allocation upper limit value of each gateway device (including the execution subject) in the target gateway device cluster, so that, when the target routing device receives a bandwidth request sent by a gateway device (for example, the execution subject) in the target gateway device cluster, a sum of the current bandwidth allocation upper limit value and a preset bandwidth value (for example, 1) is determined as a new bandwidth allocation upper limit value. And then sending the new bandwidth allocation upper limit value to the corresponding gateway equipment. Thus, the execution body may receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request.
As a second example, the bandwidth request may include a current bandwidth allocation weight, and thus, the target routing device may also generate a new bandwidth allocation upper limit value corresponding to the execution principal as follows:
the first step is to calculate the ratio of the current bandwidth allocation weight contained in each bandwidth request sent by each gateway device requesting bandwidth reallocation in the target gateway device cluster.
And secondly, calculating the sum of the received current bandwidth allocation upper limit values of all gateway devices requesting bandwidth reallocation in the target gateway device cluster.
And thirdly, dividing the sum obtained in the second step according to the ratio obtained in the first step to obtain a new bandwidth allocation upper limit value corresponding to each gateway device requesting bandwidth reallocation in the target gateway device cluster, and sending each new bandwidth allocation upper limit value to the gateway device corresponding to the new bandwidth allocation.
Thus, the execution body may receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request.
It is to be understood that, after the execution subject receives the new upper limit value of bandwidth allocation, it may take the new upper limit value of bandwidth allocation as the current upper limit value of bandwidth allocation.
And step 205, taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value to perform data transmission.
In this embodiment, the execution subject may perform data transmission with the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value. In general, the actually used bandwidth value in the process of performing data transmission by the execution main body is less than or equal to the current bandwidth allocation upper limit value (e.g., the new bandwidth allocation upper limit value received in step 204).
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for controlling bandwidth allocation according to the present embodiment. In the application scenario of fig. 3, the gateway device 301 acquires the current actually-used bandwidth value 3011 and the current bandwidth allocation upper limit value 3012 corresponding to the current actually-used bandwidth value 3011. Then, the gateway device 301 determines to request the reallocation of the bandwidth based on the current actually-used bandwidth value 3011 and the current bandwidth allocation upper limit value 3012, and as an example, the gateway device 301 in the figure generates information 3013 indicating the determination of the reallocation of the bandwidth, and thereafter, the gateway device 301 communicates with the target routing device 302 to transmit a bandwidth request 3014 for requesting the reallocation of the bandwidth to the target routing device 302, wherein the gateway device 301 communicates with the target routing device 302 only in the case of requesting the reallocation of the bandwidth. Subsequently, the gateway device 301 receives a new bandwidth allocation upper limit value 3015 generated by the target routing device 302 based on the bandwidth request 3014. Finally, the gateway device 301 performs data transmission with the new bandwidth allocation ceiling value 3015 as the current bandwidth allocation ceiling value.
The method for controlling bandwidth allocation provided by the above-mentioned embodiments of the present disclosure, by obtaining a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value, then determining whether to request bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value, and then, in case of determining that bandwidth reallocation is requested, communicating with a target routing device to send a bandwidth request for requesting bandwidth reallocation to the target routing device, wherein, only in case of requesting bandwidth reallocation, communicating with the target routing device is performed, then, receiving a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request, and finally, performing data transmission using the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value, thereby, not communicating with the target routing device without requesting bandwidth reallocation, that is, communication is performed with the target routing device only in the case where bandwidth reallocation is requested, thereby reducing communication costs with the target routing device.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight. The initial value of the current bandwidth allocation weight is predetermined. Thus, the bandwidth allocation weight contained in the bandwidth request can be determined by: in the case of insufficient current bandwidth allocation, the execution subject may increase the current bandwidth allocation weight; in the case where the current bandwidth allocation is sufficient, the execution body may decrease the current bandwidth allocation weight.
As an example, the total bandwidth purchased by the user for the target gateway device cluster may be M. Where M is a positive number, and the number of gateway devices included in the target gateway device cluster may be N. Thus, the initial value of the current bandwidth allocation weight of each gateway device (including the execution principal described above) included in the target gateway device cluster may be the ratio of M to N. Therefore, each gateway device can acquire the current actual used bandwidth value of the local area and the current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value according to the preset frequency. If it is determined that bandwidth reallocation is requested based on the current actual bandwidth value and the current bandwidth allocation upper limit value of the local area acquired by the gateway device, the gateway device may increase the current bandwidth allocation weight (e.g., increase the current bandwidth allocation weight X by a preset value); if it is determined that bandwidth reallocation is not requested based on the current actually-used local bandwidth value and the current bandwidth allocation upper limit value acquired by the gateway device, the gateway device may decrease the current bandwidth allocation weight (e.g., decrease the current bandwidth allocation weight X by a preset value). Illustratively, if the gateway device acquires the current actual bandwidth-used value of the local and the current bandwidth allocation upper limit value corresponding to the current actual bandwidth-used value once per second. In the case where it is determined that bandwidth reallocation is requested, the gateway device may increase the current bandwidth allocation weight by 1; in the case where it is determined that bandwidth reallocation is not requested, the gateway device decreases the current bandwidth allocation weight by 1. Then in this scenario, if the gateway device (i.e. the executing agent) initially has 5 seconds, the following are sequentially performed for the case of whether to request bandwidth reallocation: requesting no bandwidth reallocation, requesting bandwidth reallocation, and requesting bandwidth reallocation, the current bandwidth allocation weight of the gateway device in each second of the above 5 seconds is in turn: x-1, X-2, X-1, X-2 and X-1. That is, in this scenario, the gateway device only sends 2 bandwidth requests within the above 5 seconds, and the current bandwidth allocation weights included in the sent 2 bandwidth requests are all X-1.
In the above example, after the target routing device receives the bandwidth request sent by the gateway device, the target routing device may generate a new bandwidth allocation upper limit value for each gateway device in the target gateway device cluster at that time by adopting the following steps:
for each gateway device in the target gateway device cluster, if receiving a bandwidth request sent by the gateway device, taking a bandwidth allocation upper limit value contained in the bandwidth request sent by the gateway device as a bandwidth allocation upper limit value used for allocating bandwidth for the gateway device; if the bandwidth request sent by the gateway device is not received, calculating the bandwidth allocation upper limit value at the current time according to the bandwidth allocation upper limit value contained in the bandwidth request sent by the gateway device last time (for example, if the bandwidth allocation upper limit value contained in the bandwidth request sent last time is 10, the gateway device determines whether to request bandwidth reallocation once every second, and if the current time is 3 seconds away from the last bandwidth request sent, the bandwidth allocation upper limit value at the current (namely, the time) of the gateway device is 7), and taking the bandwidth allocation upper limit value at the current time as the bandwidth allocation upper limit value for allocating the bandwidth to the gateway device. Thereby obtaining a bandwidth allocation upper limit value for allocating bandwidth to each gateway device in the target gateway device cluster. Then, calculating the sum of the bandwidth allocation upper limit values for allocating the bandwidth to each gateway device in the target gateway device cluster, determining the ratio of the bandwidth allocation upper limit value for allocating the bandwidth to the gateway device to the sum for each gateway device in the target gateway device cluster, and taking the product of the ratio and the total bandwidth purchased by the user for each gateway device in the target gateway device cluster as the new bandwidth allocation upper limit value of the gateway device for the moment.
It can be understood that, in this alternative implementation manner, more bandwidth may be allocated to the gateway device that requests bandwidth reallocation continuously or multiple times within a period of time, so that the rationality of bandwidth allocation is improved, and the bandwidth allocation manner is enriched.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight. The initial value of the current bandwidth allocation weight is predetermined. Thus, the bandwidth allocation weight contained in the bandwidth request can be determined by: in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight; and reducing the current bandwidth allocation weight in response to the current bandwidth allocation being sufficient and in response to the current bandwidth allocation weight belonging to the preset weight interval.
Here, when the current bandwidth allocation weight of the gateway device does not belong to the preset weight interval, the current bandwidth allocation weight of the gateway device may be kept unchanged, or the current bandwidth allocation weight of the gateway device is updated to an average value of the median of the preset weight interval and the current bandwidth allocation weight, and when the current bandwidth allocation weight of the gateway device belongs to the preset weight interval, the specific execution step of the optional implementation may refer to the related description in the optional implementation, which is not described herein again.
It can be understood that, in the optional implementation manner, the current bandwidth allocation weight of the gateway device can be controlled within the preset weight interval, so that the gap of the bandwidths allocated to each gateway device is facilitated to be reduced, thereby further improving the rationality of bandwidth allocation and further enriching the bandwidth allocation manner.
Here, the bandwidth allocation weight included in the bandwidth request may be determined by the execution main body alone, may also be determined by the target routing device alone, and may also be determined by the execution main body and the target routing device in cooperation with each other, which is not limited in this optional implementation manner.
In some optional implementation manners of this embodiment, in a case that the execution main body does not communicate with the target routing device for more than a preset time period, the execution main body may further disconnect the target routing device.
It can be understood that, in this alternative implementation manner, when the execution subject and the target routing device do not communicate for more than a preset time, the connection with the target routing device may be disconnected, so that the connection cost with the target routing device is reduced.
With further reference to fig. 4, a flow 400 of one embodiment of a second method for controlling bandwidth allocation is shown. The flow 400 of the method for controlling bandwidth allocation comprises the steps of:
step 401, receiving a bandwidth request, which indicates that a gateway device in a target gateway device cluster requests to reallocate bandwidth, sent by the gateway device.
In this embodiment, an executing body (e.g., the routing device shown in fig. 1) of the method for controlling bandwidth allocation may receive a bandwidth request sent by a gateway device in a target gateway device cluster (e.g., the gateway device cluster shown in fig. 1) indicating that the gateway device requests bandwidth reallocation. Wherein the gateway devices in the target gateway device cluster communicate locally only if a reallocation of bandwidth is requested.
In this embodiment, the bandwidth request may be implemented in a manner described in the embodiment in fig. 2, and details of this embodiment are not described again.
Step 402, based on each received bandwidth request, generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster.
In this embodiment, the executing body may generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received bandwidth requests.
In this embodiment, the new bandwidth allocation upper limit value may be generated in a manner described in the embodiment in fig. 2, which is not described again in this embodiment.
Step 403, sending each generated new bandwidth allocation upper limit value to a corresponding gateway device, so that the gateway device transmits the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In this embodiment, the executing body may send each generated new bandwidth allocation upper limit value to a corresponding gateway device, so that the gateway device performs data transmission by using the received new bandwidth allocation upper limit value as a current bandwidth allocation upper limit value.
It should be noted that, in addition to the above-mentioned contents, the present embodiment may further include the same or similar features and effects as those of the embodiment corresponding to fig. 2, and details are not repeated herein.
With continued reference to fig. 5, fig. 5 is a schematic diagram of an application scenario of the second method for controlling bandwidth allocation according to the present embodiment. In the application scenario of fig. 5, the routing device 501 receives a bandwidth request sent by a gateway device in the target gateway device cluster (including gateway devices 502, 503, 504) indicating that the gateway device requests bandwidth reallocation. In the illustration, the routing device 501 receives a bandwidth request 5021 sent by the gateway device 502 and a bandwidth request 5041 sent by the gateway device 504. Wherein the gateway devices in the target gateway device cluster communicate locally only if a reallocation of bandwidth is requested. For example, in the illustration, the gateway device 503 does not need to request bandwidth reallocation, and therefore the gateway device 503 is not in communication with the routing device 501. The routing device 501 then generates a new bandwidth allocation ceiling value for the gateway devices in the cluster of target gateway devices based on the received respective bandwidth requests (i.e., bandwidth requests 5021, 5041). As an example, in the illustration, the routing device 501 generates a new bandwidth allocation ceiling value for the gateway devices 502, 504 based on the received bandwidth requests 5021, 5041. Finally, the routing device 501 sends each generated new bandwidth allocation upper limit value to the corresponding gateway device, so that the gateway device transmits the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value. As an example, in the illustration, the routing device 501 sends the generated new bandwidth allocation upper limit value 5022 to the gateway device 502 corresponding to the new bandwidth allocation upper limit value 5022, so that the gateway device 502 performs data transmission with the received new bandwidth allocation upper limit value 5022 as the current bandwidth allocation upper limit value, and the routing device 501 sends the generated new bandwidth allocation upper limit value 5042 to the gateway device 504 corresponding to the new bandwidth allocation upper limit value 5042, so that the gateway device 504 performs data transmission with the received new bandwidth allocation upper limit value 5042 as the current bandwidth allocation upper limit value.
As can be seen from fig. 4, the flow 400 of the method for controlling bandwidth allocation in this embodiment is implemented by receiving a bandwidth request sent by a gateway device in a target gateway device cluster and indicating that the gateway device requests to reallocate bandwidth, where the gateway device in the target gateway device cluster communicates with the local only when requesting to reallocate bandwidth, then generating a new upper limit value of bandwidth allocation for the gateway device in the target gateway device cluster based on each received bandwidth request, and finally sending each generated new upper limit value of bandwidth allocation to a corresponding gateway device, so that the gateway device transmits the received new upper limit value of bandwidth allocation as a current upper limit value of bandwidth allocation for data transmission, and thus the gateway device in the target gateway device cluster communicates with the local only when needing to request to reallocate bandwidth, therefore, the number of gateway devices in a communication state with the local in unit time can be reduced, the communication cost between the local and the gateway devices is reduced, the complexity of bandwidth allocation is reduced, and the computing resources are saved.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight. The initial value of the current bandwidth allocation weight is predetermined. Thus, for a gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device; in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
The specific execution steps of the optional implementation may refer to the related descriptions in the optional implementation in fig. 2, and the optional implementation is not described again here.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight. The initial value of the current bandwidth allocation weight is predetermined. Thus, for a gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device; and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to a preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
The specific execution steps of the optional implementation may refer to the related descriptions in the optional implementation in fig. 2, and the optional implementation is not described again here.
In some optional implementation manners of this embodiment, in a case that there is a gateway device that does not communicate with the local for more than a preset time length in the target gateway device cluster, the execution main body may disconnect the gateway device that does not communicate with the local for more than the preset time length.
It can be understood that, in this alternative implementation manner, when there is a gateway device that does not communicate with the local for longer than the preset time length in the target gateway device cluster, the gateway device that does not communicate with the local for longer than the preset time length may be disconnected, so that the connection cost with the target routing device is reduced.
In some optional implementations of this embodiment, a sum of current bandwidth allocation upper limit values of each gateway device in the target gateway device cluster is less than or equal to a preset threshold. The preset threshold may be a total bandwidth purchased by the user for the target gateway device cluster.
It can be understood that this optional implementation improves the rationality of allocating the total bandwidth of the preset threshold value to the target gateway device cluster, and enriches the way of allocating the total bandwidth of the preset threshold value to the target gateway device cluster.
Turning next to fig. 6, a flow 600 of yet another embodiment of a second method for controlling bandwidth allocation is shown. The flow 600 of the method for controlling bandwidth allocation comprises the following steps:
step 601, receiving a bandwidth request which indicates that a gateway device in a target gateway device cluster requests to reallocate bandwidth and is sent by the gateway device.
In this embodiment, step 601 is substantially the same as step 401 in the embodiment corresponding to fig. 4, and is not described here again.
In this embodiment, the bandwidth request includes the current bandwidth allocation weight. The initial value of the current bandwidth allocation weight is predetermined. The current bandwidth allocation weight may be implemented in a manner described in the embodiment in fig. 2, and this embodiment is not described again.
Step 602, based on the bandwidth allocation weight included in each received bandwidth request, a new bandwidth allocation upper limit value is generated for the gateway devices in the target gateway device cluster.
In this embodiment, the executing entity may generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights included in the received bandwidth requests. And the new bandwidth allocation upper limit value corresponding to each gateway device with insufficient current bandwidth allocation in the target gateway device cluster is positively correlated with the bandwidth allocation weight.
In some optional implementations of this embodiment, the executing main body may execute the step 602 as follows: and generating a new bandwidth allocation upper limit value for the gateway equipment in the target gateway equipment cluster based on the bandwidth allocation weight and the initial value contained in each received bandwidth request.
First, for each gateway device in the target gateway device cluster, if the execution agent receives the bandwidth request sent by the gateway device at the time of executing step 602, taking the bandwidth allocation weight included in the bandwidth request sent by the gateway device as the bandwidth allocation weight for allocating the bandwidth to the gateway device; if the executing agent does not receive the bandwidth request sent by the gateway device at the time of executing step 602, the initial value is used as a bandwidth allocation weight for allocating the bandwidth to the gateway device. Thus, the executing body may obtain a bandwidth allocation weight for allocating a bandwidth to each gateway device in the target gateway device cluster.
Then, a sum of bandwidth allocation weights for allocating bandwidth to each gateway device in the target gateway device cluster is calculated.
Then, a ratio of a bandwidth allocation weight for allocating a bandwidth to each gateway device in the target gateway device cluster to the sum is calculated.
Then, the currently allocated total bandwidth of each gateway device in the target gateway device cluster is calculated.
And finally, taking the product of the ratio corresponding to the gateway device and the total bandwidth as a new bandwidth allocation upper limit value of the gateway device for each gateway device in the target gateway device cluster.
Optionally, the executing main body may further execute the step 602 in the following manner:
first, capacity expansion information used for representing that a user expands the current bandwidth is received, wherein the capacity expansion information includes a difference value between a total bandwidth purchased for a target gateway device cluster by the user after capacity expansion and a total bandwidth purchased for the target gateway device cluster by the user before capacity expansion.
Then, the sum of the bandwidth allocation weights contained in the received respective bandwidth requests is calculated.
Subsequently, a ratio of the bandwidth allocation weight contained in each received bandwidth request to the sum is calculated.
And finally, determining the product of the ratio of the bandwidth allocation weight contained in each received bandwidth request to the sum and the difference as a new bandwidth allocation upper limit value of the gateway equipment sending the bandwidth request.
Step 603, sending each generated new bandwidth allocation upper limit value to a corresponding gateway device, so that the gateway device transmits the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In this embodiment, step 603 is substantially the same as step 403 in the embodiment corresponding to fig. 4, and is not described here again.
It should be noted that, in addition to the contents described above, the present embodiment may also include the same or similar features and effects as those of the embodiment corresponding to fig. 4, and details are not repeated herein.
As can be seen from fig. 6, in the flow 600 of the method for controlling bandwidth allocation in this embodiment, the new bandwidth allocation upper limit value corresponding to each gateway device in the target gateway device cluster with insufficient bandwidth allocation is positively correlated with the bandwidth allocation weight, so that more bandwidth can be allocated to the gateway device that continuously or repeatedly requests to reallocate bandwidth within a period of time, thereby improving the rationality of bandwidth allocation and enriching the bandwidth allocation manner.
Referring next to fig. 7, fig. 7 is a schematic diagram illustrating an interaction process of a routing device and a gateway device for controlling bandwidth allocation according to the method of the present disclosure.
As shown in fig. 7, in step 7011, the first gateway device obtains a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value.
In this embodiment, the first gateway device may obtain the current actually-used bandwidth value and the current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value.
In step 7012, the second gateway device obtains a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value.
In this embodiment, the second gateway device may acquire the current actually-used bandwidth value and the current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value.
Here, step 7011 and step 7012 may be performed at the same time or at different times. Step 7011 may be performed before step 7012 or after step 7012. However, it should be noted that the execution time of step 7011 and step 7012 correspond to each other. For example, the execution time of step 7011 and step 7012 may be less than a preset time difference.
In step 7021, the first gateway device determines to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value.
In this embodiment, the first gateway device may determine to request the bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value. Wherein the first gateway device communicates with the routing device only if the first gateway device requests reallocation of bandwidth.
In step 7022, the second gateway device determines to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value.
In this embodiment, the second gateway device may determine to request the bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value. Wherein the second gateway device communicates with the routing device only if the second gateway device requests reallocation of bandwidth.
Here, step 7021 and step 7022 may be performed at the same time or at different times. Step 7021 may be performed before step 7022 or after step 7022. However, it should be noted that the execution time of step 7021 and step 7022 corresponds to each other. For example, the execution time of step 7021 and step 7022 may be less than a preset time difference.
In step 7031, the first gateway device sends a bandwidth request to the routing device.
In this embodiment, the first gateway device may send a bandwidth request to the routing device.
In step 7032, the second gateway device sends a bandwidth request to the routing device.
In this embodiment, the second gateway device may send a bandwidth request to the routing device.
Here, step 7031 and step 7032 may be performed at the same time or at different times. Step 7031 may be performed before step 7032 or after step 7032. However, it should be noted that the execution time of step 7031 corresponds to the execution time of step 7032. For example, the execution time of steps 7031 and 7032 may be less than a preset time difference.
In step 704, the routing device generates a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received respective bandwidth requests.
In this embodiment, the routing device generates a new bandwidth allocation upper limit value for the gateway devices (including the first gateway device and the second gateway device) in the target gateway device cluster based on the received bandwidth requests.
In step 7051, the routing device sends the new bandwidth allocation upper limit value to the first gateway device.
In this embodiment, the routing device may send the new bandwidth allocation upper limit value generated for the first gateway device in step 704 to the first gateway device.
In step 7052, the routing device sends the new bandwidth allocation upper limit value to the second gateway device.
In this embodiment, the routing device may send the new bandwidth allocation upper limit value generated for the second gateway device in step 704 to the second gateway device.
Here, step 7051 and step 7052 may be executed at the same time or at different times. Step 7051 may be performed before step 7052 or after step 7052.
In step 7061, the first gateway device performs data transmission with the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In this embodiment, the first gateway device may perform data transmission with the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In step 7062, the second gateway device performs data transmission with the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In this embodiment, the second gateway device may perform data transmission using the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
Here, step 7061 and step 7062 may be performed at the same time or at different times. Step 7061 may be performed before step 7062 or after step 7062.
It should be noted that, in this embodiment, execution manners of each step may refer to corresponding descriptions in fig. 2, fig. 4, or fig. 6, and besides the above-mentioned contents, this embodiment may further include features and effects that are the same as or similar to those in the embodiment corresponding to fig. 2, fig. 4, or fig. 6, and are not described again here.
In this embodiment, the gateway device in the target gateway device cluster communicates with the routing device only when needing to request bandwidth reallocation, so that the number of gateway devices in a communication state with the routing device in a unit time can be reduced, the communication cost between the routing device and the gateway device is reduced, the complexity of bandwidth allocation of the routing device is reduced, and the computing resources of the routing device are saved.
With further reference to fig. 8, as an implementation of the method shown in fig. 2 described above, the present disclosure provides an embodiment of an apparatus for controlling bandwidth allocation, the apparatus embodiment corresponds to the method embodiment shown in fig. 2, and the apparatus embodiment may include the same or corresponding features as the method embodiment shown in fig. 2, in addition to the features described below, and produce the same or corresponding effects as the method embodiment shown in fig. 2. The device can be applied to various electronic equipment.
As shown in fig. 8, the apparatus 800 for controlling bandwidth allocation of the present embodiment includes: an acquisition unit 801, a determination unit 802, a communication unit 803, a first reception unit 804, and a transmission unit 805. The acquiring unit 801 is configured to acquire a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value; a determining unit 802 configured to determine whether to request bandwidth reallocation based on a current actually used bandwidth value and a current bandwidth allocation upper limit value; a communication unit 803 configured to communicate with the target routing device to transmit a bandwidth request for requesting bandwidth reallocation to the target routing device in response to determining that bandwidth reallocation is requested, wherein the communication is performed with the target routing device only in the case where bandwidth reallocation is requested; a first receiving unit 804 configured to receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request; and a transmission unit 805 configured to perform data transmission by using the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
In this embodiment, the obtaining unit 801 of the apparatus 800 for controlling bandwidth allocation may obtain a current actually-used bandwidth value of the local and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value. The bandwidth value actually used at the present time may be a bandwidth value actually used at the present time in a process of data transmission between the apparatus 800 and an electronic device communicatively connected thereto.
In this embodiment, the determination unit 802 may determine whether or not to request bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value acquired by the acquisition unit 801.
In this embodiment, in the case where it is determined that bandwidth reallocation is requested, the communication unit 803 may communicate with the target routing device to transmit a bandwidth request for requesting bandwidth reallocation to the target routing device. Wherein communication is performed with the target routing device only if a bandwidth reallocation is requested.
In this embodiment, the first receiving unit 804 may receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request.
In this embodiment, the transmission unit 805 may perform data transmission by using the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value. In general, the actually used bandwidth value in the data transmission process of the apparatus 800 is smaller than or equal to the current bandwidth allocation upper limit value (e.g., the new bandwidth allocation upper limit value received by the first receiving unit 804).
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight, and an initial value of the current bandwidth allocation weight is predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to insufficient current bandwidth allocation, increasing a current bandwidth allocation weight; in response to the current bandwidth allocation being sufficient, the current bandwidth allocation weight is decreased.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight, and an initial value of the current bandwidth allocation weight is predetermined; and the bandwidth allocation weight contained in the bandwidth request is determined by the following steps: in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight; and reducing the current bandwidth allocation weight in response to the current bandwidth allocation being sufficient and in response to the current bandwidth allocation weight belonging to the preset weight interval.
In some optional implementations of this embodiment, the apparatus 800 further includes: and a first connection disconnection unit (not shown in the figure) configured to disconnect the target routing device in response to no communication between the local and the target routing device exceeding a preset time.
The first apparatus for controlling bandwidth allocation provided by the above-mentioned embodiments of the present disclosure is configured to acquire, by an acquiring unit 801, a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value, and then, a determining unit 802 is configured to determine whether to request bandwidth reallocation based on the current actually-used bandwidth value and the current bandwidth allocation upper limit value, and then, a communicating unit 803 is configured to communicate with a target routing device to transmit a bandwidth request for requesting bandwidth reallocation to the target routing device in response to determining to request bandwidth reallocation, wherein the target routing device communicates only in case of requesting bandwidth reallocation, and then, a first receiving unit 804 is configured to receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request, finally, the transmission unit 805 is configured to perform data transmission with the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value, thereby not communicating with the target routing device without requesting bandwidth reallocation, that is, communicating with the target routing device only if bandwidth reallocation is requested, thereby reducing communication costs with the target routing device.
With further reference to fig. 9, as an implementation of the method shown in fig. 4 described above, the present disclosure provides an embodiment of a second apparatus for controlling bandwidth allocation, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 4, and the embodiment of the apparatus may include the same or corresponding features as the embodiment of the method shown in fig. 4, in addition to the features described below, and produce the same or corresponding effects as the embodiment of the method shown in fig. 4. The device can be applied to various electronic equipment.
As shown in fig. 9, the apparatus 900 for controlling bandwidth allocation of the present embodiment includes: a second receiving unit 901, a generating unit 902 and a transmitting unit 903. Wherein, the second receiving unit 901 is configured to receive a bandwidth request sent by a gateway device in a target gateway device cluster, where the gateway device in the target gateway device cluster communicates with the local only in a case of requesting to reallocate bandwidth, and the bandwidth request indicates that the gateway device requests to reallocate bandwidth; a generating unit 902 configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received respective bandwidth requests; a sending unit 903, configured to send each generated new bandwidth allocation upper limit value to a corresponding gateway device, so that the gateway device performs data transmission by using the received new bandwidth allocation upper limit value as a current bandwidth allocation upper limit value.
In this embodiment, the second receiving unit 901 of the apparatus 900 for controlling bandwidth allocation may receive a bandwidth request sent by a gateway device in a target gateway device cluster (e.g., the gateway device cluster shown in fig. 1) indicating that the gateway device requests to reallocate bandwidth. Wherein the gateway devices in the target gateway device cluster communicate locally only if a reallocation of bandwidth is requested.
In this embodiment, the generating unit 902 may generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth requests received by the second receiving unit 901.
In this embodiment, the sending unit 903 may send each new bandwidth allocation upper limit value generated by the generating unit 902 to a corresponding gateway device, so that the gateway device performs data transmission by using the received new bandwidth allocation upper limit value as a current bandwidth allocation upper limit value.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight, and an initial value of the current bandwidth allocation weight is predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device; in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
In some optional implementations of this embodiment, the bandwidth request includes a current bandwidth allocation weight, and an initial value of the current bandwidth allocation weight is predetermined; and for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps: responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device; and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to a preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
In some optional implementations of this embodiment, the generating unit 902 includes: and a generating module (not shown in the figure) configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights included in the received bandwidth requests, where the new bandwidth allocation upper limit value corresponding to each gateway device in the target gateway device cluster with insufficient current bandwidth allocation is positively correlated with the bandwidth allocation weights.
In some optional implementations of this embodiment, the generating module includes: and a generation sub-module (not shown in the figure) configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weight and the initial value contained in each received bandwidth request.
In some optional implementations of this embodiment, the apparatus 900 further includes: and a second disconnection unit (not shown in the figure) configured to disconnect the gateway device which does not communicate with the local for more than the preset time length in response to the existence of the gateway device which does not communicate with the local for more than the preset time length in the target gateway device cluster.
In some optional implementations of this embodiment, a sum of current bandwidth allocation upper limit values of each gateway device in the target gateway device cluster is less than or equal to a preset threshold.
The second apparatus for controlling bandwidth allocation provided by the above embodiment of the present disclosure receives, by the second receiving unit 901, a bandwidth request indicating that a gateway device in a target gateway device cluster requests to reallocate bandwidth, where the gateway device in the target gateway device cluster communicates with the local only when requesting to reallocate bandwidth, then the generating unit 902 generates a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on each received bandwidth request, and finally the transmitting unit 903 transmits each generated new bandwidth allocation upper limit value to a corresponding gateway device, so that the gateway device transmits the received new bandwidth allocation upper limit value as a current bandwidth allocation upper limit value for data transmission, so that the gateway device in the target gateway device cluster communicates with the local only when needing to request to reallocate bandwidth, therefore, the number of gateway devices in a communication state with the local in unit time can be reduced, the communication cost between the local and the gateway devices is reduced, the complexity of bandwidth allocation is reduced, and the computing resources are saved.
Referring now to fig. 10, a schematic diagram of an electronic device (e.g., a gateway device or a routing device of fig. 1) 1000 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic device 1000 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 1001 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage means 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Generally, the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1007 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 1008 including, for example, magnetic tape, hard disk, and the like; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. While fig. 10 illustrates an electronic device 1000 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 10 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 1009, or installed from the storage means 1008, or installed from the ROM 1002. The computer program, when executed by the processing device 1001, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a current actual used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value; determining whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value; in response to determining to request bandwidth reallocation, communicating with a target routing device to send a bandwidth request to the target routing device requesting bandwidth reallocation, wherein the communicating with the target routing device is performed only if bandwidth reallocation is requested; receiving a new bandwidth allocation upper limit value generated by the target routing equipment based on the bandwidth request; and taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission. Or, causing the electronic device to: receiving a bandwidth request which is sent by a gateway device in a target gateway device cluster and indicates that the gateway device requests to reallocate bandwidth, wherein the gateway device in the target gateway device cluster is communicated with the local only under the condition of requesting to reallocate bandwidth; generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received bandwidth requests; and respectively sending each generated new bandwidth allocation upper limit value to corresponding gateway equipment so that the gateway equipment can transmit data by taking the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a determination unit, a communication unit, a first reception unit, and a transmission unit; alternatively, it can also be described as: a processor includes a second receiving unit, a generating unit, and a transmitting unit. Here, the names of these units do not constitute a limitation to the unit itself in some cases, and for example, the acquiring unit may also be described as a "unit that acquires a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (24)

1. A method for controlling bandwidth allocation, comprising:
acquiring a current actual used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actual used bandwidth value;
determining whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value;
in response to determining to request bandwidth reallocation, communicating with a target routing device to send a bandwidth request to the target routing device requesting bandwidth reallocation, wherein the target routing device is only communicated if bandwidth reallocation is requested;
receiving a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request;
and taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission.
2. The method of claim 1, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of which is predetermined; and
the bandwidth allocation weight contained in the bandwidth request is determined by the following steps:
in response to insufficient current bandwidth allocation, increasing a current bandwidth allocation weight;
in response to the current bandwidth allocation being sufficient, the current bandwidth allocation weight is decreased.
3. The method of claim 1, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of which is predetermined; and
the bandwidth allocation weight contained in the bandwidth request is determined by the following steps:
in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight;
in response to the current bandwidth allocation being sufficient, and in response to the current bandwidth allocation weight belonging to the preset weight interval, decreasing the current bandwidth allocation weight.
4. The method according to one of claims 1-3, wherein the method further comprises:
and responding to the situation that the local and the target routing equipment do not communicate for more than the preset time, and disconnecting the target routing equipment.
5. A method for controlling bandwidth allocation, comprising:
receiving a bandwidth request which is sent by a gateway device in a target gateway device cluster and indicates that the gateway device requests to reallocate bandwidth, wherein the gateway device in the target gateway device cluster is communicated with the local only under the condition of requesting to reallocate bandwidth;
generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received bandwidth requests;
and respectively sending each generated new bandwidth allocation upper limit value to corresponding gateway equipment so that the gateway equipment can transmit data by taking the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
6. The method of claim 5, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and
for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps:
in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device;
in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
7. The method of claim 5, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and
for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps:
responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device;
and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to the preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
8. The method of claim 6 or 7, wherein the generating a new bandwidth allocation upper limit value for gateway devices in the target gateway device cluster based on the received respective bandwidth requests comprises:
and generating a new bandwidth allocation upper limit value for the gateway device in the target gateway device cluster based on the bandwidth allocation weight contained in each received bandwidth request, wherein the new bandwidth allocation upper limit value corresponding to each gateway device with insufficient current bandwidth allocation in the target gateway device cluster is positively correlated with the bandwidth allocation weight.
9. The method of claim 8, wherein the generating a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights included in the received bandwidth requests comprises:
and generating a new bandwidth allocation upper limit value for the gateway equipment in the target gateway equipment cluster based on the bandwidth allocation weight and the initial value contained in each received bandwidth request.
10. The method according to one of claims 5-7, wherein the method further comprises:
and responding to the gateway equipment which is not communicated with the local and has the time length longer than the preset time length in the target gateway equipment cluster, and disconnecting the gateway equipment which is not communicated with the local and has the time length longer than the preset time length.
11. The method according to one of claims 5 to 7, wherein the sum of the current bandwidth allocation upper limit values of the respective gateway devices in the target gateway device cluster is less than or equal to a preset threshold value.
12. An apparatus for controlling bandwidth allocation, comprising:
an obtaining unit configured to obtain a current actually-used bandwidth value and a current bandwidth allocation upper limit value corresponding to the current actually-used bandwidth value;
a determining unit configured to determine whether to request bandwidth reallocation based on the current actually used bandwidth value and the current bandwidth allocation upper limit value;
a communication unit configured to communicate with a target routing device to transmit a bandwidth request for requesting bandwidth reallocation to the target routing device in response to determining that bandwidth reallocation is requested, wherein communication is performed with the target routing device only if bandwidth reallocation is requested;
a first receiving unit configured to receive a new bandwidth allocation upper limit value generated by the target routing device based on the bandwidth request;
and the transmission unit is configured to transmit the data by taking the new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value.
13. The apparatus of claim 12, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of which is predetermined; and
the bandwidth allocation weight contained in the bandwidth request is determined by the following steps:
in response to insufficient current bandwidth allocation, increasing a current bandwidth allocation weight;
in response to the current bandwidth allocation being sufficient, the current bandwidth allocation weight is decreased.
14. The apparatus of claim 12, wherein the bandwidth request contains a current bandwidth allocation weight, an initial value of which is predetermined; and
the bandwidth allocation weight contained in the bandwidth request is determined by the following steps:
in response to the current bandwidth allocation being insufficient and in response to the current bandwidth allocation weight belonging to a preset weight interval, increasing the current bandwidth allocation weight;
in response to the current bandwidth allocation being sufficient, and in response to the current bandwidth allocation weight belonging to the preset weight interval, decreasing the current bandwidth allocation weight.
15. The apparatus according to one of claims 12-14, wherein the apparatus further comprises:
the first connection disconnection unit is configured to disconnect the target routing device in response to no communication between the local router and the target routing device exceeding a preset time.
16. An apparatus for controlling bandwidth allocation, comprising:
a second receiving unit, configured to receive a bandwidth request sent by a gateway device in a target gateway device cluster, where the gateway device requests to reallocate bandwidth, and the gateway device in the target gateway device cluster communicates with the local only when requesting to reallocate bandwidth;
a generating unit configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the received respective bandwidth requests;
and the sending unit is configured to send each generated new bandwidth allocation upper limit value to the corresponding gateway device respectively, so that the gateway device transmits the received new bandwidth allocation upper limit value as the current bandwidth allocation upper limit value for data transmission.
17. The apparatus of claim 16, wherein the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and
for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps:
in response to the current bandwidth allocation of the gateway device being insufficient, increasing a current bandwidth allocation weight of the gateway device;
in response to the current bandwidth allocation of the gateway device being sufficient, the current bandwidth allocation weight of the gateway device is decreased.
18. The apparatus of claim 16, wherein the bandwidth request includes a current bandwidth allocation weight, an initial value of the current bandwidth allocation weight being predetermined; and
for the gateway device in the target gateway device cluster, the current bandwidth allocation weight of the gateway device is determined by the following steps:
responding to the current bandwidth allocation of the gateway device being insufficient and responding to the current bandwidth allocation of the gateway device belonging to a preset weight interval, and increasing the current bandwidth allocation weight of the gateway device;
and in response to the current bandwidth allocation of the gateway device being sufficient, and in response to the current bandwidth allocation of the gateway device belonging to the preset weight interval, reducing the current bandwidth allocation weight of the gateway device.
19. The apparatus of claim 17 or 18, wherein the generating means comprises:
a generating module, configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights included in the received bandwidth requests, where the new bandwidth allocation upper limit value corresponding to each gateway device in the target gateway device cluster with insufficient current bandwidth allocation is positively correlated to the bandwidth allocation weights.
20. The apparatus of claim 19, wherein the generating means comprises:
a generating sub-module configured to generate a new bandwidth allocation upper limit value for the gateway devices in the target gateway device cluster based on the bandwidth allocation weights and the initial values included in the received respective bandwidth requests.
21. The apparatus according to one of claims 16-18, wherein the apparatus further comprises:
and the second connection disconnection unit is configured to respond to the existence of the gateway equipment which does not communicate with the local for more than the preset time length in the target gateway equipment cluster, and disconnect the gateway equipment which does not communicate for more than the preset time length.
22. The apparatus according to one of claims 16 to 18, wherein a sum of current bandwidth allocation upper limit values of the respective gateway devices in the target gateway device cluster is smaller than or equal to a preset threshold value.
23. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-11.
24. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-11.
CN201911003248.2A 2019-10-21 2019-10-21 Method and apparatus for controlling bandwidth allocation Active CN110708262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911003248.2A CN110708262B (en) 2019-10-21 2019-10-21 Method and apparatus for controlling bandwidth allocation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911003248.2A CN110708262B (en) 2019-10-21 2019-10-21 Method and apparatus for controlling bandwidth allocation

Publications (2)

Publication Number Publication Date
CN110708262A true CN110708262A (en) 2020-01-17
CN110708262B CN110708262B (en) 2023-04-07

Family

ID=69200793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911003248.2A Active CN110708262B (en) 2019-10-21 2019-10-21 Method and apparatus for controlling bandwidth allocation

Country Status (1)

Country Link
CN (1) CN110708262B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030039211A1 (en) * 2001-08-23 2003-02-27 Hvostov Harry S. Distributed bandwidth allocation architecture
CN101184041A (en) * 2007-12-07 2008-05-21 烽火通信科技股份有限公司 Method for implementing automatic grading bandwidth regulation on multi-service transmission platform
CN105591795A (en) * 2015-07-17 2016-05-18 杭州华三通信技术有限公司 Bandwidth allocation method and device
CN107888428A (en) * 2017-12-04 2018-04-06 郑州云海信息技术有限公司 A kind of bandwidth adjusting method, device, equipment and readable storage medium storing program for executing
CN108667748A (en) * 2017-03-29 2018-10-16 华为技术有限公司 A kind of method, apparatus and equipment of control bandwidth
CN109787921A (en) * 2019-03-19 2019-05-21 网宿科技股份有限公司 CDN bandwidth scheduling method, acquisition and dispatch server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030039211A1 (en) * 2001-08-23 2003-02-27 Hvostov Harry S. Distributed bandwidth allocation architecture
CN101184041A (en) * 2007-12-07 2008-05-21 烽火通信科技股份有限公司 Method for implementing automatic grading bandwidth regulation on multi-service transmission platform
CN105591795A (en) * 2015-07-17 2016-05-18 杭州华三通信技术有限公司 Bandwidth allocation method and device
CN108667748A (en) * 2017-03-29 2018-10-16 华为技术有限公司 A kind of method, apparatus and equipment of control bandwidth
CN107888428A (en) * 2017-12-04 2018-04-06 郑州云海信息技术有限公司 A kind of bandwidth adjusting method, device, equipment and readable storage medium storing program for executing
CN109787921A (en) * 2019-03-19 2019-05-21 网宿科技股份有限公司 CDN bandwidth scheduling method, acquisition and dispatch server and storage medium

Also Published As

Publication number Publication date
CN110708262B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN110032447B (en) Method and apparatus for allocating resources
CN111787069A (en) Method, device and equipment for processing service access request and computer storage medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110008050B (en) Method and device for processing information
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111580974B (en) GPU instance allocation method, device, electronic equipment and computer readable medium
CN114466226B (en) Bandwidth duration duty cycle determination method, device, equipment and computer readable medium
CN110764892A (en) Task processing method, device and computer readable storage medium
CN109861922B (en) Method and apparatus for controlling flow
CN109428926B (en) Method and device for scheduling task nodes
CN110768861B (en) Method, device, medium and electronic equipment for obtaining overtime threshold
CN115237589A (en) SR-IOV-based virtualization method, device and equipment
CN111178781A (en) Response resource allocation method, device, equipment and medium of online response system
CN110716809B (en) Method and device for scheduling cloud resources
CN112905338A (en) Automatic allocation method and device for computing resources
CN110708262B (en) Method and apparatus for controlling bandwidth allocation
CN109842665B (en) Task processing method and device for task allocation server
CN111343046B (en) Method and device for generating pressure flow, electronic equipment and computer readable storage medium
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN112346870B (en) Model processing method and system
CN109088929B (en) Method and device for sending information
CN115250276A (en) Distributed system and data processing method and device
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN112491066A (en) Load balancing method, device and system, target load balancing equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant