Movatterモバイル変換


[0]ホーム

URL:


CN107204930A - Token adding method and device - Google Patents

Token adding method and device
Download PDF

Info

Publication number
CN107204930A
CN107204930ACN201610158873.4ACN201610158873ACN107204930ACN 107204930 ACN107204930 ACN 107204930ACN 201610158873 ACN201610158873 ACN 201610158873ACN 107204930 ACN107204930 ACN 107204930A
Authority
CN
China
Prior art keywords
weight
queue
compression
shaping
queues
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610158873.4A
Other languages
Chinese (zh)
Other versions
CN107204930B (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.)
Sanechips Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics 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 Shenzhen ZTE Microelectronics Technology Co LtdfiledCriticalShenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201610158873.4ApriorityCriticalpatent/CN107204930B/en
Priority to PCT/CN2016/110045prioritypatent/WO2017157064A1/en
Publication of CN107204930ApublicationCriticalpatent/CN107204930A/en
Application grantedgrantedCritical
Publication of CN107204930BpublicationCriticalpatent/CN107204930B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of token adding method and device;Method includes:Shaping weight based on each queue corresponding to target port, is compressed to meeting the shaping weight of queue of preparatory condition in individual queue, determines the compression weight of individual queue;Determine to be assigned to the object queue of service opportunity in individual queue, based on the shaping weight of benchmark weight, the compression weight of individual queue and object queue, it is determined that the token number added into the corresponding token bucket of object queue and addition.Implement the present invention, the bursts of traffic of the small queue of weight under the premise of the shaping rate for ensureing queue is accurate, can be reduced, the service quality of business is improved.

Description

Translated fromChinese
令牌添加方法及装置Token adding method and device

技术领域technical field

本发明涉及通信技术领域的拥塞控制技术,尤其涉及一种令牌添加方法及装置。The invention relates to congestion control technology in the field of communication technology, in particular to a token adding method and device.

背景技术Background technique

随着网络应用的不断发展,新型业务的不断推出,例如交互式网络电视(IPTV)、网络电话(VoIP,Voice over Internet Protocol)、视频会议等非传统数据通信业务,对网络的服务质量(QoS,Quality of Service)提出了更高的时延、丢包率和抖动控制要求;为了保证QoS的实现,通常在网络处理器或路由器中设置专门的拥塞管理模块,拥塞管理模块用于控制帧、信元或分组如何离开一个设备。With the continuous development of network applications and the continuous introduction of new services, such as non-traditional data communication services such as interactive network television (IPTV), Internet telephony (VoIP, Voice over Internet Protocol), and video conferencing, the network quality of service (QoS , Quality of Service) put forward higher requirements for delay, packet loss rate and jitter control; in order to ensure the realization of QoS, a special congestion management module is usually set in the network processor or router, and the congestion management module is used to control frames, How cells or packets leave a device.

拥塞管理模块的一个功能是限速,这个功能由整形控制组件完成,整形控制组件控制的对象是队列,队列内存储的是同一类型的数据包;整形控制组件以用户配置的整形速率添加令牌到队列的令牌桶内,令牌桶内有令牌的队列可以调度数据包离开设备,队列调度数据包离开设备时会消耗队列令牌桶内的令牌;现有的整块控制组件一般采用加权分配算法给队列分配服务机会,加权分配算法,例如加权公平队列(WFQ,Weighted Fair Queuing),或者加权循环调度算法(WRR,Weighted Round Robin),每次服务添加一定数目的令牌,令牌数可以转化为带宽,单次服务添加的令牌数等于所有队列的权重之和/基准权重,设备的基准权重对应设备的基准整形值,也就是将用户配置的整形速率转化为一个权重值分配给队列,每个队列根据自身的权重,获得令牌添加的机会,权重大的队列获得令牌添加的机会多,权重小的队列获得令牌添加的机会少。One of the functions of the congestion management module is rate limiting, which is completed by the shaping control component. The object controlled by the shaping control component is a queue, and the same type of data packets are stored in the queue; the shaping control component adds tokens at the shaping rate configured by the user. To the token bucket of the queue, the queue with tokens in the token bucket can schedule data packets to leave the device, and when the queue schedules data packets to leave the device, the tokens in the queue token bucket will be consumed; the existing block control components generally A weighted allocation algorithm is used to assign service opportunities to queues. A weighted allocation algorithm, such as a weighted fair queue (WFQ, Weighted Fair Queuing), or a weighted round-robin scheduling algorithm (WRR, Weighted Round Robin), adds a certain number of tokens to each service, so that The number of cards can be converted into bandwidth. The number of tokens added to a single service is equal to the sum of the weights of all queues/base weight. The base weight of the device corresponds to the base shaping value of the device, that is, the shaping rate configured by the user is converted into a weight value. Assigned to the queues, each queue gets a chance to add tokens according to its own weight. Queues with higher weights have more chances to get tokens added, while queues with lower weights have fewer chances to get tokens added.

然而,系统中权重较大的队列会拉高系统所有队列的权重之和,使得单次服务添加的令牌数也较大,权重小的队列在一段时间内获得的令牌数是固定的,权重小的队列在这段时间内,只能获得很少的服务机会,每次服务获得比较多的令牌,使得权重小的队列突发式的获得令牌,然而,权重小的队列在系统内能占用的缓存是有限的,权重小的队列承受突发的能力比较差,在一段时间内,如果流量突发超过权重小的队列承受突发能力时,就会发生数据包丢弃,如此,会影响业务的服务质量。However, queues with larger weights in the system will increase the sum of the weights of all queues in the system, so that the number of tokens added to a single service is also large, and the number of tokens obtained by queues with small weights is fixed within a period of time. Queues with small weights can only obtain few service opportunities during this period, and each service gets more tokens, so that queues with small weights can obtain tokens in bursts. However, queues with small weights are in the system The cache occupied by the internal energy is limited, and the ability of the queue with a small weight to withstand bursts is relatively poor. In a period of time, if the traffic burst exceeds the burst capacity of the queue with a small weight, data packets will be discarded. In this way, Will affect the service quality of the business.

发明内容Contents of the invention

有鉴于此,本发明实施例期望提供一种令牌添加方法及装置,能在保证队列的整形速率准确的前提下,减少权重小的队列的流量突发,提高业务的服务质量。In view of this, the embodiments of the present invention expect to provide a token adding method and device, which can reduce traffic bursts of queues with small weights and improve service quality of services on the premise of ensuring accurate shaping rates of queues.

为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:

本发明实施例提供一种令牌添加方法,包括:An embodiment of the present invention provides a token adding method, including:

基于对应于目标端口的各个队列的整形权重,对各所述队列中满足预设条件的队列的整形权重进行压缩,确定各所述队列的压缩权重;Compressing the shaping weights of queues satisfying preset conditions in each of the queues based on the shaping weights of each queue corresponding to the target port, and determining the compression weight of each of the queues;

确定各所述队列中分配到服务机会的目标队列,基于基准权重、各所述队列的压缩权重及所述目标队列的整形权重,确定向所述目标队列对应的令牌桶中添加的令牌数并添加。Determine the target queue assigned to the service opportunity in each of the queues, and determine the tokens to be added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each of the queues, and the shaping weight of the target queue Count and add.

本发明实施例还提供一种令牌添加装置,包括:The embodiment of the present invention also provides a token adding device, including:

确定模块,用于基于对应于目标端口的各个队列的整形权重,对各所述队列中满足预设条件的队列的整形权重进行压缩,确定各所述队列的压缩权重;A determining module, configured to compress the shaping weights of queues satisfying preset conditions in each of the queues based on the shaping weights of each queue corresponding to the target port, and determine the compression weight of each of the queues;

所述确定模块,还用于确定各所述队列中分配到服务机会的目标队列,基于基准权重、各所述队列的压缩权重及所述目标队列的整形权重,确定向所述目标队列对应的令牌桶中添加的令牌数;The determination module is further configured to determine the target queue assigned to the service opportunity in each of the queues, and determine the corresponding queue to the target queue based on the reference weight, the compression weight of each of the queues, and the shaping weight of the target queue. The number of tokens added in the token bucket;

分发模块,用于向所述目标队列对应的令牌桶中添加所述确定模块确定的添加的令牌数。A distributing module, configured to add the number of added tokens determined by the determining module to the token bucket corresponding to the target queue.

本发明实施例中,对满足预设条件的队列的整形权重进行压缩,同时保证不满足预设条件的队列的整形权重,根据队列的压缩权重确定需要向目标队列(得到服务的队列)的令牌桶中添加的令牌数,如此,各队列的压缩权重之和小于各队列的整形权重之和,由于不满足预设条件的队列的整形权重未被压缩(整形权重等于压缩权重),因此,本实施例会增加不满足预设条件的队列的服务机会,并降低不满足预设条件的队列在得到服务时需要向对应的令牌桶中添加的令牌数,进而减少不满足预设条件的队列的流量突发,提高业务的服务质量。In the embodiment of the present invention, the shaping weights of the queues that meet the preset conditions are compressed, and the shaping weights of the queues that do not meet the preset conditions are guaranteed at the same time. The number of tokens added to the card barrel, so that the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue, because the shaping weights of the queues that do not meet the preset conditions are not compressed (the shaping weight is equal to the compression weight), so , this embodiment will increase the service opportunities of the queues that do not meet the preset conditions, and reduce the number of tokens that need to be added to the corresponding token bucket when the queues that do not meet the preset conditions are served, thereby reducing the number of tokens that do not meet the preset conditions The traffic burst of the queue can improve the service quality of the business.

