METHOD AND MODULE OF PRIORITY DIVISION AND QUEUE SCHEDULING FOR COMMUNICATION SERVICES IN SMART SUBSTATION
20210367895 · 2021-11-25
Inventors
- Jun'e Li (Wuhan, CN)
- Qiuyu Lu (Wuhan, CN)
- Yangrong Chen (Wuhan, CN)
- Hai Lin (Wuhan, CN)
- Yu Xia (Wuhan, CN)
- Fuyang Li (Wuhan, CN)
Cpc classification
H04L47/30
ELECTRICITY
H04L47/2441
ELECTRICITY
International classification
Abstract
A method for dividing communication services in smart substation into different priorities, the method including: determining the priority of a message to be sent according to the service type and its priority definition; the communication services includes trip message, state change message, sampled value message, device status message, time synchronization message, and file transfer message; the corresponding priority is respectively defined as 7, 6, 5, 4, 3, 1; and filling the user priority field of IEEE802.1Q label in a message header with a binary value corresponding to its priority.
Claims
1. A method for dividing communication services in smart substation into different priorities, the method comprising: (a1) determining the priority of a message to be sent according to the service type and its priority definition; wherein the communication services comprise trip message, state change message, sampled value message, device status message, time synchronization message, and file transfer message; the corresponding priority is respectively defined as 7, 6, 5, 4, 3, 1; and (a2) filling a user priority field of IEEE802.1Q label in a message header with a binary value corresponding to its priority.
2. A queue scheduling method for a priority scheme, the method comprising: (b1) initializing each queue, and setting a buffer size for each queue; (b2) reading a packet from a receive buffer of switch, and putting the packet into the corresponding queue according to the priorities; and (b3) scheduling and outputting the packet according to HDWRR scheduling rule.
3. The queue scheduling method of claim 2, wherein in b1) setting six first in first out (FIFO) queues, and marking each queue as Q.sub.1, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in the order of priority from low to high; the buffer space of each queue PerqueSize=BufferSize/6, where BufferSize represents the buffer space size of the output port.
4. The queue scheduling method of claim 2, wherein b2) comprises: (b2.1) checking the user priority field of IEEE802.1Q label, and converting the binary value in the field to decimal value t, when a packet p arrives; and (b2.2) if t>7, setting the value of t to 7; if t<1, setting the value of t to 1; and (b2.3) if PacketSize+QueSize≤PerqueSize, put p into Q.sub.t; otherwise, discarding p; wherein PacketSize is the length of packet p, and QueSize is the current length of Q.sub.t.
5. The queue scheduling method of claim 2, wherein b3) further comprises: (b3.1) checking whether there are packets waiting for scheduling in Q.sub.3-Q.sub.7, when the first packet puts into Q.sub.ti, or the head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling Q.sub.3-Q.sub.7 according to deficit weight round robin (DWRR) scheduling rule, and outputting packet p′; otherwise, going to b3.2); for each Q.sub.i participating in DWRR scheduling, the weight W.sub.i, the service quantum X.sub.i, and the value of the counter DC.sub.i are preset; where 3≤i≤7, W.sub.i is a constant value according to the actual needs of users or a dynamic value according to different network conditions, where X.sub.i=ρW.sub.i, ρ is a positive integer, and DC.sub.i=0; and (b3.2) if Q.sub.1 is not empty, scheduling it according to the arrival order of packets, and outputting a packet p″; in the meantime, monitoring whether there are packets waiting for scheduling in Q.sub.3-Q.sub.7; if so, going to step (b3.1); otherwise, going to step (b3.2).
6. A sending module for being integrated into a terminal equipment of a smart substation, the sending module comprising a processing unit and a sending unit, wherein: the processing unit is configured to determine the priority of a message to be sent according to the service type and its priority definition; wherein, the communication services comprise trip message, state change message, sampled value message, device status message, time synchronization message, and file transfer message; the corresponding priority is respectively defined as 7, 6, 5, 4, 3, 1; and the sending unit is configured to fill the user priority field of IEEE802.1Q label in a message header with a binary value corresponding to its priority, and send the message.
7. A forwarding module for being integrated into switches used in a smart substation, the forwarding module comprising a configuration unit, a receiving unit, and a scheduling unit, wherein: the configuration unit is configured to initialize each queue, and set a buffer size for each queue, wherein: 1) six first in first out (FIFO) queues are set, and marked as Q.sub.1, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in the order of priority from low to high, and 2) the buffer size of each queue PerqueSize=BufferSize/6, BufferSize represents the buffer space size of the output port; the receiving unit is configured to receive a packet p, and put the packet p into the corresponding queue according to its priority, wherein: 1) when the packet p arrives, the user priority field of IEEE802.1Q label in the packet is checked, and the binary value in the field is converted to decimal value t; if t>7, setting the value of t to 7; if t<1, setting the value of t to 1, and 2) if PacketSize+QueSize≤PerqueSize, p is put into Q.sub.t; otherwise, p is discarded; where PacketSize is the length of p, and QueSizeis the current length of Q.sub.t; the scheduling unit is configured to schedule and output packets according to HDWRR scheduling rule, wherein: the HDWRR scheduling rule comprises: checking whether there are packets waiting for scheduling in Q.sub.3-Q.sub.7, when the first packet puts into Q.sub.i, or the head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling queue Q.sub.3-Q.sub.7 according to deficit weight round robin (DWRR) scheduling rule, and outputting packet p′; otherwise, scheduling Q.sub.1 according to the arrival order of packets, and outputting a packet p″; while scheduling Q.sub.1, monitoring whether there are packets waiting for scheduling in Q.sub.3-Q.sub.7; if so, scheduling Q.sub.3-Q.sub.7 immediately; otherwise, scheduling Q.sub.1 continuously.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0024]
[0025]
[0026]
[0027]
DETAILED DESCRIPTION
[0028] To facilitate the understanding and implementation of the disclosure by persons of ordinary skill in the art, the disclosure will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that embodiments described herein are merely used for illustrating and explaining the invention rather than limiting the invention.
[0029] Referring to
[0030] (a1) determining the priority of a message to be sent according to the service type and its priority definition; the communication services comprise trip message, state change message, sampled value message, device status message, time synchronization message, and file transfer message; the corresponding priority is respectively defined as 7, 6, 5, 4, 3, 1; in the described embodiment, the message to be sent is a trip command with priority t=7; and
[0031] (a2) filling the user priority field of IEEE802.1Q label in a message header with a binary value 111 corresponding to its priority.
[0032] Referring to
[0033] (b1) initializing each queue, and setting a buffer size for each queue;
[0034] in b1), setting six first in first out (FIFO) queues, and marking each queue as Q.sub.1, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in the order of priority from low to high; wherein the buffer space of each queue PerqueSize=BufferSize/6, where BufferSize represents the buffer space size of the output port; in the described embodiment, BufferSize=1.5 Mb;
[0035] (b2) reading a packet from the receive buffer of switch, and putting the packet into the corresponding queue according to its priority; and
[0036] (b3) scheduling and outputting a packet according to HDWRR scheduling rule
[0037] b2) further comprises:
[0038] (b2.1) checking the user priority field of IEEE802.1Q label, and converting the binary value in the field to decimal value t, when a packet p arrives; in the described embodiment, t=7;
[0039] (b2.2) if t>7, setting the value of t to 7; if t<1, setting the value of t to 1; and
[0040] (b2.3) if PacketSize+QueSize≤PerqueSize, put p into Q.sub.t; otherwise, discarding p; wherein, PacketSize is the length of packet p, and QueSize is the current length of Q.sub.t.
[0041] b3) further comprises:
[0042] (b3.1) Checking whether there are packets waiting for scheduling in Q.sub.3-Q.sub.7, when the first packet puts into Q.sub.i, or the head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling Q.sub.3-Q.sub.7 according to deficit weight round robin (DWRR) scheduling rule, and outputting packet p′; otherwise, going to step (b3.2); for each Q.sub.i participating in DWRR scheduling, the weight W.sub.i, the service quantum X.sub.i, and the value of the counter DC.sub.i are preset; where, 3≤i≤7, W.sub.i is a constant value according to the actual needs of users or a dynamic value according to different network conditions, where X.sub.i=ρW.sub.i, ρ is a positive integer, and DC.sub.i=0; in the described embodiment, W.sub.i=i−2, and ρ=100; and
[0043] (b3.2) if Q.sub.1 is not empty, scheduling it according to the arrival order of packets, and outputting a packet p″; in the meantime, monitoring whether there are packets waiting for scheduling in Q.sub.3˜Q.sub.7; if so, going to b3.1); otherwise, going to step (b3.2).
[0044] Referring to
[0045] The processing unit is configured to determine the priority of message to be sent according to the service type and its priority definition. The communication services comprise trip message, state change message, sampled value message, device status message, time synchronization message, and file transfer message. The corresponding priority is respectively defined as 7, 6, 5, 4, 3, 1. In the described embodiment, the message to be sent is a trip command with priority t=7.
[0046] The sending unit is configured to fill the user priority field of IEEE802.1Q label in the message header with a binary value 111 corresponding to its priority, and send the message.
[0047] Referring to
[0048] The configuration unit is configured to initialize each queue, and set the buffer size for each queue, wherein:
[0049] 1) six first in first out (FIFO) queues are set and marked as Q.sub.1, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in the order of priority from low to high; and
[0050] 2) the buffer size of each queue PerqueSize=BufferSize/6, where BufferSize represents the buffer space size of the output port. In the described embodiment, BufferSize=1.5 Mb.
[0051] The receiving unit is configured to receive a packet p, and put the packet p into the corresponding queue according to its priority, wherein:
[0052] 1) when the packet p arrives, the user priority field of IEEE802.1Q label in the packet is checked, and the binary value in the field is converted to decimal value t; if t>7, setting the value of t to 7, if t<1, setting the value of t to 1. In the described embodiment, t=7; and
[0053] 2) if PacketSize+QueSize≤PerqueSize, p is put into Q.sub.t and queued up for scheduling; otherwise, p is discarded; wherein PacketSize is the length of p, and QueSizeis the current length of Q.sub.t; and
[0054] The scheduling unit is configured to schedule and output packets according to HDWRR scheduling rule, wherein the HDWRR scheduling rule comprises: checking whether there are packets waiting for scheduling in Q.sub.3˜Q.sub.7, when the first packet puts into Q.sub.i, or the head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling Q.sub.3-Q.sub.7 according to deficit weight round robin (DWRR) scheduling rule, and outputting packet p′; otherwise, scheduling Q.sub.1 according to the arrival order of packets, and outputting a packet p″; while scheduling Q.sub.1, monitoring whether there are packets waiting for scheduling in Q.sub.3˜Q.sub.7; if so, scheduling Q.sub.3-Q.sub.7 immediately; otherwise, scheduling Q.sub.1 continuously.
[0055] It is worth noting that, for each queue Q.sub.i participating in DWRR scheduling, the weight W.sub.ti, the service quantum X.sub.i, and the value of the counter DC.sub.i are preset; where 3≤i≤7, W.sub.i is a constant value according to the actual needs of users or a dynamic value according to different network conditions, X.sub.i=ρW.sub.i, ρ is a positive integer, and DC.sub.i=0. In the described embodiment, W.sub.i=i−2, and p=100.
[0056] It will be obvious to those skilled in the art that changes and modifications may be made, and therefore, the aim in the appended claims is to cover all such changes and modifications.