WO2017161967A1 - 包每秒流量监管方法、装置和计算机存储介质 - Google Patents

包每秒流量监管方法、装置和计算机存储介质 Download PDF

Info

Publication number
WO2017161967A1
WO2017161967A1 PCT/CN2017/072869 CN2017072869W WO2017161967A1 WO 2017161967 A1 WO2017161967 A1 WO 2017161967A1 CN 2017072869 W CN2017072869 W CN 2017072869W WO 2017161967 A1 WO2017161967 A1 WO 2017161967A1
Authority
WO
WIPO (PCT)
Prior art keywords
token
tokens
data packet
target service
current data
Prior art date
Application number
PCT/CN2017/072869
Other languages
English (en)
French (fr)
Inventor
胡学权
Original Assignee
深圳市中兴微电子技术有限公司
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 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2017161967A1 publication Critical patent/WO2017161967A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic

Definitions

  • the present invention relates to a traffic policing technology in the field of communication technologies, and in particular, to a packet per second (pps, packet per second) traffic policing method, apparatus, and computer storage medium.
  • IPTV interactive network television
  • VoIP Voice over Internet Protocol
  • video conferencing video conferencing
  • QoS quality of service
  • CAR Committed Access Rate
  • the total number of bytes allowed to be accessed by the user is limited, for example, the maximum download speed of the limited user is 10 Mbps/s; (2) the total number of data packets allowed to be accessed by the user. It is limited, for example, to limit the number of packets sent by users per second to less than 100.
  • the existing communication network separately sets two sets of traffic policing devices: bit per second (bps, bits per second) traffic policing device, that is, how many bits are allowed per second, bps traffic policing device Corresponding to the above requirement (1); pps traffic policing device, that is, how many data packets are allowed per second, the pps traffic policing device corresponds to the above requirement (2).
  • bit per second (bps, bits per second) traffic policing device that is, how many bits are allowed per second
  • bps traffic policing device Corresponding to the above requirement (1)
  • pps traffic policing device that is, how many data packets are allowed per second
  • the pps traffic policing device corresponds to the above requirement (2).
  • the traffic policing device includes: a token generator 101, a token bucket 102, a token discriminating module 103, and a token update module 104.
  • the token generator 101 is configured to add a token to the token bucket at a predetermined rate. For example, if the network allows the user to send 5 Mbps of data traffic and 32 tokens represent 1 bit, the token generator 101 will be at a rate of 5 M*32 tokens per second, which is smaller than the second.
  • the token is added to the token bucket at a constant speed; the token bucket 102 contains two parameters, one is the remaining token, indicating how many bytes of data packets can be sent, and the other is the token bucket.
  • Depth the token generated by the token generator 101 will be accumulated in the token bucket 102. When the accumulation is greater than the depth of the token bucket, the token will overflow, preventing the token from accumulating in a large amount of time without the packet, and then A large number of data packets have arrived at a time. Since the tokens have accumulated a lot, at this time, all the data packets will be sent out, which will have a huge impact on the network.
  • the tokens cannot be accumulated indefinitely, but when accumulated to a certain value, the order is added. Card is considered as none Token; the token discriminating module 103, when the data packet arrives, determines whether the remaining tokens in the token bucket 102 are sufficient for the data packet to pass, and if the token is sufficient, the data packet passes, otherwise the data packet is discarded; the token update module 104. After the data packet is passed, the token in the token bucket 102 is subtracted from the number of tokens corresponding to the data packet; based on the bps traffic policing device, the total number of bytes (user traffic) for allowing the user to access is implemented. A packet that is limited to a data traffic that is allowed to be sent by the user, which is preset by the traffic policing device, will be discarded.
  • the existing pps traffic policing technology is prone to cause traffic bursts of communication devices, which cannot guarantee the packet loss rate of services and affect the service quality of services.
  • the embodiments of the present invention are directed to providing a packet per second traffic monitoring method, apparatus, and computer storage medium, which are expected to reduce the probability of occurrence of traffic bursts and improve service quality.
  • the embodiment of the invention provides a packet per second traffic monitoring method, including:
  • the embodiment of the invention further provides a packet per second traffic monitoring device, including:
  • Adding a module configured to determine a token addition rate according to the obtained number of tokens to be forwarded for each packet of a preset length and an agreed traffic rate of the target service, and a uniform rate according to the token addition rate Add a token to the card storage module;
  • the response module is configured to: in response to the forwarding request of the current data packet of the target service, determine that the current number of tokens in the token storage module meets a preset condition, and forward the current data packet of the target service, and The number of tokens that need to be consumed to forward the current data packet of the target service is deleted from the token storage module.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the packet per second traffic monitoring method.
  • the set value is used to configure the number of packets allowed to pass, and the number of packets that each packet will be allowed to pass is reduced by one.
  • the number of packets allowed to pass per second is converted into a token addition rate, and tokens are added to the token storage module uniformly according to the token addition rate, and each packet is from the token storage module.
  • FIG. 1 is a schematic diagram of a working principle of a bps traffic monitoring device
  • FIG. 2 is a schematic diagram showing the working principle of another pps flow monitoring device
  • FIG. 3 is a schematic flowchart of a first method for monitoring traffic per second according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a second method for monitoring traffic per second according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a first packet per second traffic monitoring apparatus according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a second packet per second traffic monitoring apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a third packet per second traffic monitoring apparatus according to an embodiment of the present invention.
  • an implementation manner of the pps traffic policing technology is to configure the number of allowed packets to be set at the beginning of each second.
  • the pps traffic policing device 201 decrements the number of packets allowed to pass until the number of allowed packets is zero, that is, the number of packets that have passed in one second is determined to be greater than the set value, thus, The incoming packets of the remaining time of 1 second will be completely discarded by the pps traffic policing device 201; this has the following problems: a) If a large number of data packets come from the start time per second, so that the preceding data packets are passed in a large amount, The traffic of the communication equipment is relatively large; b) the probability of passing the data packet starting every second is far greater than that of the subsequent data packet, and the communication equipment generally expects the same type of data packet, and the packet loss rate is relatively balanced.
  • the traffic policing device can be implemented in various manners, for example, implementing all components of the traffic policing device in a network device such as a network processor or a router (for example, the traffic policing device can be integrated into the foregoing network device) Or, the components in the traffic policing device are implemented in a coupled manner on the network device side described above.
  • This embodiment describes a method for advertised traffic per second packet, which can be applied to the following scenarios: It is desirable to reduce the traffic burst and improve the service quality of the service while implementing the pps traffic policing function. Be explained.
  • the packet per second traffic monitoring method described in this embodiment includes the following steps:
  • Step 301 Determine a token addition rate according to the obtained number of tokens consumed for forwarding a data packet of a preset length and an agreed traffic rate of the target service.
  • the traffic policing device pre-acquires the number of tokens that need to be consumed for forwarding a data packet of a preset length; the preset length is a fixed value; optionally, each forwarding is performed.
  • the implementation of the number of tokens to be consumed by the preset length packet may include any of the following methods:
  • the traffic policing device acquires the number of tokens that need to be consumed for each bit of data to be forwarded, and determines a preset length for each forwarding based on the preset length and the number of tokens that need to be consumed for each data that is forwarded by one bit.
  • the number of tokens that the packet needs to consume for example, the traffic policing device calculates the product of the preset length and the number of tokens consumed per data of one bit of forwarding, and determines the product value as a preset for each forwarding.
  • the number of tokens that need to be consumed by the length of the data packet for example, suppose that the number of tokens consumed per data for forwarding one bit is 32, and the preset length of the data packet is 64 bits, each time a predetermined length is forwarded
  • the number of tokens that a packet needs to consume is 2048 (that is, 32*64).
  • Mode 2 configured in advance in the traffic policing device, required to forward a predetermined length of data packets The number of tokens to consume.
  • the traffic policing device calculates a product of the number of tokens consumed per forwarded packet of a preset length and the agreed traffic rate of the target service based on the number of tokens required to retrieve each packet of a predetermined length.
  • the product value is determined as the token addition rate; for example, if the number of tokens required to forward a predetermined length of data packet is 2048, and the agreed traffic rate (pps regulatory requirement) of the target service is 100 pps, the token
  • the rate of the addition is equal to 204800 (that is, 2048*100), and the unit of the token addition rate may be the token per second.
  • the agreed traffic rate of the target service may be the committed information rate (CIR, Committed Information Rate) of the target service or exceed the information rate ( EIR, Excess Information Rate, etc.; the agreed traffic rate of the target service can be configured in advance in the traffic policing device.
  • CIR Committed Information Rate
  • EIR Excess Information Rate
  • Step 302 Add a token to the token storage module according to the token addition rate.
  • the traffic policing device puts 204,800 tokens into the token storage module every second; it should be noted that the traffic policing device needs to go every second.
  • the number of tokens added in the token storage module is not added in one time. Instead, the tokens are added to the token storage module in a time-division manner. For example, the traffic policing device goes to the token storage module each time. The number of added tokens is 102,400.
  • the token storage module can be a token bucket.
  • the token added by the traffic policing device to the token storage module is accumulated in the token storage module, that is, the number of remaining tokens in the token storage module, when the traffic policing device determines that the number of remaining tokens in the token storage module exceeds When the depth of the token storage module is exceeded, the token overflows.
  • the traffic policing device treats the exceeded token as an invalid token, preventing the occurrence of the token, that is, the token is accumulated in a large amount of time when no packet needs to be forwarded, and then At the moment of receiving, a large number of data packets need to be forwarded. At this time, since the token has accumulated a lot, at this time, all the data packets are sent out, and the data will be set.
  • the tokens in the token storage module cannot be accumulated indefinitely, but when accumulated to a certain value (for example, the depth of the token storage module), the token that continues to be added is regarded as an invalid token.
  • Step 303 Respond to the forwarding request of the current data packet of the target service, and determine that the remaining number of tokens in the token storage module meets the preset condition, and forward the current data packet of the target service.
  • the traffic policing device receives the forwarding request of the current data packet of the target service, or the traffic policing device determines the token storage module according to the current data packet of the current data packet of the target service for the current data packet of the home target service that reaches the specified device port. If the number of remaining tokens in the token meets the preset condition, if the current packet of the target service is forwarded, if the number of remaining tokens in the token storage module does not satisfy the preset condition, the current traffic rate of the target service exceeds The agreed traffic rate (pps supervision requirement) of the target service.
  • the traffic policing device considers the current data packet of the target service as an overrun, and discards or caches the current data packet of the target service; here, the traffic policing device can The limited data packet is buffered, and the data packet buffered by the overrun is forwarded when the number of remaining tokens in the token storage module is determined to meet the preset condition; the traffic policing device may also pre-borrow the order from the token storage module.
  • the card forwards the overrun packet;
  • the feature information of the packet may include the length of the packet, the QoS class , Data such as information home service; alternatively, the length of the current packet data service may be equal to a target preset length; alternatively, the length of each of the target traffic packet are equal to a preset length.
  • Step 304 Delete, from the token storage module, the number of tokens that need to be consumed to forward the current data packet of the target service.
  • the traffic policing device converts the number of data packets allowed to pass per second into a token addition rate, and adds a token to the token storage module in a time-average manner according to the token addition rate, and each data packet is ordered from the token.
  • the token used in the card storage module to delete the forwarded data packet Because the token is added to the token storage module based on the token addition rate in a time-based manner, it can avoid the traffic burst at the start time per second and ensure the packet loss ratio of the same type of data packet. Balance, so, can reduce business traffic bursts and improve business service quality.
  • the embodiment is based on the first embodiment.
  • the preset condition in the embodiment includes: whether the number of remaining tokens in the token storage module is greater than the number of tokens to be consumed by the current data packet of the forwarding destination service.
  • the packet per second traffic monitoring method described in this embodiment includes the following steps:
  • Step 401 The traffic policing device determines the token adding rate according to the obtained number of tokens consumed for forwarding a preset length of data packet and the agreed traffic rate of the target service.
  • Step 402 Add a token to the token storage module according to the token addition rate.
  • Step 403 When receiving the current data packet of the target service, determine the current data of the forwarding target service based on the number of tokens that need to be consumed for each data packet that is forwarded by a preset length, and the length of the current data packet of the target service. The number of tokens that the package needs to consume.
  • the traffic policing device when receiving the current data packet of the target service, the traffic policing device first determines the length of the current data packet according to the feature information of the current data packet of the target service.
  • Step 404 Determine whether the number of remaining tokens in the token storage module is greater than the number of tokens needed to forward the current data packet of the target service. If yes, go to step 406; otherwise, go to step 405.
  • Step 405 Discard or cache the current data packet of the target service; then, the process ends.
  • Step 406 Forward the current data packet of the target service.
  • Step 407 Delete, from the token storage module, the number of tokens that need to be consumed to forward the current data packet of the target service.
  • the present embodiment describes a packet-per-second traffic policing device, which proposes a solution for the following scenarios: the existing traffic policing technologies respectively set two sets of traffic policing devices to implement traffic policing requirements. It takes up more logic resources and increases the design complexity of the chip in traffic supervision.
  • the packet-per-second traffic policing device described in this embodiment is actually used to multiplex and improve the existing bps traffic policing device.
  • the improved bps traffic policing device can be used to implement the technical solution in the foregoing embodiment. The processing of this case will be explained.
  • an optional structural diagram of a packet per second traffic monitoring device includes: a token generator 501, a token bucket 502, a token discriminating module 503, and an The card update module 504; it should be noted that the packet per second traffic monitoring device can implement bps traffic through the cooperation and cooperation of the token generator 501, the token bucket 502, the token discriminating module 503, and the token update module 504.
  • the functions of the modules are enhanced, specifically ,
  • the rate at which the token generator 501 adds a token to the token bucket 502 is associated with the number of data packets. It is assumed that the number of tokens consumed for forwarding a predetermined length of data packet is 10000, pps The regulatory requirement (e.g., the agreed traffic rate of the target service) is 100 pps, and the token generator 501 needs to add a token to the token bucket 502 at a constant rate of 100*10000 tokens per second.
  • a token bucket 502 for storing a token added by the token generator 501; the token bucket 502 has at least two parameters: a remaining token number, a bucket depth (a depth of the token bucket), wherein the remaining The number of tokens is used to evaluate (calculate) how many packets the scheduler can send; if the bucket is deep, if the number of tokens remaining in the token bucket is greater than the bucket depth, the token is discarded, where the bucket is deep, indicating that burst data is allowed. The number of packets, assuming that a burst of up to 50 packets is allowed, the token bucket depth is set to 50*10000.
  • the token discriminating module 503 is configured to determine, when the data packet arrives, whether the number of remaining tokens in the token bucket 502 is greater than or equal to the number of tokens (10000) consumed to forward a data packet, if the remaining tokens If the number is greater than or equal to 10000, the packet is forwarded, otherwise the packet is discarded.
  • the token update module 504 is configured to: after the data packet passes, subtract the token corresponding to the data packet from the token in the token bucket 502, indicating that a data packet has been forwarded, for example, the token bucket.
  • the number of tokens in 502 is reduced by 10,000.
  • the invention adopts the following technical solutions: the first step: using the leaky bucket (token bucket) for bps supervision; the second step: if the leaky bucket needs to be used for pps supervision, each packet passes through the leaky bucket and is fixed. The length is judged and deducted.
  • this embodiment avoids designing a pps supervision module separately, and only needs to improve the existing bps traffic policing device, so that the improved bps traffic policing module can support both the bps traffic policing requirement and the pps traffic.
  • the regulatory requirements enable efficient reuse of the bps traffic policing module, reducing the module design area and complexity, saving logic resources for traffic policing, and reducing the design complexity of the chip in traffic policing.
  • implementing pps The traffic policing function can reduce traffic bursts and improve service quality.
  • the present embodiment is directed to the foregoing traffic policing device.
  • the traffic policing device may be used to perform the traffic policing method according to the embodiment of the present invention.
  • the traffic policing device may be specifically configured for implementing the embodiment of the present invention.
  • the device may also be built in the network device, and the network device may include a network processor and a router. Referring to FIG. 6, the traffic policing device described in this embodiment includes:
  • the adding module 601 is configured to determine a token adding rate according to the obtained number of tokens to be used for forwarding a predetermined length of data packets and an agreed traffic rate of the target service, and Adding a token to the token storage module at a uniform rate;
  • the response module 602 is configured to: in response to the forwarding request of the current data packet of the target service, determine that the remaining number of tokens in the token storage module meets the preset condition, forward the current data packet of the target service, and the slave token storage module The number of tokens that need to be consumed to delete the current packet of the forwarding destination service.
  • the traffic policing device converts the number of data packets allowed to pass per second into a token addition rate, and adds a token to the token storage module in a time-average manner according to the token addition rate, and each data packet is ordered from the token.
  • the number of tokens that need to be consumed in the card storage module to delete the forwarding packet. Since the token is added to the token storage module in a time-uniform manner based on the token addition rate, the traffic at the start time per second can be avoided. To ensure that the packet loss rate of the same type of data packets is relatively balanced, thus reducing traffic bursts and improving service quality.
  • the response module 602 is configured to forward the current data packet of the target service when the number of remaining tokens in the token storage module is greater than or equal to the number of tokens consumed by the current data packet of the forwarding target service.
  • the response module 602 is further configured to: when the number of remaining tokens in the token storage module is less than the number of tokens consumed by the current data packet of the forwarding destination service, discard or cache the current data packet of the target service.
  • the response module 602 is further configured to determine that the excess token is invalid when the number of remaining tokens in the token storage module exceeds the depth of the token storage module.
  • the response module 602 is further configured to: determine, according to the obtained number of tokens to be used for forwarding a data packet of a preset length, and the length of the current data packet of the target service, determine a current data packet of the forwarding target service. The number of tokens that need to be consumed.
  • the traffic policing device described in this embodiment also includes the adding module 601 and the response module 602 in FIG. 6, and the functional modules also have the corresponding functions described in the fourth embodiment.
  • the traffic policing device described in this embodiment further includes:
  • the obtaining module 603 is configured to obtain the number of tokens that need to be consumed for each bit of data to be forwarded, and determine a preset length for each preset based on the preset length and the number of tokens to be retrieved for each bit of data to be forwarded. The number of tokens that the packet needs to consume.
  • the foregoing adding module 601, the response module 602, and the obtaining module 603 may all be programmable by a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field device located in a network device.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA Gate array
  • the embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the packet per second traffic monitoring method provided by any one of the foregoing embodiments.
  • the method as shown in Figures 3 and/or 4 can be used.
  • the computer storage medium may be a non-transitory storage medium; the embodiment describes a computer readable medium, which may be a ROM (eg, a read only memory, a FLASH memory, a transfer device, etc.), a magnetic storage medium (eg, a magnetic tape, Disk drive, etc.), optical storage media (eg, CD-ROM, DVD-ROM, paper card, paper tape, etc.) and other well-known types of program memory; computer-readable media stores computer-executable instructions when executing instructions Causing at least one processor to perform the following operations:
  • the method before determining the token addition rate according to the obtained number of tokens to be forwarded for each preset length of the data packet and the agreed traffic rate of the target service, the method further includes:
  • the number of tokens to be consumed per forwarded packet of a predetermined length is determined based on the preset length and the number of tokens required to retrieve each bit of data.
  • forwarding the current data packet of the target service including:
  • the current data packet of the target service is forwarded when it is determined that the number of remaining tokens in the token storage module is greater than or equal to the number of tokens consumed by the current data packet of the forwarding destination service.
  • the method further includes: when determining that the number of remaining tokens in the token storage module is less than the number of tokens consumed by the current data packet of the forwarding destination service, discarding or caching the current data packet of the target service.
  • the method further includes: determining that the excess token is invalid when the number of remaining tokens in the token storage module exceeds the depth of the token storage module.
  • the method before deleting the number of tokens that need to be consumed by forwarding the current data packet of the target service from the token storage module, the method further includes: the number of tokens to be consumed per forwarded data packet of a preset length based on the obtained And the length of the current data packet of the target service, and determine the number of tokens that need to be consumed to forward the current data packet of the target service.
  • the traffic policing device converts the number of data packets allowed to pass per second into a token addition rate, and adds a token to the token storage module in a uniform manner according to the token addition rate, one for each
  • the packet removes the number of tokens that need to be consumed to forward the packet from the token storage module. Since the token is added to the token storage module in a time-uniform manner based on the token addition rate, it can be avoided in every second.
  • the traffic burst at the start time ensures that the packet loss rate of the same type of data packet is relatively balanced, thus reducing service traffic bursts and improving service quality.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种包每秒流量监管方法及装置;方法包括:根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据所述令牌添加速率匀速的向令牌存储模块中添加令牌;响应于所述目标业务的当前数据包的转发请求,确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,及从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数。实施本发明,能降低业务流量突发,提高业务服务质量。

Description

包每秒流量监管方法、装置和计算机存储介质 技术领域
本发明涉及通信技术领域的流量监管技术,尤其涉及一种包每秒(pps,package per second)流量监管方法、装置和计算机存储介质。
背景技术
随着网络应用的不断发展,新型业务的不断推出,例如交互式网络电视(IPTV)、网络电话(VoIP,Voice over Internet Protocol)、视频会议等非传统数据通信业务,对网络的服务质量(QoS,Quality of Service)提出了更高的时延、丢包率和抖动控制要求;随着通信网络的用户越来越多,对于网络资源的竞争也越来越激烈,为满足用户对于不同应用的差异化QoS的需求,通常采用流量监管技术控制用户业务的流量;流量监管通常使用承诺访问速率(CAR,Committed Access Rate)来限制进入或流出网络的业务连接的流量与突发数据,流量监管至少有如下两个方面的需求:(1)对允许用户访问的总字节数进行限定,例如,限定用户的最大下载速度为10Mbps/s;(2)对允许用户访问的总的数据包个数进行限定,比如限定用户每秒发送的数据包在100个以内。
为了实现流量监管的上述两种不同需求,现有通信网络分别设置两套流量监管装置:比特每秒(bps,bits per second)流量监管装置,即每秒允许通过多少个比特,bps流量监管装置对应于上述的需求(1);pps流量监管装置,即每秒允许通过多少个数据包,pps流量监管装置对应于上述的需求(2)。
参见图1示出的bps流量监管装置的工作原理示意图,图1示出的bps 流量监管装置包括:令牌发生器101、令牌桶102、令牌判别模块103及令牌更新模块104;其中,令牌发生器101用于按照预定的速率向令牌桶里面添加令牌,举个例子来说,假设网络允许用户发送的数据流量为5Mbps,且32个令牌代表1bit,则令牌发生器101就以每秒种5M*32个令牌的速度,在比秒更小的时间单元里,匀速的向令牌桶添加令牌;令牌桶102,里面包含2个参数,一个是剩余令牌,指示还可以发送多少字节的数据包,另一个是令牌桶的深度,令牌发生器101产生的令牌会在令牌桶102中累计,当累计大于令牌桶的深度时,令牌会溢出,防止在没有数据包的时间里令牌大量累积,然后下一时刻来了大量的数据包,由于令牌已经积累很多,这时候将数据包全部发出去,将对网络进行巨大冲击,所以令牌不能无限累积,而是累积到一定值时,添加的令牌被视为无效令牌;令牌判别模块103,当数据包到达时,判断令牌桶102里的剩余令牌是否足够数据包通过,如果令牌足够,则数据包通过,否则数据包丢弃;令牌更新模块104,当数据包通过后,要将令牌桶102里的令牌减去与数据包对应的令牌数;基于该bps流量监管装置,实现对允许用户访问的总字节数(用户流量)进行限定,大于流量监管装置预设的允许用户发送的数据流量的数据包,将会被丢弃。
现有的pps流量监管技术,容易造成通讯设备的流量突发,无法保证业务的丢包率,影响业务服务质量。
发明内容
有鉴于此,本发明实施例期望提供一种包每秒流量监管方法、装置和计算机存储介质,期望能降低业务流量突发的出现概率,提高业务服务质量。
本发明实施例的技术方案是这样实现的:
本发明实施例提供一种包每秒流量监管方法,包括:
根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据所述令牌添加速率匀速的向令牌存储模块中添加令牌;
响应于所述目标业务的当前数据包的转发请求,确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,及从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数。
本发明实施例还提供一种包每秒流量监管装置,包括:
添加模块,配置为根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据所述令牌添加速率匀速的向令牌存储模块中添加令牌;
响应模块,配置为响应于所述目标业务的当前数据包的转发请求,确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,及从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述包每秒流量监管方法。
与现有的pps流量监管技术在每秒开始的时候使用设定值配置这一秒允许通过的数据包数,每来一个数据包将允许通过的数据包个数减1相比,本发明实施例中,将每秒允许通过的数据包数转化成令牌添加速率,根据令牌添加速率按时间均匀的向令牌存储模块中添加令牌,每来一个数据包就从令牌存储模块中删除转发数据包所需要消耗的令牌数,由于令牌是基于令牌添加速率按时间均匀的向令牌存储模块中添加的,这样就能够避免在每秒开始时间的流量突发,保证同一种类型的数据包的丢包率比较均衡, 如此,能降低业务流量突发,提高业务服务质量。
附图说明
图1为一种bps流量监管装置的工作原理示意图;
图2为另一种pps流量监管装置的工作原理示意图;
图3为本发明实施例提供的第一种包每秒流量监管方法的流程示意图;
图4为本发明实施例提供的第二种包每秒流量监管方法的流程示意图;
图5为本发明实施例提供的第一种包每秒流量监管装置的结构示意图;
图6为本发明实施例提供的第二种包每秒流量监管装置的结构示意图;
图7为本发明实施例提供的第三种包每秒流量监管装置的结构示意图。
具体实施方式
下面将结合附图及实施例,对本发明的技术方案进行清楚、完整地描述,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。
参见图2示出的pps流量监管装置的工作原理示意图,研究发现pps流量监管技术的一种实现方式是在每秒钟开始的时候,将允许通过的数据包数目配置为设定值,每来一个数据包,pps流量监管装置201将允许通过的数据包数目减1,直到允许通过的数据包数目为0,即判定1秒钟内已经通过的数据包个数大于设定值,如此,在这1秒的剩余时间内到来的数据包,将被pps流量监管装置201全部丢弃;这就存在如下问题:a)如果每秒的开始时间来了大量数据包,这样前面的数据包大量通过,造成通讯设备的流量比较大;b)每秒钟开始的数据包,能通过的概率远远大于后面来的数据包,而通讯设备,一般希望同一种类型的数据包,丢包率比较均衡。
下面首先对实施本发明实施例的装置(在以下各具体实施例中即为流 量监管装置)进行说明,流量监管装置可以采用各种方式来实施,例如在网络处理器、路由器等网络设备中实施流量监管装置的全部组件(比如,流量监管装置可以集成于上述的网络设备中),或者,在上述的网络设备侧以耦合的方式实施流量监管装置中的组件。
基于上述记载的流量监管装置,提出以下各具体实施例。
实施例一
本实施例记载一种包每秒流量监管方法,可以应用于如下场景中:希望在实现pps流量监管功能的同时,能降低业务流量突发,提高业务服务质量;本实施例针对此情况的处理进行说明。
参见图3,本实施例记载的包每秒流量监管方法包括以下步骤:
步骤301、根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率。
在本实施例中,流量监管装置在执行步骤301之前,预先获取每转发一个预设长度的数据包所需要消耗的令牌数;预设长度是一个固定值;可选的,获取每转发一个预设长度的数据包所需要消耗的令牌数的实现方式可以包括以下任意一种方式:
方式1、流量监管装置获取每转发一个比特的数据所需要消耗的令牌数,基于预设长度及获取的每转发一个比特的数据所需要消耗的令牌数,确定每转发一个预设长度的数据包所需要消耗的令牌数;举个例子来说,流量监管装置计算预设长度与每转发一个比特的数据所需要消耗的令牌数的乘积,将乘积值确定为每转发一个预设长度的数据包所需要消耗的令牌数;例如,假设每转发一个比特的数据所需要消耗的令牌数为32个,数据包的预设长度为64比特,则每转发一个预设长度的数据包所需要消耗的令牌数为2048个(即32*64)。
方式2、预先在流量监管装置中配置每转发一个预设长度的数据包所需 要消耗的令牌数。
流量监管装置基于获取到每转发一个预设长度的数据包所需要消耗的令牌数,计算每转发一个预设长度的数据包所需要消耗的令牌数与目标业务的约定流量速率的乘积,将乘积值确定为令牌添加速率;例如,假设每转发一个预设长度的数据包所需要消耗的令牌数为2048个,目标业务的约定流量速率(pps监管需求)为100pps,则令牌添加速率等于204800(即2048*100),令牌添加速率的单位可以为令牌每秒;目标业务的约定流量速率可以为目标业务的承诺信息速率(CIR,Committed Information Rate)或者超出信息速率(EIR,Excess Information Rate)等;目标业务的约定流量速率可以预先在流量监管装置中配置。
步骤302、根据令牌添加速率匀速的向令牌存储模块中添加令牌。
例如,假设令牌添加速率等于204800(令牌每秒),则流量监管装置每秒钟将204800个令牌放入到令牌存储模块中;需要注意的是,流量监管装置每秒钟需要往令牌存储模块里添加的令牌数并不是一次性加完的,而是按时间分次的、匀速的向令牌存储模块中添加令牌,例如流量监管装置每次往令牌存储模块里添加的令牌数为102400个,则流量监管装置每秒钟需要往令牌存储模块里添加两次令牌,及流量监管装置往令牌存储模块里添加令牌的时间间隔是0.5s(102400/204800=0.5);可选的,令牌存储模块可以为令牌桶。
流量监管装置往令牌存储模块里添加的令牌会在令牌存储模块里累积,即令牌存储模块中的剩余令牌数,当流量监管装置确定令牌存储模块中的剩余令牌数超出令牌存储模块的深度时,令牌会溢出,流量监管装置将超出的令牌视为无效令牌,防止如下情况的发生,即在没有数据包需要转发的时间里令牌大量累积,然后接下来的时刻接收到大量的数据包需要转发,此时由于令牌已经积累很多,这时候将数据包全部发出去,将对设 备及网络造成巨大冲击,因此,令牌存储模块中的令牌不能无限累积,而是累积到一定值(例如令牌存储模块的深度)时,继续添加的令牌被视为无效令牌。
步骤303、响应于目标业务的当前数据包的转发请求,确定令牌存储模块中的剩余令牌数满足预置条件时,将目标业务的当前数据包转发。
流量监管装置接收到目标业务的当前数据包的转发请求时,或流量监管装置针对到达指定设备端口的归属目标业务的当前数据包,根据目标业务的当前数据包的特征信息,判断令牌存储模块中的剩余令牌数是否满足预置条件,若是则将目标业务的当前数据包转发,若判定令牌存储模块中的剩余令牌数不满足预置条件,则说明目标业务的当前流量速率超过了目标业务的约定流量速率(pps监管需求),此时,流量监管装置将目标业务的当前数据包视为超限,将目标业务的当前数据包丢弃或者缓存;这里,流量监管装置可以将超限的数据包进行缓存,等到判定令牌存储模块中的剩余令牌数满足预置条件时将该因超限而缓存的数据包转发;流量监管装置还可以从令牌存储模块中预借令牌将该超限的数据包转发;数据包的特征信息可以包括数据包的长度、QoS属性、业务归属信息等数据;可选的,目标业务的当前数据包的长度可以等于预设长度;可选的,目标业务的每一个数据包的长度均等于预设长度。
步骤304、从令牌存储模块中删除转发目标业务的当前数据包所需要消耗的令牌数。
与现有的pps流量监管技术在每秒开始的时候基于设定值配置这一秒允许业务通过的数据包个数,每来一个数据包将允许通过的数据包个数减1相比,本实施例中,流量监管装置将每秒允许通过的数据包数转化成令牌添加速率,根据令牌添加速率按时间均匀的向令牌存储模块中添加令牌,每来一个数据包就从令牌存储模块中删除转发数据包所需要消耗的令牌 数,由于令牌是基于令牌添加速率按时间均匀的向令牌存储模块中添加的,这样就能够避免在每秒开始时间的流量突发,保证同一种类型的数据包的丢包率比较均衡,如此,能降低业务流量突发,提高业务服务质量。
实施例二
本实施例基于实施例一,本实施例中上述预设条件包括:令牌存储模块中的剩余令牌数是否大于转发目标业务的当前数据包所需要消耗的令牌数。
参见图4,本实施例记载的包每秒流量监管方法包括以下步骤:
步骤401、流量监管装置根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率。
步骤402、根据令牌添加速率匀速的向令牌存储模块中添加令牌。
步骤403、接收到目标业务的当前数据包时,基于获取的每转发一个预设长度的数据包所需要消耗的令牌数,及目标业务的当前数据包的长度,确定转发目标业务的当前数据包所需要消耗的令牌数。
可选的,流量监管装置在接收到目标业务的当前数据包时,首先根据目标业务的当前数据包的特征信息确定当前数据包的长度。
步骤404、判断令牌存储模块中的剩余令牌数是否大于转发目标业务的当前数据包所需要消耗的令牌数,若是,则转到步骤406,否则转到步骤405。
步骤405、将目标业务的当前数据包丢弃或者缓存;然后,处理结束。
步骤406、将目标业务的当前数据包转发。
步骤407、从令牌存储模块中删除转发目标业务的当前数据包所需要消耗的令牌数。
本实施例中,基于令牌存储模块中的剩余令牌数与转发目标业务的当前数据包所需要消耗的令牌数的不同关系,对如何实现pps流量监管功能的 过程进行了详细说明。
实施例三
基于上述实施例一、实施例二,本实施例记载一种包每秒流量监管装置,针对如下场景提出解决的技术方案:现有的流量监管技术分别设置两套流量监管装置,实现流量监管需要占用较多的逻辑资源,同时也增加了芯片在流量监管方面的设计复杂性。
本实施例记载的包每秒流量监管装置实际上是对现有bps流量监管装置进行了复用和改进,该改进的bps流量监管装置可以用于实施上述实施例中技术方案;本实施例针对此情况的处理进行说明。
参见图5,本实施例记载的包每秒流量监管装置的一个可选的结构示意图,该包每秒流量监管装置包括:令牌发生器501、令牌桶502、令牌判别模块503和令牌更新模块504;需要说明的是,该包每秒流量监管装置通过令牌发生器501、令牌桶502、令牌判别模块503和令牌更新模块504的相互配合和协作,可以实现bps流量监管需求;在本实施例为了实现pps流量监管功能,对该些模块(令牌发生器501、令牌桶502、令牌判别模块503和令牌更新模块504)的功能进行了增强,具体为,
1)、令牌发生器501向令牌桶502里面添加令牌的速率与数据包个数进行了关联,假设每转发一个预设长度的数据包所需要消耗的令牌数为10000个,pps监管需求(例如目标业务的约定流量速率)为100pps,则令牌发生器501需要按照每秒钟100*10000个令牌的速度,匀速的向令牌桶502添加令牌。
2)、令牌桶502,用于存储令牌发生器501添加的令牌;令牌桶502具有至少如下2个参数:剩余令牌数、桶深(令牌桶的深度),其中,剩余令牌数用于评估(计算)调度器还可以发送多少个数据包;桶深,如果令牌桶的剩余令牌数大于桶深,则令牌丢弃,这里的桶深,代表允许突发数据 包的个数,假设允许最大50个数据包的突发,则令牌桶桶深设置为50*10000。
3)、令牌判别模块503,用于当数据包到达时,判断令牌桶502里的剩余令牌数是否大于等于转发一个数据包所需要消耗的令牌数(10000),如果剩余令牌数大于等于10000,则转发该数据包,否则将该数据包丢弃。
4)、令牌更新模块504,用于当数据包通过后,要将令牌桶502里的令牌减去与数据包对应的令牌数,表示已转发一个数据包,例如将令牌桶502里面的令牌数减去10000。
本发明采用以下技术方案:第一步:利用漏桶(令牌桶)来进行bps监管;第二步:如果漏桶需要用来做pps监管,则每一个包经过漏桶,都是按固定长度进行令牌的判断以及扣除。
与现有技术相比,本实施例避免单独设计一个pps监管模块,只需要对现有bps流量监管装置进行改进,使得改进的bps流量监管模块既可以支持bps流量监管需求,也可以支持pps流量监管需求,实现了对bps流量监管模块的高效复用,减少了模块设计面积和复杂度,能够节约实现流量监管的逻辑资源,降低了芯片在流量监管方面的设计复杂性;同时,在实现pps流量监管功能的同时,能降低业务流量突发,提高业务服务质量。
实施例四
与前述实施例一对应,本实施例针对前述的流量监管装置进行说明,流量监管装置可以用于执行本发明实施例的流量监管方法,流量监管装置可以是为实施本发明实施例而专门设置的设备,也可以内置于网络设备内部,网络设备可以包括网络处理器、路由器,参见图6,本实施例记载的流量监管装置包括:
添加模块601,配置为根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据令 牌添加速率匀速的向令牌存储模块中添加令牌;
响应模块602,配置为响应于目标业务的当前数据包的转发请求,确定令牌存储模块中的剩余令牌数满足预置条件时,将目标业务的当前数据包转发,及从令牌存储模块中删除转发目标业务的当前数据包所需要消耗的令牌数。
与现有的pps流量监管技术在每秒开始的时候基于设定值配置这一秒允许业务通过的数据包个数,每来一个数据包将允许通过的数据包个数减1相比,本实施例中,流量监管装置将每秒允许通过的数据包数转化成令牌添加速率,根据令牌添加速率按时间均匀的向令牌存储模块中添加令牌,每来一个数据包就从令牌存储模块中删除转发数据包所需要消耗的令牌数,由于令牌是基于令牌添加速率按时间均匀的向令牌存储模块中添加的,这样就能够避免在每秒开始时间的流量突发,保证同一种类型的数据包的丢包率比较均衡,如此,能降低业务流量突发,提高业务服务质量。
可选的,响应模块602,配置为确定令牌存储模块中的剩余令牌数大于等于转发目标业务的当前数据包所需要消耗的令牌数时,将目标业务的当前数据包转发。
可选的,响应模块602,还配置为确定令牌存储模块中的剩余令牌数小于转发目标业务的当前数据包所需要消耗的令牌数时,将目标业务的当前数据包丢弃或者缓存。
可选的,响应模块602,还配置为确定令牌存储模块中的剩余令牌数超出令牌存储模块的深度时,将超出的令牌视为无效。
可选的,响应模块602,还配置为:基于获取的每转发一个预设长度的数据包所需要消耗的令牌数,及目标业务的当前数据包的长度,确定转发目标业务的当前数据包所需要消耗的令牌数。
实施例五
本实施例基于实施例四,参见图7,本实施例记载的流量监管装置也包括图6中的添加模块601、响应模块602,并且该些功能模块也具有实施例四所记载的相应作用,在此基础上,本实施例记载的流量监管装置还包括:
获取模块603,配置为获取每转发一个比特的数据所需要消耗的令牌数,基于预设长度及获取的每转发一个比特的数据所需要消耗的令牌数,确定每转发一个预设长度的数据包所需要消耗的令牌数。
在实际应用中,上述添加模块601、响应模块602、获取模块603,均可由位于网络设备的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)等实现。
实施例六
本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述任意一个实施例提供的所述包每秒流量监管方法,具体可如图3和/或图4所示的方法。
所述计算机存储介质可选为非瞬间存储介质;本实施例记载一种计算机可读介质,可以为ROM(例如,只读存储器、FLASH存储器、转移装置等)、磁存储介质(例如,磁带、磁盘驱动器等)、光学存储介质(例如,CD-ROM、DVD-ROM、纸卡、纸带等)以及其他熟知类型的程序存储器;计算机可读介质中存储有计算机可执行指令,当执行指令时,引起至少一个处理器执行包括以下的操作:
根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据令牌添加速率匀速的向令牌存储模块中添加令牌;
响应于目标业务的当前数据包的转发请求,确定令牌存储模块中的剩余令牌数满足预置条件时,将目标业务的当前数据包转发,及从令牌存储模块中删除转发目标业务的当前数据包所需要消耗的令牌数。
可选的,根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率之前,方法还包括:
获取每转发一个比特的数据所需要消耗的令牌数;
基于预设长度及获取的每转发一个比特的数据所需要消耗的令牌数,确定每转发一个预设长度的数据包所需要消耗的令牌数。
可选的,确定令牌存储模块中的剩余令牌数满足预置条件时,将目标业务的当前数据包转发,包括:
确定令牌存储模块中的剩余令牌数大于等于转发目标业务的当前数据包所需要消耗的令牌数时,将目标业务的当前数据包转发。
可选的,方法还包括:确定令牌存储模块中的剩余令牌数小于转发目标业务的当前数据包所需要消耗的令牌数时,将目标业务的当前数据包丢弃或者缓存。
可选的,方法还包括:确定令牌存储模块中的剩余令牌数超出令牌存储模块的深度时,将超出的令牌视为无效。
可选的,从令牌存储模块中删除转发目标业务的当前数据包所需要消耗的令牌数之前,方法还包括:基于获取的每转发一个预设长度的数据包所需要消耗的令牌数,及目标业务的当前数据包的长度,确定转发目标业务的当前数据包所需要消耗的令牌数。
综上,本发明实施例中,流量监管装置将每秒允许通过的数据包数转化成令牌添加速率,根据令牌添加速率按时间均匀的向令牌存储模块中添加令牌,每来一个数据包就从令牌存储模块中删除转发数据包所需要消耗的令牌数,由于令牌是基于令牌添加速率按时间均匀的向令牌存储模块中添加的,这样就能够避免在每秒开始时间的流量突发,保证同一种类型的数据包的丢包率比较均衡,如此,能降低业务流量突发,提高业务服务质量。
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。

