Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Chinese Journal of Electronics

Vol.25, No.2, Mar. 2016

A Stochastic Approach of Dependency Evaluation


for IoT Devices∗
HUANG Jiwei, CHEN Guo and CHENG Bo
(State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications,
Beijing 100876, China)

Abstract — Internet of things (IoT) is an emerging The IoT consists of a large number of devices, of-
technique that offers advanced connectivity of devices, sys- fering a wide variety of functionalities to meet user de-
tems, services, and human beings. With the rapid develop-
ment of hardware and network technologies, the IoT can
mands. Furthermore, the IoT devices can cooperate with
refer to a wide variety and large number of devices, result- others to fulfill some complex functionalities that a sin-
ing in complex relationships among IoT devices. The de- gle one does not have, such as data fusion with multi-
pendencies among IoT devices, which reflect their relation- dimensional sensor data or collaborations in manufactur-
ships, are with reference value for the design, development
and management of IoT devices. This paper proposes a
ing systems, leading to the complicated relationships be-
stochastic model based approach for evaluating the depen- tween IoT devices. Such relationships, which can be de-
dencies of IoT devices. A random walk model is proposed scribed by dependencies among IoT devices, can provide
to describe the relationships of IoT devices, and its corre- both system/application developers and managers with a
sponding Markov chain is obtained for dependency analy-
sis. A framework as well as schemes and algorithms for de- better understanding of the characteristics and behaviors
pendency evaluation in real-world IoT are designed based of devices in the IoT. Therefore, the modeling, analysis,
on traffic measurement. Simulation experiments based on and measurement of dependencies between IoT devices
real-life data extracted from smart home environments are
are with reference value for the design, development and
conducted to illustrate the efficacy of the approach.
management of IoT devices and services.
Key words — Internet of things (IoT), Dependency,
With the increasing number of devices in the IoT,
Random walk, Markov chain.
the behavior of the devices and the services shows high
I. Introduction dynamics[2] , and thus can be regarded as stochastic pro-
cesses from the top-down viewpoint. Studying the depen-
The Internet of things (IoT) is an emerging concept, dency problem using statistic and stochastic theories can
which is expected to provide advanced connectivity of de- provide us with a valuable understanding of the IoT from
vices, systems, and services that goes beyond Machine- a systematic point of view. Therefore, this paper models
to-machine (M2M) communications and covers a variety the dependencies of IoT devices as random walks, and
of protocols, domains, and applications[1] . With the rapid presents their corresponding Markov chains for quantita-
development of the underlying techniques related to the tive analysis of the dependencies. Furthermore, in order
IoT such as electronics, sensors, networking, embedded to evaluate the dependencies in real-life IoT systems, a
systems, and upper-layer software, the IoT has started to framework based on traffic measurement is proposed, and
achieve great value and service by exchanging data with algorithms for obtaining dependency metrics are intro-
the manufacturer, operator and/or connected devices. It duced. Finally, simulation experiments based on data set
has become widely used in many aspects of human life, from real-world smart home environments are conducted
such as industrial manufacturing, medical and health- to validate the effectiveness of our approaches.
care systems, environmental monitoring, transportation, The contribution of this paper is mainly twofold as
building and home automation, etc. follows:
∗ Manuscript Received Aug. 31, 2015; Accepted Oct. 28, 2015. This work is supported by the National Natural Science Foundation of

China (No.61502043 and No.61132001), National High-tech R&D Program of China (863 Program) (No.2013AA102301), Beijing Natural
Science Foundation (No.4162042), BeiJing Talents Fund (No.2015000020124G082), and the Fundamental Research Funds for the Central
Universities (No.2015RC22).
c 2016 Chinese Institute of Electronics. DOI:10.1049/cje.2016.03.003
210 Chinese Journal of Electronics 2016

