CN112995058A - Token adjusting method and device - Google Patents

Token adjusting method and device Download PDF

Info

Publication number
CN112995058A
CN112995058A CN201911285491.8A CN201911285491A CN112995058A CN 112995058 A CN112995058 A CN 112995058A CN 201911285491 A CN201911285491 A CN 201911285491A CN 112995058 A CN112995058 A CN 112995058A
Authority
CN
China
Prior art keywords
queue
token
tokens
traffic management
management components
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
CN201911285491.8A
Other languages
Chinese (zh)
Other versions
CN112995058B (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
Sanechips 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 Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Priority to CN201911285491.8A priority Critical patent/CN112995058B/en
Priority to PCT/CN2020/136161 priority patent/WO2021115482A1/en
Publication of CN112995058A publication Critical patent/CN112995058A/en
Application granted granted Critical
Publication of CN112995058B publication Critical patent/CN112995058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/21Flow control; Congestion control using leaky-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping

Landscapes

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

Abstract

The invention provides a token adjusting method and a token adjusting device, wherein the adjusting method comprises the following steps: receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; the tokens of the queues of the traffic management components are adjusted according to the total number of the tokens shared by the traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.

Description

Token adjusting method and device
Technical Field
The invention relates to the field of communication, in particular to a token adjusting method and device.
Background
In a new switching access chip, when the clock frequency is limited, there is a mode of adopting two or more sets of traffic management components to reach higher traffic management. Two sets are exemplified here. The two sets of components are independent from each other and can exchange data with the opposite end chip through exchanging all links. And when the current flows normally, the two sets of components pass through all links to a switching network. For example, when the effective link of the switch network changes, the chip has two cores, and the switch network does not know how many grants each core should issue to the opposite end, so that how much bandwidth each core should use in coordination cannot be provided.
Aiming at the problem of poor traffic management effect caused by unreasonable authorization in the related art, no better solution exists.
Disclosure of Invention
The embodiment of the invention provides a token adjusting method and a token adjusting device, which are used for at least solving the problem of poor traffic management effect caused by unreasonable authorization in the related art.
According to an embodiment of the present invention, there is provided a token adjusting method, including: receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of traffic management components; and adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components.
According to another embodiment of the present invention, there is provided a token adjusting apparatus including: the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving tokens, the tokens are sent according to a sending interval, the sending interval is determined according to the effective link number and the link congestion level, and the received tokens are shared by a plurality of flow management components; and the adjusting module is used for adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to carry out the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the embodiment of the invention, the token is received, wherein the token is issued according to the issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; and adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of managing tokens according to an embodiment of the invention;
fig. 3 is a block diagram of a structure of a management apparatus of a token according to an embodiment of the present invention;
fig. 4 is a schematic diagram of the structure of an addition adjustment device between two congestion management modules according to an alternative embodiment of the present invention;
FIG. 5 is a schematic diagram of a flow equalization apparatus according to an alternative embodiment of the present invention;
FIG. 6 is a diagram of specific tokens for L3 queues of core0 and core1 in accordance with an alternative embodiment of the present invention;
FIG. 7 is a flow diagram of a single chip token addition and consumption process in accordance with an alternative embodiment of the present invention;
FIG. 8 is a flowchart of single queue fifo enqueue, dequeue related operations in accordance with an alternative embodiment of the present invention;
fig. 9 is a flow diagram of a single queue token addition and consumption process in accordance with an alternative embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a management device, a computer terminal, or a similar computing device. Taking the example of running on a management device, fig. 1 is a hardware configuration 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 apparatus 10 may include one or more processors 102 (only one is shown in fig. 1) (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, and optionally, a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the 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.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the token adjustment method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The 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 from the processor 102, which may be connected to the management device 10 over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the management apparatus 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for adjusting a token operating in the mobility management device is provided, and fig. 2 is a flowchart of a method for adjusting a token according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components;
step S204, the token of the queue of the plurality of traffic management components is adjusted according to the total token number shared by the plurality of traffic management components.
Through the steps, the token is received, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; the tokens of the queues of the traffic management components are adjusted according to the total number of the tokens shared by the traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.
Optionally, the issuing interval, the number of effective links, and the congestion level of the link satisfy the following relationship: under the condition that the link congestion levels are the same and the effective link numbers are different, the issuing interval and the effective link numbers are in an anti-correlation relationship; and under the condition that the link congestion levels are different and the effective links are the same, the issuing interval and the link congestion level are in positive correlation.
Optionally, adjusting the tokens of the queues of the traffic management components according to the total number of tokens shared by the traffic management components includes: reading a token request queue; and issuing the token to the specified queue in the token request queue according to the preset weight of the specified queue.
Optionally, the specified queue is allowed to enter the token request queue if the following condition one and condition two are satisfied:
the first condition comprises the following steps: the number of tokens in the appointed queue is less than the stop application threshold, and the appointed queue is not in the token request queue; the second condition comprises the following steps: the designated queue is granted, or the designated queue is polled, or a vacancy exists in the token request queue.
Optionally, after adjusting the tokens of the queues of the plurality of traffic management components according to the total number of tokens shared by the plurality of traffic management components, the method further comprises: and applying for authorization to the superior queue according to the adjusted result.
Optionally, applying for authorization from the upper queue according to the adjusted result, including: and determining whether to apply authorization to the upper queue according to the token number, the effective link number and the link congestion level of the specified queue, wherein if the determination is yes, the authorization is applied to the upper queue.
Optionally, in a case that the determination is yes, applying for authorization to the upper queue includes: generating authorization request information according to the number of effective links, the congestion level of the links and the number of tokens in the appointed queue; and sending the authorization request information to the upper queue.
In this embodiment, a token adjusting apparatus is further provided, and the token adjusting apparatus is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a token adjustment apparatus according to an embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
a receiving module 31, configured to receive a token, where the token is issued according to an issue interval, the issue interval is determined according to an effective link number and a link congestion level, and the received token is shared by multiple traffic management components;
the adjusting module 33 is configured to adjust the tokens of the queues of the traffic management components according to the total number of tokens shared by the traffic management components.
Through the module, the token is received, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; the tokens of the queues of the traffic management components are adjusted according to the total number of the tokens shared by the traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.
Optionally, the issuing interval, the number of effective links, and the congestion level of the link satisfy the following relationship: under the condition that the link congestion levels are the same and the effective link numbers are different, the issuing interval and the effective link numbers are in an anti-correlation relationship; and under the condition that the link congestion levels are different and the effective links are the same, the issuing interval and the link congestion level are in positive correlation.
Optionally, the adjusting module 33 includes: the reading module is used for reading the token request queue; and the issuing module is used for issuing the token to the specified queue in the token request queue according to the weight of the preset specified queue.
Optionally, the specified queue is allowed to enter the token request queue if the following condition one and condition two are satisfied: the first condition comprises the following steps: the number of tokens in the appointed queue is less than the stop application threshold, and the appointed queue is not in the token request queue; the second condition comprises the following steps: the designated queue is granted, or the designated queue is polled, or a vacancy exists in the token request queue.
Optionally, the apparatus further comprises: and the application module is used for applying authorization to a superior queue according to an adjusted result after adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components.
Optionally, the application module includes: and the application submodule is used for determining whether to apply authorization to the upper queue according to the token number, the effective link number and the link congestion level of the specified queue, wherein if the token number, the effective link number and the link congestion level are determined to be yes, authorization is applied to the upper queue.
Optionally, the application submodule includes: the application unit is used for generating authorization request information according to the number of effective links, the congestion level of the links and the number of tokens of the specified queue under the condition that the determination is positive; and the sending unit is used for sending the authorization request information to the upper-level queue.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Alternative embodiments
The embodiment of the invention provides an adjusting device which can coordinate two independent flow management modules. When the queue applies for authorization, the automatic control part authorizes the application according to the congestion condition of the exchange network, so that the two cores can coordinately use the bandwidth of the exchange network.
And the two congestion management modules apply for authorization step by step from bottom to top when certain conditions are met. The queues 0-m 0 in the L0 level sequentially apply for the authority L0_ apply [ (m0-1):0] in the queues in the L1 level. The queues 0-m 1 of L1 also apply for authorization from the upper level in turn, and the queues L4 apply for authorization from L4_ apply from L5 in turn [ (m4-1):0 ]. When the hooking is normal, the authorization is issued from top to bottom step by step according to the priority, the weight and the like configured by each stage of queue. The L5 level issues grants to the L4 level, grant enable L4_ val, grant queue number L4_ qnum. And the L4 is issued step by step and finally reaches L0_ val and L0_ qnum. Fig. 4 is a schematic structural diagram of an apparatus for adding adjustment between two congestion management modules according to an alternative embodiment of the present invention, and as shown in fig. 4, an adjustment module is added in this embodiment, and the adjustment module is a single-chip scheduling module, and the adjustment module may be added at a certain stage, for example, between two stages L3 to L4. The following is illustrated at level L3 with the addition of the adjustment module. The input signals of the device provided by this embodiment are the adding conditions con _ rdy _ c0 and con _ rdy _ c1, which are obtained by calculation according to the number of links and the congestion level, whether each queue of the L3 level of core0 and core1 can apply authorization to the upper part. After the conditions are phase-ANDed with original L3_ application _ c0 and L3_ application _ c1, signals L3_ application _ new _ c0[ (n0-1):0] and L3_ application _ new _ c1[ (n1-1):0] are generated for new core0 and core1 to apply authorization to L4 level. Thereby affecting the core0, core1 level application authorization signals. The conditions con _ rdy _ c0 and con _ rdy _ c1 for this upward grant are added, controlled by the congestion level and the number of active links. When congestion occurs or the number of links changes, if the queues con _ rdy _0 and con _ rdy _1 have changes of corresponding bits, the requests for the change of authorization enabling are sent upwards, and thus authorization issued by two cores is automatically adjusted.
Illustratively, the switch links classify congestion into classes based on the state of the cell buffer, and sometimes the number of active links of the switch connection also changes. The switching interface aggregates this congestion level and the active link to the internal traffic management module. The congestion management module in the flow management can reduce the application of each queue token according to two dimensions of the congestion level and the effective link number, and then reduce the authorization issue, thereby reducing the message receiving and sending and reducing the congestion of a switching network.
Fig. 5 is a schematic structural diagram of a traffic balancing apparatus according to an alternative embodiment of the present invention, and as shown in fig. 5, the apparatus of this embodiment is divided into 3 modules: a single chip token management module, a core0, a L3 level single queue token management module of a core1, and a single queue fifo management module.
The single-chip token management module is used for: the count maintains two core total tokens. Firstly, inquiring a pre-configured single-chip token issuing interval according to the fed back congestion level con _ level and the effective link number. The total token added to both cores is in accordance with the token issuing interval. Meanwhile, when the token is sent to L3 level single queue token of core0 and core1 from the total token, the token is subtracted from the total token of the single chip. And maintaining the number of tokens and controlling whether to respond to the single queue fifo dequeue request.
The single queue token management module is configured to: the number of single queue tokens at the L3 level that maintain core0, core1 is calculated. When the single chip total token module issues tokens to the single queue according to the queue configuration weights of core0 and core1, the tokens are added to the queue. When the stage has queue up application authorization and is granted, the queue token is decremented. Tokens for all queues at the L3 level of core0, core1 are maintained.
The single queue fifo management module is used for: the L3-level queues of the core0 and the core1 need to enter the fifo, and queue to the single-chip token management module according to the fixed time slot to apply for the token. And managing enqueue and dequeue related operations of each queue.
In this embodiment, between two congestion managements, under different total link bandwidths and different exchange congestion degrees, the flow of each issued queue is automatically adjusted according to the configuration weight of each queue at level L3, and the total flow of a single chip does not exceed the total bandwidth that can be borne by the link. When the congestion is exchanged, the flow is adjusted downwards appropriately to relieve the congestion degree of the exchange.
The embodiment can automatically adjust the issued traffic under different exchange congestion degrees, so that the traffic does not exceed the total bandwidth which can be borne by the link. And when the congestion is exchanged, the flow is adjusted downwards appropriately to control the congestion degree of the exchange. The authorization issuing is indirectly controlled by controlling authorization application signals of L3-level queues of the core0 and the core1, and the flow balance of the two cores is realized when a switching network is congested or links change.
FIG. 6 is a diagram of specific tokens for L3 queues of core0 and core1 according to an alternative embodiment of the present invention, and the single chip token management maintains the total token values of two cores as shown in FIG. 6. The single queue token management module is used for maintaining token values of all queues below the core0 and the core1, wherein the 0 queue number of the core is {1 'b 0, core0_ que _ id }, and the queue number of the core1 is { 1' b1, core1_ que _ id }. And when all queues of the core0 and the core1 meet a certain condition, writing the queues into the single queue fifo, and queuing to apply for the single queue token of the queue of the single chip. When a queue is reached, a single chip token value is assigned to the queue token.
Fig. 7 is a flowchart of a single chip token addition and consumption process according to an alternative embodiment of the present invention, such as the single chip token addition and consumption process flow shown in fig. 7. For single-chip token management, adding a total token value, and inquiring a single-chip token issuing interval according to the fed back congestion level and the effective link. One token is added to the total token value, fixed every interval period.
The single-chip token issues interval configuration according to the following rules: under the same congestion level, the configuration issuing interval is in inverse proportion to the number of effective links, so that the total flow of a single chip does not exceed the total bandwidth which can be borne by the links.
The bearable flow of the effective link determines the issuing interval of the single-chip token, and the relationship is as the following formula: .
crdt_value/(interval*T)=data_flow
Wherein crdt _ value is the authorized value of core0 and core1, interval is the actual single chip token issuing interval, T is the chip clock period length, and data _ flow is the total bandwidth bearable by the effective link.
Under the same congestion level, the number of effective links changes, and the bearable total bandwidth data _ flow also changes. The maximum bandwidth supported by each active link is added, which is the total bandwidth that can be borne by the active link. And under different congestion levels, when the number of effective links is the same, the issuing interval is changed according to a certain proportion.
And the value of the single-chip token is reduced, and when the waiting single queue fifo is not empty and the total token of the single chip is more than 0, the queue can apply for the token from the single-chip token management. At this time, the queue information in the single queue fifo is read, and the weight information arranged in the corresponding core0 or core1 of the queue is read. And subtracting weight tokens from the single-chip token value according to the weight configured in the queue.
Fig. 8 is a flowchart of operations related to enqueuing and dequeuing of a single queue fifo, according to an alternative embodiment of the present invention, and the flow of operations related to enqueuing and dequeuing of a single queue fifo is shown in fig. 8. First, each queue of core0 and core1 has three opportunities to enter the single queue fifo. One is that there is a queue granted at core0 and a queue granted at core 1. And secondly, at the polling scanning moment, in order to avoid queues which are not served for a long time under special conditions, the fixed time such as 32clk is a period, and the token values of all the queues are polled and checked from the queue number 0 to the maximum queue number. Thirdly, after the enqueue fifo is read out, weight tokens are added to the single queue. And if 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 (i.e. enq _ flag is 0), then writing the queue into the single queue fifo. While the flag enq _ flag for this queue that is not in the single queue fifo is written to 1. And after writing in the single queue fifo, representing the queue to wait for applying for the token from the single-chip token management module.
At a fixed time slot, and the single queue fifo is not empty, the queue information within the fifo is read, and the flag enq _ flag of the queue that is not in the single queue fifo is written to 0. The weight assigned to the queue for the core will then be read. According to the queue information and the distribution weight, weight tokens are subtracted from the single chip token value, and weight tokens are added to the token value of the queue. Maintaining and updating the single chip token value and the queue token value.
Fig. 9 is a flow diagram of a single queue token addition and consumption process according to an alternative embodiment of the invention, and as shown in fig. 9, a single queue token addition and consumption process flow. For the single queue token value, after the weight tokens distributed by a single chip are obtained by the core L3 level queue, the weight tokens are added with the token value of the original queue, and the queue token value is maintained and updated. And if the queue token value is decreased, after the core and the L3-level queue are authorized, subtracting 1 from the corresponding token value of the queue, and maintaining and updating the queue token value. Thus, core0 and core1 are balanced under the same level by the core queue weights to get tokens. According to the token value of each queue, two core application authorization adding condition signals con _ rdy are calculated to influence whether to apply authorization to the upper level. For example, if the core0 has a queue token value of 0 or less, then con _ rdy _ c0[ i ] ═ 0, (i is { 1' b0, core0_ que _ id }). If the core0 the queue token value is greater than 0, con _ rdy _ c0[ i ] is 1. Similarly, core1 generates con _ rdy _ c1[ (n1-1):0 ].
Two cores, the addition conditions con _ rdy _ c0 (n0-1): 0) and con _ rdy _ c1 (n1-1): 0) for obtaining the addition conditions con _ rdy _ c0 (n0-1) of the L3-level queues of the cores 0 and 1 can apply for authorization. These conditions are compared with the original L3_ application _ c0[ (n0-1):0], L3_ application _ c1[ (n1-1):0] according to the phase, and then new core0, core1 apply the authorization signal L3_ application _ new _ c0 to the L4 level (n0-1): 0), L3_ application _ new _ c1[ (n1-1):0 ].
The above embodiments are only examples of two traffic managers, and are not intended to limit the scope of the present invention, and the present invention is also applicable to automatically balancing traffic among a plurality of traffic managers.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
step S1, receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of traffic management components;
step S2, adjusting the tokens of the queues of the traffic management components according to the total number of tokens shared by the traffic management components.
Through the steps, the token is received, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; the tokens of the queues of the traffic management components are adjusted according to the total number of the tokens shared by the traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
step S1, receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of traffic management components;
step S2, adjusting the tokens of the queues of the traffic management components according to the total number of tokens shared by the traffic management components.
Through the steps, the token is received, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of flow management components; the tokens of the queues of the traffic management components are adjusted according to the total number of the tokens shared by the traffic management components, so that the problem of poor traffic management effect caused by unreasonable authorization in the related art can be solved, and the technical effect of improving traffic management efficiency is achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for adjusting a token, comprising:
receiving a token, wherein the token is issued according to an issuing interval, the issuing interval is determined according to the effective link number and the link congestion level, and the received token is shared by a plurality of traffic management components;
and adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components.
2. The method of claim 1, wherein the delivery interval, the number of active links, and the link congestion level satisfy the following relationship:
under the condition that the link congestion levels are the same and the effective link numbers are different, the issuing interval and the effective link numbers are in an anti-correlation relationship;
and under the condition that the link congestion levels are different and the effective links are the same, the issuing interval and the link congestion levels are in positive correlation.
3. The method of claim 1 or 2, wherein adjusting the tokens of the queues of the plurality of traffic management components according to a total number of tokens shared by the plurality of traffic management components comprises:
reading a token request queue;
and issuing tokens to the appointed queue in the token request queue according to the weight of the preset appointed queue.
4. The method of claim 3, wherein the specified queue is allowed to enter the token request queue if the following conditions one and two are met:
the first condition comprises the following steps: the number of tokens in the appointed queue is less than a stop application threshold, and the appointed queue is not in the token request queue;
the second condition comprises: the designated queue is granted, or the designated queue is polled, or a vacancy exists in the token request queue.
5. The method of claim 1, wherein after adjusting the tokens of the queues of the plurality of traffic management components according to a total number of tokens shared by the plurality of traffic management components, the method further comprises:
and applying for authorization to the superior queue according to the adjusted result.
6. The method of claim 5, wherein applying for authorization from the superordinate queue based on the adjusted result comprises:
and determining whether to apply authorization to the upper-level queue according to the token number, the effective link number and the link congestion level of the specified queue, wherein if the determination is yes, the authorization is applied to the upper-level queue.
7. The method of claim 6, wherein in the event that the determination is yes, applying for authorization to the superordinate queue comprises:
generating authorization request information according to the number of effective links, the link congestion level and the number of tokens in the appointed queue;
and sending the authorization request information to the upper-level queue.
8. An apparatus for adjusting a token, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving tokens, the tokens are sent according to a sending interval, the sending interval is determined according to the effective link number and the link congestion level, and the received tokens are shared by a plurality of flow management components;
and the adjusting module is used for adjusting the tokens of the queues of the plurality of traffic management components according to the total token number shared by the plurality of traffic management components.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN201911285491.8A 2019-12-13 2019-12-13 Token adjusting method and device Active CN112995058B (en)

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 true CN112995058A (en) 2021-06-18
CN112995058B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118671A (en) * 2022-05-30 2022-09-27 中国信息通信研究院 Method and device for token ring scheduling, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
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

Citations (4)

* Cited by examiner, † Cited by third party
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 深圳市中兴微电子技术有限公司 Congestion flow management method and apparatus
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket

Patent Citations (4)

* Cited by examiner, † Cited by third party
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 深圳市中兴微电子技术有限公司 Congestion flow management method and apparatus
CN108848038A (en) * 2018-08-30 2018-11-20 华为技术有限公司 Flow managing method and token bucket node based on token bucket

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118671A (en) * 2022-05-30 2022-09-27 中国信息通信研究院 Method and device for token ring scheduling, electronic equipment and storage medium
CN115118671B (en) * 2022-05-30 2024-01-26 中国信息通信研究院 Method and device for token ring scheduling, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2021115482A1 (en) 2021-06-17
CN112995058B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
EP1471700B1 (en) Method and device for assigning packet queue priority
US9112809B2 (en) Method and apparatus for controlling utilization in a horizontally scaled software application
US20230142539A1 (en) Methods and apparatus to schedule service requests in a network computing system using hardware queue managers
EP2466824B1 (en) Service scheduling method and device
US20050047425A1 (en) Hierarchical scheduling for communications systems
US6795870B1 (en) Method and system for network processor scheduler
EP2378721B1 (en) Bandwidth allocation method and routing apparatus
EP1225734A2 (en) Methods, systems and computer program products for bandwidth allocation in a multiple access system
US8817619B2 (en) Network system with quality of service management and associated management method
WO2012145841A1 (en) Hierarchical profiled scheduling and shaping
CN104657207B (en) Dispatching method, service server and the scheduling system of remote authorization request
RU2643666C2 (en) Method and device to control virtual output queue authorization and also computer storage media
EP2547144A1 (en) Load sharing method, system and access server
CN111181873B (en) Data transmission method, data transmission device, storage medium and electronic equipment
US9210095B2 (en) Arbitration of multiple-thousands of flows for convergence enhanced ethernet
CN112995058A (en) Token adjusting method and device
WO2012116540A1 (en) Traffic management method and management device
CN112995056B (en) Traffic scheduling method, electronic equipment and storage medium
CN114860397B (en) Task scheduling method, device and equipment
KR20120055947A (en) Method and apparatus for providing Susbscriber-aware per flow
CN114443241A (en) Task dynamic scheduling method, task issuing method and device
Tata et al. New Courteous Algorithm for Uplink Scheduling in LTE‐Advanced and 5G Networks
CN112684988A (en) QoS method and system based on distributed storage
CN115242727B (en) User request processing method, device, equipment and medium
CN100539535C (en) A kind of method and apparatus of adjusting the looped network node bandwidth

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