# Application of Rough Concept Lattice Model in Construction of Ontology and Semantic Annotation in Semantic Web of Things

Authors: Hongsheng Xu; Huijuan Sun
Journal: Scientific Programming
 (2022)

---

## Abstract

In order to solve the problem of interoperability in Internet of Things, the Semantic Web technology is introduced into the Internet of Things to form Semantic Web of Things. Ontology construction is the core of Semantic Web of Things. Firstly, this paper analyzes the shortcomings of ontology construction methods in the Semantic Web of Things. Then, this paper proposes construction of semantic ontology based on improved rough concept lattice, which provides theoretical basis for semantic annotation of the sensing data attributes. In addition, this paper describes the semantic annotation system for the Internet of Things based on semantic similarity of ontology. The system consists of three steps: ontology mapping integration module, information extraction module, and semantic annotation of sensing data. Finally, the experimental results show that this semantic annotation method effectively improves the flexibility of sensor information and data attributes and effectively enhances the expression ability of sensor information and the use value of data.


---

## Body

## 1. Introduction

In recent years, data in the Internet of Things exist in a heterogeneous and decentralized structure. In order to solve the problems of interoperability and intelligence in the Internet of Things system, Semantic Web technology is introduced into the Internet of Things, forming the Semantic Web of Things. However, the diversity of objects and the limitedness of subjects constitute the inherent contradiction of the Internet of Things. In order to solve these defects, the semantic annotation method based on ontology is introduced. This novel method enables web services, agents, and machines to understand sensory information. In a word, this approach can substantially improve the function of the Internet of Things.With the development of the Internet of Things technology, the information collected by the Internet of Things presents the characteristics of mass, heterogeneity, and diversity. Perception data in wireless sensors are not only heterogeneous in location, structure, and routing protocol but also diverse in data format, storage method, and attribute description [1]. This heterogeneity mainly hinders the integration and fusion of data among different domains and also increases the difficulty of data processing and application development among cross-regions. Finally, it is difficult to realize the interaction and collaboration of resources and data.As the foundation of Semantic Web of Things, construction of sensor ontology has become the key to research. Sensor ontology can add semantics to raw sensor data, enrich sensor information, and enable machines to understand the meaning of sensor data and make intelligent decisions. Therefore, ontology construction is the core work in Semantic Web of Things. Also, ontology is the basis of semantic annotation in Semantic Web of Things.Semantic annotation is to provide additional descriptive information to a resource and then find (potential) similarities between ontologies. Using ontology mapping technology mainly calculates the similarity between two ontology element pairs, and the similarity between elements is related to ontology definition, ontology instance, and ontology rules or constraints. Finally, the state of the sensor and the changing trend of the state can be reflected in detail and accurately [2]. The authors have organized and developed the SSN ontology for the heterogeneity of the current device. Here, the semantic description of the sensing device improves the interoperability between the sensing devices at the semantic level [3]. The authors propose a service-oriented sensor ontology while simultaneously describing an adaptive sensor network based on ontology [4]. The traditional concept lattice construction method based on rough set is not suitable for construction ontologies [5].The Semantic Web of Things system is divided into three layers: perception layer, network layer, and application layer. The research contents of perception layer semantic interoperability mainly include construction of the core ontology in the Semantic Web of Things, establishment of semantic middleware, and the semantic annotation of sensory collected information. The research contents of network layer semantic interoperability mainly include composition of semantic sensor web, the network transmission based on ubiquitous web, and application of Semantic Web technology [6]. The research contents of application layer semantic interoperability mainly include combined application of ontology, semantic combination of sensor data, semantic reasoning of information, and semantic analysis of information.These ontologies lack descriptions of implicit concepts, specific system characteristics, and emerging concepts in the domain. At the same time, these ontologies cannot be directly used in specific Internet of Things systems. Therefore, studying the automatic construction technology of sensor ontology is an important task of this paper. The paper proposes building ontology of Semantic Web of Things based on the improved rough concept lattice model.In order to effectively improve the flexibility of attribute description in perception information and enhance the sensor analysis capability and use value of collected information, this paper proposes an automatic annotation method for sensor data based on ontology technology. This method can accurately reflect the location and state changes of sensing entities and promote the realization of cross-domain heterogeneous resource interaction and data sharing in Semantic Web of Things. The semantic description of the sensing information attributes is made explicit and unified by the sensor ontology. The rough concept lattice isomorphism model is used to construct the semantic ontology architecture of the sensing data. The hierarchy analysis of ontology semantics is carried out based on concept lattice and variable precision rough sets, and finally the semantic annotation framework in the Semantic Web of Things is formed. Finally, it is proved by experiments that this semantic annotation method effectively improves the flexibility of sensing information and data attributes and effectively enhances the expressive ability of sensing information and the use value of data.


## 2. Using Semantic Rough Concept Lattice Model to Building Ontology of Semantic Web of Things