Claims (11)

  1. 一种包每秒流量监管方法,所述方法包括:
    根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据所述令牌添加速率匀速的向令牌存储模块中添加令牌;
    响应于所述目标业务的当前数据包的转发请求,确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,及从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数。
  2. 根据权利要求1所述的方法,其中,所述根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率之前,所述方法还包括:
    获取每转发一个比特的数据所需要消耗的令牌数;
    基于所述预设长度及所述获取的每转发一个比特的数据所需要消耗的令牌数,确定每转发一个预设长度的数据包所需要消耗的令牌数。
  3. 根据权利要求1所述的方法,其中,所述确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,包括:
    确定所述令牌存储模块中的剩余令牌数大于等于所述转发所述目标业务的当前数据包所需要消耗的令牌数时,将所述目标业务的当前数据包转发。
  4. 根据权利要求1所述的方法,其中,所述方法还包括:
    确定所述令牌存储模块中的剩余令牌数小于所述转发所述目标业务的当前数据包所需要消耗的令牌数时,将所述目标业务的当前数据包丢弃或者缓存。
  5. 根据权利要求1所述的方法,其中,所述从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数之前,所述方法还包括:
    基于所述获取的每转发一个预设长度的数据包所需要消耗的令牌数,及所述目标业务的当前数据包的长度,确定转发所述目标业务的当前数据包所需要消耗的令牌数。
  6. 一种包每秒流量监管装置,所述装置包括:
    添加模块,配置为根据获取到的每转发一个预设长度的数据包所需要消耗的令牌数及目标业务的约定流量速率确定令牌添加速率,及根据所述令牌添加速率匀速的向令牌存储模块中添加令牌;
    响应模块,配置为响应于所述目标业务的当前数据包的转发请求,确定所述令牌存储模块中的剩余令牌数满足预置条件时,将所述目标业务的当前数据包转发,及从所述令牌存储模块中删除转发所述目标业务的当前数据包所需要消耗的令牌数。
  7. 根据权利要求6所述的装置,其中,所述装置还包括:
    获取模块,配置为获取每转发一个比特的数据所需要消耗的令牌数,基于所述预设长度及所述获取的每转发一个比特的数据所需要消耗的令牌数,确定每转发一个预设长度的数据包所需要消耗的令牌数。
  8. 根据权利要求6所述的装置,其中,所述响应模块,配置为确定所述令牌存储模块中的剩余令牌数大于等于所述转发所述目标业务的当前数据包所需要消耗的令牌数时,将所述目标业务的当前数据包转发。
  9. 根据权利要求6所述的装置,其中,所述响应模块,还配置为确定所述令牌存储模块中的剩余令牌数小于所述转发所述目标业务的当前数据包所需要消耗的令牌数时,将所述目标业务的当前数据包丢弃或者缓存。
  10. 根据权利要求6所述的装置,其中,所述响应模块,还配置为:
    基于所述获取的每转发一个预设长度的数据包所需要消耗的令牌数,及所述目标业务的当前数据包的长度,确定转发所述目标业务的当前数据包所需要消耗的令牌数。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述包每秒流量监管方法。
