Research on Semantic Extension Method of Real-time Data for OPC UA

: With the continuous deepening of Industry 4.0, OPC Unified Architecture (OPC UA) will provide technical support for the system seamless integration. On the basic of the seamless integration of the intelligent manufacturing digital shop, the communication between the systems is not only the data transmission, but also the semantic information exchange. Two formats of UA data transmission are binary and XML. They do not have the semantic description capability and cannot fully satisfy the large-scale information sharing of multiple users or groups on the Web. In addition, the expression ability of XML for semantic modeling of complex objects is very limited and it is difficult to express conceptualized model of objects in the problem domain. This paper proposes the semantic extension method of real-time data for OPC UA, which can describe the dynamic data of OPC UA in real time based on Resource Description Framework (RDF) model and extend the data attributes by ontologies. Experimental results show that this method is feasible and effective. It enables the data information of OPC UA to have the ability to interact with more areas of knowledge and improve the ability of expressing data and application value, which lays the foundation for exchange and sharing of semantic-based information.


Introduction
With the continuous development of networked manufacturing, the control technology of industrial automation develops in the direction of intelligence, integration, and networking [1]. OPC UA has significant advantages in platform compatibility, interoperability, security, reliability, etc. These advantages will provide technical support for the seamless integration of systems and play an important role in laying the groundwork for industry 4.0-device interconnection [2]. OPC UA adopts the semantic-based and service-oriented architecture, which defines modeling rules of information simulation and communication service. OPC UA is naturally suitable for the integration and interoperability of the Internet in Intelligent Manufacturing Digital Workshop [3]. Intelligent Manufacturing requires networking at each levels of the Digital Workshop to achieve interoperability and exchange information from the device layer to the control layer and management network so that it can achieve the vertical integration for the shop floor of Intelligent Manufacturing Digitalization. This requirement of communication is not just the simple data transmission, but the information exchange based on semantic. In the data transmission process, OPC UA defines two data encoding types, which are XML and binary. However, these two data types do not have semantic description capability and cannot further improve the automation of data exchange; The expression ability of XML for semantic modeling of complex objects is very limited and it is difficult to express conceptualized model of objects in the problem domain [4].
In response to the above issues, [5] proposed a semantic metadata tagging method for sensing data, endowing the metadata of time, space and theme based on SWE, which enriches the meaning of the sensed data and improves the interoperability of SSW. However, this method only mentions temporal data and subject attributes of sensing data, which lacks other rich semantic attributes. And the correlation between perceptual data and perceptual data and domain ontology knowledge; [6] introduced the semantic mapping of XML based on the definition of semantic mapping concepts from the aspects of structure-based and ontology-based and solved the problem of heterogeneity of XML data following from the three semantic mapping problems about grammar, structure, and semantics. However, this method only analyzes structure and ontology that remains at the concept level and not gives the actual semantic mapping method. [7] puts forward a method of data attribute tagging based on Semantic Web technology in Internet of Things and semantically describes the data attributes through the hierarchical ontology architecture, finally achieve the expansion of data attributes through the inference technology but not gives the specific method of implementation for the data attribute extension. The above literatures are restricted to the description of static attributes and characteristics of binary and XML. They does not take into account the issues of data dynamic attributes and the real-time description of dynamic data and semantic extension methods. Therefore, this paper presents the semantic extension method of real-time data for OPC UA, that describes the dynamic data of OPC UA in real time based on RDF model and extends the data attributes through ontology technology.

OPC UA Technology
The OPC Foundation released the specification of OPC UA in 2006. OPC UA is a service-oriented platform which and provides a consistent and complete address space and service model and two types of message encoding in XML text and binary format. Not only that, it can supports multiple transmission protocols and improves communication performance. It also proposes a standard security model and does not depend on any specific operating platform. The purpose of OPC UA is to make industrial communications more standardized [8]. It is based on the client and server structure. The server is used to store data that is modeled in the object-oriented manner. OPC UA allows access to various data and vertical and horizontal information exchange in the multi-functional client and server environment. Data exchange is not limited by the vendor's communication protocol and data can be transmitted at different levels in the company.

