CN111131214B - Method for converting SV message into R-SV message between transformer substations - Google Patents

Method for converting SV message into R-SV message between transformer substations Download PDF

Info

Publication number
CN111131214B
CN111131214B CN201911309175.XA CN201911309175A CN111131214B CN 111131214 B CN111131214 B CN 111131214B CN 201911309175 A CN201911309175 A CN 201911309175A CN 111131214 B CN111131214 B CN 111131214B
Authority
CN
China
Prior art keywords
message
length
information
indicates
identifier
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
Application number
CN201911309175.XA
Other languages
Chinese (zh)
Other versions
CN111131214A (en
Inventor
邓丰强
杨玲
何宇浩
郑烨琼
王智东
梁梅
邓俊文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201911309175.XA priority Critical patent/CN111131214B/en
Publication of CN111131214A publication Critical patent/CN111131214A/en
Application granted granted Critical
Publication of CN111131214B publication Critical patent/CN111131214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

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

Abstract

本发明公开了适用于变电站之间的SV报文向R‑SV报文的转换方法,包括以下步骤:S1、根据R‑SV报文的基本结构,形成R‑SV报文模板;S2、将R‑SV报文模板划分成SV报文信息、路由信息和校验封装信息三个部分;S3、将所获得的SV报文信息映射到内存的R‑SV报文模板对应的位置;S4、从SCL文件中提取路由信息;S5、将步骤S4提取到的路由信息填充到R‑SV报文与路由信息相关的报文域,并放入内存;S6、填充R‑SV报文模板的校验封装信息。本发明突破了传统SV报文在变电站内部传输的局限,能够快速根据原有SV报文构建R‑SV报文,从而实现了多个变电站之间信息的传输,实现了变电站之间信息的互联、互通。

Figure 201911309175

The invention discloses a method for converting SV messages between substations to R-SV messages, comprising the following steps: S1, forming an R-SV message template according to the basic structure of the R-SV message; S2, converting The R-SV message template is divided into three parts: SV message information, routing information and verification and encapsulation information; S3, mapping the obtained SV message information to the corresponding position of the R-SV message template in the memory; S4, Extract routing information from the SCL file; S5, fill the routing information extracted in step S4 into the message field of the R-SV message and the routing information, and put it into the memory; S6, fill the calibration of the R-SV message template Check the packaging information. The invention breaks through the limitation of traditional SV message transmission inside the substation, and can quickly construct the R-SV message according to the original SV message, thereby realizing the transmission of information between multiple substations and realizing the interconnection of information between the substations. , Interoperability.

Figure 201911309175

Description

Method for converting SV message into R-SV message between transformer substations
Technical Field
The invention belongs to the technical field of protection, control and automation of electric power systems, and particularly relates to a method for converting SV messages into R-SV messages between substations.
Background
With the deep development of the smart grid, the power information system depends more on the communication network and transmits information representing power protection, control and automation states and commands thereof in a message form. A general object-oriented substation event (SV) message is used as an important message [1-2] of an intelligent substation for representing operation commands of tripping, closing and the like of a breaker and breaker position information, and is originally limited in a substation to extend to the whole power system to form an R-SV message with a routing function.
The SV message is only limited to be transmitted inside the transformer substation, and the traditional SV message lacks a transmission layer and a network layer structurally, so that the traditional SV message lacks a related routing function, and information interconnection and intercommunication between the transformer substation and the transformer substation cannot be realized. The R-SV message has a routing function, and the defect that the SV message cannot be applied to electric power wide area information is overcome. However, the R-SV message mentioned in the present R-SV message such as the second Reza Firouzi, Luigi Vanfretti, Albert Ruiz-Alvarez, et al, intervening and completing IEC 61850-90-5Routed-Sampled Value and Routed-GOOSE protocols for IEEE C37.118.2compliant wire-area synchronized vector data transfer [ J ]. Electric Power Systems Research,2017,144, etc. needs to be directly realized by means of a special communication protocol stack, and does not have the ability of converting SV message into R-SV message.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provides an R-SV message which can meet the IEC 61850-90-2 standard so as to realize the transmission of the SV message between substations. Because the R-SV message is transmitted in the special power network, the safety is high, and the content related to the safety algorithm is ignored by default. Because the traditional power microcomputer equipment with lower configuration is difficult to realize the object-oriented modeling and the processing of a protocol stack, a template can be generated in advance during the concrete implementation. The content of the whole R-SV message is divided into three parts: SV message information, routing information and verification encapsulation information.
The invention is realized by at least one of the following technical schemes.
The method for converting the SV message into the R-SV message between the transformer substations comprises the following steps:
s1, forming an R-SV message template according to the basic structure of the R-SV message;
s2, dividing the R-SV message template into SV message information, routing information and check encapsulation information;
s3, mapping the obtained SV message information to a position corresponding to an R-SV message template in a memory;
s4, extracting the routing information from the SCL file;
s5, filling the routing information extracted in the step S4 into a message domain related to the R-SV message and the routing information, and putting the message domain into a memory;
and S6, filling the checking encapsulation information of the R-SV message template.
Further, message domains needing to be filled in the R-SV message basic structure are sequentially arranged to form an R-SV message template
Further, the SV message information includes an integer number (noASDU), a sequence of ASDUs (Sequences of ASDUs), an ASDU, MsvID, a Dataset (Dataset), a sampling counter (SmpCnt), a configuration version number (ConfRev), a transmission buffer refresh time (RefrTm), a boolean number (smpSynch), a sampling number in a rated period (smpRate), sample data (sample), a sample mode (smpMod), and a time stamp t.
Specifically, the ASN1 encoding rule follows the format of Tag (also called Type), Length, Value, TLV for short. In the following, except that the information content such as the voltage of the sample does not comply with the TLV, the rest comply with the TLV:
1. noASDU: tag: filled with 0X80, a value of Tag, conforming to the TLV encoded format using ASN 1; length: 0X 02;
sequences of ASDUS: tag: 0XA 2;
ASDU: tag: 0X 30;
MsvID: unique identifier of MSDU, Tag: 0X 80;
dataset: tag: fill 0X81 as an optional field;
SmpCnt: tag: 0X 82; length: 0X 02;
ConfRev: tag: 0X 83; length: 0X 04;
RefrTm: tag: 0X 84; length: fill 0X08 as an optional field;
smpSynch: tag: 0X 85; length: 0X 01;
smpRate: tag: 0X 86; length: 0X 02;
sample: tag: 0X 87;
smpMod: tag is 0X 88; length: fill 0X02 as an optional field;
13, t: tag: 0X 89; length: fill 0X08 as an optional field;
wherein Tag (identifier) occupies 1 or two bytes, and Bit7 (7 th Bit) and Bit6 (6 th Bit) are 10: Contest-Specific, context-dependent, Bit5 is selected to be 0, i.e., 0X 80; length indicates how many bytes the VALUE of VALUE is made up of; VALUE is the encoded content that is actually to be delivered.
Further, step S3 maps the SV packet information to the relevant packet domain of the R-SV packet in a direct mapping manner.
Further, the routing information in step S4 includes a Destination physical Address (Destination MAC Address), a Source physical Address (Source MAC Address), an IP type, a Version number (Version) of the IP Protocol, a Header Length (IHL) of the IP, a dscp (differentiated Services Code point), an ECN, a Total Length of the IP packet (Total Length), an Identifier (Identification), a Flag (Flag), a Fragment Offset (Fragment Offset), a ttl (time to live), a Protocol (Protocol), a Header check (Header check), a Source IP Address (Source IP Address), a Destination IP Address (Destination IP Address), a Source Port (Source Port), a Destination Port (Destination Port), a Length Identifier (LI), a Transmission Identifier (TI), a Session Identifier (SI), a Session layer Protocol data unit Length Identifier (Length), a Session constant layer Session Length (Identifier), a Header Session Length (Session layer Session Length), and a Header Length unit Length (Header Length), a Header Length, a Header Length, a Header Length, a Header Length, a, Length of session layer protocol data unit (SPDU Length), session protocol Version Number (SPDU Number, Version Number), Time allowed for current key (Time of current key), Time to next key (Time to next key), Security Algorithm, key id (key id), Payload Length, Payload type (Payload type), emulation (Simulation), apdi, and apde Length.
Specifically, the Destination MAC Address: the destination physical address, that is, the physical address of one or more ends of the received message, is the destination MAC address of the SV message actually sent by the sending apparatus. The address is used as one of the identification marks of the receiving device, occupies 6 bytes and is obtained by the prior configuration;
the Source MAC Address: the physical address of the source, that is, the physical address of the end sending the message, is the physical address of the physical network card of the sending device, and the MAC chip is determined when leaving the factory and does not change with the program and the application. 6 bytes are occupied, and the data is obtained by pre-configuration;
the IP type is as follows: filling out 0x0800 for an IP type according to the Ethernet encapsulation type (RFC 894);
the Version: the version number of the IP protocol used for this datagram takes 4 bits. A common IPv4 protocol is generally adopted in the IEC6150-90-5 message, and 0x04 is filled to represent IPv 4;
the IHL is characterized in that: indicating the header length of the IP, which takes 4 bits. The minimum length of the IP header is 20 bytes, and since a variable-length option is included in the header, the maximum length may become 60 bytes. This is the total length of all headers, obtained in IPv 4;
the DSCP (differentiated Services Code Point) represents a differentiated Services Code point, occupies 6bits, renames the 1 byte used by the type of service (TOS) in the IPv4 header, and is used for marking data, defining priority and defining 64 different types of Services (0-63) at most. Where EF denotes unimpeded Forwarding (EF) is defined by RFC2598, DSCP value 0X46 (101110). The EF service is suitable for services with low packet loss rate, low delay, low jitter and guaranteed bandwidth, and the rest 2bits are occupied by ECN and are not filled;
the Total Length: expressed as the total length of the IP message, the maximum length of the IP message is 65535 bytes, namely the length of IHL plus IP payload occupies 2 bytes, and is extracted from the IPv4 structure. The segmentation operation (Fragment) contains the following three parts:
identification-representing identifier, which takes 2 bytes and contains an integer, is used to identify the current datagram. This is a sequence number. The field is used together with flag and Fragment Offest fields to segment (Fragment) the large upper layer packet;
flag, which represents flag bit, occupies 3bits, and is used for controlling and identifying the fragments, wherein:
bit 0 must be 0;
bit 1 (DF) is 0 to indicate that grouping can be carried out, and 1 to indicate that the grouping can not be fragmented;
bit 2 (MF) is 0 to indicate that the data segment is the last data segment in the packet, 1 to indicate that the data segment is also followed, and the data segment is extracted from IPv 4;
fragment Offset: the segment offset is indicated. Occupying 13 bits. Indicating the location of the segment in the data packet for reassembly of the data segment. This field allows the tag field to terminate at a 16Bit boundary, extracted from IPv 4;
flag and Fragment Offset occupy 2 bytes in total;
the TTL (time to live): indicating the time to live, which takes 1 byte. Indicating the time in seconds that the packet is allowed to remain in the network transmission. When the timer is 0, the datagram will be discarded. Filling hexadecimal 0xff of the maximum survival time 255s in order to avoid the message from existing in the network all the time;
the Protocol: 1 byte is occupied, which marks which upper layer protocol will receive the data after the IP processing process is finished, wherein TCP is represented by 6, and UDP is represented by 17; can be extracted from IPv 4;
the Header check represents that the Header check occupies 2 bytes and is used for checking the correctness of the IP data packet, a sender fills in the data packet after calculation according to the check sum standard, a receiver checks the data, if the data packet is not sent wrongly, the 16 bits of the result are all 1, namely 0XFF, and each router has to recalculate the check sum because each router reduces the TTL value;
the Source IP Address: 4 bytes are occupied, the IP address of the sending node is indicated, and the IP address is extracted from IPv 4;
the Destination IP Address: 4 bytes are occupied, the IP address of the receiving node is indicated, and the IP address is extracted from IPv 4;
the Source Port: indicating the starting port, takes 2 bytes. Filling in according to the actual port number when the other party needs to return, and setting the value to be 0 if the other party does not use the port number;
the Destination Port: the target port number occupies 2 bytes, has significance under the condition of a special Internet target address and is filled according to an actual delivery message port;
LI is a length identifier, here 0x 01;
TI, a transmission identifier, here 0x 40;
the SI is the session identifier: represented by the 4 hexadecimal values defined, 0xA 0: a tunnel GOOSE and a sampling value packet; 0xA 1: a non-tunnel GOOSE application protocol data unit; 0xA 2: non-tunnel SV APDUs; 0xA 3: non-tunnel management APDUs, here filled with 0xA 2;
the Length Identifier of a Session layer protocol data unit (SPDU) follows the Session Identifier (SI), and covers the Length of all parameter fields of a Session Header, namely a hexadecimal expression from Common Session Header to Key ID byte Length is 0x 18;
the Common Session Header is a Session layer Header constant and is also a Parameter Identifier (PI) as the beginning of a parameter unit. Typically filled with the hexadecimal value 0x 80;
the Length Identifier: the length identifier of the parameter unit occupies one byte, namely a hexadecimal expression of the length from the SPDU to the Key ID byte is 0x 16; the Parameter Values (PV) of the parameter units contain the following data:
SPDU Length represents the Length of the whole session layer protocol data unit, takes 4 bytes, and is filled in by the actual condition;
SPDU Number is fixed with 4 bytes, used for checking whether there is repeat or unordered data packet transmission, and defined by itself;
version Number, two fixed bytes, filling 0x0004 representing IPv 4;
security Information Security management of application layer data encapsulated in a Session protocol, provided by the specific Key Distribution Center (KDC) protocol of IEC-61850-95, occupying 12 bytes and consisting of:
the Time of current key, the Time allowed by the current key, takes 4 bytes and is defined by self according to the actual situation;
the Time to next key is the Time to the next key, which takes 2 bytes and is defined by the user according to the actual situation;
the Security Algorithm indicates that the encryption type and the Algorithm information generated by a hash information authentication code (HMAC) signature account for 2 bytes;
key ID, which represents secret Key ID, occupies 4 bytes and is provided by a secret Key distribution center;
payload Length, wherein the Length of all session user information from the Payload Length to the Payload part occupies 4 bytes, the maximum value is 65339, and the Payload Length is distributed by KDC;
payload type, 4 types are specified by IEC-61850-90-5, and are non-tunnel GOOSE APDU-0 x81, non-tunnel SV APDU-0 x82, tunnel GOOSE and SV data packet-0 x83, non-tunnel management APDU-0 x84 and 0x82 is filled in;
simulation is a Boolean value occupying one byte, the effective load is 1 when used for testing, otherwise, the effective load is 0;
APPID, application identification, filling 0x 0100;
the Length of APDU is the Length of R-SV message information plus the Length of 2 bytes per se, and occupies 2 bytes.
Further, the SCL file in step S4 is derived from the configured substation configuration file. Extracting routing related information from an SCL file, originating from a set substation configuration file (SCL file), extracting the routing information from the SCL file in advance, and filling a message domain related to the R-SV message and the routing information in advance.
Further, step S5 is to fill the R-SV message template with the routing related information, and place the R-SV message template into the memory.
Further, the check encapsulation information for filling the R-SV message template in step S6 includes PDU check information and HMAC check information.
Further, the PDU check information includes a Length (Length) and a check layer (Checksum). Where Length takes 2 bytes, the user datagram is eight bits long, including the protocol header and data. The minimum length is 8; checksum takes 2 bytes, which is similar to the Header Checksum algorithm in IPV4 for checking the correctness of IP ports, which may be 0 in IPV 4.
Further, the HMAC check information includes a Signature (Signature), a hash operation message authentication code (HMAC), and a length thereof, where: signature is a message domain Signature, and if the Signature is not used for testing, 0 can be taken; length of HMAC is filled in according to the Length of the next part of HMAC; the HMAC message receiving and sending parties judge whether the message is tampered by checking whether the security algorithm HMAC is consistent or not, and the message is obtained through the HMAC algorithm.
Compared with the prior art, the invention has the following beneficial effects:
the method for realizing the conversion from the SV message to the R-SV message is suitable for SV messages of all types, can convert the SV message which can only be transmitted in a single transformer substation into the R-SV message which can be transmitted among the transformer substations, and can acquire each sampling value of the opposite side among the transformer substations according to the R-SV message so as to judge whether the transformer substation of the opposite side has abnormal operation state or fault and quickly adjust the operation state of the power station.
Drawings
Fig. 1 is a flowchart of a method for converting SV messages into R-SV messages between substations according to this embodiment;
fig. 2 is a schematic diagram of a basic structure of an R-SV message according to this embodiment.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto. As shown in fig. 1, the method for converting an SV message into an R-SV message applicable between substations of this embodiment includes the following steps:
s1, arranging message domains to be filled in the basic structure of the R-SV message in sequence according to the basic structure of the R-SV message to form an R-SV message template;
s2, dividing the R-SV message template into SV message information, route related information and check encapsulation information; because the traditional power microcomputer equipment with lower configuration is difficult to realize object-oriented modeling and protocol stack processing, the content of the whole R-SV message can be divided into three parts during specific implementation: SV message information, route related information, check encapsulation information, as shown in the following table:
TABLE 1 contents of R-SV messages
SV message information Routing information Verifying encapsulation information
The SV message information comprises an integer number (noastdu), a sequence of the ASDUs (Sequences of ASDUS), the ASDUs, an MsvID, a data set (Dataset), a sampling counter (SmpCnt), a configuration version number (ConfRev), a transmission buffer refreshing time (RefrTm), a Boolean amount (smpSynch), a sampling number in a rated period (smpRate), sample data (sample), a sample mode (smpMod) and a time mark t.
ASN1 encodes rules, and follows the format of Tag (also called Type), Length, Value, TLV for short. In the following, except that the information content such as the voltage of the sample does not comply with the TLV, the rest comply with the TLV:
1. noASDU: tag: filled with 0X80, a value of Tag, conforming to the TLV encoded format using ASN 1; length: filled with 0X 02.
Sequences of ASDUS: tag: filled with 0XA2.
ASDU: tag: filled with 0X 30.
MsvID: unique identifier of MSDU, Tag: filled with 0X 80.
Dataset: tag: fill 0X81 as an optional field.
SmpCnt: tag: 0X 82; length: filled with 0X 02.
ConfRev: tag: 0X 83; length: filled with 0X 04.
RefrTm: tag: 0X 84; length: fill 0X08 as an optional field.
smpSynch: tag: 0X 85; length: filled with 0X 01.
smpRate: tag: 0X 86; length: filled with 0X 02.
Sample: tag: 0X 87; wherein data represents current-voltage information, datan represents nth set of current-voltage information, q represents mass, and qn represents nth set of information.
smpMod: tag is 0X 88; length: fill 0X02 as an optional field.
13, t: tag: 0X 89; length: fill 0X08 as an optional field.
Wherein Tag (identifier) occupies 1 or two bytes, and Bit7 (7 th Bit) and Bit6 (6 th Bit) are 10: Contest-Specific, context-dependent, Bit5 is selected to be 0, i.e., 0X 80; length indicates how many bytes the VALUE of VALUE is made up of; VALUE is the encoded content that is actually to be delivered.
S3, mapping the obtained SV message information to the position corresponding to the R-SV message template of the memory, and mapping the SV message information to the message domain related to the SV message in the R-SV message by adopting a direct mapping mode.
S4, extracting the routing related information from the SCL file, originating from the set substation configuration file (SCL file), extracting the routing information from the SCL file in advance, and filling the message domain of the R-SV message related to the routing information in advance.
The routing information includes a Destination physical Address (Destination MAC Address), a Source physical Address (Source MAC Address), an IP type, a Version number (Version) of an IP Protocol, a Header Length (IHL) of the IP, a dscp (differentiated Services Code point), an ecn (explicit configuration notification), a Total Length (Total Length) of an IP packet, an Identifier (Identification), a Flag (Flag), a Fragment Offset (Fragment Offset), a ttl (time to live), a Protocol (Protocol), a Header check (Header check), a Source IP Address (Source IP Address), a Destination IP Address (Destination IP Address), a Source Port (Source Port), a Destination Port (Destination Port), a Length Identifier (Length), a Transmission Identifier (TI), a Session Identifier (SI), a Session layer data unit Length (Identifier), a Source Session Length (Identifier), a Header Session Length (Identifier), a Header Session Length (Identifier), and a Header Session Length unit (Identifier) Length of session layer protocol data unit (SPDU Length), session protocol Version Number (SPDU Number, Version Number), Time allowed for current key (Time of current key), Time to next key (Time to next key), Security Algorithm, key id (key id), Payload Length, Payload type (Payload type), emulation (Simulation), apdi, and apde Length.
Specifically, (1) Destination MAC Address: the destination physical address, that is, the physical address of one or more ends of the received message, is the destination MAC address of the SV message actually sent by the sending apparatus. This address occupies 6 bytes as one of the identification marks of the receiving device, and is obtained by the prior arrangement.
(2) Source MAC Address: the physical address of the source, that is, the physical address of the end sending the message, is the physical address of the physical network card of the sending device, and the MAC chip is determined when leaving the factory and does not change with the program and the application. It takes 6 bytes and is obtained by pre-configuration.
(3) IP type: the IP type fills in 0x0800 as specified by the ethernet encapsulation type (RFC 894).
(4) Version: the version number of the IP protocol used for this datagram takes 4 bits. A common IPv4 protocol is generally adopted in the IEC6150-90-5 message, and the filling 0x04 represents IPv 4.
(5) IHL: indicating the header length of the IP, which takes 4 bits. The minimum length of the IP header is 20 bytes, and since a variable-length option is included in the header, the maximum length may become 60 bytes. This is the total length of all headers, obtained in IPv 4.
(6) Dscp (differentiated Services Code point) means differentiated Services Code point, 6bits, and renames the 1 byte used by type of service (TOS) in IPv4 header, which is used to mark data, define priority, and can define 64 different types of service (0-63) at most. Where EF denotes unimpeded Forwarding (EF) is defined by RFC2598, DSCP value 0X46 (101110). The EF service is suitable for services with low packet loss rate, low delay, low jitter and guaranteed bandwidth, and the remaining 2bits are occupied by ecn (explicit connectivity notification) and are not filled.
(7) Total Length: expressed as the total length of the IP message, the maximum length of the IP message is 65535 bytes, namely the length of IHL plus IP payload occupies 2 bytes, and is extracted from the IPv4 structure.
The segmentation operation (Fragment) contains three parts:
(8) identification-representing identifier, which takes 2 bytes and contains an integer, is used to identify the current datagram. This is a sequence number. This field is used in conjunction with the Flags and Fragment Offsest fields to perform fragmentation (Fragment) operations on large upper layer packets
(9) Flag, which represents flag bit, occupies 3bits and is used for controlling and identifying the fragments.
Bit 0 must be 0;
bit 1 (DF) is 0 to indicate that grouping can be carried out, and 1 to indicate that the grouping can not be fragmented;
bit 2 (MF) is 0 to indicate that the data segment is the last data segment in the packet, and 1 to indicate that the data segment is also followed, and is extracted from IPv 4.
(10) Fragment Offset: the segment offset is indicated. Occupying 13 bits. Indicating the location of the segment in the data packet for reassembly of the data segment. This field allows the tag field to terminate at a 16Bit boundary, extracted from IPv 4.
(11) Flags and Fragment Offset take up 2 bytes.
(12) Ttl (time to live): indicating the time to live, which takes 1 byte. Indicating the time in seconds that the packet is allowed to remain in the network transmission. When the timer is 0, the datagram will be discarded. To avoid that the message always exists in the network, 0xff in hexadecimal with the maximum lifetime of 255s is filled.
(13) Protocol: 1 byte is occupied, which marks which upper layer protocol will receive the data after the IP processing process is finished, wherein TCP is represented by 6, and UDP is represented by 17; can be extracted from IPv 4.
(14) Header check, which means that Header check takes 2 bytes to check the correctness of the IP packet, the sender performs calculation according to the Checksum standard and then fills in, the receiver performs a Checksum check on the data, if the packet has no transmission error, the result should be 16 bits all of 1, i.e. 0XFF, and each router must recalculate the Checksum since each router will reduce the value of TTL.
(15) Source IP Address: takes 4 bytes, indicates the IP address of the sending node, and is extracted from IPv 4.
(16) Destination IP Address: takes 4 bytes, indicates the IP address of the receiving node, and is extracted from IPv 4.
(17) Source Port: indicating the starting port, takes 2 bytes. When the opposite side is required to return, filling in according to the actual port number, and if the opposite side is not used, setting the value to be 0.
(18) Destination Port: the destination port number, which occupies 2 bytes, has significance under the condition of special internet destination address, and is filled according to the actual delivery message port.
(19) LI is a length identifier, here 0x 01.
(20) TI transmission identifier, here 0x 40.
(21) SI session identifier: represented by the 4 hexadecimal values defined, 0xA 0: a tunnel GOOSE and a sampling value packet; 0xA 1: a non-tunnel GOOSE application protocol data unit; 0xA 2: non-tunnel SV APDUs; 0xA 3: non-tunnel management APDU, here filled with 0xA2.
(22) Length Identifier the Length Identifier of the Session layer protocol data Unit (SPDU), followed by the Session Identifier (SI), covers the Length of all parameter fields of the Session Header, i.e. the hexadecimal representation of Common Session Header to Key ID byte Length, is 0x 18.
(23) Common Session Header is a Session layer Header constant and is also a Parameter Identifier (PI) as the beginning of a parameter unit. Typically filled with the hexadecimal value 0x 80.
(24) Length Identifier: the length identifier of the parameter unit, which occupies one byte, i.e., the hexadecimal expression of the length of the SPDU to Key ID byte, is 0x 16.
The Parameter Values (PV) of the parameter units comprise the following data:
(25) SPDU Length represents the Length of the whole session layer protocol data unit, takes 4 bytes, and is filled in by the actual situation.
(26) SPDU Number fixed 4 bytes for checking if there is a duplicate or out-of-order packet transfer, defined by itself.
(27) Version Number session protocol Version Number, two bytes fixed, fills in 0x0004 representing IPv 4.
(28) Security Information Security management of application layer data encapsulated in a Session protocol, provided by the specific Key Distribution Center (KDC) protocol of IEC-61850-95, occupying 12 bytes and consisting of:
(29) the Time of current key, the Time allowed by the current key, takes 4 bytes, and is defined by self according to the actual situation.
(30) The Time to next key is the Time to the next key, which takes 2 bytes and is defined by the user according to the actual situation.
(31) Security Algorithm: Algorithm information indicating the type of encryption and hash information authentication code (HMAC) signature generation, takes 2 bytes.
(32) Key ID, representing a secret Key ID, occupies 4 bytes and is provided by a secret Key distribution center
(33) And the Payload Length is the Length of all session user information including the Payload Length to the Payload part, takes 4 bytes, has the maximum value of 65339, and is distributed by KDC.
(34) Payload type Payload mapping protocol 4 types are specified by IEC-61850-90-5, namely non-tunneling GOOSE APDU-0 x81, non-tunneling SV APDU-0 x82, tunneling GOOSE and SV data packets-0 x83, non-tunneling management APDU-0 x84, and the data packets are filled with 0x 82.
(35) Simulation is a Boolean value of one byte, and the payload is 1 when used for testing, otherwise it is 0.
(36) APPID application identification, filling is 0x0100
(37) The Length of APDU is the Length of R-SV message information plus the Length of 2 bytes per se, and occupies 2 bytes.
And S5, filling the route related information into the R-SV message template and putting the R-SV message template into a memory.
S6, filling checking encapsulation information of the R-SV message, wherein the checking encapsulation information comprises PDU checking information and HMAC checking information.
The PDU check information includes a Length (Length) and a check layer (Checksum). Where Length takes 2 bytes, the user datagram is eight bits long, including the protocol header and data. The minimum length is 8; checksum takes 2 bytes, which is similar to the Header Checksum algorithm in IPV4 for checking the correctness of IP ports, which may be 0 in IPV 4.
The HMAC check information includes a Signature (Signature), a hash operation message authentication code (HMAC), and a length thereof, wherein: signature is a message domain Signature, and if the Signature is not used for testing, 0 can be taken; length of HMAC is filled in according to the Length of the next part of HMAC; the HMAC message receiving and sending parties judge whether the message is tampered by checking whether the security algorithm HMAC is consistent or not, and the message is obtained through the HMAC algorithm.
All parts of the acquired message information are combined together according to the sequence of fig. 2, so that a complete frame of R-SV message can be obtained, as follows:
00000 c 07ac 35 (destination physical address) 782 b cb 5 fb 52 (source physical address) 0800 (IP type) 45 (version number and Header Length of message) 46(DSCP + ECN) 0054 (Total Length) 0000 (Fragment) ff (ttl)17(Protocol) ff (Header check) c 0a 80 a e (source IP address) c 0a 80 a f (destination IP address) 0000 (source port) 0000 (destination port) 0141 (Length) 0000 (Checksum)01(LI)40(TI) a2(SI)18(Length Identifier)80 (mon connector) 16 (Length) 00000124 (SPDU 0001 Length) 0000 (SPDU 63r) 4 (Length) 483 c 546 (source Length) 0000 (Header) 16 (Length) 0000 23 (Length) 35 (SPDU 0001) 0000 Length) 0000 (spcp) 4) 0000) 01023 a4 (Length) 0000 (Length) 01023 f2 f (Header) 0000 4 f (destination IP address) 0000 (Length) 01023 f (pid 9 (SPDU 0000) c 31 (Length) 0108 (prefix) c 0000) 4 (prefix) Length) of PDU 0000 4 (prefix) 20 (prefix) Length) 20 (prefix) c 0000) 2 f) 4 (prefix) Length) of (prefix Length) 20 (prefix) Length) 20 (prefix) 2 f) 2 (prefix) Length) 20 (prefix) Length) of PDU 0000 4 (prefix Length) 2 (prefix) Length) 20 (prefix) Length) 2 (prefix) of (prefix Length) 20 (prefix) Length) of (prefix Length) 20 (prefix) 2 (prefix Length) 20 (prefix Length) 4 (prefix) 20 (prefix) Length) 4 (prefix) of (prefix) 20 (prefix Length) 20 (prefix) Length) of (prefix) Length) 20 (prefix) Length) 2 (prefix) of (prefix Length) 2 (prefix) 20 (prefix) 2 (prefix) of PDU 00004 (prefix) of (prefix) 20 (prefix) of (prefix) Length) of (prefix Length) of PDU 00004 (prefix Length) of (prefix Length) 20 (prefix Length) of (prefix Length) 20 (prefix) of (prefix) Length) of (prefix) 20 (prefix) of (prefix) 20 (prefix) of (prefix) Length) of (prefix) Length) of (prefix) 20 (prefix) of (prefix) Length) 20 (prefix) Length) 20 (prefix) of prefix) 20 (prefix) of (prefix) Length) of (prefix) Length) of (prefix) of ( 4e 4302 e f 10000000055 f 29813 c ae 14003 f 7a 10000000055 f 29813 c ae 14003 a 80000000055 f 800813 c ae 14003 f b db 6b f 29813 c ae 14003 e 52 ec f 29813 c ae ff 00000000055 f 29813 c ae 1400 b 48 c f 29813 c ae f 29813 c ae f 29813 c ae f 29813 a f 29813 c ae f 29ae f 2981aef 298139126 e 90 8500
00(signature)00(Length of HMAC)00(HMAC)
In summary, the implementation method of the R-SV power message is applicable to the R-SV message of the traditional microcomputer experimental equipment, and the R-SV message can be formed by combining field sampling data according to the R-SV model message template, so that the R-SV message can be used for the communication of various analog quantities among the traditional microcomputer experimental equipment.
The above description is only for the preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution of the present invention and the inventive concept within the scope of the present invention, which is disclosed by the present invention, and the equivalent or change thereof belongs to the protection scope of the present invention.

Claims (8)

1.适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,所述方法包括以下步骤:1. the conversion method that is applicable to the SV message between substations to the R-SV message, is characterized in that, described method comprises the following steps: S1、根据R-SV报文的基本结构,形成R-SV报文模板;S1. According to the basic structure of the R-SV message, an R-SV message template is formed; S2、将R-SV报文模板划分成SV报文信息、路由信息和校验封装信息三个部分;S2. Divide the R-SV message template into three parts: SV message information, routing information and verification and encapsulation information; S3、将所获得的SV报文信息映射到内存的R-SV报文模板对应的位置;S3, mapping the obtained SV message information to the position corresponding to the R-SV message template of the memory; S4、从SCL文件中提取路由信息,所述路由信息包括:S4. Extract routing information from the SCL file, where the routing information includes: (1)Destination MAC Address:表示目的物理地址,用于接受报文一端或多端的物理地址,为发送装置实际发送GOOSE报文的目标MAC地址,此地址作为接收装置的识别标识之一;(1) Destination MAC Address: Indicates the destination physical address, which is used to receive the physical address of one or more ends of the message, which is the destination MAC address of the sending device actually sending the GOOSE message, and this address is used as one of the identification identifiers of the receiving device; (2)Source MAC Address:表示源物理地址,用于发出报文一端的物理地址,为发送装置物理网卡的物理地址;(2) Source MAC Address: Indicates the source physical address, which is used to send the physical address of one end of the message, which is the physical address of the physical network card of the sending device; (3)IP类型:采用以太网封装类型规定IP类型;(3) IP type: use the Ethernet encapsulation type to specify the IP type; (4)Version:表示数据报采用的IP 协议的版本号;(4) Version: Indicates the version number of the IP protocol used by the datagram; (5)IHL:表示IP的报头长度;(5) IHL: Indicates the length of the IP header; (6)DSCP:表示差分服务代码点;(6) DSCP: Indicates Differentiated Services Code Point; (7)Total Length:表示为IP报文总长度;(7) Total Length: expressed as the total length of IP packets; (8)Identification:表示标识符,用来标识当前的数据报;(8) Identification: Represents an identifier, which is used to identify the current datagram; (9)Flags:表示标志位,用于控制和识别分片;(9) Flags: Represents a flag bit, which is used to control and identify shards; (7)Fragment Offset:表示分段偏移,指示分段在数据包中的位置,用于重组数据分段;(7) Fragment Offset: indicates the fragment offset, indicating the position of the fragment in the data packet, which is used to reorganize the data fragment; (12)TTL(Time to Live):表示生存时间,指示分组在网络传输中的允许保持的时间,以秒为单位,当计时器为0时,数据报将被丢弃;(12) TTL (Time to Live): Indicates the time to live, indicating the time that the packet is allowed to remain in network transmission, in seconds, when the timer is 0, the datagram will be discarded; (13)Protocol(协议):标志在IP处理过程结束后,指定上层协议将接收这些数据;(13) Protocol (Protocol): After the IP processing process ends, the designated upper-layer protocol will receive these data; (14)Header Checksum:表示头部校验,用于检验IP数据包正确性,发送方根据检验和标准计算后填写,接受方对该数据进行校对,如果数据包没有发送错误, 则 16 位全部为1,即0XFF;(14) Header Checksum: Indicates the header check, which is used to check the correctness of the IP data packet. The sender calculates and fills in according to the checksum standard, and the receiver checks the data. If the data packet is not sent incorrectly, all 16 bits is 1, that is, 0XFF; (15)Source IP Address:指定发送节点的IP地址;(15) Source IP Address: Specifies the IP address of the sending node; (16)Destination IP Address:指定接收节点的IP地址;(16) Destination IP Address: Specify the IP address of the receiving node; (17)Source Port :表示出发端口,在需要对方回信时根据实际端口号填写,如果不使用,设置值为0;(17) Source Port: indicates the departure port, fill in according to the actual port number when the other party needs to reply, if not used, set the value to 0; (18)Destination Port :目标端口号,根据实际交付报文端口填写;(18) Destination Port: The destination port number, filled in according to the actual delivery message port; (19)LI:长度标识符;(19) LI: length identifier; (20)TI:传输标识符;(20) TI: transmission identifier; (21)SI:会话标识符:由定义的4个十六进制值表示,具体为:0xA0:隧道GOOSE和采样值包;0xA1:非隧道GOOSE应用协议数据单元;0xA2:非隧道SV APDU;0xA3:非隧道管理APDU;(21) SI: Session Identifier: represented by 4 hexadecimal values defined, specifically: 0xA0: Tunnel GOOSE and sample value packets; 0xA1: Non-tunnel GOOSE application protocol data unit; 0xA2: Non-tunnel SV APDU; 0xA3: non-tunnel management APDU; (22)Length Identifier: 表示会话层协议数据单元(SPDU)的长度标识符,跟在会话标识符后面(SI),覆盖会话头所有参数字段的长度;(22) Length Identifier: Indicates the length identifier of the session layer protocol data unit (SPDU), followed by the session identifier (SI), covering the length of all parameter fields in the session header; (23)Common Session Header : 表示会话层头部常量,同时也是参数标识符(PI),作为参数单元的开头;(23) Common Session Header: Indicates the session layer header constant, which is also the parameter identifier (PI), as the beginning of the parameter unit; (24)Length Identifier:表示参数单元的长度标识符;(24) Length Identifier: indicates the length identifier of the parameter unit; (25)SPDU Length:表示整个会话层协议数据单元的长度;(25) SPDU Length: Indicates the length of the entire session layer protocol data unit; (26)SPDU Number:用于检验是否有重复或无序的数据包传送;(26) SPDU Number: used to check whether there is repeated or out-of-order data packet transmission; (27)Version Number: 表示会话协议版本号;(27) Version Number: Indicates the session protocol version number; (28)Security Information: 对封装在会话协议中的应用层数据进行安全管理;(28) Security Information: Security management of the application layer data encapsulated in the session protocol; (29)Time of current key: 表示当前密钥允许的时间;(29) Time of current key: Indicates the time allowed by the current key; (30)Security Algorithm: 指示加密类型和哈希信息认证码(HMAC)签名生成的算法信息;(30) Security Algorithm: Indicates the encryption type and the algorithm information generated by the hash message authentication code (HMAC) signature; (31)Key ID: 表示秘钥ID;(31) Key ID: Indicates the key ID; (32)Payload Length:包括Payload Length至Payload部分的全部会话用户信息长度;(32) Payload Length: including the length of all session user information from Payload Length to Payload; (33)Payload type: 表示有效负荷的映射协议,包括4种类型,分别为非隧道GOOSEAPDU—0x81,非隧道SV APDU—0x82,隧道GOOSE和SV数据包—0x83,非隧道管理APDU—0x84;(33) Payload type: Indicates the mapping protocol of the payload, including 4 types, namely non-tunnel GOOSEAPDU-0x81, non-tunnel SV APDU-0x82, tunnel GOOSE and SV data packet-0x83, non-tunnel management APDU-0x84; (34)Simulation: 表示仿真占一个字节的布尔值,有效负荷用于测试时为1,否则为0;(34) Simulation: A boolean value representing one byte of simulation, 1 when the payload is used for testing, and 0 otherwise; (35)APPID: 表示应用标识;(35) APPID: Indicates the application identifier; (36)APDU Length: 表示R-SV报文信息长度;(36) APDU Length: Indicates the length of the R-SV message information; S5、将步骤S4提取到的路由信息填充到R-SV报文与路由信息相关的报文域,并放入内存;S5, fill the routing information extracted in step S4 into the R-SV packet and the packet field related to the routing information, and put it into the memory; S6、填充R-SV报文模板的校验封装信息,校验封装信息包括PDU校验信息和HMAC校验信息;PDU校验信息包括长度(Length)和校验层(Checksum);HMAC校验信息包括签名(Signature)、哈希运算消息认证码(HMAC)及其长度。S6. Fill in the verification encapsulation information of the R-SV message template. The verification encapsulation information includes PDU verification information and HMAC verification information; PDU verification information includes length (Length) and check layer (Checksum); HMAC verification The information includes signature (Signature), hash operation message authentication code (HMAC) and its length. 2.根据权利要求1所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,步骤S1将R-SV报文基本结构中所需要填充的报文域依次排列形成R-SV报文模板。2. the conversion method that is applicable to the SV message between substations according to claim 1 to the R-SV message, it is characterized in that, step S1 is to need to fill the message field in the basic structure of the R-SV message Arrange them in sequence to form R-SV message templates. 3.根据权利要求2所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,所述SV报文信息包括整形数(noASDU)、ASDU的序列(Sequencesof ASDUS)、ASDU、MsvID、数据集(Dataset)、采样计数器(SmpCnt)、配置版本号(ConfRev)、传输缓冲区刷新时间(RefrTm)、布尔量(smpSynch)、额定周期内采样次数(smpRate)、样品数据(sample)、样本模式(smpMod)和时标t。3 . The method for converting an SV message between substations to an R-SV message according to claim 2 , wherein the SV message information includes an integer number (noASDU) and a sequence of ASDUs (Sequencesof 3 . 3 . ASDUS), ASDU, MsvID, Dataset (Dataset), Sampling Counter (SmpCnt), Configuration Version Number (ConfRev), Transmission Buffer Refresh Time (RefrTm), Boolean (smpSynch), Number of Samples in a Rated Period (smpRate), Sample data (sample), sample mode (smpMod) and time scale t. 4.根据权利要求1所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,步骤S3采用直接映射的方式将SV报文信息映射到R-SV报文的相关报文域。4. the conversion method that is applicable to the SV message between substations according to claim 1 to the R-SV message, it is characterized in that, step S3 adopts the mode of direct mapping to map the SV message information to the R-SV message related message fields of the message. 5.根据权利要求1所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,步骤S4所述的SCL文件是源于已设置好的变电站配置文件。5 . The method for converting SV messages between substations to R-SV messages according to claim 1 , wherein the SCL file described in step S4 is derived from a substation configuration file that has been set. 6 . 6.根据权利要求1所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,步骤S6所述填充R-SV报文模板的校验封装信息包括PDU校验信息和HMAC校验信息。6. The method for converting an SV message between substations to an R-SV message according to claim 1, wherein the verification encapsulation information filling the R-SV message template described in step S6 includes PDUs Check information and HMAC check information. 7.根据权利要求6所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,所述PDU校验信息包括长度(Length)和校验层(Checksum)。7 . The method for converting SV messages to R-SV messages between substations according to claim 6 , wherein the PDU check information includes a length (Length) and a check layer (Checksum). 8 . . 8.根据权利要求6所述的适用于变电站之间的SV报文向R-SV报文的转换方法,其特征在于,所述HMAC校验信息包括签名(Signature)、安全算法(HMAC)及其长度。8 . The method for converting SV messages to R-SV messages between substations according to claim 6 , wherein the HMAC verification information includes a signature (Signature), a security algorithm (HMAC) and its length.
CN201911309175.XA 2019-12-18 2019-12-18 Method for converting SV message into R-SV message between transformer substations Active CN111131214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911309175.XA CN111131214B (en) 2019-12-18 2019-12-18 Method for converting SV message into R-SV message between transformer substations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911309175.XA CN111131214B (en) 2019-12-18 2019-12-18 Method for converting SV message into R-SV message between transformer substations

Publications (2)

Publication Number Publication Date
CN111131214A CN111131214A (en) 2020-05-08
CN111131214B true CN111131214B (en) 2021-12-21

Family

ID=70499632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911309175.XA Active CN111131214B (en) 2019-12-18 2019-12-18 Method for converting SV message into R-SV message between transformer substations

Country Status (1)

Country Link
CN (1) CN111131214B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112003816B (en) * 2020-06-22 2023-04-18 武汉光迅科技股份有限公司 Data transmission method, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297358B (en) * 2012-02-27 2016-12-14 北京东土科技股份有限公司 A kind of intelligent grid transmits system and method across wide area network GOOSE message
DE102012103194B4 (en) * 2012-04-13 2014-09-11 Pilz Gmbh & Co. Kg Method for transferring process data in an automated controlled system
CN109525041B (en) * 2018-12-29 2023-09-26 北京智芯微电子科技有限公司 Secondary relay protection chip of intelligent substation and data interaction method

Also Published As

Publication number Publication date
CN111131214A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
EP4181463A1 (en) Method and device for processing message
US7869450B2 (en) Method and apparatus for processing labeled flows in a communication access network
WO2010031324A1 (en) Method, device and system for data transmission
CN101827031A (en) Method and device for packet transmission in user datagram protocol UDP tunnel
Konka et al. Traffic generation of IEC 61850 sampled values
WO2010020197A1 (en) Data transmission method, communication equipment and communication system
US8160106B2 (en) Method, device and system for transmitting Ethernet packets
CN109450875A (en) MAC layer encapsulation method and device
Matoušek Description of IEC 61850 communication
CN110995588B (en) Method suitable for converting GOOSE message into R-GOOSE message
CN106209697B (en) In the method that TTE terminal sent, recombinated the data frame of TTP format
CN111131214B (en) Method for converting SV message into R-SV message between transformer substations
CN111131213B (en) Method for realizing R-GOOSE electric power message
CN107370654B (en) Pseudo wire data message encapsulation and decapsulation methods and related devices
CN112787902A (en) Message encapsulation method and device and message de-encapsulation method and device
CN107517225A (en) A kind of method for converting protocol, gateway device and storage medium
CN111031136B (en) Method for realizing R-SV power message
CN102255790A (en) Method and system for informing congestion control information
KR101787284B1 (en) Data concentration unit, electronic power meter and method for operating the same
Hegazi et al. IEC-61850 GOOSE traffic modeling and generation
JP5658279B2 (en) Method and apparatus for realizing time division multiplexed data transmission
CN101471937B (en) Method and device for multiplexing and demultiplexing Ethernet packets
Sakamoto et al. Poster: Implementation and Performance Evaluation of TCP/IP Communication over Private LoRa
US20100329245A1 (en) Transparent Mapping of Cell Streams to Packet Services
CN102523150A (en) Method, device and system for tunnel message processing

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