PCT/CN2017/072869 2016-03-21 2017-02-03 包每秒流量监管方法、装置和计算机存储介质 WO2017161967A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610162369.1A CN107222358A (zh) 2016-03-21 2016-03-21 包每秒流量监管方法及装置
CN201610162369.1 2016-03-21

Publications (1)

Publication Number Publication Date
WO2017161967A1 true WO2017161967A1 (zh) 2017-09-28

Family

ID=59899323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072869 WO2017161967A1 (zh) 2016-03-21 2017-02-03 包每秒流量监管方法、装置和计算机存储介质

Country Status (2)

Country Link
CN (1) CN107222358A (zh)
WO (1) WO2017161967A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111262790A (zh) * 2018-11-30 2020-06-09 深圳市中兴微电子技术有限公司 一种令牌桶实现方法、装置和计算机可读存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838989B (zh) * 2018-08-15 2023-06-27 北京京东尚科信息技术有限公司 一种用于基于令牌进行网络限流的方法和装置
CN110058941A (zh) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 任务调度管理方法、装置、设备及存储介质
CN111800350A (zh) * 2020-07-10 2020-10-20 芯河半导体科技(无锡)有限公司 一种融合的限速整形方法及存储介质
WO2022178872A1 (zh) * 2021-02-26 2022-09-01 华为技术有限公司 流量整形方法及装置
CN114979012B (zh) * 2022-05-31 2024-06-21 郑州浪潮数据技术有限公司 一种网络流量的限流方法、***、装置及计算机存储介质
CN115102908B (zh) * 2022-08-25 2023-03-10 珠海星云智联科技有限公司 基于带宽控制的网络报文生成的方法以及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917646A (zh) * 2010-08-17 2010-12-15 中兴通讯股份有限公司 报文发送方法及装置
WO2010151496A1 (en) * 2009-06-22 2010-12-29 Citrix Systems, Inc. Systems and methods for platform rate limiting
CN102710502A (zh) * 2012-05-12 2012-10-03 杭州迪普科技有限公司 一种基于消耗时间的网络限速方法及装置
CN104243333A (zh) * 2013-06-24 2014-12-24 阿里巴巴集团控股有限公司 一种地址解析协议报文的流量控制方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716248B (zh) * 2013-06-07 2017-03-01 潘晶 一种基于以太网交换芯片的以太网流量生成和分析的方法
CN103428099B (zh) * 2013-08-21 2016-02-24 中国人民解放军国防科学技术大学 一种通用多核网络处理器流量控制的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010151496A1 (en) * 2009-06-22 2010-12-29 Citrix Systems, Inc. Systems and methods for platform rate limiting
CN101917646A (zh) * 2010-08-17 2010-12-15 中兴通讯股份有限公司 报文发送方法及装置
CN102710502A (zh) * 2012-05-12 2012-10-03 杭州迪普科技有限公司 一种基于消耗时间的网络限速方法及装置
CN104243333A (zh) * 2013-06-24 2014-12-24 阿里巴巴集团控股有限公司 一种地址解析协议报文的流量控制方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111262790A (zh) * 2018-11-30 2020-06-09 深圳市中兴微电子技术有限公司 一种令牌桶实现方法、装置和计算机可读存储介质
CN111262790B (zh) * 2018-11-30 2023-03-10 深圳市中兴微电子技术有限公司 一种令牌桶实现方法、装置和计算机可读存储介质