Resource Description Framework
Resource Description Framework (RDF) is a standard model for data exchange on the Semantic Web [9]. It is used to describe the standard of resource metadata on the World Wide Web. RDF uses a simple model to represent any type of data, whose type consists of a marked connection arc between nodes and nodes in order to conveniently describe the objects (or resources) and the relationships between them. The data model of RDF is essentially the expression of a kind of binary relationship, so the model can be used as a basic model for any other complex relational model. RDF expresses the attributes and relational information of resources on the semantic level and it is the basis for the realization of heterogeneous resource interaction and data sharing. While providing a simple machine understandable semantic model, RDF (Schema) provides modeling foundations for Ontology languages such as OIL (Ontology Interchange Language) and OWL (Web Ontology Language), and makes RDF-based applications conveniently merge with ontologies generated by Ontology languages. This feature of RDF makes RDF-based semantic description results have the ability to interact with more domain knowledge.

Ontology
Ontology is the core of Semantic Web technology, which used to describe a set of terms in a domain. Its organizational structure is hierarchical, and it can be used as the skeleton and foundation of a knowledge base. The ontology hierarchy is divided into three layers [7]. Layer1 contains all domain terms in a specific domain and defines all the vocabularies used in the domain ontology, which is the basis for achieving cross-domain ontology alignment and information integration; Layer2 conceptually abstracts and categorizes data attributes and attribute relationships based on domain terms, and it builds abstract models of data attributes and attribute relationships; Layer3 does an instantiation of specific data attributes based on the abstract model. The ontology library model has four basic components [10], which include Class, Instance, Attribute and Relation.

Reasoning
Reasoning is another important content of Semantic Web technology and it is a way to mine the relationship between implicit knowledge and discovery resources in ontology. It is also the basis for semantic expansion in this paper. Reasoning is divided into forward reasoning and reverse reasoning. It is based on some well-established rules and relationships. New statements are dynamically generated from the existing statements, and the ontology library knowledge is constantly enriched to ensure the completeness of the ontology database and the efficiency of accessing queries, and to expand the expression capabilities that are not supported by the ontology.
There are two main methods for implementing ontology reasoning in the current Semantic Web technology field [11].
1) Reasoning methods based on traditional description logic, (such as Pellet, Racer and FaCT++), which are all based on the traditional Tableau algorithm. At the same time, they also introduce many Tableau algorithm optimization techniques, which makes reasoning efficiency higher.
2) Rule-based reasoning methods, (such as Jess and Jena2), in which, the reasoning is done by mapping ontology reasoning as a class of applications into the rule inference engines.

Overall Framework
This paper presents a semantic extension method of real-time data for OPC UA. Based on the RDF model, the OPC UA dynamic data is described in real time and semantically extended by the ontology technology. The overall framework of the method is shown in Fig. 1 Fig. 1 Overall framework 1) Information acquisition. The OPC UA server integrates different systems into the address space.
The information model of the address space provides the data information of related nodes. In this stage, the real-time data and information of relevant nodes can be obtained according to the specific application requirements in application development, which provides data support for the next stage based on the RDF model description. 2) Semantic description based on RDF model. RDF describes data semantics in a modeling manner and expresses attributes and relationship information of resources on the semantic level. OPC UA models by using rule of semantic-based information model, so the data in the OPC UA information model already has a semantic category and there is no need to decompose the attribute metadata associated with the data in the ontology. In this stage, the real-time data and relevant information of the acquisition node are described in real time based on the RDF model. RDF provides the modeling basis for a domain-based ontology language and lays the foundation for ontology-based semantic extension in the next phase. 3) Ontology-based semantic extension. Semantic extension is based on the relationship between domain ontology resources. On the basis of existing attributes of data, inference engine deduces new data attributes. It gives OPC UA real-time data richer concept attribute meanings and extends the data attributes in order to meet the requirements of data processing for specific applications. In this stage, the effective combination of RDF model data and ontology not only extends the data attributes, but also provides semantic data support for the next semantic operations and data analysis.

Semantic Description Based on RDF Model
The semantic description is based on the RDF model to describe the real-time data and related information obtained by the OPC UA server and to express the attributes and relationship information between resources. The richer the data attributes, the stronger the data expression ability and the greater the data value. Because OPC UA models by adopting semantic-based information model rule, the data in the OPC UA information model already has a semantic category. It does not need to decompose metadata-related metadata in the ontology, which effectively reduces the semantic description time. In order to make OPC UA data have semantic description ability, this paper defines a semantic representation model of data information for OPC UA, (Data Information Semantic Representation, DISR) =(ServerId, NodeId, DisplayName, DataType, Value, Time, StatusCode). The model can describe the semantics of OPC UA dynamic data and its node information. The elements in the model can be purposefully represented according to the specific application requirements. The following are the elements of the DISR model.  ServerId: It indicates the ID number of the server where the node is located. In the case of connecting multiple servers, it is the only flag assigned by the system server. According to the ServerId, the only server in the system can be identified.  NodeId: It refers to the node ID number in the server's address space, which is the unique identifier assigned by the system node. In the light of the NodeId, the only node in the server address space can be identified.  DisplayName: It represents the node name in the server's address space.  DataType: It indicates the data type generated by the node in the server address space.  Value: It represents the data value generated by the node in the server address space.  Time: It refers to the time of data generated by node in the server address space.  StatusCode: It indicates the status information of data generated by node in the server address space. The core of data semantics is the interpretation of data attributes. Data attributes are classified into static attributes and dynamic attributes. Static attributes (such as NodeId of nodes and DisplayName of nodes) do not change in real-time with continuously collected data; Dynamic attributes (such as Time of data and StatusCode of data) are in real time with continuously collected data.