• We study the dependency problem from a stochastic for dependency evaluation for IoT devices which will be
angle. The relationships between IoT devices are modeled described in detail in the following sections.
by stochastic processes, and statistic theory is applied to
provide quantitative analyses. Evaluating the dependen-
III. Dependency Model for IoT Devices
cies from a top-down point of view can provide the system
designers and managers with insights of the behaviors of 1. Random walk model
the IoT devices, helping them to better the designs and
We suppose there are n devices to be evaluated in (a
implementations.
subset of) the IoT, denoted by a set D = {1, 2, . . . , n}.
• A traffic-based approach is designed for evaluating
From a statistic point of view, the dependency of two IoT
the dependencies in the IoT. Since our evaluation is con-
devices i, j ∈ D can be described by the probability that
ducted at network layer, it is able to overcome the high
one device behaves relying on the other, expressed by pij
heterogeneity of the IoT devices and can be applied to
and pji . Here, pij represents the fraction of times that de-
any type of IoT system. 
vice i is dependant on device j, and j pij = 1. Since the
devices may be invoked by different applications/devices
II. Related Work in different scenarios, both pij and pji take their values
from 0 to 1, and pij = pji may hold.
IoT is an emerging technique which is being widely
Therefore, the relationships among the IoT devices
applied in several aspects of our daily life. With the rapid
can be indicated by a directed graph G = (V, E). The
development of IoT technology, researchers have begun
vertices V represent the set of devices that need to be
to realize that there are a great number of innovative op-
evaluated, i.e., V = D, and the edges E denotes their
portunities if the IoT devices can work together. Li and
invoking relationships. An edge from vertex i to vertex j
Sun[3] proposed a semantic-based approach of IoT service
can be expressed by a 3-tuple eij = i, j, pij , where the
mining for in-depth applications in the IoT. Byun et al.[4]
edge’s weight is assigned by the probability pij . Thus, the
applied ontology techniques for describing IoT function-
dynamic invocations between IoT devices can be repre-
alities, and studied the social relationships among people
sented by random walks on the graph G, where at each
and smart things. Choi et al.[5] presented a distributed
step the location jumps from i to another site j according
coordination scheme for IoT-based services in order to
to the probability distribution of pij . Hence, the steady-
improve the scalability and efficiency of service collabo-
state probabilistic distribution of each state in the random
ration. Liu et al.[6] used a function graph to model the
walks can represent the importance of the corresponding
composite services deployed on smart devices, and fur-
device.
ther considered Quality of service (QoS) in their service
composition. Although all these existing works showed the 2. Primitive Markov model for random walks
powerful strength when IoT devices work cooperatively, We let St represent the state of the random walk
the research on the relationships among IoT devices re- process at time epoch t, and Xt = St+1 − St . Recall
mains unexplored. that the transitions are Independent and identically dis-
It has been stated in Ref.[7] that the interactions be- tributed (i.i.d.) random variables, for any set of integers
tween smart devices start to show social properties. Since b, b0 , b1 , . . . bm , we have the following equations, which
IoT devices appear significant dynamics with time[8] , show the memoryless property of the process.
some stochastic approaches from statistical viewpoints for Pr(Sm+n = b|S0 = b0 , S1 = b1 , . . . , Sm = bm )
(social) network analysis may be with reference value[9] . m+n

Thurner and Biely[10] used random graph theory to study = Pr( Xt = b − b m )
the state probabilities of network systems. Wang et al.[11] t=m+1
applied a generalized Markov graph model to network = Pr(Sm+n = b|Sm = bm )
analysis, providing new insights into the characteristics 
Moreover, as we already have j pij = 1 for all
of social networks. Also, some methodologies for depen-
i ∈ D, the random walk can be regarded as a Discrete-
dency evaluation in other backgrounds may provide us
time Markov chain (DTMC). The transition matrix P
some insights. Alinaghi et al.[12] presented a quantita-
of the Markov chain is time-independent, where Pij =
tive approach for dependency evaluation of agent oriented
Pr(St+1 = j|St = i) = pij . Therefore, we are able to
methodologies to guide software development. The exist-
obtain the steady-state probabilities of the states π =
ing researches guide us to study the IoT quantitatively
[π1 , π2 , . . . , πn ] using the following equations, where 1 is
from a statistical angle, however, how to apply related
a column of ones.
theories and models to dependency evaluation in IoT re-

mains unsolved. In this paper, we make an attempt at fill- π·P =π
(1)
ing this gap, and present stochastic models and schemes π·1= 1
A Stochastic Approach of Dependency Evaluation for IoT Devices 211

3. Complemental Markov model for depen- matrix P  = [pij ]n×n .