With the development of Semantic Web technology, it provides a better solution to the Internet of Things problem. As the core of the Semantic Web, ontology is an explicit specification of a conceptual model. The goal of an ontology is to describe related domain knowledge, provide a common unambiguous understanding of the domain knowledge, and formally give a clear definition of the interrelationships between concepts. Ontology provides support for the massive and heterogeneous resource search and development of the Semantics Web of Things.At present, the most famous construction of the sensor ontology is that the World Wide Web Consortium has developed the SSN-XG project [7]. Generic sensor ontology (SSN) describes sensors and observations in terms of capabilities, measurement processes, observations, and distributions. This ontology is used to add some semantic information to sensor data and to find information related to sensor data. The sensor ontology is built based on the general sensor ontology and can annotate the sensor data in JSON format. Ontology also has some specific concepts that can improve the adaptability of the system. The ontology is mainly a description of the sensor system, sensor components, and observation process.Definition 1.
Domain knowledge space: ontologyO is defined as two tuple <B, R>, where B is the concept set in the domain O and R is the relationship set of the concepts in the domain space. Class: a description of objects with common attributes and features. Class example is the description of the class, a is for the class, and b is an example of B recorded as shown by(1)B=B−ai.
Ontology mainly includes the contents of concepts, attributes, instances, and axioms, with four tupleO = (C, R, I, P), where C is set of concepts or classes (it is used to describe resources abstracted and classified); R represents a collection of relations between concepts (it is used to describe the various relationships between concepts, including the hierarchical relationship, logical relationship, relational operations, and dependence); I denotes the set of the concept instance; and P is used to describe the specific object and individual. A representation of the axiom set is used to describe a tautology proposition by efficient and consistent detection.Definition 2.
(see [8]). HTC is a partially ordered set (x, y), where C is a finite set of concepts, and it is a partial order on H. General relation is a generalized relations describing the concept of the relationship between the father and the son, equivalent to the subclass of relationship. Senior parent object with low subobject features is shown by equation (2), and subobjects inherit all the attributes and characteristics of the parent object.(2)b∗=y11−αijC−∑i=1Pyiαi∗Kxi,xj.
The ontology development process is divided into the following stages: (1) specification; (2) recognition ontology development; (3) predetermined user; (4) application environment; (5) formal; and (6) description scope. Ontology describes the scope including the vocabulary, characteristics, and granularity.Theorem 1.
The intersection between the direct subclasses of the class is null. That is,Cl, C2 are C direct subclasses, and suppose C2 is up to C1. The disjoint principle of subclass guarantees that a subclass is a disjoint decomposition of the superclass.
Ontology is constructed by ontology mapping. The mapping between ontologies is realized by two kinds of mapping functions: one is that the mapping does not change the concept of the ontology; the other is that the mapping changes the concept of the ontology and explains the change.
Perception data are heterogeneous not only in attributes and communication protocols but also in terms of data format and attribute description. Due to the lack of a certain structure, it is necessary for machines to automatically understand unstructured data and extract the required knowledge from it. It must be preprocessed using natural language processing (NLP) techniques. This paper mainly uses formal concept analysis technique to construct the sensor ontology from the unstructured data.
If a decision tableS = (U, A, V, f), A = C ∪ D is a set of attributes, V is a collection of attribute values, f is the information function, and D = {d1, d2, …, Dn}, then the decision table can be decomposed into n different decision-making single decision table {S1, S2, …, Sn}, in which, Si=(U,Ai,Vi,fi) is the domain table, U is the discourse domain, Ai=C ∪ {di} is the attribute set, V is the set of attribute values, respectively, C is called the condition attribute set, and {di} is the decision attribute set..Theorem 2.
Given decision tableS=U,C∪D,V,f, β=βXi,Yj|0<i≤U/C,0<j≤U/D,βXi,Yj>0.5, if only one repeated element in β is retained and arranged in ascending order as β  = {β1, β2,…, βk}, 1≤k≤U/C∗U/D, so γC,D,β1 > γC,D,β2 >....> γC,D,βk [5].
Therefore, the concept lattice method can help to construct ontology, which provides a way to guide the construction of ontology.
Concept lattice and variable precision rough set theory are closely linked; the rough set theory and concept lattice are combined into a rough concept lattice model, and it first analyzes the relationship between rough set and concept lattice. In this paper, the reduction idea ofβ-upper and lower distributions in variable precision rough sets is applied to the reduction of formal context. Therefore, this paper proposes a concept lattice construction model based on variable precision rough set. Firstly, the definition of positive and negative fields between attribute sets is improved, and the variable precision rough set model is expanded according to the idea of maximum intersection. Then, this paper combines the β value selection method to improve the approximate knowledge reduction algorithm based on variable precision rough set theory.
The concept lattice construction algorithm is combined with the improved rule acquisition algorithm of variable precision rough set, and the final construction algorithm of semantic rough concept lattice is as follows.
Algorithm 1: Construction algorithm of concept lattice based on semantic variable precision rough set.
Input: decision tableS=(U, C ∪ D), from the data sheet of the new lattice nodes, and update the lattice nodes.Output: the updatedL and context (X, {x∗}, D, R) rough concept lattice semantic structure.Step 1: variable precision can be identified by the definition of matrix calculation information decision systemC, DS = <U, D, V, f>, the formation of a recognizable matrix M = [mij].Step 2: execution of all the condition attributes in the decision table: ifγβC,D=γβC−ai,D, then B=B−ai;Step 3: for (k = 1; k ≤ n; k++) USCk = { dk };Step 4: add a new lattice nodeC new= (Extent (C1), {x∗});Step 5: attribute{cj}(j = 1, 2, …, |C|), added to the attribute set, that is, R1 = {cj};Step 6: simplified discernible matrix. The parameters of the simplified discernible matrix includeRi, △γP∪Cβ, cj. Ri=Ri−1∪cj⟶min△γP∪CβRi−1∪cj,D,cj∈C−Ri;Step 7: take out all the updated lattice nodes, and according to the contents of the elements number from small to large order, return to the collection COLL3;Step 8: calculate and arrange the attribute setP, in order to add the reduction set. Go to step 5;Step 9: [IsXj∩Y/Xj>1−β]; if yes, then Xj∪R⟶R; otherwise, go to step 6 to check the next Xj;Step 10: findCk subnode set CHD (Ck), according to the number of elements from small to large order;Step 11: for (Cp ∈ CHD (Ck))[Increase] Seti = i + 1, j⟵1, go to step 2;Step 12: final reduction of outputL;
Then, this paper uses variable precision rough sets to reduce the formal context by selecting appropriateβ values, in order to reduce redundant objects and noise. Based on the reduced formal context, the sensor ontology is constructed by using the rough concept lattice technique [9].
The ontology model constructed by using the improved rough concept lattice is mainly embodied in the concept of hierarchy.Definition 3.
For two ontology sequencesm, s1 = <a1…Ar> and mk, s2 = <m1…mk>, if there is a function, j1 < j2 < …V < jr-1 < jr, making j1, A1, a1, …, AR, MJR, then S1 is called sub ontology of S2, or called S2 contains S1, and both S2 and S1 are in the same ontology, abbreviated as is shown by equation (3) [3].(3)m¯=1N∑k=1Nmk,S1=1N∑k=1Nmk−m¯k2.
Construction of domain ontology includes 7 steps. The first step is to determine the professional field and category of the ontology. The second step is to examine the possibility of reusing existing ontology. The third step is to list the important terms in the ontology. The fourth step is to define the class and the class hierarchy. The fifth step is to define the properties of the class. The sixth step is to define the facets of the attribute. The seventh step is to create an instance.
The construction steps of domain ontology in Semantic Web are as follows:(1)
Start with an empty resource and identity data collection.(2)
Add the equipment and identification data to the formal context as needed.(3)
Construct the rough concept lattice corresponding to the formal context.(4)
Edit directly according to the needs of the ontology.(5)
Edit the ontology prompted by the program.(6)
RFCA can generate new objects, which are directly composed of attributes.(7)
The whole process can be repeated continuously until the sensor ontology in OWL format is finally output.


### 2.1. The Construction Strategy of Sensor Ontology Based on Rough Concept Lattice Model

Step 1: convert the sensor-perceived data and the sensor’s own identification into two-dimensional text information according to the principle of RFID.Step 2: form context is extracted from unstructured text information. Due to the lack of a certain structure, the natural language processing technology is used to automatically understand and extract the required knowledge tuples, and the concept lattice formalization technology is used to preprocess them.Step 3: the formal context is reduced by using the rough concept lattice model, and the redundant objects and noise are reduced by selecting appropriate thresholds. Aiming at the reduced formal context, the rough concept lattice model is used to construct the unit ontology, and finally the domain sensor ontology is generated according to the top-level SSN ontology.This paper uses the improved rough concept lattice method to generate sensor ontology. Combined with expert knowledge of Internet of Things, the domain sensor ontology is extracted and generated semi-automatically through the top-level SSN ontology.The core idea of improving rough concept lattice model is to first preprocess the formal context of the domain. Then, the strong ability of variable precision rough set in terms of attribute reduction is used for the reduction of the concept lattice. The number of nodes of construction concept lattice is greatly reduced, and the system robustness and noise resistance are effectively enhanced.


## 2.1. The Construction Strategy of Sensor Ontology Based on Rough Concept Lattice Model

Step 1: convert the sensor-perceived data and the sensor’s own identification into two-dimensional text information according to the principle of RFID.Step 2: form context is extracted from unstructured text information. Due to the lack of a certain structure, the natural language processing technology is used to automatically understand and extract the required knowledge tuples, and the concept lattice formalization technology is used to preprocess them.Step 3: the formal context is reduced by using the rough concept lattice model, and the redundant objects and noise are reduced by selecting appropriate thresholds. Aiming at the reduced formal context, the rough concept lattice model is used to construct the unit ontology, and finally the domain sensor ontology is generated according to the top-level SSN ontology.This paper uses the improved rough concept lattice method to generate sensor ontology. Combined with expert knowledge of Internet of Things, the domain sensor ontology is extracted and generated semi-automatically through the top-level SSN ontology.The core idea of improving rough concept lattice model is to first preprocess the formal context of the domain. Then, the strong ability of variable precision rough set in terms of attribute reduction is used for the reduction of the concept lattice. The number of nodes of construction concept lattice is greatly reduced, and the system robustness and noise resistance are effectively enhanced.


## 3. Novel Model of Semantic Annotation in Semantic Web of Things

