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
- flow 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 34
- 238000013475 authorization Methods 0.000 claims abstract description 56
- 238000004590 computer program Methods 0.000 claims description 18
- 230000000694 effects Effects 0.000 abstract description 14
- 238000005516 engineering process Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001105 regulatory effect Effects 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/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
- 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
-
- 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
The application provides a method and a device for adjusting a token, wherein the method for adjusting the token 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 number of effective links 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 flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a method and apparatus for adjusting a token.
Background
In the new switch-in chip, when the clock frequency is limited, to reach higher traffic management, there is a mode of adopting two or more sets of traffic management components. Here, two sets of examples are given. The two sets of components are mutually independent and can exchange all links and communicate data with the opposite-end chip. During normal flow, both sets of components go through all links to the switching network. Here, for example, when the active links of the switching network change, the two cores of the chip, the switching network does not know how much of the grant should be issued by each core to the opposite end, so how much bandwidth is used for each core cannot be coordinated.
Aiming at the problem of poor flow management effect caused by unreasonable authorization in the related technology, a better solution does not exist yet.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting a token, which are used for at least solving the problem of poor flow management effect caused by unreasonable authorization in the related technology.
According to an embodiment of the present application, there is provided a method for adjusting a token, including: receiving tokens, wherein the tokens are issued according to an issuing interval, the issuing interval is determined according to the number of effective links and the level of link congestion, and the received tokens are shared by a plurality of flow management components; tokens of queues of the plurality of flow management components are adjusted according to a total number of tokens common to the plurality of flow management components.
According to another embodiment of the present application, there is provided an adjustment apparatus for a token, including: the receiving module is used for receiving the tokens, wherein the tokens are issued according to an issuing interval, the issuing interval is determined according to the number of effective links and the level of link congestion, 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 flow management components according to the total token number shared by the flow management components.
According to a further embodiment of the application, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the embodiment of the application, the token is received, 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, and the received token is shared by a plurality of flow management components; the tokens of the queues of the flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a token adjustment method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of managing tokens according to an embodiment of the present application;
FIG. 3 is a block diagram of a management apparatus of a token according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an adding adjustment device between two congestion management modules according to an alternative embodiment of the present application;
fig. 5 is a schematic structural view of a flow equalization device according to an alternative embodiment of the present application;
FIG. 6 is a schematic diagram of specific tokens for each queue at level L3 of core0, core1, according to an alternative embodiment of the present application;
FIG. 7 is a flow chart of a single chip token addition and consumption process according to an alternative embodiment of the application;
FIG. 8 is a flow chart of a single queue fifo enqueue, dequeue related operation in accordance with an alternative embodiment of the application;
FIG. 9 is a flow chart of a single queue token adding and consuming process according to an alternative embodiment of the application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Example 1
The method according to the first embodiment of the present application may be implemented in a management device, a computer terminal, or a similar computing device. Taking the management device as an example, fig. 1 is a block diagram of a hardware structure of the management device of a token adjusting method according to an embodiment of the present application. As shown in fig. 1, the management apparatus 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 microprocessor MCU, a programmable logic device FPGA, or the like) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the management device described above. 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 a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for adjusting a token in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. 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 remotely located with respect to the processor 102, which may be connected to the management device 10 via 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 means 106 is arranged to receive or transmit data via a network. The specific example 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 (Network Interface Controller, simply referred to as NIC) that can connect 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 (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for adjusting a token running in the mobile management device is provided, and fig. 2 is a flowchart of a method for adjusting a token according to an embodiment of the present application, as shown in fig. 2, where 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 number of effective links and the level of link congestion, and the received token is shared by a plurality of flow management components;
step S204, the tokens of the queues of the plurality of flow management components are adjusted according to the total token number shared by the plurality of flow management components.
By the steps, since the token is received, 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, and the received token is shared by a plurality of flow management components; the tokens of the queues of the flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Optionally, the issuing 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 inverse correlation relation; and under the condition that the link congestion levels are different and the effective link numbers are the same, the issuing interval and the link congestion level are in positive correlation.
Optionally, adjusting the tokens of the queues of the plurality of traffic management components according to the total number of tokens common to the plurality of traffic management components, comprising: reading a token request queue; issuing tokens to the appointed queues in the token request queues according to the weights of the pre-configured appointed queues.
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 includes: the number of tokens of the appointed queue is smaller than a stop application threshold, and the appointed queue is not in the token request queue; the second condition includes: the designated queue is granted, or the designated queue is polled, or there is room 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 common to the plurality of traffic management components, the method further comprises: and applying authorization to the upper queue according to the adjusted result.
Optionally, applying authorization to the upper queue according to the adjusted result includes: 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 designated queue, wherein if yes, the upper queue is applied with authorization.
Optionally, in the 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 level of link congestion and the number of tokens of the appointed queue; and sending the authorization request information to the upper queue.
The embodiment also provides a token adjusting device, which is used for realizing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 3 is a block diagram of an adjustment apparatus for a token according to an embodiment of the present application, as shown in fig. 3, the apparatus includes:
a receiving module 31, configured to receive a token, where the token is issued at an issue interval, where the issue interval is determined according to an effective link number and a link congestion level, and the received token is common to a plurality of traffic management components;
an adjustment module 33, configured to adjust 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.
By the above module, since the token is received, the token is issued according to the issuing interval, the issuing interval is determined according to the number of effective links and the level of link congestion, and the received token is shared by a plurality of traffic management components; the tokens of the queues of the flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Optionally, the issuing 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 inverse correlation relation; and under the condition that the link congestion levels are different and the effective link numbers are the same, the issuing interval and the link congestion level are in positive correlation.
Optionally, the adjustment 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 appointed queue in the token request queue according to the weight of the pre-configured appointed 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 includes: the number of tokens of the appointed queue is smaller than a stop application threshold, and the appointed queue is not in the token request queue; the second condition includes: the designated queue is granted, or the designated queue is polled, or there is room in the token request queue.
Optionally, the apparatus further comprises: and the application module is used for applying authorization to the upper queue according to the adjusted result after adjusting the tokens of the queues of the plurality of flow management components according to the total token number shared by the plurality of flow management components.
Optionally, the application module includes: and the application submodule is used for 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 appointed queue, wherein if yes, the application submodule applies authorization to the upper-level queue.
Optionally, the application submodule includes: the application unit is used for generating authorization request information according to the number of effective links, the level of link congestion and the number of tokens of the appointed queue under the condition that the determination is yes; and the sending unit is used for sending the authorization request information to the upper queue.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Alternative embodiments
The embodiment of the application provides an adjusting device which can coordinate two independent flow management modules. When the queue applies for authorization, the automatic control part applies for authorization according to the congestion condition of the switching network, so that the bandwidth of the switching network is used in coordination between the two cores.
And the two congestion management modules apply for authorization step by step from bottom to top when certain conditions are met. The queues of level L0 are each 0 to m0, and the authorized L0_apply [ (m 0-1): 0] is sequentially applied to the queues of level L1. Each of the queues 0 to m1 of L1 applies for authorization sequentially to the previous stage, and each of the queues L4 applies for authorization l4_apply [ (m 4-1): 0] sequentially to L5. And when the hooking is normal, issuing the authorization step by step from top to bottom according to the priority, the weight and the like configured by each level of queue. The L5 level issues an grant to the L4 level, grant enable l4_val, grant queue number l4_qnum. L4 is issued step by step and finally reaches l0_val and l0_qnum. Fig. 4 is a schematic structural diagram of an adding adjustment device between two congestion management modules according to an alternative embodiment of the present application, as shown in fig. 4, in this embodiment, an adjustment module is added, where the adjustment module is a single-chip scheduling module, and the adjustment module may be added at a certain level, for example, between L3 and L4. The following is an illustration of the addition at level L3 according to the adjustment module. The input signal of the device provided by the implementation is calculated according to the number of links and the congestion level to obtain the adding conditions con_rdy_c0 and con_rdy_c1 of whether each queue of the L3 level of core0 and core1 can apply authorization upwards. These conditions are bit-wise matched with the original l3_apply_c0 and l3_apply_c1 to generate new signals l3_apply_new_c0[ (n 0-1): 0], l3_apply_new_c1[ (n 1-1): 0] for which core0 and core1 apply authorization to the L4 stage. Thereby affecting the core0, core1 level of the application grant signal. The conditions con_rdy_c0, con_rdy_c1 for this upward application grant added are controlled by the congestion level and the number of active links. When congestion or the number of links changes, con_rdy_0 and con_rdy_1 are respectively queued with corresponding bit changes, the grant enabling change is applied upwards, and therefore the grants issued by two core are automatically adjusted.
Illustratively, the switch links will classify the congestion into classes according to the state of the cell buffer, and sometimes the number of active links of the switch connection will also vary. The switching interface sends this congestion level and the active link summary to the internal traffic management module. The congestion management module in the flow management reduces the application of each queue token according to the two dimensions of the congestion level and the effective link number, and then reduces the issuing of authorization, thereby reducing the received and transmitted messages and reducing the congestion of the switching network.
Fig. 5 is a schematic structural view of a flow equalization apparatus according to an alternative embodiment of the present application, and as shown in fig. 5, the apparatus of this embodiment is divided into 3 modules: the system comprises a single chip token management module, an L3-level single queue token management module of core0 and core1 and a single queue fifo management module.
The single-chip token management module is used for: the calculation maintains two core total token numbers. Firstly, inquiring a preconfigured single-chip token issuing interval according to the fed-back congestion level con_level and the effective link number. At token issuing intervals, a total token is added to both cores. And when the tokens are issued from the total tokens to the L3 level single queue tokens of core0 and core1, the tokens are subtracted from the single chip total tokens. The number of tokens is maintained, and whether to respond to the single queue fifo dequeue request is controlled.
The single queue token management module is used for: the number of L3 level single queue tokens that maintain core0, core1 is calculated. When the single chip total token module issues tokens to a single queue according to the configuration weights of each queue of core0 and core1, adding the tokens to the queue. When the stage has a queue applying for grants upwards and is granted, the queue token is decremented. Tokens of all queues of the L3 stages of core0, core1 are maintained.
The single queue fifo management module is used for: each queue of core0 and core1 in the L3 level needs to enter the fifo, and applies tokens to the single-chip token management module according to the fixed time slot queuing. And managing enqueue and dequeue related operations of each queue.
In the embodiment, between two congestion management, under different total bandwidths of links and different exchange congestion degrees, the weight is configured according to each queue of the L3 level, the flow of each issued queue is automatically adjusted, and the total flow of a single chip cannot exceed the total bandwidth bearable by the links. Traffic is appropriately down-regulated when the exchange is congested to alleviate the congestion level of the exchange.
The embodiment can automatically adjust the issued flow under different exchange congestion degrees, so that the flow does not exceed the total bandwidth bearable by the link. And is adapted to down-regulate traffic when the exchange is congested to control the congestion level of the exchange. The grant issuing is indirectly controlled by controlling grant application signals of the L3-level queues of the core0 and the core1, so that the flow balance of the two cores is realized when the switching network is congested or the link is changed.
FIG. 6 is a schematic diagram of specific tokens for each queue at level L3 of core0, core1, according to an alternative embodiment of the present application, as shown in FIG. 6, with single chip token management maintaining two core total token values. The single queue token management module is used for maintaining token values of all queues below core0 and core1, wherein the 0 queue number of the core is {1'b0, core0_que_id }, and the queue number of the core1 is {1' b1, core1_que_id }. When all the queues of core0 and core1 meet a certain condition, writing into a single queue fifo, and queuing to apply for a single queue token of the own queue to the single chip. When a queue is reached, a single chip token value is assigned to the queue token.
Fig. 7 is a flow chart of a single chip token addition and consumption process according to an alternative embodiment of the application, as shown in fig. 7. For single-chip token management, adding the total token value, and inquiring the interval of single-chip token issuing according to the fed-back congestion level and the effective link. A token is added to the total token value every interval period.
The single chip token issuing interval configuration is as follows: under the same congestion level, the distribution interval is configured to be in inverse relation with the number of effective links, so that the total flow of a single chip cannot exceed the total bandwidth bearable by the links.
The effective link bearable traffic determines the single chip token issue interval, and the relationship is as follows: .
crdt_value/(interval*T)=data_flow
Wherein crdt_value is the authorization value of core0 and core1, interval is the actual single chip token issuing interval, T is the chip clock cycle length, and data_flow is the total bandwidth which can be born by the effective link.
At the same congestion level, the number of active links changes and the total bandwidth data_flow that can be tolerated also changes. The maximum bandwidths supported by each active link add up to be the total bandwidth that the active link can withstand. Under different congestion levels, when the number of effective links is the same, the issuing interval is changed according to a certain proportion.
The single chip token value is reduced, and when the waiting single queue fifo is not empty and the single chip total token is greater than 0, it indicates that there is a queue that can apply for tokens to single chip token management. At this time, the queue information in the single queue fifo is read, and the weight information placed in the corresponding core0 or core1 of the queue is read. The weight tokens are subtracted at a single chip token value according to the weight of the queue configuration.
FIG. 8 is a flow chart of single queue fifo enqueue, dequeue related operations according to an alternative embodiment of the application, as shown in FIG. 8. First, each of core0 and core1 queues has three opportunities to enter the single queue fifo. One is that core0 has queues granted and core1 has queues granted. And secondly, at the moment of polling scanning, in order to avoid queues which are not served for a long time under special conditions, a fixed time such as 32clk is taken as a period, and the polling checks the token values of all the queues from the queue number 0 to the maximum queue number. Thirdly, after enqueue fifo reads out, weight tokens are added to the single queue. And when the queue token value is negative or positive and the token value is smaller than the single queue stop application threshold apply_off_th and the queue is not in the single queue fifo (namely, enq _flag is 0), writing into the single queue fifo. While the flag enq _flag of the queue that is not in the single queue fifo is written to 1. After writing the single queue fifo, the queue is queued for application of tokens to the single chip token management module.
At a fixed time slot, and the single queue fifo is not empty, the queue information within fifo is read, and the flag enq _flag of the queue that is not in the single queue fifo is written to 0. The assigned weight for the core's queue will then be read. The single chip token value subtracts the weight tokens from the queue information and the assigned weights, the token value of the queue plus the weight tokens. Maintaining an updated single chip token value and the queue token value.
FIG. 9 is a flow chart of a single queue token addition and consumption process according to an alternative embodiment of the application, as shown in FIG. 9. For the single queue token value, after the core L3 level queue obtains the weight tokens distributed by a single chip, the weight tokens are added with the token value of the original queue, and then the queue token value is maintained and updated. The queue token value is reduced, namely, after the core is authorized by the L3 level queue, the queue is subjected to the operation of subtracting 1 from the corresponding token value, and the queue token value is maintained and updated. Thus, core0 and core1 are balanced under the same level according to the queue weights of the cores to obtain tokens. Based on the token value of each queue, two core application authorization add condition signals con_rdy are calculated to influence whether to apply authorization to the previous stage. For example, if the core0 the queue token value is equal to or less than 0, con_rdy_c0i=0, (i is {1' b0, core0_que_id }). If the core0 the queue token value is greater than 0, con_rdy_c0i=1. And the same core1 generates con_rdy_c1[ (n 1-1): 0].
Two cores obtain the addition conditions con_rdy_c0[ (n 0-1): 0] and con_rdy_c1[ (n 1-1): 0] of whether each queue of the L3 level of core0 and core1 can apply for authorization. These conditions are bit-wise matched with the original L3_apply_c0[ (n 0-1): 0], L3_apply_c1[ (n 1-1): 0], and then new signals L3_apply_new_c0[ (n 0-1): 0], L3_apply_new_c1[ (n 1-1): 0] are generated, which are the signals for applying authorization to the L4 stage by the core0, core 1.
The above embodiments are merely embodiments of two flow management systems, and are not intended to limit the scope of the present application, and are equally applicable to automatic flow balancing between a plurality of flow management systems.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described 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 number of effective links and the level of link congestion, and the received token is shared by a plurality of flow management components;
and step S2, adjusting the tokens of the queues of the plurality of flow management components according to the total token number shared by the plurality of flow management components.
By the steps, since the token is received, 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, and the received token is shared by a plurality of flow management components; the tokens of the queues of the flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described 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 number of effective links and the level of link congestion, and the received token is shared by a plurality of flow management components;
and step S2, adjusting the tokens of the queues of the plurality of flow management components according to the total token number shared by the plurality of flow management components.
By the steps, since the token is received, 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, and the received token is shared by a plurality of flow management components; the tokens of the queues of the flow management components are adjusted according to the total token number shared by the flow management components, so that the problem of poor flow management effect caused by unreasonable authorization in the related technology can be solved, and the technical effect of improving the flow management efficiency is achieved.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.
Claims (7)
1. A method for adjusting a token, comprising:
receiving tokens, wherein the tokens are issued according to an issuing interval, the issuing interval is determined according to the number of effective links and the level of link congestion, and the received tokens are shared by a plurality of flow management components;
adjusting tokens of queues of the plurality of flow management components according to the total number of tokens shared by the plurality of flow management components;
after adjusting the tokens of the queues of the plurality of traffic management components according to the total number of tokens common to the plurality of traffic management components, the method further comprises: applying authorization to the upper queue according to the adjusted result;
applying for authorization to the upper queue according to the adjusted result, including: determining whether to apply authorization to the upper queue according to the number of tokens of the appointed queue, the number of effective links and the link congestion level, wherein if yes, the upper queue is applied with authorization;
and applying for authorization from the upper queue if the determination is yes, wherein the method comprises the following steps: generating authorization request information according to the number of effective links, the level of link congestion and the number of tokens of the appointed queue; transmitting the authorization request information to the upper queue;
generating authorization request information according to the number of effective links, the link congestion level and the token number of the specified queue, wherein the authorization request information comprises the following steps: calculating to obtain the adding condition of each flow management component that the appointed queue can apply authorization upwards according to the token number, the effective link number and the link congestion level of the appointed queue; and matching the adding condition with the authorization request received by the current stage according to the bit to obtain the authorization request information.
2. The method of claim 1, wherein the issue 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 inverse correlation relation;
and under the condition that the link congestion levels are different and the effective link numbers are the same, the issuing interval and the link congestion level 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 the total number of tokens common to the plurality of traffic management components comprises:
reading a token request queue;
and issuing tokens to the appointed queues in the token request queues according to the weights of the pre-configured appointed queues.
4. A method according to claim 3, wherein the specified queue is admitted to the token request queue if the following conditions one and two are met:
the first condition includes: the number of tokens of the appointed queue is smaller than a stop application threshold, and the appointed queue is not in the token request queue;
the second condition includes: the specified queue is granted, or the specified queue is polled, or there is room in the token request queue.
5. An adjustment device for a token, comprising:
the receiving module is used for receiving the tokens, wherein the tokens are issued according to an issuing interval, the issuing interval is determined according to the number of effective links and the level of link congestion, and the received tokens are shared by a plurality of flow management components;
an adjustment module for adjusting the tokens of the queues of the plurality of flow management components according to the total number of tokens shared by the plurality of flow management components;
the apparatus further comprises: the application module is used for applying authorization to the upper queue according to the adjusted result after adjusting the tokens of the queues of the plurality of flow management components according to the total token number shared by the plurality of flow management components;
the application module comprises: the application submodule is used for determining whether to apply authorization to the upper-level queue according to the number of tokens of the appointed queue, the number of effective links and the link congestion level, wherein if yes, the authorization is applied to the upper-level queue;
the application submodule comprises: the application unit is used for generating authorization request information according to the number of effective links, the level of link congestion and the number of tokens of the appointed queue under the condition that the determination is yes; a sending unit, configured to send the authorization request information to the upper queue; generating authorization request information according to the number of effective links, the link congestion level and the token number of the specified queue, wherein the authorization request information comprises the following steps: calculating to obtain the adding condition of each flow management component that the appointed queue can apply authorization upwards according to the token number, the effective link number and the link congestion level of the appointed queue; and matching the adding condition with the authorization request received by the current stage according to the bit to obtain the authorization request information.
6. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of any of the claims 1 to 4 when run.
7. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 4.
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 for token ring scheduling, electronic equipment and storage medium |
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 | 深圳市中兴微电子技术有限公司 | 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 |
-
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 | 深圳市中兴微电子技术有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
WO2021115482A1 (en) | 2021-06-17 |
CN112995058A (en) | 2021-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9270527B2 (en) | Methods, systems, and computer readable media for enabling real-time guarantees in publish-subscribe middleware using dynamically reconfigurable networks | |
KR100933917B1 (en) | Bandwidth guarantee and overload protection method in network switch | |
CN111181873B (en) | Data transmission method, data transmission device, storage medium and electronic equipment | |
WO2017143981A1 (en) | Service processing | |
WO2012145841A1 (en) | Hierarchical profiled scheduling and shaping | |
CN112995058B (en) | Token adjusting method and device | |
CN107948097B (en) | Bandwidth adjusting method and equipment | |
EP2547144A1 (en) | Load sharing method, system and access server | |
CN110808948A (en) | Remote procedure calling method, device and system | |
US11621918B2 (en) | Techniques to manage data transmissions | |
CA2399186C (en) | Data transfer apparatus and data transfer method | |
US11700189B2 (en) | Method for performing task processing on common service entity, common service entity, apparatus and medium for task processing | |
EP3622669B1 (en) | Automatic shared resource management system and associated methods | |
WO2019109902A1 (en) | Queue scheduling method and apparatus, communication device, and storage medium | |
WO2016132402A1 (en) | Communication frame transfer device and communication system | |
CN113157465A (en) | Message sending method and device based on pointer linked list | |
Tata et al. | New Courteous Algorithm for Uplink Scheduling in LTE‐Advanced and 5G Networks | |
US10404602B2 (en) | Transmission apparatus and transmission processing method | |
Wu et al. | Management of a shared-spectrum network in wireless communications | |
US10270701B2 (en) | Management node, terminal, communication system, communication method, and program storage medium | |
CN117793793B (en) | Internet of things communication method and device and electronic device | |
CN115250440B (en) | Short message queue structure, short message queue scheduling method and device | |
KR100358180B1 (en) | A bus arbiter providing multi-stage connection and method thereof | |
CN115242727B (en) | User request processing method, device, equipment and medium | |
US7729248B2 (en) | Scheduler having queue for scheduling transmission of items from a station in a wireless network |
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 |