Ontology-based Semantic Extension
Semantic extension is based on the relationship of domain ontology resource. Based on the existing attributes of data, the inference engine derives new data attributes and extends the data attributes. Resource relationship is a kind of relationship formed by the resource based on a certain characteristic or a certain factor. It mainly includes the following relationships:  Simple relationship: It represents relationship about close degree between resources.  Logical relationship: It is the relationship of causal derivation order between resources.  Association relationship: It indicates that there is a certain regular relationship between the values of resources.  Timing relationship: It indicates whether the resources have occurred together within a certain period of time.  Dependency relationship: It represents the existence of related relationships between resources.

Fig. 2 Ontology triple map
The domain ontology contains the concept vocabulary of the specific domain and the collection of data attributes and attribute relationships. Fig. 2 shows the domain ontology building for a device type in this paper. The process of ontology-based semantic extension is shown in Fig. 3. Firstly, the resources and relationship information of the domain ontology and the semantically descriptive RDF semantic data resources in Section 3.2 are analyzed and compared in order to obtain a relationship between the two. Secondly, use the reasoning engine to infer the resource relationship. Finally, deduce the attribute information lacking in the DISR model and give the OPC UA real-time data a richer concept attribute meaning to extend the RDF data attributes.

Experimental Environment
Experiments use Java language, Eclipse4.5.1 programming environment and experimental system hardware adopts Intel (R) Core (TM) i5-4590 processor, 3.30GHz frequency CPU, 8G of memory, 500GB hard drive and Window7 operating system. The software used for the experiment and its functions are shown in Table 1.

Fig. 4 RDF model description of temperature data
This paper uses the real-time temperature data and related information of the intelligent building AirConditioner_1 in the OPC UA address space as an example to describe the semantics based on the RDF model. The result of the description is shown in Fig. 4. The connecting lines of seven colors in the figure represent the seven attribute relationships of the DISR model.
The RDF semantic data generated in this paper is stored into the AllegroGraph database. RDF is a data model without standard serialization and can be serialized into many forms including RDF-XML, n3, Turtle, etc. The method of using Turtle to describe the temperature real-time data information in the above example is as follows.

Ontology-based Semantic Extension Verification
After the semantic description based on the RDF model, Taking advantage of the relationship between ontology resources (OWL: sameAs, simple relationship), the semantic extension is based on ontology, The extended triplet example is shown in Fig. 6. The left half of the figure represents the triplet instance graph of domain ontology and the right half represents the RDF model instance of OPC UA real-time data. The red dotted line indicates the resource relationship between RDF model data and the ontology triplet. Analyzing the experimental verification results, it can be seen that the method implements data attribute extension based on ontology; The SPARQL queries are used to compare the number of attributes before and after semantic expansion. The query results show that this method effectively expands the attributes in the DISR model and extends the dynamic data attributes of OPC UA. Therefore, the ontology-based semantic extension method is feasible and effective.

Conclusion
This paper proposes a semantic extension method of real-time data for OPC UA. Based on RDF model, it describes the dynamic data of OPC UA in real time and extends the data attributes through ontology. Using RDF to construct a data model for OPC UA data attributes, this model gives clear and unified semantic description for data attributes and then uses ontology to extend attributes, finally gives the data a conceptual attribute meaning. The experimental test proves that the method has validity and feasibility. In the process of data invocation, through the real-time description and semantic extension of data, the data is given more abundant attribute meanings, and the expression ability and use value of the data are improved. On the other hand, it promotes the in-depth understanding of the data and more intelligent processing in different system integration. In addition, this article uses the semantic graph database for the storage of RDF. The RDF storage design of relational database and graph database needs to be further studied.