附图说明Description of drawings

图1为本发明实施例中令牌添加方法的一个可选的流程示意图;Fig. 1 is an optional schematic flow chart of the token adding method in the embodiment of the present invention;

图2为本发明实施例中令牌添加方法的另一个可选的流程示意图;Fig. 2 is another optional schematic flow chart of the token adding method in the embodiment of the present invention;

图3为本发明实施例中令牌添加方法的又一个可选的流程示意图;Fig. 3 is another optional schematic flow chart of the token adding method in the embodiment of the present invention;

图4为本发明实施例中令牌添加方法的再一个可选的流程示意图;Fig. 4 is another optional schematic flow chart of the token adding method in the embodiment of the present invention;

图5为本发明实施例中令牌添加装置的一个可选的结构示意图;FIG. 5 is an optional structural schematic diagram of a token adding device in an embodiment of the present invention;

图6为本发明实施例中令牌添加装置的另一个可选的结构示意图。Fig. 6 is another optional structural schematic diagram of the token adding device in the embodiment of the present invention.

具体实施方式detailed description

下面将结合附图及实施例,对本发明的技术方案进行清楚、完整地描述。The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and embodiments.

下面首先对实施本发明实施例的装置(在以下各具体实施例中即为令牌添加装置)进行说明,令牌添加装置可以采用各种方式来实施,例如在网络处理器、路由器等网络设备中实施令牌添加装置的全部组件(比如,令牌添加装置可以集成于上述的网络设备中的拥塞管理模块的整形控制组件中),或者,在上述的网络设备侧以耦合的方式实施令牌添加装置中的组件。First, the device implementing the embodiment of the present invention (the token adding device in the following specific embodiments) will be described below. The token adding device can be implemented in various ways, for example, in network devices such as network processors and routers. Implement all the components of the token adding device (for example, the token adding device can be integrated in the shaping control component of the congestion management module in the above-mentioned network device), or implement the token in a coupled manner on the above-mentioned network device side Add the components in the fixture.

基于上述记载的令牌添加装置,提出以下各具体实施例。Based on the token adding device described above, the following specific embodiments are proposed.

实施例一Embodiment one

本实施例记载一种令牌添加方法,可以应用于拥塞管理技术中以解决如下问题:希望能在保证队列的整形速率准确的前提下,减少权重小的队列的流量突发,提高业务的服务质量;本实施例针对此情况的处理进行说明。This embodiment records a token addition method, which can be applied to congestion management technology to solve the following problems: It is hoped that the traffic burst of queues with small weights can be reduced and business services can be improved under the premise of ensuring accurate shaping rates of queues. Quality; this embodiment describes how to deal with this situation.

参见图1,本实施例记载的令牌添加方法包括以下步骤:Referring to Fig. 1, the token addition method recorded in this embodiment includes the following steps:

步骤101、基于对应于目标端口的各个队列的整形权重,对各队列中满足预设条件的队列的整形权重进行压缩,确定各队列的压缩权重。Step 101 , based on the shaping weights of the queues corresponding to the target port, compress the shaping weights of the queues satisfying the preset conditions among the queues, and determine the compression weights of the queues.

在本实施例中,目标端口可以是指上述网络设备的一个或多个数据接口,对于需经数据接口发送的报文,网络设备的调度器基于该报文的特征信息进行分析,将该报文分配至对应于该报文的特征信息的队列中;用户为对应于目标端口的各个队列分别配置整形速率,整形速率可以为承诺信息速率(CIR,Committed Information Rate)或者超出信息速率(EIR,Excess Information Rate);基准整形速率是指网络设备所允许的最大数据速率,基准权重对应于基准整形速率;基于基准整形速率、基准权重及队列的整形速率,可以确定队列在网络设备中的整形权重;可选的,计算队列的整形速率与基准整形速率的比值,再计算该比值与基准权重的乘积,将得到的乘积值作为队列的整形权重。In this embodiment, the target port may refer to one or more data interfaces of the above-mentioned network device. For a message that needs to be sent through the data interface, the scheduler of the network device analyzes the message based on the characteristic information of the message, and the message The text is assigned to the queue corresponding to the characteristic information of the message; the user configures the shaping rate for each queue corresponding to the target port, and the shaping rate can be a committed information rate (CIR, Committed Information Rate) or an exceeded information rate (EIR, Excess Information Rate); the benchmark shaping rate refers to the maximum data rate allowed by the network device, and the benchmark weight corresponds to the benchmark shaping rate; based on the benchmark shaping rate, benchmark weight, and queue shaping rate, the shaping weight of the queue in the network device can be determined ; Optionally, calculate the ratio of the shaping rate of the queue to the base shaping rate, then calculate the product of the ratio and the base weight, and use the obtained product value as the shaping weight of the queue.

本实施例将对应于目标端口的各个队列界定(划分)为至少两类,即整形权重较大的队列、整形权重较小的队列;具体地,本实施例通过预设条件界定一个队列是否属于整形权重较大的队列,将各队列中满足预设条件的队列界定为整形权重较大的队列,及将不满足预设条件的队列界定为整形权重较小的队列;这里,标记对应于目标端口的各个队列至少包括第一队列和第二队列,假设,第一队列由于满足预设条件被界定为属于整形权重较大的队列,第二队列由于不满足预设条件被界定为属于整形权重较小的队列。In this embodiment, each queue corresponding to the target port is defined (divided) into at least two types, namely, a queue with a larger shaping weight and a queue with a smaller shaping weight; specifically, this embodiment defines whether a queue belongs to Queues with larger shaping weights, define the queues that meet the preset conditions in each queue as queues with larger shaping weights, and define the queues that do not meet the preset conditions as queues with smaller shaping weights; here, the mark corresponds to the target Each queue of the port includes at least the first queue and the second queue. It is assumed that the first queue is defined as a queue with a larger shaping weight because it meets the preset conditions, and the second queue is defined as belonging to the shaping weight because it does not meet the preset conditions. Smaller queue.

本实施例针对上述界定的整形权重较大的队列和整形权重较小的队列分别采取不同的处理方法得到各队列的压缩权重:In this embodiment, different processing methods are adopted to obtain the compression weights of each queue for the above-defined queues with larger shaping weights and queues with smaller shaping weights:

1)针对上述界定的整形权重较大的队列,对该队列的整形权重进行压缩,将压缩得到的权重确定为该队列的压缩权重;例如,对第一队列的整形权重进行压缩,将压缩得到的权重确定为第一队列的压缩权重。1) For the queues with relatively large shaping weights defined above, compress the shaping weights of the queues, and determine the compressed weights as the compression weights of the queues; for example, compress the shaping weights of the first queue, and compress the obtained The weight of is determined as the compression weight of the first queue.

2)针对上述界定的整形权重较小的队列,将该队列的整形权重确定为压缩权重;例如,将第二队列的整形权重确定为第二队列的压缩权重。2) For the above-defined queue with a smaller shaping weight, determine the shaping weight of the queue as the compression weight; for example, determine the shaping weight of the second queue as the compression weight of the second queue.

本实施例在对满足预设条件的队列的整形权重进行压缩后,一方面,满足预设条件的队列的压缩权重小于整形权重,不满足预设条件的队列的压缩权重等于整形权重,由此可以知晓,上述各队列的压缩权重之和小于上述各队列的整形权重之和;另一方面,在本发明中令牌添加装置基于上述各队列的压缩权重确定各队列的服务机会,具体地,令牌添加装置计算各队列的压缩权重之和,再计算队列与求和值的比值,将计算得到的比值确定为队列的服务机会,各队列以各自对应的服务机会(几率)获得服务;相比于现有技术使用各队列的整形权重为各队列分配服务机会,本发明中使用各队列的压缩权重为各队列分配服务机会,由于各队列的压缩权重之和小于各队列的整形权重之和,且整形权重较小的队列的压缩权重等于整形权重,可以提高整形权重较小的队列的服务机会。In this embodiment, after compressing the shaping weights of the queues that meet the preset conditions, on the one hand, the compression weights of the queues that meet the preset conditions are smaller than the shaping weights, and the compression weights of the queues that do not meet the preset conditions are equal to the shaping weights. It can be known that the sum of the compression weights of the above queues is less than the sum of the shaping weights of the above queues; on the other hand, in the present invention, the token adding device determines the service opportunity of each queue based on the compression weights of the above queues, specifically, The token addition device calculates the sum of the compression weights of each queue, and then calculates the ratio of the queue to the summed value, and determines the calculated ratio as the service opportunity of the queue, and each queue obtains service with its corresponding service opportunity (probability); Compared with the prior art using the shaping weights of each queue to assign service opportunities to each queue, the present invention uses the compression weights of each queue to assign service opportunities to each queue, because the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue , and the compression weight of the queue with a smaller shaping weight is equal to the shaping weight, which can improve the service opportunity of the queue with a smaller shaping weight.

步骤102、确定各队列中分配到服务的目标队列,基于基准权重、各队列的压缩权重及目标队列的整形权重,确定向目标队列对应的令牌桶中添加的令牌数并添加。Step 102: Determine the target queue assigned to the service in each queue, and determine and add the number of tokens to be added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each queue, and the shaping weight of the target queue.

令牌添加装置确定各队列中分配到服务的目标队列后,基于基准权重、各队列的压缩权重及目标队列的整形权重,对目标队列的压缩权重进行解压缩,根据目标队列的整形权重的压缩情况,确定单次服务时向目标队列对应的令牌桶中添加的令牌数,上述确定的单次服务时向目标队列对应的令牌桶中添加的令牌数可以保证目标队列的整形速率准确。After the token adding device determines the target queue assigned to the service in each queue, it decompresses the compression weight of the target queue based on the reference weight, the compression weight of each queue and the shaping weight of the target queue, and compresses the compression weight of the target queue according to the shaping weight of the target queue. When determining the number of tokens added to the token bucket corresponding to the target queue during a single service, the number of tokens added to the token bucket corresponding to the target queue during the single service determined above can ensure the shaping rate of the target queue precise.

本实施例中,基于整形权重的大小区别对待目标端口的各个队列,对满足预设条件的队列的整形权重进行压缩,同时保证不满足预设条件的队列的整形权重,根据队列的压缩权重确定需要向目标队列(得到服务的队列)的令牌桶中添加的令牌数,如此,各队列的压缩权重之和小于各队列的整形权重之和,由于不满足预设条件的队列的整形权重未被压缩(整形权重等于压缩权重),因此,本实施例可以增加不满足预设条件的队列的服务机会,并降低不满足预设条件的队列在得到服务时需要向对应的令牌桶中添加的令牌数,进而减少不满足预设条件的队列的流量突发,提高业务的服务质量。In this embodiment, each queue of the target port is treated differently based on the size of the shaping weight, the shaping weight of the queue that meets the preset condition is compressed, and the shaping weight of the queue that does not meet the preset condition is guaranteed, and determined according to the compression weight of the queue The number of tokens that need to be added to the token bucket of the target queue (queue to be served), so that the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue, because the shaping weight of the queue that does not meet the preset conditions Not compressed (shaping weight is equal to compression weight), therefore, this embodiment can increase the service opportunity of the queue that does not meet the preset condition, and reduce the queue that does not meet the preset condition. The number of tokens added can reduce the traffic burst of queues that do not meet the preset conditions and improve the service quality of the business.

实施例二Embodiment two

本实施例基于实施例一,针对具体如何对队列的整形权重进行压缩的情况进行说明,本实施例以上述各队列中的任一队列为例进行说明。This embodiment is based on the first embodiment, and describes how to compress the shaping weights of the queues. This embodiment uses any one of the above-mentioned queues as an example for description.

参见图2,本实施例记载的令牌添加方法包括以下步骤:Referring to Figure 2, the token addition method recorded in this embodiment includes the following steps:

步骤201、获取对应于目标端口的队列的整形权重。Step 201. Obtain the shaping weight of the queue corresponding to the target port.

步骤202、判断队列的整形权重是否大于权重保留值,若是,则转到步骤203,否则,转到步骤207。Step 202 , judging whether the reshaping weight of the queue is greater than the reserved weight value, if so, go to step 203 , otherwise, go to step 207 .

权重保留值可以根据实际需要预先设置。The reserved weight value can be preset according to actual needs.

步骤203、根据权重压缩系数对队列的整形权重进行压缩。Step 203: Compress the reshaping weight of the queue according to the weight compression factor.

权重压缩系数可以根据实际需要预先设置。The weight compression factor can be preset according to actual needs.

步骤204、判断压缩结果是否大于权重保留值,若是,则转到步骤205,否则,转到步骤206。Step 204 , judging whether the compression result is greater than the weight reserve value, if yes, go to step 205 , otherwise, go to step 206 .

步骤205、将压缩结果作为队列的压缩权重;跳转到步骤208。Step 205, use the compression result as the compression weight of the queue; jump to step 208.

步骤206、将权重保留值作为队列的压缩权重;跳转到步骤208。Step 206 , use the reserved weight value as the compression weight of the queue; jump to step 208 .

步骤207、将队列的整形权重作为队列的压缩权重。Step 207, use the shaping weight of the queue as the compression weight of the queue.

步骤208、判断是否为对应于目标端口的所有队列均已确定压缩权重,若是,则转到步骤209,否则转到步骤201。Step 208 , judging whether compression weights have been determined for all queues corresponding to the target port, if yes, go to step 209 , otherwise go to step 201 .

步骤209、确定各队列中分配到服务机会的目标队列,基于基准权重、各队列的压缩权重及目标队列的整形权重,确定向目标队列对应的令牌桶中添加的令牌数并添加。Step 209 : Determine the target queue assigned to the service opportunity in each queue, and determine the number of tokens to be added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each queue, and the shaping weight of the target queue.

本实施例中,上述预设条件为:队列的整形权重大于权重保留值;本领域技术人员可以理解,上述预设条件并不限于此处记载的示例,只要是能够将各队列的整形权重进行分类的条件或方法都在本发明的保护范围之内。In this embodiment, the above-mentioned preset condition is: the shaping weight of the queue is greater than the reserved weight value; those skilled in the art can understand that the above-mentioned preset condition is not limited to the example described here, as long as the shaping weight of each queue can be adjusted The classification conditions or methods are all within the protection scope of the present invention.

本实施例区别对待整形权重大的队列和整形权重小的队列,压缩整形权重大的队列的整形权重,少压缩或者不压缩整形权重小的队列的整形权重。In this embodiment, queues with large shaping weights and queues with small shaping weights are treated differently, the shaping weights of queues with large shaping weights are compressed, and the shaping weights of queues with small shaping weights are less compressed or not compressed.

实施例三Embodiment Three

本实施例基于实施例一,针对具体如何确定向获得服务的队列对应的令牌桶中添加的令牌数的情况进行说明,本实施例以上述各队列中的任一队列为例进行说明。This embodiment is based on the first embodiment, and describes how to determine the number of tokens to be added to the token bucket corresponding to the queue that obtains the service. This embodiment uses any of the above-mentioned queues as an example for description.

参见图3,本实施例记载的令牌添加方法包括以下步骤:Referring to Fig. 3, the token addition method recorded in this embodiment includes the following steps:

步骤301、获取对应于目标端口的队列的整形权重。Step 301. Obtain the shaping weight of the queue corresponding to the target port.

步骤302、基于对应于目标端口的各个队列的整形权重,对各队列中满足预设条件的队列的整形权重进行压缩,确定各队列的压缩权重。Step 302: Based on the shaping weights of the queues corresponding to the target port, compress the shaping weights of the queues satisfying the preset conditions among the queues, and determine the compression weights of the queues.

步骤303、确定各队列中分配到服务机会的目标队列。Step 303, determining the target queue assigned to the service opportunity in each queue.

步骤304、基于基准权重及各队列的压缩权重确定单次服务添加的最少令牌数。Step 304: Determine the minimum number of tokens added for a single service based on the reference weight and the compression weight of each queue.

确定单次服务添加的最少令牌数的实现方式可以包括:计算各队列的压缩权重之和;再计算求和值与基准权重的比值;将计算得到的比值确定为单次服务添加的最少令牌数。The implementation of determining the minimum number of tokens added by a single service may include: calculating the sum of the compression weights of each queue; then calculating the ratio of the summed value to the reference weight; determining the calculated ratio as the minimum number of tokens added by a single service number of cards.

步骤305、判断目标队列的整形权重是否小于等于权重保留值;若是,则转到步骤306,否则转到步骤307。Step 305 , judging whether the shaping weight of the target queue is less than or equal to the reserved weight value; if yes, go to step 306 , otherwise go to step 307 .

权重保留值可以根据实际需要预先设置。The reserved weight value can be preset according to actual needs.

步骤306、将单次服务添加的最少令牌数确定为需要向目标队列对应的令牌桶中添加的令牌数;跳转到步骤311。Step 306 , determine the minimum number of tokens added by a single service as the number of tokens to be added to the token bucket corresponding to the target queue; jump to step 311 .

步骤307、根据权重压缩系数对目标队列的整形权重进行压缩。Step 307: Compress the shaping weights of the target queue according to the weight compression coefficient.

步骤308、判断压缩结果是否小于等于权重保留值,若是,则转到步骤309,否则转到步骤310。Step 308 , judging whether the compression result is less than or equal to the weight reserved value, if yes, go to step 309 , otherwise go to step 310 .

步骤309、计算目标队列的整形权重与权重保留值的比值,再计算比值与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数;跳转到步骤311。Step 309: Calculate the ratio of the shaping weight of the target queue to the weight reserved value, then calculate the product of the ratio and the minimum number of tokens added for a single service, and determine the calculated product value as the token bucket that needs to be sent to the target queue The number of tokens added; jump to step 311.

步骤310、计算权重压缩系数与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数。Step 310: Calculate the product of the weight compression factor and the minimum number of tokens added for a single service, and determine the calculated product value as the number of tokens to be added to the token bucket corresponding to the target queue.

步骤311、基于所确定的令牌数,向目标队列对应的令牌桶中添加相应的令牌。Step 311 , based on the determined number of tokens, add corresponding tokens to the token bucket corresponding to the target queue.

权重压缩系数可以根据实际需要预先设置。The weight compression factor can be preset according to actual needs.

本实施例中由于各队列的压缩权重之和小于各队列的整形权重之和,基于各队列的压缩权重及基准权重确定的单次服务添加的最少令牌数与现有技术相比有所减小,一方面,令牌添加装置向分配到服务机会的整形权重小的队列对应的令牌桶中添加的令牌数为单次服务添加的最少令牌数,即与现有技术相比有所减小,进而可减少整形权重小的队列的流量突发;另一方面,令牌添加装置结合权重压缩系数及权重值对压缩权重进行解压缩,将单次服务添加的最少令牌数乘以权重压缩系数或整形权重与权重保留值的比值,确定为分配到服务机会的整形权重大的队列对应的令牌桶中添加的令牌数,使得整形权重大的队列对应的令牌桶中添加的令牌数与现有技术中的数目接近,如此可以保证队列的整形速率准确。In this embodiment, since the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue, the minimum number of tokens added to a single service determined based on the compression weights of each queue and the reference weight is reduced compared with the prior art. Small, on the one hand, the number of tokens added by the token adding device to the token bucket corresponding to the queue with a small shaping weight assigned to the service opportunity is the minimum number of tokens added by a single service, that is, compared with the prior art, there are reduced, thereby reducing the traffic burst of queues with small shaping weights; on the other hand, the token adding device decompresses the compressed weights in combination with the weight compression coefficient and the weight value, and multiplies the minimum number of tokens added by a single service Determine the number of tokens added to the token bucket corresponding to the queue with a large shaping weight allocated to the service opportunity by the weight compression coefficient or the ratio of the shaping weight to the weight reserved value, so that the token bucket corresponding to the queue with a large shaping weight The number of added tokens is close to the number in the prior art, so that the shaping rate of the queue can be ensured to be accurate.

实施例四Embodiment four

基于上述各实施例,本实施例记载一种令牌添加方法,可以应用于以下场景中:在拥塞管理过程中,希望能在保证队列的整形速率准确的前提下,减少权重小的队列的流量突发,提高业务的服务质量;本实施例针对此情况的处理进行说明。Based on the above-mentioned embodiments, this embodiment records a token adding method, which can be applied in the following scenarios: In the process of congestion management, it is hoped that the traffic of queues with small weights can be reduced under the premise of ensuring that the shaping rate of the queues is accurate burst, improve the service quality of the business; this embodiment describes how to deal with this situation.

现有技术中,系统(如目标端口)中存在一些权重较大的队列,存在一些权重较小的队列,权重较大的队列拉高了系统所有队列的权重之和,使得单次服务添加的令牌数较大,权重小的队列在一段时间内获得的令牌数是固定的,当单次服务添加的令牌数较大时,权重小的队列在这段时间内,只能获得很少的服务机会,每次服务获得比较多的令牌,这样会导致权重小的队列突发式的获得令牌,权重小的队列在系统内能占用的缓存是有限的,这就导致权重小的队列承受突发的能力比较差,在一段时间内,如果流量突发超过权重小的队列缓存的承受能力的话,就会发生数据包丢弃。In the prior art, there are some queues with large weights in the system (such as the target port), and some queues with small weights. The queues with large weights increase the sum of the weights of all queues in the system, so that the weight added by a single service The number of tokens is large, and the number of tokens obtained by a queue with a small weight is fixed within a period of time. When the number of tokens added by a single service is large, the queue with a small weight can only obtain a few Fewer service opportunities, each service gets more tokens, which will cause the queues with small weights to obtain tokens in bursts, and the caches that queues with small weights can occupy in the system are limited, which leads to small weights The capacity of the queue to withstand bursts is relatively poor. In a period of time, if the traffic burst exceeds the capacity of the buffer of the queue with a small weight, data packets will be discarded.

本实施例为了解决该问题,区别对待权重大的队列和权重小的队列,压缩权重大的队列的权重值,同时保证权重小的队列的权重值,减小了所有队列的权重之和,减小了单次服务令牌添加数;根据压缩后的权重进行带宽分配;为了保证用户配置的整形速率准确,当队列被服务时,需要对压缩权重进行解压缩,计算得到压缩倍数k(k为正整数,是2的幂次方,用于表示队列的整形权重被压缩的倍数),向队列对应的令牌桶中添加的令牌数等于单次服务添加的最少令牌数乘以压缩倍数k。In order to solve this problem, this embodiment treats queues with large weights and queues with small weights differently, compresses the weight values of queues with large weights, and at the same time ensures the weight values of queues with small weights, reduces the sum of the weights of all queues, and reduces The number of single service token additions is reduced; the bandwidth is allocated according to the compressed weight; in order to ensure that the shaping rate configured by the user is accurate, when the queue is served, the compression weight needs to be decompressed, and the compression factor k is calculated (k is Positive integer, which is a power of 2, used to indicate the multiple of the queue’s shaping weight to be compressed), the number of tokens added to the token bucket corresponding to the queue is equal to the minimum number of tokens added by a single service multiplied by the compression multiple k.

参见图4,本实施例记载的令牌添加方法包括以下步骤:Referring to Figure 4, the token addition method recorded in this embodiment includes the following steps:

步骤401、获取对应于目标端口的各队列的整形速率,获取权重压缩系数a及权重保留值b,其中,a为正整数,a是2的幂次方,b为正整数,b是2的幂次方。Step 401, obtain the shaping rate of each queue corresponding to the target port, obtain the weight compression coefficient a and the weight retention value b, wherein a is a positive integer, a is a power of 2, b is a positive integer, and b is a value of 2 Power.

下面分别计算各队列的压缩权重d,其中d为正整数,在令牌分配时使用。The compression weight d of each queue is calculated respectively below, where d is a positive integer and is used in token allocation.

步骤402、对于任意一个队列,根据队列的整形速率,确定队列的整形权重c;计算公式如下:Step 402, for any queue, determine the shaping weight c of the queue according to the shaping rate of the queue; the calculation formula is as follows:

c=(队列的整形速率/基准整形速率)*基准权重。c=(queue shaping rate/base shaping rate)*base weight.

步骤403、判断队列的整形权重c是否小于等于权重保留值b:若是,则转到步骤406,否则转到步骤404。Step 403 , judging whether the shaping weight c of the queue is less than or equal to the reserved weight value b: if yes, go to step 406 , otherwise go to step 404 .

步骤404、将整形权重c除以权重压缩系数a,判断比值是否小于等于权重保留值b,若是,则转到步骤405,否则转到步骤407。Step 404 : Divide the reshaping weight c by the weight compression coefficient a, and judge whether the ratio is less than or equal to the weight reserved value b, if yes, go to step 405 , otherwise go to step 407 .

步骤405、队列的压缩权重d等于权重保留值b;转到步骤408。Step 405 , the compression weight d of the queue is equal to the weight reserved value b; go to step 408 .

步骤406、队列的压缩权重d等于整形权重值c;转到步骤408。Step 406, the compression weight d of the queue is equal to the shaping weight value c; go to step 408.

步骤407、队列的压缩权重d等于计算结果,即整形权重c除以权重压缩系数a得到的比值。Step 407, the compression weight d of the queue is equal to the calculation result, that is, the ratio obtained by dividing the shaping weight c by the weight compression coefficient a.

步骤408、判断是否为对应于目标端口的所有队列均已确定压缩权重,若是,则转到步骤409,否则转到步骤402。Step 408 , judging whether compression weights have been determined for all queues corresponding to the target port, if yes, go to step 409 , otherwise go to step 402 .

步骤409、基于加权算法及各队列的压缩权重确定各队列的服务机会。Step 409, determine the service opportunity of each queue based on the weighting algorithm and the compression weight of each queue.

加权算法,例如WFQ或DWRR等;针对任意队列A,首先计算各队列的压缩权重之和,再计算队列A与求和值的比值,将计算得到的比值确定为队列A的服务机会;各队列以各自对应的服务机会(几率)获得令牌分发机会。Weighting algorithm, such as WFQ or DWRR, etc.; for any queue A, first calculate the sum of the compression weights of each queue, and then calculate the ratio of queue A to the summed value, and determine the calculated ratio as the service opportunity of queue A; each queue Obtain token distribution opportunities with their corresponding service opportunities (probability).

