CN113422737B - Flow control method, flow control equipment and storage medium - Google Patents
Flow control method, flow control equipment and storage medium Download PDFInfo
- Publication number
- CN113422737B CN113422737B CN202110978459.9A CN202110978459A CN113422737B CN 113422737 B CN113422737 B CN 113422737B CN 202110978459 A CN202110978459 A CN 202110978459A CN 113422737 B CN113422737 B CN 113422737B
- Authority
- CN
- China
- Prior art keywords
- token bucket
- tokens
- token
- type
- class
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/215—Flow control; Congestion control using token-bucket
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application provides a flow control method, flow control equipment and a storage medium. In the embodiment of the application, in the QOS technology implementation process, a first type of token can be put into a first token bucket according to the committed information rate CIR; and storing a second type of token by using a second token bucket, wherein the capacity of the second token bucket is matched with the extra burst length EBS customized by the user input flow, so that the burst duration of the user input flow can be controlled based on the support of the second token bucket. In addition, a third type token can be released to a third token bucket according to the peak information rate PIR, and the consumption rate of the second type token is limited by the third type token, so that the burst upper limit of the input flow of the user is controlled, and the burst flow is prevented from contending for the network bandwidth of other users. Therefore, in the embodiment of the application, the burst duration and the burst upper limit of the burst flow can be finely controlled, so that the network service quality is effectively improved.
Description
Technical Field
The present application relates to the field of cloud network technologies, and in particular, to a flow control method, a flow control device, and a storage medium.
Background
In a cloud-native context, better service capabilities may be provided for network communications based on Quality of service (Qos) techniques.
Under the Qos technology, each user can be subjected to flow control, and at present, three modes, namely a single-speed single bucket mode, a single-speed double bucket mode and a double-speed double bucket mode are usually adopted to realize the flow control, but the three modes have the problems of overhigh cost or contending for network bandwidth of other users when dealing with the burst flow of the user, and the effect is poor.
Disclosure of Invention
Aspects of the present disclosure provide a flow control method, device and storage medium, which are used to achieve fine control of burst flow and improve network service quality.
An embodiment of the present application provides a flow control method, including:
under the condition that a sufficient amount of first-class tokens exist in a first token bucket, consuming the first-class tokens to control the input traffic of a user, wherein the rate of putting the tokens into the first token bucket adopts a Committed Information Rate (CIR);
under the condition that the first class of tokens in the first token bucket are insufficient, consuming a second class of tokens in a second token bucket to control the user input traffic, wherein the capacity of the second token bucket is adapted to an extra burst length (EBS) customized by the user input traffic;
and in the process of consuming the second type of tokens, limiting the consumption rate of the second type of tokens by using a third type of tokens in a third token bucket to control the burst upper limit of the user input traffic, wherein the rate of releasing the tokens to the third token bucket adopts a peak information rate PIR.
The embodiment of the application also provides a flow control device, which comprises a memory and a processor;
the memory is to store one or more computer instructions;
the processor is coupled with the memory for executing the one or more computer instructions for:
releasing a first class token to a first token bucket according to the Committed Information Rate (CIR);
storing a second type of tokens by using a second token bucket, wherein the capacity of the second token bucket is matched with the additional burst length EBS customized by the user input flow;
releasing a third type of token to a third token bucket according to the peak information rate PIR;
consuming a first type of token to control user input traffic if a sufficient number of the first type of token is present in the first token bucket;
under the condition that the first class of tokens in the first token bucket are insufficient, consuming a second class of tokens in the second token bucket to control the user input traffic;
and in the process of consuming the second type of tokens, limiting the consumption rate of the second type of tokens by using the third type of tokens in the third token bucket so as to control the burst upper limit of the user input traffic.
Embodiments of the present application also provide a computer-readable storage medium storing computer instructions that, when executed by one or more processors, cause the one or more processors to perform the aforementioned flow control method.
In the embodiment of the application, in the QOS technology implementation process, a first type of token can be put into a first token bucket according to the committed information rate CIR; and storing a second type of token by using a second token bucket, wherein the capacity of the second token bucket is matched with the extra burst length EBS customized by the user input flow, so that the burst duration of the user input flow can be controlled based on the support of the second token bucket. In addition, a third type token can be released to a third token bucket according to the peak information rate PIR, and the consumption rate of the second type token is limited by the third type token, so that the burst upper limit of the input flow of the user is controlled, and the burst flow is prevented from contending for the network bandwidth of other users. Therefore, in the embodiment of the application, the burst duration and the burst upper limit of the burst flow can be finely controlled, so that the network service quality is effectively improved. In addition, the user only needs to pay a small amount of cost for the second token bucket and the third token bucket aiming at the burst traffic, and does not need to purchase long-term high bandwidth due to the burst traffic, so that the traffic cost can be effectively saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of a flow control method according to an exemplary embodiment of the present application;
FIG. 2 is a logical schematic diagram of a flow control scheme provided in an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a flow control device according to another exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The current flow control mode has the problems of overhigh cost or contending for network bandwidth of other users in the process of dealing with burst flow, and the effect is poor. To this end, in some embodiments of the present application: in the QOS technology implementation process, a first type of token can be put into a first token bucket according to the committed information rate CIR; and storing a second type of token by using a second token bucket, wherein the capacity of the second token bucket is matched with the extra burst length EBS customized by the user input flow, so that the burst duration of the user input flow can be controlled based on the support of the second token bucket. In addition, a third type token can be released to a third token bucket according to the peak information rate PIR, and the consumption rate of the second type token is limited by the third type token, so that the burst upper limit of the input flow of the user is controlled, and the burst flow is prevented from contending for the network bandwidth of other users. Therefore, in the embodiment of the application, the burst duration and the burst upper limit of the burst flow can be finely controlled, so that the network service quality is effectively improved. In addition, the user only needs to pay a small amount of cost for the second token bucket and the third token bucket aiming at the burst traffic, and does not need to purchase long-term high bandwidth due to the burst traffic, so that the traffic cost can be effectively saved.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a flow control method according to an exemplary embodiment of the present application, and fig. 2 is a logic diagram illustrating a flow control scheme according to an exemplary embodiment of the present application. Wherein the method may be performed by a flow control means, which may be implemented as a combination of software and/or hardware, which may be integrated in a flow control device. Referring to fig. 1, the method includes:
and 102, in the process of consuming the second type of tokens, limiting the consumption rate of the second type of tokens by using the third type of tokens in a third token bucket to control the burst upper limit of the user input flow, wherein the rate of releasing the tokens to the third token bucket adopts a peak information rate PIR.
The flow control scheme provided by the embodiment can be applied to various QoS scenes, and realizes fine control on burst flow of a user.
Before describing the flow control scheme provided in this embodiment, some concepts related to this embodiment will be briefly described:
QoS: quality of service. Refers to a network that can provide better service capabilities for a given network communication using a variety of underlying technologies.
CIR: committed Information Rate, Committed Information Rate. The first token bucket may be used as an average information rate of the first token bucket that allows transmission or forwarding of a packet, and the measurement unit is Kbps (bit unit).
And (3) CBS: committed Burst Size, Committed Burst length. The capacity of the first token bucket in this embodiment, i.e. the committed burst traffic that the first token bucket can pass instantaneously, is represented by byte (byte)
EBS: exceded Burst Size, extra Burst length. The capacity of the second token bucket in this embodiment, that is, the burst traffic that the second token bucket can instantaneously pass through, may be represented.
PIR: peak Information Rate, Peak Information Rate. The highest information rate that the third token bucket allows to transmit or forward the message in the embodiment; the unit is bit.
PBS: peak Burst Size, Peak Burst length. The capacity of the third token bucket in this embodiment, that is, the burst traffic that the third token bucket can instantaneously pass through, may be represented.
A token bucket, which may be considered a container to hold tokens.
The token, which may be used to indicate the ability to forward the message, may be represented by a credit token. The token is consumed in the process of flow control.
On this basis, referring to fig. 2, in this embodiment, a design concept of a double-speed three-bucket may be adopted, that is, a first token bucket, a second token bucket, and a third token bucket are configured, where a token release rate of the first token bucket adopts a committed information rate CIR for supporting conventional control of user input traffic; the token releasing rate of the third token bucket adopts peak information rate PIR, and the second token bucket and the third token bucket are matched with each other and used for supporting burst control on the user input flow.
Wherein, the user can purchase the basic flow according to the requirement. Based on this, in this embodiment, the committed information rate CIR may be configured according to the basic traffic required by the user. For example, referring to fig. 2, if the network bandwidth required by user a is generally less than 1MBps, user a may purchase 1GBps of basic traffic, and in this embodiment, the committed information rate CIR may be configured to 1 MBps. In this embodiment, a first class of tokens (denoted as CIR tokens in fig. 2) may be placed into a first token bucket (denoted as CBS bucket in fig. 2) at a committed information rate, CIR. In addition, the capacity of the first token bucket may be set to be greater than the maximum packet length in the user input traffic to support normal passing of the packet in the user input traffic, for example, the capacity may be set to be 1-2 times the maximum packet length.
It should be noted that, in this embodiment, the user is not limited to an individual or an enterprise, and may also be a user who has a storage access requirement, such as a container and a cluster, and the present embodiment does not limit the type, the number, the specification, and the like of the user.
In the event that the user input traffic does not exceed the base traffic it has purchased, a sufficient number of first type tokens will be present in the first token bucket for traffic control, for which, in step 100, the first type tokens may be consumed to control the user input traffic if a sufficient number of first type tokens are present in the first token bucket. The "sufficient amount" may mean that the number of the first type tokens currently existing in the first token bucket is greater than or equal to the length of the current packet in the user input traffic. An "insufficient" condition may mean that the number of first type tokens currently existing in the first token bucket is smaller than the length of the current packet in the user input traffic. In this embodiment, if the remaining amount of the current token in the first token bucket is smaller than the length of the current packet in the user input traffic, it is determined that the first class token in the first token bucket is insufficient, otherwise, it is determined that a sufficient amount of the first class token exists in the first token bucket. Here, consumption tokens may be understood as meaning that a user inputs traffic and needs to keep token communication, that is, while allowing traffic to pass, a corresponding amount of tokens needs to be reduced from a token bucket.
In addition, the token consumption amount in the first token bucket may be lower than the token putting amount, and in this embodiment, the first class tokens overflowing from the first token bucket may be put into the second token bucket as the second class tokens.
In this embodiment, the second class of tokens in the second token bucket may be derived from the first class of tokens that overflow from the first token bucket, may also be derived from the third class of tokens that overflow from the third token bucket, and of course, may also be derived from separate delivery. That is, in this embodiment, the first class tokens overflowing from the first token bucket may be put into the second token bucket as the second class tokens; putting the third type of tokens overflowing from the third token bucket into the second token bucket to serve as second type of tokens; or to place tokens of the second type separately into a second token bucket. For the single-release mode, the present embodiment does not limit the release time or rate, and only needs to ensure that the number of the second type tokens in the second token bucket can be adapted to the extra burst length EBS customized by the user.
In the case that the user input traffic is in a burst, the first class tokens in the first token bucket may not be able to deal with the burst traffic, and in this case, in step 101, the second class tokens in the second token bucket may be consumed to control the user input traffic in the case that the first class tokens in the first token bucket are insufficient.
The user may also customize the additional burst length EBS as desired and pay a usage fee for the second token bucket accordingly. Based on this, in the present embodiment, the capacity of the second token bucket may be configured according to the extra burst length EBS customized by the user. In an alternative, the user may customize the burst duration and the upper limit of the traffic burst for the user input traffic, and based on this, the capacity of the second token bucket may be calculated according to the burst duration and the upper limit of the traffic burst customized for the user input traffic in this embodiment. For example, referring to fig. 2, if the traffic burst upper limit of the user input traffic of the user a is 3MBps and the burst duration takes about 1 minute, the user a may purchase the burst traffic of (3 MBps-1 MBps) × 60s =120MBps, which is converted into an extra burst length EBS of about 15000 bytes, and thus, the user a may be provided with the usage right of a second token bucket (denoted as EBS bucket in fig. 2) of 15000 bytes.
The user may also customize the peak information rate PIR as desired, in particular, the user may customize the peak information rate PIR according to the traffic burst cap of the user input traffic. For example, referring to fig. 2, the user a may customize the peak information rate PIR to 2MBps according to its upper traffic burst limit of 3MBps, such that the first token bucket (denoted as CBS bucket in fig. 2) may support the flow control of 1MBps, and the second token bucket (denoted as EBS bucket in fig. 2) and the third token bucket (denoted as PBS bucket in fig. 2) cooperate with each other to support the flow control of 2MBps, based on which the control of the burst traffic of 3MBps customized by the user a may be supported within the customized burst duration under the concept of consuming the first type of token preferentially and consuming the second type of token complementarily. In this embodiment, a third type of tokens (labeled PIR tokens in fig. 2) may be placed into a third token bucket (labeled PBS bucket in fig. 2) at a peak information rate PIR. In addition, the capacity of the third token bucket may be set to be greater than the maximum packet length in the user input traffic to support normal passing of the packet in the user input traffic, for example, the capacity may be set to be 1-2 times the maximum packet length.
Based on this, referring to fig. 1, in step 102, the consumption rate of the second type tokens may be limited by the third type tokens in the third token bucket in the process of consuming the second type tokens, so as to control the burst upper limit of the user input traffic. As mentioned above, the token releasing rate in the third token bucket is configured according to the traffic burst upper limit customized by the user, so that the third type of tokens in the third token bucket can be used to clamp the consumption rate of the second type of tokens in the second token bucket, so that the consumption rate of the second type of tokens can be adapted to the traffic burst upper limit customized by the user, thereby avoiding the situation of excessive instantaneous traffic, and reducing the situation that the user input traffic contends for the network bandwidth of other users when the overall network bandwidth is limited.
In an alternative implementation, the second class of tokens in the second token bucket may be allowed to be consumed if a sufficient number of tokens are present in both the third token bucket and the second token bucket. And if the current token surplus in the second token bucket or the third token bucket is larger than the length of the current message in the user input flow, determining that sufficient tokens exist in the second token bucket and the third token bucket. In this way, the token consumption rate in the second token bucket may be limited to the peak information rate PIR, i.e., may be consistent with the token consumption rate that the third token bucket is capable of supporting, thereby avoiding an excessive token consumption rate in the second token bucket. Additionally, where tokens are present in both the third token bucket and the second token bucket, an equal amount of the third class of tokens may be consumed synchronously while allowing the second class of tokens in the second token bucket to be consumed. That is, the logic for the second token bucket and the third token bucket to cooperate with each other may be: and under the condition that sufficient tokens exist in the second token bucket and the third token bucket, consuming the second class tokens and the third class tokens in corresponding quantities simultaneously so as to control the user input flow.
For example, referring to fig. 2, if there are 100 tokens in the EBS bucket, 30 tokens in the PBS bucket, and there is a burst of current user input traffic, and the number of tokens required is 20, it can be determined that there are enough tokens in both the EBS bucket and the PBS bucket, and on this basis, 20 tokens can be consumed from the PBS bucket and 20 tokens can be consumed from the EBS bucket, so this control ensures that the burst traffic exceeds the user-customized upper burst limit. And if the number of tokens required by the current user traffic is 40 and the tokens in the PBS bucket are insufficient, determining that the current emergency event may exceed the traffic burst upper limit customized by the user, forbidding the current traffic, and not consuming the tokens in the PBS bucket and the EBS bucket, thereby controlling the traffic burst upper limit input by the user.
Referring to fig. 2, after the flow control scheme provided in this embodiment performs flow control on the user input flow, the actual user operation flow may be obtained, in this embodiment, the actual user operation flow will meet the burst duration and the burst upper limit of the flow customized by the user, and the problems of transient flow overrun, contending for network bandwidth of other users, and the like will not occur.
In this embodiment, in terms of cost, the usage cost of the third token bucket corresponding to the user input traffic may be calculated according to the token consumption in the third token bucket. Therefore, the user does not need to purchase long-term PIR bandwidth, but only needs to pay the cost matched with the upper limit of the traffic burst, and the traffic cost can be effectively saved.
Referring to fig. 2, in the flow control scheme provided in this embodiment, in the process of controlling the flow of the user input flow, the first type tokens in the first token bucket are preferentially consumed to control the flow, and in the case that the first type tokens in the first token bucket are insufficient, the second type tokens in the second token bucket are consumed to control the flow, so that the first type tokens and the second type tokens can complement each other (corresponding to the "OR" optional relationship in fig. 2) to cope with the emergency of the user input flow, but in the process of consuming the second type tokens, the consumption rate of the second type tokens is restricted by the third type tokens in the third token bucket (corresponding to the "and" synchronous relationship in fig. 2), so that the consumption rate of the second type tokens is prevented from being too high on the premise that the user-customized upper limit of the flow burst is met, thereby limiting the amount of user input traffic to contend for other users' network bandwidth.
Accordingly, in the embodiment, in the QOS technology implementation process, a first class of tokens may be put into a first token bucket according to the committed information rate CIR; and storing a second type of token by using a second token bucket, wherein the capacity of the second token bucket is matched with the extra burst length EBS customized by the user input flow, so that the burst duration of the user input flow can be controlled based on the support of the second token bucket. In addition, a third type token can be released to a third token bucket according to the peak information rate PIR, and the consumption rate of the second type token is limited by the third type token, so that the burst upper limit of the input flow of the user is controlled, and the burst flow is prevented from contending for the network bandwidth of other users. Therefore, in the embodiment of the application, the burst duration and the burst upper limit of the burst flow can be finely controlled, so that the network service quality is effectively improved. In addition, the user only needs to pay a small amount of cost for the second token bucket and the third token bucket aiming at the burst traffic, and does not need to purchase long-term high bandwidth due to the burst traffic, so that the traffic cost can be effectively saved.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 100 to 102 may be device a; for another example, the execution subject of steps 100 and 101 may be device a, and the execution subject of step 102 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are merely used for distinguishing different operations, and the sequence numbers do not represent any execution order per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
Fig. 3 is a schematic structural diagram of a flow control device according to another exemplary embodiment of the present application. As shown in fig. 3, the flow control apparatus includes: a memory 30 and a processor 31;
the processor 31 is coupled to the memory 30 for executing one or more computer instructions for:
releasing a first class token to a first token bucket according to the Committed Information Rate (CIR);
storing a second type of tokens by using a second token bucket, wherein the capacity of the second token bucket is matched with the additional burst length EBS customized by the user input flow;
releasing a third type of token to a third token bucket according to the peak information rate PIR;
under the condition that a sufficient amount of first-class tokens exist in the first token bucket, consuming the first-class tokens to control the user input flow;
under the condition that the first class of tokens in the first token bucket are insufficient, consuming the second class of tokens in the second token bucket to control the user input flow;
and in the process of consuming the second type of tokens, limiting the consumption rate of the second type of tokens by using the third type of tokens in the third token bucket so as to control the burst upper limit of the user input traffic.
In this embodiment, the product form of the flow control device is not limited, and the flow control device may be a node, a cluster, a cloud server, a virtual machine, a data center, and the like in a cloud network, and may also be other product forms in other networks.
In an alternative embodiment, the processor 31 may be further configured to:
putting the first class tokens overflowing from the first token bucket into a second token bucket to be used as second class tokens;
putting the third type of tokens overflowing from the third token bucket into the second token bucket to serve as second type of tokens; or
And independently releasing the second type of tokens into the second token bucket.
In an alternative embodiment, the processor 31, when limiting the consumption rate of the second type of tokens by using the third type of tokens in the third token bucket in the process of consuming the second type of tokens, may be configured to:
in the event that a sufficient number of tokens are present in both the third token bucket and the second token bucket, the second class of tokens in the second token bucket is allowed to be consumed.
In an alternative embodiment, the capacity of the first token bucket and the second token bucket is set to be larger than the maximum packet length in the user input traffic.
In an alternative embodiment, the processor 31 may be further configured to:
and calculating the use fee of the third token bucket corresponding to the input flow of the user according to the token consumption in the third token bucket.
In an alternative embodiment, the processor 31 may be further configured to:
and if the remaining quantity of the current tokens in the first token bucket is smaller than the length of the current message in the user input flow, determining that the first class tokens in the first token bucket are insufficient.
In an alternative embodiment, the processor 31 may be further configured to:
and calculating the capacity of the second token bucket according to the burst duration and the upper limit of the traffic burst customized by the traffic input by the user.
Further, as shown in fig. 3, the flow control apparatus further includes: communication components 32, power components 33, and the like. Only some of the components are shown schematically in fig. 3 and it is not intended that the flow control device comprises only the components shown in fig. 3.
It should be noted that, for the technical details in the embodiments of the flow control device, reference may be made to the related description in the foregoing method embodiments, and for the sake of brevity, detailed description is not provided herein, but this should not cause a loss of scope of the present application.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program is capable of implementing the steps that can be executed by the flow control device in the foregoing method embodiments when executed.
The memory of FIG. 3, described above, is used to store a computer program and may be configured to store other various data to support operations on a computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, pictures, videos, and so forth. The memory may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The communication component in fig. 3 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The power supply assembly of fig. 3 described above provides power to the various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method of flow control, comprising:
under the condition that a sufficient amount of first-class tokens exist in a first token bucket, consuming the first-class tokens to control the input traffic of a user, wherein the rate of putting the tokens into the first token bucket adopts a Committed Information Rate (CIR);
under the condition that the first class of tokens in the first token bucket are insufficient, consuming a second class of tokens in a second token bucket to control the user input traffic, wherein the capacity of the second token bucket is adapted to an extra burst length EBS customized by the user input traffic;
in the process of consuming the second type of tokens, simultaneously consuming a corresponding number of third type of tokens in a third token bucket to limit the consumption rate of the second type of tokens; and the capacity of the third token bucket is adapted to the burst upper limit of the user input flow, and the rate of releasing tokens to the third token bucket adopts a peak information rate PIR.
2. The method of claim 1, wherein the second class of tokens in the second token bucket is derived from the first class of tokens that overflow the first token bucket, the third class of tokens that overflow the third token bucket, or a separate drop.
3. The method of claim 1, wherein limiting a rate of consumption of the second class of tokens with a third class of tokens in a third token bucket in the course of consuming the second class of tokens comprises:
allowing consumption of a second class of tokens in the second token bucket if a sufficient number of tokens are present in both the third token bucket and the second token bucket.
4. The method of claim 1, the first token bucket and the second token bucket having a capacity set to be greater than a maximum packet length in the user input traffic.
5. The method of claim 1, further comprising:
and calculating the use fee of the third token bucket corresponding to the user input flow according to the token consumption in the third token bucket.
6. The method of claim 1, further comprising:
and if the remaining quantity of the current tokens in the first token bucket is smaller than the length of the current message in the user input flow, determining that the first class tokens in the first token bucket are insufficient.
7. The method of claim 1, further comprising:
and calculating the capacity of the second token bucket according to the burst duration and the upper limit of the flow burst customized by the user input flow.
8. A flow control device comprising a memory and a processor;
the memory is to store one or more computer instructions;
the processor is coupled with the memory for executing the one or more computer instructions for:
releasing a first class token to a first token bucket according to the Committed Information Rate (CIR);
storing a second type of tokens by using a second token bucket, wherein the capacity of the second token bucket is matched with the additional burst length EBS customized by the user input flow;
releasing a third type of token to a third token bucket according to the peak information rate PIR;
consuming a first type of token to control user input traffic if a sufficient number of the first type of token is present in the first token bucket;
under the condition that the first class of tokens in the first token bucket are insufficient, consuming a second class of tokens in the second token bucket to control the user input traffic;
in the process of consuming the second type of tokens, simultaneously consuming a corresponding number of third type of tokens in the third token bucket to limit the consumption rate of the second type of tokens; wherein the capacity of the third token bucket is adapted to the burst upper bound of the user input traffic.
9. The device of claim 8, the processor further to:
putting the first class tokens overflowing from the first token bucket into the second token bucket to serve as the second class tokens;
putting the third type of tokens overflowing from the third token bucket into the second token bucket to serve as the second type of tokens; or
And releasing the second type of tokens into the second token bucket separately.
10. A computer-readable storage medium storing computer instructions that, when executed by one or more processors, cause the one or more processors to perform the flow control method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110978459.9A CN113422737B (en) | 2021-08-25 | 2021-08-25 | Flow control method, flow control equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110978459.9A CN113422737B (en) | 2021-08-25 | 2021-08-25 | Flow control method, flow control equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113422737A CN113422737A (en) | 2021-09-21 |
CN113422737B true CN113422737B (en) | 2022-01-11 |
Family
ID=77719361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110978459.9A Active CN113422737B (en) | 2021-08-25 | 2021-08-25 | Flow control method, flow control equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113422737B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109861920A (en) * | 2019-01-16 | 2019-06-07 | 深圳市融汇通金科技有限公司 | A kind of method and device of elasticity current limliting |
CN110958184A (en) * | 2019-11-27 | 2020-04-03 | 新华三半导体技术有限公司 | Bandwidth adjusting method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8681630B1 (en) * | 2010-09-21 | 2014-03-25 | Google Inc. | Configurable rate limiting using static token buckets, and applications thereof |
CN102932272B (en) * | 2012-11-23 | 2016-05-11 | 迈普通信技术股份有限公司 | Message forwarding method based on uninterrupted and forwarding unit |
US9385956B2 (en) * | 2013-06-25 | 2016-07-05 | Amazon Technologies, Inc. | Compound token buckets for burst-mode admission control |
CN104980367B (en) * | 2014-04-03 | 2019-04-30 | 深圳市中兴微电子技术有限公司 | A kind of limiting speed of token bucket method and apparatus |
CN106330755A (en) * | 2015-06-16 | 2017-01-11 | 中兴通讯股份有限公司 | Message flow regulation method and device and mobile communication gateway |
CN112152863B (en) * | 2020-10-21 | 2022-05-24 | 新华三信息安全技术有限公司 | Distributed bandwidth allocation method and device |
-
2021
- 2021-08-25 CN CN202110978459.9A patent/CN113422737B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109861920A (en) * | 2019-01-16 | 2019-06-07 | 深圳市融汇通金科技有限公司 | A kind of method and device of elasticity current limliting |
CN110958184A (en) * | 2019-11-27 | 2020-04-03 | 新华三半导体技术有限公司 | Bandwidth adjusting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113422737A (en) | 2021-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8611217B2 (en) | Subscriber/service differentiation in advanced wireless networks | |
US8665717B2 (en) | Data rate aware scheduling in advanced wireless networks | |
ES2333791T3 (en) | METHOD AND DEVICE FOR MANAGING SHARED RESOURCES BY DIFFERENT OPERATORS IN A COMMUNICATION SYSTEM. | |
US20180376299A1 (en) | Systems and methods for the temporal shifting of data downloads or streaming | |
US9391749B2 (en) | System and method for distributed data management in wireless networks | |
US10587462B2 (en) | Method and apparatus for deploying virtual operation, administration and maintenance, and virtualized network system | |
US9392397B2 (en) | Radio module, application device and method for operating an application device that exchanges application data via a cellular radio communication network | |
US8239573B2 (en) | Off-peak background delivery | |
CN104918283B (en) | A kind of jamming control method and equipment | |
US8838156B2 (en) | Multi-bearer rate control for transporting user plane data | |
CN106489278A (en) | Cellular network back haul link transships | |
TW200539627A (en) | Quality of service scheduler for a wireless network | |
CN113301515B (en) | Method, device, system, equipment and storage medium for processing short message channel connection | |
CN113315671A (en) | Flow rate limit and information configuration method, routing node, system and storage medium | |
EP3310093B1 (en) | Traffic control method and apparatus | |
CN113965519A (en) | Flow control method, cluster resource guarantee method, equipment and storage medium | |
CN112968845A (en) | Bandwidth management method, device, equipment and machine-readable storage medium | |
CN113422737B (en) | Flow control method, flow control equipment and storage medium | |
CN112333833A (en) | Resource allocation method and access network equipment | |
CN109413598B (en) | Resource allocation and management method and device | |
CN113438185B (en) | Bandwidth allocation method, device and equipment | |
CN114124829A (en) | Service forwarding control method and device and electronic equipment | |
CN110475286B (en) | Data packet discarding management method, device and apparatus, and medium | |
EP3197228A1 (en) | Method and device for user access to base station | |
CN103501231B (en) | Business service method, network analyzing apparatus and charge system |
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 |