With development and application of Semantic Web technology, it provides a better solution to the problem of semantic annotation. Semantic annotation is a key technology to solve the information interaction between heterogeneous and distributed ontologies. Semantic annotation will be built on countless small ontologies, and a large number of small ontologies are usually heterogeneous. This will result in frequent operations for heterogeneous ontologies in the process of using semantic information. Semantic annotation technology can promote the realization of cross-domain heterogeneous resource interaction and collaboration in Internet of Things [10].With the usual semantic annotation system, construction of ontology is also included in the system. By using rule template and clustering methods from text, ontology construction can produce the clustering results as a concept and relationship advice provided to experts in the field.Semantic perception layer is semantic interoperability; semantic ontology in W3C has been created not only for the sensor itself but also for providing a structured descriptive information for sensor measurements. It can eliminate the heterogeneity of devices. Semantic ontology for the emergence of new equipment is described by the RFID label. A shared ontology is to realize the semantic multi-domain ontology interoperability; although the shared ontology can contain multiple fields, the storage and management of large ontology are difficult [11]. Sensor data are annotated in LOD application, and it is the field of intelligent ontology, as is shown by the following equation [12]:(4)L=∑i∑jnpij=0p00+1p01+1p10+2p11+2pb1=4ρ+5ρ2H.In order to accurately and reasonably find similar concepts during semantic annotation, it is necessary to study the calculation method of similarity [13]. In the field of cognitive psychology, similarity is the psychological proximity between two or more mental representations. In practical applications, it is often necessary to give the degree of similarity between terms, vocabulary, and concepts from a quantitative point of view. Semantic similarity is a similarity indicator by using a quantitative representation. In recent years, scholars have proposed methods for calculating concept similarity from different theoretical perspectives. The information-based method is based on information theory and describes the similarity between concepts by calculating the information content (IC) of shared information between concepts. The method is divided into corpus-based method and ontology internal feature-based method according to the knowledge source.The former calculates the IC value by calculating the probability that two concepts occur simultaneously in the corpus. But this method relies on a highly annotated corpus, which is difficult to obtain. In order to find similar concepts accurately and quickly during semantic annotation, feature-based methods and information-based methods are combined to extract features from the classification structure of ontology. This paper proposes an efficient, simple, and reliable method for calculating semantic similarity. This method can be used in single-ontology and multi-ontology contexts and is a context-sensitive semantic similarity calculation method. Let sceneK = (Cint, R), and the scene-related feature set of concept c is defined as(5)DHA,B=maxsupx∈Ainfy∈Bdx,y,supy∈Binfx∈Adx,y.Definition 4.
Ifβ is a posit, B, C, and D are elements in M. Then, the set [b, C]: C = {X in M |b, x} is defined by interval, and set a = {X in M |x called ideal, principal ideal, ensemble β}, β  = {x = epsilon m |x said principal filter}. Also, P < C and [P, C] = {P, C}, as shown by(6)βP∪C:β1,1P∪C,β1,2P∪C,β2,1P∪C,β2,2P∪C,…,ββP∪C,1P∪C,ββP∪C,2P∪C.Definition 5.
The classification feature set of conceptc in ontology O = <C, R> is defined as x≤y⇐φx≤φy, O (c) = {c |c ∈ P, P ∈ hype_paths(c)}.Definition 6.
From the viewpoint of ontologiesP1, P2, …, Pn, the steps to get the middle layer of Pn are as follows: on the P1, P2, …, Pn in the ontology, the operation of the middle layer to operate the ontology map ρ, and the P1, P2, …, In, …, Pn, the relationship between the concepts of the heuristic rules is added to the x≤y⇐φx≤φy, as shown by(7)p0=1+ρ1!+ρ22!+⋯+ρkk!+⋯ρnn!−1.
The similarity calculation problem based on semantic features and information content in the Semantic Web of Things is as follows. (1) How to organically combine feature-based methods and information-based methods to construct a composite similarity algorithm. (2) Research how to extract low-cost ontology classification structures as attribute feature sets. (3) Using the information content of concepts in the ontology to assign weights to features, how to solve the problem of inconsistent granularity between ontologies.Definition 7.
(see [4]). On the basis of the sensor model in Internet of Things, the support of the jump edge is increased. Given observation data sequence (X1, X2,..., Xn) is shown by equation (8), R stands for relationship between sequence R (R1, R2, …, RN). Let β (t) = b (t), and X (t) is defined by a set of transfer characteristics (y, y, x) = {fm (I, Yi, yi−1, x)} and bi (t) defines a set of state features H (Y in X) = {(I, Yi, x)}.(8)x01t=1−c1tf1t,x11t+1=β1t∑i=i1i2bi1t∗xi1t,xi+11t+1=1−di1txi1t.
Aiming at the semantic annotation method of sensor data attributes in the Internet of Things, a data attribute annotation method based on Semantic Web technology is mainly proposed. By semantically describing the data attributes in the hierarchical structure of ontology, the data attributes are extracted from the relational database, so that the data attributes exist independently of specific applications.


## 4. Methods of Ontology Construction and Semantic Annotation in Semantic Web of Things by Semantic Rough Concept Lattice Model

This paper mainly studies the ontology construction, semantic annotation, and semantic similarity calculation in the Semantic Web of Things. This paper explores the automatic construction of sensor ontology in Semantic Web of Things. Due to the large amount and complexity of sensor information, this paper performs semantic annotation and classification analysis on sensor data.Semantic similarity calculation methods based on ontology are analyzed and improved in Semantic Web of Things. It is very necessary to explore a similarity calculation method based on features in Internet of Things [15].This paper first perceives and acquires a large amount of raw data and then constructs data resources with semantic structure information. Also, rule base in the perception layer is generated. The function of extracting named entities is completed from the input sensor information resources. Semantic annotation of sensor sampling is carried out by using the semantic construction hierarchy analysis of sensor ontology. The sensor data are semantically annotated by adopting the ontology segment with the highest correlation based on features and information content.Based on this, this paper proposes a rough concept lattice model to solve the problem:(A)
Preprocess sensing information sources in the Internet of Things and extract knowledge tuples from sensing information sources.(B)
Calculate the semantic similarity of concepts and relationships in the knowledge tuple set, merge similar concepts, and use the rough concept lattice model to generate an initialization ontology.(C)
According to the top-level SSN ontology, the sensing concept, importance relationship, and Boolean relations in the ontology are initialized to form hierarchical sensor ontology.In this paper, the TF∗IDF method in probability statistics is used to obtain symbolic data representing equipment and resources. The specific method is calculating the frequency of the concept vocabulary in the RFID tag of the device. If the frequency is greater than 10 percent of the specified threshold, it is taken as the data in the device. Then, for the found conceptual data, a binary relation table of resources and identifiers is formed in combination with the corresponding resource sets. The concept node in it should be an important vocabulary that can represent the sensory information. The correlation between the concepts in the ontology is calculated according to the following method, so as to express the strong and weak relationship between the concepts, as is shown by equation (9). Equation (9) describes the degree of association between two words and its directionality.(9)fjk=relevancyTj,Tk=∑i=1ndijk∑i=1ndij×weighting factorTk.


### 4.1. Ontology Construction Model in Semantic Web of Things

A detailed description of the technical route for the construction of sensor ontology is as follows.


#### 4.1.1. Extraction of Semantic Information Context

This paper discusses construction strategy of sensor ontology based on rough concept lattice model by combining the characteristics of sensor information in the Semantic Web of Things. This provides a solution for the automatic construction of ontology in Semantic Web of Things. This paper firstly uses natural language understanding and RDF technology to preprocess the collected sensor data and RFID tags. In this way, knowledge tuples of resources and devices are obtained.Theorem 3.
For decision tableS = (U, C, D, f), based on the condition of dividing the mind: U/RC = {X1, X2, Xn}, and based on split decision remember U/RD = {D1, D2, DM}, an information matrix of sensor ontology is shown by.(10)ucβ=∑i=1nTiβU,KXi=maxj≤mDDjXi.
In the research on construction of sensor ontology in Semantic Web of Things, it is time-consuming and error-prone to manually construct ontology. In this paper, the improved rough concept lattice model is used to construct the sensor ontology. Therefore, it mainly reflects the hierarchical structure between sensing concepts. By calculating the TF∗IDF value of each word, words with a high relevance to the sensing resources can be screened out. Usually, the last ten percent of words are deleted and the calculation is repeated until the set minimum number of words. Finally, a vocabulary set is formed.


#### 4.1.2. Construction of Sensor Ontology Based on the Improved Rough Concept Lattice Model

(1) Improved Concept Lattice Model. In this paper, an improved upper and lower distribution attribute reduction algorithm based on variable precision rough sets is used to reduce the formal context [16]. By improving the method of calculating identifiable matrices, the algorithm is suitable for both compatible decision tables and incompatible decision tables. On the basis of not changing the lattice structure, the number of objects and attributes is reduced, the time complexity of constructing the concept lattice is reduced, and its covering ability and generalization ability are increased.(2) Using the Improved Rough Concept Lattice Model to Generate the Unit Ontology. By choosing appropriate β values, the formal context is reduced by using variable precision rough sets. The purpose is to reduce unwanted objects and noise. Aiming at the reduced formal context, the rough concept lattice technique is used to construct the unit ontology. The specific method of constructing ontology with RFCA is as follows:Step 1: calculateC1:=A1,B1∈ϖK1, C2:=A2,B2∈ϖK2, φC1=φC2⇒C1=C2.Step 2: equivalence classXi = U|Ci (i = 1, 2, …, n); for each condition attribute, calculate the value of β (β ∈ (0.5, C]) to approximate quality of classification β in Y = U|D (i = 1, 2, …, N).Step 3: when the current isy and the current sequence position is i, the proposed algorithm can obtain the optimal tag sequence of the current location, and j is not normalized probability value. Its recursive form is as follows:(11)dij=tfij×log10Ndfj×wj.Step 4: theN (N-gram) method is applied to segment of the sentence, and the sentence is approximately matched with the words in the annotation vocabulary list. When the match is successful, annotate the corresponding type and adjust the result of the sentence segmentation to ensure that the word has been annotated by the type of the word..Step 5: If (i==n) set |L|/|U|⟶ v ;then the algorithm is completed by the measure of classification quality;else go to Step 4;Step 6: RFCA can generate new objects, which are directly made up of properties.Step 7: while ||Lk|| > 1 do Lk+1: = ∅;Step 8: the whole process can be repeated until the designer is satisfied.Finally, the rough concept lattice is converted into the corresponding sensor ontology. The method here is to use the partial order method to represent the formed formal concept with resource attributes. Also, we only make the attribute appear once in the concept lattice when we annotate it. The key elements described by the sensor ontology are device attributes and the relationship between attributes. In this way, the sensor ontology is constructed.