步骤410、基于基准权重及各队列的压缩权重确定单次服务添加的最少令牌数N1。Step 410, based on the reference weight and the compression weight of each queue, determine the minimum number of tokens N1 added for a single service.

单次服务添加的最少令牌数N1等于所有队列的压缩权重之和除以基准权重。The minimum number of tokens N1 added by a single service is equal to the sum of the compression weights of all queues divided by the base weight.

步骤411、针对分配到服务机会的目标队列,判断目标队列的整形权重c是否小于等于权重保留值b;若是,则转到步骤412,否则转到步骤413。Step 411 , for the target queue assigned to the service opportunity, judge whether the shaping weight c of the target queue is less than or equal to the weight reserved value b; if so, go to step 412 , otherwise go to step 413 .

步骤412、该步骤中,压缩倍数k=1,即需要向目标队列对应的令牌桶中添加的令牌数n=单次服务添加的最少令牌数N1;跳转到步骤416;Step 412, in this step, the compression factor k=1, that is, the number of tokens to be added to the token bucket corresponding to the target queue n=the minimum number of tokens N1 added by a single service; jump to step 416;

步骤413、计算目标队列的整形权重c与权重压缩系数a的比值c/a,判断比值c/a是否小于等于权重保留值b,若是则转到步骤414,否则转到步骤415;Step 413, calculate the ratio c/a of the shaping weight c of the target queue and the weight compression coefficient a, and judge whether the ratio c/a is less than or equal to the weight reserved value b, if so, go to step 414, otherwise go to step 415;

步骤414、计算目标队列的整形权重c与权重保留值b的比值c/b,再计算比值c/b与单次服务添加的最少令牌数N1的乘积(c/b*N1),该步骤中,压缩倍数k=c/b,即需要向目标队列对应的令牌桶中添加的令牌数n=c/b*N1;跳转到步骤416。Step 414, calculate the ratio c/b of the shaping weight c of the target queue and the weight reserved value b, and then calculate the product (c/b*N1) of the minimum token number N1 added by the ratio c/b and a single service. Among them, the compression factor k=c/b, that is, the number of tokens to be added to the token bucket corresponding to the target queue n=c/b*N1; jump to step 416.

步骤415、计算权重压缩系数a与单次服务添加的最少令牌数N1的乘积(a*N1),该步骤中,压缩倍数k=a,即需要向目标队列对应的令牌桶中添加的令牌数n=a*N1。Step 415, calculate the product (a*N1) of the weight compression coefficient a and the minimum number of tokens N1 added to a single service (a*N1), in this step, the compression factor k=a, which needs to be added to the token bucket corresponding to the target queue Number of tokens n=a*N1.

步骤416、基于所确定的令牌数n,向目标队列对应的令牌桶中添加相应的令牌。Step 416: Based on the determined token number n, add corresponding tokens to the token bucket corresponding to the target queue.

本实施例在保证用户配置整形速率准确前提下,增加一段时间内整形速率较小的队列服务的机会,减小整形速率较小的队列的突发,在不增加整形速率小的队列系统内存占用量的前提下,增加了整形速率小的队列承受突发的能力,减小了整形速率小的队列丢包的可能性。提供更好的整形效果,提高系统的QoS性能。In this embodiment, on the premise of ensuring that the shaping rate configured by the user is accurate, the opportunity to serve the queue with a small shaping rate within a period of time is increased, the burst of the queue with a small shaping rate is reduced, and the system memory usage of the queue with a small shaping rate is not increased. Under the premise of increasing the traffic volume, the ability of queues with small shaping rates to withstand bursts is increased, and the possibility of packet loss in queues with small shaping rates is reduced. Provide better shaping effect and improve the QoS performance of the system.

实施例五Embodiment five

与实施例四对应,本实施例记载一种令牌添加装置,可以用于执行实施例四的方案,令牌添加装置可以是为实施本发明实施例而专门设置的设备,也可以内置于网络设备内部,网络设备可以包括网络处理器、路由器,参见图5,本实施例记载的令牌添加装置包括:Corresponding to Embodiment 4, this embodiment describes a token adding device, which can be used to implement the solution of Embodiment 4. The token adding device can be a device specially set up for implementing the embodiment of the present invention, or it can be built into the network Inside the device, the network device may include a network processor and a router. Referring to FIG. 5, the device for adding tokens recorded in this embodiment includes:

配置模块501、整形压缩计算模块502、整形解压缩计算模块503、令牌分发模块504、令牌消耗模块505、存储模块506,其中:Configuration module 501, plastic compression calculation module 502, plastic decompression calculation module 503, token distribution module 504, token consumption module 505, storage module 506, wherein:

配置模块501,用于配置(获取)权重压缩系数、权重保留值及队列的整形权重,配置其它的必要信息;The configuration module 501 is used to configure (obtain) the weight compression coefficient, the weight reservation value and the shaping weight of the queue, and configure other necessary information;

整形压缩计算模块502,用于执行步骤401至步骤408的权重压缩运算,计算得到队列的最终权重值(队列的压缩权重);Shaping and compression calculation module 502, configured to execute the weight compression operation from step 401 to step 408, and calculate the final weight value of the queue (compression weight of the queue);

整形解压缩计算模块503,用于执行步骤411至步骤415的权重解压缩运算,计算得到令牌添加数;Shaping and decompression calculation module 503, used to perform the weight decompression operation from step 411 to step 415, and calculate the number of token additions;

令牌分发模块504,根据加权算法和队列的最终权重值(队列的压缩权重),分配令牌服务机会给各个队列,并根据整形解压缩计算模块503中计算得到的令牌添加个数,向队列的令牌桶中添加相应的令牌。Token distribution module 504, according to weighting algorithm and the final weight value of queue (compression weight of queue), assigns token service opportunity to each queue, and adds the number of tokens calculated according to the plastic decompression calculation module 503, to The corresponding token is added to the token bucket of the queue.

令牌消耗模块505,当队列调度数据包离开设备时,消耗相应的令牌个数。The token consumption module 505 consumes the corresponding number of tokens when the queue scheduling data packet leaves the device.

存储模块506,存储权重压缩系数、权重保留值及队列的整形权重值等信息和其它的必要信息。The storage module 506 stores information such as the weight compression coefficient, the weight reservation value, the reshaping weight value of the queue, and other necessary information.

本实施例在保证用户配置整形速率准确前提下,增加一段时间内整形速率较小的队列服务的机会,减小整形速率较小的队列的突发,在不增加整形速率小的队列系统内存占用量的前提下,增加了整形速率小的队列承受突发的能力,减小了整形速率小的队列丢包的可能性。提供更好的整形效果,提高系统的QoS性能。In this embodiment, on the premise of ensuring that the shaping rate configured by the user is accurate, the opportunity to serve the queue with a small shaping rate within a period of time is increased, the burst of the queue with a small shaping rate is reduced, and the system memory usage of the queue with a small shaping rate is not increased. Under the premise of increasing the traffic volume, the ability of queues with small shaping rates to withstand bursts is increased, and the possibility of packet loss in queues with small shaping rates is reduced. Provide better shaping effect and improve the QoS performance of the system.

实施例六Embodiment six

与前述实施例对应,本实施例针对前述的令牌添加装置进行说明,令牌添加装置可以用于执行本发明实施例的令牌添加方法,令牌添加装置可以是为实施本发明实施例而专门设置的设备,也可以内置于网络设备内部,网络设备可以包括网络处理器、路由器,参见图6,本实施例记载的令牌添加装置包括:Corresponding to the foregoing embodiments, this embodiment is described for the aforementioned token adding device, which can be used to implement the token adding method of the embodiment of the present invention, and the token adding device can be used to implement the embodiment of the present invention Specially set equipment can also be built into the network equipment, and the network equipment can include network processors and routers. Referring to Figure 6, the token adding device recorded in this embodiment includes:

确定模块601,用于基于对应于目标端口的各个队列的整形权重,对各队列中满足预设条件的队列的整形权重进行压缩,确定各队列的压缩权重;The determination module 601 is configured to compress the shaping weights of queues satisfying preset conditions in each queue based on the shaping weights of each queue corresponding to the target port, and determine the compression weight of each queue;

确定模块601,还用于确定各队列中分配到服务机会的目标队列,基于基准权重、各队列的压缩权重及目标队列的整形权重,确定向目标队列对应的令牌桶中添加的令牌数;The determination module 601 is also used to determine the target queues assigned to service opportunities in each queue, and determine the number of tokens added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each queue and the shaping weight of the target queue ;

分发模块602,用于向目标队列对应的令牌桶中添加确定模块确定的添加的令牌数。The distributing module 602 is configured to add the number of added tokens determined by the determining module to the token bucket corresponding to the target queue.

