CN107347198B - Speed limiting method, speed limiting control node and speed limiting equipment - Google Patents

Speed limiting method, speed limiting control node and speed limiting equipment Download PDF

Info

Publication number
CN107347198B
CN107347198B CN201610294840.2A CN201610294840A CN107347198B CN 107347198 B CN107347198 B CN 107347198B CN 201610294840 A CN201610294840 A CN 201610294840A CN 107347198 B CN107347198 B CN 107347198B
Authority
CN
China
Prior art keywords
bandwidth
packet
bandwidth packet
speed
flow
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
Application number
CN201610294840.2A
Other languages
Chinese (zh)
Other versions
CN107347198A (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 Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201610294840.2A priority Critical patent/CN107347198B/en
Publication of CN107347198A publication Critical patent/CN107347198A/en
Application granted granted Critical
Publication of CN107347198B publication Critical patent/CN107347198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints

Abstract

The document discloses a speed limiting method, a speed limiting control node and a speed limiting device, wherein the speed limiting method comprises the following steps: the speed limit control node acquires the flow of the bandwidth packet; the speed limit control node respectively determines the flow proportion of the bandwidth packet on each speed limit device in the next period according to the obtained flow of the bandwidth packet; the speed limit control node sends the determined flow proportion of the bandwidth packet in the next period to the speed limit equipment corresponding to the bandwidth packet; and each speed limiting device determines the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period. The embodiment of the application realizes dynamic distribution of the flow on the speed limiting equipment and improves user experience.

Description

Speed limiting method, speed limiting control node and speed limiting equipment
Technical Field
The invention relates to a mobile communication technology, in particular to a speed limiting method, a speed limiting control node and speed limiting equipment.
Background
Quality of service (Qos) and speed limit functions are common functions on network devices such as switches and firewalls, and are mainly realized by caching data packets through a queue buffer, realizing Quality of service guarantee according to priority and limiting the length of data that can pass in a unit time through a token bucket.
The current speed limiting modes in the cloud computing network mostly adopt a cluster deployment mode, a plurality of speed limiting devices are configured in the same mode and work simultaneously without communication, and because the configuration of each speed limiting device is consistent, the flow on each speed limiting device cannot be dynamically distributed, and the user experience is poor.
Disclosure of Invention
The application provides a speed limiting method, a speed limiting control node and speed limiting equipment, which can realize dynamic distribution of flow on the speed limiting equipment and improve user experience.
In order to achieve the purpose of the application, the application provides a speed limiting method, which comprises the following steps:
the speed limit control node acquires the flow of the bandwidth packet;
the speed limit control node respectively determines the flow proportion of the bandwidth packet on each speed limit device in the next period according to the obtained flow of the bandwidth packet;
the speed limit control node sends the determined flow proportion of the bandwidth packet in the next period to the speed limit equipment corresponding to the bandwidth packet;
and each speed limiting device determines the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period.
Optionally, the speed limit control node periodically obtains the traffic of the bandwidth packet.
Optionally, the acquiring, by the speed limit control node, the traffic of the bandwidth packet includes:
the speed limit control node sends a request for acquiring the flow of the bandwidth packet in the current period to each speed limit device;
and each speed limiting device counts the flow of the bandwidth packet per se in the current period according to the received request from the speed limiting control node and sends the counted flow of the bandwidth packet in the current period to the speed limiting control node.
Optionally, the respectively determining the traffic proportion of the bandwidth packet on each speed limiting device in the next period includes:
the speed limit control node calculates the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet in the current period to the sum of the flow of the bandwidth packet in the current period on each speed limiting device;
and taking each ratio as the flow proportion of the bandwidth packet in the next period on the speed limiting device corresponding to the ratio.
Optionally, the determining, by each speed limiting device, the number of tokens in the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period includes:
each speed limiting device acquires the total bandwidth of a bandwidth packet and calculates the time difference between the first time of the flow proportion in the next period of receiving the bandwidth packet and the second time of the flow proportion in the current period;
and the speed limiting equipment determines the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the calculated time difference and the received flow proportion of the bandwidth packet in the current period.
Optionally, the rate limiting device determines the token number of the token bucket of the bandwidth packet in the next period according to the following formula:
Tokeni=bwi×intervali×ratioi
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiIs the total bandwidth, interval, of the bandwidth packet with index iiIs the time difference, ratio, between a first instant and a second instant of a bandwidth packet, denoted iiIs the traffic proportion of the bandwidth packet labeled i in the current period.
Optionally, the speed limit control node comprises a main speed limit control node and a standby speed limit control node;
and when the main speed-limiting control node is down, the standby speed-limiting control node takes over the work of the main speed-limiting control node.
The application also provides a speed limit control node, including: the device comprises a first receiving module, a first determining module and a first sending module; wherein the content of the first and second substances,
the first receiving module is used for acquiring the flow of the bandwidth packet;
the first determining module is used for respectively determining the flow proportion of the bandwidth packet on each speed limiting device in the next period according to the obtained flow of the bandwidth packet;
and the first sending module is used for sending the determined flow proportion of the bandwidth packet in the next period to the corresponding speed limiting equipment.
Optionally, the first receiving module is specifically configured to periodically obtain a traffic of a bandwidth packet.
Optionally, the first sending module is further configured to send a request for acquiring a traffic of a bandwidth packet in a current period to each speed limiting device; accordingly, the number of the first and second electrodes,
the first receiving module is specifically configured to receive traffic of the bandwidth packet of the first receiving module in the current period, where the traffic is counted by each speed limiting device.
Optionally, the first determining module is specifically configured to:
calculating the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet on each speed limiting device in the current period to the sum of the flows of the bandwidth packets in the current period;
and taking each ratio as the flow proportion of the bandwidth packet on the speed limiting device corresponding to the ratio in the next period.
Optionally, the speed limit control node is connected with one or more speed limit devices.
The application also provides a speed limiting device, including: a second receiving module and a second determining module; wherein the content of the first and second substances,
the second receiving module is used for receiving the flow rate proportion of the bandwidth packet on the speed limiting equipment which the speed limiting control node belongs to in the next period;
and the second determining module is used for determining the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period.
Optionally, the second determining module is specifically configured to:
acquiring the total bandwidth of a bandwidth packet and calculating a time difference value between a first time of receiving the flow proportion in the next period of the bandwidth packet and a second time of receiving the flow proportion in the current period;
and determining the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the calculated time difference value and the received flow proportion of the bandwidth packet in the current period.
Optionally, the speed limiting device further comprises a statistics module and a second sending module; at this time, the process of the present invention,
the second receiving module is further configured to notify the counting module when receiving a request from the speed limit control node; accordingly, the number of the first and second electrodes,
the counting module is used for receiving the notice from the second receiving module and counting the flow of the bandwidth packet on the speed limiting equipment to which the counting module belongs in the current period; accordingly, the number of the first and second electrodes,
and the second sending module is used for sending the counted flow of the bandwidth packet in the current period to the speed limit control node.
The embodiment of the application comprises the following steps: the speed limit control node acquires the flow of the bandwidth packet; the speed limit control node respectively determines the flow proportion of the bandwidth packet on each speed limit device in the next period according to the obtained flow of the bandwidth packet; the speed limit control node sends the determined flow proportion of the bandwidth packet in the next period to the speed limit equipment corresponding to the bandwidth packet; and each speed limiting device determines the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period. The embodiment of the application realizes dynamic distribution of the flow on the speed limiting equipment and improves user experience.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a speed limiting method of the present invention;
FIG. 2 is a schematic diagram of a cluster deployment of the rate limiting device of the present invention;
FIG. 3 is a schematic diagram of a master/slave speed limit control node according to the present invention;
FIG. 4 is a schematic structural diagram of a speed limit control node according to the present invention;
fig. 5 is a schematic structural view of the speed limiting apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The applicant finds that, for speed limitation of internet protocol (ip, internet protocol), one implementation manner is: the method can be configured on a single speed limiting device, and the high availability is realized by a main-standby switching mode. The main speed limiting equipment works at ordinary times, when the main speed limiting equipment is down, the main speed limiting equipment is switched to the standby speed limiting equipment, the speed limiting mode cannot be linearly expanded, so that high throughput and large user use cannot be supported, the operation and maintenance cost is high, the main equipment and the standby equipment need to be configured synchronously, the resource utilization rate is not high, and the method is suitable for the situations of small flow and few users and is not suitable for a cloud computing scene; another implementation is a cluster type, in which a plurality of speed-limiting devices are configured identically and operate simultaneously without communicating with each other, which has the following disadvantages: the applicant thinks that all the incoming and outgoing flows of the same elastic ip (eip) can be configured on the same speed limiting device by changing the hash strategy of the uplink and downlink switches, so that high-precision speed limitation can be realized, but the heterogeneous network configuration can be caused by the change of the hash strategy of the uplink and downlink switches, so that the flow among the speed limiting devices is uneven, the speed limiting devices can be down due to overload, and the shared bandwidth characteristic cannot be supported.
Fig. 1 is a flow chart of a speed limiting method of the present invention, as shown in fig. 1, including:
step 101: and the speed limit control node acquires the flow of the bandwidth packet.
The speed limit control node is defined as a node (such as a deployed program) which can communicate with each speed limit device; the bandwidth packet is defined to support one or more bytes shared by the ip, if the bandwidth of a certain user home is 10 megabits per second (Mbps), then the 10M bandwidth is the bandwidth of the bandwidth packet, and one or more ips can share the 10M bandwidth to get on the internet, where 10Mbps indicates that the throughput that can pass per second is 10 megabits (bit).
The traffic of the same bandwidth packet can come from one rate-limiting device or a plurality of rate-limiting devices.
Wherein, step 101 specifically includes:
the speed limit control node sends a request for acquiring the flow of the bandwidth packet in the current period to each speed limit device;
and each speed limiting device counts the flow of the bandwidth packet per se in the current period according to the received request from the speed limiting control node and sends the counted flow of the bandwidth packet in the current period to the speed limiting control node.
Optionally, the speed limit control node may periodically obtain the traffic of the bandwidth packet, or the speed limit control node may obtain the traffic of the bandwidth packet according to an external instruction. The external instruction comprises an instruction manually input by an administrator of the speed limit control node.
Step 102: and the speed limit control node respectively determines the flow proportion of the bandwidth packet on each speed limit device in the next period according to the obtained flow of the bandwidth packet.
Wherein, step 102 specifically comprises:
the speed limit control node calculates the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet in the current period to the sum of the flow of the bandwidth packet in the current period on each speed limiting device;
and taking each ratio as the flow proportion of the bandwidth packet in the next period on the speed limiting device corresponding to the ratio.
For example, it is assumed that there are 3 speed-limiting devices which are respectively the speed-limiting device 1, the speed-limiting device 2 and the speed-limiting device 3, for the bandwidth packet 1, the traffic of the bandwidth packet 1 on the rate-limiting device 1 in the current period is 2M, the traffic of the bandwidth packet 1 on the rate-limiting device 2 in the current period is 1M, the traffic of the bandwidth packet 1 on the rate-limiting device 3 in the current period is 4M, the sum of the traffic of the bandwidth packet 1 in the current period is 1M +2M + 4M-7M, the traffic proportion of the bandwidth packet 1 in the next period on the rate limiting device 1 is (1M/7M) -1/7, the traffic proportion of the bandwidth packet 1 in the next period on the rate limiting device 2 is (2M/7M) -2/7, and the traffic proportion of the bandwidth packet 1 in the next period on the rate limiting device 2 is (4M/7M) -4/7.
Optionally, the method further comprises, before: and each speed limiting device reserves flow with a preset proportion for each bandwidth packet. In this case, a person skilled in the art may set the preset ratio according to an actual situation, for example, the preset ratio may be set to one tenth (where ten is the number of speed limiting devices) of the total bandwidth (the sum of traffic in one period) of each bandwidth packet itself. It should be noted that, since the traffic in the bandwidth packet can reach any speed limiting device at any time, even if there is no traffic of the bandwidth packet on the speed limiting device in the previous period, a certain traffic (bandwidth) needs to be reserved for the bandwidth packet on the speed limiting device in the current period, so as to ensure that the new connection of the bandwidth packet passes through.
Step 103: and the speed limit control node sends the determined flow proportion of the bandwidth packet in the next period to the speed limit equipment corresponding to the bandwidth packet.
In the above example, the speed limit control node transmits 1/7 of the bandwidth packet to the speed limit device 1, 2/7 of the bandwidth packet to the speed limit device 2, and 4/7 of the bandwidth packet to the speed limit device 3.
Step 104: and each speed limiting device determines the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period.
After step 103 and before step 104, the method further comprises: when each speed limiting device receives the flow rate proportion of the bandwidth packet in the next period, the time of the flow rate proportion of the received bandwidth packet in the next period is recorded.
Wherein, step 104 specifically includes:
each speed limiting device acquires the total bandwidth of the bandwidth packet and calculates the time difference between the first time of the flow proportion in the next period of receiving the bandwidth packet and the second time of the flow proportion in the current period;
and the speed limiting equipment determines the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the calculated time difference and the received flow proportion of the bandwidth packet in the current period.
The speed limiting device determines the token number of a token bucket of a bandwidth packet in the next period according to a formula (1):
Tokeni=bwi×intervali×ratioi(1)
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiIs the total bandwidth, interval, of the bandwidth packet with index iiIs the time difference, ratio, between a first instant and a second instant of a bandwidth packet, denoted iiIs the traffic proportion of the bandwidth packet labeled i in the current period. Wherein, the formula (1) represents the number of bytes (or flow) that the bandwidth packet with the index i is allowed to pass through on the speed limiting device in the next period.
The method also comprises the following steps: the time length of the period is set. Wherein, step 104 specifically includes:
each speed limiting device acquires the total bandwidth of the bandwidth packet and takes the time length of a preset period as the time difference value of the bandwidth packet;
and the speed limiting equipment determines the token number of the token bucket of the bandwidth packet in the next period according to the total bandwidth of the obtained bandwidth packet, the time difference value of the bandwidth packet and the flow proportion of the received bandwidth packet in the current period.
The speed limiting device determines the token number of a token bucket of a bandwidth packet in the next period according to a formula (2):
Tokeni=bwi×interval×ratioi(2)
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiIs the total bandwidth of the bandwidth packet with index i, interval is the time length of the preset period, ratioiIs the traffic proportion of the bandwidth packet labeled i in the current period. Wherein, the formula (2) represents the number of bytes (or flow) that the bandwidth packet with the index i is allowed to pass through on the speed limiting device in the next period.
Optionally, when the speed limiting device receives a data packet corresponding to a certain bandwidth packet in the current period, the method further includes: when the size of a received data packet corresponding to a certain bandwidth packet is smaller than or equal to the number of tokens in the token bucket of the bandwidth packet in the current period, releasing the data packet and taking the difference value between the number of tokens in the token bucket of the bandwidth packet in the current period and the size of the received data packet corresponding to the certain bandwidth packet as the remaining number of tokens in the token bucket of the bandwidth packet in the current period;
and when the size of a received data packet corresponding to a certain bandwidth packet is larger than the number of tokens of the token bucket of the bandwidth packet in the current period, discarding the data packet. The data packet corresponding to a certain bandwidth packet refers to a data packet generated by the user accessing the internet of the bandwidth packet.
It should be noted that, since the number of tokens is a global value, updating the number of tokens in a Symmetric Multiprocessor (SMP) system requires lock protection, and the implementation of a lock is affected by the instruction of a lock bus. The method adopts the idea of per-CPU (central processing unit) percpu, makes the token number into a percpu variable, and uses the accumulated value of the percpu token number as the basis for judging whether packet loss occurs or not. The CPU of each speed limiting device only updates the number of tokens of the speed limiting device, so that the locking operation of each packet (per pkt) is avoided, the performance of the speed limiting device is greatly improved, and the speed limiting precision is improved.
Optionally, before each speed limiting device reserves a preset proportion of traffic for each bandwidth packet, the method further includes: and establishing neighbors of the speed limiting equipment with an upper connection switch and a lower connection switch through an open shortest path first protocol (ospf).
Optionally, the method further comprises: the upper connection exchanger and/or the lower connection exchanger detect whether speed limiting equipment with faults exists in the speed limiting equipment;
when the upper connection exchanger and/or the lower connection exchanger detect that the speed limiting equipment with faults exists in the speed limiting equipment, the flow of each bandwidth packet on the speed limiting equipment with the faults is uniformly switched to the speed limiting equipment without the faults.
It should be noted that how to switch the flow of the speed limiting device with the fault to the speed limiting device without the fault belongs to the conventional technical means known by those skilled in the art, and the description is not repeated herein and is not used to limit the present application. Optionally, when the uplink switch and/or the downlink switch detects that all the speed-limiting devices in the speed-limiting devices are faulty, the method further includes: and the uplink switch and/or the downlink switch limits the speed of each bandwidth packet. As shown in fig. 2, a cluster is composed of two upper switches (switch 1 and switch 2, respectively) and two lower switches (switch 3 and switch 4, respectively) and four speed limiting devices (speed limiting device 1, speed limiting device 2, speed limiting device 3, and speed limiting device 4, respectively), and when the speed limiting device 1 goes wrong (goes down), the upper switches and/or the lower switches switch the flow of the speed limiting device 1 to the speed limiting device 2 and/or the speed limiting device 3 and/or the speed limiting device 4. When all the speed limiting equipment 1, the speed limiting equipment 2, the speed limiting equipment 3 and the speed limiting equipment 4 are in failure (crash), the flow on the speed limiting equipment 1, the speed limiting equipment 2, the speed limiting equipment 3 and the speed limiting equipment 4 is switched to a standby line of a dotted line, and the switch 1 and/or the switch 2 and/or the switch 3 and/or the switch 4 limits the speed of each bandwidth packet.
Optionally, the speed limit control node comprises a main speed limit control node and a standby speed limit control node;
and when the main speed-limiting control node is down, the standby speed-limiting control node takes over the work of the main speed-limiting control node. And the heartbeat detection is carried out between the main speed-limiting control node and the standby speed-limiting control node at intervals of preset duration.
As shown in fig. 3, when the main speed-limiting control node fails, the main speed-limiting control node interacts with each speed-limiting device to allocate dynamic bandwidth; and when the main speed-limiting control node fails, the standby speed-limiting control node takes over the work of the main speed-limiting control node, namely, the standby speed-limiting control node interacts with each speed-limiting device at the moment to distribute dynamic bandwidth. When the main speed-limiting control node fails, the main speed-limiting control node and the speed-limiting device periodically perform three times of interaction (communication), and the three times of interaction (communication) sequentially comprise:
step 1: and the main speed limit control node requests the flow of each bandwidth packet in the current period from each speed limit device.
Step 2: and each speed limiting device returns the flow of each bandwidth packet in the current period.
And step 3: and the main speed-limiting control node calculates the flow proportion of the flow of the bandwidth packet on each speed-limiting device in the total flow of the bandwidth packet and sends the flow proportion to the display device, and each speed-limiting device calculates the token number of the token bucket in the next period of the bandwidth packet according to the flow proportion of the received bandwidth packet.
In the embodiment, the flow proportion of the bandwidth packet on each speed limiting device in the next period is respectively determined by the speed limiting control node according to the obtained flow of the bandwidth packet, and the number of tokens in the token bucket of the bandwidth packet in the next period is determined by each speed limiting device according to the flow proportion of the received bandwidth packet in the next period, so that the dynamic allocation of the flow on the speed limiting devices is realized; the difference value between the token number of the token bucket in the current period and the size of the received data packet corresponding to a certain bandwidth packet is used as the residual token number of the token bucket of the bandwidth packet in the current period, so that the locking operation of each packet is avoided, and the performance of the speed limiting equipment is greatly improved, so that the speed limiting precision and efficiency are improved, and the user experience is improved.
Fig. 4 is a schematic structural diagram of a speed limit control node according to the present invention, as shown in fig. 4, including: the device comprises a first receiving module, a first determining module and a first sending module. Wherein the content of the first and second substances,
and the first receiving module is used for acquiring the flow of the bandwidth packet.
The traffic of the same bandwidth packet can come from one rate-limiting device or a plurality of rate-limiting devices.
And the first determining module is used for respectively determining the flow proportion of the bandwidth packet on each speed limiting device in the next period according to the obtained flow of the bandwidth packet.
The first determining module is specifically configured to:
calculating the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet on each speed limiting device in the current period to the sum of the flows of the bandwidth packets in the current period;
and taking each ratio as the flow proportion of the bandwidth packet on the speed limiting device corresponding to the ratio in the next period.
Optionally, the first sending module is further configured to send a request for acquiring a traffic of the bandwidth packet in a current period to each speed limiting device; accordingly, the number of the first and second electrodes,
the first receiving module is specifically configured to receive traffic of the bandwidth packet in the current period, which is counted by each speed limiting device.
Optionally, the speed limit control node is connected with one or more speed limit devices.
Optionally, the speed limit control node includes a main speed limit control node and a standby speed limit control node. When the main speed limit control node is not in fault, the main speed limit control node interacts with each speed limit device to distribute dynamic bandwidth; and when the main speed-limiting control node fails, the standby speed-limiting control node takes over the work of the main speed-limiting control node, namely, the standby speed-limiting control node interacts with each speed-limiting device at the moment to distribute dynamic bandwidth.
Fig. 5 is a schematic structural view of the speed limiting device of the present invention, as shown in fig. 5, including: the device comprises a second receiving module and a second determining module. Wherein the content of the first and second substances,
and the second receiving module is used for receiving the flow rate proportion of the bandwidth packet on the speed limiting equipment which the speed limiting control node belongs to in the next period.
And the second determining module is used for determining the token number of the token bucket of the bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period.
The second determining module is specifically configured to:
acquiring the total bandwidth of a bandwidth packet and calculating a time difference value between a first time of receiving the flow proportion in the next period of the bandwidth packet and a second time of receiving the flow proportion in the current period;
and determining the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the calculated time difference value and the received flow proportion of the bandwidth packet in the current period.
At this time, the second determining module determines the token number of the token bucket of the bandwidth packet in the next period according to formula (1):
Tokeni=bwi×intervali×ratioi(1)
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiIs the total bandwidth, interval, of the bandwidth packet with index iiIs the time difference, ratio, between a first instant and a second instant of a bandwidth packet, denoted iiIs the traffic proportion of the bandwidth packet labeled i in the current period. Wherein, the formula (1) represents the number of bytes (or flow) that the bandwidth packet with the index i is allowed to pass through on the speed limiting device in the next period.
Alternatively, the first and second electrodes may be,
a second determining module, specifically configured to:
acquiring the total bandwidth of the bandwidth packet and taking the time length of a preset period as the time difference value of the bandwidth packet;
and determining the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the time difference value of the bandwidth packet and the received flow proportion of the bandwidth packet in the current period.
At this time, the second determining module determines the token number of the token bucket of the bandwidth packet in the next period according to formula (2):
Tokeni=bwi×interval×ratioi(2)
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiIs the total bandwidth of the bandwidth packet with index i, interval is the time length of the preset period, ratioiIs the traffic proportion of the bandwidth packet labeled i in the current period. Wherein, the formula (2) represents the number of bytes (or flow) that the bandwidth packet with the index i is allowed to pass through on the speed limiting device in the next period.
Optionally, the speed limiting device further comprises a statistics module and a second sending module; at this time, the process of the present invention,
the second receiving module is also used for informing the statistical module when receiving a request from the speed limit control node; accordingly, the number of the first and second electrodes,
the counting module is used for receiving the notice from the second receiving module and counting the flow of the bandwidth packet on the speed limiting equipment to which the counting module belongs in the current period; accordingly, the number of the first and second electrodes,
and the second sending module is used for sending the counted flow of the bandwidth packet in the current period to the speed limit control node.
Optionally, the speed limiting device further includes a reserved traffic module, configured to reserve a traffic of a preset proportion for each bandwidth packet on the speed limiting device to which the speed limiting device belongs.
It should be noted that, in this document, 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-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (13)

1. A method of limiting speed, comprising:
the speed limit control node acquires the flow of the bandwidth packet;
the speed limit control node respectively determines the flow proportion of the bandwidth packet on each speed limit device in the next period according to the obtained flow of the bandwidth packet;
the speed limit control node sends the determined flow proportion of the bandwidth packet in the next period to the speed limit equipment corresponding to the bandwidth packet;
each speed limiting device determines the token number of a token bucket of a bandwidth packet in the next period according to the flow rate proportion of the received bandwidth packet in the next period, and the method comprises the following steps:
each speed limiting device acquires the total bandwidth of a bandwidth packet and calculates the time difference between the first time of the flow proportion in the next period of receiving the bandwidth packet and the second time of the flow proportion in the current period;
the speed limiting equipment determines the token number of the token bucket of the bandwidth packet in the next period according to the total bandwidth of the obtained bandwidth packet, the calculated time difference and the received flow proportion of the bandwidth packet in the current period;
when the speed limiting device receives the data packet corresponding to the bandwidth packet in the current period, the method further comprises the following steps:
when the size of the received data packet corresponding to the bandwidth packet is smaller than or equal to the number of tokens of the token bucket of the bandwidth packet in the current period, releasing the data packet and taking the difference value of the number of tokens of the token bucket of the bandwidth packet in the current period and the size of the received data packet corresponding to the bandwidth packet as the remaining number of tokens of the token bucket of the bandwidth packet in the current period;
when the size of the received data packet corresponding to the bandwidth packet is larger than the number of tokens of the token bucket of the bandwidth packet in the current period, discarding the data packet;
and the data packet corresponding to the bandwidth packet is a data packet generated by the user accessing the internet of the bandwidth packet.
2. The method of claim 1, wherein the rate-limiting control node periodically obtains the traffic of the bandwidth packets.
3. The method of claim 1, wherein the step of the speed limit control node acquiring the flow of the bandwidth packet comprises the following steps:
the speed limit control node sends a request for acquiring the flow of the bandwidth packet in the current period to each speed limit device;
and each speed limiting device counts the flow of the bandwidth packet per se in the current period according to the received request from the speed limiting control node and sends the counted flow of the bandwidth packet in the current period to the speed limiting control node.
4. The method according to claim 1 or 3, wherein the separately determining the traffic proportion of the bandwidth packet on each speed limiting device in the next period comprises:
the speed limit control node calculates the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet in the current period to the sum of the flow of the bandwidth packet in the current period on each speed limiting device;
and taking each ratio as the flow proportion of the bandwidth packet in the next period on the speed limiting device corresponding to the ratio.
5. The method of claim 4, wherein the rate limiting device determines the number of tokens in the token bucket of the bandwidth packet in the next period according to the following formula:
Tokeni=bwi×intervali×ratioi
wherein Token is the Token number of the Token bucket of the bandwidth packet with index i in the next period, bwiOf bandwidth packets of index iTotal bandwidth, intervaliIs the time difference, ratio, between a first instant and a second instant of a bandwidth packet, denoted iiIs the traffic proportion of the bandwidth packet labeled i in the current period.
6. The method according to any one of claims 1-3 and 5, wherein the speed limit control node comprises a main speed limit control node and a standby speed limit control node;
and when the main speed-limiting control node is down, the standby speed-limiting control node takes over the work of the main speed-limiting control node.
7. A speed limit control node, comprising: the device comprises a first receiving module, a first determining module and a first sending module; wherein the content of the first and second substances,
the first receiving module is used for acquiring the flow of the bandwidth packet;
the first determining module is used for respectively determining the flow proportion of the bandwidth packet on each speed limiting device in the next period according to the obtained flow of the bandwidth packet;
the first sending module is used for sending the determined flow proportion of the bandwidth packet in the next period to the speed limiting equipment corresponding to the bandwidth packet;
when the speed limiting device receives the data packet corresponding to the bandwidth packet in the current period, the method comprises the following steps:
when the size of the received data packet corresponding to the bandwidth packet is smaller than or equal to the number of tokens of the token bucket of the bandwidth packet in the current period, releasing the data packet and taking the difference value of the number of tokens of the token bucket of the bandwidth packet in the current period and the size of the received data packet corresponding to the bandwidth packet as the remaining number of tokens of the token bucket of the bandwidth packet in the current period;
when the size of the received data packet corresponding to the bandwidth packet is larger than the number of tokens of the token bucket of the bandwidth packet in the current period, discarding the data packet;
and the data packet corresponding to the bandwidth packet is a data packet generated by the user accessing the internet of the bandwidth packet.
8. The speed limit control node according to claim 7, wherein the first receiving module is specifically configured to periodically obtain a traffic of a bandwidth packet.
9. The speed limit control node according to claim 7, wherein the first sending module is further configured to send a request for acquiring a traffic of a bandwidth packet in a current period to each of the speed limit devices; accordingly, the number of the first and second electrodes,
the first receiving module is specifically configured to receive traffic of the bandwidth packet of the first receiving module in the current period, where the traffic is counted by each speed limiting device.
10. The speed limit control node according to claim 7 or 9, wherein the first determining module is specifically configured to:
calculating the flow sum of the same bandwidth packet in the current period;
respectively calculating the ratio of the flow of the bandwidth packet on each speed limiting device in the current period to the sum of the flows of the bandwidth packets in the current period;
and taking each ratio as the flow proportion of the bandwidth packet on the speed limiting device corresponding to the ratio in the next period.
11. The speed-limiting control node according to any one of claims 7 to 9, wherein the speed-limiting control node is connected to one or more of the speed-limiting devices.
12. A speed limiting apparatus, characterized by comprising: a second receiving module and a second determining module; wherein the content of the first and second substances,
the second receiving module is used for receiving the flow rate proportion of the bandwidth packet on the speed limiting equipment which the speed limiting control node belongs to in the next period;
the second determining module is configured to determine, according to a traffic ratio of the received bandwidth packet in a next cycle, a token number of a token bucket of the bandwidth packet in the next cycle, and includes:
acquiring the total bandwidth of a bandwidth packet and calculating a time difference value between a first time of receiving the flow proportion in the next period of the bandwidth packet and a second time of receiving the flow proportion in the current period;
determining the token number of the token bucket of the bandwidth packet in the next period according to the obtained total bandwidth of the bandwidth packet, the calculated time difference value and the received flow proportion of the bandwidth packet in the current period;
when the speed limiting device receives the data packet corresponding to the bandwidth packet in the current period, the second determining module is further configured to:
when the size of the received data packet corresponding to the bandwidth packet is smaller than or equal to the number of tokens of the token bucket of the bandwidth packet in the current period, releasing the data packet and taking the difference value of the number of tokens of the token bucket of the bandwidth packet in the current period and the size of the received data packet corresponding to the bandwidth packet as the remaining number of tokens of the token bucket of the bandwidth packet in the current period;
when the size of the received data packet corresponding to the bandwidth packet is larger than the number of tokens of the token bucket of the bandwidth packet in the current period, discarding the data packet;
and the data packet corresponding to the bandwidth packet is a data packet generated by the user accessing the internet of the bandwidth packet.
13. The speed-limiting device of claim 12, wherein the speed-limiting device further comprises a statistics module and a second transmission module; at this time, the process of the present invention,
the second receiving module is further configured to notify the counting module when receiving a request from the speed limit control node; accordingly, the number of the first and second electrodes,
the counting module is used for receiving the notice from the second receiving module and counting the flow of the bandwidth packet on the speed limiting equipment to which the counting module belongs in the current period; accordingly, the number of the first and second electrodes,
and the second sending module is used for sending the counted flow of the bandwidth packet in the current period to the speed limit control node.
CN201610294840.2A 2016-05-05 2016-05-05 Speed limiting method, speed limiting control node and speed limiting equipment Active CN107347198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610294840.2A CN107347198B (en) 2016-05-05 2016-05-05 Speed limiting method, speed limiting control node and speed limiting equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610294840.2A CN107347198B (en) 2016-05-05 2016-05-05 Speed limiting method, speed limiting control node and speed limiting equipment

Publications (2)

Publication Number Publication Date
CN107347198A CN107347198A (en) 2017-11-14
CN107347198B true CN107347198B (en) 2020-06-19

Family

ID=60253969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610294840.2A Active CN107347198B (en) 2016-05-05 2016-05-05 Speed limiting method, speed limiting control node and speed limiting equipment

Country Status (1)

Country Link
CN (1) CN107347198B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259221A (en) * 2017-12-04 2018-07-06 山石网科通信技术有限公司 Flow control methods, device, system, storage medium and processor
CN109962862A (en) * 2017-12-25 2019-07-02 航天信息股份有限公司 Cloud platform, distribution method of dynamic bandwidth and device based on cloud platform
CN108958975B (en) * 2018-06-29 2021-11-09 郑州云海信息技术有限公司 Method, device and equipment for controlling data recovery speed
CN110858808A (en) * 2018-08-23 2020-03-03 阿里巴巴集团控股有限公司 Method, system and device for realizing speed limit
CN109587072A (en) * 2019-01-04 2019-04-05 中企动力科技股份有限公司 Distributed system overall situation speed limiting system and method
CN110380825B (en) * 2019-07-29 2022-05-10 网宿科技股份有限公司 Transmission rate control method and device
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium
CN110753004B (en) * 2019-10-18 2023-02-24 北京浪潮数据技术有限公司 Dynamic current limiting method, system and device for data transmission and readable storage medium
CN111585896B (en) * 2020-03-30 2021-07-09 华为技术有限公司 Data forwarding method and device and readable storage medium
WO2021243649A1 (en) * 2020-06-04 2021-12-09 深圳市欢太科技有限公司 Rate limit bandwidth adjustment method and apparatus
CN111835655B (en) * 2020-07-13 2022-06-28 北京轻网科技有限公司 Method, device and storage medium for limiting speed of shared bandwidth
CN112600720B (en) * 2021-03-08 2021-05-11 北京金山云网络技术有限公司 Method and apparatus for limiting bandwidth group, electronic device, and storage medium
CN114793216B (en) * 2022-06-22 2022-09-23 北京轻网科技有限公司 Token management and information sending method and device, electronic equipment and storage medium
CN116708315B (en) * 2023-07-17 2023-11-03 中移(苏州)软件技术有限公司 Flow rate limiting method and device, electronic equipment and storage medium
CN117478610B (en) * 2023-12-27 2024-03-12 成都新希望金融信息有限公司 Global flow control method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564502A (en) * 2004-04-14 2005-01-12 烽火通信科技股份有限公司 Ascending link bandwidth dynamic distribution method and appts. based on ethernet passive optical network
CN101478527A (en) * 2009-01-20 2009-07-08 华为技术有限公司 Bandwidth allocation method and routing equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7248601B2 (en) * 2001-08-09 2007-07-24 International Business Machines Corporation Method of allocating bandwidth on request to the stations of a local area network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564502A (en) * 2004-04-14 2005-01-12 烽火通信科技股份有限公司 Ascending link bandwidth dynamic distribution method and appts. based on ethernet passive optical network
CN101478527A (en) * 2009-01-20 2009-07-08 华为技术有限公司 Bandwidth allocation method and routing equipment

Also Published As

Publication number Publication date
CN107347198A (en) 2017-11-14

Similar Documents

Publication Publication Date Title
CN107347198B (en) Speed limiting method, speed limiting control node and speed limiting equipment
US8670385B2 (en) Dynamic allocation of network resources for provisioning services to user devices
US11785113B2 (en) Client service transmission method and apparatus
CN116746132A (en) Modifying IP address management of SMF
EP2429123A1 (en) Method, apparatus and device for adjusting resource delegation in network
Borodakiy et al. Modelling and analysing a dynamic resource allocation scheme for M2M traffic in LTE networks
EP3522463A1 (en) Method and software-defined networking (sdn) controller for providing multicast service
KR20170033179A (en) Method and apparatus for managing bandwidth of virtual networks on SDN
WO2014180210A1 (en) Method for controlling network congestion and load perception function
CN115714749A (en) End-to-end data determination method, device and system and electronic equipment
US9900804B2 (en) Method and device for processing to share network resources, and method, device and system for sharing network resources
CN114902777A (en) Scheduling in cloud radio access networks
CN115314442A (en) Congestion control and Group-based speed limit window device and method and speed limit window method
JP2016046669A (en) Packet processing device, program and method
CN112600712B (en) Service quality scheduling method and device
US11575601B2 (en) Network device and packet processing method using same
JP2014192856A (en) Management system and management method
US9602395B2 (en) Apparatus and method for switching communication channels having redundant configuration
Radzi et al. Recent dynamic bandwidth allocation algorithm methods in Ethernet passive optical network
CN112040513A (en) Data transmission method, data transmission device and data transmission system
KR102288487B1 (en) Traffic explosion resolving apparatus and method for sdn-based passive optical networks
Misawa et al. Resource management architecture of metro aggregation network for IoT traffic
CN114070776B (en) Improved time-sensitive network data transmission method, device and equipment
EP3177067B1 (en) Network controller, system, and method for resource allocation
JP6211257B2 (en) Communications 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