Content uploaded by Hai Dong
Author content
All content in this area was uploaded by Hai Dong on Nov 14, 2017
Content may be subject to copyright.
Content uploaded by Athman Bouguettaya
Author content
All content in this area was uploaded by Athman Bouguettaya on Jul 22, 2016
Content may be subject to copyright.
Service Mining for Internet of Things
Bing Huang, Athman Bouguettaya, Hai Dong, and Liang Chen
School of Computer Science and Information Technology,
RMIT, Melbourne, Australia
{bing.huang,athman.bouguettaya,hai.dong,liang.chen}@rmit.edu.au
Abstract. A service mining framework is proposed that enables discov-
ering interesting relationships in Internet of Things services bottom-up.
The service relationships are modeled based on spatial-temporal aspects,
environment, people, and operation. An ontology-based service model is
proposed to describe services. We present a set of metrics to evaluate the
interestingness of discovered service relationships. Analytical and simu-
lation results are presented to show the effectiveness of the proposed
evaluation measures.
Keywords: Service mining, service recognition, service relationship, in-
terestingness, service description
1 Introduction
The current Internet is evolving from interconnecting computers to interconnect-
ing things [3]. The Internet of Things (IoT) refers to numerous connected things
that rely on sensory, communication, networking, and information processing
technologies [3]. Real-world things are heterogeneous in terms of features with
little standard descriptions [3]. Service-Oriented Computing (SOC) paradigm
provides a promising solution for exposing features of real-world things as ser-
vices in a standard form.
As a result of the prevalence of IoT, an increasing number of real-world
things will be connected to future Internet, leading to a proliferation in services.
This proliferation of services will contribute to the increasing opportunities of
service composition. Service composition aims at providing value-added services
through aggregating component services. One the one hand, as more diverse ser-
vices are available, the opportunities of composing services will surpass anyone’s
imagination. On the other hand, we may not sometimes know which group of
services in IoT is related to each other and can cooperate to achieve a common
goal. Therefore, the expected large number of services in IoT, coupled with the
need for composing services, call for a service mining tool that can uncover the
intrinsic correlations among services. We define service mining as the process of
proactively discovering interesting relationships among services.
Service mining aims at discovering any interesting service relationships with-
out specific search goals for defining the exact service functionality. A general
goal (i.e., smart home, which is a typical application domain in IoT) is provided
2 Service mining for Internet of Things
at the beginning of service mining process to narrow down the mining scope. In
the context of smart home, service mining may provide interesting correlations
between different component services. For example, a TV service may hypothet-
ically relate to a fridge service. There are three factors that provide the basis
for the hypothetical relationship. The first factor is the collocation of both the
TV set and the fridge [5]. The second factor is the temporal correlation (i.e., the
fridge is sometimes accessed when the TV is on ) [5]. The third factor is people
(i.e., the TV and the fridge may be accessed by the same user) [6]. Another
example is that an oven service may hypothetically relate to an air-conditioning
service. An environment factor provides the basis for the hypothetical correlation
[6]. When the oven is in use, temperature is rising. Then the air-conditioning is
invoked to adjust room temperature. Thus, without any prior knowledge of spec-
ifying search goals, the service mining process has the potential of discovering
interesting service relationships.
The key contribution is the service mining framework that aims at discovering
service relationships in IoT. The paper is organized as follows: Section 2 proposes
an ontology-based service description model. Section 3 elaborates the service
mining framework. Section 4 shows experiment results. Section 5 concludes the
paper and highlights some future work.
2 Ontology-based Description of Services
Discovering service relationships requires the description of services so that ser-
vice mining tools can understand services and form bonds among related services.
We propose an ontology-based model for describing services (see Fig.1). Unfilled
nodes refer to ontology concepts that have been clearly defined in [4]. Gray nodes
refer to extended ontology concepts. Numbers on edges denote the has relation-
ship between ontology concepts. We formally define service, environment, state,
pre/postcondition, and people as follows.
Definition 1 : Service. A service Siis defined by a tuple hname,des,Bindi,
Cati,Opei,Stai,P eoiiwhere:
•name and des are a name and a text summary about the service features,
respectively.
•Bindiis a set of binding protocols supported by Si.
•Catiis a set of categories that Sibelongs to.
•Opeiis a set of operations provided by Si(cf. Definition 5).
•Staiis a set of states that Sirepresents (cf. Definition 3).
•P eoiis people who consume the service Si(cf. Definition 6).
Definition 2 : Environment. The environment Enviis defined as a tuple hname,
(val,uni,tsi,loci)i, where:
•name is an environmental variable of Envi.
Service mining for Internet of Things 3
service
name descriptionbinding category
operation
mode
input
output
description
name
precondition
parameter
name
data type
unit
quality
1:N1:1 1:N
1:1
1:1
1:N
domain
postcondition
availability
1:N
1:1
1:1
1:1
1:N
1:N
environment
name value
ready
state
start
start time-stamp
location
end time-stamp
location
people id
1:1
1:1
1:1
1:{0,1}
1:{0,1}
1:N
1:1
1:1
1:1 1:1
1:1
1:1
1:1
1:1
1:1
1:1
1:1
1:{0,1}
1:N
unit
1:1
time stamp
location
1:1
1:1
1:1
1:N
1:N
1:N1:N
active
end
1:1
1:1
time interval
1:1
location
1:1
Fig. 1. Ontology-based Description of Services
•(val,uni,tsi,loci) shows the recorded readings of the environmental variable.
The readings include value val, unit uni, time-stamp tsiand location loci.
The location is uniformly defined as a GPS point with a user-defined spatial
radius r. For simplicity, we use vtto refer to the value of the environment
variable at time point t.
Definition 3 : State. The state Staican only be an attribute in the tuple hready,
start,active,end iat a given time where:
•ready: the service is in the ready state if an invoking request has not been
made.
•start: the start state means that the service execution has been initiated.
The start state is defined by a tuple hsti,lociiwhere stiand lociare the
start time stamp and the location of initiating the service, respectively.
•active: the service is in the active state if the service is executing. The
active state is defined by a tuple htini,lociiwhere tiniand lociare the
time interval and the location of the service execution, respectively, and tini
=eti-sti.
•end: the service is in the end state if the service execution is terminated.
The end state is defined by a tuple heti,lociiwhere etiand lociare the
end time stamp and the location of terminating the service, respectively.
Definition 4 : Precondition and Postcondition. The precondition P reiis defined
as a tuple h(Sta1,S ta2··· Stai), (Env1,Env2···Envi)iwhere:
•Staiis the required state before executing an operation (cf. Definition 3).
4 Service mining for Internet of Things
•Enviis the required environment before executing an operation (cf. Defini-
tion 2).
The postcondition P osiis defined as a tuple h(Sta1,Sta2· · · Stai), (Env1,
Env2··· E nvi)iwhere:
•Staiis the effect state after executing an operation (cf. Definition 3).
•Enviis the effect environment after executing an operation(cf.Definition 2).
Definition 5 : Operation. An operation Opeiis defined by a tuple hname,des,
Cati,M odi,Inpi,Outi,Quai,P rei,P osiiwhere:
•name,des,Cati,M odi,Inpi,Outi,Quairefer to names, descriptions, cat-
egories, modes, input/output messages, and qualities, respectively [4].
•P reigives the preconditions of an operation (cf. Definition 4).
•P osigives the postconditions of an operation (cf. Definition 4).
Definition 6 : People. P eoiis defined as a tuple hid iwhere
•id is the unique identifier of people.
3 Service Mining Framework
The service mining framework consists of three phases. The framework starts
with the scope specification phase which consists of two steps. In the first step,
the user specifies a list of domains termed as mining context(M C). Domains
are specified by a set of ontologies [2]. Hence, ontologies related to MC can be
determined, which is denoted as Ont(MC). In the second step, a list of ser-
vices related to the mining context are identified, which are termed as mining
library(M L). Due to page limit, the detailed process of scope specification is
omitted. The scope specification is followed by the automatic service recognition
phase. In this phase, services will go through service recognition process for iden-
tifying related services which are represented as service composition leads. In the
evaluation phase, evaluation methodologies are proposed to identify interesting
service composition leads.
3.1 Service Recognition
We model service relationships from states,environments,people, and operations
perspectives.
(1) Two services Siand Skhave state relationship if they are spatial-temporal
dependent. Siand Skhave spatial dependency if Si.active.lociis located inside
the spatial circle centred at Sk.active.lockwith a geographic radius r[1]. For
example, the TV located in home A has a spatial dependency with the fridge
located in home A. This TV has no spatial dependency with the fridge located
in home B. We formalize the spatial dependency between Siand Skin Eq.(1).
distance(Si, Sk) = 2arcsinrsin2a
2+cos(Lati)×cos(Latk)×sin2b
2×re(1)
Service mining for Internet of Things 5
where a=Lati−Latk, b =Longi−Longk,reis the radius of earth. Lati
and Longirefer to the latitude and longitude of the location Si.active.loci.
Si.active.lociis GPS points of Si.ris a user defined radius. If distance(Si, Sk)≤
r,Siand Skare spatial dependent. Siand Skhave temporal dependency if one
of the following conditions is satisfied.
•Siis invoked in the execution time interval of Sk. That is Si.start.sti≥
Sk.start.stkand Si.end.eti≤Sk.end.etk. For example, the fridge door is opened
and closed during the time interval when TV is on.
•Siis invoked before Sk. That is Si.end.eti≤Sk.start.stk. For example, the
fridge door is closed and then TV is on.
•Siis invoked before Skand becomes the end state after Skis invoked. That
is Sk.start.stk< Si.end.eti< Sk.end.etkand Si.start.sti< Sk.start.stk. For
example, the oven is in use for a while, then the air-conditioning is turned
on. The air-conditioning keeps the active state for a time interval after the
oven is turned off.
(2) Two services Siand Skhave environment relationships if the following two
conditions are satisfied. We use →to denote state changes.
•the value of environment variable Envjis changed during the execution time
interval tin of Si. That is Si.state =active and Envj.vst6=Envj.vst+tin .
•the state of Skis transformed due to the environment changes. That is
Sk.ready→Sk.start→Sk.active or Sk.active→Sk.end→Sk.ready.
(3) Two services Siand Skare related through people if Siand Skare consumed
by the same person in a time interval. That is Si.P eoi=Sk.P eok. For example,
the TV and the fridge are used by the same people in a time interval.
(4) Two services Siand Skhave operation relationships if the two operations
Si.Opeiand Sk.Opekare syntactically compatible. The following two conditions
must be satisfied.
•Si.Opei.M odi=notification and Sk.Opek.M odk=one-way; or Si.Opei.M odi=
one-way and Sk.Opek.Modk=notification; or Si.Opei.M odi=solicit-response
and Sk.Opek.M odk=request-response; or Si.Opei.Modi=request-response and
Sk.Opek.M odk=solicit-response [4]. This condition implies that a one-way
operation must be mapped to a notification operation and a solicit-response
operation must be mapped to a request-response operation.
•Si.Opei.Outi⊇Sk.Opek.Inpk.
3.2 Evaluation
Not all discovered service composition leads are necessarily interesting in the
service recognition phase. An evaluation measure is needed to filter out uninter-
esting service composition leads. The evaluation phase consists of two steps. The
first step is Correlation Degree (CD) filtering which measures the relationship
strength between two services. Correlation Degree (CD) is defined in Eq.(2).
CD(Si, Sk) = η1·State(Si, Sk)+η2·Env(Si, Sk)+η3·P eo(Si, Sk)+η4·Ope(Si, Sk)
(2)
6 Service mining for Internet of Things
Where η1+η2+η3+η4= 1, State(Si, Sk), E nv(Si, Sk), P eo(Si, Sk), Ope(Si, Sk)
are binary values returned from the service recognition phase. We define a
correlation threshold (ζ) which is the minimum value allowed for the CD. If
CD(Si, Sk)≥ζ, then leads of composed services Siand Skare selected for
further evaluation. Otherwise Siand Skare filtered out.
The second step is interestingness evaluation. We first give the concept of
Availability (Ava), Domain Correlation (DC ), and Diversity (Div), and then
give the interestingness definition.
Availability.Ava is defined as a binary value (i.e., 1 for available, 0 for
unavailable). The source of availability information can be a registry that keeps
tack of the availability of services [2].
Domain Correlation.DC measures the relevance of two domains that ser-
vices Siand Skbelong to, respectively. The domain correlation of Siand Sk
is equivalent to the ontology correlation of Ont(Si) and Ont(Sk). We formally
define DC in Eq.(3).
DC(Si, Sk) = e−1
λ0·{sim(Ont(Si),Ont(Sk))+1}(3)
Where
Sim(Ont(Si), Ont(Sk)) =
w1·(|Npre(Si)|∩|Npre(Sk)|
|Npre(Si)|∪|Npre(Sk)|) + w2·(|Npos(Si)|∩|Npos(Sk)|
|Npos(Si)|∪|Npos(Sk)|)
+w3·(|Nin(Si)|∩|Nin(Sk)|
|Nin(Si)|∪|Nin(Sk)|) + w4·(|Nout (Si)|∩|Nout(Sk)|
|Nout(Si)|∪|Nout(Sk)|)
Where Si, Sk∈M L, wi(i= 1,2,3,4) is a weight such that wi∈[0,1] and
P4
1wi= 1. |Npre(Si)|,|Npos(Si)|,|Nin(Si)|, and |Nout(Si)|refer to the set of
preconditions, postconditions, input parameters, and output parameters of con-
cepts, respectively. Operators ∩and ∪are ontological overlap and union of two
concepts. When Sim(Ont(Si), Ont(Sk)) = 0, the correlation between two do-
mains is assigned with an initial value r0=e−1
λ0. Eq.(3) shows that DC(Si, Sk)
approaches 1 as Sim(Ont(Si), Ont(Sk)) increases. We define Div as the mul-
tiplicative inverse of the domain correlation. We bound the maximum value of
Div to 1. The Div is formally defined as follows.
Div =r0
DC(Si, Sk)(4)
The interestingness is defined as follows.
Interestingness =Ava ·w1+Div ·w2(5)
Where w1, w2are weights for Availability and Diversity respectively, wi∈[0,1](i=
1,2), and P2
1wi= 1. We define an interestingness threshold (ξ) which gives the
minimum value allowed for interesting service composition leads. If the value of
interestingness ≥ξ, then leads of composed services are considered interesting.
Otherwise the service composition leads are considered uninteresting.
Service mining for Internet of Things 7
4 Experiment Results
We study the effect of variables listed in Table 1 on the total number of dis-
covered service composition leads, the number of service composition leads after
Correlation Degree filtering, and the number of interesting service composition
leads. First, we model the ontology using a class whose domain attribute stands
for the domain of the ontology. We can obtain services with different domain
attributes through initializing the class by assigning different values to domain-
s. The rules of generating values shown in Table 1. For example, we randomly
generate its input/output parameters such that the number of these parameters
uniformly falls in the range of 0 to 5. The data type of each parameter is integer.
The bound of each parameter is 0 to 100. For simplicity, we only consider the
exact input/output parameter data type match.
Fig.2 (line a) shows that the total number of service composition leads in-
creases significantly as the number of services increases. This is an expected
result because as more services are introduced to the mining process, a service
has a higher chance of relating to other services. Fig.2 (line b) shows the effec-
t of the CD on filtering out uninteresting service composition leads. With the
number of services increasing, the CD can filter out uninteresting service com-
position leads to a large extent. Although the CD filtering technique reduces
the number of service composition leads to a much smaller size, there are ser-
vice composition leads that exhibit high CD values but are commonly known
or useless. The interestingness measure (Fig.2 (line c)) further filters out unin-
teresting service composition leads after the CD filtering. Compared with Fig.2
(line b), interestingness measures can reduce uninteresting service composition
leads significantly.
Table 1. Experiment Settings
Variable Value or Rang
Number of input parameters per operation 0-5
Number of output parameters per operation 0-5
Number of pre/pos-condition per operation 0-3
Range of input/output per operation (integer) 0-100
Range of pre/pos-condition per operation (float) 0-1
Temporal range (time-stamp) 0-24
Availability 0/1
r 10
η1/η2/η3/η40.1/0.2/0.3/0.4
w1/w20.3/0.7
λ00.1
ζ0.3
ξ0.6
5 Conclusion
We propose a service mining framework that enables the proactive discovery of
interesting service relationships. We propose an interestingness evaluation mea-
8 Service mining for Internet of Things
Fig. 2. Effects of Key Variables
sure to sort out interesting service composition leads. We also proposes an ontol-
ogy model for describing services. Future work includes developing a tool aiming
at providing visual aids toward representing the discovered service composition
leads. We also plan to improve the agility of our service mining framework to
accommodate for the dynamic expansion of services.
Acknowledgements
This research was made possible by NPRP 7-481-1-088 grant from the Qatar
National Research Fund (a member of The Qatar Foundation). The statements
made herein are solely the responsibility of the authors.
References
1. Neiat, A.G., Bouguettaya, A., Sellis, T., Dong, H.: Failure-proof spatio-temporal
composition of sensor cloud services. In: Proc. of ICSOC. pp. 368-377 (2014)
2. Zheng, G., Bouguettaya, A.: Service mining on the web. IEEE Transactions on
Services Computing 2(1), 65-78 (2009)
3. Atzori, L., Iera, A., Morabito, G.: The internet of things: A survey. Journal of
Computer networks 54(15), 2787-2805 (2010)
4. Medjahed, B., Bouguettaya, A.: Composing web services on the semantic web. Jour-
nal of the VLDB 12(4), 333-351 (2003)
5. Baldauf, M., Dustdar, S.: A survey on context-aware systems. Journal of Ad Hoc
and Ubiquitous Computing 2(4), 263-277 (2007)
6. Abowd, G.D., Dey, A.K., Brown, P.J., Davies, N., Smith, M., Steggles, P.: Towards
a better understanding of context and context-awareness. In: Proc. of International
Symposium on Handheld and Ubiquitous Computing. pp. 304-307 (1999)