本实施例中,基于整形权重的大小区别对待目标端口的各个队列,对满足预设条件的队列的整形权重进行压缩,同时保证不满足预设条件的队列的整形权重,根据队列的压缩权重确定需要向目标队列(得到服务的队列)的令牌桶中添加的令牌数,如此,各队列的压缩权重之和小于各队列的整形权重之和,由于不满足预设条件的队列的整形权重未被压缩(整形权重等于压缩权重),因此,本实施例可以增加不满足预设条件的队列的服务机会,并降低不满足预设条件的队列在得到服务时需要向对应的令牌桶中添加的令牌数,进而减少不满足预设条件的队列的流量突发,提高业务的服务质量。In this embodiment, each queue of the target port is treated differently based on the size of the shaping weight, the shaping weight of the queue that meets the preset condition is compressed, and the shaping weight of the queue that does not meet the preset condition is guaranteed, and determined according to the compression weight of the queue The number of tokens that need to be added to the token bucket of the target queue (queue to be served), so that the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue, because the shaping weight of the queue that does not meet the preset conditions Not compressed (shaping weight is equal to compression weight), therefore, this embodiment can increase the service opportunity of the queue that does not meet the preset condition, and reduce the queue that does not meet the preset condition. The number of tokens added can reduce the traffic burst of queues that do not meet the preset conditions and improve the service quality of the business.

可选的,确定模块601,具体用于判断队列的整形权重是否大于权重保留值;若是,则根据权重压缩系数对队列的整形权重进行压缩,当确定压缩结果大于权重保留值时将压缩结果作为队列的压缩权重,当确定压缩结果不大于权重保留值时将权重保留值作为队列的压缩权重;Optionally, the determination module 601 is specifically used to judge whether the shaping weight of the queue is greater than the weight reservation value; if so, compress the shaping weight of the queue according to the weight compression coefficient, and when the compression result is determined to be greater than the weight reservation value, use the compression result as The compression weight of the queue, when it is determined that the compression result is not greater than the weight reserve value, the weight reserve value is used as the compression weight of the queue;

否则,将队列的整形权重作为队列的压缩权重。Otherwise, use the queue's shaping weight as the queue's compression weight.

可选的,确定模块601,还用于在确定各队列中分配到服务机会的目标队列之前,根据各队列的压缩权重,确定各队列的服务机会。Optionally, the determining module 601 is further configured to determine the service opportunity of each queue according to the compression weight of each queue before determining the target queue assigned to the service opportunity in each queue.

可选的,确定模块601,具体用于计算各队列的压缩权重之和;再计算队列与求和值的比值;将计算得到的比值确定为队列的服务机会。Optionally, the determination module 601 is specifically configured to calculate the sum of the compression weights of each queue; then calculate the ratio of the queue to the summed value; and determine the calculated ratio as the service opportunity of the queue.

可选的,确定模块601,具体用于:基于基准权重及各队列的压缩权重确定单次服务添加的最少令牌数;判断目标队列的整形权重是否不大于权重保留值;Optionally, the determination module 601 is specifically used to: determine the minimum number of tokens added by a single service based on the reference weight and the compression weight of each queue; determine whether the shaping weight of the target queue is not greater than the weight reservation value;

若是,则将单次服务添加的最少令牌数确定为需要向目标队列对应的令牌桶中添加的令牌数;If so, determine the minimum number of tokens added by a single service as the number of tokens that need to be added to the token bucket corresponding to the target queue;

否则,根据权重压缩系数对目标队列的整形权重进行压缩,当确定压缩结果不大于权重保留值时,计算目标队列的整形权重与权重保留值的比值,再计算比值与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数;当确定压缩结果大于权重保留值时,计算权重压缩系数与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数。Otherwise, compress the shaping weight of the target queue according to the weight compression coefficient. When it is determined that the compression result is not greater than the reserved weight value, calculate the ratio of the shaping weight of the target queue to the reserved weight value, and then calculate the ratio and the minimum order added by a single service. The product of the number of cards, determine the calculated product value as the number of tokens that need to be added to the token bucket corresponding to the target queue; when the compression result is determined to be greater than the weight reserved value, calculate the weight compression factor and the minimum value added by a single service The product of the number of tokens, the calculated product value is determined as the number of tokens that need to be added to the token bucket corresponding to the target queue.

可选的,确定模块601,具体用于计算各队列的压缩权重之和;再计算求和值与基准权重的比值;将计算得到的比值确定为单次服务添加的最少令牌数。Optionally, the determination module 601 is specifically configured to calculate the sum of the compression weights of each queue; then calculate the ratio of the sum to the reference weight; and determine the calculated ratio as the minimum number of tokens added for a single service.

在实际应用中,确定模块601、分发模块602,均可由位于网络设备的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)等实现。In practical applications, the determining module 601 and the distributing module 602 can be implemented by a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA) located in a network device. And so on.

实施例七Embodiment seven

实体实施例Entity embodiment

本实施例记载一种计算机可读介质,可以为ROM(例如,只读存储器、FLASH存储器、转移装置等)、磁存储介质(例如,磁带、磁盘驱动器等)、光学存储介质(例如,CD-ROM、DVD-ROM、纸卡、纸带等)以及其他熟知类型的程序存储器;计算机可读介质中存储有计算机可执行指令,当执行指令时,引起至少一个处理器执行包括以下的操作:This embodiment describes a computer-readable medium, which can be ROM (for example, read-only memory, FLASH memory, transfer device, etc.), magnetic storage medium (for example, magnetic tape, disk drive, etc.), optical storage medium (for example, CD- ROM, DVD-ROM, paper card, paper tape, etc.) and other well-known types of program memory; the computer-readable medium has computer-executable instructions stored thereon that, when executed, cause at least one processor to perform operations including:

基于对应于目标端口的各个队列的整形权重,对各队列中满足预设条件的队列的整形权重进行压缩,确定各队列的压缩权重;Based on the shaping weights of each queue corresponding to the target port, the shaping weights of the queues satisfying the preset conditions in each queue are compressed, and the compression weights of each queue are determined;

确定各队列中分配到服务机会的目标队列,基于基准权重、各队列的压缩权重及目标队列的整形权重,确定向目标队列对应的令牌桶中添加的令牌数并添加。Determine the target queue assigned to the service opportunity in each queue, and determine the number of tokens to be added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each queue, and the shaping weight of the target queue.

可选的,基于对应于目标端口的各个队列的整形权重,对各队列中满足预设条件的队列的整形权重进行压缩,确定各队列的压缩权重,包括:判断队列的整形权重是否大于权重保留值;若是,则根据权重压缩系数对队列的整形权重进行压缩,当确定压缩结果大于权重保留值时将压缩结果作为队列的压缩权重,当确定压缩结果不大于权重保留值时将权重保留值作为队列的压缩权重;Optionally, based on the shaping weights of the queues corresponding to the target port, compress the shaping weights of the queues that meet the preset conditions in each queue, and determine the compression weights of each queue, including: judging whether the shaping weights of the queues are greater than the reserved weights value; if yes, then compress the reshaping weight of the queue according to the weight compression factor. When it is determined that the compression result is greater than the reserved weight value, the compression result is used as the compression weight of the queue. When it is determined that the compression result is not greater than the reserved weight value, the reserved weight value is used as the compression weight of the queue;

否则,将队列的整形权重作为队列的压缩权重。Otherwise, use the queue's shaping weight as the queue's compression weight.

可选的,确定各队列中分配到服务机会的目标队列之前,方法还包括:根据各队列的压缩权重,确定各队列的服务机会。Optionally, before determining the target queue assigned to the service opportunity in each queue, the method further includes: determining the service opportunity of each queue according to the compression weight of each queue.

可选的,根据各队列的压缩权重,确定各队列的服务机会,包括:计算各队列的压缩权重之和;再计算队列与求和值的比值;将计算得到的比值确定为队列的服务机会。Optionally, according to the compression weight of each queue, determine the service opportunity of each queue, including: calculating the sum of the compression weights of each queue; then calculating the ratio of the queue to the summed value; determining the calculated ratio as the service opportunity of the queue .

可选的,基于基准权重、各队列的压缩权重及目标队列的整形权重,确定向目标队列对应的令牌桶中添加的令牌数,包括:基于基准权重及各队列的压缩权重确定单次服务添加的最少令牌数;判断目标队列的整形权重是否不大于权重保留值;若是,则将单次服务添加的最少令牌数确定为需要向目标队列对应的令牌桶中添加的令牌数;否则,根据权重压缩系数对目标队列的整形权重进行压缩,当确定压缩结果不大于权重保留值时,计算目标队列的整形权重与权重保留值的比值,再计算比值与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数;当确定压缩结果大于权重保留值时,计算权重压缩系数与单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向目标队列对应的令牌桶中添加的令牌数。Optionally, based on the benchmark weight, the compression weight of each queue, and the shaping weight of the target queue, determine the number of tokens to be added to the token bucket corresponding to the target queue, including: determining a single The minimum number of tokens added by the service; determine whether the shaping weight of the target queue is not greater than the weight reserved value; if so, determine the minimum number of tokens added by a single service as the tokens that need to be added to the token bucket corresponding to the target queue Otherwise, the shaping weight of the target queue is compressed according to the weight compression coefficient. When it is determined that the compression result is not greater than the reserved weight value, the ratio of the shaping weight of the target queue to the reserved weight value is calculated, and then the ratio and the value added by a single service are calculated. The product of the minimum number of tokens, determine the calculated product value as the number of tokens that need to be added to the token bucket corresponding to the target queue; when it is determined that the compression result is greater than the weight reserved value, calculate the weight compression factor and add a single service The product of the minimum number of tokens, and determine the calculated product value as the number of tokens that need to be added to the token bucket corresponding to the target queue.