dency evaluation
Although the above model works in most of the sce-
IV. Approach for Dependency Evaluation
narios, it has to be further discussed and advanced, es- 1. Framework
pecially for the convergence issue to the stationary distri- In IoT systems, most of the interactions among IoT
bution. A typical example that fails our model is an IoT devices are initiated by upper-layer applications, aiming
device which does not depend on any other device in the to cooperate the devices in order to meet users’ functional
IoT while being relied on by some other devices. Such de- requirements. However, evaluating dependencies at appli-
vice acts as an absorbing state of the Markov chain, which cation layer is impractical in reality, because the mea-
pulls all the stationary distribution towards it resulting in surement programs have to be designed and implemented
its steady-state probability being 1 while the others being within the upper-layer softwares and vary significantly
0. Therefore, our model has to be well dealt with in order with different applications. Therefore, since various types
to adapt to all the situations in IoT. of applications have been deployed in the IoT, our ap-
After deep thinking about the characteristics of IoT, proach is built at the network layer instead of the appli-
we find that not only the interrelationships between IoT cation one, in order to improve the generality by avoiding
devices affect their dependencies, but also the upper-layer detailed interactions or tedious coding with different ap-
applications have some influence on the devices at cer- plications. As traffic measurement has been widely used
tain level. For instance, the applications initially activate in traditional Internet for application identification and
a certain one of the devices to start a workflow in IoT, performance evaluation[13] , we borrow such idea to de-
making it more important to others because of its ini- pendency evaluation in IoT environments.
tial position in a workflow. Furthermore, the device at Fig.1 shows the basic framework of our approach. A
the end of a workflow, although not depended by other measurement server is deployed on the network layer,
devices, is relied on by applications, which might be a and interacts with the networking equipments (routers or
key to start a new service (workflow) at an upper layer. switches) gathering traffic information among the IoT de-
Therefore, the upper-layer applications should be care- vices and the upper-layer applications. The traffic is cat-
fully considered when evaluating the dependencies of IoT egorized into two parts, i.e., interior traffic and exterior
devices, and additionally their involvements can solve the traffic. The former one represents the network traffic be-
convergence issue which will be shown in the following tween all the IoT devices, while the latter one denotes the
discussions. traffic between IoT devices and the upper-layer applica-
In our model, when an IoT device is initially invoked tions that invoke them. The interior traffic is used to build
by an application, we regard such device depends on the our primitive Markov model for random walks between
upper-layer applications. Such complemental modification IoT devices with transition matrix P , and the model will
to our original model makes it possible of the initial state be further complemented by the scheme presented in the
in the random walks to jump out of itself, and thus ab- above section using the information extracted from the ex-
sorbing states can be eliminated. On the other hand, if a terior traffic. With the complemental Markov model, the
device is at the end of a workflow, we say it is depended dependencies between IoT devices is calculated by solv-
by the upper-layer applications. The transitions from ap- ing the Markov model, which will be finally stored in the
plications to devices are able to avoid the existence of database on the server.
nonrecurrent states in the Markov chains. Therefore, our
complemental DTMC is irreducible, and thus its proba-
bilistic distribution is stationary.
Mathematically, the transition probabilities in our
complemental Markov model is defined by the following
expression.

pij = (1 − pi∗ ) · pij + pi∗ · p∗j (2)

Here, we define pi∗ as the fraction of time that device i de-


pends on the upper-layer applications comparing to other
devices, and p∗j as the fraction of time that device j is
depended by the upper-layer applications within all the
n
depended devices, letting j=1 p∗j = 1 hold. Therefore,
n
it is obvious that j=1 pij = 1, and thus we obtain a com-
plemental DTMC with the updated transition probability Fig. 1. Framework of Dependency Evaluation
212 Chinese Journal of Electronics 2016

2. Schemes and algorithms Using the Markov chain with transition matrix P  ,
1) Traffic measurement our approach next calculates the steady-state probabil-
The server connects to the networking equipments in ity of each state to evaluate the importance of each de-
the IoT, continuously gathering traffic information. Such vice. The calculation is to solve the linear equations ex-
process can be done from two aspects. On one hand, the pressed by Eq.(1) using computational methods. An in-
measurement of the traffic in IoT can be conducted in tuitive way is to find the steady-state probabilities π it-
a by-pass manner, which captures and analyzes network eratively, shown by Algorithm 1. Such approach is able
packages at the individual server. Examples of such mea- to find the ε-stationary steady-state probability of each
surement tools are libpcap on Linux platforms and win- state of the DTMC.
pcap in Windows systems. On the other hand, our ap-
Algorithm 1 Iterative algorithm for solving Markov model
proach can be deployed directly on the routers when they
1: Select an arbitrary π0 subject to π0 · 1 = 1;
are equipped with full functionalities of calculation and 2: for t ← 0 to ∞ do
storage. An example is to implement our approach in a 3: πt+1 ← πt · P 
software-defined router and run our algorithms simulta- ` ´1/2
4: if (πt+1 − πt ) · (πt+1 − πt )T < ε then
neously with routing. 5: return πt+1
The Markov dependency model can be built from the 6: end if
traffic information obtained by the server. The interior 7: end for
traffic within the IoT devices are stored in a matrix de-
noted by T = [tij ]n×n , whose element tij represents the During the evaluation processes, if the traffic infor-
traffic information from device i to j. tij can be denoted by mation is updated, our approach has to recalculate the
the amount of network traffic through the router when we stationary distributions. However, we restart the itera-
aim to analyze the characteristics of the IoT from a net- tion from the stationary distribution of the Markov chain
working point of view, or by the time of invoking (number before updating, which can significantly accelerate the it-
of flows from device i to j) when we concern the problem erations in most of the cases. Since usually only a small
more on the application layer. The exterior traffic is stored part of the devices are involved in an update, the up-
by vectors A = [a1 , a2 , . . . , an ] and D = [d1 , d2 , . . . , dn ], dated stationary distribution is in some sense close to the
which indicate the arrival and departure traffic informa- original one, and thus our approach is able to produce
tion to/from the devices respectively. Also, their calcula- an accurate approximation to π in fewer iterations than
tion can be conducted in either networking or application are required when using an arbitrary initial vector. More
way. specifically, it has been proved that the asymptotic rate of
With all the traffic information, we are able to obtain convergence of the iterations is R = − log |λ2 |, where λ2
the model parameters as follows. Since the interior traffic is the subdominant eigenvalue of the updated transition
shows the interrelationships within the IoT devices, we probability matrix[14] .
build the primitive Markov model from them using the Another approach for solve the Markov model is to
following expression. transform the problem into eigenvector calculation. After
simple transformation from Eq.(1), we are able to draw
tji the conclusions that one is an eigenvalue of the transpose
pij = n (3)
 of the transition matrix, and its associated eigenvector
tki
k=1
equals to π. Therefore, we can apply numerical analysis
methods which have been studied for decades. Examples
Considering the upper-layer applications, one can obtain include some well-known approaches such as Power it-
the complemental model with additional A and D using eration or Inverse iteration, as well as some recent devel-
Eq.(2). The calculations of the parameters pi∗ and p∗j are oped techniques with faster speed, i.e., Multiple relatively
shown as follows. robust representations (MRRR)[15] . Also, the iterations
ai in eigenvector calculations can be accelerated by starting
pi∗ = n (4)
 with the recent steady-state probabilities upon updating.
ai + tki
k=1

V. Empirical Evaluation
dj
p∗j = n (5)
 1. Dataset and experimental setup
dk
In order to validate the effectiveness of our approach
k=1
in real IoT environments, we conduct simulation experi-
2) Solving Markov model ments based on an open-source IoT dataset from a real-
A Stochastic Approach of Dependency Evaluation for IoT Devices 213

world smart home environment[16] . Such data set is col- Furthermore, the steady-state probabilities of the IoT
lected by 161 sensors in two different smart home apart- devices in the complemental Markov models are obtained
ments for continuously 14 days, in which more than 1,000 using Algorithm 1. We sort such probabilities in each of
pieces of data are recorded involving more than 200 ac- the two smart home environments and then show the top-
tivities in human daily lives. 20 ones with their corresponding device ID, by Figs.3 and
Using the activity information from the dataset, one 4. From what we obtained with our model, it is quite clear
can obtain the invoking relationships between IoT devices which devices are more important (depended by other de-
in each activity by measuring the interior traffic among vices) in the IoT environments. Due to different rules and
the devices. On the other hand, the exterior traffic can habits of their daily lives, the steady-state probabilities
be acquired by analyzing the information of the first and vary in different smart home apartments. We see that the
the last devices in each activity. After aggregating all the hot water faucet is the most important device in the first
information from measurements, we are able to obtain the apartment, while such device only ranks 16 in the second
complemental Markov model, and thus the dependencies apartment. Meanwhile, some types of devices are popular
can be analyzed quantitatively by the calculations intro- in both of the two apartments, such as the refrigerator,
duced in the previous sections. cold water faucet, shower faucet, etc. Thus, since such
top-important devices have significant influence on daily
2. Experimental results
lives, we may conclude that they should be carefully de-
We build Markov models for the IoT devices in both signed and maintained for guaranteeing the Quality of
of the two apartments. Fig.2 illuminates a typical lunch- service (QoS) of the smart home IoT. Our approach is to
preparing scenario in daily lives of residents in one the provide guidance for the design and management of IoT
the apartments. Such scenario consists of a workflow in- devices.
volving four IoT devices. Firstly two different refrigerators
are invoked, followed by a freezer. After that, the refrig-
erator numbered 91 is used again after the freezer gets
closed. Finally, a microwave is invoked twice before fin-
ishing preparing the dinner.

Fig. 3. Top-20 steady-state probabilities of IoT devices in


apartment 1

Fig. 2. Experimental result of a typical lunch-preparing sce- Fig. 4. Top-20 steady-state probabilities of IoT devices in
nario apartment 2

In Fig.2, the solid arrows represent the transitions of


the initial traffic among IoT devices, and the numbers la- VI. Conclusion
beled on the arrows show the transition probabilities in
the workflow, i.e., normalized tij obtained by the initial Dependency evaluation is an important procedure for
measurements of our approach. Upon quantitative analy- understanding complex relationships among IoT devices,
sis of all the transition probabilities, we obtain the tran- especially in large-scale heterogenous IoT environments.
sition probabilities of the primitive Markov model (pij ) With the increasing number and variety of IoT devices,
using Eq.(3), and thus we have the model parameters their relationships show high dynamics and stochastic
of the complemental Markov model (pij ) with equations characteristics, resulting in the difficulty with traditional
Eqs.(2), (4) and (5). The transition probabilities of the static or manual approaches of dependency evaluation.
complemental model are illuminated by the dashed ar- To fill this gap, this paper proposes a stochastic approach
rows in Fig.2. of dependency evaluation for IoT devices. A random walk
214 Chinese Journal of Electronics 2016

model is built to describe the relationships of IoT devices, complex networks”, Physica A: Statistical Mechanics and Its
and a Markov chain based approach is proposed for depen- Applications, Vol.372, No.2, pp.346–353, 2006.
[11] T. Wang, H. Krim and Y. Viniotis, “A generalized Markov
dency evaluation in real-world IoT environments. Traffic
graph model: Application to social network analysis”, IEEE
measurement based schemes as well as algorithms for de- Journal of Selected Topics in Signal Processing, Vol.7, No.2,
riving the quantitative models are designed, and real-life pp.318–332, 2013.
data based simulation experiments are conducted. This [12] T. Alinaghi, C. Ghoroghi, A. Saborui and R. Basseda, “A
framework for dependency evaluation of the agent oriented
work is expected to provide theoretical and technical ref-
methodologies work flows”, Third IEEE International Sympo-
erence to the design, development and management of the sium on Theoretical Aspects of Software Engineering (TASE
IoT. 2009), pp.289–290, 2009.
There are several avenues for future work. The ap- [13] A. Callado, C. Kamienski, G. Szabo, et al., “A survey on inter-
net traffic identification”, IEEE Communications Surveys Tu-
proach presented in this paper could be implemented in
torials, Vol.11, No.3, pp.37–52, 2009.
real large-scale IoT systems. The experimental results as [14] C.D. Meyer, Matrix Analysis and Applied Linear Algebra,
well as trace data in reality can provide us with a bet- SIAM, Philadelphia, PA, 2000.
ter understanding of the behavior and characteristics of [15] I.S. Dhillon, B.N. Parlett and C. Vömel, “The design and im-
IoT devices and related applications, which can help to plementation of the MRRR algorithm”, ACM Transactions on
Mathematical Software, Vol.32, No.4, pp.533–560, 2006.
improve the design of the IoT software and services. An- [16] E.M. Tapia, et al., “Activity recognition in the home using
other goal of our future work is to further accelerate our simple and ubiquitous sensors”, Pervasive Computing, Lecture
approach. Updating techniques for solving Markov model Notes in Computer Science, A. Ferscha and F. Mattern, Eds.
can be applied, and our approach can be implemented Springer Berlin Heidelberg, Vol.3001, pp.158–175, 2004.
in a parallel way. The efficient evaluation would offer a HUANG Jiwei was born in 1987,
sustain of real-time decision making in high dynamic IoT he received the Ph.D. and B.Eng. de-
environment. grees both in computer science and technol-
ogy from Tsinghua University in 2014 and
2009, respectively. He is now an assistant
professor in the State Key Laboratory of
References Networking and Switching Technology at
[1] J. Höller, V. Tsiatsis, C. Mulligan, et al., From Machine-to- Beijing University of Posts and Telecom-
Machine to the Internet of Things: Introduction to a New Age munications. He was a visiting scholar at
of Intelligence, Elsevier, 2014. Georgia Institute of Technology. His re-
[2] M. Davoudpour, A. Sadeghian, and H. Rahnama, “CANthings search interests include services computing, Internet of Things, and
(Context aware network for the design of connected things) performance evaluation. He has published more than 20 papers in
service modeling based on Timed CPN”, IEEE International international journals and conference proceedings, e.g., IEEE Trans-
Conference on Semantic Computing (ICSC 2015), pp.127–130, actions on Services Computing, ACM SIGMETRICS, IEEE ICWS,
2015. IEEE SCC, etc. (Email: huangjw@bupt.edu.cn)
[3] X. Li and Y. Sun, “A service mining scheme based on semantic
CHEN Guo was born in 1991, he
for Internet of Things”, Chinese Journal of Electronics, Vol.23,
received his B.Eng. degree in computer sci-
No.2, pp.236–242, 2014.
ence and technology from Beijing Univer-
[4] J. Byun, S.H. Kim and D. Kim, “Lilliput: Ontology-based plat-
sity of Posts and Telecommunications in
form for IoT social networks”, 2014 IEEE International Con-
2013. He is now a graduate student in the
ference on Services Computing (SCC 2014), pp.139–146, 2014.
State Key Laboratory of Networking and
[5] J.-H. Choi, J.-H. Cho, H.-G. Ko and I.-Y. Ko, “Distributed
Switching Technology at Beijing University
coordination of IoT-based services by using a graph coloring
of Posts and Telecommunications. His cur-
algorithm”, IEEE 37th Annual Computer Software and Appli-
rent research interests include Internet of
cations Conference (COMPSAC 2013), pp.399–404, 2013.
Things, distributed system, operating sys-
[6] C. Liu, J. Cao and J. Wang, “A parallel approach for ser- tem and cloud computing, etc. (Email: guochen09@gmail.com)
vice composition with complex structures in pervasive environ-
ments”, 2015 IEEE 22nd International Conference on Web CHENG Bo was born in 1975,
Services (ICWS 2015), pp.551–558, 2015. he received the Ph.D. degree in computer
[7] L. Atzori, A. Iera and G. Morabito, “SIoT: Giving a social struc- science and engineering from University
ture to the Internet of Things”, IEEE Communications Letters, of Electronic Science and Technology of
Vol.15, No.11, pp.1193–1195, 2011. China in 2006. He is now a professor in
[8] X. Xu, S. Huang, Y. Chen, et al., “TSAaaS: Time series analyt- the State Key Laboratory of Networking
ics as a service on IoT”, 2014 IEEE International Conference and Switching Technology at Beijing Uni-
on Web Services (ICWS 2014), pp.249–256, 2014. versity of Posts and Telecommunications.
[9] R. Albert and A. Barabasi, “Statistical mechanics of complex His current research interests include net-
networks”, Reviews of Modern Physics, Vol.74, No.1, pp.47–97, work services and intelligence, Internet of
2002. Things technology, communication software and distribute comput-
[10] S. Thurner and C. Biely, “Two statistical mechanics aspects of ing, etc. (Email: chengbo@bupt.edu.cn)

You might also like