CN111917664A - Queue management method and system - Google Patents

Queue management method and system Download PDF

Info

Publication number
CN111917664A
CN111917664A CN202010616343.6A CN202010616343A CN111917664A CN 111917664 A CN111917664 A CN 111917664A CN 202010616343 A CN202010616343 A CN 202010616343A CN 111917664 A CN111917664 A CN 111917664A
Authority
CN
China
Prior art keywords
priority
message
queue
broadcast
multicast
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.)
Pending
Application number
CN202010616343.6A
Other languages
Chinese (zh)
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.)
Beijing Hannuo Semiconductor Technology Co ltd
Original Assignee
Beijing Hannuo Semiconductor 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 Beijing Hannuo Semiconductor Technology Co ltd filed Critical Beijing Hannuo Semiconductor Technology Co ltd
Priority to CN202010616343.6A priority Critical patent/CN111917664A/en
Publication of CN111917664A publication Critical patent/CN111917664A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/527Quantum based scheduling, e.g. credit or deficit based scheduling or token bank
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Abstract

The invention discloses a queue management method and a system, wherein the method comprises the following steps: classifying the messages entering the two-layer network to generate different types of messages; the different types of messages comprise unicast messages, multicast messages and broadcast messages; different message queues are set for different types of messages in a two-layer network; storing the different types of messages into the different message queues respectively; preprocessing the different types of messages to generate preprocessed messages; and performing out-queue scheduling on the preprocessed message according to the priority of the message and a preset weight value. The method ensures that different types of messages are not influenced by each other by preprocessing the messages in different message queues, effectively manages unicast, multicast and broadcast under the condition of congestion, effectively utilizes the broadband on a two-layer network, avoids unnecessary broadband waste, relieves network congestion and improves the utilization rate of the broadband.

Description