可选的,基于基准权重及各队列的压缩权重确定单次服务添加的最少令牌数,包括:计算各队列的压缩权重之和;再计算求和值与基准权重的比值;将计算得到的比值确定为单次服务添加的最少令牌数。Optionally, determine the minimum number of tokens added by a single service based on the benchmark weight and the compression weight of each queue, including: calculating the sum of the compression weights of each queue; then calculating the ratio of the sum to the benchmark weight; The ratio determines the minimum number of tokens added for a single service.

综上,本发明实施例中通过对满足预设条件的队列的整形权重进行压缩,同时保证不满足预设条件的队列的整形权重,根据队列的压缩权重确定需要向目标队列(得到服务的队列)的令牌桶中添加的令牌数,如此,各队列的压缩权重之和小于各队列的整形权重之和,由于不满足预设条件的队列的整形权重未被压缩(整形权重等于压缩权重),因此,本实施例会增加不满足预设条件的队列的服务机会,并降低不满足预设条件的队列在得到服务时需要向对应的令牌桶中添加的令牌数,进而减少不满足预设条件的队列的流量突发,提高业务的服务质量。To sum up, in the embodiment of the present invention, by compressing the shaping weights of the queues that meet the preset conditions, and at the same time ensuring the shaping weights of the queues that do not meet the preset conditions, according to the compression weights of the queues, it is determined that the queues that need to be sent to the target queue (the queue that receives the service) ), the sum of the compression weights of each queue is less than the sum of the shaping weights of each queue, because the shaping weights of the queues that do not meet the preset conditions are not compressed (the shaping weight is equal to the compression weight ), therefore, this embodiment will increase the service opportunities of the queues that do not meet the preset conditions, and reduce the number of tokens that need to be added to the corresponding token bucket when the queues that do not meet the preset conditions are served, thereby reducing the number of tokens that do not meet the preset conditions. The traffic burst of the queue with preset conditions improves the service quality of the business.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (12)

Translated fromChinese
1.一种令牌添加方法,其特征在于,所述方法包括:1. A token adding method, characterized in that the method comprises:基于对应于目标端口的各个队列的整形权重,对各所述队列中满足预设条件的队列的整形权重进行压缩,确定各所述队列的压缩权重;Compressing the shaping weights of queues satisfying preset conditions in each of the queues based on the shaping weights of each queue corresponding to the target port, and determining the compression weight of each of the queues;确定各所述队列中分配到服务机会的目标队列,基于基准权重、各所述队列的压缩权重及所述目标队列的整形权重,确定向所述目标队列对应的令牌桶中添加的令牌数并添加。Determine the target queue assigned to the service opportunity in each of the queues, and determine the tokens to be added to the token bucket corresponding to the target queue based on the reference weight, the compression weight of each of the queues, and the shaping weight of the target queue Count and add.2.根据权利要求1所述的方法,其特征在于,所述基于对应于目标端口的各个队列的整形权重,对各所述队列中满足预设条件的队列的整形权重进行压缩,确定各所述队列的压缩权重,包括:2. The method according to claim 1, wherein, based on the shaping weights of the queues corresponding to the target port, the shaping weights of the queues satisfying the preset conditions in each of the queues are compressed, and the weights of the queues of each queue are determined. Compression weights for the queues described above, including:判断所述队列的整形权重是否大于权重保留值;judging whether the shaping weight of the queue is greater than the weight reservation value;若是,则根据权重压缩系数对所述队列的整形权重进行压缩,当确定所述压缩结果大于所述权重保留值时将所述压缩结果作为所述队列的压缩权重,当确定所述压缩结果不大于所述权重保留值时将所述权重保留值作为所述队列的压缩权重;If so, compress the shaping weight of the queue according to the weight compression coefficient, and use the compression result as the compression weight of the queue when it is determined that the compression result is greater than the weight reservation value, and use the compression result as the compression weight of the queue when it is determined that the compression result is not When it is greater than the weight reserved value, the weight reserved value is used as the compression weight of the queue;否则,将所述队列的整形权重作为所述队列的压缩权重。Otherwise, use the shaping weight of the queue as the compression weight of the queue.3.根据权利要求1所述的方法,其特征在于,所述确定各所述队列中分配到服务机会的目标队列之前,所述方法还包括:3. The method according to claim 1, wherein before determining the target queues assigned to service opportunities in each of the queues, the method further comprises:根据各所述队列的压缩权重,确定各所述队列的服务机会。According to the compression weight of each of the queues, the service opportunity of each of the queues is determined.4.根据权利要求3所述的方法,其特征在于,所述根据各所述队列的压缩权重,确定各所述队列的服务机会,包括:4. The method according to claim 3, wherein the determining the service opportunities of each of the queues according to the compression weight of each of the queues comprises:计算各所述队列的压缩权重之和;calculating the sum of the compression weights of each of the queues;再计算所述队列与所述求和值的比值;Then calculate the ratio of the queue to the summed value;将计算得到的比值确定为所述队列的服务机会。The calculated ratio is determined as the service opportunity for the queue.5.根据权利要求1所述的方法,其特征在于,所述基于基准权重、各所述队列的压缩权重及所述目标队列的整形权重,确定向所述目标队列对应的令牌桶中添加的令牌数,包括:5. The method according to claim 1, wherein, based on the reference weight, the compression weight of each of the queues and the shaping weight of the target queue, it is determined to add number of tokens, including:基于基准权重及各所述队列的压缩权重确定单次服务添加的最少令牌数;Determine the minimum number of tokens added by a single service based on the benchmark weight and the compression weight of each queue;判断所述目标队列的整形权重是否不大于权重保留值;judging whether the shaping weight of the target queue is not greater than the weight reservation value;若是,则将所述单次服务添加的最少令牌数确定为需要向所述目标队列对应的令牌桶中添加的令牌数;If so, then determine the minimum number of tokens added by the single service as the number of tokens that need to be added to the token bucket corresponding to the target queue;否则,根据权重压缩系数对所述目标队列的整形权重进行压缩,当确定所述压缩结果不大于所述权重保留值时,计算所述目标队列的整形权重与所述权重保留值的比值,再计算所述比值与所述单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向所述目标队列对应的令牌桶中添加的令牌数;当确定所述压缩结果大于所述权重保留值时,计算所述权重压缩系数与所述单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向所述目标队列对应的令牌桶中添加的令牌数。Otherwise, compress the shaping weight of the target queue according to the weight compression coefficient, and when it is determined that the compression result is not greater than the reserved weight value, calculate the ratio of the shaping weight of the target queue to the reserved weight value, and then Calculate the product of the ratio and the minimum number of tokens added by the single service, and determine the calculated product value as the number of tokens that need to be added to the token bucket corresponding to the target queue; when determining the compression When the result is greater than the weight reservation value, calculate the product of the weight compression factor and the minimum number of tokens added to the single service, and determine the calculated product value as the token bucket corresponding to the target queue The number of tokens added.6.根据权利要求5所述的方法,其特征在于,所述基于基准权重及各所述队列的压缩权重确定单次服务添加的最少令牌数,包括:6. The method according to claim 5, wherein the determination of the minimum number of tokens added by a single service based on the reference weight and the compression weight of each queue includes:计算各所述队列的压缩权重之和;calculating the sum of the compression weights of each of the queues;再计算所述求和值与基准权重的比值;Then calculate the ratio of the summation value and the reference weight;将计算得到的比值确定为单次服务添加的最少令牌数。Determine the calculated ratio as the minimum number of tokens added for a single service.7.一种令牌添加装置,其特征在于,所述装置包括:7. A token adding device, characterized in that the device comprises:确定模块,用于基于对应于目标端口的各个队列的整形权重,对各所述队列中满足预设条件的队列的整形权重进行压缩,确定各所述队列的压缩权重;A determining module, configured to compress the shaping weights of queues satisfying preset conditions in each of the queues based on the shaping weights of each queue corresponding to the target port, and determine the compression weight of each of the queues;所述确定模块,还用于确定各所述队列中分配到服务机会的目标队列,基于基准权重、各所述队列的压缩权重及所述目标队列的整形权重,确定向所述目标队列对应的令牌桶中添加的令牌数;The determination module is further configured to determine the target queue assigned to the service opportunity in each of the queues, and determine the corresponding queue to the target queue based on the reference weight, the compression weight of each of the queues, and the shaping weight of the target queue. The number of tokens added in the token bucket;分发模块,用于向所述目标队列对应的令牌桶中添加所述确定模块确定的添加的令牌数。A distributing module, configured to add the number of added tokens determined by the determining module to the token bucket corresponding to the target queue.8.根据权利要求7所述的装置,其特征在于,所述确定模块,具体用于判断所述队列的整形权重是否大于权重保留值;8. The device according to claim 7, wherein the determining module is specifically configured to determine whether the shaping weight of the queue is greater than a reserved weight value;若是,则根据权重压缩系数对所述队列的整形权重进行压缩,当确定所述压缩结果大于所述权重保留值时将所述压缩结果作为所述队列的压缩权重,当确定所述压缩结果不大于所述权重保留值时将所述权重保留值作为所述队列的压缩权重;If so, compress the shaping weight of the queue according to the weight compression coefficient, and use the compression result as the compression weight of the queue when it is determined that the compression result is greater than the weight reservation value, and use the compression result as the compression weight of the queue when it is determined that the compression result is not When it is greater than the weight reserved value, the weight reserved value is used as the compression weight of the queue;否则,将所述队列的整形权重作为所述队列的压缩权重。Otherwise, use the shaping weight of the queue as the compression weight of the queue.9.根据权利要求7所述的装置,其特征在于,所述确定模块,还用于在确定各所述队列中分配到服务机会的目标队列之前,根据各所述队列的压缩权重,确定各所述队列的服务机会。9. The device according to claim 7, wherein the determining module is further configured to determine each queue according to the compression weight of each queue before determining the target queue assigned to the service opportunity in each queue. Service opportunities for the queue.10.根据权利要求9所述的装置,其特征在于,所述确定模块,具体用于计算各所述队列的压缩权重之和;再计算所述队列与所述求和值的比值;将计算得到的比值确定为所述队列的服务机会。10. The device according to claim 9, wherein the determining module is specifically configured to calculate the sum of the compression weights of each of the queues; then calculate the ratio of the queue to the summed value; calculate The resulting ratio determines the service opportunity for the queue.11.根据权利要求7所述的装置,其特征在于,所述确定模块,具体用于:11. The device according to claim 7, wherein the determining module is specifically used for:基于基准权重及各所述队列的压缩权重确定单次服务添加的最少令牌数;Determine the minimum number of tokens added by a single service based on the benchmark weight and the compression weight of each queue;判断所述目标队列的整形权重是否不大于权重保留值;judging whether the shaping weight of the target queue is not greater than the weight reservation value;若是,则将所述单次服务添加的最少令牌数确定为需要向所述目标队列对应的令牌桶中添加的令牌数;If so, then determine the minimum number of tokens added by the single service as the number of tokens that need to be added to the token bucket corresponding to the target queue;否则,根据权重压缩系数对所述目标队列的整形权重进行压缩,当确定所述压缩结果不大于所述权重保留值时,计算所述目标队列的整形权重与所述权重保留值的比值,再计算所述比值与所述单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向所述目标队列对应的令牌桶中添加的令牌数;当确定所述压缩结果大于所述权重保留值时,计算所述权重压缩系数与所述单次服务添加的最少令牌数的乘积,将计算得到的乘积值确定为需要向所述目标队列对应的令牌桶中添加的令牌数。Otherwise, compress the shaping weight of the target queue according to the weight compression coefficient, and when it is determined that the compression result is not greater than the reserved weight value, calculate the ratio of the shaping weight of the target queue to the reserved weight value, and then Calculate the product of the ratio and the minimum number of tokens added by the single service, and determine the calculated product value as the number of tokens that need to be added to the token bucket corresponding to the target queue; when determining the compression When the result is greater than the weight reservation value, calculate the product of the weight compression factor and the minimum number of tokens added to the single service, and determine the calculated product value as the token bucket corresponding to the target queue The number of tokens added.12.根据权利要求7所述的装置,其特征在于,所述确定模块,具体用于计算各所述队列的压缩权重之和;再计算所述求和值与基准权重的比值;将计算得到的比值确定为单次服务添加的最少令牌数。12. The device according to claim 7, wherein the determining module is specifically configured to calculate the sum of the compression weights of each of the queues; then calculate the ratio of the summed value to the reference weight; calculate the obtained The ratio of determines the minimum number of tokens added for a single service.
CN201610158873.4A2016-03-172016-03-17Token adding method and deviceActiveCN107204930B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201610158873.4ACN107204930B (en)2016-03-172016-03-17Token adding method and device
PCT/CN2016/110045WO2017157064A1 (en)2016-03-172016-12-15Token adding method and device, and computer storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610158873.4ACN107204930B (en)2016-03-172016-03-17Token adding method and device