#### 4.1.3. Mapping of Ontology in the Semantic Web of Things

The concept lattice and variable precision rough set theory are used in the process of ontology mapping. This model comprehensively considers the multi-strategy model of feature information and structural information and constitutes a multi-strategy ontology mapping model. With the help of WordNet, the calculation method of concept similarity is adopted to calculate the similarity of attribute concepts between ontologies. Finally, the attribute mapping set of the unit ontology is obtained.In order to get the data in Internet of Things, a network model of concept correlation is usually established [17]. At the same time, these words have higher TF∗IDF value. The product of TF and IDF is a numerical representation of the association degree between words and resources. TF (term frequency) represents the number of times a word appears in the resource. IDF stands for the specificity of a vocabulary for a particular resource. DF (w) represents the total number of resources in which vocabulary w exists. The IDF is calculated by the following equation, where N refers to the total number of resources. The value of IDF (w) indicates the resource discrimination ability of the vocabulary w.(12)IDFw=logNDFw+1.


### 4.2. Sensing Data Semantic Annotation Framework for Semantic Web of Things

This paper firstly collects sensor web data and adds domain-specific classes and concepts to it with the help of SSN ontology. The semantic sensor data are formed by preprocessing, and the ontology described in OWL is converted into the form of RDF triples. Concept classes, instances, attributes, and relationships are stored in the database according to different predicates in the triples.The semantic annotation system is based on the rough concept lattice model. This paper proposes a semantic annotation system based on multi-ontology for sensor data in the Internet of Things, and this system contains three key technologies: (1) ontology mapping integration technology; (2) information extraction technology; and (3) semantic annotation method.


#### 4.2.1. Ontology Mapping Integration

This paper adopts the ontology integration technology to deal with the heterogeneous problem between multiple ontologies. Ontology integration is to complete the process of ontology merging based on ontology mapping. After the analysis of the merged ontology, the paper generates the parse files and then uses the rules to generate the regular files, which are stored in the rule base. Ontology mapping is based on the similarity of the method: this method calculates the similarity between nodes from a grammar or semantic point of view, and it uses the similarity value to determine the mapping. The ontology mapping framework based on similarity calculation is divided into the following steps:Step 1: domain experts specify the mapping relationship among ontology concepts before automatic mapping.Step 2: select a set of relational concepts (parent-child relations) as a candidate concept set. There exist a lot of semantic relations among ontology concepts. For a given pair of concept mappings, the ontology concepts that have a semantic relationship with them are likely to also have a mapping relationship.Step 3: calculate concept similarity in candidate concept set.Step 4: before calculating the similarity of concept names, it is necessary to restore the abbreviations in the names according to the domain vocabulary. Then, the similarity degree of concept names is calculated by using edit distance.Step 5: semantic similarity calculation is based on weighted measurement.Step 6: since Semantic Web of Things needs to analyze the sensing data collected by different sensors, it is necessary to add weights according to the physical location. It mainly comes from the sampling degree of the sensor to the real object. This paper proposes a similarity measurement method based on weighted measurement. According to all the attributes (I1, I2) of the sensor data E1 and E2, a Cartesian product is made. So, p (I1, I2) = {<a1, b2>…< an, bn>}, and two groups of similarity calculation:(13)pI1,I2=a1,b1⋯an,bn|ah∈I1,bh∈I2,∀h=1,…,n,andah≠ak,bh≠bk,∀k,l≠h.Step 7: concept similarity is calculated by using specific instances of the concept. An instance of concept is also an instance of its ancestor concept. The theoretical basis for calculating concept similarity based on instances is that two concepts are the same if they all have the same instances.Step 8: the attributes of concepts are important features to describe concepts and characterize the semantics of concepts. There are two types of conceptual properties, respectively, the data type and the object type. The data type attribute of a concept is its set of attributes. The object type attribute is a conceptual instance with a relationship, as is shown by the following equation:(14)SimE1,I1,E2,I2=E1∩E2r×1−w+1−wmmaxP∈pI1,I2∑a,basa,b×w.Step 9: according to the similarity matrix, the concept of semantic similarity between the two ontologies is established.Step 10: [Increase ] Setj + 1⟶j; go to step 2.Step 11: a mapping of related attributes in a concept is established based on a set of attribute mappings. The mapping between ontologies includes concepts and concepts, attributes and attributes, concepts and attributes, and relationships and relationships. The mapping between concepts is determined by the calculation of similarity in the previous section. At the same time, the mapping between attributes is obtained when the similarity between attributes is calculated. Finally, the rules of the ontology are used to verify the mapping result.


#### 4.2.2. Information Extraction Technology

Under the guidance of the rule base generated by the ontology mapping integration module, the information extraction module completes the function of extracting named entities from the input sensor information resources, as shown in Figure1.Figure 1
Ontology construction in Semantic Web of Things based on information extraction technology.(1) Preprocessing Sensor Sampling. The preprocessing of sensor information is mainly word segmentation. The word segmentation divides the information collected by the sensor into a single descriptor of features and locations, such as temperature, humidity, coordinates, location, and other different types of features. This characterization process formally provides a shallow analysis of the resource. Analysis and processing are performed for different types of sensor information.(2) Data Storage for Sensor Samples. The result of preprocessing is to store the sampled data. This paper adopts the storage method based on RDF. The characteristic of this storage method is that all RDF triples are stored in heterogeneous location tables, which is easy to query and has strong query adaptability.(3) Construction Rule Base. The ontology uses the domain vocabulary-instance database as the basis for information search. The instance database is stored in the ontology file, which stores common sensor nodes and domain vocabulary in the list. When performing named entity recognition based on annotated samples, it is necessary to utilize the rules in the rule base. Under the guidance of the rules, the named entities related to the ontology concept are identified.(4) Sensor Ontology Isomorphism Integration. In this paper, we propose to adopt the concept isomorphism ideas, to tangentially divide the heterogeneous contexts, to find the isomorphic ontology from the subcontexts, and to gradually integrate the large ontology. Ontology integration ideas are as follows:Step 1: for the ontology contextO in a wireless sensor network, it is decomposed into the ontology context Oi with less attribute order.Step 2: for any one contextK1 obtained, a context isomorphism is checked in the context library.Step 3: the sensor ontology is formed according to user needs and isomorphic latticeB (K2) in the database to generate B (K1).Finally, this paper adopts the proposed attribute joint distribution mapping method based on multi-policy to integrate all the subontologiesB (Oi). Sensor ontology is B (O).


## 4.1. Ontology Construction Model in Semantic Web of Things

A detailed description of the technical route for the construction of sensor ontology is as follows.


### 4.1.1. Extraction of Semantic Information Context

This paper discusses construction strategy of sensor ontology based on rough concept lattice model by combining the characteristics of sensor information in the Semantic Web of Things. This provides a solution for the automatic construction of ontology in Semantic Web of Things. This paper firstly uses natural language understanding and RDF technology to preprocess the collected sensor data and RFID tags. In this way, knowledge tuples of resources and devices are obtained.Theorem 3.
For decision tableS = (U, C, D, f), based on the condition of dividing the mind: U/RC = {X1, X2, Xn}, and based on split decision remember U/RD = {D1, D2, DM}, an information matrix of sensor ontology is shown by.(10)ucβ=∑i=1nTiβU,KXi=maxj≤mDDjXi.
In the research on construction of sensor ontology in Semantic Web of Things, it is time-consuming and error-prone to manually construct ontology. In this paper, the improved rough concept lattice model is used to construct the sensor ontology. Therefore, it mainly reflects the hierarchical structure between sensing concepts. By calculating the TF∗IDF value of each word, words with a high relevance to the sensing resources can be screened out. Usually, the last ten percent of words are deleted and the calculation is repeated until the set minimum number of words. Finally, a vocabulary set is formed.


### 4.1.2. Construction of Sensor Ontology Based on the Improved Rough Concept Lattice Model

(1) Improved Concept Lattice Model. In this paper, an improved upper and lower distribution attribute reduction algorithm based on variable precision rough sets is used to reduce the formal context [16]. By improving the method of calculating identifiable matrices, the algorithm is suitable for both compatible decision tables and incompatible decision tables. On the basis of not changing the lattice structure, the number of objects and attributes is reduced, the time complexity of constructing the concept lattice is reduced, and its covering ability and generalization ability are increased.(2) Using the Improved Rough Concept Lattice Model to Generate the Unit Ontology. By choosing appropriate β values, the formal context is reduced by using variable precision rough sets. The purpose is to reduce unwanted objects and noise. Aiming at the reduced formal context, the rough concept lattice technique is used to construct the unit ontology. The specific method of constructing ontology with RFCA is as follows:Step 1: calculateC1:=A1,B1∈ϖK1, C2:=A2,B2∈ϖK2, φC1=φC2⇒C1=C2.Step 2: equivalence classXi = U|Ci (i = 1, 2, …, n); for each condition attribute, calculate the value of β (β ∈ (0.5, C]) to approximate quality of classification β in Y = U|D (i = 1, 2, …, N).Step 3: when the current isy and the current sequence position is i, the proposed algorithm can obtain the optimal tag sequence of the current location, and j is not normalized probability value. Its recursive form is as follows:(11)dij=tfij×log10Ndfj×wj.Step 4: theN (N-gram) method is applied to segment of the sentence, and the sentence is approximately matched with the words in the annotation vocabulary list. When the match is successful, annotate the corresponding type and adjust the result of the sentence segmentation to ensure that the word has been annotated by the type of the word..Step 5: If (i==n) set |L|/|U|⟶ v ;then the algorithm is completed by the measure of classification quality;else go to Step 4;Step 6: RFCA can generate new objects, which are directly made up of properties.Step 7: while ||Lk|| > 1 do Lk+1: = ∅;Step 8: the whole process can be repeated until the designer is satisfied.Finally, the rough concept lattice is converted into the corresponding sensor ontology. The method here is to use the partial order method to represent the formed formal concept with resource attributes. Also, we only make the attribute appear once in the concept lattice when we annotate it. The key elements described by the sensor ontology are device attributes and the relationship between attributes. In this way, the sensor ontology is constructed.


### 4.1.3. Mapping of Ontology in the Semantic Web of Things

The concept lattice and variable precision rough set theory are used in the process of ontology mapping. This model comprehensively considers the multi-strategy model of feature information and structural information and constitutes a multi-strategy ontology mapping model. With the help of WordNet, the calculation method of concept similarity is adopted to calculate the similarity of attribute concepts between ontologies. Finally, the attribute mapping set of the unit ontology is obtained.In order to get the data in Internet of Things, a network model of concept correlation is usually established [17]. At the same time, these words have higher TF∗IDF value. The product of TF and IDF is a numerical representation of the association degree between words and resources. TF (term frequency) represents the number of times a word appears in the resource. IDF stands for the specificity of a vocabulary for a particular resource. DF (w) represents the total number of resources in which vocabulary w exists. The IDF is calculated by the following equation, where N refers to the total number of resources. The value of IDF (w) indicates the resource discrimination ability of the vocabulary w.(12)IDFw=logNDFw+1.


## 4.1.1. Extraction of Semantic Information Context

This paper discusses construction strategy of sensor ontology based on rough concept lattice model by combining the characteristics of sensor information in the Semantic Web of Things. This provides a solution for the automatic construction of ontology in Semantic Web of Things. This paper firstly uses natural language understanding and RDF technology to preprocess the collected sensor data and RFID tags. In this way, knowledge tuples of resources and devices are obtained.Theorem 3.
For decision tableS = (U, C, D, f), based on the condition of dividing the mind: U/RC = {X1, X2, Xn}, and based on split decision remember U/RD = {D1, D2, DM}, an information matrix of sensor ontology is shown by.(10)ucβ=∑i=1nTiβU,KXi=maxj≤mDDjXi.
In the research on construction of sensor ontology in Semantic Web of Things, it is time-consuming and error-prone to manually construct ontology. In this paper, the improved rough concept lattice model is used to construct the sensor ontology. Therefore, it mainly reflects the hierarchical structure between sensing concepts. By calculating the TF∗IDF value of each word, words with a high relevance to the sensing resources can be screened out. Usually, the last ten percent of words are deleted and the calculation is repeated until the set minimum number of words. Finally, a vocabulary set is formed.


## 4.1.2. Construction of Sensor Ontology Based on the Improved Rough Concept Lattice Model

(1) Improved Concept Lattice Model. In this paper, an improved upper and lower distribution attribute reduction algorithm based on variable precision rough sets is used to reduce the formal context [16]. By improving the method of calculating identifiable matrices, the algorithm is suitable for both compatible decision tables and incompatible decision tables. On the basis of not changing the lattice structure, the number of objects and attributes is reduced, the time complexity of constructing the concept lattice is reduced, and its covering ability and generalization ability are increased.(2) Using the Improved Rough Concept Lattice Model to Generate the Unit Ontology. By choosing appropriate β values, the formal context is reduced by using variable precision rough sets. The purpose is to reduce unwanted objects and noise. Aiming at the reduced formal context, the rough concept lattice technique is used to construct the unit ontology. The specific method of constructing ontology with RFCA is as follows:Step 1: calculateC1:=A1,B1∈ϖK1, C2:=A2,B2∈ϖK2, φC1=φC2⇒C1=C2.Step 2: equivalence classXi = U|Ci (i = 1, 2, …, n); for each condition attribute, calculate the value of β (β ∈ (0.5, C]) to approximate quality of classification β in Y = U|D (i = 1, 2, …, N).Step 3: when the current isy and the current sequence position is i, the proposed algorithm can obtain the optimal tag sequence of the current location, and j is not normalized probability value. Its recursive form is as follows:(11)dij=tfij×log10Ndfj×wj.Step 4: theN (N-gram) method is applied to segment of the sentence, and the sentence is approximately matched with the words in the annotation vocabulary list. When the match is successful, annotate the corresponding type and adjust the result of the sentence segmentation to ensure that the word has been annotated by the type of the word..Step 5: If (i==n) set |L|/|U|⟶ v ;then the algorithm is completed by the measure of classification quality;else go to Step 4;Step 6: RFCA can generate new objects, which are directly made up of properties.Step 7: while ||Lk|| > 1 do Lk+1: = ∅;Step 8: the whole process can be repeated until the designer is satisfied.Finally, the rough concept lattice is converted into the corresponding sensor ontology. The method here is to use the partial order method to represent the formed formal concept with resource attributes. Also, we only make the attribute appear once in the concept lattice when we annotate it. The key elements described by the sensor ontology are device attributes and the relationship between attributes. In this way, the sensor ontology is constructed.


## 4.1.3. Mapping of Ontology in the Semantic Web of Things

The concept lattice and variable precision rough set theory are used in the process of ontology mapping. This model comprehensively considers the multi-strategy model of feature information and structural information and constitutes a multi-strategy ontology mapping model. With the help of WordNet, the calculation method of concept similarity is adopted to calculate the similarity of attribute concepts between ontologies. Finally, the attribute mapping set of the unit ontology is obtained.In order to get the data in Internet of Things, a network model of concept correlation is usually established [17]. At the same time, these words have higher TF∗IDF value. The product of TF and IDF is a numerical representation of the association degree between words and resources. TF (term frequency) represents the number of times a word appears in the resource. IDF stands for the specificity of a vocabulary for a particular resource. DF (w) represents the total number of resources in which vocabulary w exists. The IDF is calculated by the following equation, where N refers to the total number of resources. The value of IDF (w) indicates the resource discrimination ability of the vocabulary w.(12)IDFw=logNDFw+1.


## 4.2. Sensing Data Semantic Annotation Framework for Semantic Web of Things

This paper firstly collects sensor web data and adds domain-specific classes and concepts to it with the help of SSN ontology. The semantic sensor data are formed by preprocessing, and the ontology described in OWL is converted into the form of RDF triples. Concept classes, instances, attributes, and relationships are stored in the database according to different predicates in the triples.The semantic annotation system is based on the rough concept lattice model. This paper proposes a semantic annotation system based on multi-ontology for sensor data in the Internet of Things, and this system contains three key technologies: (1) ontology mapping integration technology; (2) information extraction technology; and (3) semantic annotation method.


### 4.2.1. Ontology Mapping Integration

