CN112995058B - Token adjusting method and device - Google Patents
Token adjusting method and device Download PDFInfo
- Publication number
- CN112995058B CN112995058B CN201911285491.8A CN201911285491A CN112995058B CN 112995058 B CN112995058 B CN 112995058B CN 201911285491 A CN201911285491 A CN 201911285491A CN 112995058 B CN112995058 B CN 112995058B
- Authority
- CN
- China
- Prior art keywords
- queue
- token
- tokens
- authorization
- traffic management
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000013475 authorization Methods 0.000 claims abstract description 65
- 238000007726 management method Methods 0.000 claims description 101
- 238000004590 computer program Methods 0.000 claims description 18
- 230000015654 memory Effects 0.000 claims description 18
- 230000000694 effects Effects 0.000 abstract description 14
- 238000005516 engineering process Methods 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/215—Flow control; Congestion control using token-bucket
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/122—Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/21—Flow control; Congestion control using leaky-bucket
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/22—Traffic shaping
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种令牌的调整方法及装置。The present invention relates to the field of communications, and specifically, to a token adjustment method and device.
背景技术Background technique
在新的交换接入芯片,当时钟频率有限时,要到达较高的流量管理,有采用两套或多套流量管理组件的模式。此处以两套举例。两套组件,相互独立,都可以经过交换所有链路,和对端芯片互通数据。正常通流时,两套组件通过所有链路上到交换网络。这里举例,当交换网有效链路变化时,芯片两个core,交换网络不知道每个core应该下发多少授权给对端,这样就无法给每个core协调使用多少带宽。In new switching access chips, when the clock frequency is limited, to achieve higher traffic management, there is a mode of using two or more sets of traffic management components. Here are two examples. The two sets of components are independent of each other and can exchange data with the opposite end chip by exchanging all links. During normal traffic, the two sets of components reach the switching network through all links. For example, when the effective link of the switching network changes, the chip has two cores. The switching network does not know how many authorizations each core should issue to the opposite end, so it is impossible to coordinate how much bandwidth to use for each core.
针对相关技术中,授权不合理导致流量管理效果较差的问题,尚不存在较好的解决方案。In related technologies, there is no good solution to the problem that unreasonable authorization leads to poor traffic management effects.
发明内容Contents of the invention
本发明实施例提供了一种令牌的调整方法及装置,以至少解决相关技术中授权不合理导致流量管理效果较差的问题。Embodiments of the present invention provide a token adjustment method and device to at least solve the problem in related technologies that unreasonable authorization leads to poor traffic management effects.
根据本发明的一个实施例,提供了一种令牌的调整方法,包括:接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;根据所述多个流量管理组件所共用的总令牌数调整所述多个流量管理组件的队列的令牌。According to an embodiment of the present invention, a token adjustment method is provided, including: receiving a token, wherein the token is issued according to the issuance interval, and the issuance interval is based on the number of effective links. and the link congestion level, the received tokens are shared by multiple traffic management components; the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Token.
根据本发明的另一个实施例,提供了一种令牌的调整装置,包括:接收模块,用于接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;调整模块,用于根据所述多个流量管理组件所共用的总令牌数调整所述多个流量管理组件的队列的令牌。According to another embodiment of the present invention, a token adjustment device is provided, including: a receiving module, configured to receive the token, wherein the token is issued according to the issuance interval, and the issuance interval It is determined based on the number of effective links and the link congestion level. The received token is shared by multiple traffic management components; the adjustment module is used to adjust the total number of tokens shared by the multiple traffic management components based on the number of effective links and the link congestion level. Adjust tokens for queues of the plurality of traffic management components.
根据本发明的又一个实施例,还提供了一种计算机可读的存储介质,所述计算机可读的存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, a computer-readable storage medium is also provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above when running. Steps in the method embodiment.
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above. Steps in method embodiments.
通过本发明实施例,由于接收令牌,其中,所述令牌是按照下发间隔下发的,所述下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的所述令牌为多个流量管理组件所共用;根据所述多个流量管理组件所共用的总令牌数调整所述多个流量管理组件的队列的令牌,因此,可以解决相关技术中授权不合理导致流量管理效果较差问题,达到提高流量管理效率的技术效果。Through the embodiment of the present invention, due to receiving the token, wherein the token is issued according to the issuing interval, and the issuing interval is determined according to the number of effective links and the link congestion level, the received token The token is shared by multiple traffic management components; the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Therefore, unreasonable authorization in related technologies can be solved. This leads to the problem of poor traffic management effect and achieves the technical effect of improving traffic management efficiency.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached picture:
图1是本发明实施例的一种令牌的调整方法的移动终端的硬件结构框图;Figure 1 is a hardware structure block diagram of a mobile terminal of a token adjustment method according to an embodiment of the present invention;
图2是根据本发明实施例的令牌的管理方法的流程图;Figure 2 is a flow chart of a token management method according to an embodiment of the present invention;
图3是根据本发明实施例的令牌的管理装置的结构框图;Figure 3 is a structural block diagram of a token management device according to an embodiment of the present invention;
图4是根据本发明可选实施例的两个拥塞管理模块间添加调整装置的的结构示意图;Figure 4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present invention;
图5是根据本发明可选实施例的流量均衡装置的结构示意图;Figure 5 is a schematic structural diagram of a flow balancing device according to an optional embodiment of the present invention;
图6是根据本发明可选实施例的core0、core1的L3级各队列具体令牌示意图;Figure 6 is a schematic diagram of specific tokens for each L3 queue of core0 and core1 according to an optional embodiment of the present invention;
图7是根据本发明可选实施例的单芯片令牌添加和消耗过程的流程图;Figure 7 is a flow chart of a single-chip token addition and consumption process according to an optional embodiment of the present invention;
图8是根据本发明可选实施例的单队列fifo入队、出队相关操作的流程图;Figure 8 is a flow chart of single-queue fifo enqueuing and dequeuing related operations according to an optional embodiment of the present invention;
图9是根据本发明可选实施例的单队列令牌添加和消耗过程的流程图。Figure 9 is a flow chart of a single queue token addition and consumption process according to an optional embodiment of the present invention.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, as long as there is no conflict, the embodiments and features in the embodiments of this application can be combined with each other.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
实施例1Example 1
本申请实施例一所提供的方法实施例可以在管理装置、计算机终端或者类似的运算装置中执行。以运行在管理装置上为例,图1是本发明实施例的一种令牌的调整方法的管理装置的硬件结构框图。如图1所示,管理装置10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述管理装置还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述管理装置的结构造成限定。例如,管理装置10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application can be executed in a management device, a computer terminal, or a similar computing device. Taking running on a management device as an example, FIG. 1 is a hardware structure block diagram of a management device of a token adjustment method according to an embodiment of the present invention. As shown in FIG. 1 , the management device 10 may include one or more (only one is shown in FIG. 1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. ) and a memory 104 for storing data. Optionally, the above-mentioned management device may also include a transmission device 106 and an input and output device 108 for communication functions. Persons of ordinary skill in the art can understand that the structure shown in Figure 1 is only illustrative, and it does not limit the structure of the above management device. For example, the management device 10 may also include more or fewer components than shown in FIG. 1 , or have a different configuration than shown in FIG. 1 .
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的令牌的调整方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至管理装置10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the token adjustment method in the embodiment of the present invention. The processor 102 runs the computer program stored in the memory 104, thereby Execute various functional applications and data processing, that is, implement the above methods. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely relative to the processor 102, and these remote memories may be connected to the management device 10 through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括管理装置10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The above-mentioned specific example of the network may include a wireless network provided by the communication provider of the management device 10 . In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet wirelessly.
在本实施例中提供了一种运行于上述移动管理装置的令牌的调整方法,图2是根据本发明实施例的令牌的调整方法的流程图,如图2所示,该流程包括如下步骤:This embodiment provides a token adjustment method running on the above mobile management device. Figure 2 is a flow chart of a token adjustment method according to an embodiment of the present invention. As shown in Figure 2, the process includes the following step:
步骤S202,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;Step S202: Receive a token, where the token is issued according to the issuance interval. The issuance interval is determined based on the number of effective links and the link congestion level. The received token is for multiple traffic management shared by components;
步骤S204,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。Step S204: Adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以解决相关技术中授权不合理导致流量管理效果较差问题,达到提高流量管理效率的技术效果。Through the above steps, since the token is received, where the token is issued according to the issuance interval, and the issuance interval is determined based on the number of effective links and the link congestion level, the received token is multiple Shared by the traffic management components; the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Therefore, the problem of poor traffic management effect caused by unreasonable authorization in related technologies can be solved. , to achieve the technical effect of improving traffic management efficiency.
可选地,该下发间隔、该有效链路数和该链路拥塞等级,满足以下关系:在该链路拥塞等级相同,且该有效链路数不相同的情况下,该下发间隔与该有效链路数呈反相关关系;在该链路拥塞等级不相同,且该有效链路数相同的情况下,该下发间隔与该链路拥塞等级呈正相关关系。Optionally, the delivery interval, the number of effective links, and the link congestion level satisfy the following relationship: when the link congestion levels are the same and the number of effective links are different, the delivery interval is equal to The number of effective links has an inverse correlation; when the congestion levels of the links are different and the number of effective links is the same, the delivery interval has a positive correlation with the congestion level of the link.
可选地,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,包括:读取令牌请求队列;根据预先配置的指定队列的权重向该令牌请求队列中的该指定队列下发令牌。Optionally, adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components includes: reading the token request queue; The specified queue in the token request queue issues the token.
可选地,在满足以下条件一和条件二的情况下,允许该指定队列进入该令牌请求队列:Optionally, the specified queue is allowed to enter the token request queue when the following conditions 1 and 2 are met:
该条件一包括:该指定队列的令牌数小于停止申请门限,以及,该指定队列不在该令牌请求队列中;该条件二包括:该指定队列得到了授权,或者,该指定队列被轮询,或者,该令牌请求队列中存在空位。The first condition includes: the number of tokens in the designated queue is less than the stop application threshold, and the designated queue is not in the token request queue; the second condition includes: the designated queue is authorized, or the designated queue is polled , or there is a gap in the token request queue.
可选地,在根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌之后,该方法还包括:根据调整后的结果向上级队列申请授权。Optionally, after adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components, the method further includes: applying for authorization to the upper-level queue according to the adjusted result.
可选地,根据调整后的结果向上级队列申请授权,包括:根据指定队列的令牌数、有效链路数和链路拥塞等级确定是否向该上级队列申请授权,其中,在确定为是的情况下,向该上级队列申请授权。Optionally, apply for authorization to the upper-level queue based on the adjusted result, including: determining whether to apply for authorization to the upper-level queue based on the number of tokens, the number of valid links, and the link congestion level of the specified queue, where, after determining that it is yes, In this case, apply for authorization from the superior queue.
可选地,在确定为是的情况下,向该上级队列申请授权,包括:根据有效链路数、链路拥塞等级和该指定队列的令牌数生成授权请求信息;将该授权请求信息发送给该上级队列。Optionally, if it is determined to be yes, apply for authorization from the upper-level queue, including: generating authorization request information based on the number of effective links, the link congestion level and the number of tokens of the designated queue; sending the authorization request information to the superior queue.
在本实施例中还提供了一种令牌的调整装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a token adjustment device, which is used to implement the above embodiments and preferred implementations. What has already been described will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的令牌的调整装置的结构框图,如图3所示,该装置包括:Figure 3 is a structural block diagram of a token adjustment device according to an embodiment of the present invention. As shown in Figure 3, the device includes:
接收模块31,用于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;The receiving module 31 is used to receive a token, wherein the token is issued according to the issuing interval. The issuing interval is determined according to the number of effective links and the link congestion level. The received token is multiple Shared by all traffic management components;
调整模块33,用于根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。The adjustment module 33 is configured to adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
通过上述模块,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以解决相关技术中授权不合理导致流量管理效果较差问题,达到提高流量管理效率的技术效果。Through the above module, due to receiving a token, where the token is issued according to the issuance interval, the issuance interval is determined based on the number of effective links and the link congestion level, and the received token is multiple Shared by the traffic management components; the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Therefore, the problem of poor traffic management effect caused by unreasonable authorization in related technologies can be solved. , to achieve the technical effect of improving traffic management efficiency.
可选地,该下发间隔、该有效链路数和该链路拥塞等级,满足以下关系:在该链路拥塞等级相同,且该有效链路数不相同的情况下,该下发间隔与该有效链路数呈反相关关系;在该链路拥塞等级不相同,且该有效链路数相同的情况下,该下发间隔与该链路拥塞等级呈正相关关系。Optionally, the delivery interval, the number of effective links, and the link congestion level satisfy the following relationship: when the link congestion levels are the same and the number of effective links are different, the delivery interval is equal to The number of effective links has an inverse correlation; when the congestion levels of the links are different and the number of effective links is the same, the delivery interval has a positive correlation with the congestion level of the link.
可选地,调整模块33,包括:读取模块,用于读取令牌请求队列;下发模块,用于根据预先配置的指定队列的权重向该令牌请求队列中的该指定队列下发令牌。Optionally, the adjustment module 33 includes: a reading module for reading the token request queue; and a issuing module for issuing to the designated queue in the token request queue according to the pre-configured weight of the designated queue. Token.
可选地,在满足以下条件一和条件二的情况下,允许该指定队列进入该令牌请求队列:该条件一包括:该指定队列的令牌数小于停止申请门限,以及,该指定队列不在该令牌请求队列中;该条件二包括:该指定队列得到了授权,或者,该指定队列被轮询,或者,该令牌请求队列中存在空位。Optionally, the specified queue is allowed to enter the token request queue when the following conditions 1 and 2 are met: The condition 1 includes: the number of tokens in the specified queue is less than the stop application threshold, and the specified queue is not in the token request queue. in the token request queue; the second condition includes: the specified queue is authorized, or the specified queue is polled, or there is a vacancy in the token request queue.
可选地,该装置还包括:申请模块,用于在根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌之后,根据调整后的结果向上级队列申请授权。Optionally, the device further includes: an application module, configured to, after adjusting the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components, submit the application to the upper level according to the adjusted result. Queue request authorization.
可选地,该申请模块,包括:申请子模块,用于根据指定队列的令牌数、有效链路数和链路拥塞等级确定是否向该上级队列申请授权,其中,在确定为是的情况下,向该上级队列申请授权。Optionally, the application module includes: an application sub-module, used to determine whether to apply for authorization from the upper-level queue based on the number of tokens, the number of valid links, and the link congestion level of the specified queue, wherein, if it is determined to be yes, Next, apply for authorization from the superior queue.
可选地,该申请子模块包括:申请单元,用于在确定为是的情况下,根据有效链路数、链路拥塞等级和该指定队列的令牌数生成授权请求信息;发送单元,用于将该授权请求信息发送给该上级队列。Optionally, the application sub-module includes: an application unit, used to generate authorization request information based on the number of effective links, the link congestion level and the number of tokens of the specified queue if the determination is yes; a sending unit, used to To send the authorization request information to the superior queue.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but is not limited to this: the above modules are all located in the same processor; or the above modules can be implemented in any combination. The forms are located in different processors.
可选实施方式Alternative implementations
本发明实施例提供了一种调整装置,可以协调在两个独立的流量管理模块。在队列申请授权时,根据交换网拥塞情况,自动控制部分授权申请,使两个core之间协调使用交换网的带宽。The embodiment of the present invention provides an adjustment device that can coordinate two independent traffic management modules. When the queue applies for authorization, some authorization applications are automatically controlled based on the congestion situation of the switching network, so that the two cores coordinate the use of the bandwidth of the switching network.
两个拥塞管理模块,满足一定条件时,从下到上逐级申请授权。L0级各队列0~m0,依次向L1级各队列申请授权L0_apply[(m0-1):0]。L1各队列0~m1也依次向上一级申请授权,L4各队列依次向L5申请授权L4_apply[(m4-1):0]。在挂接正常时,按照每级队列配置的优先级和权重等,从上到下逐级下发授权。L5级向L4级下发授权,授权使能L4_val、授权的队列号L4_qnum。L4再逐级下发,最后到L0_val、L0_qnum。图4是根据本发明可选实施例的两个拥塞管理模块间添加调整装置的的结构示意图,如图4所示,本实施例中增加了调整模块,该调整模块是一种单芯片调度模块,该调整模块可以添加在某一级,如加在L3到L4两级之间。下面都是按照该调整模块添加在L3级举例说明。本实施提供的装置的输入信号是根据链路数和拥塞等级,经过计算,得到core0、core1的L3级各队列能否向上申请授权的添加条件con_rdy_c0、con_rdy_c1。这些条件与原来的L3_apply_c0、L3_apply_c1按位相与后,生成新的core0、core1向L4级申请授权的信号L3_apply_new_c0[(n0-1):0]、L3_apply_new_c1[(n1-1):0]。从而影响到core0、core1级的申请授权信号。其中,增加的这个向上申请授权的条件con_rdy_c0、con_rdy_c1,受拥塞等级和有效链路数控制。在拥塞时或者链路数变化时,con_rdy_0和con_rdy_1各队列有对应位的变化,则向上申请授权使能变化,从而自动调节两个core下发的授权。The two congestion management modules apply for authorization level by level from bottom to top when certain conditions are met. Each queue at L0 level 0~m0 applies for authorization L0_apply[(m0-1):0] from each queue at L1 level in turn. Each queue 0~m1 of L1 also applies to the upper level for authorization in turn, and each queue of L4 applies to L5 for authorization L4_apply[(m4-1):0]. When the connection is normal, authorization is issued level by level from top to bottom according to the priority and weight configured for each level of queue. The L5 level issues authorization to the L4 level, and the authorization enables L4_val and the authorized queue number L4_qnum. L4 then delivers it step by step, finally reaching L0_val and L0_qnum. Figure 4 is a schematic structural diagram of adding an adjustment device between two congestion management modules according to an optional embodiment of the present invention. As shown in Figure 4, an adjustment module is added in this embodiment. The adjustment module is a single-chip scheduling module. , the adjustment module can be added at a certain level, such as between L3 and L4. The following are examples of adding the adjustment module at the L3 level. The input signal of the device provided by this implementation is based on the number of links and congestion level. After calculation, the additional conditions con_rdy_c0 and con_rdy_c1 for whether the L3 queues of core0 and core1 can apply upward for authorization are obtained. After these conditions are bitwise ANDed with the original L3_apply_c0 and L3_apply_c1, new core0 and core1 signals L3_apply_new_c0[(n0-1):0] and L3_apply_new_c1[(n1-1):0] are generated to apply for authorization from the L4 level. This affects the application authorization signals at core0 and core1 levels. Among them, the added conditions con_rdy_c0 and con_rdy_c1 for upward application authorization are controlled by the congestion level and the number of effective links. When there is congestion or when the number of links changes, if the corresponding bits in each queue of con_rdy_0 and con_rdy_1 change, the authorization enable change will be applied upward, thereby automatically adjusting the authorization issued by the two cores.
示例性地,交换链路会根据信元缓存的状态将拥塞分为等级,有时候交换连接的有效链路数也会变化。交换接口把这个拥塞等级和有效链路汇总发到内部流量管理模块。流量管理中的拥塞管理模块会根据拥塞等级和有效链路数这两个维度,减少各队列令牌申请,然后减少授权下发,从而使收发的报文减少,减少交换网络的拥塞。For example, switching links will classify congestion into levels based on the status of the cell cache, and sometimes the number of effective links in the switching connection will also change. The switching interface sends this congestion level and effective link summary to the internal traffic management module. The congestion management module in traffic management will reduce token applications for each queue based on the two dimensions of congestion level and number of effective links, and then reduce authorization issuance, thereby reducing the number of messages sent and received and reducing congestion on the switching network.
图5是根据本发明可选实施例的流量均衡装置的结构示意图,如图5所示,本实施例的装置分为3个模块:单芯片令牌管理模块,core0、core1的L3级单队列令牌管理模块,单队列fifo管理模块。Figure 5 is a schematic structural diagram of a traffic balancing device according to an optional embodiment of the present invention. As shown in Figure 5, the device in this embodiment is divided into three modules: a single-chip token management module, and L3 single queues of core0 and core1. Token management module, single queue fifo management module.
单芯片令牌管理模块用于:计算维护两个core总令牌数量。首先根据反馈的拥塞等级con_level和有效链路数,来查询预先配置好的单芯片令牌下发间隔。按照令牌下发间隔,添加到两个core的总令牌。同时当令牌从总令牌下发给core0、core1的L3级单队列令牌时,在单芯片总令牌中减掉令牌。维护令牌数量,控制是否响应单队列fifo出队请求。The single-chip token management module is used to calculate and maintain the total number of tokens in two cores. First, the preconfigured single-chip token issuance interval is queried based on the feedback congestion level con_level and the number of effective links. The total tokens added to the two cores according to the token issuance interval. At the same time, when tokens are issued from the total token to the L3 single queue tokens of core0 and core1, the token is subtracted from the total token of the single chip. Maintain the number of tokens and control whether to respond to single-queue fifo dequeue requests.
单队列令牌管理模块用于:计算维护core0、core1的L3级单个队列令牌数量。当单芯片总令牌模块按照core0、core1各队列配置权重下发令牌给单队列时,向该队列添加令牌。当该级有队列向上申请授权并且得到授权时,减掉该队列令牌。维护core0、core1的L3级的所有队列的令牌。The single queue token management module is used to calculate and maintain the number of L3 single queue tokens for core0 and core1. When the single-chip total token module issues tokens to a single queue according to the configured weights of each queue in core0 and core1, the token is added to the queue. When a queue at this level applies for authorization and is authorized, the queue token is deducted. Maintain the tokens of all queues at the L3 level of core0 and core1.
单队列fifo管理模块用于:core0、core1的L3级各队列需要进入该fifo,按固定时隙排队向单芯片令牌管理模块申请令牌。管理各队列的入队、出队相关操作。The single-queue fifo management module is used: Each L3-level queue of core0 and core1 needs to enter the fifo, queue up according to fixed time slots, and apply for tokens from the single-chip token management module. Manage the entry and dequeue related operations of each queue.
本实施例在两个拥塞管理之间,在不同的链路总带宽、不同的交换拥塞程度下,按照L3级各队列配置权重,自动调整下发的每个队列的流量,并且使得单芯片总流量不会超过链路可承受的总带宽。在交换拥塞时适当下调流量,来减轻交换的拥塞程度。In this embodiment, between two congestion management systems, under different total link bandwidths and different switching congestion levels, the traffic of each queue is automatically adjusted according to the weight configured for each queue at the L3 level, and the total traffic of each queue is adjusted on a single chip. Traffic will not exceed the total bandwidth that the link can sustain. When the exchange is congested, the traffic is appropriately reduced to reduce the congestion level of the exchange.
本实施例可以在不同的交换拥塞程度下,自动的调整下发的流量,使得流量不会超过链路可承受的总带宽。并且在交换拥塞时适当下调流量,来控制交换的拥塞程度。通过控制core0、core1的L3级各队列的授权申请信号,来间接控制授权下发,实现有交换网拥塞或者链路变化时,两个core的流量均衡。This embodiment can automatically adjust the delivered traffic under different switching congestion levels so that the traffic does not exceed the total bandwidth that the link can bear. And when the exchange is congested, the traffic is appropriately reduced to control the congestion level of the exchange. By controlling the authorization application signals of each L3 queue of core0 and core1, the authorization issuance is indirectly controlled to achieve traffic balance between the two cores when there is switching network congestion or link changes.
图6是根据本发明可选实施例的core0、core1的L3级各队列具体令牌示意图,如图6所示,单芯片令牌管理维护两个core总的令牌值。单队列令牌管理模块,是维护core0和core1下面所有队列的令牌值,core的0队列号是{1’b0,core0_que_id},core1的队列号是{1’b1,core1_que_id}。core0、core1的所有队列满足一定条件时,写入单队列fifo,排队向单芯片申请自己队列的单队列令牌。轮到某队列时,单芯片令牌值分配给该队列令牌。Figure 6 is a schematic diagram of specific tokens for each L3 queue of core0 and core1 according to an optional embodiment of the present invention. As shown in Figure 6, single-chip token management maintains the total token value of the two cores. The single queue token management module maintains the token values of all queues under core0 and core1. The queue number of core 0 is {1’b0, core0_que_id}, and the queue number of core1 is {1’b1, core1_que_id}. When all the queues of core0 and core1 meet certain conditions, they write to the single queue fifo and queue up to apply to the single chip for the single queue token of their own queue. When it is a queue's turn, the single-chip token value is assigned to the queue token.
图7是根据本发明可选实施例的单芯片令牌添加和消耗过程的流程图,如图7所示,单芯片令牌添加和消耗过程流程。对于单芯片令牌管理来说,总令牌值添加,根据反馈的拥塞等级和有效链路,查询单芯片令牌下发间隔interval。固定每隔interval个周期,向总令牌值添加一个令牌。Figure 7 is a flow chart of a single-chip token addition and consumption process according to an optional embodiment of the present invention. As shown in Figure 7, the single-chip token addition and consumption process flow. For single-chip token management, the total token value is added, and the single-chip token issuance interval is queried based on the feedback congestion level and effective links. Fixed to add a token to the total token value every interval cycles.
单芯片令牌下发间隔配置,规则如下:同一拥塞等级下,配置下发间隔跟有效链路数成反比关系,使得单芯片总流量不会超过链路可承受的总带宽。The rules for single-chip token issuance interval configuration are as follows: under the same congestion level, the configuration issuance interval is inversely proportional to the number of effective links, so that the total traffic on a single chip will not exceed the total bandwidth that the link can bear.
有效链路可承受流量决定了单芯片令牌下发间隔,关系如以下公式:。The traffic that an effective link can withstand determines the single-chip token issuance interval, and the relationship is as follows:.
crdt_value/(interval*T)=data_flowcrdt_value/(interval*T)=data_flow
其中crdt_value为core0、core1的授权价值,interval为实际单芯片令牌下发间隔,T为芯片时钟周期长度,data_flow为有效链路可承受的总带宽。Among them, crdt_value is the authorization value of core0 and core1, interval is the actual single-chip token issuance interval, T is the chip clock cycle length, and data_flow is the total bandwidth that the effective link can bear.
相同拥塞等级下,有效链路数变化,可承受的总带宽data_flow也在变化。每条有效链路所支持的最大带宽相加,就是有效链路可承受的总带宽。不同拥塞等级下,有效链路数相同时,下发间隔按照一定的比例变化。Under the same congestion level, when the number of effective links changes, the total bandwidth data_flow that can be tolerated also changes. The sum of the maximum bandwidth supported by each effective link is the total bandwidth that the effective link can bear. Under different congestion levels, when the number of effective links is the same, the delivery interval changes according to a certain proportion.
单芯片令牌值减少,当等待单队列fifo不为空,并且单芯片总令牌大于0时,表示有队列可以向单芯片令牌管理申请令牌。此时读出单队列fifo中的队列信息,读出该队列对应core0或者core1内配置的权重信息。按照该队列配置的权重weight,在单芯片令牌值减掉weight个令牌。The single-chip token value decreases. When the waiting single-queue fifo is not empty and the total single-chip tokens are greater than 0, it means that there is a queue that can apply for tokens from the single-chip token management. At this time, read the queue information in the single queue fifo, and read the weight information configured in core0 or core1 corresponding to the queue. According to the weight configured in the queue, weight tokens are subtracted from the single-chip token value.
图8是根据本发明可选实施例的单队列fifo入队、出队相关操作的流程图,如图8所示,单队列fifo入队、出队相关操作流程。首先core0和core1的每个队列,有三次进入单队列fifo的机会。一是在core0有队列得到授权、core1有队列有得到授权。二是在轮询扫描时刻,为了避免一些特殊情况长久没服务到的队列,固定时间如32clk为周期,从队列号0开始到最大队列号,轮询检查全部队列的令牌值。三是在入队fifo读出后,向该单队列添加完weight个令牌后。同时该队列令牌值为负,或者为正且令牌值小于单队列停止申请门限apply_off_th时,并且该队列不在单队列fifo中(即enq_flag标志为0),则写入单队列fifo中。同时将该队列在不在单队列fifo中的标志enq_flag写为1。写入单队列fifo后,代表该队列排队等待向单芯片令牌管理模块申请令牌。Figure 8 is a flowchart of operations related to the entry and dequeuing of a single queue fifo according to an optional embodiment of the present invention. As shown in Figure 8, the related operations flow of the entry and dequeuing of a single queue fifo. First, each queue of core0 and core1 has three opportunities to enter the single-queue fifo. First, there is a queue in core0 that is authorized, and there is a queue in core1 that is authorized. Second, at the time of polling scanning, in order to avoid some special situations where queues have not been served for a long time, a fixed time such as 32clk is used as a cycle, starting from queue number 0 to the maximum queue number, and polling checks the token values of all queues. The third is after the queued fifo is read and weight tokens are added to the single queue. At the same time, when the queue token value is negative, or positive and the token value is less than the single queue stop application threshold apply_off_th, and the queue is not in the single queue fifo (that is, the enq_flag flag is 0), it is written to the single queue fifo. At the same time, write the flag enq_flag of whether the queue is in the single queue fifo to 1. After writing to the single-queue fifo, the queue is queued to apply for a token from the single-chip token management module.
在固定时隙,并且单队列fifo不为空时,读取fifo内的队列信息,并且该队列在不在单队列fifo中的标志enq_flag写为0。将然后读取该core该队列的分配权重weight。根据队列信息和分配权重,单芯片令牌值减掉weight个令牌,该队列的令牌值加上weight个令牌。维护更新单芯片令牌值和该队列令牌值。In a fixed time slot and the single-queue fifo is not empty, the queue information in the fifo is read, and the flag enq_flag of the queue that is not in the single-queue fifo is written as 0. The allocation weight of the queue for that core will then be read. According to the queue information and allocation weight, the token value of a single chip is subtracted by weight tokens, and the token value of the queue is added by weight tokens. Maintain and update the single chip token value and the queue token value.
图9是根据本发明可选实施例的单队列令牌添加和消耗过程的流程图,如图9所示,单队列令牌添加和消耗过程流程。对单队列令牌值来说,该core该L3级队列得到单芯片分发的weight个令牌后,与原来该队列的令牌值相加后,维护更新该队列令牌值。该队列令牌值减少,是该core该L3级队列得到授权后,对该队列对应令牌值减1操作,维护更新该队列令牌值。这样,core0和core1在同一级下面按照各core各队列权重均衡得到令牌。根据每个队列的令牌值,计算两个core申请授权添加条件信号con_rdy,影响是否向上一级申请授权。例如,如果该core0该队列令牌值小于等于0,则con_rdy_c0[i]=0,(i为{1’b0,core0_que_id})。如果该core0该队列令牌值大于0,则con_rdy_c0[i]=1。同理core1生成con_rdy_c1[(n1-1):0]。Figure 9 is a flow chart of a single queue token addition and consumption process according to an optional embodiment of the present invention. As shown in Figure 9, the single queue token addition and consumption process flow. For a single queue token value, after the core L3 level queue obtains weight tokens distributed by a single chip, it is added to the original token value of the queue, and then the queue token value is maintained and updated. The token value of the queue is reduced because after the L3 queue of the core is authorized, the token value corresponding to the queue is reduced by 1 to maintain and update the token value of the queue. In this way, core0 and core1 obtain tokens at the same level according to the weight of each core and queue. Based on the token value of each queue, the two cores are calculated to apply for authorization and add the condition signal con_rdy, which affects whether to apply for authorization to the upper level. For example, if the core0 queue token value is less than or equal to 0, then con_rdy_c0[i]=0, (i is {1'b0, core0_que_id}). If the queue token value of core0 is greater than 0, then con_rdy_c0[i]=1. In the same way, core1 generates con_rdy_c1[(n1-1):0].
两个core,得到core0、core1的L3级各队列能否向上申请授权的添加条件con_rdy_c0[(n0-1):0]、con_rdy_c1[(n1-1):0]。这些条件与原来的L3_apply_c0[(n0-1):0]、L3_apply_c1[(n1-1):0]按位相与后,生成新的core0、core1向L4级申请授权的信号L3_apply_new_c0[(n0-1):0]、L3_apply_new_c1[(n1-1):0]。Two cores are used to obtain the added conditions con_rdy_c0[(n0-1):0] and con_rdy_c1[(n1-1):0] for whether each L3 queue of core0 and core1 can apply for authorization. After these conditions are phased with the original L3_apply_c0[(n0-1):0] and L3_apply_c1[(n1-1):0], new core0 and core1 are generated to apply for authorization signals from the L4 level L3_apply_new_c0[(n0-1 ):0], L3_apply_new_c1[(n1-1):0].
以上本实施例所述,只是两个流量管理间的实施案例而已,并非本发明的限定范围,同样适用于多个流量管理间的自动均衡流量。The above embodiment is only an implementation example of two traffic management rooms, and is not a limited scope of the present invention. It is also applicable to automatic balancing of traffic among multiple traffic management rooms.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
本发明的实施例还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。Embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute any of the above method embodiments when running. step.
可选地,在本实施例中,上述计算机可读的存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for performing the following steps:
步骤S1,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;Step S1: Receive a token. The token is issued according to the issuance interval. The issuance interval is determined based on the number of effective links and the link congestion level. The received token is for multiple traffic management. shared by components;
步骤S2,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。Step S2: Adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以解决相关技术中授权不合理导致流量管理效果较差问题,达到提高流量管理效率的技术效果。Through the above steps, since the token is received, where the token is issued according to the issuance interval, and the issuance interval is determined based on the number of effective links and the link congestion level, the received token is multiple Shared by the traffic management components; the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Therefore, the problem of poor traffic management effect caused by unreasonable authorization in related technologies can be solved. , to achieve the technical effect of improving traffic management efficiency.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference can be made to the examples described in the above-mentioned embodiments and optional implementations, and details will not be described again in this embodiment.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above storage medium may include but is not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), Various media that can store computer programs, such as removable hard drives, magnetic disks, or optical disks.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to perform the following steps through a computer program:
步骤S1,接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;Step S1: Receive a token. The token is issued according to the issuance interval. The issuance interval is determined based on the number of effective links and the link congestion level. The received token is for multiple traffic management. shared by components;
步骤S2,根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌。Step S2: Adjust the tokens of the queues of the multiple traffic management components according to the total number of tokens shared by the multiple traffic management components.
通过上述步骤,由于接收令牌,其中,该令牌是按照下发间隔下发的,该下发间隔是根据有效链路数和链路拥塞等级所确定的,接收的该令牌为多个流量管理组件所共用;根据该多个流量管理组件所共用的总令牌数调整该多个流量管理组件的队列的令牌,因此,可以解决相关技术中授权不合理导致流量管理效果较差问题,达到提高流量管理效率的技术效果。Through the above steps, since the token is received, where the token is issued according to the issuance interval, and the issuance interval is determined based on the number of effective links and the link congestion level, the received token is multiple Shared by the traffic management components; the tokens of the queues of the multiple traffic management components are adjusted according to the total number of tokens shared by the multiple traffic management components. Therefore, the problem of poor traffic management effect caused by unreasonable authorization in related technologies can be solved. , to achieve the technical effect of improving traffic management efficiency.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference can be made to the examples described in the above-mentioned embodiments and optional implementations, and details will not be described again in this embodiment.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented using general-purpose computing devices. They can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. , optionally, they may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by the computing device, and in some cases, may be in a sequence different from that herein. The steps shown or described are performed either individually as individual integrated circuit modules, or as multiple modules or steps among them as a single integrated circuit module. As such, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention shall be included in the protection scope of the present invention.
Claims (7)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911285491.8A CN112995058B (en) | 2019-12-13 | 2019-12-13 | Token adjusting method and device |
PCT/CN2020/136161 WO2021115482A1 (en) | 2019-12-13 | 2020-12-14 | Token adjusting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911285491.8A CN112995058B (en) | 2019-12-13 | 2019-12-13 | Token adjusting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112995058A CN112995058A (en) | 2021-06-18 |
CN112995058B true CN112995058B (en) | 2023-11-24 |
Family
ID=76329639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911285491.8A Active CN112995058B (en) | 2019-12-13 | 2019-12-13 | Token adjusting method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112995058B (en) |
WO (1) | WO2021115482A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113783727B (en) * | 2021-09-07 | 2024-04-26 | 山石网科通信技术股份有限公司 | Method and device for adjusting bandwidth of distributed equipment, storage medium and processor |
CN115118671B (en) * | 2022-05-30 | 2024-01-26 | 中国信息通信研究院 | Method and device, electronic equipment, and storage medium for token ring scheduling |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8504691B1 (en) * | 2010-12-29 | 2013-08-06 | Amazon Technologies, Inc. | System and method for allocating resources for heterogeneous service requests |
CN104753809A (en) * | 2013-12-25 | 2015-07-01 | 深圳市中兴微电子技术有限公司 | Method and device for adding token into traffic shaping |
CN105791155A (en) * | 2014-12-24 | 2016-07-20 | 深圳市中兴微电子技术有限公司 | Method and device for managing congested traffic |
CN108848038A (en) * | 2018-08-30 | 2018-11-20 | 华为技术有限公司 | Flow managing method and token bucket node based on token bucket |
-
2019
- 2019-12-13 CN CN201911285491.8A patent/CN112995058B/en active Active
-
2020
- 2020-12-14 WO PCT/CN2020/136161 patent/WO2021115482A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8504691B1 (en) * | 2010-12-29 | 2013-08-06 | Amazon Technologies, Inc. | System and method for allocating resources for heterogeneous service requests |
CN104753809A (en) * | 2013-12-25 | 2015-07-01 | 深圳市中兴微电子技术有限公司 | Method and device for adding token into traffic shaping |
CN105791155A (en) * | 2014-12-24 | 2016-07-20 | 深圳市中兴微电子技术有限公司 | Method and device for managing congested traffic |
CN108848038A (en) * | 2018-08-30 | 2018-11-20 | 华为技术有限公司 | Flow managing method and token bucket node based on token bucket |
Also Published As
Publication number | Publication date |
---|---|
CN112995058A (en) | 2021-06-18 |
WO2021115482A1 (en) | 2021-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2466824B1 (en) | Service scheduling method and device | |
EP3453148B1 (en) | System and method for latency-based queuing | |
US7430211B2 (en) | System and method for receive queue provisioning | |
WO2019205371A1 (en) | Server, message allocation method, and storage medium | |
US11586392B2 (en) | Multi-stream SSD QoS management | |
CN111158878B (en) | Resource transfer request thread control method, device and storage medium | |
CN113742114B (en) | Method and device for limiting system current | |
CN112995058B (en) | Token adjusting method and device | |
TW202121274A (en) | Cloud resource management method and apparatus, and electronic device and computer readable storage medium | |
CN112600761B (en) | Resource allocation method, device and storage medium | |
CN112749002A (en) | Method and device for dynamically managing cluster resources | |
CN114155026A (en) | A resource allocation method, device, server and storage medium | |
US11709707B2 (en) | Low latency distributed counters for quotas | |
CN115550284A (en) | Message processing method, device and equipment | |
WO2019109902A1 (en) | Queue scheduling method and apparatus, communication device, and storage medium | |
CN111131066B (en) | Traffic shaping method and device | |
WO2020244498A1 (en) | Method, apparatus, and system for processing messages in server system | |
CN115914236B (en) | Storage space allocation adjustment method and device, electronic equipment and storage medium | |
CN115378879A (en) | Data control method and related device | |
CN105519055A (en) | Dynamic equilibrium method and apparatus for QoS of I/O channel | |
CN114443241A (en) | A task dynamic scheduling method, task delivery method and device thereof | |
CN105306578A (en) | Method and device for storing content | |
CN118301085B (en) | Descriptor-based DPU network card priority scheduling method, device, medium and terminal | |
TWI831159B (en) | Storage expansion method, apparatus, storage media and electronic device | |
CN116320031A (en) | Server response method, device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |