CN112822276B - Substation control layer communication method and system, electronic equipment and storage medium - Google Patents

Substation control layer communication method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112822276B
CN112822276B CN202110028902.6A CN202110028902A CN112822276B CN 112822276 B CN112822276 B CN 112822276B CN 202110028902 A CN202110028902 A CN 202110028902A CN 112822276 B CN112822276 B CN 112822276B
Authority
CN
China
Prior art keywords
service
control layer
protocol
server
data
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
CN202110028902.6A
Other languages
Chinese (zh)
Other versions
CN112822276A (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.)
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jiangsu Electric Power Co Ltd
Electric Power Research Institute of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jiangsu Electric Power Co Ltd
Electric Power Research Institute of State Grid Jiangsu Electric Power 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 State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI, State Grid Jiangsu Electric Power Co Ltd, Electric Power Research Institute of State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202110028902.6A priority Critical patent/CN112822276B/en
Publication of CN112822276A publication Critical patent/CN112822276A/en
Application granted granted Critical
Publication of CN112822276B publication Critical patent/CN112822276B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a substation control layer communication method, a system, electronic equipment and a storage medium of a transformer substation; the substation control layer communication method of the transformer substation comprises the following steps: the client side issues a command to the server side; the server returns data to the client; the command and data sent between the client and the server adopt a message structure which is a station control layer service protocol message APDU structure. The invention provides a substation control layer communication method, a system, electronic equipment and a storage medium, wherein a message structure adopted by commands and data sent between a client and a server is a station control layer service protocol message APDU structure; the station control layer service protocol directly maps the IEC 61850-7-2 abstract communication service interface and the IEC 61850-7-2 model to the TCP/IP protocol stack, thereby avoiding the process of converting the MMS protocol stack; the manufacturer of the secondary equipment can independently modify the secondary equipment, so that the safe operation of the equipment and the power grid is effectively ensured.

Description

Substation control layer communication method and system, electronic equipment and storage medium
Technical Field
The invention belongs to the field of computers, and particularly relates to a substation control layer communication method, a system, electronic equipment and a storage medium of a transformer substation.
Background
IEC61850 is an international standard defining an automation communication network for power enterprises, and grid and equipment monitoring models abstracted out following this standard can be mapped to generic object-oriented substation events (generic object oriented substation Event, GOOSE), sampled Values (SV), and manufacturing message specifications (manufacturing message specification, MMS), which can enable high-speed data interactions based on ethernet or other high-speed buses. The IEC61850 standard is dominant in intelligent substation construction.
The IEC61850 abstract communication service interface (abstract communication service interface, ACSI) is an abstract interface for describing the communication between a substation control layer protocol server and a client, and the transmission functions comprise real-time data access and retrieval, equipment control, event report and log, file transmission and the like, and can also be used for event alarm and sampling value transmission between equipment application and remote application.
ACSI defines a multi-class model service, as shown in Table 1, such as association, substitution, data acquisition, data setup, data catalog acquisition, data set definition, and the like. These communication services may be mapped to specific communication protocol services, such as MMS services, industrial control object connection and embedded unified architecture (object linking and embedding for process control unified architecture, OPC UA) services, etc., where the MMS services have better compatibility with ACSI services.
Table 1 IEC61850 primary communication service
Figure BDA0002890734300000011
Figure BDA0002890734300000021
Referring to fig. 1, IEC61850 ACSI defines only various abstract service models, which cannot be mapped directly to ACSI protocol data units (protocol data unit, PDUs), but rather mapped to specific communication protocol application layers by specific communication service mapping (specific communication service mapping, SCSM). IEC61850 recommends mapping these services onto MMS communication protocols. The MMS protocol may be developed by itself or may employ a mature commercial MMS protocol package, such as MMS-EASE-Lite. The IEC61850 8-1 protocol provides a way for SCSMs to map to MMS PDUs. The service of the ACSI and the service of the MMS protocol are not in one-to-one mapping relationship, and need to be converted correspondingly. The MMS PDU protocol is constructed by adopting a basic coding rule (basic encoding rules, BER) coding mode of abstract notation 1 (abstract syntax notation dot one, ASN.1), and the coding and decoding are carried out by adopting a TLV (tag length value) mode.
The ACSI may also be mapped to other protocols through other SCSMs, such as the public object request broker architecture (common object request broker architecture, CORBA), the extensible message handling live protocol (extensible messaging and presence protocol, XMPP).
The PDU is the most basic data description unit in the protocol, and its formal description and codec process are important components of communication. The message coding includes ASN.1, M coding and other modes.
(1) ASN.1 coding
The international standardization organization and the international telecommunications union jointly push out asn.1 as a formal language describing protocol data units. Asn.1 is a standard defining an abstract data type format for describing the representation, encoding, transmission and decoding of data.
Asn.1 defines only abstract syntax representing information, standard asn.1 coding rules are BER, canonical coding rules (canonical encoding rules, CER), unique coding rules (distinguished encoding rules, DER), compression coding rules (packed encoding rules, PER) and XML coding rules (extensible markup language encoding rules, XER). The coding rules will define the way in which the values in the asn.1 are converted into code suitable for transmission, irrespective of the machine, programming language or representation in the application.
1) BER coding
The format of BER encoded transmission syntax is TLV triples < Tag, length, value >, each field of TLV is a series of octets, tag represents a type of Value, length represents the number of octets occupied by the Value part, and Value represents a Value of transmission. BER coding defines the Universal, application, context-Specific, private 4 TAG types. Wherein the Universal type is some basic predefined data types defined by asn.1, which cannot be modified in the description; application's Tag defines a data type that is widely and discretely used in a particular Application and that is inconsistent with other data types in the Application.
2) CER and DER encoding
CER is suitable for use in potentially important coding applications, but there are fewer compilers to support this form of coding and therefore fewer practical applications. DER coding is suitable for use in situations where secure authenticated transmissions are required, such as e-commerce. The DER is favorable for transmitting data with average size, and a fixed-length coding mode is adopted, so that a certain requirement on the memory space is met.
3) PER coding
The application of PER coding is to solve the problem of high BER coding cost. PER coding uses compression rules as much as possible for compression coding, its format is PLV < optional Preamble, optional Length, optional Value >, each field of PLV is not an octet string but a bit string, PLV has no Tag field, length can be omitted. Since the code is compressed, the PER needs to rely on subtype constraints in the asn.1 description, the more specific the constraints are described, the more optimal the code can be obtained.
(2) M-coding
M coding is also called dynamic message coding of a power system, and is a coding method which is provided by DL/T1232-2013 power system dynamic message coding specification and can flexibly and dynamically describe a power system model and data in a self-contained mode. The M coding is based on ASN.1, and provides M0, M1, M2, M3 and M4 5 binary message coding modes to describe the power system model and data.
At present, all secondary equipment manufacturers use an autonomously developed process layer network GOOSE/SV protocol, but a station control layer protocol is mostly developed secondarily based on an MMS Lite protocol library developed by SISCO company. The MMS protocol is an application layer protocol established by the international standard organization in the 80 s of the last century for industrial automation systems, and the SISCO company develops the MMS protocol into an MMS Lite protocol library and then externally authorizes the MMS Lite protocol library.
The 2013 Germany MZ Automation company issues an open source station control layer protocol library libIEC 61850 and is continuously updated. The libIEC 61850 is realized based on the C language, the IED model is statically realized according to the substation configuration description language (substation configuration description language, SCL) language, and the IED model is dynamically generated through a configuration file or an application program interface, so that the association, simple or complex MMS variable read-write service, the data set service and the like are provided. Since 2018, libIEC 61850 was exposed successively for many vulnerabilities including buffer errors, resource management errors, etc. Australia SystemCORP Energy introduced the PIS-10 station control layer protocol stack and was used in Siemens et al.
The main stream products used by the substation station control layer service protocol are MMS Lite protocol library and PIS-10 station control layer protocol stack. The MMS Lite protocol library is formulated for an industrial control system in the 80 s, has a complex protocol library architecture and low communication transmission efficiency, and most secondary equipment manufacturers do not have the capability of deeply modifying codes. PIS-10 from SystemCORP Energy has been used in engineering products in recent years and requires an authorized fee. Both types of products can be used, but secondary equipment manufacturers do not have the capability of autonomous modification, and risks of influencing safe operation of equipment and a power grid easily occur.
Disclosure of Invention
The invention aims to provide a substation control layer communication method, a system, electronic equipment and a storage medium for solving the technical problem that secondary equipment manufacturers do not have the capability of independently modifying service protocols and risk of influencing safe operation of equipment and a power grid easily occurs.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the first aspect of the invention provides a communication method of a substation control layer of a transformer substation, comprising the following steps:
the client side issues a command to the server side;
the server returns data to the client;
the command and data sent between the client and the server adopt a message structure which is a station control layer service protocol message APDU structure.
The invention is further improved in that: the station control layer service protocol message APDU structure consists of an application protocol control header APCH and an application service data unit ASDU.
The invention is further improved in that: the application protocol control header APCH comprises a control code, a service code and a frame length;
the control code occupies 8 bits; the first 4 bits are of a protocol type, and represent a station-control layer service protocol when the protocol type is 1, and represent a GSP protocol when the protocol type is 0; the last 4 bits are Next, resp, err and bak; next indicates whether there is a subsequent message, resp is used to distinguish whether the service is a request or a response, err indicates whether the service is successful or erroneous, and bak is standby.
The service code corresponds to IEC61850 ACSI and an extended communication service interface, and is rapidly positioned to the ACSI by analyzing the service code;
the frame length indicates the length of the application service data unit ASDU.
The invention is further improved in that: the application service data unit ASDU consists of a unique service request sequence number ReqID and a service data area;
the service request sequence number ReqID is used for identifying the service request and response process, and the value range is 1-65535;
the service data area stores the encoded data.
The invention is further improved in that: if a certain application service data unit ASDU exceeds the length limit of an outbound control layer service protocol message (APDU) frame, segmenting an application service data unit ASDU data area according to the limit length of the station control layer service protocol message (APDU) frame, and respectively adding an APCH header and a ReqID to the segmented data to form a new APDU frame; the length added by subtracting the repeated ReqID from the sum of the frame lengths of all APDU frames is the length of the ASDU of the original application service data unit;
all APDU frames are transmitted in a frame transmission mode; when in frame transmission, the sender enables each APDU frame to be sent in sequence, and no loss and no sequence error are caused in the process; after receiving all APDU frames, the receiver reassembles the data content to obtain the complete application service data unit ASDU.
The invention is further improved in that it specifically comprises:
the client side issues a command for reading the remote calling interface catalog; the server returns all available service interface lists; the client side picks the service interface to be called from the acquired service interface list;
the client side issues a remote calling method catalog command, and the server side returns a service list which can be provided by a specified service interface;
the client picks the equipment object and the target service to be called from the acquired service list, and issues the called equipment object and the target service to the server in the form of a remote calling service parameter command;
after receiving the command of remotely calling the service parameters, the server forwards the command to the target equipment of the station control layer, executes the target service, and finally returns the service result to the client through the server.
The invention is further improved in that: the station control layer service protocol message APDU structure adopts the ASN.1 BASIC-PER coding alignment coding mode.
In a second aspect of the present invention, there is provided a substation control layer communication system including:
the client is used for issuing a command to the server;
the server side is used for returning data to the client side;
the command and data sent between the client and the server adopt a message structure which is a station control layer service protocol message APDU structure.
In a third aspect of the present invention, an electronic device is provided, where the electronic device includes a processor and a memory, where the processor is configured to execute a computer program stored in the memory to implement the substation control layer communication method.
In a fourth aspect of the present invention, a computer readable storage medium is provided, where at least one instruction is stored, where the at least one instruction, when executed by a processor, implements the substation control layer communication method.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a substation control layer communication method, a system, electronic equipment and a storage medium, wherein a message structure adopted by commands and data sent between a client and a server is a station control layer service protocol message APDU structure; the station control layer service protocol directly maps the IEC 61850-7-2 abstract communication service interface and the IEC 61850-7-2 model to the TCP/IP protocol stack, thereby avoiding the process of converting the MMS protocol stack; the manufacturer of the secondary equipment can independently modify the secondary equipment, so that the safe operation of the equipment and the power grid is effectively ensured.
In the invention, on the communication service mapping realization, the protocol directly maps the abstract communication service interface to the TCP/IP protocol stack so as to improve the service performance. The protocol is based on IEC 61850-7-2 standardized abstract communication service interface grammar definition, and simultaneously expands service interfaces such as association, remote call and the like, ensures the communication safety of both a client and a server, and makes up the supporting service of the server to a master station. In coding, an ASN.1 compression coding rule mode is adopted to enhance the efficiency of coding and decoding and data transmission.
The invention expands 5 remote call service interfaces on the basis of IEC 61850-7-2 abstract communication service interfaces, and provides support service for the master station. The number of measuring points for sending the transformer substation to the main station is small, and the requirement of high-grade application analysis at the main station end is difficult to meet. The master station can call or read the substation data through the remote call service interface according to the requirements, so that limited communication channels and computing resources are saved.
The invention discloses a station control layer service protocol message APDU data frame structure, which follows GB/T33602, and protocol type PI represents protocol type, and the measures enable the station control layer service protocol to be compatible with a general service protocol of an electric power system, an MMS protocol and the like, expand the compatibility of old protocols, and facilitate the application of the protocol to the transformation of stations and original equipment.
In the invention, compared with BER coding, the station control layer service protocol PER coding omits the Tag, and can omit the Length in fixed Length, so that the protocol message structure is simple, the Length is short, and the speed is increased in coding. On the other hand, the length is greatly shortened, and the quick transmission is facilitated.
The invention expands 5 kinds of remote call service interfaces on the basis of IEC 61850-7-2 abstract communication service interfaces and supports the realization of remote call functions.
The invention designs a timeout and communication state detection mechanism. After a client sends a service request, setting a corresponding time timer; after establishing communication association between the client and the server, detecting communication state at regular time; the client and server adopt the KeepAlive mechanism of TCP.
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 invention. In the drawings:
FIG. 1 is a schematic diagram of an ACSI and protocol mapping model;
FIG. 2 is a schematic diagram of ACSI mapping to a station control layer service protocol;
FIG. 3 is a schematic diagram of a remote invocation service implementation process;
FIG. 4 is a diagram of an application protocol data unit result;
fig. 5 is a block diagram of an electronic device.
Detailed Description
The invention will be described in detail below with reference to the drawings in connection with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
The following detailed description is exemplary and is intended to provide further details of the invention. Unless defined otherwise, all technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments in accordance with the invention.
Term interpretation:
station-controlled layer service protocol/Service Oriented Protocol
The IEC61850 substation control layer protocol of the protocol mapping method provided by the invention directly maps the abstract communication service interface to the TCP/IP protocol stack, and adopts an ASN.1 compression coding rule mode in coding.
Abstract communication service interface/Abstract Communication Service Interfaces
The virtual interface is used for providing an abstract information modeling method for logic equipment, logic nodes, data and data attributes, and providing communication services for connection, variable access, active data transmission, device control, file transmission services and the like, and is irrelevant to an actually used communication protocol stack and protocol set.
Logical node class/logical node class
Data, data sets, report control, log, generic object-oriented substation event and generic substation state event control, association of sampled measurements. The logical node class represents the typical functions of the substation. DL/T860.74 defines a table of compatible logical nodes for protection functions, monitoring, metering, switching devices, power transformers, etc.
Logical device class/logical device class
Virtual devices associate related logical nodes with data sets for general purposes. The logical device contains frequently accessed or referenced information tables, such as data set tables.
Specific communication service mapping/Specific Communication Service Mapping
IEC 61850-8-1, IEC 61850-9 describe how to generate and exchange specific communication messages, enabling interoperability of substation equipment, these messages implement Abstract Communication Service Interfaces (ACSI) and models described by IEC 61850-7-4, IEC 61850-7-3, IEC 61850-7-2. The process of ACSI and model generation and exchange of specific communication messages is referred to as a specific communication service mapping.
Example 1
The inventive station-control layer service protocol maps ACSI services directly to a transmission control protocol/Internet protocol (transfer control protocol/internet protocol, TCP/IP) protocol stack to enhance ACSI service performance. As shown in FIG. 2, ACSI communication service is extended and improved based on IEC61850 standard, and remote call request and response service is added to adapt to requirements of application scenes such as remote call. Since the extended content does not modify the original service parameters, it remains compatible with the original service. In terms of information model mapping, the information models defined by IEC 61850-7-3 and 7-4 are still employed. In the aspect of message coding, in order to improve coding and data transmission efficiency, the station control layer service protocol adopts a general service protocol message structure of an electric power system, but the coding adopts PER coding to replace BER coding adopted by an MMS message.
The server port is 8102, and the server port supporting security authentication is 9102. In some application scenarios, the same client address allows only one connection to be established. If duplicate connections are detected, the server actively suspends and closes the old connection and then accepts the new connection.
More than 50 communication services are defined in IEC 61850-7-2, and the functions of association, model and data, data set, control, constant value group, report, log, file operation and the like are related, so that most functions of substation automation are met, but the problem of insufficient supporting service for a main station also exists. The remote operation and maintenance is an important function of supporting the service of the main station in the transformer substation, the information in the transformer substation is the most comprehensive, but is limited to the conditions of channels, storage and the like, the main station can not acquire more detailed information of the station end at present, the information comprises a model, a graph, a measuring point, a file, a log and the like, the main station end can retrieve the data of the station end through remote calling service when needed so as to acquire comprehensive evaluation of the equipment state and more comprehensive information support of fault diagnosis, and IEC61850 and MMS protocol do not support the function. The station-controlled layer service protocol adds 5 types of remote call services to the above requirements, as shown in table 2.
Table 2 IEC61850 remote invocation service
Numbering device IEC61850 object IEC61850 ACSI service
1 Reading remote call interface directories GetRpcInterfaceDirectory
2 Reading a remote invocation method directory GetRpcMethodDirectory
3 Reading remote call interface definitions GetRpcInterfaceDefinition
4 Read remote invocation method definition GetRpcMethodDefinition
5 Remote procedure call RpcCall
The remote calling process is a request response process, the master station sends a calling request, the sub-station returns a query result, and each service in the table 2 contains the request and response processes. The master station dynamically acquires the called parameters through the services such as directory reading or definition. In order to ensure the operation safety of the power transformation equipment, the remote calling function can only be used for calling the service of the query and analysis class, but cannot be used for controlling, operating, setting parameters, issuing configuration files and the like.
The remote calling interface directory (getrpc interface directory) is used for reading calling interfaces available to the substation, the remote calling method directory (getrpc method directory) is used for obtaining services available to the substation for specifying the service interface, the remote calling interface definition (getrpc interface definition) is used for obtaining all definitions of the specified service interface, and the remote calling method definition (getrpc method definition) is used for obtaining definitions of a set of methods. A remote procedure call service (RpcCall) is used to request the substation to execute the corresponding call result.
The remote service call adopts a dynamic call mode for being compatible with various call services; referring to fig. 3, the method for communication of a substation control layer of a transformer substation according to the present invention includes the following steps:
(1) The client issues a remote calling interface directory (GetRCInterfaceDirector) command; the server returns all available service interface lists, such as a credit protection service, remote browsing and warning direct transmission function; the client side picks the service interface to be called from the acquired service interface list;
(2) The client issues a remote calling method directory (GetCapcMethodDirectness) command, and the server returns a service list which can be provided by a specified service interface;
(3) The client picks the device object and the target service to be called from the acquired service list, and issues the device object and the target service to the server in the form of a remote call service parameter (RpcCall) command; the target service includes: service name, type, data structure information;
(4) After receiving a remote call service parameter (RpcCall) command, the server forwards the command to the target equipment of the station control layer, executes target service, and finally returns a service result to the client through the server. If errors occur in the calling process, a service error identification is returned.
The invention discloses a communication method of a substation control layer of a transformer substation, which comprises the following steps:
the client side issues a command to the server side;
the server returns data to the client;
in the invention, the command and data sent between the client and the server adopt the station control layer service protocol message APDU structure; the station control layer service protocol message APDU structure is as follows:
referring to fig. 4, the APDU structure of the service protocol message of the station control layer is composed of an application protocol control header (application protocol control header, APCH) and an application service data unit (application service data unit, ASDU), wherein the APCH is divided into a control code, a service code and a frame length.
Both the control code and the service code are specified in the GB/T33602-2017 GSP protocol.
The control code CC occupies 2 bytes, 8 bits, the first 4 bits being a protocol type, and when the protocol type is 1, it means a station-control layer service protocol, and when it is 0, it means a GSP protocol. The last 4 bits are Next, resp, err and bak; next indicates whether there is a subsequent message, resp is used to distinguish whether the service is a request or a response, err indicates whether the service is successful or erroneous, and bak is reserved as a spare.
The service code SC corresponds to IEC61850 ACSI and an extended communication service interface, the service code is analyzed to be rapidly positioned to the ACSI, and the ASDU part of the message is decoded by adopting an ACSI ASN.1 coding rule corresponding to a station control layer service protocol. The frame length FL indicates the length of the ASDU, occupies two bytes, and the maximum length of the ASDU does not exceed 65531.
An Application Service Data Unit (ASDU) consists of a unique service request sequence number ReqID and a service data area. The service request sequence number ReqID is used for identifying the service request and response process, and the value range is 1-65535. The service data area stores the encoded data, and the encoding and decoding are required to be carried out by combining the service codes according to the basic encoding rule requirement.
Each time a new request response service starts, the service requester adds 1 to ReqID. When the service response party returns a response message, the ReqID at the time of the request is used. The inversion is 1 after ReqID exceeds 65535. 0 is a reserved value for unsolicited response services, such as Report services.
The invention also designs a null data frame, and the APDU data frame can have the condition that the length of an ASDU or a service data area is 0. If the ASDU length is 0, the data frame has only the APCH header, does not contain the ASDU portion, and has a frame length fl=0, for example, a data frame of Test service. If the service data area length is 0, the data frame consists of an APCH header and a ReqID, and the frame length fl=2, for example, a positive response to confirm the edit-value group value service.
In the invention, partial service may occur that the ASDU is over long, exceeding the length limit of the APDU frame, and the method of frame transmission may be adopted. Firstly, slicing an ASDU data area (excluding a ReqID) according to the limit length of an APDU frame, and then adding an APCH header and the ReqID (which should be the same as the ReqID of the original ASDU) to sliced data respectively to form a plurality of new APDU frames. The Next flag bit of the APCH header is used for frame identification, a Next flag bit of 1 indicates that there is a subsequent frame, and a Next flag bit of 0 indicates that there is no subsequent frame. The frame length FL of the APCH header indicates the length of the ReqID and data area in the present frame. The sum of the frame lengths of all APDU frames minus the length added by the duplicate ReqID is the original ASDU length.
When in frame transmission, a sender ensures that each APDU frame is transmitted in sequence, and no loss and no wrong sequence are caused in the process. Retransmission and sequential control of the transmission process are guaranteed by the TCP protocol, so that the client and the server should reasonably set TCP parameters and monitor TCP transmission error information at any time. After receiving all APDU frames, the receiver reassembles the data content to obtain the complete ASDU.
If the framing transmission mode is not adopted, namely only one APDU frame is adopted at a time, the Next flag bit is always 0.
The communication service designed by the invention does not contain mechanisms such as flow control, segmentation/recombination, error control and the like, and is supported by a TCP/IP protocol subset depending on a transmission layer. If UDP/IP or other datagram-oriented transport layer protocols are used, the mechanism is designed in the underlying protocol. When an error is detected in the communication process, the server or the client records an error log, adopts different processing methods according to the nature of the error, discards the current data frame, and stops the current association or even disconnects.
Timeout and communication state detection:
after the client sends out the service request, a corresponding time timer is set. If the response data of the server is not received beyond the preset time, the communication timeout is judged, and the request or the retransmission request can be abandoned. If a timeout occurs for a succession of requests, the client may choose to abort the association.
After the client and the server establish communication association, the communication state detection is performed at regular time. If the client and the server are always performing data interaction, the communication between the client and the server can be considered normal. If the communication link is in an idle state for a long time, the client and the server can actively send out Test messages to Test whether the communication program of the receiver is in a working state. The transmission period of the Test message is preferably selected to be 1-5 minutes. The send timer for Test messages should count again after any valid messages are received.
The client and the server also have a KeepAlive mechanism of TCP. The idle detection time of KeepAlive is preferably set to 30 seconds, the transmission interval is preferably set to 5 seconds, and the number of transmissions is preferably set to 4. When the network port or the network cable is damaged, the network fault can be detected within 50 seconds at maximum.
And (3) protocol message coding design:
the station control layer service protocol adopts the ASN.1 BASIC-PER coding alignment coding mode. The Length may be omitted when the PER encoded PLV transmitted data is of a fixed Length, and may not be omitted when the transmitted data is of an indefinite Length, such as object reference ObjectReference. Since Length is omitted, the boundaries cannot be known from the coding, the encoder must know the specified abstract description to decode correctly, i.e. the coding rule of the service protocol message of the combined station control layer is required to decode correctly, the Tag field does not exist in the PER coding, default extension is not supported any more, and the extension must be explicitly added in the description of the coding rule of the message.
PER coding is non-plaintext for network package software such as Wireshark, and the situation that analysis cannot be performed occurs in the debugging process, because the existing package grabbing software does not support coding rules of a station control layer service protocol, and corresponding secondary development is needed for network analysis software or debugging software.
Example 2
The second aspect of the present invention also provides a substation control layer communication system, including:
the client is used for issuing a command to the server;
the server side is used for returning data to the client side;
the command and data sent between the client and the server adopt a message structure which is a station control layer service protocol message APDU structure.
Example 3
Referring to fig. 5, the present invention further provides an electronic device 100 for implementing a substation control layer communication method of a substation; the electronic device 100 comprises a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
The memory 101 may be used to store the computer program 103, and the processor 102 may implement various functions of the electronic device 100 by running or executing the computer program stored in the memory 101 and invoking data stored in the memory 101. The memory 101 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data) created according to the use of the electronic device 100, and the like. In addition, the memory 101 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The at least one processor 102 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The processor 102 may be a microprocessor or the processor 102 may be any conventional processor or the like, the processor 102 being a control center of the electronic device 100, the various interfaces and lines being utilized to connect various portions of the overall electronic device 100.
The memory 101 in the electronic device 100 stores a plurality of instructions to implement a substation control layer communication method, and the processor 102 may execute the plurality of instructions to implement:
the client side issues a command to the server side;
the server returns data to the client;
the command and data sent between the client and the server adopt a message structure which is a station control layer service protocol message APDU structure.
The modules/units integrated in the electronic device 100 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, and a Read-Only Memory (ROM).
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention without departing from the spirit and scope of the invention, which is intended to be covered by the claims.

Claims (7)

1. A substation control layer communication method for a substation, comprising:
the client sends data to the server;
the server returns data to the client;
the data transmitted between the client and the server adopts a message structure which is a station control layer service protocol message APDU structure;
the station control layer service protocol message APDU structure consists of an application protocol control header APCH and an application service data unit ASDU;
the application protocol control header APCH comprises a control code, a service code and a frame length;
the control code occupies 8 bits; the first 4 bits are of a protocol type, and represent a station-control layer service protocol when the protocol type is 1, and represent a GSP protocol when the protocol type is 0; the last 4 bits are Next, resp, err and bak; next indicates whether there is a subsequent message, resp is used to distinguish whether the service is a request or a response, err indicates whether the service is successful or erroneous, and bak is standby;
the service code corresponds to IEC61850 ACSI and an extended communication service interface, and is rapidly positioned to the ACSI by analyzing the service code;
the frame length represents the length of the application service data unit ASDU;
the application service data unit ASDU consists of a unique service request sequence number ReqID and a service data area;
the service request sequence number ReqID is used for identifying the service request and response process, and the value range is 1-65535;
the service data area stores the encoded data.
2. The method for communication of substation control layer according to claim 1, wherein if an application service data unit ASDU exceeds the length limit of an APDU frame of an outbound control layer service protocol message, splitting an application service data unit ASDU data area according to the limit length of the APDU frame of the station control layer service protocol message, and adding an APCH header and a ReqID to the split data respectively to form a new APDU frame; the length added by subtracting the repeated ReqID from the sum of the frame lengths of all APDU frames is the length of the ASDU of the original application service data unit;
all APDU frames are transmitted in a frame transmission mode; when in frame transmission, the sender enables each APDU frame to be sent in sequence, and no loss and no sequence error are caused in the process; after receiving all APDU frames, the receiver reassembles the data content to obtain the complete application service data unit ASDU.
3. The substation control layer communication method according to claim 1, specifically comprising:
the client side issues a command for reading the remote calling interface catalog; the server returns all available service interface lists; the client side picks the service interface to be called from the acquired service interface list;
the client side issues a remote calling method catalog command, and the server side returns a service list which can be provided by a specified service interface;
the client picks the equipment object and the target service to be called from the acquired service list, and issues the called equipment object and the target service to the server in the form of a remote calling service parameter command;
after receiving the command of remotely calling the service parameters, the server forwards the command to the target equipment of the station control layer, executes the target service, and finally returns the service result to the client through the server.
4. The method for communication of a substation control layer according to claim 1, wherein the APDU structure of the service protocol message of the substation control layer adopts a BASIC-PER coding alignment coding mode of asn.1.
5. A substation control layer communication system of a transformer substation, comprising:
the client is used for sending data to the server;
the server side is used for returning data to the client side;
the data transmitted between the client and the server adopts a message structure which is a station control layer service protocol message APDU structure;
the station control layer service protocol message APDU structure consists of an application protocol control header APCH and an application service data unit ASDU;
the application protocol control header APCH comprises a control code, a service code and a frame length;
the control code occupies 8 bits; the first 4 bits are of a protocol type, and represent a station-control layer service protocol when the protocol type is 1, and represent a GSP protocol when the protocol type is 0; the last 4 bits are Next, resp, err and bak; next indicates whether there is a subsequent message, resp is used to distinguish whether the service is a request or a response, err indicates whether the service is successful or erroneous, and bak is standby;
the service code corresponds to IEC61850 ACSI and an extended communication service interface, and is rapidly positioned to the ACSI by analyzing the service code;
the frame length represents the length of the application service data unit ASDU;
the application service data unit ASDU consists of a unique service request sequence number ReqID and a service data area;
the service request sequence number ReqID is used for identifying the service request and response process, and the value range is 1-65535;
the service data area stores the encoded data.
6. An electronic device comprising a processor and a memory, the processor configured to execute a computer program stored in the memory to implement a substation control layer communication method according to any one of claims 1 to 4.
7. A computer readable storage medium storing at least one instruction which when executed by a processor implements a substation control layer communication method according to any one of claims 1 to 4.
CN202110028902.6A 2021-01-09 2021-01-09 Substation control layer communication method and system, electronic equipment and storage medium Active CN112822276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110028902.6A CN112822276B (en) 2021-01-09 2021-01-09 Substation control layer communication method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110028902.6A CN112822276B (en) 2021-01-09 2021-01-09 Substation control layer communication method and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112822276A CN112822276A (en) 2021-05-18
CN112822276B true CN112822276B (en) 2023-05-02

Family

ID=75868576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110028902.6A Active CN112822276B (en) 2021-01-09 2021-01-09 Substation control layer communication method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112822276B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098663B (en) * 2021-03-31 2022-10-14 国网浙江省电力有限公司电力科学研究院 ASDU (asynchronous serial bus) frame transmission method, receiving method and system based on GSP (generalized likelihood protocol)
CN113824724B (en) * 2021-09-24 2023-09-22 山东能士信息科技有限公司 Method and device for judging tampered sensor data of intelligent substation and storage medium
CN113986787B (en) * 2021-10-09 2023-06-30 河南源网荷储电气研究院有限公司 Multi-CPU communication data detection method and system
CN114268675A (en) * 2021-11-22 2022-04-01 许昌许继软件技术有限公司 Communication method and system based on IEC61850 model and electronic equipment
CN114422621B (en) * 2021-12-21 2023-10-17 南京南瑞继保电气有限公司 Communication connection method, station control layer device and storage medium
CN115134417B (en) * 2022-05-18 2023-11-17 国网福建省电力有限公司超高压分公司 IEC 61850-based data conversion method and device for primary equipment of power system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978140A (en) * 2016-05-06 2016-09-28 中国电力科学研究院 Information integrating method of power device
WO2020062126A1 (en) * 2018-09-29 2020-04-02 Oppo广东移动通信有限公司 Method for processing data packet, entity and storage medium
CN111859043A (en) * 2020-07-30 2020-10-30 积成电子股份有限公司 GSP communication message analysis method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978140A (en) * 2016-05-06 2016-09-28 中国电力科学研究院 Information integrating method of power device
WO2020062126A1 (en) * 2018-09-29 2020-04-02 Oppo广东移动通信有限公司 Method for processing data packet, entity and storage medium
CN111859043A (en) * 2020-07-30 2020-10-30 积成电子股份有限公司 GSP communication message analysis method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"电力系统通用服务协议的应用层数据加密技术研究";周彦飞等;《电工技术》;20190910;第12-14页 *
IEC61850 的Web Services 映射及实现;陈志伟等;《电力自动化设备》;20130331;第136-139页 *
电力系统通用服务协议的应用层数据加密技术研究;周彦飞等;《电工技术》;20190910;第12-14页 *

Also Published As

Publication number Publication date
CN112822276A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN112822276B (en) Substation control layer communication method and system, electronic equipment and storage medium
CN110365644B (en) Method for constructing high-performance monitoring platform of networking equipment
US8789182B2 (en) Security event logging in process control
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN111294235B (en) Data processing method, device, gateway and readable storage medium
WO2021056793A1 (en) Power transmission line distributed fault diagnosis system and method
CN112702333B (en) Data security detection method and device
CN114125049B (en) Telemetry message processing method, device, equipment and storage medium
CN110752966A (en) Network protocol security test method and device, electronic equipment and storage medium
CN117319525A (en) Substation heterogeneous data fusion method and system based on CMS and MMS
CN113596017B (en) Protocol analysis method and device, soft gateway and storage medium
CN114301988A (en) Distributed calling method and device, storage medium and electronic equipment
CN113220481A (en) Request processing and feedback method and device, computer equipment and readable storage medium
CN101098257A (en) Method and network element for improving error management in managed networks
CN113297148B (en) Method, device and equipment for collecting service log data and readable storage medium
EP3002910A1 (en) Connecting computer management systems via cellular digital telecommunication networks
CN102263796B (en) Data transmission method based on simple network management protocol
CN104319884B (en) Intelligent substation station level analyzer
WO2014063543A1 (en) Implementation method and device for virtual southbound interface and internet of things management platform
CN217240718U (en) Communication safety detection system for E1 channel of power stability control device
CN114257643B (en) Log transmission method and system
CN114710237B (en) Data processing method and device of communication interface, electronic equipment and storage medium
CN113852651B (en) FANUC proxy service realization system and method based on edge gateway
CN116131449A (en) Electric state monitoring system of power grid
CN117612314A (en) Safety response method and system for fire alarm state quantity in transformer substation

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