This paper adopts the ontology integration technology to deal with the heterogeneous problem between multiple ontologies. Ontology integration is to complete the process of ontology merging based on ontology mapping. After the analysis of the merged ontology, the paper generates the parse files and then uses the rules to generate the regular files, which are stored in the rule base. Ontology mapping is based on the similarity of the method: this method calculates the similarity between nodes from a grammar or semantic point of view, and it uses the similarity value to determine the mapping. The ontology mapping framework based on similarity calculation is divided into the following steps:Step 1: domain experts specify the mapping relationship among ontology concepts before automatic mapping.Step 2: select a set of relational concepts (parent-child relations) as a candidate concept set. There exist a lot of semantic relations among ontology concepts. For a given pair of concept mappings, the ontology concepts that have a semantic relationship with them are likely to also have a mapping relationship.Step 3: calculate concept similarity in candidate concept set.Step 4: before calculating the similarity of concept names, it is necessary to restore the abbreviations in the names according to the domain vocabulary. Then, the similarity degree of concept names is calculated by using edit distance.Step 5: semantic similarity calculation is based on weighted measurement.Step 6: since Semantic Web of Things needs to analyze the sensing data collected by different sensors, it is necessary to add weights according to the physical location. It mainly comes from the sampling degree of the sensor to the real object. This paper proposes a similarity measurement method based on weighted measurement. According to all the attributes (I1, I2) of the sensor data E1 and E2, a Cartesian product is made. So, p (I1, I2) = {<a1, b2>…< an, bn>}, and two groups of similarity calculation:(13)pI1,I2=a1,b1⋯an,bn|ah∈I1,bh∈I2,∀h=1,…,n,andah≠ak,bh≠bk,∀k,l≠h.Step 7: concept similarity is calculated by using specific instances of the concept. An instance of concept is also an instance of its ancestor concept. The theoretical basis for calculating concept similarity based on instances is that two concepts are the same if they all have the same instances.Step 8: the attributes of concepts are important features to describe concepts and characterize the semantics of concepts. There are two types of conceptual properties, respectively, the data type and the object type. The data type attribute of a concept is its set of attributes. The object type attribute is a conceptual instance with a relationship, as is shown by the following equation:(14)SimE1,I1,E2,I2=E1∩E2r×1−w+1−wmmaxP∈pI1,I2∑a,basa,b×w.Step 9: according to the similarity matrix, the concept of semantic similarity between the two ontologies is established.Step 10: [Increase ] Setj + 1⟶j; go to step 2.Step 11: a mapping of related attributes in a concept is established based on a set of attribute mappings. The mapping between ontologies includes concepts and concepts, attributes and attributes, concepts and attributes, and relationships and relationships. The mapping between concepts is determined by the calculation of similarity in the previous section. At the same time, the mapping between attributes is obtained when the similarity between attributes is calculated. Finally, the rules of the ontology are used to verify the mapping result.


### 4.2.2. Information Extraction Technology

Under the guidance of the rule base generated by the ontology mapping integration module, the information extraction module completes the function of extracting named entities from the input sensor information resources, as shown in Figure1.Figure 1
Ontology construction in Semantic Web of Things based on information extraction technology.(1) Preprocessing Sensor Sampling. The preprocessing of sensor information is mainly word segmentation. The word segmentation divides the information collected by the sensor into a single descriptor of features and locations, such as temperature, humidity, coordinates, location, and other different types of features. This characterization process formally provides a shallow analysis of the resource. Analysis and processing are performed for different types of sensor information.(2) Data Storage for Sensor Samples. The result of preprocessing is to store the sampled data. This paper adopts the storage method based on RDF. The characteristic of this storage method is that all RDF triples are stored in heterogeneous location tables, which is easy to query and has strong query adaptability.(3) Construction Rule Base. The ontology uses the domain vocabulary-instance database as the basis for information search. The instance database is stored in the ontology file, which stores common sensor nodes and domain vocabulary in the list. When performing named entity recognition based on annotated samples, it is necessary to utilize the rules in the rule base. Under the guidance of the rules, the named entities related to the ontology concept are identified.(4) Sensor Ontology Isomorphism Integration. In this paper, we propose to adopt the concept isomorphism ideas, to tangentially divide the heterogeneous contexts, to find the isomorphic ontology from the subcontexts, and to gradually integrate the large ontology. Ontology integration ideas are as follows:Step 1: for the ontology contextO in a wireless sensor network, it is decomposed into the ontology context Oi with less attribute order.Step 2: for any one contextK1 obtained, a context isomorphism is checked in the context library.Step 3: the sensor ontology is formed according to user needs and isomorphic latticeB (K2) in the database to generate B (K1).Finally, this paper adopts the proposed attribute joint distribution mapping method based on multi-policy to integrate all the subontologiesB (Oi). Sensor ontology is B (O).


## 4.2.1. Ontology Mapping Integration

This paper adopts the ontology integration technology to deal with the heterogeneous problem between multiple ontologies. Ontology integration is to complete the process of ontology merging based on ontology mapping. After the analysis of the merged ontology, the paper generates the parse files and then uses the rules to generate the regular files, which are stored in the rule base. Ontology mapping is based on the similarity of the method: this method calculates the similarity between nodes from a grammar or semantic point of view, and it uses the similarity value to determine the mapping. The ontology mapping framework based on similarity calculation is divided into the following steps:Step 1: domain experts specify the mapping relationship among ontology concepts before automatic mapping.Step 2: select a set of relational concepts (parent-child relations) as a candidate concept set. There exist a lot of semantic relations among ontology concepts. For a given pair of concept mappings, the ontology concepts that have a semantic relationship with them are likely to also have a mapping relationship.Step 3: calculate concept similarity in candidate concept set.Step 4: before calculating the similarity of concept names, it is necessary to restore the abbreviations in the names according to the domain vocabulary. Then, the similarity degree of concept names is calculated by using edit distance.Step 5: semantic similarity calculation is based on weighted measurement.Step 6: since Semantic Web of Things needs to analyze the sensing data collected by different sensors, it is necessary to add weights according to the physical location. It mainly comes from the sampling degree of the sensor to the real object. This paper proposes a similarity measurement method based on weighted measurement. According to all the attributes (I1, I2) of the sensor data E1 and E2, a Cartesian product is made. So, p (I1, I2) = {<a1, b2>…< an, bn>}, and two groups of similarity calculation:(13)pI1,I2=a1,b1⋯an,bn|ah∈I1,bh∈I2,∀h=1,…,n,andah≠ak,bh≠bk,∀k,l≠h.Step 7: concept similarity is calculated by using specific instances of the concept. An instance of concept is also an instance of its ancestor concept. The theoretical basis for calculating concept similarity based on instances is that two concepts are the same if they all have the same instances.Step 8: the attributes of concepts are important features to describe concepts and characterize the semantics of concepts. There are two types of conceptual properties, respectively, the data type and the object type. The data type attribute of a concept is its set of attributes. The object type attribute is a conceptual instance with a relationship, as is shown by the following equation:(14)SimE1,I1,E2,I2=E1∩E2r×1−w+1−wmmaxP∈pI1,I2∑a,basa,b×w.Step 9: according to the similarity matrix, the concept of semantic similarity between the two ontologies is established.Step 10: [Increase ] Setj + 1⟶j; go to step 2.Step 11: a mapping of related attributes in a concept is established based on a set of attribute mappings. The mapping between ontologies includes concepts and concepts, attributes and attributes, concepts and attributes, and relationships and relationships. The mapping between concepts is determined by the calculation of similarity in the previous section. At the same time, the mapping between attributes is obtained when the similarity between attributes is calculated. Finally, the rules of the ontology are used to verify the mapping result.


## 4.2.2. Information Extraction Technology

Under the guidance of the rule base generated by the ontology mapping integration module, the information extraction module completes the function of extracting named entities from the input sensor information resources, as shown in Figure1.Figure 1
Ontology construction in Semantic Web of Things based on information extraction technology.(1) Preprocessing Sensor Sampling. The preprocessing of sensor information is mainly word segmentation. The word segmentation divides the information collected by the sensor into a single descriptor of features and locations, such as temperature, humidity, coordinates, location, and other different types of features. This characterization process formally provides a shallow analysis of the resource. Analysis and processing are performed for different types of sensor information.(2) Data Storage for Sensor Samples. The result of preprocessing is to store the sampled data. This paper adopts the storage method based on RDF. The characteristic of this storage method is that all RDF triples are stored in heterogeneous location tables, which is easy to query and has strong query adaptability.(3) Construction Rule Base. The ontology uses the domain vocabulary-instance database as the basis for information search. The instance database is stored in the ontology file, which stores common sensor nodes and domain vocabulary in the list. When performing named entity recognition based on annotated samples, it is necessary to utilize the rules in the rule base. Under the guidance of the rules, the named entities related to the ontology concept are identified.(4) Sensor Ontology Isomorphism Integration. In this paper, we propose to adopt the concept isomorphism ideas, to tangentially divide the heterogeneous contexts, to find the isomorphic ontology from the subcontexts, and to gradually integrate the large ontology. Ontology integration ideas are as follows:Step 1: for the ontology contextO in a wireless sensor network, it is decomposed into the ontology context Oi with less attribute order.Step 2: for any one contextK1 obtained, a context isomorphism is checked in the context library.Step 3: the sensor ontology is formed according to user needs and isomorphic latticeB (K2) in the database to generate B (K1).Finally, this paper adopts the proposed attribute joint distribution mapping method based on multi-policy to integrate all the subontologiesB (Oi). Sensor ontology is B (O).