Queue management method and system
Technical Field
The invention relates to the technical field of QoS (quality of service) guarantee, in particular to a queue management method and a queue management system.
Background
With the development of internet technology, various computer application systems such as e-mail, web surfing, ERP system, VoIP video conference and the like are rapidly developed and widely applied, and the requirements of application programs on network broadband are increased due to strong service performance and continuously improved desktop computer processing capability. Due to the lack of an effective broadband management means, various computer application programs seize broadband resources in a non-sequential manner, so that some key applications on a network cannot run normally, the efficiency of the whole network is reduced, and even network congestion occurs.
At present, in the data communication process of a computer, when no network congestion occurs, a message is sent out immediately when reaching an interface, and when the speed of reaching the message exceeds the speed of sending the message by the interface and the network congestion occurs on the interface, the method for managing the network congestion is to use a queue technology, namely, classifying the message, sending the message into different queues and scheduling the different queues to relieve the network congestion.
However, the use of queuing techniques requires that network broadband is continuously increased to meet the broadband requirements of various applications, and the effect of broadband upgrading measures which cost a lot of money is not obvious, because only network broadband is increased without effective management and allocation, and as a result, it cannot be ensured that newly increased broadband resources are allocated to which critical applications for use, and effective QoS guarantee cannot be provided for the network.
Therefore, how to alleviate network congestion, effectively manage a network broadband, and improve the utilization rate of the broadband is a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above problems, the present invention aims to solve the problems that merely increasing network bandwidth cannot ensure that newly increased bandwidth resources are allocated to which critical applications for use, and cannot provide effective QoS guarantee for the network, and the bandwidth utilization rate is low.
The embodiment of the invention provides a queue management method, which comprises the following steps:
classifying messages entering a two-layer network according to message types, wherein the message types comprise unicast messages, multicast messages and broadcast messages;
setting different message queues aiming at different types of messages in a two-layer network, and respectively storing the messages into the message queues of corresponding message types;
counting the number of various messages stored in the different message queues, comparing the accumulated value of the number of various messages with the maximum message storage number, when the accumulated value of the number is greater than the maximum message storage number, buffering various messages which are out of the queues, and counting the number of various messages which are out of the queues;
feeding back the number of the various messages of the queue, and adjusting the issuing period of the token according to the number of the various messages fed back;
correspondingly distributing the tokens to the various messages based on the adjusted issuing period of the tokens;
respectively carrying out queue level scheduling on the multicast message and the broadcast message according to the tokens distributed to the multicast message and the broadcast message;
and performing dequeue scheduling on various messages according to the priority of the corresponding message queue and the preset weight value.
In one embodiment, the packet queue includes: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
In an embodiment, the storing the different types of packets into the different packet queues respectively includes:
judging the priority of the unicast message, the multicast message and the broadcast message respectively;
if the unicast message is of high priority, storing the unicast message of high priority into the unicast high priority queue, otherwise, storing the unicast message of low priority into the unicast low priority queue;
if the multicast message is of high priority, storing the multicast message of high priority to the preceding queue of high priority of multicast, otherwise, storing the multicast message of low priority to the preceding queue of low priority of multicast;
if the broadcast message is of high priority, storing the broadcast message of high priority to the pre-queue of high priority of broadcast, otherwise, storing the broadcast message of low priority to the pre-queue of low priority of broadcast.
In an embodiment, the performing queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet respectively includes:
respectively comparing the surplus quantity of the tokens distributed to the high-priority multicast message and the high-priority broadcast message with the surplus token backpressure value;
if the surplus number of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively greater than the surplus counter-pressure value of the tokens, respectively increasing the token number of the low-priority multicast message and the token number of the low-priority broadcast message;
comparing the surplus number of the tokens of the low-priority multicast message with the length of the first multicast message in the multicast low-priority preceding-stage queue;
if the surplus number of the tokens of the low-priority multicast message is larger than the length of the first multicast message in the multicast low-priority preceding-stage queue, storing the low-priority multicast message to the multicast low-priority subsequent-stage queue;
comparing the surplus number of tokens of the low-priority broadcast message with the length of the first broadcast message in the broadcast low-priority pre-stage queue;
and if the surplus number of the tokens of the low-priority broadcast message is greater than the length of the first broadcast message in the broadcast low-priority front-stage queue, storing the low-priority broadcast message to the broadcast low-priority rear-stage queue.
In an embodiment, the performing queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet respectively further includes:
if the surplus number of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively smaller than the surplus counter-pressure value of the tokens, respectively increasing the token number of the high-priority multicast message and the high-priority broadcast message;
comparing the surplus number of the tokens of the high-priority multicast message with the length of the first multicast message in the multicast high-priority preceding-stage queue;
if the surplus number of the tokens of the high-priority multicast message is larger than the length of the first multicast message in the multicast high-priority preceding queue, dequeuing the high-priority multicast message from the multicast high-priority preceding queue and entering the multicast high-priority subsequent queue;
comparing the surplus number of the tokens of the high-priority broadcast message with the length of the first broadcast message in the broadcast high-priority pre-stage queue;
and if the surplus number of the tokens of the high-priority broadcast message is greater than the length of the first broadcast message in the broadcast high-priority preceding-stage queue, dequeuing the high-priority broadcast message from the broadcast high-priority preceding-stage queue and entering the broadcast high-priority subsequent-stage queue.
In a second aspect, the present invention further provides a queue management system, including:
the classification module is used for classifying the messages entering the two-layer network according to message types, wherein the message types comprise unicast messages, multicast messages and broadcast messages;
the storage module is used for setting different message queues aiming at different types of messages in the two-layer network and respectively storing the messages into the message queues of corresponding message types;
the comparison module is used for counting the number of various messages stored in the different message queues, comparing the accumulated value of the number of various messages with the maximum message storage number, buffering various messages going out of the queues when the accumulated value of the number is greater than the maximum message storage number, and counting the number of various messages going out of the queues;
the distribution module is used for feeding back the number of the various messages out of the queue and adjusting the issuing period of the token according to the number of the various messages fed back;
a queue level scheduling module, configured to perform queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet;
and the dequeue scheduling module is used for dequeuing and scheduling various messages according to the priority of the corresponding message queue and the preset weight value.
In one embodiment, the packet queue in the storage module includes: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
In one embodiment, the storage module includes:
a priority judging unit, configured to respectively judge priorities of the unicast packet, the multicast packet, and the broadcast packet;
a unicast message storage unit, configured to store a high-priority unicast message to the unicast high-priority queue if the unicast message is of a high priority, and store a low-priority unicast message to the unicast low-priority queue if the unicast message is of a low priority;
a multicast message storage unit, configured to store a high-priority multicast message to the multicast high-priority pre-stage queue if the multicast message is of a high priority, and store a low-priority multicast message to the multicast low-priority pre-stage queue if the multicast message is of a low priority;
and the broadcast message storage unit is used for storing the broadcast message with high priority to the broadcast high-priority pre-queue if the broadcast message is with high priority, and storing the broadcast message with low priority to the broadcast low-priority pre-queue if the broadcast message is with high priority.
In one embodiment, the queue level scheduling module includes:
a high-priority comparison unit, configured to compare the surplus number of tokens allocated to the high-priority multicast packet and the high-priority broadcast packet with a token surplus backpressure value;
a low-priority token increasing unit, configured to increase the token numbers of the low-priority multicast packet and the low-priority broadcast packet, if the surplus numbers of the tokens of the high-priority multicast packet and the high-priority broadcast packet are respectively greater than a token surplus counter-pressure value;
a low priority multicast comparing unit, configured to compare the surplus number of tokens of the low priority multicast packet with the length of the first multicast packet in the multicast low priority pre-stage queue;
a low-priority multicast message storage unit, configured to store the low-priority multicast message to the multicast low-priority post-queue if the surplus number of tokens of the low-priority multicast message is greater than the length of the first multicast message in the multicast low-priority pre-queue;
a low priority broadcast comparing unit, configured to compare the surplus number of tokens of the low priority broadcast packet with the length of the first broadcast packet in the broadcast low priority pre-stage queue;
a low-priority broadcast packet storage unit, configured to store the low-priority broadcast packet in the broadcast low-priority back-stage queue if the surplus number of tokens of the low-priority broadcast packet is greater than the length of the first broadcast packet in the broadcast low-priority front-stage queue.
In one embodiment, the queue level scheduling module further includes:
a high-priority token increasing unit, configured to increase the number of tokens of the high-priority multicast packet and the high-priority broadcast packet, if the surplus number of tokens of the high-priority multicast packet and the high-priority broadcast packet is smaller than a token surplus counter-pressure value, respectively;
a high-priority multicast comparing unit, configured to compare the surplus number of tokens of the high-priority multicast packet with the length of the first multicast packet in the multicast high-priority pre-stage queue;
a high-priority multicast message dequeuing unit, configured to dequeue the high-priority multicast message from the multicast high-priority pre-stage queue and enter the multicast high-priority post-stage queue if the surplus number of tokens of the high-priority multicast message is greater than the length of the first multicast message in the multicast high-priority pre-stage queue;
a high-priority broadcast comparing unit, configured to compare the surplus number of tokens of the high-priority broadcast packet with the length of the first broadcast packet in the broadcast high-priority pre-stage queue;
a high-priority broadcast message dequeuing unit, configured to dequeue the high-priority broadcast message from the broadcast high-priority pre-queue and enter the broadcast high-priority post-queue if the surplus number of tokens of the high-priority broadcast message is greater than the length of the first broadcast message in the broadcast high-priority pre-queue.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
the method for managing the queues ensures that different types of messages are not influenced by each other by preprocessing the messages in different message queues, effectively manages unicast, multicast and broadcast under the condition of congestion, effectively utilizes the broadband on a two-layer network, avoids unnecessary broadband waste, relieves network congestion, improves the utilization rate of the broadband, realizes the global grasp of each type of message under the condition of congestion and ensures the accuracy of Qos.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
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 specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a queue management method according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S102 according to an embodiment of the present invention;
fig. 3 is a flowchart of scheduling processing on the multicast packet according to the embodiment of the present invention;
fig. 4 is a flowchart of scheduling processing on the broadcast packet according to the embodiment of the present invention;
fig. 5 is a block diagram of a queue management system according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a method for queue management according to an embodiment of the present invention includes: s101 to S107;
s101, classifying messages entering a two-layer network according to message types, wherein the message types comprise unicast messages, multicast messages and broadcast messages;
specifically, the classification is performed according to the MAC address corresponding to the packet in the two-layer network.
S102, setting different message queues aiming at different types of messages in a two-layer network, and respectively storing the messages into the message queues of corresponding message types;
specifically, the different message queues include: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
S103, counting the number of various messages stored in different message queues, comparing the accumulated value of the number of various messages with the maximum message storage number, when the accumulated value of the number is larger than the maximum message storage number, buffering various messages in an out-queue, and counting the number of various messages in the out-queue.
Specifically, the above messages refer to: unicast messages, multicast messages and broadcast messages.
Further, when the accumulated value of the number of each type of messages is smaller than the preset number back pressure value, the token is issued according to a default issuing period.
Further, the token is a special frame capable of controlling the station to occupy the medium, so as to distinguish the data frame from other control frames.
Further, when various messages are dequeued and enqueued, the accumulated value of the number of various messages changes, and it can be set that the accumulated value of the number of various messages is compared with the maximum message storage amount once every time the accumulated value of the number of various messages is updated.
S104, feeding back the number of the various messages out of the queue, and adjusting the issuing period of the token according to the number of the various messages fed back.
Specifically, the message length of each message in the dequeue is compared with the token size, when the message length of the dequeue is less than the token size, the message length is recorded and other subsequent messages in the dequeue are fed back until the message length is more than the token size, and the master control chip issues a token once receiving a token message fed back.
And S105, correspondingly distributing the tokens to the various messages based on the adjusted issuing period of the tokens.
And S106, respectively carrying out queue level scheduling on the multicast message and the broadcast message according to the tokens distributed to the multicast message and the broadcast message.
Specifically, the token controls dequeue scheduling of various messages through a token bucket algorithm, the control mechanism of the token bucket indicates when traffic can be sent based on whether the token bucket has a token, each token in the token bucket represents one byte, and if the token bucket has the token, the traffic is allowed to be sent; and if no token exists in the token bucket, the traffic is not allowed to be sent.
Further, when there is a message and a token in the high-priority pre-queue of the multicast message and the high-priority pre-queue of the broadcast message, the multicast message and the broadcast message are put into the high-priority post-queue of the multicast message and the high-priority post-queue of the broadcast message, otherwise, the multicast message and the broadcast message are kept temporarily stored in the high-priority pre-queue, and similarly, the messages in the low-priority pre-queue of the multicast message and the low-priority pre-queue of the broadcast message are subjected to level scheduling according to the method.
The message in the front queue indicates that a message capable of dequeuing exists, but whether the message is dequeued from the front queue under the control of the token is not determined, so that the purpose of limiting speed is achieved by judging whether the message exists in the front queue and whether the message is controlled by the token, congestion is caused when the message is stored in the rear queue for dequeuing scheduling, and the Qos effect is influenced.
S107, according to the priority of the corresponding message queue and the preset weight value, the dequeue scheduling is carried out on the various messages.
Specifically, the preset weight values sequentially include, from high to low: unicast messages, multicast messages and broadcast messages;
further, the unicast message is dispatched out of the queue preferentially, wherein the unicast message with high priority in the unicast high-priority queue is dispatched firstly, and then the unicast message with low priority in the unicast low-priority queue is dispatched;
further, scheduling the multicast message dequeuing, wherein, firstly, scheduling the high priority multicast message in the multicast high priority queue, (for the high priority multicast message, preferentially scheduling the high priority multicast message in the multicast high priority pre-stage queue, secondly scheduling the high priority multicast message in the multicast high priority post-stage queue), and then scheduling the low priority multicast message in the multicast low priority queue (for the low priority multicast message, preferentially scheduling the low priority multicast message in the multicast low priority pre-stage queue, secondly scheduling the low priority multicast message in the multicast low priority post-stage queue);
further, scheduling the broadcast messages out of the queue, wherein the high-priority broadcast messages in the broadcast high-priority queue are scheduled first (for the high-priority broadcast messages, the high-priority broadcast messages in the broadcast high-priority pre-stage queue are scheduled and broadcast preferentially, and the high-priority broadcast messages in the broadcast high-priority post-stage queue are scheduled and broadcast secondarily), and the low-priority broadcast messages in the broadcast low-priority queue are scheduled and broadcast secondarily (for the low-priority broadcast messages, the low-priority broadcast messages in the broadcast low-priority pre-stage queue are scheduled and broadcast preferentially, and the low-priority broadcast messages in the broadcast low-priority post-stage queue are scheduled and broadcast secondarily);
further, if no message is found in the message queue, the queue is skipped over and only the message in the next message queue is transmitted according to the sequence.
In the embodiment, the issuing cycle of the token is adjusted by feeding back the messages out of the queue, and when the number counter-pressure value is exceeded, the issuing speed of the token can be reduced, the burst of flow and the impact on message buffering are reduced, and the messages can be sent outwards at a uniform speed. And the messages in different message queues are preprocessed, so that the messages of different types are not influenced mutually, the unicast, the multicast and the broadcast are effectively managed under the condition of congestion, the broadband on a two-layer network is effectively utilized, unnecessary broadband waste is avoided, the network congestion is relieved, the utilization rate of the broadband is improved, the messages of various types are globally mastered under the condition of congestion, and the accuracy of Qos is ensured.
In an embodiment, referring to fig. 2, the storing the different types of packets into the different packet queues in step S102 includes:
s1021, judging the priority of the unicast message, the priority of the multicast message and the priority of the broadcast message respectively;
specifically, the priority is judged according to different requirements of the unicast message, the multicast message and the broadcast message according to different requirements of the messages; for example, a message that needs urgent transmission and has high time delay is set as a high priority, and a message that has low transmission requirement and low time delay is set as a low priority.
S1022, if the unicast message is of high priority, storing the unicast message of high priority to the unicast high priority queue, otherwise, storing the unicast message of low priority to the unicast low priority queue;
s1023, if the multicast message is high priority, storing the high priority multicast message to the multicast high priority preceding queue, otherwise, storing the low priority multicast message to the multicast low priority preceding queue;
s1024, if the broadcast message is of high priority, storing the broadcast message of high priority to the broadcast high-priority pre-queue, otherwise, storing the broadcast message of low priority to the broadcast low-priority pre-queue.
In an embodiment, referring to fig. 3 to 4, the performing, in step S106, queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet respectively includes:
and respectively comparing the surplus quantity of the tokens distributed to the high-priority multicast message and the high-priority broadcast message with the surplus token backpressure value.
Specifically, the surplus number of tokens refers to the number of current tokens.
And if the surplus number of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively greater than the surplus counter-pressure value of the tokens, respectively increasing the token number of the low-priority multicast message and the token number of the low-priority broadcast message.
And comparing the surplus number of the tokens of the low-priority multicast message with the length of the first multicast message in the multicast low-priority preceding-stage queue.
If the surplus number of the tokens of the low-priority multicast message is larger than the length of the first multicast message in the multicast low-priority preceding-stage queue, storing the low-priority multicast message to the multicast low-priority subsequent-stage queue;
further, if the surplus number of the tokens of the low-priority multicast packet is smaller than the length of the first multicast packet in the multicast low-priority pre-queue, the low-priority multicast packet is still stored in the multicast low-priority pre-queue.
And comparing the surplus number of the tokens of the low-priority broadcast message with the length of the first broadcast message in the broadcast low-priority pre-stage queue.
If the surplus number of the tokens of the low-priority broadcast message is larger than the length of the first broadcast message in the broadcast low-priority front-stage queue, storing the low-priority broadcast message to the broadcast low-priority rear-stage queue;
further, if the surplus number of tokens of the low-priority broadcast packet is smaller than the length of the first broadcast packet in the broadcast low-priority pre-queue, the low-priority broadcast packet still stores the broadcast low-priority pre-queue.
In this embodiment, the existence of a message in the front-stage queue indicates that a dequeued message exists, but it is not determined that the message cannot be dequeued from the front-stage queue under the control of a token, so that the surplus number of tokens is compared with the length of the first broadcast message in the front-stage queue to determine whether the message in the front-stage queue has a token, thereby achieving the purpose of limiting the speed, so as to limit the congestion of the message on the rear-stage queue after the message passes through, and influence the Qos.
In one embodiment, referring to fig. 3-4, the step S106 further includes:
and if the surplus quantity of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively smaller than the surplus counter-pressure value of the tokens, respectively increasing the token quantity of the high-priority multicast message and the high-priority broadcast message.
And comparing the surplus number of the tokens of the high-priority multicast message with the length of the first multicast message in the multicast high-priority preceding-stage queue.
If the surplus number of the tokens of the high-priority multicast message is larger than the length of the first multicast message in the multicast high-priority preceding queue, dequeuing the high-priority multicast message from the multicast high-priority preceding queue and entering the multicast high-priority subsequent queue;
further, if the surplus number of the tokens of the high-priority multicast packet is smaller than the length of the first multicast packet in the multicast high-priority pre-queue, the high-priority multicast packet is still stored in the multicast high-priority pre-queue.
And comparing the surplus number of the tokens of the high-priority broadcast message with the length of the first broadcast message in the broadcast high-priority pre-stage queue.
If the surplus number of the tokens of the high-priority broadcast message is larger than the length of the first broadcast message in the broadcast high-priority preceding-stage queue, dequeuing the high-priority broadcast message from the broadcast high-priority preceding-stage queue and entering the broadcast high-priority subsequent-stage queue;
further, if the surplus number of tokens of the high-priority broadcast packet is smaller than the length of the first broadcast packet in the broadcast high-priority pre-queue, the high-priority broadcast packet is still stored in the broadcast high-priority pre-queue.
In the implementation, the purpose of limiting speed is achieved by scheduling the multicast message and the broadcast message, that is, comparing and judging the token surplus quantity and the token surplus back pressure value of the multicast message and the broadcast message, that is, the limitation message causes congestion to a corresponding message queue after passing through, the defect that the communication effect is affected is overcome, the network congestion is relieved, and the Qos effect is ensured.
Based on the same inventive concept, embodiments of the present invention further provide a queue management system, and since the principle of the problem solved by the apparatus is similar to that of the queue management method, the implementation of the apparatus may refer to the implementation of the method, and repeated details are omitted.
Referring to fig. 5, a queue management system according to an embodiment of the present invention includes:
the classification module 51 is configured to classify packets entering a two-layer network according to packet types, where the packet types include a unicast packet, a multicast packet, and a broadcast packet;
specifically, the classification is performed according to the MAC address corresponding to the packet in the two-layer network.
The storage module 52 is configured to set different message queues for different types of messages in the two-layer network, and store the messages into the message queues of corresponding message types respectively.
A comparing module 53, configured to count the number of each type of packet stored in the different packet queues, compare the accumulated value of the number of each type of packet with the maximum stored packet number, buffer each type of packet out of the queues when the accumulated value of the number is greater than the maximum stored packet number, and count the number of each type of packet out of the queues;
specifically, the above messages refer to: unicast messages, multicast messages and broadcast messages.
Further, when the accumulated value of the number of each type of messages is smaller than the preset number back pressure value, issuing the token according to a default issuing period;
further, the token may be in the form of a token, that is, a special frame capable of controlling the station to possess the medium, so as to distinguish the data frame from other control frames.
And a feedback module 54, configured to be a feedback module, configured to feedback the number of each type of packet that is dequeued, and adjust an issuing period of the token according to the number of each type of packet that is fed back.
And the distribution module 55 is configured to correspondingly distribute the tokens to the various messages based on the adjusted issuing period of the tokens.
And a queue level scheduling module 56, configured to perform queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet.
The dequeue scheduling module 57 is configured to perform dequeue scheduling on each type of message according to the priority of the corresponding message queue and a preset weight value;
specifically, the preset weight values sequentially include, from high to low: unicast messages, multicast messages and broadcast messages;
further, the unicast message is dispatched out of the queue preferentially, wherein the unicast message with high priority in the unicast high-priority queue is dispatched firstly, and then the unicast message with low priority in the unicast low-priority queue is dispatched;
further, scheduling the multicast message dequeuing, wherein, firstly, scheduling the high priority multicast message in the multicast high priority queue, (for the high priority multicast message, preferentially scheduling the high priority multicast message in the multicast high priority pre-stage queue, secondly scheduling the high priority multicast message in the multicast high priority post-stage queue), and then scheduling the low priority multicast message in the multicast low priority queue (for the low priority multicast message, preferentially scheduling the low priority multicast message in the multicast low priority pre-stage queue, secondly scheduling the low priority multicast message in the multicast low priority post-stage queue);
further, scheduling the broadcast messages out of the queue, wherein the high-priority broadcast messages in the broadcast high-priority queue are scheduled first (for the high-priority broadcast messages, the high-priority broadcast messages in the broadcast high-priority pre-stage queue are scheduled and broadcast preferentially, and the high-priority broadcast messages in the broadcast high-priority post-stage queue are scheduled and broadcast secondarily), and the low-priority broadcast messages in the broadcast low-priority queue are scheduled and broadcast secondarily (for the low-priority broadcast messages, the low-priority broadcast messages in the broadcast low-priority pre-stage queue are scheduled and broadcast preferentially, and the low-priority broadcast messages in the broadcast low-priority post-stage queue are scheduled and broadcast secondarily);
further, if no message is found in the message queue, the queue is skipped over and only the message in the next message queue is transmitted according to the sequence.
In one embodiment, the different packet queues in the storage module 52 include: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
In one embodiment, the storage module 52 includes:
a priority determining unit 521, configured to determine priorities of the unicast packet, the multicast packet, and the broadcast packet, respectively;
specifically, the priority is determined according to the unicast message, the multicast message and the broadcast message according to different requirements of the messages.
A unicast message storage unit 522, configured to store a unicast message with a high priority to the unicast high priority queue if the unicast message is with a high priority, and store a unicast message with a low priority to the unicast low priority queue if the unicast message is with a high priority.
A multicast packet storage unit 523, configured to store the multicast packet with the high priority to the multicast high-priority pre-stage queue if the multicast packet is of the high priority, and otherwise, store the multicast packet with the low priority to the multicast low-priority pre-stage queue.
A broadcast packet storage unit 524, configured to store a high-priority broadcast packet in the broadcast high-priority pre-queue if the broadcast packet is of a high priority, and store a low-priority broadcast packet in the broadcast low-priority pre-queue if the broadcast packet is of a low priority.
In one embodiment, the queue level scheduling module 56 includes:
a high-priority comparing unit 561, configured to compare the surplus number of tokens allocated to the high-priority multicast packet and the high-priority broadcast packet with the token surplus backpressure value, respectively;
a low-priority token increasing unit 562, configured to increase the number of tokens of the low-priority multicast packet and the low-priority broadcast packet, if the surplus number of tokens of the high-priority multicast packet and the high-priority broadcast packet is greater than the token surplus counter-pressure value, respectively;
a low priority multicast comparing unit 563 configured to compare the surplus number of tokens of the low priority multicast packet with the length of the first multicast packet in the multicast low priority pre-stage queue;
a low-priority multicast message storage unit 564, configured to store the low-priority multicast message to the multicast low-priority back-level queue if the surplus number of tokens of the low-priority multicast message is greater than the length of the first multicast message in the multicast low-priority front-level queue;
a low priority broadcast comparing unit 565, configured to compare the surplus number of tokens of the low priority broadcast packet with the length of the first broadcast packet in the broadcast low priority pre-stage queue;
a low-priority broadcast packet storing unit 566, configured to store the low-priority broadcast packet in the broadcast low-priority back-level queue if the surplus number of tokens of the low-priority broadcast packet is greater than the length of the first broadcast packet in the broadcast low-priority front-level queue.
In one embodiment, the scheduling unit 56 further includes:
a high-priority token increasing unit 567, configured to increase the token numbers of the high-priority multicast packet and the high-priority broadcast packet, if the surplus numbers of the tokens of the high-priority multicast packet and the high-priority broadcast packet are respectively smaller than the token surplus counter-pressure value;
a high-priority multicast comparing unit 568, configured to compare the surplus number of tokens of the high-priority multicast packet with the length of the first multicast packet in the multicast high-priority pre-stage queue;
a high-priority multicast packet dequeuing unit 569, configured to dequeue the high-priority multicast packet from the multicast high-priority pre-queue and enter the multicast high-priority post-queue if the surplus number of tokens of the high-priority multicast packet is greater than the length of the first multicast packet in the multicast high-priority pre-queue;
a high-priority broadcast comparing unit 570, configured to compare the surplus number of tokens of the high-priority broadcast packet with the length of the first broadcast packet in the broadcast high-priority pre-stage queue;
a high-priority broadcast packet dequeuing unit 571, configured to dequeue the high-priority broadcast packet from the broadcast high-priority pre-queue and enter the broadcast high-priority post-queue if the surplus number of tokens of the high-priority broadcast packet is greater than the length of the first broadcast packet in the broadcast high-priority pre-queue.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of queue management, comprising:
classifying messages entering a two-layer network according to message types, wherein the message types comprise unicast messages, multicast messages and broadcast messages;
setting different message queues aiming at different types of messages in a two-layer network, and respectively storing the messages into the message queues of corresponding message types;
counting the number of various messages stored in the different message queues, comparing the accumulated value of the number of various messages with the maximum message storage number, when the accumulated value of the number is greater than the maximum message storage number, buffering various messages which are out of the queues, and counting the number of various messages which are out of the queues;
feeding back the number of the various messages of the queue, and adjusting the issuing period of the token according to the number of the various messages fed back;
correspondingly distributing the tokens to the various messages based on the adjusted issuing period of the tokens;
respectively carrying out queue level scheduling on the multicast message and the broadcast message according to the tokens distributed to the multicast message and the broadcast message;
and performing dequeue scheduling on the various messages according to the priority of the corresponding message queue and the preset weight value.
2. The system of claim 1, wherein the message queue comprises: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
3. The method of claim 2, wherein the storing the different types of packets into the different packet queues respectively comprises:
judging the priority of the unicast message, the multicast message and the broadcast message respectively;
if the unicast message is of high priority, storing the unicast message of high priority into the unicast high priority queue, otherwise, storing the unicast message of low priority into the unicast low priority queue;
if the multicast message is of high priority, storing the multicast message of high priority to the preceding queue of high priority of multicast, otherwise, storing the multicast message of low priority to the preceding queue of low priority of multicast;
if the broadcast message is of high priority, storing the broadcast message of high priority to the pre-queue of high priority of broadcast, otherwise, storing the broadcast message of low priority to the pre-queue of low priority of broadcast.
4. The method of claim 1, wherein the performing queue level scheduling for the multicast packets and the broadcast packets according to the tokens allocated for the multicast packets and the broadcast packets, respectively, comprises:
respectively comparing the surplus quantity of the tokens distributed to the high-priority multicast message and the high-priority broadcast message with the surplus token backpressure value;
if the surplus number of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively greater than the surplus counter-pressure value of the tokens, respectively increasing the token number of the low-priority multicast message and the token number of the low-priority broadcast message;
comparing the surplus number of the tokens of the low-priority multicast message with the length of the first multicast message in the multicast low-priority preceding-stage queue;
if the surplus number of the tokens of the low-priority multicast message is larger than the length of the first multicast message in the multicast low-priority preceding-stage queue, storing the low-priority multicast message to the multicast low-priority subsequent-stage queue;
comparing the surplus number of tokens of the low-priority broadcast message with the length of the first broadcast message in the broadcast low-priority pre-stage queue;
and if the surplus number of the tokens of the low-priority broadcast message is greater than the length of the first broadcast message in the broadcast low-priority front-stage queue, storing the low-priority broadcast message to the broadcast low-priority rear-stage queue.
5. The method of claim 4, wherein the performing queue level scheduling on the multicast packets and the broadcast packets according to the tokens allocated to the multicast packets and the broadcast packets, respectively, further comprises:
if the surplus number of the tokens of the high-priority multicast message and the high-priority broadcast message is respectively smaller than the surplus counter-pressure value of the tokens, respectively increasing the token number of the high-priority multicast message and the high-priority broadcast message;
comparing the surplus number of the tokens of the high-priority multicast message with the length of the first multicast message in the multicast high-priority preceding-stage queue;
if the surplus number of the tokens of the high-priority multicast message is larger than the length of the first multicast message in the multicast high-priority preceding queue, dequeuing the high-priority multicast message from the multicast high-priority preceding queue and entering the multicast high-priority subsequent queue;
comparing the surplus number of the tokens of the high-priority broadcast message with the length of the first broadcast message in the broadcast high-priority pre-stage queue;
and if the surplus number of the tokens of the high-priority broadcast message is greater than the length of the first broadcast message in the broadcast high-priority preceding-stage queue, dequeuing the high-priority broadcast message from the broadcast high-priority preceding-stage queue and entering the broadcast high-priority subsequent-stage queue.
6. A queue management system, comprising:
the classification module is used for classifying the messages entering the two-layer network according to message types, wherein the message types comprise unicast messages, multicast messages and broadcast messages;
the storage module is used for setting different message queues aiming at different types of messages in the two-layer network and respectively storing the messages into the message queues of corresponding message types;
the comparison module is used for counting the number of various messages stored in the different message queues, comparing the accumulated value of the number of various messages with the maximum message storage number, buffering various messages going out of the queues when the accumulated value of the number is greater than the maximum message storage number, and counting the number of various messages going out of the queues;
the feedback module is used for feeding back the number of the various messages out of the queue and adjusting the issuing period of the token according to the number of the various messages fed back;
the distribution module is used for correspondingly distributing the tokens to the various messages based on the adjusted issuing period of the tokens;
a queue level scheduling module, configured to perform queue level scheduling on the multicast packet and the broadcast packet according to the tokens allocated to the multicast packet and the broadcast packet;
and the dequeue scheduling module is used for dequeuing and scheduling various messages according to the priority of the corresponding message queue and the preset weight value.
7. The system of claim 6, wherein the message queue in the storage module comprises: a unicast queue, a multicast queue and a broadcast queue;
the unicast queues comprise a unicast high-priority queue and a unicast low-priority queue;
the multicast queues comprise a multicast high-priority preceding queue, a multicast high-priority subsequent queue, a multicast low-priority preceding queue and a multicast low-priority subsequent queue;
the broadcast queues include a broadcast high priority pre-queue, a broadcast high priority post-queue, a broadcast low priority pre-queue, and a broadcast low priority post-queue.
8. The system of claim 7, wherein the storage module comprises:
a priority judging unit, configured to respectively judge priorities of the unicast packet, the multicast packet, and the broadcast packet;
a unicast message storage unit, configured to store a high-priority unicast message to the unicast high-priority queue if the unicast message is of a high priority, and store a low-priority unicast message to the unicast low-priority queue if the unicast message is of a low priority;
a multicast message storage unit, configured to store a high-priority multicast message to the multicast high-priority pre-stage queue if the multicast message is of a high priority, and store a low-priority multicast message to the multicast low-priority pre-stage queue if the multicast message is of a low priority;
and the broadcast message storage unit is used for storing the broadcast message with high priority to the broadcast high-priority pre-queue if the broadcast message is with high priority, and storing the broadcast message with low priority to the broadcast low-priority pre-queue if the broadcast message is with high priority.
9. The system of claim 6, wherein the queue level scheduling module comprises:
a high-priority comparison unit, configured to compare the surplus number of tokens allocated to the high-priority multicast packet and the high-priority broadcast packet with a token surplus backpressure value;
a low-priority token increasing unit, configured to increase the token numbers of the low-priority multicast packet and the low-priority broadcast packet, if the surplus numbers of the tokens of the high-priority multicast packet and the high-priority broadcast packet are respectively greater than a token surplus counter-pressure value;
a low priority multicast comparing unit, configured to compare the surplus number of tokens of the low priority multicast packet with the length of the first multicast packet in the multicast low priority pre-stage queue;
a low-priority multicast message storage unit, configured to store the low-priority multicast message to the multicast low-priority post-queue if the surplus number of tokens of the low-priority multicast message is greater than the length of the first multicast message in the multicast low-priority pre-queue;
a low priority broadcast comparing unit, configured to compare the surplus number of tokens of the low priority broadcast packet with the length of the first broadcast packet in the broadcast low priority pre-stage queue;
a low-priority broadcast packet storage unit, configured to store the low-priority broadcast packet in the broadcast low-priority back-stage queue if the surplus number of tokens of the low-priority broadcast packet is greater than the length of the first broadcast packet in the broadcast low-priority front-stage queue.
10. The system of claim 9, wherein the queue level scheduling module further comprises:
a high-priority token increasing unit, configured to increase the number of tokens of the high-priority multicast packet and the high-priority broadcast packet, if the surplus number of tokens of the high-priority multicast packet and the high-priority broadcast packet is smaller than a token surplus counter-pressure value, respectively;
a high-priority multicast comparing unit, configured to compare the surplus number of tokens of the high-priority multicast packet with the length of the first multicast packet in the multicast high-priority pre-stage queue;
a high-priority multicast message dequeuing unit, configured to dequeue the high-priority multicast message from the multicast high-priority pre-stage queue and enter the multicast high-priority post-stage queue if the surplus number of tokens of the high-priority multicast message is greater than the length of the first multicast message in the multicast high-priority pre-stage queue;
a high-priority broadcast comparing unit, configured to compare the surplus number of tokens of the high-priority broadcast packet with the length of the first broadcast packet in the broadcast high-priority pre-stage queue;
a high-priority broadcast message dequeuing unit, configured to dequeue the high-priority broadcast message from the broadcast high-priority pre-queue and enter the broadcast high-priority post-queue if the surplus number of tokens of the high-priority broadcast message is greater than the length of the first broadcast message in the broadcast high-priority pre-queue.
CN202010616343.6A 2020-06-30 2020-06-30 Queue management method and system Pending CN111917664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010616343.6A CN111917664A (en) 2020-06-30 2020-06-30 Queue management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010616343.6A CN111917664A (en) 2020-06-30 2020-06-30 Queue management method and system

