Method and module of priority division and queue scheduling for communication services in smart substation

11502960 · 2022-11-15

Assignee

Inventors

Cpc classification

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 queue scheduling method for a priority scheme, the method comprising: (b1) setting seven first in first out (FIFO) queues, and marking each queue as Q.sub.1, Q.sub.2, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in an order of priority from low to high; a buffer space size of each queue being PerqueSize=BufferSize/7, wherein BufferSize is a buffer space size of an output port; (b2) reading a packet from a receive buffer of a switch, and putting the packet into one of the queues according to (b2.1), (b2.2), and (b2.3): (b2.1) checking an user priority field of IEEE802.1Q label, and converting a binary value in the field to a 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, putting the packet p into Q.sub.t; otherwise, discarding the packet p; wherein PacketSize is a length of the packet p, and QueSize is a current length of Q.sub.t; and (b3) scheduling and outputting the packet according to (b3.1) and (b3.2): (b3.1) checking whether there are packets waiting for scheduling in Q.sub.2-Q.sub.7, when a first packet puts into Q.sub.i, or a head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling Q.sub.2-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, a weight W.sub.i, a service quantum X.sub.i, and a value of a counter DC.sub.i are preset; wherein i is an integer, and 2≤i≤7, W.sub.i is a constant value according to 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 an arrival order of packets, and outputting a packet p″; in the meantime, monitoring whether there are packets waiting for scheduling in Q.sub.2-Q.sub.7; if so, going to step (b3.1); otherwise, going to step (b3.2).

2. 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 to set a buffer space size for each queue according to 1) and 2): 1) seven first in first out (FIFO) queues are set, and marked as Q.sub.1, Q.sub.2, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6, Q.sub.7 in an order of priority from low to high, and 2) a buffer space size of each queue is set to be PerqueSize=BufferSize/7, BufferSize represents a buffer space size of an output port; the receiving unit is configured to receive a packet p, and to put the packet p into one of the queues according to (1) and (2): (1) when the packet p arrives, a user priority field of IEEE802.1Q label in the packet is checked, and a 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, the packet p is put into Q.sub.t; otherwise, the packet p is discarded; wherein PacketSize is a length of the packet p, and QueSize is a current length of Q.sub.t; the scheduling unit is configured to schedule and output packets according to a rule comprising: checking whether there are packets waiting for scheduling in Q.sub.2-Q.sub.7, when a first packet puts into Q.sub.i, or a head-of-line packet in Q.sub.i has just been processed and forwarded; if so, scheduling queue Q.sub.2-Q.sub.7 according to deficit weight round robin (DWRR) scheduling rule, and outputting packet p′; otherwise, scheduling Q.sub.1 according to an 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.2-Q.sub.7; if so, scheduling Q.sub.2-Q.sub.7 immediately; otherwise, scheduling Q.sub.1 continuously.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 shows a flow chart of priority scheme of communication service in smart substation;

(2) FIG. 2 shows an overall structure of the HDWRR queue scheduling method for the priority scheme;

(3) FIG. 3 shows a structure chart of the sending module; and

(4) FIG. 4 shows a structure chart of the forwarding module.

DETAILED DESCRIPTION

(5) 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.

(6) Referring to FIG. 1, a priority scheme of communication services in the smart substation comprises:

(7) (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

(8) (a2) filling the user priority field of IEEE802.1Q label in a message header with a binary value 111 corresponding to its priority.

(9) Referring to FIG. 2, a HDWRR queue scheduling method for the priority scheme comprises:

(10) (b1) initializing each queue, and setting a buffer size for each queue;

(11) 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;

(12) (b2) reading a packet from the receive buffer of switch, and putting the packet into the corresponding queue according to its priority; and

(13) (b3) scheduling and outputting a packet according to HDWRR scheduling rule

(14) b2) further comprises:

(15) (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;

(16) (b2.2) if t>7, setting the value of t to 7; if t<1, setting the value of t to 1; and

(17) (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.

(18) b3) further comprises:

(19) (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

(20) (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).

(21) Referring to FIG. 3, a sending module comprises a processing unit and a sending unit. The sending module is based on the embodiment of the priority scheme, and can be integrated into the terminal equipment of the smart substation, such as breaker IED, P&C IED, MU IED, station PC, etc.

(22) 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.

(23) 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.

(24) Referring to FIG. 4, a forwarding module comprises a configuration unit, a receiving unit and a scheduling unit. The forwarding module is based on the embodiment of the HDWRR queue scheduling method, and can be integrated into the switches used in smart substation.

(25) The configuration unit is configured to initialize each queue, and set the buffer size for each queue, wherein:

(26) 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

(27) 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.

(28) The receiving unit is configured to receive a packet p, and put the packet p into the corresponding queue according to its priority, wherein:

(29) 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

(30) 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

(31) 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.

(32) 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.

(33) 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.