## 5. Experiments and Analysis

In recent years, semantic similarity computation based on ontology has been widely and successfully applied in the fields of natural language processing, information extraction, and semantic annotation. This paper presents a semantic annotation framework for sensing data oriented towards semantic web. The semantic annotation framework includes three key technologies: perceptual data collection technology; ontology isomorphic integration technology; and composite semantic similarity method.The method of semantic annotation for the sensing data in the Internet of Things is as follows.


### 5.1. Sampling Semantic Preannotation Based on Domain Sensor Ontology

The mapping between words and ontology concepts is established by analyzing the feature words sampled by the sensors. For sampled data, the basic idea of semantic preannotating from the perspective of domain ontology is as follows:Step 1: relevant knowledge in the field is acquired. Under the joint guidance of domain experts and ontology creators, the domain ontology in Internet of Things is constructed based on the rough concept lattice model.Step 2: extract the feature vocabulary representing the sensor from the sensor sampling to form a feature vocabulary set.Step 3: the samples containing these feature words are associated with the corresponding feature words. When the feature vocabulary is associated with sampling, combined with SSN ontology, RDF based on domain ontology and the support vector space model method (SVM) are stored. Finally, a feature sampling set and its semantic annotation expression are formed.In this way, the concept mapping relationship between the sensing sampling and the domain ontology is established. Because domain ontology is a precise and detailed description of related concepts, conceptual attributes, and the relationship between concepts, this method is used to semantic annotate the attributes of the sensor's sampled data. It can not only explicitly express the implicit semantic information of documents but also accurately divide sensor samples and their categories. At the same time, it can also reflect its semantic relevance to related categories.


### 5.2. Selecting the Ontology Segment with the Highest Semantic Relevance

After semantic preannotation of sensor samples based on domain ontology, the samples are annotated by using ontology fragments. The ontology fragments with the highest semantic relevance need to be selected for the sampled documents. The selection process is as follows:Step 1: use ontology learning techniques to find key concept vocabulary in a contextual grammar environment. Features of the concept vocabulary are calculated. Suppose a concept setP⊆C, and the information content of P is defined as(15)ψP=∑c∈PICc.Step 2: by comparing the keywords with concepts in the ontology fragment, the semantic environment with the highest relevance is matched for the grammatical environment. When the traditional matching algorithm encounters a large number of concepts in the ontology, its localization efficiency will be relatively low. After the fusion of the feature-based method and the information-based method, the comprehensive correlation degree is integrated. Calculate the formula for the comprehensive similarity of the sensing dataa and b. The data calculation formula in semantic sensor network is as follows:(16)Sim″a,b∑D∈D′δDsim′a,b+∑D∈D′,D2∈D′δD1,D2sim∗a,bN,whereN is the total number of calculated similarity results, δ is the weight of each ontology, and the coefficient can be determined based on the correlation with the current sensor node. The formula calculates the weighted similarity results in the same ontology and in different ontologies. The result is an average value. For different ontologies, the coefficients are adjusted according to the field of processing, and the ontologies close to the wireless sensor network should be given greater weights. This method introduces the idea of IC into the construction method of WSN. Feature weights and semantic distances are described by IC. The similarity between SSNs can be calculated in a multi-ontology environment.


### 5.3. Semantic Annotation for Sensor Data

Step 1: if the concepts corresponding to the keywords are concentrated in the same sensor environment, the matching is successful. The matching semantic environment is determined as the semantic annotation reference. If the concepts corresponding to the keywords are evenly distributed in multiple semantic contexts, the matching fails. Then, only the contraction syntax environment is used to find keywords. Here it is repeated to match the semantic environment multiple times until the match is successful or shrinks to the minimal syntactic environment.Context is related to the concept of similarity; set the sceneK= (Cint, R). The similarity of concepts a and b in ontology O is defined as(17)Sima,b=αΨFKa∩FKbαΨFKa∩FKb+βA,BΨFKa−FKb+1−βΨFKb−FKa,where the coefficientα is an adjustable coefficient, which is used to adjust the weight between the common feature and the difference feature. The coefficient β is used to balance the weights of the two difference sets. In particular, when P is the empty set, the maximum similarity value is taken.Step 2: here, several words with high correlation are used as keywords to locate the semantic environment. If the method of semantic distance calculation is used, the correlation between each concept and the keyword needs to be calculated, while it is possible to locate the semantic context by accurately finding the concepts with the highest matching keywords. However, the ontology in the sensor field contains a large number of concepts, and its positioning efficiency will be relatively low. Therefore, the method of syntax matching and statistics is used to locate the semantic environment. Computational context-dependent feature sets and similarity are defined as follows.(18)DHA,B=maxsupx∈Ainfy∈Bdx,y,supy∈Binfx∈Adx,y,whereDH is the Hausdorff distance of two concept sets and D (x, y) is their shortest distance through the conceptual information content. The Hausdorff distance can measure the maximum mismatch between two concept sets.Step 3: in order to improve the accuracy of annotation, when performing semantic annotation, ontology not only considers the correlation between a single instance and the sampled data but also considers whether the instance appears in the sampling. At the same time, the ontology considers the attributes of the instance and the relevance of the concept to the document. This fully takes into account the semantic environment in which the sampling exists.This paper designs a semantic annotation framework based on sensor ontology. The framework is divided into four levels: acquisition and preprocessing of sensor data, construction of sensor ontology, identification of named entities, and storage of semantic annotation results. Annotating sensor data through this framework can effectively express the semantics of sensor information. This paper analyzes and compares the proposed method based on improved rough concept lattice and Sense2Web + M3 operation method. Then, the Sense2Web + M3 operation method is the traditional semantic annotation model. The semantic annotation for the data plays a very important role in the aspect of data processing. The novel proposed method can effectively enhance the expression ability of sensor information and the use value of data.This paper tests the performance of ontology construction and semantic annotation in Semantic Web of Things; the experimental environment here is as follows: the c# programming language is used, and the programming environment is Microsoft Visual Studio 2019; the data storage uses SQL Server 2019 as the dynamic real-time data storage carrier. The hardware experimental system includes as follows: the processor adopts Intel(R) core(TM) i7-10700CPU, of which the CPU frequency is 4.8GHz; the memory is 256G; the external memory is 1TB disk; the operating system is windows 10.This experiment adopts sensor ontology query language for the sensor sampling value of attribute data query. All the tests are executed 100 times, and the test results are 100 times the average value, and experiments are to compare the proposed rough concept lattice semantic annotation method with the traditional semantic annotation platforms, as shown in Figure2.Figure 2
Comparison of the proposed rough concept lattice semantic annotation method with the traditional semantic annotation platforms.From the test results, it can be seen that the ontology query consumes access time, and the change of the RDF data volume increases linearly. When tripling the number of rows to six orders of magnitude, the dataset size is 2.1 GB, and the query access time is close to 6S in the Semantic Web. The energy consumption of data acquisition frequency is 1s, and acquisition nodes are 2800 in the energy consumption monitoring experimental platform. After two weeks of perception data.the data collected reach 8,000 rows according to such experimental parameters. In order to illustrate the feasibility of this method, this paper simulates the experiment, and the numbers of the sensors are 1, 2, 3, 4, 5, 6, 7, and 8, respectively. In order to verify the accuracy of semantic annotation, the improved rough concept lattice is compared with the Sense2Web+M3 platform for semantic annotation data sequence. It can be seen from Figure2 that the improvement of the rough concept lattice has obvious advantages, and the ontology query time has been significantly reduced so that the application of sensor data and the intelligence of data processing can be improved. So, the semantic annotation method is feasible for intelligent data.This paper proposes a method for semantic annotation based on the rough concept lattice model. The method includes collecting and preprocessing sensor data, integrating sensor ontology, identifying named entities, and storing semantic annotation results. This paper also proposes an integrated unit ontology strategy based on the improved rough concept lattice isomorphism model. In order to find similar concepts accurately and reasonably, a semantic similarity method of comprehensive feature and content is proposed, which effectively annotates the entity resources to be named. It promotes a deeper understanding and more intelligent processing of data by wireless sensors.