Also Published As

Publication number Publication date
CN107222358A (zh) 2017-09-29

Similar Documents

Publication Publication Date Title
WO2017161967A1 (zh) 包每秒流量监管方法、装置和计算机存储介质
US11316795B2 (en) Network flow control method and network device
US20210119922A1 (en) Network Configuration Method and Device
CN104038442B (zh) 一种带宽分配的方法及路由器
WO2020042624A1 (zh) 传输速率控制方法、装置、发送设备和接收设备
CN111355669B (zh) 控制网络拥塞的方法、装置及***
CN108989235B (zh) 一种报文转发控制方法及装置
US11785113B2 (en) Client service transmission method and apparatus
WO2019157867A1 (zh) 一种分组网络中控制流量的方法及装置
WO2017206763A1 (zh) 一种终端设备及数据处理方法、存储介质
CN112104562B (zh) 拥塞控制方法及装置、通信网络、计算机存储介质
WO2016086551A1 (zh) 一种基于改进的wred的拥塞控制方法和装置
WO2018113436A1 (zh) 一种网络拥塞处理方法及装置
US20130208593A1 (en) Method and apparatus providing flow control using on-off signals in high delay networks
WO2018218957A1 (zh) 一种流量控制方法、设备及***
WO2019192318A1 (zh) 流量平滑方法、服务器及转发设备
CN112995048B (zh) 数据中心网络的阻塞控制与调度融合方法及终端设备
US11777857B2 (en) Service forwarding method and network device
WO2018076641A1 (zh) 一种减少时延的方法、装置及存储介质
JP2024502118A (ja) データ伝送方法、装置、電子機器、及び記憶媒体
US20160277943A1 (en) Network system, control method of network system, communication device, and program
CN111131061B (zh) 一种数据传输方法及网络设备
US20140211649A1 (en) Reducing latency of at least one stream that is associated with at least one bandwidth reservation
JP6460099B2 (ja) パケット伝送装置、パケット伝送システムおよびパケット伝送方法
WO2022068617A1 (zh) 流量整形方法及装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17769244

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17769244

Country of ref document: EP

Kind code of ref document: A1