Organizing and Querying the Big Sensing Data with Event

Hindawi Publishing Corporation
International Journal of Distributed Sensor Networks
Volume 2014, Article ID 218521, 11 pages
http://dx.doi.org/10.1155/2014/218521
Research Article
Organizing and Querying the Big Sensing Data with
Event-Linked Network in the Internet of Things
Yunchuan Sun,1 Hongli Yan,1 Junsheng Zhang,2 Ye Xia,1 Shenling Wang,1
Rongfang Bie,1 and Yingjie Tian3
1
Beijing Normal University, Beijing 100875, China
IT Support Center, Institute of Scientific and Technical Information of China, Beijing 100038, China
3
Research Center on Fictitious Economy & Data Science, Chinese Academy of Sciences, Beijing 100190, China
2
Correspondence should be addressed to Rongfang Bie; [email protected]
Received 25 April 2014; Accepted 27 June 2014; Published 4 August 2014
Academic Editor: Zhangbing Zhou
Copyright © 2014 Yunchuan Sun et al. This is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Massive sensing data are generated continuously in the Internet of Things. How to organize and how to query the big sensing data are
big challenges for intelligent applications. This paper studies the organization of big sensing data with event-linked network (ELN)
model, where events are regarded as primary units for organizing data and links are used to represent the semantic associations
among events. Several different types of queries on the event-linked network are also explored, which are different from queries
on traditional relational database. We use an instance of smart home to show the effectiveness and efficiency of organization and
query approaches based on the event-linked network.
1. Introduction
We are living in an era of emerging big data. Data are flooding
in at rates never seen before: doubling every 18 months. This is
a result of the rapid growing Internet of Things and the mobile
computing which make the greater access to consumer data
from public, proprietary, and purchased sources, as well
as new information gathered from web communities and
newly deployed smart assets [1, 2]. Due to the diversity and
complexity, how to organize these data has been always a
primary challenge for the data scientists [3–11].
Many different data models have been developed to
organize data in the past decades. The development of the
data models can be divided into three phases.
(i) Earlier data models included network model, relational model, entity set model and Entity-Relationship (ER)
model. Network model provides a separating entities and
relationships with more natural view of data, while it is
difficult to achieve data independence [12]. Up to now,
the relational database systems are the most widely used
in industries for their easy-to-use nature, though semantic
factors of the data cannot be reflected perfectly [13, 14].
The entity set model based on set theory also ensures
data independence, but its viewing of values may not be
convenient to some people [15]. The Entity-Relationship (ER)
model is a conception model [16] which consists of three
elements: entities, attributes, and relationships. It is considered
as the most popular tool for conceptual model design for its
simplicity and clarity in structure [17].
(ii) With the rapid development of the Internet since the
1990s, the relational database systems have been applied at a
rate of exponent. Meanwhile, two major challenges exist for
the emerging contents on the Internet: (1) how to organize
volumes contents of semistructure and (2) how to make the
digital contents understandable for machine by representing
the semantic meaning of the data. A series of semantic
technologies like XML (http://www.w3.org/XML/), SPARQL
(http://www.w3.org/TR/sparql11-query/), and OWL (http://
www.w3.org/Submission/2006/10/) came into being. The
main characteristic for these technologies is to represent all
elements by adding some marked label to annotate corresponding meaning [18]. Semantic link network is proposed
as a semantic data model for managing web resources,
in which nodes can be any type of resources and edges
2
can be any semantic relation [19–22]. The schema theory
provides the basis for normalized management of semantic
link network [19]. These techniques are well proposed for
querying, browsing, and reasoning semantic data. However,
they have not shaken the dominance of the relational model
in industries and they do not eliminate the important role of
information extracting in the Internet of Things. Integrating,
organising, and interpreting data are still big challenges to
achieve the vision of the Internet of Things [23].
(iii) The emergence of Web 2.0 is a milestone in the
development of information and communication technology.
Volumes of diverse data are flooding in at an unimaginable
rate, especially no structured contents with the development
of various IoT technologies. The primary challenge for
this is to find reasonable organizing models for these big
data. Obviously, the traditional relational model is far from
competent [16]. Several No-sql models, such as Key-value
model, Document stores model, Column Family Stores, and
graph databases, have been proposed to model the big data.
Key-value model organizes the data with a simple structure (key, value) like traditional dictionaries. Though its
efficiency in query is higher than traditional models [24],
it is hard to use in practice for its uninterrupted arrays
and isolated values lacked of relationships between datasets
[25]. Document stores model encapsulates key-value pairs
in documents of self-contained form. It is more suitable to
handle complex data like nested contents and performs well
in query, integration, and schema migration [25].
Column Family Stores is inspired by Google’s Bigtable
which organizes arbitrary number of key-value pairs within
rows [26]. It is more suitable for applications dealing with
huge amounts of data stored on very large clusters [25]. Graph
databases organize object data and relation data with nodes
and edges and it is easy to describe complicated constraints
for the schema defined range of keys and values. It is widely
used in location based services, knowledge representation,
and path finding in navigation systems, recommendation
systems [25].
The traditional relational database and semantic data
models cannot meet the requirements of the volumes
semistructured and unstructured big sensing data generated
by the sensing devices in the Internet of Things. No-sql
models are successful to model and manage these sensing
data. But, as unstructured data is gathered in unprecedented
levels, the analysis rather than the modeling and storage of
this data becomes a challenge. As known, the raw big sensing
data stored in the No-sql database are messily scattered and
cannot be used directly for two reasons. First of all, most
of them cannot be interpreted by the model; the additional
features have to be handled in the application logic. Secondly,
overwhelming majority of the big data are few of value while
only a drop in the bucket is valuable. And, the drop means
important events occur.
In light, a reasonable semantic data model is necessary to
organize the mined and extracted events information from
the raw big sensing data. The event-linked network (ELN)
model proposed in [19] can regulate events and their internal
semantic relations efficiently. This paper aims at introducing
the conceptions, the organizing model, and the querying of
International Journal of Distributed Sensor Networks
the event-linked networks and exploring a practical sensing
scenario of smart home. The reasoning ability enables the
ELN model to discover the potential useful semantic links
between events and useful patterns. The contributions of this
paper include (1) an efficient method to extract the events and
their semantic links from the raw complex data; (2) several
types of queries on event-linked network; (3) a practical case
study to show the proposed methods.
2. Conceptions: Event-Linked Network
The event-linked network model involves three kinds of
elements: events, event-links between events, and reasoning
rules among event-links. In this section, we introduce the
conceptions of the model and show how to construct an
event-linked network.
2.1. Event and Event Type. Always, the primary information
of an event about When, Who, and What is required to be
recorded, and sometimes Where is also needed. Therefore an
event can be regarded as a 3-tuple
𝑒 (π‘‘π‘–π‘šπ‘’π·π‘’π‘ π‘π‘Ÿπ‘–π‘π‘‘π‘–π‘œπ‘›, π‘œπ‘π‘—π‘’π‘π‘‘π‘ πΏπ‘–π‘ π‘‘, π‘‘π‘Žπ‘‘π‘ŽπΏπ‘–π‘ π‘‘) ,
(1)
where π‘‘π‘–π‘šπ‘’π·π‘’π‘ π‘π‘Ÿπ‘–π‘π‘‘π‘–π‘œπ‘› describes the time an event occurs,
starts, ends, or lasts; π‘œπ‘π‘—π‘’π‘π‘‘π‘ πΏπ‘–π‘ π‘‘(π‘œπ‘–π‘‘1 , π‘œπ‘–π‘‘2 , . . . , π‘œπ‘–π‘‘π‘› ) records
all objects involved in the event 𝑒; and π‘‘π‘Žπ‘‘π‘ŽπΏπ‘–π‘ π‘‘ lists the data
to describe the objects status or interrelations of the objects
in π‘œπ‘π‘—π‘’π‘π‘‘π‘ πΏπ‘–π‘ π‘‘. The location (Where) information can be also
recorded in the field π‘‘π‘Žπ‘‘π‘ŽπΏπ‘–π‘ π‘‘ if needed.
There are various types of events. An event type can
be regarded as a set of formatted events. Event types are
used to regularize the events extracted from massive and
heterogeneous data. An event type 𝑒𝑑 has two components: π‘ƒπ‘Ÿπ‘’π‘π‘œπ‘›π‘‘π‘–π‘‘π‘–π‘œπ‘› and 𝐸Vπ‘’π‘›π‘‘π·π‘’π‘ π‘π‘Ÿπ‘–π‘π‘‘π‘–π‘œπ‘›. π‘ƒπ‘Ÿπ‘’π‘π‘œπ‘›π‘‘π‘–π‘‘π‘–π‘œπ‘› is
a logic expression for requirements of the 𝑒𝑑 type event, and
𝐸Vπ‘’π‘›π‘‘π·π‘’π‘ π‘π‘Ÿπ‘–π‘π‘‘π‘–π‘œπ‘› describes what data should be recorded
and generally defines the π‘‘π‘Žπ‘‘π‘ŽπΏπ‘–π‘ π‘‘ which can represent the
status of the objects listed in π‘œπ‘π‘—π‘’π‘π‘‘π‘ πΏπ‘–π‘ π‘‘.
2.2. Event-Link and Event-Link Type. An event-link
𝛼
β†’ 𝑒𝑛𝑑𝐸V𝑒𝑛𝑑, where π‘ π‘‘π‘Žπ‘Ÿπ‘‘πΈV𝑒𝑛𝑑, 𝑒𝑛𝑑𝐸V𝑒𝑛𝑑 are
π‘ π‘‘π‘Žπ‘Ÿπ‘‘πΈV𝑒𝑛𝑑 󳨀
two events and 𝛼 is a directed semantic relation from
π‘ π‘‘π‘Žπ‘Ÿπ‘‘πΈV𝑒𝑛𝑑 to 𝑒𝑛𝑑𝐸V𝑒𝑛𝑑. For example, (β„Žπ‘Žπ‘ π΄πΉπ‘’Vπ‘’π‘Ÿ,
π‘ π‘’π‘’π·π‘œπ‘π‘‘π‘œπ‘Ÿ, π‘π‘Žπ‘’π‘ π‘’π‘‚π‘“) means that an event β„Žπ‘Žπ‘ π΄πΉπ‘’Vπ‘’π‘Ÿ
(someone has a fever) causes another event π‘ π‘’π‘’π·π‘œπ‘π‘‘π‘œπ‘Ÿ
(someone goes to see a doctor). Indeed, there are various
kinds of link types with different factors. The link types can
be determined by a pair of event types; that is, between a pair
of event types there are some certain link types with certain
factors.
An event-link type 𝑙𝑑 between event types can be represented as 𝑙𝑑(π‘ π‘‘π‘Žπ‘Ÿπ‘‘πΈV𝑒𝑛𝑑𝑇𝑦𝑝𝑒, 𝑒𝑛𝑑𝐸V𝑒𝑛𝑑𝑇𝑦𝑝𝑒, π‘“π‘Žπ‘π‘‘π‘œπ‘Ÿ); the link
factor between two events can be defined by some certain
inherent properties of the events. For convenience, we use
[𝑒𝑑𝑖 , 𝑒𝑑𝑗 ] to denote all possible event-link types from an event
type 𝑒𝑑𝑖 to another 𝑒𝑑𝑗 . It is obvious that [𝑒𝑑𝑖 , 𝑒𝑑𝑗 ] βŠ† [𝑒𝑑𝑖󸀠 , 𝑒𝑑𝑗 ] if
𝑒𝑑 βŠ† 𝑒𝑑󸀠 .
International Journal of Distributed Sensor Networks
3
2.3. Reasoning Rule. Links between events weave the isolated
events into a connected network which is more useful than a
set of isolated events and provides a global view of situation
with the internal relationships among events. More useful
evolving patterns would be more easily mined from the network, and potential relations between events can be deduced
based on the existing links according to some reasoning rules.
For example, we can find the inherent reasons of some illness
event by the transitivity of the π‘π‘Žπ‘’π‘ π‘’π‘‚π‘“ links among a series
of events.
A reasoning rule is a product rule with the form of (1) 𝛼 ∘
𝛽 β‡’ 𝛾 or (2) 𝛼 β‡’ 𝛽. The first form means that if there are two
𝛼
𝛽
β†’ 𝑒𝑗 and 𝑒𝑗 󳨀
β†’ π‘’π‘˜ , there should be an eventsevents-links 𝑒𝑖 󳨀
𝛾
link 𝑒𝑖 β†’
󳨀 π‘’π‘˜ , while the second means that if there is an event𝛽
𝛼
link 𝑒𝑖 󳨀
β†’ 𝑒𝑗 , there should be another one 𝑒𝑖 󳨀
β†’ 𝑒𝑗 . Reasoning
rules reflect the internal relevant relationships among eventlinks.
For example, the rule π‘π‘Žπ‘’π‘ π‘’π‘‚π‘“ β‡’ 𝑠𝑒𝑐𝑐𝑒𝑒𝑑𝑖𝑛𝑔 means that
if there is an event-link
π‘π‘Žπ‘’π‘ π‘’π‘‚π‘“
π‘ƒπ‘Ÿπ‘’π‘π‘Žπ‘Ÿπ‘–π‘›π‘” π‘‘π‘–π‘›π‘›π‘’π‘Ÿ 󳨀󳨀󳨀󳨀󳨀󳨀→ π‘Šπ‘Žπ‘ β„Žπ‘–π‘›π‘” π‘‘π‘–π‘ β„Žπ‘’π‘ 
(2)
then there should be an event-link
𝑠𝑒𝑐𝑐𝑒𝑒𝑑𝑖𝑛𝑔
π‘Šπ‘Žπ‘ β„Žπ‘–π‘›π‘” π‘‘π‘–π‘ β„Žπ‘’π‘  󳨀󳨀󳨀󳨀󳨀󳨀󳨀󳨀→ π‘ƒπ‘Ÿπ‘’π‘π‘Žπ‘Ÿπ‘–π‘›π‘” π‘‘π‘–π‘›π‘›π‘’π‘Ÿ.
(3)
2.4. Event-Linked Network and Schema. Big data in the
Internet of Things contains millions of events and their link
information. For a given domain or application, the events
and their links can be extracted according to the defined event
types and link types. Indeed, such a set of events and the
corresponding set links can build a network.
An event-linked network (𝐸𝐿𝑁) is a triple of (𝐸, 𝐿, rules),
where 𝐸 is a set of events, denoted by {𝑒1 , 𝑒2 , . . . , 𝑒𝑛 }; 𝑒𝑖 (1 β©½
𝑖 β©½ 𝑛) is an event; 𝐿 is a set of events-links between events in
𝐸; and rules is a set of reasoning rules among events-links in
the Internet of Things.
A set of link types can be defined according to the domain
or the application. For two certain events, the semantic
links between them can be determined by their inherent
properties. Experts would work out a set of useful event types
for a given application and a set of link types as well as a set of
reasoning rules based on the link types. These well-defined
event types, link types, and the reasoning rules construct
a domain- or application-dependent event schema. Indeed,
an event schema is a domain-dependent knowledge base to
differentiate the critical and sensitive information from the
massive and heterogeneous data.
A schema of event-linked network 𝑆̂ is a data model for
the big data in the Internet of Things and can be regarded
as a triple (𝐸𝑇, 𝐸𝐿𝑇, rules), where 𝐸𝑇 is a set of event types
{𝑒𝑑1 , 𝑒𝑑2 , . . . , π‘’π‘‘π‘š }, and each 𝑒𝑑𝑖 is an event type; 𝐸𝐿𝑇 is a
set of link types 𝑙𝑑1 , 𝑙𝑑2 , . . . , π‘™π‘‘π‘š , where each π‘™π‘‘π‘˜ is defined
between a pair of (𝑒𝑑𝑖 , 𝑒𝑑𝑗 ); and π‘Ÿπ‘’π‘™π‘’π‘  is a set of reasoning rules
(π‘Ÿ1 , π‘Ÿ2 , . . . , π‘Ÿπ‘™ ) and each π‘Ÿ is in the form of 𝑙𝑑𝑖 ∘ 𝑙𝑑𝑗 β‡’ π‘™π‘‘π‘˜ .
ELN schemas may vary on different application scenarios
and play the most important role for organizing the data in
the Internet of Things. Traditionally, the event schema should
be defined by the domain experts or mined from volumes of
history information.
2.5. Constructing Event-Linked Network. In the Internet of
Things, trillions of sensing data are generated by smart
devices distributed in many scenarios like e-Health and smart
home. Various meaningful events are extracted from sensing
data by event extracting agents in these application scenarios.
These events are more useful and understandable for users to
grasp the key points for problems-solving. The derived events
from raw data would be transmitted to the event-linked
network and would be organized for users or intelligent
agents to access easily.
How to extract the event information from the raw data
and how to organise or query them are two key challenges
herein. Reference [27] proposes an effective approach to
extract events from numerous sensing data leveraging predefined event schemas. This paper focuses mainly on the latter
challenge: event query.
3. Querying on ELN
Querying on ELN aims at finding a specific instance for a
Μ‚ We use 𝑆 = (𝐸, 𝐿, 𝑅) to represent the
given ELN schema 𝑆.
Μ‚ where 𝐸 is a set of events, 𝐿 is a set of eventsinstance of 𝑆,
links, and 𝑅 is a set of reasoning rules. Two specific instances
𝑆1 and 𝑆2 are compatible if and only if 𝑆1 ∈ 𝑆 and 𝑆2 ∈ 𝑆.
There are four kinds of querying operations on ELN: select,
intersection, union, and subtract.
3.1. Select. Select querying operation is to find a subinstance
for a specific instance 𝑆 based on some conditions. The select
querying operation can be defined as
𝛿𝐹(𝐴 1 , 𝐴 2 , ..., 𝐴 𝑛 ) (𝑆) = {𝑑 | 𝑑 ∈ 𝑆, 𝐹 (𝐴 1 , 𝐴 2 , . . . , 𝐴 𝑛 ) 𝑖𝑠 π‘‘π‘Ÿπ‘’π‘’} .
(4)
Let 𝑆1 = 𝛿𝐹(𝐴 1 , 𝐴 2 , ...,𝐴 𝑛 ) (𝑆); then 𝑆1 βŠ† 𝑆 is a triple of
(𝐸1 , 𝐿 1 , 𝑅1 ), where 𝐹 (𝐴 1 , 𝐴 2 , . . . , 𝐴 𝑛 ) is true.
𝐹 is a logic expression 𝐹(𝐴 1 )Θ1 𝐹(𝐴 2 )Θ2 β‹… β‹… β‹… Ξ˜π‘›βˆ’1 𝐹(𝐴 𝑛 ),
where Ξ˜π‘– ∈ {∧, ∨} is a comparison operator and 𝐹(𝐴 𝑖 ) is a
condition which has the following four kinds of expressions.
(1) 𝐹(𝐴 𝑖 ) = (πΈπ‘‡Ξ˜π‘– π‘Žπ‘– ). 𝐸𝑇 represents an event type and
π‘Žπ‘– is a constant event type, while Ξ˜π‘– ∈ {=, =}ΜΈ is a logic
expression. The result of this expression is to find the instance
on condition of a given event type 𝐸𝑇 in the 𝑆.
For example, we can use the following expression to select
an instance from 𝑆 where the event type is either 𝑒𝑑1 or 𝑒𝑑2 :
𝑆1 = 𝛿𝐸𝑇=β€œπ‘’π‘‘1 β€βˆ¨πΈπ‘‡=β€œπ‘’π‘‘2 ” (𝑆) .
(5)
𝑆1 βŠ† 𝑆 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ), where 𝐸1 = {𝑒11 , 𝑒12 , . . . , 𝑒1π‘˜ },
𝑒11 , 𝑒12 , . . . , 𝑒1π‘˜ ∈ 𝑒𝑑1 or 𝑒𝑑2 , 𝐿 1 βŠ† 𝐿, and 𝑅1 βŠ† 𝑅.
(2) 𝐹(𝐴 𝑖 ) = (πΏπ‘‡Ξ˜π‘– π‘Žπ‘– ). 𝐿𝑇 represents a link type and π‘Žπ‘– is a
constant link type, while Ξ˜π‘– ∈ {=, =}ΜΈ is a logic expression. The
result of this expression is to find the 𝑆 on condition of a given
link type 𝐿𝑇 in the 𝑆.
4
International Journal of Distributed Sensor Networks
For example, we can use the following expression to select
an instance from 𝑆 where the link type is either 𝑙𝑑1 or 𝑙𝑑2 :
𝑆1 = 𝛿𝐿𝑇=β€œπ‘™π‘‘1 β€βˆ¨πΏπ‘‡=β€œπ‘™π‘‘2 ” (𝑆) .
(6)
𝑆1 βŠ† 𝑆 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ), where 𝐿 1 = {𝑙11 , 𝑙12 , . . . , 𝑙1π‘˜ },
𝑙11 , 𝑙12 , . . . , 𝑙1π‘˜ ∈ 𝑙𝑑1 or 𝑙𝑑2 , 𝐸1 βŠ† 𝐸, and 𝑅1 βŠ† 𝑅.
(3) 𝐹(𝐴 𝑖 ) = (πΈΞ˜π‘– π‘Žπ‘– ). 𝐸 represents an event and π‘Žπ‘– is a constant
event, while Ξ˜π‘– ∈ {=, =}ΜΈ is a logic expression. The result of this
expression is to find the 𝑆 on condition of a given event 𝐸 in
the 𝑆.
For example, we can use the following expression to select
an instance from 𝑆 where the event is either 𝑒1 or 𝑒2 :
𝑆1 = 𝛿𝐸=β€œπ‘’1 β€βˆ¨πΈ=β€œπ‘’2 ” (𝑆) .
(7)
𝑆1 βŠ† 𝑆 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ), where 𝐸1 = {𝑒1 , 𝑒2 }, 𝐿 1 βŠ† 𝐿,
and 𝑅1 βŠ† 𝑅.
(4) 𝐹(𝐴 𝑖 ) = (𝐸.π‘Ξ˜π‘– π‘Žπ‘– ). 𝐸.𝑝 represents an event attribute
and π‘Žπ‘– is a specific event attribute, which has the following
expression:
(8)
𝐸.π‘‘π‘Žπ‘‘π‘Ž2 , . . . , 𝐸.π‘‘π‘Žπ‘‘π‘Žπ‘› } ,
where π‘‘π‘–π‘šπ‘’π‘– is a timeDescription of 𝑒𝑑𝑖 , π‘œπ‘π‘—π‘– is an objectsList
of 𝑒𝑑𝑖 , and π‘‘π‘Žπ‘‘π‘Žπ‘– is a dataList of 𝑒𝑑𝑖 .
For example, we can use the following expression to select
an instance from 𝑆 where time of having supper is between
19:00:00 and 22:00:00 and locationID is 2:
𝑆1 = 𝛿𝐸.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’>β€œ19:00:00β€βˆ§πΈ.𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’<β€œ22:00:00β€βˆ§πΈ.π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›πΌπ· =β€œ2” (𝑆) .
(9)
𝑆1 βŠ† 𝑆 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ), where 𝐸1 = {𝑒11 , 𝑒12 , . . . , 𝑒1π‘˜ }
and 𝑒11 , 𝑒12 , . . . , 𝑒1π‘˜ βŠ† 𝑒𝑑1 happen between 19:00:00 and
22:00:00, whose locationID is 2, while 𝐿 1 βŠ† 𝐿, 𝑅1 βŠ† 𝑅.
3.2. Intersection. Intersection querying operation is to find
the common instance between two specific instances 𝑆1 and
𝑆2 . 𝑆1 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ) and 𝑆2 is a triple of (𝐸2 , 𝐿 2 , 𝑅2 ).
𝑆1 and 𝑆2 should be compatible when doing intersection
querying operation. The intersection querying operation can
be defined as
𝑆1 ∩ 𝑆2 = {π‘Ÿ | π‘Ÿ ∈ 𝑆1 ∩ π‘Ÿ ∈ 𝑆2 } .
(10)
Let π‘†π‘Ž = 𝑆1 ∩ 𝑆2 ; then π‘†π‘Ž is a triple of (πΈπ‘Ž , 𝐿 π‘Ž , π‘…π‘Ž ), which
should satisfy the following conditions:
πΈπ‘Ž = {π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ }, where π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ ∈ 𝐸1 and
π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ ∈ 𝐸2 ;
𝐿 π‘Ž = {π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ }, where π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ ∈ 𝐿 1 and
π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ ∈ 𝐿 2 ;
π‘…π‘Ž = {π‘Ÿ | π‘Ÿ ∈ 𝑅1 ∩ π‘Ÿ ∈ 𝑅2 }.
π‘†π‘Ž = π›Ώπ‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’>β€œ19:00:00” (𝑆) ∩ 𝛿𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’<β€œ22:00:00” (𝑆) .
(11)
π‘†π‘Ž is a triple of (πΈπ‘Ž , 𝐿 π‘Ž , π‘…π‘Ž ), where πΈπ‘Ž = {π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ } and
π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ happen between 19:00:00 and 22:00:00.
3.3. Union. Union querying operation is to find the instance
which exists either in a specific instance 𝑆1 or in another
instance 𝑆2 . 𝑆1 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ) and 𝑆2 is a triple
of (𝐸2 , 𝐿 2 , 𝑅2 ). 𝑆1 and 𝑆2 should be compatible when doing
union querying operation. The union querying operation can
be defined as
𝑆1 βˆͺ 𝑆2 = {π‘Ÿ | π‘Ÿ ∈ 𝑆1 βˆͺ π‘Ÿ ∈ 𝑆2 } .
(12)
Let π‘†π‘Ž = 𝑆1 βˆͺ 𝑆2 ; then π‘†π‘Ž is a triple of (πΈπ‘Ž , 𝐿 π‘Ž , π‘…π‘Ž ), which
should satisfy the following conditions:
πΈπ‘Ž = {𝑒 | 𝑒 ∈ 𝐸1 βˆͺ 𝑒 ∈ 𝐸2 },
𝐿 π‘Ž = {𝑙 | 𝑙 ∈ 𝐿 1 βˆͺ 𝑙 ∈ 𝐿 2 },
π‘…π‘Ž = {π‘Ÿ | π‘Ÿ ∈ 𝑅1 βˆͺ π‘Ÿ ∈ 𝑅2 }.
𝐸.𝑝 ∈ {𝐸.π‘‘π‘–π‘šπ‘’1 , 𝐸.π‘‘π‘–π‘šπ‘’2 , . . . , 𝐸.π‘‘π‘–π‘šπ‘’π‘˜ , 𝐸.π‘œπ‘π‘—1 ,
𝐸.π‘œπ‘π‘—2 , . . . , 𝐸.π‘œπ‘π‘—π‘š , 𝐸.π‘‘π‘Žπ‘‘π‘Ž1 ,
For example, we can use the following expression to find
the instance whose time is later than 19:00:00 in 𝑆 and earlier
than 22:00:00 in 𝑆:
For example, we can use the following expression to find
the instance whose time is later than 19:00:00 in 𝑆 or later than
22:00:00 in 𝑆:
π›Ώπ‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’>β€œ19:00:00” (𝑆) βˆͺ 𝛿𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’>β€œ22:00:00” (𝑆) .
(13)
The result tells us that the time is later than 22:00:00 in the
instance.
3.4. Subtract. Subtract querying operation is to find the
instance which exists in a specific instance 𝑆1 but not in
another instance 𝑆2 . 𝑆1 is a triple of (𝐸1 , 𝐿 1 , 𝑅1 ) and 𝑆2 is a
triple of (𝐸2 , 𝐿 2 , 𝑅2 ). 𝑆1 and 𝑆2 should be compatible when
doing subtract querying operation. The subtract querying
operation can be defined as
𝑆1 βˆ’ 𝑆2 = {π‘Ÿ | π‘Ÿ ∈ 𝑆1 ∩ π‘Ÿ βˆ‰ 𝑆2 } .
(14)
Let π‘†π‘Ž = 𝑆1 βˆ’ 𝑆2 ; then π‘†π‘Ž is a triple of (πΈπ‘Ž , 𝐿 π‘Ž , π‘…π‘Ž ), which
should satisfy the following conditions:
πΈπ‘Ž = {π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ }, where π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ ∈ 𝐸1 and
π‘’π‘Ž1 , π‘’π‘Ž2 , . . . , π‘’π‘Žπ‘˜ βˆ‰ 𝐸2 ;
𝐿 π‘Ž = {π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ }, where π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ ∈ 𝐿 1 and
π‘™π‘Ž1 , π‘™π‘Ž2 , . . . , π‘™π‘Žπ‘˜ βˆ‰ 𝐿 2 ;
π‘…π‘Ž = {π‘Ÿ | π‘Ÿ ∈ 𝑅1 ∩ π‘Ÿ βˆ‰ 𝑅2 }.
For example, we can use the following expression to find
the instance whose time is later than 19:00:00 but earlier than
22:00:00:
π›Ώπ‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’>β€œ19:00:00” (𝑆) βˆ’ 𝛿𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’>=β€œ22:00:00” (𝑆) .
(15)
The result tells us that the time is between 19:00:00 and
22:00:00 in the instance.
International Journal of Distributed Sensor Networks
5
It is worth knowing that select querying can be transformed to insert querying, union querying, and subtract
querying, but not vice versa. For example, let
𝑆1 = 𝛿𝐸𝑇=β€œπ‘’π‘‘1 β€βˆ¨πΈπ‘‡=β€œπ‘’π‘‘2 ” (𝑆) .
(16)
Then 𝑆1 can be transformed to
𝑆1 = 𝛿𝐸𝑇=β€œπ‘’π‘‘1 ” (S) ∩ 𝛿𝐸𝑇=β€œπ‘’π‘‘2 ” (S) .
(17)
But the following insert querying expression can not be
transformed to any other select querying expression:
𝑆1 = 𝛿𝐸𝑇=β€œπ‘’π‘‘1 ” (𝑆1 ) ∩ 𝛿𝐸𝑇=β€œπ‘’π‘‘2 ” (𝑆2 ) .
(18)
4. Case Study: Event-Linked Network of
Smart Home
4.1. Scenario. A smart home is an intelligent agent that
perceives state of resident and the physical environments
using various kinds of sensors like temperature sensors,
motion sensors, light controls, door state sensors, and so
forth. These sensors can capture massive detail data about
individual’s activities, environment settings, and inhabitants’
characteristics. In this section, we would like to illustrate
how to construct the web of events through the proposed models by using the open datasets from House n
(http://architecture.mit.edu/house n/) smart project in University of MIT which uses a set of small, simple state-change
sensors. The sensors are designed to be β€œtape on and forget”
devices that can be quickly and ubiquitously installed in home
environments.
Two datasets (http://courses.media.mit.edu/2004fall/
mas622j/04.projects/home/) were collected for two different
subjects. Two individuals lived alone in one of the bedroom
apartments. Herein, we use only the dataset of one subject
who was a professional 30-year-old woman and spent her
free time at home. 77 state-change sensors were installed
and the sensors were deployed in the bathroom, bedroom,
kitchen, living room, porch, and other household locations.
The sensors were left unattended, collecting data for 16
days in the apartment. During the study, the subject used
the context-aware ESM to create a detailed record of her
activities as a sampling dataset.
4.2. Event Types. Event extraction (i.e., activity recognition)
is to discover and recognize the event (activity) information
from the detail raw data by using various methods like
machine learning, data mining, and statistic method in
the Internet of Things [19, 20, 27]. Our schema depends
on the sampling dataset. Firstly, we work out the event
schema of smart home which involves a series of event
types: Bathing, Cleaning, Doing laundry, Going out to work,
Dressing, Preparing a beverage, Preparing a snack, Preparing
breakfast, Preparing lunch, Preparing dinner, Toileting, and
Washing dishes. A duration threshold for each event type is
necessary to identify an event. However, different individuals
could have different durations for each event type; that is,
an individual might have his/her personal event schema in
a smart home. Thus, we should define personalized event
schema according to one’s history sample annotated dataset.
Herein, we define duration threshold of each event type
according to the minimum duration in the sample dataset
retrieved through a specified survey.
The event types are listed as follows.
(1) Bathing: ((duration β‰₯ 1 min, 55 sec) ∧ (locationName =
Bathroom) ∧ (objectName = Shower faucet ∨ objectName =
Sink faucet-hot ∨ objectName = Sink faucet-cold), (date,
start time, end time, duration, location, Bathing)).
Description. Bathing is a type of events which
occurred in the bathroom (monitored by motion
sensors) and the duration of either of the objects
(including shower faucet or sink faucet (hot) or sink
faucet (cold)) is monitored for no less than 1 min
55 sec. Once an event of Bathing occurs, events information including date, start time, end time, duration,
location, and Bathing should be recorded.
(2) Cleaning: ((duration β‰₯ 3 min, 22 sec) ∧ (locationName = Kitchen) ∧ (objectName = Garbage disposal), (date,
start time, end time, duration, location, Cleaning)).
Description. Cleaning is a type of events which
occurred in the kitchen (monitored by motion
sensors for no less than 3 min 22 sec). The
monitored object is garbage disposal. Once a
Cleaning event occurs, events information including
π‘‘π‘Žπ‘‘π‘’, π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, 𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’, π‘‘π‘’π‘Ÿπ‘Žπ‘‘π‘–π‘œπ‘›, π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›, and
πΆπ‘™π‘’π‘Žπ‘›π‘–π‘›π‘” should be recorded.
(3) Doing laundry: ((duration β‰₯ 43 sec) ∧ (locationName = Kitchen) ∧ (objectName = Laundry Dryer), (date,
start time, end time, duration, location, Doing laundry)).
Description. Doing laundry is a type of events which
occurred in the kitchen (monitored by motion
sensors for no less than 43 sec) and the monitored
object is laundry dryer. Once a Doing laundry event
occurs, events information including date, start time,
end time, duration, location, and Doing laundry
should be recorded.
(4) Going out to work: ((duration β‰₯ 1 min 16 sec) ∧ (locationName = Foyer) ∧ (objectName = Door), (date, start time,
end time, duration, location, πΊπ‘œπ‘–π‘›π‘” π‘œπ‘’π‘‘ π‘‘π‘œ π‘€π‘œπ‘Ÿπ‘˜)).
Description. Going out to work is a type of events
which occurred in the foyer (monitored by door
sensors for no less than 1 min 16 sec) and door is
the main monitored object. Once a Going out to
work event occurs, events information including
π‘‘π‘Žπ‘‘π‘’, π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, 𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’, π‘‘π‘’π‘Ÿπ‘Žπ‘‘π‘–π‘œπ‘›, π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›, and
πΊπ‘œπ‘–π‘›π‘” π‘œπ‘’π‘‘ π‘‘π‘œ π‘€π‘œπ‘Ÿπ‘˜ should be recorded.
(5) Dressing: ((duration β‰₯ 1 min 3 sec) ∧ (locationName =
Bedroom) ∧ (objectName = Jewelry box ∨ objectName =
Drawer ∨ objectName = Light switch), (date, start time,
end time, duration, location, Dressing)).
Description. Dressing is a type of events which
occurred in the bedroom (monitored by motion
6
International Journal of Distributed Sensor Networks
sensors for no less than 3 min 22 sec) and monitored
objects include jewelry box, drawer, and light switch.
Once a Dressing event occurs, events information
including date, start time, end time, duration, location, and Dressing should be recorded.
(10) Preparing dinner: ((duration β‰₯ 7 min 16 sec) ∧ (locationName = Kitchen) ∧ (objectName = Light switch ∨ objectName = Microwave ∨ objectName = Oven ∨ objectName =
Toaster ∨ objectName = Burner), (date, start time, end time,
duration, location, Preparing dinner)).
(6) Preparing a beverage: ((duration β‰₯ 0 min 30 sec) ∧
(locationName = Kitchen) ∧ (objectName = Coffee machine),
(date, start time, end time, duration, location, Preparing a
beverage)).
Description. Preparing dinner is a type of events
which occurred in the kitchen (monitored by
motion sensors for no less than 7 min 16 sec) and the
monitored objects include light switch, microwave,
oven, toaster, and burner. Once a Preparing
dinner event occurs, events information including
π‘‘π‘Žπ‘‘π‘’, π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, 𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’, π‘‘π‘’π‘Ÿπ‘Žπ‘‘π‘–π‘œπ‘›, π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›, and
π‘ƒπ‘Ÿπ‘’π‘π‘Žπ‘Ÿπ‘–π‘›π‘” π‘‘π‘–π‘›π‘›π‘’π‘Ÿ should be recorded.
Description. Preparing a beverage is a type of events
which occurred in the kitchen (monitored by motion
sensors for no less than 30 sec) and coffee machine
is the main monitored object. Once a Preparing a
beverage event occurs, events information including
date, start time, end time, duration, location, and
Preparing a beverage should be recorded.
(7) Preparing a snack: ((duration β‰₯ 39 sec) ∧ (locationName = Kitchen) ∧ (objectName = Refrigerator ∨ objectName = Cereal), (date, start time, end time, duration, location, Preparing a snack)).
Description. Preparing a snack is a type of events
which occurred in the kitchen (monitored by motion
sensors for no less than 39 sec) and the monitored
objects include refrigerator and cereal. Once a Preparing a snack event occurs, events information including
date, start time, end time, duration, location, and
Preparing a snack should be recorded.
(8) Preparing breakfast: ((duration β‰₯ 1 min 59 sec) ∧
(locationName = Kitchen) ∧ (objectName = Light switch ∨
objectName = Microwave ∨ objectName = Oven ∨ objectName = Toaster ∨ objectName = Burner), (date, start time,
end time, duration, location, Preparing breakfast)).
Description. Preparing breakfast is a type of events
which occurred in the kitchen (monitored by motion
sensors for no less than 1 min 59 sec) and the monitored objects include light switch, microwave, oven,
toaster, and burner. Once a Preparing breakfast event
occurs, events information including date, start time,
end time, duration, location, and Preparing breakfast
should be recorded.
(9) Preparing lunch: ((duration β‰₯ 7 min, 52 sec) ∧ (locationName = Kitchen) ∧ (objectName = Light switch ∨ objectName = Microwave ∨ objectName = Oven ∨ objectName =
Toaster ∨ objectName = Burner), (date, start time, end time,
duration, location, Preparing lunch)).
Description. Preparing lunch is a type of events
which occurred in the kitchen (monitored by motion
sensors for no less than 7 min 52 sec) and the
monitored objects include light switch, microwave,
oven, toaster, and burner. Once a Preparing
lunch event occurs, events information including
π‘‘π‘Žπ‘‘π‘’, π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, 𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’, π‘‘π‘’π‘Ÿπ‘Žπ‘‘π‘–π‘œπ‘›, π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›, and
π‘ƒπ‘Ÿπ‘’π‘π‘Žπ‘Ÿπ‘–π‘›π‘” π‘™π‘’π‘›π‘β„Ž should be recorded.
(11) Toileting: ((duration β‰₯ 24 sec) ∧ (locationName =
Bathroom) ∧ (objectName = Toilet Flush), (date, start time,
end time, duration, location, Toileting)).
Description. Toileting is a type of events which
occurred in the bathroom (monitored by motion
sensors for no less than 24 sec) and the monitored object is toilet flush. Once a Toileting event
occurs, events information including date, start time,
end time, duration, location, and Toileting should be
recorded.
(12) Washing dishes: ((duration β‰₯ 1 min 36 sec) ∧ (locationName = Kitchen) ∧ (objectName = Dishwasher) (date,
start time, end time, duration, location, Washing dishes)).
Description. Washing dishes is a type of events which
occurred in the kitchen (monitored by motion
sensors for no less than 1 min 36 sec) and the
monitored object is dishwasher. Once a Washing
dishes event occurs, events information including
π‘‘π‘Žπ‘‘π‘’, π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, 𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’, π‘‘π‘’π‘Ÿπ‘Žπ‘‘π‘–π‘œπ‘›, π‘™π‘œπ‘π‘Žπ‘‘π‘–π‘œπ‘›,
andπ‘Šπ‘Žπ‘ β„Žπ‘–π‘›π‘” π‘‘π‘–π‘ β„Žπ‘’π‘  should be recorded.
4.3. Event-Link Types. Then we can work out possible link
types among the above event types. Herein, for the consideration of simplification, only five link types between any two
event types are defined according to the actual data. Link
types and their filters are listed as follows.
(1) d-succeeding. The semantic link d-succeeding from an
event 𝑒1 to another 𝑒2 means that 𝑒2 is a directly succeeded event after 𝑒1 ends. The filter condition for a link dsucceeding is 𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’ < 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ <
𝑒.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’, where 𝑒 is any event and 𝑒.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ >
𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’.
(2) co-occur. The semantic link co-occur between two events
𝑒1 and 𝑒2 means that one event occurs in the period of
the other event. The filter conditions for a link co-occur are
𝑒1 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ < 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and 𝑒1 .𝑒𝑛𝑑 tπ‘–π‘šπ‘’ > 𝑒2 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’
or 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ < 𝑒1 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and 𝑒2 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’ >
𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’.
(3) overlap. The semantic link overlap between two events
𝑒1 and 𝑒2 means that there is an overlap period between
International Journal of Distributed Sensor Networks
7
Table 1: The dataset after preprocessing.
1
2
3
4
5
6
7
8
9
10
Date
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
2003-03-27
Week
5
5
5
5
5
5
5
5
5
5
Start time
19:38:40
19:38:50
19:40:00
07:44:10
07:34:47
12:27:11
16:28:23
19:38:13
19:44:44
07:34:05
End time
19:38:45
19:39:31
19:40:01
12:26:50
12:26:27
18:41:17
18:44:14
19:49:32
19:49:33
07:42:38
the periods of the two events. The filter condition for a
link overlap is that 𝑒1 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ < 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and
𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’ > 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and 𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’ < 𝑒2 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’
and 𝑒2 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ < 𝑒.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘še, where 𝑒 is any event and
𝑒.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ > 𝑒1 .π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ and 𝑒.π‘ π‘‘π‘Žπ‘Ÿπ‘‘ π‘‘π‘–π‘šπ‘’ < 𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’
and 𝑒.𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’ > 𝑒1 .𝑒𝑛𝑑 π‘‘π‘–π‘šπ‘’.
(4) sameTypeOf. There exists a semantic link sameTypeOf
between two events if they are with the same event type.
We can easily find the sameTypeOf links between events
according to their types.
(5) causeOf. The semantic link causeOf from an event 𝑒1 to
another 𝑒2 means that 𝑒2 is caused by 𝑒1 . For example, an event
of Washing dishes might be caused by an event of Preparing
dinner.
4.4. Instance of Event-Linked Network for Smart Home
(1) Data Preprocessing. We develop a group of stored procedures in SQL Server 2008 to process the data. From the downloaded dataset from http://courses.media.mit.edu/2004fall/
mas622j/04.projects/home/, which was collected about the
day life of a professional woman in 16 days in her apartment, it
is easy to generate a dataset with a strict format of (date, week,
start time, end time, duration, sensorID, locationID, objectID)
as shown in Table 1.
(2) Event Extracting and Presentation. In SQL Server 2008,
we have developed a stored procedure to extract the event
information according to the above defined event types. Total
217 events of 9 types have been extracted from the dataset as
shown in Table 2.
We have developed a java procedure to extract the four
kinds of link information according to the above defined link
types. To well represent link information of the extracted
217 events, we use an asocial network analysis tool NetDraw (http://www.analytictech.com/Netdraw/netdraw.htm)
for drawing graphs of link information, as shown in Figure 1.
Different colors of nodes reflect different event types. Figure 1
shows a total of five different link types of d-succeeding, cooccur, overlap, sameTypeOf, and causeOf.
Duration
0 h, 0 m, 5 s
0 h, 0 m, 41 s
0 h, 0 m, 1 s
4 h, 42 m, 40 s
4 h, 51 m, 40 s
6 h, 14 m, 6 s
2 h, 15 m, 51 s
0 h, 11 m, 19 s
0 h, 4 m, 49 s
0 h, 8 m, 33 s
SensorID
73
137
78
57
100
57
92
105
137
57
locationID
2
2
2
5
5
5
7
2
2
5
objectID
3
42
4
43
13
43
9
9
42
43
Table 2: Extracted events.
Event types
Bathing
Doing laundry
Dressing
Preparing a beverage
Preparing a snack
Preparing dinner
Preparing lunch
Toileting
Washing dishes
Counts
41
12
12
3
11
15
14
65
44
4.5. Querying Example. In our smart home scenario, 𝑆 =
(𝐸, 𝐿, 𝑅), where 𝐸 = {𝑒1 , 𝑒2 , . . . , 𝑒217 } and 𝐿 = {𝑙1 , 𝑙2 , . . . , 𝑙568 }.
The 𝑆 is shown as Figure 1.
(1) Select
(i) Find the ELN where event type is Preparing dinner.
We can use the following expression to complete this
querying:
𝑆1 = 𝛿𝐸𝑇=β€œπ‘ƒπ‘Ÿπ‘’π‘π‘Žπ‘Ÿπ‘–π‘›π‘”π‘‘π‘–π‘›π‘›π‘’π‘Ÿβ€ (𝑆) .
(19)
There are 15 events and 18 links in the result as shown
in Figure 2.
(ii) Find the ELN where event type is Washing dishes and
link type is d-succeeding.
We can use the following expression to complete this
querying:
𝑆2 = 𝛿𝐸𝑇=β€œπ‘Šπ‘Žπ‘ β„Žπ‘–π‘›π‘”π‘‘π‘–sβ„Žπ‘’π‘ β€βˆ§πΏπ‘‡=β€œπ‘‘-𝑠𝑒𝑐𝑐𝑒𝑒𝑑𝑖𝑛𝑔” (𝑆) .
(20)
There are 39 events and 30 links in the result as shown
in Figure 3.
(iii) Find the ELN where event is e174 or e176 .
We can use the following expression to complete this
querying:
𝑆3 = 𝛿𝐸=β€œπ‘’174β€βˆ¨πΈ=β€œπ‘’176” (𝑆) .
(21)
8
International Journal of Distributed Sensor Networks
e38
e26
e
e213211
e215 e206
e34
e1 e e e35
e
62
e
e60 20 e6
e
e23
e37 e21 24
e5
e30
e22
e10
e31
e25
e32
e9
e8
e36
e14
e3
e29
e64
e12
e71
e54 e40
e57 e
79
e159
e41
e2 e33
e
e191
e39e
e43
e18
e131 e87
e126
108
e11
e41
e134
e109
82
e
e
e
e28
95
99 99
e138
e136
e
e58 13
e42
e
e132
e104
e111 e e205 84
e202 e
e92 e117
e10 e1 e89
e45
80
e17
e144
70
ee27207 06
e208
e56
e46
e193
e76 e
e e139
e1 e127
e144
51
e129
e110 7e
e120
e69
e
e
85
96 e
194
e203
e114 e125
e130 214
e196 e
e116
e e81e140
e195
e72
201
e119
e
e133
e190 e200
94
e192
e14e83
e121 e128
e
115
e210
e100
e118
e187e
e
e209
e e93 e
e197 162e169
e137
e142 e123
e154 15
86 e
e105 e97
e
e52
e
181
e204
88 12 e
e103
148
98
e150
e111
e
e
152
e184
183
e188
e146
e
e
e
e
149
176
e185
163
156
e189
e190
e145
e66
e178
e147
e
e177 e177
e198
e
75
e147 182
e173
e166
ee213
e168
174
e170 e175
e
e213 160
e172
e68
e186
e
e180 e164 e e167e16 179
e67
2
e158 e180
e216
e217
e212
e207
11
e73 61
ee53
63
e49
e74
e78
e50
e47
e48
e77
Figure 1: The event-linked network for smart home.
e206
e161
e203
e209
e210
e151
e155
e217
e212
e205
e168
e152
e204
e214
e150
e187
e169
e183
e216
e207
Links:
(1) (e217 , e212 , d-succeeding)
(3) (e209 , e210 , overlap)
(5) (e214 , e205 , overlap)
(7) (e205 , e212 , sameTypeOf)
(9) (e205 , e208 , sameTypeOf)
(11) (e205 , e210 , sameTypeOf)
(13) (e205 , e215 , sameTypeOf)
(15) (e205 , e211 , sameTypeOf)
(17) (e205 , e203 , sameTypeOf)
(19) (e205 , e214 , sameTypeOf)
(2) (e216 , e211 , d-succeeding)
(4) (e203 , e204 , overlap)
(6) (e205 , e217 , sameTypeOf)
(8) (e205 , e206 , sameTypeOf)
(10) (e205 , e209 , sameTypeOf)
(12) (e205 , e207 , sameTypeOf)
(14) (e205 , e216 , sameTypeOf)
(16) (e205 , e213 , sameTypeOf)
(18) (e205 , e204 , sameTypeOf)
Figure 2: Example-find the ELN where event type is Preparing
dinner.
There are 9 events and 8 links in the result as shown
in Figure 4.
(iv) Find the ELN where time is between 19:00:00 and
22:00:00 and link type is co-occur.
e170
e173
e180
e174
e162
e148
e213
e157
e176
e171
e211
e208
e160
e153
e178
e172
e215
e158
e167
e156
e159
e175
Links:
(1) (e247 , e159 , d-succeeding)
(3) (e145 , e146 , d-succeeding)
(5) (e179 , e180 , d-succeeding)
(7) (e153 , e157 , d-succeeding)
(9) (e158 , e160 , d-succeeding)
(11) (e185 , e186 , d-succeeding)
(13) (e171 , e172 , d-succeeding)
(15) (e163 , e164 , d-succeeding)
(17) (e165 , e166 , d-succeeding)
(19) (e169 , e187 , d-succeeding)
(21) (e150 , e151 , d-succeeding)
(23) (e173 , e175 , d-succeeding)
(25) (e167 , e168 , d-succeeding)
(27) (e176 , e178 , d-succeeding)
(29) (e162 , e148 , d- succeeding)
(31) (e155 , e156 , d-succeeding)
e147
e186
e185
e164
e163
e165
e166
e145
e177
e179
e146
e184
(2) (e159 , e145 , d-succeeding)
(4) (e177 , e179 , d-succeeding)
(6) (e180 , e153 , d-succeeding)
(8) (e157 , e158 , d- succeeding)
(10) (e160 , e161 , d-succeeding)
(12) (e186 , e147 , d-succeeding)
(14) (e172 , e183 , d-succeeding)
(16) (e164 , e165 , d-succeeding)
(18) (e166 , e184 , d-succeeding)
(20) (e187 , e150 , d- succeeding)
(22) (e170 , e173 , d-succeeding)
(24) (e175 , e177 , d-succeeding)
(26) (e168 , e176 , d- succeeding)
(28) (e178 , e162 , d- succeeding)
(30) (e152 , e155 , d- succeeding)
Figure 3: Example-find the ELN where event type is Washing dishes
and link type is d-succeeding.
International Journal of Distributed Sensor Networks
9
e168
e168
e102
e174
e178
e176
e176
e156
e199
e174
e86
e159
e178
e159
Links:
(1) (e86 , e174 , d-succeeding)
(3) (e168 , e176 , d-succeeding)
(5) (e102 , e176 , overlap)
(7) (e156 , e174 , sameTypeOf )
Links:
(1) (e174 , e159 , d-succeeding)
(3) (e176 , e178 , d-succeeding)
(2) (e174 , e159 , d-succeeding)
(4) (e176 , e178 , d-succeeding)
(6) (e176 , e199 , overlap)
(8) (e156 , e176 , sameTypeOf )
(2) (e168 , e176 , d-succeeding)
Figure 6: Example-𝑆2 ∩ 𝑆3.
Figure 4: Example-find the ELN where event is e174 or e176.
There are 5 events and 3 links in the result as shown in
Figure 6.
e23
e121
e7
e106
(3) Union. Using 𝑆1 , 𝑆2 in Section 4.5(1), find the ELN as
follows:
𝑆6 = 𝑆1 βˆͺ 𝑆2 .
e210
There are 54 events and 50 links in the result as shown in
Figure 7.
e209
e27
Links:
(1) (e106 , e23 , co-occur)
(3) (e209 , e7 , co-occur)
(5) (e210 , e121 , co-occur)
(7) (e121 , e7 , co-occur)
(24)
(4) Subtract. Using 𝑆2 , 𝑆3 in Section 4.5(1), find the ELN as
follows:
(2) (e209 , e27 , co-occur)
(4) (e210 , e27 , co-occur)
(6) (e210 , e7 , co-occur)
𝑆7 = 𝑆2 βˆ’ 𝑆3 .
Figure 5: Example-find the ELN where event is between 19:00:00
and 22:00:00 and link type is co-occur.
(25)
There are 37 events and 28 links in the result as shown in
Figure 8.
5. Conclusion
We can use the following expression to complete this
querying:
𝑆4 = 𝛿𝐸.π‘ π‘‘π‘Žπ‘Ÿπ‘‘βˆ’π‘‘π‘–π‘šπ‘’>β€œ19:00:00β€βˆ§πΈ.π‘’π‘›π‘‘βˆ’π‘‘π‘–π‘šπ‘’<β€œ22:00:00β€βˆ§πΏπ‘‡=β€œπ‘π‘œβˆ’π‘œπ‘π‘π‘’π‘Ÿβ€ (S) .
(22)
There are 7 events and 7 links in the result as shown
in Figure 5.
(2) Intersection. Using 𝑆2 , 𝑆3 in Section 4.5(1), find the ELN
as follows:
𝑆5 = 𝑆2 ∩ 𝑆3 .
(23)
Sensing techniques have greatly prompted the emerging and
the development of the Internet of Things. Massive sensing
data are generated continuously that are closely related to
our life. How to organize and how to query the big sensing
data are big challenges for intelligent applications. This paper
studies the organization of big sensing data with event-linked
network model. We also propose a query mechanism on
event-linked network which is different from the traditional
relational database. An instance of smart home is developed
to show the effectiveness and efficiency of organization and
query approaches based on the event-linked network. This
work is useful to organize and to query the sensing data in the
Internet of Things. In future works, we would like to address
storage schemes, indexing mechanism, and efficient solutions
for query on the large-scaled event-linked networks.
10
International Journal of Distributed Sensor Networks
e170
e171
e183
e172
e163 e184
e173
e165
e164
e168
e211
e216
e159
e205
e161
e217
e207
e174
e203
e204
e213
e208
e206
e185 e145
e175
e169
e176
e147
e186 e146
e167
e166
e170
e160
e214
e209
e212
e210
e215
e158
e152
e155
e151
e177
e187
e187
e178
e151
e148
e157
Links:
(1) (e174 , e159 , d-succeeding)
(3) (e145 , e146 , d-succeeding)
(5) (e179 , e180 , d-succeeding)
(7) (e153 , e157 , d-succeeding)
(9) (e158 , e160 , d-succeeding)
(11) (e185 , e186 , d-succeeding)
(13) (e171 , e172 , d-succeeding)
(15) (e163 , e164 , d-succeeding)
(17) (e165 , e166 , d-succeeding)
(19) (e217 , e212 , d-succeeding)
(21) (e187 , e150 , d-succeeding)
(23) (e170 , e173 , d-succeeding)
(25) (e175 , e177 , d-succeeding)
(27) (e167 , e168 , d-succeeding)
(29) (e176 , e178 , d- succeeding)
(31) (e162 , e148 , d-succeeding)
(33) (e155 , e156 , d-succeeding)
(35) (e203 , e204 , overlap)
(37) (e205 , e217 , sameTypeOf)
(39) (e205 , e206 , sameTypeOf)
(41) (e205 , e209 , sameTypeOf)
(43) (e205 , e207 , sameTypeOf)
(45) (e205 , e216 , sameTypeOf)
(47) (e205 , e213 , sameTypeOf)
(49) (e205 , e204 , sameTypeOf)
e163
(2) (e159 , e145 , d-succeeding)
(4) (e177 , e179 , d-succeeding)
(6) (e180 , e153 , d-succeeding)
(8) (e157 , e158 , d- succeeding)
(10) (e160 , e161 , d-succeeding)
(12) (e186 , e147 , d-succeeding)
(14) (e172 , e183 , d-succeeding)
(16) (e164 , e165 , d-succeeding)
(18) (e166 , e184 , d-succeeding)
(20) (e169 , e187 , d- succeeding)
(22) (e150 , e151 , d-succeeding)
(24) (e173 , e175 , d-succeeding)
(26) (e216 , e211 , d- succeeding)
(28) (e168 , e176 , d- succeeding)
(30) (e178 , e162 , d- succeeding)
(32) (e152 , e155 , d- succeeding)
(34) (e209 , e210 , overlap)
(36) (e214 , e205 , overlap)
(38) (e205 , e212 , sameTypeOf)
(40) (e205 , e208 , sameTypeOf)
(42) (e205 , e210 , sameTypeOf)
(44) (e205 , e215 , sameTypeOf)
(46) (e205 , e211 , sameTypeOf)
(48) (e205 , e203 , sameTypeOf)
(50) (e205 , e214 , sameTypeOf)
Figure 7: Example-𝑆2 βˆͺ 𝑆3.
Conflict of Interests
The authors declare that there is no conflict of interests
regarding the publication of this paper.
Acknowledgments
This research is sponsored by the National Natural Science
Foundation of China (61371185, 6100322561171014) and the
ISTIC Research Foundation Projects XK2014-6.
References
[1] O. Vermesan and P. Friess, Internet of Thingsβ€”Global Technological and Societal Trends from Smart Environments and Spaces
to Green Ict, The River Publishers, 2011.
e159
e164
e167
e172
e166
e161
e158
e186
e146
e147
e155
e152
e157
Links:
(1) (e159 , e145 , d-succeeding)
(3) (e177 , e179 , d-succeeding)
(5) (e180 , e153 , d-succeeding)
(7) (e157 , e158 , d-succeeding)
(9) (e160 , e161 , d-succeeding)
(11) (e186 , e147 , d-succeeding)
(13) (e172 , e183 , d-succeeding)
(15) (e164 , e165 , d-succeeding)
(17) (e166 , e184 , d-succeeding)
(19) (e187 , e150 , d-succeeding)
(21) (e170 , e173 , d-succeeding)
(23) (e175 , e177 , d-succeeding)
(25) (e178 , e162 , d-succeeding)
(27) (e152 , e155 , d-succeeding)
e162
e185
e145
e184
e160
e175
e148
e183
e165
e162 e180
e156e153
e171
e169
e150 e179
e173
e168
e150
e178
e177
e179
e180
e156
e153
(2) (e145 , e146 , d-succeeding)
(4) (e179 , e180 , d-succeeding)
(6) (e153 , e157 , d-succeeding)
(8) (e158 , e160 , d- succeeding)
(10) (e185 , e186 , d-succeeding)
(12) (e171 , e172 , d-succeeding)
(14) (e163 , e164 , d-succeeding)
(16) (e165 , e166 , d-succeeding)
(18) (e169 , e187 , d-succeeding)
(20) (e150 , e151 , d- succeeding)
(22) (e173 , e175 , d-succeeding)
(24) (e167 , e168 , d-succeeding)
(26) (e162 , e148 , d- succeeding)
(28) (e155 , e156 , d- succeeding)
Figure 8: Example-𝑆1 βˆ’ 𝑆4 .
[2] Big data, http://en.wikipedia.org/wiki/Big data.
[3] M. Balazinska, A. Deshpande, M. J. Franklin et al., β€œData
management in the worldwide sensor web,” IEEE Pervasive
Computing, vol. 6, no. 2, pp. 30–40, 2007.
[4] J. Cooper and A. James, β€œChallenges for database management
in the internet of things,” IETE Technical Review, vol. 26, no. 5,
pp. 320–329, 2009.
[5] Y. Diao, D. Ganesan, G. Mathur, and P. Shenoy, β€œRethinking
data management for storage-centric sensor networks,” in
Proceedings of the 3rd Biennial Conference on Innovative Data
Systems Research (CIDR '07), pp. 22–32, January 2007.
[6] M. Navarro, D. Bhatnagar, and Y. Liang, β€œAn integrated network
and data management system for heterogeneous WSNs,” in
Proceedings of 8th IEEE International Conference on Mobile Adhoc and Sensor Systems (MASS '11), pp. 819–824, Valencia, Spain,
October 2011.
[7] T. Fan and Y. Chen, β€œA scheme of data management in the
internet of things,” in Proceedings of the 2nd IEEE International
Conference on Network Infrastructure and Digital Content (ICNIDC ’10), pp. 110–114, September 2010.
[8] T. Choudhury, G. Borriello, S. Consolvo et al., β€œThe mobile
sensing platform: an embedded activity recognition system,”
IEEE Pervasive Computing, vol. 7, no. 2, pp. 32–41, 2008.
[9] P. Turaga, R. Chellappa, V. S. Subrahmanian, and O. Udrea,
β€œMachine recognition of human activities: a survey,” IEEE
Transactions on Circuits and Systems for Video Technology, vol.
18, no. 11, pp. 1473–1488, 2008.
International Journal of Distributed Sensor Networks
[10] T. L. M. Van Kasteren, G. Englebienne, and B. J. A. Kröse, β€œAn
activity monitoring system for elderly care using generative and
discriminative models,” Personal and Ubiquitous Computing,
vol. 14, no. 6, pp. 489–498, 2010.
[11] P. Rashidi and D. J. Cook, β€œCOM: a method for mining and
monitoring human activity patterns in home-based health
monitoring systems ,” ACM Transactions on Intelligent Systems
and Technology, vol. 4, no. 4, article 64, 2013.
[12] E. F . Codd, β€œA relational model of data for large shared data
banks,” Communications of the ACM, vol. 13, no. 6, pp. 377–387,
1970.
[13] C. Deheneffe, H. Hennebert, and W. Paulus, β€œRelational model
for data base,” in Proceedings of the IFIP Congress, pp. 1022–1025,
North Holland, Amsterdam, The Netherlands, 1974.
[14] H. A. Schmidt and J. R. Swenson, β€œOn the semantics of the
relational data model,” in Proceedings of the ACM SIGMOD
International Conference on Management of Data (SIGMOD
’75), pp. 211–233, ACM, San Jose, Calif, USA, May 1975.
[15] M. E. Senko, E. B. Altman, M. M. Astrahan, and P. L. Fehder,
β€œData structures and accessing in data-base syste ms, I: evolution of information systems,” IBM Systems Journal, vol. 12, no.
1, pp. 30–44, 1973.
[16] K. G. Jeffery, β€œThe internet of things: the death of a traditional
database,” IETE Technical Review, vol. 26, no. 5, pp. 313–319,
2009.
[17] P. P. S. Chen, β€œThe entity-relationship model-toward a unified
view of data,” ACM Transactions on Database Systems, vol. 1, no.
1, pp. 9–36, 1976.
[18] T. Berners-Lee, W. Hall, J. A. Hendler, K. O’Hara, N. Shadbolt,
and D. J. Weitzner, β€œA framework for Web Science,” Foundations
and Trends in Web Science, vol. 1, no. 1, pp. 1–130, 2006.
[19] J. Zhang and Y. Sun, β€œWeaving the semantic link network of
events,” in Proceedings of the 6th International Conference on
Semantics, Knowledge and Grid (SKG ’10), pp. 281–284, Beijing,
China, November 2010.
[20] Y. Sun, R. Bie, X. Yu, and S. Wang, β€œSemantic link networks:
theory, applications, and future trends,” Journal of Internet
Technology, vol. 14, no. 3, pp. 365–378, 2013.
[21] Y. Sun, C. Lu, H. Yan, and R. Bie, β€œTheory for semantic relation
computing and its application in semantic link network,” in
Proceeding of the 8th International Conference on Semantics,
Knowledge and Grids (SKG '12), pp. 56–63, Beijing, China,
October 2012.
[22] H. Zhuge and Y. Sun, β€œThe schema theory for semantic link
network,” Future Generation Computer Systems, vol. 26, no. 3,
pp. 408–420, 2010.
[23] P. Barnaghi, W. Wang, C. Henson, and K. Taylor, β€œSemantics for
the internet of things: early progress and back to the future,”
International Journal on Semantic Web and Information Systems,
vol. 8, no. 1, pp. 1–21, 2012.
[24] J. Han, E. Haihong, G. Le, and J. Du, β€œSurvey on NoSQL
database,” in Proceedings of the 6th International Conference on
Pervasive Computing and Applications (ICPCA '11), pp. 363–366,
IEEE, Port Elizabeth, South Africa, October 2011.
[25] R. Hecht, β€œNoSQL evaluation,” in Proceedings of the International Conference on Cloud and Service Computing, 2011.
[26] F. Chang, J. Dean, S. Ghemawat et al., β€œBigtable: a distributed
storage system for structured data,” ACM Transactions on
Computer Systems, vol. 26, no. 2, article 4, 2008.
[27] Y. Sun, H. Yan, C. Lu, and R. Bie, β€œConstructing the web of
events from raw data in the Web of Things,” Mobile Information
Systems, vol. 10, no. 1, pp. 105–125, 2014.
11
International Journal of
Rotating
Machinery
Engineering
Journal of
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
The Scientific
World Journal
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
International Journal of
Distributed
Sensor Networks
Journal of
Sensors
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Journal of
Control Science
and Engineering
Advances in
Civil Engineering
Hindawi Publishing Corporation
http://www.hindawi.com
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
Submit your manuscripts at
http://www.hindawi.com
Journal of
Journal of
Electrical and Computer
Engineering
Robotics
Hindawi Publishing Corporation
http://www.hindawi.com
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
VLSI Design
Advances in
OptoElectronics
International Journal of
Navigation and
Observation
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
Hindawi Publishing Corporation
http://www.hindawi.com
Chemical Engineering
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
Active and Passive
Electronic Components
Antennas and
Propagation
Hindawi Publishing Corporation
http://www.hindawi.com
Aerospace
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
International Journal of
International Journal of
International Journal of
Modelling &
Simulation
in Engineering
Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Shock and Vibration
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Advances in
Acoustics and Vibration
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014