## 5.1. Sampling Semantic Preannotation Based on Domain Sensor Ontology

The mapping between words and ontology concepts is established by analyzing the feature words sampled by the sensors. For sampled data, the basic idea of semantic preannotating from the perspective of domain ontology is as follows:Step 1: relevant knowledge in the field is acquired. Under the joint guidance of domain experts and ontology creators, the domain ontology in Internet of Things is constructed based on the rough concept lattice model.Step 2: extract the feature vocabulary representing the sensor from the sensor sampling to form a feature vocabulary set.Step 3: the samples containing these feature words are associated with the corresponding feature words. When the feature vocabulary is associated with sampling, combined with SSN ontology, RDF based on domain ontology and the support vector space model method (SVM) are stored. Finally, a feature sampling set and its semantic annotation expression are formed.In this way, the concept mapping relationship between the sensing sampling and the domain ontology is established. Because domain ontology is a precise and detailed description of related concepts, conceptual attributes, and the relationship between concepts, this method is used to semantic annotate the attributes of the sensor's sampled data. It can not only explicitly express the implicit semantic information of documents but also accurately divide sensor samples and their categories. At the same time, it can also reflect its semantic relevance to related categories.


## 5.2. Selecting the Ontology Segment with the Highest Semantic Relevance

After semantic preannotation of sensor samples based on domain ontology, the samples are annotated by using ontology fragments. The ontology fragments with the highest semantic relevance need to be selected for the sampled documents. The selection process is as follows:Step 1: use ontology learning techniques to find key concept vocabulary in a contextual grammar environment. Features of the concept vocabulary are calculated. Suppose a concept setP⊆C, and the information content of P is defined as(15)ψP=∑c∈PICc.Step 2: by comparing the keywords with concepts in the ontology fragment, the semantic environment with the highest relevance is matched for the grammatical environment. When the traditional matching algorithm encounters a large number of concepts in the ontology, its localization efficiency will be relatively low. After the fusion of the feature-based method and the information-based method, the comprehensive correlation degree is integrated. Calculate the formula for the comprehensive similarity of the sensing dataa and b. The data calculation formula in semantic sensor network is as follows:(16)Sim″a,b∑D∈D′δDsim′a,b+∑D∈D′,D2∈D′δD1,D2sim∗a,bN,whereN is the total number of calculated similarity results, δ is the weight of each ontology, and the coefficient can be determined based on the correlation with the current sensor node. The formula calculates the weighted similarity results in the same ontology and in different ontologies. The result is an average value. For different ontologies, the coefficients are adjusted according to the field of processing, and the ontologies close to the wireless sensor network should be given greater weights. This method introduces the idea of IC into the construction method of WSN. Feature weights and semantic distances are described by IC. The similarity between SSNs can be calculated in a multi-ontology environment.


## 5.3. Semantic Annotation for Sensor Data

Step 1: if the concepts corresponding to the keywords are concentrated in the same sensor environment, the matching is successful. The matching semantic environment is determined as the semantic annotation reference. If the concepts corresponding to the keywords are evenly distributed in multiple semantic contexts, the matching fails. Then, only the contraction syntax environment is used to find keywords. Here it is repeated to match the semantic environment multiple times until the match is successful or shrinks to the minimal syntactic environment.Context is related to the concept of similarity; set the sceneK= (Cint, R). The similarity of concepts a and b in ontology O is defined as(17)Sima,b=αΨFKa∩FKbαΨFKa∩FKb+βA,BΨFKa−FKb+1−βΨFKb−FKa,where the coefficientα is an adjustable coefficient, which is used to adjust the weight between the common feature and the difference feature. The coefficient β is used to balance the weights of the two difference sets. In particular, when P is the empty set, the maximum similarity value is taken.Step 2: here, several words with high correlation are used as keywords to locate the semantic environment. If the method of semantic distance calculation is used, the correlation between each concept and the keyword needs to be calculated, while it is possible to locate the semantic context by accurately finding the concepts with the highest matching keywords. However, the ontology in the sensor field contains a large number of concepts, and its positioning efficiency will be relatively low. Therefore, the method of syntax matching and statistics is used to locate the semantic environment. Computational context-dependent feature sets and similarity are defined as follows.(18)DHA,B=maxsupx∈Ainfy∈Bdx,y,supy∈Binfx∈Adx,y,whereDH is the Hausdorff distance of two concept sets and D (x, y) is their shortest distance through the conceptual information content. The Hausdorff distance can measure the maximum mismatch between two concept sets.Step 3: in order to improve the accuracy of annotation, when performing semantic annotation, ontology not only considers the correlation between a single instance and the sampled data but also considers whether the instance appears in the sampling. At the same time, the ontology considers the attributes of the instance and the relevance of the concept to the document. This fully takes into account the semantic environment in which the sampling exists.This paper designs a semantic annotation framework based on sensor ontology. The framework is divided into four levels: acquisition and preprocessing of sensor data, construction of sensor ontology, identification of named entities, and storage of semantic annotation results. Annotating sensor data through this framework can effectively express the semantics of sensor information. This paper analyzes and compares the proposed method based on improved rough concept lattice and Sense2Web + M3 operation method. Then, the Sense2Web + M3 operation method is the traditional semantic annotation model. The semantic annotation for the data plays a very important role in the aspect of data processing. The novel proposed method can effectively enhance the expression ability of sensor information and the use value of data.This paper tests the performance of ontology construction and semantic annotation in Semantic Web of Things; the experimental environment here is as follows: the c# programming language is used, and the programming environment is Microsoft Visual Studio 2019; the data storage uses SQL Server 2019 as the dynamic real-time data storage carrier. The hardware experimental system includes as follows: the processor adopts Intel(R) core(TM) i7-10700CPU, of which the CPU frequency is 4.8GHz; the memory is 256G; the external memory is 1TB disk; the operating system is windows 10.This experiment adopts sensor ontology query language for the sensor sampling value of attribute data query. All the tests are executed 100 times, and the test results are 100 times the average value, and experiments are to compare the proposed rough concept lattice semantic annotation method with the traditional semantic annotation platforms, as shown in Figure2.Figure 2
Comparison of the proposed rough concept lattice semantic annotation method with the traditional semantic annotation platforms.From the test results, it can be seen that the ontology query consumes access time, and the change of the RDF data volume increases linearly. When tripling the number of rows to six orders of magnitude, the dataset size is 2.1 GB, and the query access time is close to 6S in the Semantic Web. The energy consumption of data acquisition frequency is 1s, and acquisition nodes are 2800 in the energy consumption monitoring experimental platform. After two weeks of perception data.the data collected reach 8,000 rows according to such experimental parameters. In order to illustrate the feasibility of this method, this paper simulates the experiment, and the numbers of the sensors are 1, 2, 3, 4, 5, 6, 7, and 8, respectively. In order to verify the accuracy of semantic annotation, the improved rough concept lattice is compared with the Sense2Web+M3 platform for semantic annotation data sequence. It can be seen from Figure2 that the improvement of the rough concept lattice has obvious advantages, and the ontology query time has been significantly reduced so that the application of sensor data and the intelligence of data processing can be improved. So, the semantic annotation method is feasible for intelligent data.This paper proposes a method for semantic annotation based on the rough concept lattice model. The method includes collecting and preprocessing sensor data, integrating sensor ontology, identifying named entities, and storing semantic annotation results. This paper also proposes an integrated unit ontology strategy based on the improved rough concept lattice isomorphism model. In order to find similar concepts accurately and reasonably, a semantic similarity method of comprehensive feature and content is proposed, which effectively annotates the entity resources to be named. It promotes a deeper understanding and more intelligent processing of data by wireless sensors.


## 6. Conclusion

Based on the research background of ontology construction, semantic similarity calculation, and semantic annotation in Semantic Web of Things, this paper comprehensively uses formal concept analysis, variable precision rough set, semantic similarity technology, and information extraction technology to solve the key problems in semantic annotation. This paper presents application of the rough concept lattice model in construction of ontology and semantic annotation in Semantic Web of Things. According to ontology structure based on rough concept lattice, this paper’s objective is to obtain the sensor ontology in Semantic Web. Aiming at the two subontology pairs in the ontology system, this paper proposes a multi-strategy attribute joint distribution mapping method. In this paper, the multi-dimensional weighted vector analysis method is used to identify sensor entities in the Internet of Things and form a semantic comparison rule database. Finally, a similarity calculation method based on the combination of features and information content is proposed for semantic annotation. The future research work is to use big data mining technology to enable the Internet of Things to provide personalized intelligent services [14].



---

*Source: 7207372-2022-04-13.xml*