Академический Документы
Профессиональный Документы
Культура Документы
Abstract—The advent of the Internet of Things (IoT) and its There is currently an unbridged gap related to the under-
innumerous applications for Smart Cities emphasizes the need standing of the relationship between context entities and of
for context-aware systems able to adapt behavior automatically to tracking the occurrence of events in IoT-based applications.
instant environment conditions. Currently, there is a gap in terms
of understanding how context information is interrelated, as well Context modeling remains a low level process that requires
as tracking which events occurred under which conditions within higher levels of human expertise. Visualizing, specifying,
certain context scopes. Visualizing, specifying, tracking and mon- tracking, and monitoring typical contexts involved in IoT-
itoring typical contexts involved in IoT-based applications are based applications are still challenging activities. Data man-
still challenging activities since context modeling remains a low agement strategies in IoT-generated big data scenarios require
level process that requires much human expertise. In this paper
we propose a new context life cycle that involves context design a deeper understanding of context information and there-
and context tracking. We developed a context-aware management fore we argue that context design and context tracking
framework, where contexts are modeled as graphs and can be are essential activities of a context life cycle for Smart
explicitly designed and their occurrences can be tracked down. Cities.
We believe that this feature of designing and tracking context In this paper, we advocate that not only low-level context
graphs may help developers, administrators, and end-users in
harnessing the wealth of information generated by highly scalable modeling for context reasoning purposes is needed, but also
IoT systems. higher-level context modeling can be easily expressed and
understood by humans. Context design is a high-level con-
Index Terms—Context-aware management, Internet of
Things (IoT), Smart Cities, smart energy management. text modeling approach, where entities and their relationship
are represented as a context graph. It provides three key fea-
tures for an IoT-based application for Smart Cities, such as
I. I NTRODUCTION smart energy management.
ONTEXT-AWARE systems first appeared in a pre- 1) Users can explicitly design contexts that were planned
C Internet era, where no one imagined that nowadays
they would have a perfect symbiotic relationship with the
to occur in a given setting.
2) Implicit nonplanned contexts, both wanted and unwanted
Internet of Things (IoT), helping us to make sense out of ones, can be tracked and expressed in the same model
the wealth of information generated by different types of sen- used on explicitly created contexts.
sors. By making systems able to adapt behavior automatically, 3) Both explicitly created and implicitly discovered con-
context-aware management for IoT has been increasingly used texts can be actively monitored for troubleshooting,
within the scope of big data analytics [12], [14]. Regardless of auditing and demonstration purposes.
how sensor data and other information are managed, context We developed and deployed a context-aware management
needs to be fully understood and carefully considered in IoT- system, where contexts are modeled as graphs, which can
based applications in order to guarantee an effective, efficient, be explicitly designed and whose occurrences can be tracked
and scalable automatic decision-making process. We consider down. Our context-aware system for IoT-based applications
context-awareness a key component of a middleware aimed for Smart Cities has been implemented, deployed, and tested
at enabling rapid development of IoT-enabled applications, for troubleshooting and monitoring purposes, within the scope
mainly for smart energy management [8]. of the IMPReSS Platform [9]. Designing and tracking context
graphs may be successfully used in order to help develop-
Manuscript received January 31, 2017; revised August 8, 2017; accepted ers, administrators, and end-users in harnessing the wealth of
August 22, 2017. Date of publication September 1, 2017; date of current information generated by IoT-based applications.
version April 10, 2018. This work was supported by the European Commission
and CNPq within the IMPReSS Project under Grant 614100. (Corresponding Summarizing, the expected key contributions of this paper
author: Carlos A. Kamienski.) are manifold, focused on the development, experimentation
C. A. Kamienski, F. F. Borelli, G. O. Biondi, I. Pinheiro, and and evaluation of context design and tracking features for
I. D. Zyrianoff are with the Federal University of ABC, Santo André
09210-580, Brazil (e-mail: cak@ufabc.edu.br; fabrizio.borelli@ufabc.edu.br; Smart Cities. We identify the need of a new context life cycle
gabriela.biondi@ufabc.edu.br; isaac.pinheiro@aluno.ufabc.edu.br; that captures some higher-level context management needs,
ivan.zyrianoff@ufabc.edu.br). such as context design, monitoring, and tracking, as well as
M. Jentsch is with Fraunhofer FIT, 53754 Sankt Augustin, Germany
(e-mail: marc.jentsch@fit.fraunhofer.de). explicitly identifying context occurrences. Based on that, we
Digital Object Identifier 10.1109/JIOT.2017.2748037 developed the concept of a context graph, where vertices are
2327-4662 c 2017 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
688 IEEE INTERNET OF THINGS JOURNAL, VOL. 5, NO. 2, APRIL 2018
represented by context entities and the set of edges is repre- a whole for system development purposes. Although ontology-
sented by data flow (or control flow) between entities. Context based modeling and reasoning are very attractive due to high
graphs can be explicitly created in the context design phase expressiveness, there are disadvantages enough to make it
and they can be actively tracked and implicitly discovered by impractical for an operational system, where scalability is very
in the context tracking phase. Whereas the context graph is important [11]. A very common approach is using object-
the key underlying concept of our approach, its importance is oriented modeling with rule-based reasoning, which usually
leveraged when connected to context design and tracking. are seamlessly integrated in a variety of existing platforms.
In the remainder of this paper, Section II presents back- One key feature and an important application for Smart
ground and related work. Section III introduces our context Cities is smart energy management, aiming at achieving
life cycle and context graph and Section IV introduces the high efficiency by avoiding waste. Particularly in industrial-
context-aware management framework focusing on the context ized countries, where buildings account for 40% of energy
processing phase. Sections V and VI depict the two key topics usage [16], a challenging problem is how to improve occu-
of this paper, which are context design and context tracking, pant comfort and at the same time reduce energy usage [6].
respectively. In Section VII, we draw the conclusions and paths Byun and Park [5] investigated context awareness for saving
to future work. energy. Their system consists of a self-adaptive intelligent
gateway (SIG) and sensors (SIS). SIG provides service pro-
vision based on locations and SIS is used for gathering
II. BACKGROUND AND R ELATED W ORK information. For instance, when a user with a smartphone
When fully deployed, the IoT [1] will allow a huge variety enters a room, SIG is able to send a list of the manageable
of new services to be available for our society. Making cities devices and their real-time energy consumption. This system
smarter poses many technological challenges for IoT [17], big is highly focused and dependent on typical energy saving
data [12], cloud [4] among other technologies, but also pro- mechanisms from the area of wireless sensor networks, such
vides opportunities for new applications (verticals), such as as efficient energy-based routing. On the contrary, we focus
smart energy management [3]. on a higher-level context modeling approach, which allows
Context-aware systems acquire different types of informa- contexts to be actively tracked and monitored.
tion for reasoning and adapt their behavior without explicit The IMPReSS systems development platform enables rapid
user intervention [2]–[11]. Currently, with the advent of the development of context-aware mixed-criticality IoT-based
IoT and the innumerous applications in Smart Cities, context- applications [9]. IMPReSS offers a variety of components
aware management has been increasingly used within the for facilitating the development of IoT-enabled applications,
scope of big data analytics [12]–[14]. Regardless of how sen- which includes a context manager. While in [9] we briefly
sor data and other information are managed, context needs described the context manager and introduced some use
to be fully understood and carefully considered in IoT-based cases, here we elaborate on the new concepts underlying
applications in order to guarantee an effective, efficient, and the IMPReSS context-aware management framework, namely,
scalable decision-making process. We consider context aware- the context life cycle, the context graph, context design, and
ness as a key component of a middleware aimed at enabling context tracking. Also, in [7] we focused on communication
agile development of IoT-enabled applications, mainly for issues of IMPReSS, but do not elaborate on context-aware
smart energy managing [8]. management for IoT.
Due to the fact that context-aware management is not a new We consider that our high level context life cycle, the concept
subject and application scenarios evolved substantially in the of context modeling as a context graph and the resulting context
last years, we identified the need to modernize some con- design and context tracking features are novel compared to the
cepts like the context life cycle to keep theory up-to-date current state of the art. Therefore, to the best of our knowledge,
with newer hands-on experience in designing, developing, there is no similar context-aware management framework with
deploying, and evaluating related technology to the IoT realm. those features in the literature thus avoiding direct qualitative
Perera et al. [15] proposed a context life cycle management for and quantitative comparisons to be conducted.
IoT composed of four phases: 1) context acquisition; 2) mod-
eling; 3) reasoning; and 4) dissemination. Although useful,
III. C ONTEXT L IFE C YCLE AND THE C ONTEXT G RAPH
this model is data oriented and does not consider typical man-
agement activities involved in IoT systems. Our context life A. Context Life Cycle
cycle captures some higher level context management needs, Context life cycle management here refers to a higher-
such as context design, monitoring, and tracking, as well as level function-oriented view of context-awareness for IoT,
context occurrence as an important entity to be modeled and compared to a lower level data-oriented view introduced by
whose own life cycle should also be followed. Perera et al. [15]. Our context life cycle is composed of six
The key components of any context-aware system are phases, as depicted by Fig. 1.
context modeling and context reasoning. The choice of a con- • Context Design: Context design is a high-level context
text model is a very important step in any context-aware modeling approach, where entities and their relation-
system because it influences the whole system and also lim- ships are represented as a graph. The context designer is
its the choice of a context reasoning technique. Therefore, a graphical tool that allows context graphs to be explicitly
context modeling and reasoning are usually considered as specified. The importance of context design is highlighted
KAMIENSKI et al.: CONTEXT DESIGN AND TRACKING FOR IoT-BASED ENERGY MANAGEMENT IN SMART CITIES 689
B. Context Entities
in our life cycle because it helps administrators to follow
We identified six essential entities for modeling typical
and understand context occurrences.
IoT-based context-aware management applications: resource
• Context Editing: Context entities must be stored in the
(sensors and actuators), place (buildings, rooms, floors), fusion
context storage in order to be available for context pro-
(sensor data aggregation), rule (context reasoning), action
cessing. Performing [create, read, update, delete (CRUD)
(commands to actuators), and context (combination of place,
operations on context entities] is a straightforward but
resource, fusion, rule, and action). Those entities were cho-
necessary feature. As a matter of fact, context design
sen specifically for smart energy management systems [8].
can be understood as a special way of editing contexts,
Other models for different applications might result in slightly
modeled, and visualized as a context graph.
different sets of entities.
• Context Occurrence: Contexts occur when they undergo
Fig. 2 depicts the relationships among these entities.
a process that starts with data coming from sen-
• Place has Resource: Sensors and actuators are physically
sors (resources), being transformed by fusion, firing a rule
located in places.
for taking a decision that executes actions with commands
• Resource Feeds Fusion: Fusion criteria combines
for actuators (resources). In other words, contexts occur
data coming from sensors.
when an instance of the related context graph is activated
• Fusion Fires Rule: Rules are fired by fusion criteria.
by data flow. The concept of context provides a more
• Rule Binds to Place: Rules are bound to places, for
precise understanding of the dynamics involved in the
ensuring locality of effect.
process of adapting system behavior.
• Rule Performs Action: When a rule is fired, it performs
• Context Processing: Context occurrences are handled
one or more actions.
by system components in charge of context process-
• Action Changes Resource: Actions send commands to
ing that include the usual phases of context acquisition
change the state of actuators, thus adapting the application
(sensor data gathering), sensor data fusion, context rea-
to current environmental conditions.
soning, and dissemination (commands sent to actuators).
• Context Contains Entities: Context contains place,
In other words, context processing is the result of context
resource, fusion, rule, and action. Contexts can contain
occurrences.
other contexts in a nested way as indicated by Fig. 2.
• Context Tracking: When contexts occur and are pro-
cessed, they are logged and leave a trail in the system,
which can be tracked down. For example, a variety of
devices may have their states automatically changed by C. Context Graph
a context-aware application and system administrators Context is a container entity, i.e., it comprises a set of
must be able to understand what happened. Context track- instances of other entities. The use of contexts is important for
ing has two fundamental goals. First, it identifies that modeling and documentation purposes. Contexts model situa-
certain contexts explicitly designed occurred in practice. tions of real life, such as empty building, occupied classroom,
Second, it identifies contexts that occurred but were not idle elevator, or closed university. Whereas nouns in these
initially conceived during the design phase. examples are represented by places, verbs need a combination
• Context Monitoring: Contexts are edited and designed, of other entities to be meaningful. For example, a university
contexts occur, contexts are processed, contexts are may determine that whenever a classroom is empty, lights must
tracked and finally contexts are stored. In order to be switched off and air conditioners (or heaters) must be turned
understand what happened in a context-aware system off. Determining whether a classroom is empty may involve
for performance auditing and troubleshooting activities, different presence sensors placed in strategic positions within
contexts must also be actively monitored. a classroom and the values will be averaged. Also, when all
• Context Storage: Context storage stores data of the con- presence sensors indicate that a classroom is empty, a rule will
text entities, in addition to log information. The latter is be fired that in turn executes two actions for switching lights
used for many purposes, including context tracking. off and turning air conditioners off.
690 IEEE INTERNET OF THINGS JOURNAL, VOL. 5, NO. 2, APRIL 2018
(a)
Fig. 4. Nested contexts using a context as a virtual sensor: empty floor is
defined based upon three empty room contexts.
TABLE I
S MART E NERGY M ANAGEMENT: RULES AND ACTIONS
generate data that creates 2000 contexts per minute, which can
be processed by the context tracker according to Fig. 13. On
demand sensors, on the other hand, generate data at irregular
periods, whenever certain events occurs for changing certain
behaviors. This type of sensor typically will not pose scala-
bility constraints because it will be able to process in batch
after the event is finished.
In addition, we have to consider that the hardware used in
the experiments is not top notch and that the context tracker
is highly parallelized because of the query structure of the
Fig. 13. Context tracker performance. tracking algorithm, but we only used a single processing core.
Therefore, if we consider a high end CPU, such as Intel Xeon
E5-2679 v4 with 20 cores, one can easily see that the context
nested fusions exist, all of them will be tracked back reaching tracker can handle more than 10 million (or even 20 million)
the sensors. In line 11, it makes a new context out of rule, time-driven sensors in one minute.
fusions, and resources (sensors and actuators).
In a real scenario, the context tracker will need to process VII. C ONCLUSION
a large number of contexts in a small time period, which might Context-aware systems are key resources for making sense
pose constraints on its use. In order to understand the scalabil- of the myriad of information generated by a multitude of
ity of the context tracker, we conducted a performance analysis sensors in any IoT-based application for Smart Cities. They
study and for that purpose we populated the database shown allow applications to adapt behavior automatically according
in Fig. 7 with synthetic data. We considered a scenario, where to changes in the current environment conditions. Our context-
each sensor sends data that goes through fusion, rule, and aware management framework identifies many components
action entities. This is the worst-case scenario because every needed for such a system in a smart energy application, partic-
single data sent by a sensor generates a new context. ularly the context graph, the context designer, and the context
All tables depicted in Fig. 7 were populated with data rep- tracker.
resenting entities that make up a context as depicted in This framework has been implemented, deployed and tested
Figs. 2 and 3. Tables representing entities obviously have in different situations, including troubleshooting, demonstra-
to be populated, but also relationship tables are necessary, tion, reviewing, and performance analysis purposes. Our expe-
such as FUSION_RULE. Also, auxiliary tables that are not in rience makes us believe that using context graphs that can
Fig. 7 were also populated, such as PLACE_TYPE. Finally, be designed and tracked might be successfully used in future
log tables are necessary for identifying that contexts were exe- systems in order to help developers, administrators, and end-
cuted, such as RULE_ACTION_LOG that is, where the tracker users to harness the wealth of information generated by highly
starts looking for contexts according to Fig. 11. scalable IoT systems.
Using this methodology, the context tracker was executed As future work, we intend to broaden the scope of the
30 times for 1, 10, 100, 1000, and 10 000 contexts and the context-aware framework for different applications of Smart
average result of the 30 replications is depicted in Fig. 13. 99% Cities, which may require additional context entities. Also,
asymptotic confidence intervals were computed, but they are we will test different implementations of the context man-
not shown in the chart because the values are insignificantly ager, varying the data architecture for grasping a better
small. The chart is in a logarithmic scale and clearly shows understanding on limits of scalability.
that the tracker running time grows linearly with the number
of contexts. For these experiments, with a relatively old and
R EFERENCES
modest hardware configuration, 10 000 contexts can be pro-
cessed in less than 5 min (268.55 s). In our experiments we [1] L. Atzoria, A. Ierab, and G. Morabitoc, “The Internet of Things:
A survey,” Comput. Netw., vol. 54, no. 15, pp. 2787–2805, Oct. 2010.
used a dedicated server based on Intel Xeon CPU E3-1240 V2 [2] M. Baldauf, S. Dustdar, and F. Rosenberg, “A survey on context-aware
3.40 GHz with 8 GB RAM. systems,” Int. J. Ad Hoc Ubiquitous Comput., vol. 2, no. 4, pp. 263–277,
Considering the context tracker processing times shown in 2007.
[3] E. Borgia, “The Internet of Things vision: Key features, applications and
Fig. 13, let us understand how many sensors it is able to han- open issues,” Comput. Commun., vol. 54, no. 1, pp. 1–31, Dec. 2014.
dle in a certain time period. For the Padova Smart City project, [4] A. Botta, W. de Donato, V. Persico, and A. Pescapé, “Integration of cloud
Zanella et al. [17] identified two types of sensors: 1) those that computing and Internet of Things: A survey,” Future Gener. Comput.
Syst., vol. 56, pp. 684–700, Mar. 2016.
generate data constantly in spaced time periods and 2) those [5] J. Byun and S. Park, “Development of a self-adapting intelligent sys-
that generate data on demand according to particular events. tem for building energy saving and context-aware smart services,” IEEE
The worst-case scenario for time-driven sensors in Padova is Trans. Consum. Electron., vol. 57, no. 1, pp. 90–98, Feb. 2011.
[6] B. Campbell and P. Dutta, “An energy-harvesting sensor architecture and
to send one data packet every 10 min. Also, a context is only toolkit for building monitoring and event detection,” in Proc. 1st ACM
created when a rule is fired, i.e., a given behavior is only Int. Conf. Embedded Syst. Energy Efficient Build. (BuildSys), Memphis,
changed under certain circumstances. Using a very conserva- TN, USA, Nov. 2014, pp. 100–109.
[7] E. Ferrera et al., “XMPP-based infrastructure for IoT network man-
tive estimate that a context is created 5% of the times a sensor agement and rapid services and applications development,” Ann.
data is sent, a simple calculation shows us that 400 000 sensors Telecommun., vol. 72, nos. 7–8, pp. 443–457, Aug. 2017.
KAMIENSKI et al.: CONTEXT DESIGN AND TRACKING FOR IoT-BASED ENERGY MANAGEMENT IN SMART CITIES 695
[8] C. Kamienski et al., “Context-aware energy efficiency management for Gabriela O. Biondi received the B.S. degree in
smart buildings,” in Proc. IEEE World Forum Internet Things (WF IoT), computer science from the Centro Universitário
Milan, Italy, Dec. 2015, pp. 699–704. da FEI, São Bernardo do Campo, Brazil, in 2011,
[9] C. Kamienski et al., “Application development for the Internet of and the M.S. degree in computer science from the
Things: A context-aware mixed criticality systems development plat- Federal University of ABC, Santo André, Brazil, in
form,” Comput. Commun., vol. 104, pp. 1–16, May 2017. 2013, researching with data mining. She is currently
[10] A. I. Maarala, X. Su, and J. Riekki, “Semantic reasoning for context- pursuing the Ph.D. degree in information engineer-
aware Internet of Things applications,” IEEE Internet Things J., vol. 4, ing at the NUVEM Strategic Research Unit, Federal
no. 2, pp. 461–473, Apr. 2017. University of ABC.
[11] P. Makris, D. N. Skoutas, and C. Skianis, “A survey on context-aware She is a Research Fellow of the NUVEM Strategic
mobile and wireless networking: On networking and computing envi- Research Unit, researching with data models and
ronments’ integration,” IEEE Commun. Surveys Tuts., vol. 15, no. 1, technologies for IoT for Smart Cities. From 2013 to 2016, she performed
pp. 362–386, 1st Quart., 2013. research on the IMPReSS project. She has been an instructor of different
[12] M. V. Moreno et al., “Applicability of big data techniques to smart cities courses in ICT, since 2008, and she has been a Lecturer with the Faculdade
deployments,” IEEE Trans. Ind. Informat., vol. 13, no. 2, pp. 800–809, das Américas, Fortaleza, Brazil, since 2015.
Apr. 2017.
[13] E. F. Nakamura, A. A. F. Loureiro, and A. C. Frery, “Information fusion
for wireless sensor networks: Methods, models, and classifications,”
ACM Comput. Surveys, vol. 39, no. 3, 2007, Art. no. 9.
[14] E. A. Nuaimi, H. A. Neyadi, N. Mohamed, and J. Al-Jaroodi,
“Applications of big data to smart cities,” J. Internet Services Appl.,
vol. 6, p. 25, Dec. 2015.
[15] C. Perera, A. Zaslavsky, P. Christen, and D. Georgakopoulos, “Context
aware computing for the Internet of Things: A survey,” IEEE Commun.
Surveys Tuts., vol. 16, no. 1, pp. 414–454, 1st Quart., 2014.
[16] A. Schumann, J. Ploennigs, and B. Gorman, “Towards automating the
deployment of energy saving approaches in buildings,” in Proc. 1st ACM Isaac Pinheiro is currently pursuing the B.S. degree
Int. Conf. Embedded Syst. Energy Efficient Build. (BuildSys), Memphis, in computer science with the Federal University of
TN, USA, Nov. 2014, pp. 164–167. ABC, Santo André, Brazil.
[17] A. Zanella, N. Bui, A. Castellani, L. Vangelista, and M. Zorzi, “Internet From 2013 to 2016, he was involved with research
of Things for smart cities,” IEEE Internet Things J., vol. 1, no. 1, on the IMPReSS project. He has been researching
pp. 22–32, Feb. 2014. for many years with development of Web backend
applications. His current research interests include
computer networks, Internet of Things (IoT), and
software development for the IoT.