Publications (2)

Publication NumberPublication Date
CN107204930Atrue CN107204930A (en)2017-09-26
CN107204930B CN107204930B (en)2020-05-19

Family

ID=59851916

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610158873.4AActiveCN107204930B (en)2016-03-172016-03-17Token adding method and device

Country Status (2)

CountryLink
CN (1)CN107204930B (en)
WO (1)WO2017157064A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110048964A (en)*2018-01-152019-07-23深圳市中兴微电子技术有限公司A kind of shaping methods of service queue, terminal and storage medium
WO2022178872A1 (en)*2021-02-262022-09-01华为技术有限公司Traffic shaping method and device
WO2022232976A1 (en)*2021-05-062022-11-10华为技术有限公司Token bucket-based flow control method and network device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113612699B (en)*2021-08-022023-12-08上海航天测控通信研究所Method for improving transmission efficiency of IP over CCSDS

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP0561563A2 (en)*1992-03-181993-09-22AT&T Corp.Methods and apparatus for studying very large sets of data
CN101599905A (en)*2009-06-302009-12-09中兴通讯股份有限公司 A method, device and system for implementing traffic shaping token addition
CN103259743A (en)*2012-02-152013-08-21中兴通讯股份有限公司Method and device for controlling output flow based on token bucket
CN103547330A (en)*2012-12-122014-01-29华为技术有限公司 User scheduling method and device thereof
CN104753809A (en)*2013-12-252015-07-01深圳市中兴微电子技术有限公司Method and device for adding token into traffic shaping

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106302231B (en)*2015-05-122019-06-28深圳市中兴微电子技术有限公司The method and device of traffic queue shaping

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP0561563A2 (en)*1992-03-181993-09-22AT&T Corp.Methods and apparatus for studying very large sets of data
CN101599905A (en)*2009-06-302009-12-09中兴通讯股份有限公司 A method, device and system for implementing traffic shaping token addition
CN103259743A (en)*2012-02-152013-08-21中兴通讯股份有限公司Method and device for controlling output flow based on token bucket
CN103547330A (en)*2012-12-122014-01-29华为技术有限公司 User scheduling method and device thereof
CN104753809A (en)*2013-12-252015-07-01深圳市中兴微电子技术有限公司Method and device for adding token into traffic shaping

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110048964A (en)*2018-01-152019-07-23深圳市中兴微电子技术有限公司A kind of shaping methods of service queue, terminal and storage medium
CN110048964B (en)*2018-01-152023-09-12深圳市中兴微电子技术有限公司 A business queue shaping method, terminal and storage medium
WO2022178872A1 (en)*2021-02-262022-09-01华为技术有限公司Traffic shaping method and device
WO2022232976A1 (en)*2021-05-062022-11-10华为技术有限公司Token bucket-based flow control method and network device

Also Published As

Publication numberPublication date
WO2017157064A1 (en)2017-09-21
CN107204930B (en)2020-05-19

Similar Documents

PublicationPublication DateTitle
US10772081B2 (en)Airtime-based packet scheduling for wireless networks
EP2466824B1 (en)Service scheduling method and device
CN106793133B (en)Scheduling method for guaranteeing multi-service QoS in electric power wireless communication system
CN101009655B (en)Traffic scheduling method and device
CN102611605B (en)Scheduling method, device and system of data exchange network
CN106954232B (en)Time delay optimized resource allocation method
CN102104545A (en)Credit scheduling method and device and bypass device for solving linear speed of packet
WO2009074095A1 (en)A method, system and apparatus for adjusting users' quality of service
WO2010124516A1 (en)Method and device for scheduling data communication input ports
US9940471B2 (en)Virtual output queue authorization management method and device, and computer storage medium
CN107204930A (en)Token adding method and device
CN111400206B (en)Cache management method based on dynamic virtual threshold
CN109729013A (en) Method, device and computer-readable storage medium for adding token in traffic shaping
CN110602747A (en)Method for scheduling wide-band and narrow-band mixed service channel resources of power wireless communication system
CN102752192A (en)Bandwidth allocation method of forwarding and control element separation (ForCES) transmission mapping layer based on stream control transmission protocol (SCTP)
CN106921586B (en)Data stream shaping method, data scheduling method and device
CN105577563B (en)flow management method
CN101478486A (en)Method, equipment and system for switch network data scheduling
CN103023819B (en)A kind of coarseness distribution method of dynamic bandwidth
CN106487713A (en)A kind of service quality multiplexing method and device
CN101778433B (en) A method and device for scheduling wireless resources
Wang et al.A priority-based EDF scheduling algorithm for H. 264 video transmission over WiMAX network
CN110048964B (en) A business queue shaping method, terminal and storage medium
CN105323189A (en)User queue dispatching method and device
CN103997467B (en)A kind of method and device of data flow Stochastic Fair share of bandwidth

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp