Disclosure of Invention
In order to solve the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a communication method and system for a measurement and control device, wherein an IED instantiation Configuration (CID) model file is used as a core of a measurement and control system software platform, and each functional module extracts connection relationship, logic relationship, and fixed value parameter configuration information from the configuration file. In the process of mapping PIM to PSM, the communication between the measurement and control system and the process layer and the station control layer network is respectively realized through a message middleware publish/subscribe mode and a CORBA middleware technology.
The purpose of the invention is realized by adopting the following technical scheme:
the invention provides a communication method of a measurement and control device, and the improvement is that the method comprises the following steps:
when the model drives the measurement and control device to work, a preset model file is instantiated and then is downloaded to the measurement and control device;
the measurement and control device analyzes the instantiated model file;
and respectively transmitting the analyzed model file data to each functional module according to the communication type.
Further: the preset model file is an ICD file describing the functions which can be realized by the measurement and control device; and the instantiated model file is a CID which describes the functions to be realized after the measurement and control device is configured.
Further: the step of respectively transmitting the analyzed model file data to each functional module according to the communication type comprises the following steps:
when the communication type is the basic platform communication service, the bottom layer protocol layer acquires parameters from the analyzed model file and drives the basic platform communication of the measurement and control device according to the acquired parameters;
when the communication type is a process layer communication service, acquiring a GOOSE and SV sampling value communication connection relation from the analyzed model file through a message middleware publish/subscribe mode;
and when the communication type is station control layer communication service, the measurement and control device calls a required interface according to a service interface provided by the CID model through a client/server side mode of a CORBA middleware of a common object request agent system to communicate with the station control layer client.
Further: the bottom layer protocol layer obtains parameters from the analyzed model file, and the parameters comprise:
the bottom layer protocol layer provides a TCP/IP protocol, a CAN bus protocol, an FTP text transmission protocol, a serial port protocol, an HTM webpage text and a message text protocol;
and acquiring parameters from the analyzed model file according to the protocol provided by the bottom protocol layer, wherein the parameters comprise an IP address/MAC address, a mask and VLAN division.
Further: the obtaining of the GOOSE and SV sampling value communication connection relationship from the analyzed model file through the message middleware publish/subscribe mode includes:
the communication connection relation provides a GOOSE and SV sampling value virtual terminal connection relation, a GOOSE and SV sampling value control block connection relation, and control block MAC address, VLAN division, sampling value sampling rate and GOOSE control block sending time interval configuration information;
the measurement and control device subscribes a GOOSE and SV sampling value report control block of the process layer device;
the process layer device issues GOOSE and SV multicast messages to a process layer network according to the connection relation of the GOOSE and SV sampling value virtual terminals and the connection relation of the GOOSE and SV sampling value control blocks;
and the measurement and control device acquires GOOSE and SV messages from the process layer network.
Further: the client/server side mode of CORBA middleware of a common object request agent system is adopted, the measurement and control device calls a required interface according to a service interface provided by a CID model, and the measurement and control device is communicated with a station control layer client, and the method comprises the following steps:
the client activates an object request agent ORB of the measurement and control device in the local;
the object request broker ORB receives service requests from client programs, and CORBA middleware interacts with other programs through interfaces described by an interface definition language IDL.
Further: the interface definition language IDL is used for defining an interface between the client and the measurement and control device, the service defined by the interface definition language IDL is realized by the measurement and control device, and the client acquires information of the measurement and control device by using a dynamic calling interface or an IDL root program.
Further: the parsed model file data includes: configuration information, logical relationships, and/or parameters.
Further: the step of respectively transmitting the analyzed model file data to each functional module according to the communication type further comprises the following steps: and acquiring configuration information of the measurement and control device from the analyzed model file, and providing the configuration information to each functional module of the application layer.
Further: providing the configuration information to each function module of an application layer, and further comprising;
extracting SV control block MAC address, VLAN division and sampling rate configuration information from the configuration information to a measurement module;
extracting the MAC address of the GOOSE control block from the configuration information, and sending time interval configuration information to the control module;
extracting interlocking logic information from the configuration information to an interlocking function module;
the alarm module triggers an alarm signal of the abnormal, remote signaling deflection and self-checking information of the measurement and control device;
and calculating the electric energy and the electric quantity of the monitored measurement and control device by the metering module.
The invention also provides a communication system of the measurement and control device, and the improvement is that the communication system comprises:
the downloading module is used for downloading a preset model file to the measurement and control device after instantiating the model file when the model drives the measurement and control device to work;
the analysis module is used for analyzing the instantiated model file by the measurement and control device;
and the transmission module is used for transmitting the analyzed data to each functional module according to the communication type.
Further, the preset model file is an ICD file describing the functions which can be realized by the measurement and control device; and the instantiated model file is a CID which describes the functions to be realized after the measurement and control device is configured.
Further: the analysis module further comprises:
the basic platform communication service submodule is used for acquiring parameters from the analyzed model file by the bottom protocol layer when the communication type is the basic platform communication service, and driving the basic platform communication of the measurement and control device according to the acquired parameters;
a process layer communication service sub-module, configured to, when the communication type is a process layer communication service, obtain a GOOSE and SV sampling value communication connection relationship from the parsed model file through a message middleware publish/subscribe mode;
and the station control layer communication service submodule is used for calling a required interface according to a service interface provided by the CID model by a client/server side mode of a CORBA middleware of a common object request agent system when the communication type is the station control layer communication service, and communicating with the station control layer client.
Further, the basic platform communication service sub-module includes:
an obtaining unit, configured to obtain, by the bottom layer protocol layer, a parameter from the parsed model file;
the acquired parameters comprise:
the bottom layer protocol layer provides a TCP/IP protocol, a CAN bus protocol, an FTP text transmission protocol, a serial port protocol, an HTM webpage text and a message text protocol;
and acquiring parameters including IP address/MAC address, mask and VLAN division from the analyzed model file according to the protocol.
Compared with the closest prior art, the technical scheme provided by the invention has the beneficial effects that:
when the model drives the measurement and control device to work, a preset model file is instantiated and then is downloaded to the measurement and control device; the measurement and control device analyzes the instantiated model file; and respectively transmitting the analyzed model file data to each functional module according to the communication type. Model-driven interconnection and intercommunication integrates all configuration information of the device into a model file, reduces the coupling degree of application functions and program realization, considers most relevant factors influencing interconnection and intercommunication of the device, and eliminates the interconnection and intercommunication problem.
Detailed Description
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. The scope of embodiments of the invention encompasses the full ambit of the claims, as well as all available equivalents of the claims. Embodiments of the invention may be referred to herein, individually or collectively, by the term "invention" merely for convenience and without intending to voluntarily limit the scope of this application to any single invention or inventive concept if more than one is in fact disclosed.
The first embodiment,
The invention provides a communication method of a measurement and control device, a flow chart of which is shown in figure 4, and the method comprises the following steps:
when the model drives the measurement and control device to work, a preset model file is instantiated and then is downloaded to the measurement and control device;
the measurement and control device analyzes the instantiated model file;
and respectively transmitting the analyzed model file data to each functional module according to the communication type.
The preset model file is an ICD file describing the functions which can be realized by the measurement and control device; and the instantiated model file is a CID which describes the functions to be realized after the measurement and control device is configured.
The step of respectively transmitting the analyzed model file data to each functional module according to the communication type comprises the following steps:
when the communication type is the basic platform communication service, the bottom layer protocol layer acquires parameters from the analyzed model file and drives the basic platform communication of the measurement and control device according to the acquired parameters;
when the communication type is a process layer communication service, acquiring a GOOSE and SV sampling value communication connection relation from the analyzed model file through a message middleware publish/subscribe mode;
and when the communication type is station control layer communication service, the measurement and control device calls a required interface according to a service interface provided by the CID model through a client/server side mode of a CORBA middleware of a common object request agent system to communicate with the station control layer client.
The bottom layer protocol layer obtains parameters from the analyzed model file, and the parameters comprise:
the bottom layer protocol layer provides a TCP/IP protocol, a CAN bus protocol, an FTP text transmission protocol, a serial port protocol, an HTM webpage text and a message text protocol;
and acquiring parameters including IP address/MAC address, mask and VLAN division from the analyzed model file according to the protocol.
The obtaining of the GOOSE and SV sampling value communication connection relationship from the analyzed model file through the message middleware publish/subscribe mode includes:
the communication connection relation provides a GOOSE and SV sampling value virtual terminal connection relation, a GOOSE and SV sampling value control block connection relation, and control block MAC address, VLAN division, sampling value sampling rate and GOOSE control block sending time interval configuration information;
the measurement and control device subscribes a GOOSE and SV sampling value report control block of the process layer device;
the process layer device issues GOOSE and SV multicast messages to a process layer network according to the connection relation of the GOOSE and SV sampling value virtual terminals and the connection relation of the GOOSE and SV sampling value control blocks;
and the measurement and control device acquires GOOSE and SV messages from the process layer network.
The client/server side mode of CORBA middleware of a common object request agent system is adopted, the measurement and control device calls a required interface according to a service interface provided by a CID model, and the measurement and control device is communicated with a station control layer client, and the method comprises the following steps:
the client activates an object request agent ORB of the measurement and control device in the local;
the object request broker ORB receives service requests from client programs, and CORBA middleware interacts with other programs through interfaces described by an interface definition language IDL.
The interface definition language IDL is used for defining an interface between the client and the measurement and control device, the service defined by the interface definition language IDL is realized by the measurement and control device, and the client acquires information of the measurement and control device by using a dynamic calling interface or an IDL root program.
The parsed model file data includes: configuration information, logical relationships, and/or parameters.
The step of respectively transmitting the analyzed model file data to each functional module according to the communication type further comprises the following steps: and acquiring configuration information of the measurement and control device from the analyzed model file, and providing the configuration information to each functional module of the application layer.
Providing the configuration information to each function module of an application layer, and further comprising;
extracting SV control block MAC address, VLAN division and sampling rate configuration information from the configuration information to a measurement module;
extracting the MAC address of the GOOSE control block from the configuration information, and sending time interval configuration information to the control module;
extracting interlocking logic information from the configuration information to an interlocking function module;
the alarm module triggers an alarm signal of the abnormal, remote signaling deflection and self-checking information of the measurement and control device;
and calculating the electric energy and the electric quantity of the monitored measurement and control device by the metering module.
Specifically, the method comprises the following steps:
1. model driven interworking framework
The measurement and control system is used as a device of a spacer layer and provides three communication services, namely a basic platform communication service, a communication service with a process layer and a communication service with a station control layer. The real-time requirement of the communication service with the process layer is high, and the communication flow is large; the real-time requirement of communication service with a station control layer is slightly low, the data flow is small, and the measurement and control system is used as a server end for the on-line communication. The model-driven interconnection framework describes the implementation method of the three functions.
As shown in fig. 1, the interconnection framework driven by the measurement and control system model is composed of four parts:
(1) the bottom communication protocol layer. The bottom layer protocol supports basic TCP/IP, UDP, CAN bus, FTP, HTM, Serial and Message services, and obtains parameters such as IP, mask, VLAN division and the like from the model to drive the basic network communication of the measurement and control system.
(2) And (4) a protocol layer. The protocol layer is the core of the interconnection framework and provides a communication interface and service, public data classes and information model files for the measurement and control system. The model file not only comprises basic communication parameters, communication connection relations and control block connection relations, but also comprises functional logic relations and functional judgment conditions, and all the capabilities which can be provided by the measurement and control system are described.
There are two types of model files associated with the instrumentation system: an ICD (IED Capability Description, ICD) file describing functions that a device can implement; the instantiated CID (Configured IED Description) file describes functions to be implemented after the device is Configured. The model file is a text in xml format, and the content covers the connection relationship, communication parameters, fixed values and logical relationship between the device and other equipment, as shown in fig. 2. And after the model file is downloaded to the measurement and control layer, the interconnection and intercommunication of the device, the process layer and the station control layer can be realized. The device firstly analyzes the model file, extracts the configuration information, the logic relation or the parameters, and respectively transmits the configuration information, the logic relation or the parameters to each functional module, thereby realizing the basic platform communication function, the message transmission function, the interlocking function and the function judgment function of the device. The model-driven schematic is shown in fig. 2.
When the measurement and control system function has deviation, the measurement and control system function can be correspondingly changed only by modifying the model file without modifying the device program, which is the highest level of model driving.
(3) And (5) a middleware layer. The middleware layer is an important part for realizing separation of device application services and platforms, and the mapping process from Platform Independent (PIM) to platform dependent (PSM) is completed by the middleware technology. The present invention employs two different middleware technologies, message middleware and CORBA (Common Object Request broker architecture, CORBA).
The message middleware adopts a publish/subscribe mode, is applied to the communication between the monitoring system and the process layer merging unit and the intelligent terminal, and meets the data transmission requirements of high real-time data requirement and large data volume.
And under the scene of communication with the station control layer, a three-layer communication structure of adding a CORBA middleware between the client and the server is adopted. CORBA middleware separates client and server programs, connected through an ORB (Object Request Broker), which acts as a software bus to connect different objects on the network. The measurement and control system is used as a server end communicated with the station control layer, and the logic node of the measurement and control system is used for providing self-description information for the client end of the station control layer; the client side of the station control layer activates a local proxy of the server side through an ORB mechanism of a CORBA middleware, the ORB mechanism receives a service request from a client side program and searches for a measurement and control device program through an object adapter to complete service, interaction between the CORBA middleware and other programs is supported through an interface described by an interface definition language IDL, the interface definition language IDL is used for defining an interface between the client side and the measurement and control device, the service defined by the IDL is realized in the measurement and control device, and the client side obtains information of the measurement and control device by using a dynamic call interface or an IDL root program.
The measurement and control system is used as a server end communicated with the station control layer, the logic node of the measurement and control system provides self-description information for the client end, the ORB provides addressing and distribution of objects for the client end, and the heterogeneous system access can be realized without additional processing conversion, so that seamless connection between heterogeneous systems is realized. The information model and the service model defined by IEC61850-7-2 can be mapped to CORBA one by one, described by IDL of CORBA. The IEC61850 defined request and the one-way request are served by an ORB proxy, and the GOOSE state change and SV sampling value event are served by a CORBA event service.
(4) And the functional layer consists of measurement, control, interlocking, alarm and metering functions. The functional layer is independent of the hardware platform and the bottom layer protocol, and each functional module extracts corresponding configuration information and parameters from the model and drives each module to run functionally. The measurement module extracts configuration information such as SV control block MAC address, VLAN division, sampling rate and the like; the control module extracts configuration information such as GOOSE control block MAC addresses and sending time intervals; and the measurement module share SV sampling value information and are used for finishing the calculation function of the electric energy.
MDA was proposed by international Object Management Group (OMG) in 2001, and is a method for designing and implementing an application system. The core idea of MDA is to abstract a Platform Independent Model (PIM) that is not related to implementation technology and is not related to a core Platform for describing service functions, then formulate a plurality of transformation rules for different implementation technologies, transform the PIM into a Platform dependent Model (PSM) that is related to a Specific implementation technology through the transformation rules and auxiliary tools, and finally transform the enriched PSM into a code. With PIM and PSM, MDA aims to separate business modeling and application logic from the underlying platform technology. The schematic diagram of the measurement and control system software platform is shown in fig. 3.
Example II,
The invention also provides a communication system of the measurement and control device, which comprises:
the downloading module is used for downloading a preset model file to the measurement and control device after instantiating the model file when the model drives the measurement and control device to work;
the analysis module is used for analyzing the instantiated model file by the measurement and control device;
and the transmission module is used for transmitting the analyzed data to each functional module according to the communication type.
The preset model file is an ICD file describing the functions which can be realized by the measurement and control device; and the instantiated model file is a CID which describes the functions to be realized after the measurement and control device is configured.
The analysis module further comprises:
the basic platform communication service submodule is used for acquiring parameters from the analyzed model file by the bottom protocol layer when the communication type is the basic platform communication service, and driving the basic platform communication of the measurement and control device according to the acquired parameters;
a process layer communication service sub-module, configured to, when the communication type is a process layer communication service, obtain a GOOSE and SV sampling value communication connection relationship from the parsed model file through a message middleware publish/subscribe mode;
and the station control layer communication service submodule is used for calling a required interface according to a service interface provided by the CID model by a client/server side mode of a CORBA middleware of a common object request agent system when the communication type is the station control layer communication service, and communicating with the station control layer client.
The basic platform communication service submodule comprises:
an obtaining unit, configured to obtain, by the bottom layer protocol layer, a parameter from the parsed model file;
the acquired parameters comprise:
the bottom layer protocol layer provides a TCP/IP protocol, a CAN bus protocol, an FTP text transmission protocol, a serial port protocol, an HTM webpage text and a message text protocol;
and acquiring parameters including IP address/MAC address, mask and VLAN division from the analyzed model file according to the protocol.
The CORBA middleware technology for the communication of the station control layer, provided by the invention, is a three-layer communication structure with the CORBA middleware added between a client and a server, a measurement and control system is used as the server for the communication with the station control layer, a logic node of the measurement and control system provides self-description information for the client, an ORB provides addressing and distribution of objects for the client, and the heterogeneous system can be accessed without additional processing conversion, so that the seamless connection between the heterogeneous systems is realized.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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.
Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can make modifications and equivalents to the embodiments of the present invention without departing from the spirit and scope of the present invention, which is set forth in the claims of the present application.