Publications (1)

Publication Number Publication Date
CN111917664A true CN111917664A (en) 2020-11-10

Family

ID=73227029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010616343.6A Pending CN111917664A (en) 2020-06-30 2020-06-30 Queue management method and system

Country Status (1)

Country Link
CN (1) CN111917664A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987912A (en) * 2022-12-21 2023-04-18 迈普通信技术股份有限公司 Message forwarding control method, device, equipment and storage medium
CN116614445A (en) * 2023-07-20 2023-08-18 苏州仰思坪半导体有限公司 Data transmission method and related device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4459588A (en) * 1982-03-05 1984-07-10 Burroughs Corporation Timed token protocol for local area networks
CN102142008A (en) * 2010-12-02 2011-08-03 华为技术有限公司 Method and system for implementing distributed memory database, token controller and memory database
CN103533661A (en) * 2013-10-23 2014-01-22 中国舰船研究设计中心 Wireless channel access control method based on virtual token
CN106302239A (en) * 2015-05-25 2017-01-04 深圳市中兴微电子技术有限公司 A kind of method and device of single multicast flow scheduling management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4459588A (en) * 1982-03-05 1984-07-10 Burroughs Corporation Timed token protocol for local area networks
CN102142008A (en) * 2010-12-02 2011-08-03 华为技术有限公司 Method and system for implementing distributed memory database, token controller and memory database
CN103533661A (en) * 2013-10-23 2014-01-22 中国舰船研究设计中心 Wireless channel access control method based on virtual token
CN106302239A (en) * 2015-05-25 2017-01-04 深圳市中兴微电子技术有限公司 A kind of method and device of single multicast flow scheduling management

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡云;: "对网络流量管理与拥塞管理的研究", 电脑开发与应用, no. 05 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987912A (en) * 2022-12-21 2023-04-18 迈普通信技术股份有限公司 Message forwarding control method, device, equipment and storage medium
CN116614445A (en) * 2023-07-20 2023-08-18 苏州仰思坪半导体有限公司 Data transmission method and related device thereof
CN116614445B (en) * 2023-07-20 2023-10-20 苏州仰思坪半导体有限公司 Data transmission method and related device thereof

Similar Documents

Publication Publication Date Title
EP1774714B1 (en) Hierarchal scheduler with multiple scheduling lanes
US8467295B2 (en) System and methods for distributed quality of service enforcement
US7649882B2 (en) Multicast scheduling and replication in switches
EP2353017B1 (en) Packet aggregation and fragmentation at layer-2 over a managed network
US20070070895A1 (en) Scaleable channel scheduler system and method
US8130649B2 (en) Ingress traffic flow control in a data communications system
US8442063B1 (en) System and method for scheduling unicast and multicast traffic
JP2001519120A (en) Hierarchical packet scheduling method and apparatus
CN102487494B (en) Short message flow control method and system
WO2016150833A1 (en) Methods, queueing system, network element and network system for queueing and processing of packets
CN111917664A (en) Queue management method and system
US9294410B2 (en) Hybrid dataflow processor
US7269180B2 (en) System and method for prioritizing and queuing traffic
US8879578B2 (en) Reducing store and forward delay in distributed systems
WO2016188057A1 (en) Unicast/multicast traffic scheduling management method and apparatus
US8995458B1 (en) Method and apparatus for delay jitter reduction in networking device
Hu et al. Per-flow queueing by dynamic queue sharing
Demoor et al. Partially shared buffers with full or mixed priority
US9270616B1 (en) Low-latency quality of service
US7599381B2 (en) Scheduling eligible entries using an approximated finish delay identified for an entry based on an associated speed group
CN111107016B (en) Network congestion control method, device, chip and storage medium
EP1774721B1 (en) Propagation of minimum guaranteed scheduling rates
CN110300069B (en) Data transmission method, optimization device and system
Fiems et al. Performance analysis of a video streaming buffer
Sivaradje et al. Efficient resource allocation scheme for real-time MPEG video traffic over ATM networks

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