12
Research Article Large-Scale Real-Time Semantic Processing Framework for Internet of Things Xi Chen, Huajun Chen, Ningyu Zhang, Jue Huang, and Wen Zhang Department of Computer Science, Zhejiang University, Hangzhou, China Correspondence should be addressed to Xi Chen; [email protected] Received 22 May 2015; Accepted 2 September 2015 Academic Editor: Mohammad M. Hassan Copyright © 2015 Xi Chen et al. is 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. Nowadays, the advanced sensor technology with cloud computing and big data is generating large-scale heterogeneous and real- time IOT (Internet of ings) data. To make full use of the data, development and deploy of ubiquitous IOT-based applications in various aspects of our daily life are quite urgent. However, the characteristics of IOT sensor data, including heterogeneity, variety, volume, and real time, bring many challenges to effectively process the sensor data. e Semantic Web technologies are viewed as a key for the development of IOT. While most of the existing efforts are mainly focused on the modeling, annotation, and representation of IOT data, there has been little work focusing on the background processing of large-scale streaming IOT data. In the paper, we present a large-scale real-time semantic processing framework and implement an elastic distributed streaming engine for IOT applications. e proposed engine efficiently captures and models different scenarios for all kinds of IOT applications based on popular distributed computing platform SPARK. Based on the engine, a typical use case on home environment monitoring is given to illustrate the efficiency of our engine. e results show that our system can scale for large number of sensor streams with different types of IOT applications. 1. Introduction With the rapid advances in wireless sensor data collec- tion and communication, increased number of IOT data is increasing explosively, which builds many massive wireless sensor networks (WSNs). It is predicted that within the next decade billions of devices (Cisco predicts that the number of the Internet connected devices will be around 50 billion by 2020) [1] will generate myriad of real-world data for many applications and services in a variety of areas such as smart grids, smart homes, e-health, automotive, transport, and environmental monitoring. Such stunning massive and widespread data can help us to observe the surroundings, learn patterns, and have a better understanding of the world, which will construct a more intelligent world. To make full use of the senses to implement deeper web intelligence, a natural next step would be to unify and process IOT data by existing mature web infrastructure and protocols. Presently, many efforts have been put on this area from the Internet of ings (IOT) to Web. e W3C founded the Web of ings Community Group aiming at accelerating the adoption of Web technologies such as semantic technologies as a basic for enabling services for the combination of IOT with rich descriptions of web data and the context in which they are used. e industry also initiates the standards oneM2M (http://www.onem2m.org/), whose goal is to develop technical specification which is used to address the need for a common IOT service layer by reusing existing web standards and protocols, including RDF, HTTP, and Restful. However, the characteristics of IOT data, including het- erogeneity, variety, volume, and real time, pose a series of challenges to effectively organize, publish, and process the sensor data. e Semantic Web technologies are viewed as a key for the development of IOT. Figure 1 shows the generic functional model of oneM2M for supporting semantics in the specification of oneM2M study on abstraction and semantics enablement [2]. To be specific, it serves the following several purposes: First, the abstraction and semantics layer provide us with a good way to resolve the problems of interoperability and integration within this heterogeneous world of IOT data by defining and reusing some standard semantic concepts. en, the Semantic Web provides a seamless interface to facilitate the interactions of IOT data and the other existing Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 365372, 11 pages http://dx.doi.org/10.1155/2015/365372

Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

Research ArticleLarge-Scale Real-Time Semantic ProcessingFramework for Internet of Things

Xi Chen Huajun Chen Ningyu Zhang Jue Huang and Wen Zhang

Department of Computer Science Zhejiang University Hangzhou China

Correspondence should be addressed to Xi Chen xichenzjueducn

Received 22 May 2015 Accepted 2 September 2015

Academic Editor Mohammad M Hassan

Copyright copy 2015 Xi Chen et alThis is an open access article distributed under the Creative Commons Attribution License whichpermits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Nowadays the advanced sensor technology with cloud computing and big data is generating large-scale heterogeneous and real-time IOT (Internet of Things) data To make full use of the data development and deploy of ubiquitous IOT-based applications invarious aspects of our daily life are quite urgent However the characteristics of IOT sensor data including heterogeneity varietyvolume and real time bring many challenges to effectively process the sensor data The Semantic Web technologies are viewedas a key for the development of IOT While most of the existing efforts are mainly focused on the modeling annotation andrepresentation of IOT data there has been little work focusing on the background processing of large-scale streaming IOT data Inthe paper we present a large-scale real-time semantic processing framework and implement an elastic distributed streaming enginefor IOT applicationsThe proposed engine efficiently captures andmodels different scenarios for all kinds of IOT applications basedon popular distributed computing platform SPARK Based on the engine a typical use case on home environment monitoring isgiven to illustrate the efficiency of our engine The results show that our system can scale for large number of sensor streams withdifferent types of IOT applications

1 Introduction

With the rapid advances in wireless sensor data collec-tion and communication increased number of IOT data isincreasing explosively which builds many massive wirelesssensor networks (WSNs) It is predicted that within the nextdecade billions of devices (Cisco predicts that the numberof the Internet connected devices will be around 50 billionby 2020) [1] will generate myriad of real-world data formany applications and services in a variety of areas such assmart grids smart homes e-health automotive transportand environmental monitoring Such stunning massive andwidespread data can help us to observe the surroundingslearn patterns and have a better understanding of the worldwhich will construct a more intelligent world

To make full use of the senses to implement deeperweb intelligence a natural next step would be to unifyand process IOT data by existing mature web infrastructureand protocols Presently many efforts have been put onthis area from the Internet of Things (IOT) to Web TheW3C founded the Web of Things Community Group aimingat accelerating the adoption of Web technologies such as

semantic technologies as a basic for enabling services for thecombination of IOT with rich descriptions of web data andthe context in which they are usedThe industry also initiatesthe standards oneM2M (httpwwwonem2morg) whosegoal is to develop technical specification which is used toaddress the need for a common IOT service layer by reusingexisting web standards and protocols including RDF HTTPand Restful

However the characteristics of IOT data including het-erogeneity variety volume and real time pose a series ofchallenges to effectively organize publish and process thesensor data The Semantic Web technologies are viewed as akey for the development of IOT Figure 1 shows the genericfunctionalmodel of oneM2M for supporting semantics in thespecification of oneM2M study on abstraction and semanticsenablement [2] To be specific it serves the following severalpurposes First the abstraction and semantics layer provideus with a good way to resolve the problems of interoperabilityand integration within this heterogeneous world of IOT databy defining and reusing some standard semantic conceptsThen the Semantic Web provides a seamless interface tofacilitate the interactions of IOT data and the other existing

Hindawi Publishing CorporationInternational Journal of Distributed Sensor NetworksVolume 2015 Article ID 365372 11 pageshttpdxdoiorg1011552015365372

2 International Journal of Distributed Sensor Networks

IOT applications

Semantic analysis and queryServiceaccess

Semantic mash-up

Reasoning

Ontology modeling

Semantic annotation

Device abstraction

IOT data collectionData

repository

Ontologyrepository

Abstractionand

semantics

Dataaccess

Figure 1 Generic functional semantic model for supporting IOT applications

web of data such as Linked Data [3] DBpedia [4] Linked-Geodata [5] and various kinds of data fromWeb Services Atlast the service layer provides an interface for various IOTapplications by semantic processing technologies includingsemantic mash-up query and reasoning

Currently most of the existing works aim at the anno-tation and definition of various WSNs by providing corre-sponding description ontology For example ontologies suchas the W3Cs Semantic Sensor Network (SSN) ontology havebeen developed offering a number of constructs to formallydescribe not only the sensor resources but also the sensorobservation and measurement data [6] However there hasbeen little work focusing on the background processing oflarge-scale streaming IOT data In the paper we present alarge-scale real-time semantic processing framework for IOTapplications The proposed framework efficiently capturesand models different scenarios for various IOT applicationsWe have implemented an elastic streaming engine based onpopular large-scale distributed computing platform SPARK[7] Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scale forlarge number of sensors streams with different types of IOTapplications

The remainder of this paper is organized as followsSection 2 outlines related work In Section 3 we introducethe semantic processing framework and processing enginefor IOT applications Section 4 describes a typical use casein home environment monitoring Section 5 presents ourexperiments and results Finally we conclude the work inSection 6

2 Related Work

To the best of our knowledge our framework and system arethe first work addressing various semantic processing tasksfor large-scale streaming IOT data including IOT semantic

mash-up semantic query and semantic reasoning There issome related work as follows

21 IOT Modeling and Ontology One key research topic inIOT is to represent the ldquothingsrdquo by standard vocabulariesand schemas Semantic Sensor Web (SSW) is a technology inwhich sensor data is semantically annotated for interoperabil-ity and also provides contextual information for situationalknowledge [8] Many works have proposed semantic modelfor representing sensors and data Ontologies such as theW3Crsquos SSN ontology have been developed [6] These ontolo-gies provide metadata for numerical spatial temporal andother semantic objects Similar works for sensor metadatadescription also include SensorDataOntology (SDO) [9] andSensorML [10]

These works mainly focus on semantic annotation for theinteroperability of IOT by defining a unified and standardontology paying no attention to the high-level semantic IOTapplications

22 Semantic IOT Applications Gyrard proposes a semantic-based Machine-to-Machine Measurement approach (M3) toautomatically combine enrich and reason about IOT datato provide promising cross-domain IOT applications suchas naturopathy application based on multiple datasets [11]The approach also presents a hub for cross-domain ontologiesand datasets References [12 13] apply the IOT in the genericagriculture and healthcare context management SSEO [14] isdeveloped to enable semantic indexing machine-processableevent detection and data exchange for smart spacemodelingOther applications include CONON [15] CoOL [16] andCoBrA [17]

Most of the work aims at building IOT applications in aspecific domain failing to provide a generic semantic IOTprocessing framework And they also did not deal with some

International Journal of Distributed Sensor Networks 3

important challenges for IOT data such as the real time andscalability

23 Stream Processing for Semantic Data There are sev-eral semantic stream data processing engines includingStreaming SPARQL [18] C-SPARQL [19] and CQELS [20]Streaming SPARQL extends SPARQL to process data streamsC-SPARQL defines an extension of SPARQL whose dis-tinguishing feature is the support of continuous queriesthat is queries registered over RDF data streams and thencontinuously executed CQELS is a native and adaptive queryprocessor for unified query processing over Linked StreamData and Linked Data

However most of these works only focus on the semanticquery for Linked Stream Data ignoring other commondemands of IOT applications including semantic mash-upand reasoningWhat is more the systems are designed to runon a single machine while our system goes beyond that andspecifically focuses on the common scalability issues for IOTapplications

3 Proposed Framework and ElasticProcessing Engine

In this section we propose the large-scale real-time semanticprocessing framework for IOT applications and elaboratethe elastic processing engine to explain how it provides thecapabilities for performing various IOT applications

31 Framework Figure 2 shows the architecture of oursemantic processing framework In general it consists of fiveparts physical entities layer abstract entities layer window-based data stream layer virtual entities layer and elasticsemantic engine layer

311 Physical Entities Layer Physical entities layer is locatedin the lowest layer of the framework which is responsible forcollecting raw sensor data in real time Every physical entityrepresents a tangible element that can be sensed by sensorsthat are deployed in the oneM2MField Domain environmentand that is not specific to a particular IOT applicationin this environment According to the oneM2M projectstandardization every kind of sensors is to be organized bylogical entity (AE) and common services entity (CSE) whichprovide application logic and common services respectively

312 Abstract Entities Layer Abstract entities layer is respon-sible for receiving and implementing the abstraction forthe physical devices by the semantic annotation of proxysoftware The abstraction layer aims at hiding the complexityof devices and environments by providing a standard formatto represent devices So from the view of upper layer all theheterogeneous physical sensors can be seen as unified datastreams

313Window-BasedData StreamLayer The layer focuses onextracting related data streams into the windows according

to the demands of upper applications In the real-worldIOT applications data takes the form of continuous streamsinstead of the form of finite datasets stored in a traditionalrepository This is the case for traffic monitoring environ-ment monitoring disaster management telecommunicationmanagement manufacturing and many other domainsEvery sensor corresponds to a window with a certain size

314 Virtual Entities Layer Virtual entities layer aggregatesthe related window data required by every virtual entityVirtual entity is a new resource created by multiple windowdata streams which is used to accomplish an applicationservice For our latter use case if user in a home requeststhe service for Discomfort Index (DI) a new virtual entitywill be generated through aggregating corresponding homeappliance sensors (such as temperature heater and aircleaner sensors) Then we can get the service of DI by thevirtual entity

315 Elastic Semantic Engine Layer The elastic semanticengine layer is the key of the architecture The layer isresponsible for receiving of outer requests creating of cor-responding virtual entities interacting with static web ofdata and real-time returning of continuous results Our workmainly focuses on the layer We will discuss it in detail in thenext section

32 Elastic Streaming Processing Engine Our elastic seman-tic streaming processing engine provides various commonIOT services by constructing corresponding virtual entitiesincluding IOT semantic mash-up query and reasoningEvery virtual entity aggregates the RDF streams from cor-responding several windows A window extracts the latestelements from the sensor stream Besides the streamingIOT data some applications need auxiliary backgroundknowledge such as LinkedOpenData DBpedia and Linked-Geodata

In this part related definitions are first given then weelaborate on the 3 functional modules of the engines

Definition 1 (RDF stream (S)) The basic data unit for RDFstream is a quad (⟨119904 119901 119900 119905⟩) A RDF stream is defined as anordered sequence of pairs where every pair is constituted bymultiple basic data units denoted as 119863119895119894 where 119894 representsthe identification (ID) of certain sensor and 119895 is the times-tamp For example 119878119894 = 119863

0119894 1198631119894 1198632119894 119894 isin N denotes the

RDF stream data of the 119894th sensor

Definition 2 (window (W)) A window is a subset of theRDF streams given a time range 119905 119882119894(119905) = 119863

0119894 1198631119894

1198632119894 119863

119905minus1119894 119905 isin N denotes the RDF stream data of the

119894th sensor within the latest 119905 logical time units For example1198820(3) can represent the data of Sensor0 within the last 3seconds

Definition 3 (virtual window (V)) Virtual window aggre-gates the related data needed by a virtual entity which

4 International Journal of Distributed Sensor Networks

Sound monitor

serviceAE

Sound monitorCSE

Sound monitor

Mca

Weather sensors

Mcc

Physical entities

Sound sensors

AnnotationProxies

Abstract entities

Window-baseddata stream

Virtual entities

Mcc

Weather monitor

serviceAE

Weather monitorCSE

Weather monitor

Mcc

Mcc

GPS monitorserviceAE

GPS monitorCSE

GPS monitor

Mcc

GPS sensors

Mcc

Light monitorserviceAE

Light monitorCSE

Light monitor

Mcc

Light sensors

Backgroundknowledge

Semantic query Semantic mash-up Semantic reasoningElastic semantic

engine

IN-CSE

IOT applications

middot middot middot

middot middot middotmiddot middot middot

middot middot middot middot middot middot middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

T0

T1

T2

T3

T4

V1 V2 V3 Vn

W0 W1 W2Wk W12

W13Wn

S0 S1 S2 Sk S12 S13 Sn middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

Other devices

D00

D10

D20

D30

D40

D0k

D1k

D2k

D3k

D4k

D0n

D1n

D2n

D3n

D4n

Figure 2 Large-scale real-time semantic processing framework for IOT applications

includes the corresponding window and background knowl-edge 119861 = (119904 119901 119900) A virtual window can be denoted as 119881119894 =119882119894 119861119894 where 119882119894 represents the set of windows aggregated

by the virtual window 119881119894 and 119861119894 is the set of background

knowledge bases needed by 119881119894

321 IOT Semantic Mash-Up Semantic mash-up is oneof the most basic demands in IOT domain since manyIOT applications rely on the task It provides functionalitiesto support new services by aggregating multiple disperseresources For example ldquocompute the indoor air quality index(AQI) of a roomrdquo is a typical mash-up application whichneeds to accomplish the task based on various window datasources including PM25 O3 and CO

The mash-up task is formalized via the concepts offiltering and recombination Given a set of RDF streams 119878 =

1198780 1198781 1198782 119878119873 119873 is the number of sensors streams Afiltering is a function 120592 119878 rarr 119879 which maps the primitiveRDF streams to a triple set 119879 = (119904 119901 119900) A recombinationis a mapping 120574 119879 rarr 119879

1015840 which transforms 119879 to 1198791015840 based

on the mash-up formulas Take indoor AQI for example 119879represents the triples containing the concentration of relatedsensors 120574 denotes the mapping formula for computing theindividual AQI

322 IOT Semantic Query IOT semantic query is a commonfunction for IOT applications It enhances the IOT discov-ery mechanism to allow locating and linking resources orservices based on their semantic information such as ldquoget

International Journal of Distributed Sensor Networks 5

phasRoom

pvalueType

Home Room Sensor

Type

phasSensorValue

Time

phasValue

ptimeStamp

URI httphemorghome URI httphemorgroomROOM_ID URI httphemorgsensorSENSOR_ID

p=ldquohttphemorgpredicaterdquo

Figure 3 The simple concept model for home environment monitoring

the temperature of the room0rdquo and ldquoget the all rooms whosePM25 ge 80rdquo

The query task is formalized via the concept of mappingWe denote as 119868 119861 119871 and 119881 respectively the domains ofIRIs blank nodes literals and variables which are all disjointWe also define 119879 = (119868 cup 119861 cup 119871) A mapping 120583 is a partialfunction 120583 119881 rarr 119879 which gives the bindings for all thevariables of a query Evaluation occurs when an input graphpattern (denoted as 119875) in the query is matched against avirtual window (119881) 119875 is a set of triple patterns 119905 = (119904 119901 119900)

such that 119904 119901 119900 isin (119881 cup 119879) We then define dom(120583) as thesubset of 119881 where 120583 is defined (ie the domain of 120583) and usethe notation 120583(119909) to refer to the bindings of variable 119909 in 120583

323 IOT Semantic Reasoning Reasoning is a mechanism toderive new implicit knowledge from semantically annotateddata and to answer complex user query It can be imple-mented as a piece of software to be able to infer logicalconsequences from a set of asserted facts or axioms ManyIOT services belong to the application type For examplewe can infer the Human Comfort Index based on thetemperature and humidity the dangerous level of gas leakingand so on

The reasoning task for IOT applications can be seen as theprocess of applying the reasoning rules in IOT data to derivenew facts We denote as 119882 and 119861 respectively the windowsof sensor streams and background knowledge 119865 representsa set of facts that we want to 120574 contains a set of rules 120574 =

1198771 1198772 1198773 Thus the reasoning task is formalized as 120575

(119882 119861)120574997888rarr 119865

4 Use Case Home Environment Monitoring

In this section we give a common IOT use case It is designedto facilitate the smart real-time monitoring to the homeenvironment We first give an overview of the use case thenthe datamodel is presented At last three concrete applicationexamples are introduced

41 Overview Nowadays people are paying much attentionto the environmental problems since we are facing a seriesof serious environmental pollution types such as smogdisaster and water pollution To deal with these challengesgovernments deploy lots of outdoor monitoring stations tocapture and publish real-time environmental information to

the public However there is limited work in the indoorenvironmentalmonitoring due to a lack of sensor devices andprocessing infrastructure

With the popularity of smart home appliances (egheater air conditioner humidifier and air cleaner) equippedwith environment sensors (eg sensors for temperaturehumidity CO1 CO2 and VOC) large volumes of datafrom all aspects of indoor environment are available whichmakes it possible to implement various home monitoringapplications including emergency detection and indoor airquality index Presently many commercial companies suchas Huawei Cisco Intel and Telecom are planning to deployand develop related hardware and software infrastructure toprovide similar services

Our use case considers the scenario suppose a number ofhouseholds in a city have installed relevant smart appliancesthey want to get a series of environment monitoring servicesfrom the supplier including Indoor Air Pollution Index(API) Indoor Sensor Discovery and Human Comfort Index(119868HC) The three cases correspond to the above three kindsof IOT applications IOT semantic mash-up IOT semanticquery and IOT semantic reasoning

42 Data Model As the paper mainly focuses on the back-ground streaming data processing for IOT applications wedo not create a complex ontology to semantically annotate allthe various IOT data Conversely we design a simple conceptmodel for the home environment monitoring scenario (seeFigure 3)Themodel captures three types of resources homeroom and sensor The label under the resource denotes itsURI ldquoprdquo is the namespace of the properties Every sensorentity has three properties type value and time

Figure 4 shows a snapshot of the stream knowledgegraph based on the concept model Every home containsmultiple rooms (living room bedroom kitchen and so on)Every room is equipped with 15 kinds of sensors includingtemperature humidity illumination volume PM10 PM25O3 CO SO2 and NO2

43 Scenarios

431 Streaming Semantic Mash-Up Outdoor AQI is avail-able to us for years while little attention is paid to indoorAQI which is also important both for customers and fordevice suppliers For customers the indoor AQI can help

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 2: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

2 International Journal of Distributed Sensor Networks

IOT applications

Semantic analysis and queryServiceaccess

Semantic mash-up

Reasoning

Ontology modeling

Semantic annotation

Device abstraction

IOT data collectionData

repository

Ontologyrepository

Abstractionand

semantics

Dataaccess

Figure 1 Generic functional semantic model for supporting IOT applications

web of data such as Linked Data [3] DBpedia [4] Linked-Geodata [5] and various kinds of data fromWeb Services Atlast the service layer provides an interface for various IOTapplications by semantic processing technologies includingsemantic mash-up query and reasoning

Currently most of the existing works aim at the anno-tation and definition of various WSNs by providing corre-sponding description ontology For example ontologies suchas the W3Cs Semantic Sensor Network (SSN) ontology havebeen developed offering a number of constructs to formallydescribe not only the sensor resources but also the sensorobservation and measurement data [6] However there hasbeen little work focusing on the background processing oflarge-scale streaming IOT data In the paper we present alarge-scale real-time semantic processing framework for IOTapplications The proposed framework efficiently capturesand models different scenarios for various IOT applicationsWe have implemented an elastic streaming engine based onpopular large-scale distributed computing platform SPARK[7] Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scale forlarge number of sensors streams with different types of IOTapplications

The remainder of this paper is organized as followsSection 2 outlines related work In Section 3 we introducethe semantic processing framework and processing enginefor IOT applications Section 4 describes a typical use casein home environment monitoring Section 5 presents ourexperiments and results Finally we conclude the work inSection 6

2 Related Work

To the best of our knowledge our framework and system arethe first work addressing various semantic processing tasksfor large-scale streaming IOT data including IOT semantic

mash-up semantic query and semantic reasoning There issome related work as follows

21 IOT Modeling and Ontology One key research topic inIOT is to represent the ldquothingsrdquo by standard vocabulariesand schemas Semantic Sensor Web (SSW) is a technology inwhich sensor data is semantically annotated for interoperabil-ity and also provides contextual information for situationalknowledge [8] Many works have proposed semantic modelfor representing sensors and data Ontologies such as theW3Crsquos SSN ontology have been developed [6] These ontolo-gies provide metadata for numerical spatial temporal andother semantic objects Similar works for sensor metadatadescription also include SensorDataOntology (SDO) [9] andSensorML [10]

These works mainly focus on semantic annotation for theinteroperability of IOT by defining a unified and standardontology paying no attention to the high-level semantic IOTapplications

22 Semantic IOT Applications Gyrard proposes a semantic-based Machine-to-Machine Measurement approach (M3) toautomatically combine enrich and reason about IOT datato provide promising cross-domain IOT applications suchas naturopathy application based on multiple datasets [11]The approach also presents a hub for cross-domain ontologiesand datasets References [12 13] apply the IOT in the genericagriculture and healthcare context management SSEO [14] isdeveloped to enable semantic indexing machine-processableevent detection and data exchange for smart spacemodelingOther applications include CONON [15] CoOL [16] andCoBrA [17]

Most of the work aims at building IOT applications in aspecific domain failing to provide a generic semantic IOTprocessing framework And they also did not deal with some

International Journal of Distributed Sensor Networks 3

important challenges for IOT data such as the real time andscalability

23 Stream Processing for Semantic Data There are sev-eral semantic stream data processing engines includingStreaming SPARQL [18] C-SPARQL [19] and CQELS [20]Streaming SPARQL extends SPARQL to process data streamsC-SPARQL defines an extension of SPARQL whose dis-tinguishing feature is the support of continuous queriesthat is queries registered over RDF data streams and thencontinuously executed CQELS is a native and adaptive queryprocessor for unified query processing over Linked StreamData and Linked Data

However most of these works only focus on the semanticquery for Linked Stream Data ignoring other commondemands of IOT applications including semantic mash-upand reasoningWhat is more the systems are designed to runon a single machine while our system goes beyond that andspecifically focuses on the common scalability issues for IOTapplications

3 Proposed Framework and ElasticProcessing Engine

In this section we propose the large-scale real-time semanticprocessing framework for IOT applications and elaboratethe elastic processing engine to explain how it provides thecapabilities for performing various IOT applications

31 Framework Figure 2 shows the architecture of oursemantic processing framework In general it consists of fiveparts physical entities layer abstract entities layer window-based data stream layer virtual entities layer and elasticsemantic engine layer

311 Physical Entities Layer Physical entities layer is locatedin the lowest layer of the framework which is responsible forcollecting raw sensor data in real time Every physical entityrepresents a tangible element that can be sensed by sensorsthat are deployed in the oneM2MField Domain environmentand that is not specific to a particular IOT applicationin this environment According to the oneM2M projectstandardization every kind of sensors is to be organized bylogical entity (AE) and common services entity (CSE) whichprovide application logic and common services respectively

312 Abstract Entities Layer Abstract entities layer is respon-sible for receiving and implementing the abstraction forthe physical devices by the semantic annotation of proxysoftware The abstraction layer aims at hiding the complexityof devices and environments by providing a standard formatto represent devices So from the view of upper layer all theheterogeneous physical sensors can be seen as unified datastreams

313Window-BasedData StreamLayer The layer focuses onextracting related data streams into the windows according

to the demands of upper applications In the real-worldIOT applications data takes the form of continuous streamsinstead of the form of finite datasets stored in a traditionalrepository This is the case for traffic monitoring environ-ment monitoring disaster management telecommunicationmanagement manufacturing and many other domainsEvery sensor corresponds to a window with a certain size

314 Virtual Entities Layer Virtual entities layer aggregatesthe related window data required by every virtual entityVirtual entity is a new resource created by multiple windowdata streams which is used to accomplish an applicationservice For our latter use case if user in a home requeststhe service for Discomfort Index (DI) a new virtual entitywill be generated through aggregating corresponding homeappliance sensors (such as temperature heater and aircleaner sensors) Then we can get the service of DI by thevirtual entity

315 Elastic Semantic Engine Layer The elastic semanticengine layer is the key of the architecture The layer isresponsible for receiving of outer requests creating of cor-responding virtual entities interacting with static web ofdata and real-time returning of continuous results Our workmainly focuses on the layer We will discuss it in detail in thenext section

32 Elastic Streaming Processing Engine Our elastic seman-tic streaming processing engine provides various commonIOT services by constructing corresponding virtual entitiesincluding IOT semantic mash-up query and reasoningEvery virtual entity aggregates the RDF streams from cor-responding several windows A window extracts the latestelements from the sensor stream Besides the streamingIOT data some applications need auxiliary backgroundknowledge such as LinkedOpenData DBpedia and Linked-Geodata

In this part related definitions are first given then weelaborate on the 3 functional modules of the engines

Definition 1 (RDF stream (S)) The basic data unit for RDFstream is a quad (⟨119904 119901 119900 119905⟩) A RDF stream is defined as anordered sequence of pairs where every pair is constituted bymultiple basic data units denoted as 119863119895119894 where 119894 representsthe identification (ID) of certain sensor and 119895 is the times-tamp For example 119878119894 = 119863

0119894 1198631119894 1198632119894 119894 isin N denotes the

RDF stream data of the 119894th sensor

Definition 2 (window (W)) A window is a subset of theRDF streams given a time range 119905 119882119894(119905) = 119863

0119894 1198631119894

1198632119894 119863

119905minus1119894 119905 isin N denotes the RDF stream data of the

119894th sensor within the latest 119905 logical time units For example1198820(3) can represent the data of Sensor0 within the last 3seconds

Definition 3 (virtual window (V)) Virtual window aggre-gates the related data needed by a virtual entity which

4 International Journal of Distributed Sensor Networks

Sound monitor

serviceAE

Sound monitorCSE

Sound monitor

Mca

Weather sensors

Mcc

Physical entities

Sound sensors

AnnotationProxies

Abstract entities

Window-baseddata stream

Virtual entities

Mcc

Weather monitor

serviceAE

Weather monitorCSE

Weather monitor

Mcc

Mcc

GPS monitorserviceAE

GPS monitorCSE

GPS monitor

Mcc

GPS sensors

Mcc

Light monitorserviceAE

Light monitorCSE

Light monitor

Mcc

Light sensors

Backgroundknowledge

Semantic query Semantic mash-up Semantic reasoningElastic semantic

engine

IN-CSE

IOT applications

middot middot middot

middot middot middotmiddot middot middot

middot middot middot middot middot middot middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

T0

T1

T2

T3

T4

V1 V2 V3 Vn

W0 W1 W2Wk W12

W13Wn

S0 S1 S2 Sk S12 S13 Sn middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

Other devices

D00

D10

D20

D30

D40

D0k

D1k

D2k

D3k

D4k

D0n

D1n

D2n

D3n

D4n

Figure 2 Large-scale real-time semantic processing framework for IOT applications

includes the corresponding window and background knowl-edge 119861 = (119904 119901 119900) A virtual window can be denoted as 119881119894 =119882119894 119861119894 where 119882119894 represents the set of windows aggregated

by the virtual window 119881119894 and 119861119894 is the set of background

knowledge bases needed by 119881119894

321 IOT Semantic Mash-Up Semantic mash-up is oneof the most basic demands in IOT domain since manyIOT applications rely on the task It provides functionalitiesto support new services by aggregating multiple disperseresources For example ldquocompute the indoor air quality index(AQI) of a roomrdquo is a typical mash-up application whichneeds to accomplish the task based on various window datasources including PM25 O3 and CO

The mash-up task is formalized via the concepts offiltering and recombination Given a set of RDF streams 119878 =

1198780 1198781 1198782 119878119873 119873 is the number of sensors streams Afiltering is a function 120592 119878 rarr 119879 which maps the primitiveRDF streams to a triple set 119879 = (119904 119901 119900) A recombinationis a mapping 120574 119879 rarr 119879

1015840 which transforms 119879 to 1198791015840 based

on the mash-up formulas Take indoor AQI for example 119879represents the triples containing the concentration of relatedsensors 120574 denotes the mapping formula for computing theindividual AQI

322 IOT Semantic Query IOT semantic query is a commonfunction for IOT applications It enhances the IOT discov-ery mechanism to allow locating and linking resources orservices based on their semantic information such as ldquoget

International Journal of Distributed Sensor Networks 5

phasRoom

pvalueType

Home Room Sensor

Type

phasSensorValue

Time

phasValue

ptimeStamp

URI httphemorghome URI httphemorgroomROOM_ID URI httphemorgsensorSENSOR_ID

p=ldquohttphemorgpredicaterdquo

Figure 3 The simple concept model for home environment monitoring

the temperature of the room0rdquo and ldquoget the all rooms whosePM25 ge 80rdquo

The query task is formalized via the concept of mappingWe denote as 119868 119861 119871 and 119881 respectively the domains ofIRIs blank nodes literals and variables which are all disjointWe also define 119879 = (119868 cup 119861 cup 119871) A mapping 120583 is a partialfunction 120583 119881 rarr 119879 which gives the bindings for all thevariables of a query Evaluation occurs when an input graphpattern (denoted as 119875) in the query is matched against avirtual window (119881) 119875 is a set of triple patterns 119905 = (119904 119901 119900)

such that 119904 119901 119900 isin (119881 cup 119879) We then define dom(120583) as thesubset of 119881 where 120583 is defined (ie the domain of 120583) and usethe notation 120583(119909) to refer to the bindings of variable 119909 in 120583

323 IOT Semantic Reasoning Reasoning is a mechanism toderive new implicit knowledge from semantically annotateddata and to answer complex user query It can be imple-mented as a piece of software to be able to infer logicalconsequences from a set of asserted facts or axioms ManyIOT services belong to the application type For examplewe can infer the Human Comfort Index based on thetemperature and humidity the dangerous level of gas leakingand so on

The reasoning task for IOT applications can be seen as theprocess of applying the reasoning rules in IOT data to derivenew facts We denote as 119882 and 119861 respectively the windowsof sensor streams and background knowledge 119865 representsa set of facts that we want to 120574 contains a set of rules 120574 =

1198771 1198772 1198773 Thus the reasoning task is formalized as 120575

(119882 119861)120574997888rarr 119865

4 Use Case Home Environment Monitoring

In this section we give a common IOT use case It is designedto facilitate the smart real-time monitoring to the homeenvironment We first give an overview of the use case thenthe datamodel is presented At last three concrete applicationexamples are introduced

41 Overview Nowadays people are paying much attentionto the environmental problems since we are facing a seriesof serious environmental pollution types such as smogdisaster and water pollution To deal with these challengesgovernments deploy lots of outdoor monitoring stations tocapture and publish real-time environmental information to

the public However there is limited work in the indoorenvironmentalmonitoring due to a lack of sensor devices andprocessing infrastructure

With the popularity of smart home appliances (egheater air conditioner humidifier and air cleaner) equippedwith environment sensors (eg sensors for temperaturehumidity CO1 CO2 and VOC) large volumes of datafrom all aspects of indoor environment are available whichmakes it possible to implement various home monitoringapplications including emergency detection and indoor airquality index Presently many commercial companies suchas Huawei Cisco Intel and Telecom are planning to deployand develop related hardware and software infrastructure toprovide similar services

Our use case considers the scenario suppose a number ofhouseholds in a city have installed relevant smart appliancesthey want to get a series of environment monitoring servicesfrom the supplier including Indoor Air Pollution Index(API) Indoor Sensor Discovery and Human Comfort Index(119868HC) The three cases correspond to the above three kindsof IOT applications IOT semantic mash-up IOT semanticquery and IOT semantic reasoning

42 Data Model As the paper mainly focuses on the back-ground streaming data processing for IOT applications wedo not create a complex ontology to semantically annotate allthe various IOT data Conversely we design a simple conceptmodel for the home environment monitoring scenario (seeFigure 3)Themodel captures three types of resources homeroom and sensor The label under the resource denotes itsURI ldquoprdquo is the namespace of the properties Every sensorentity has three properties type value and time

Figure 4 shows a snapshot of the stream knowledgegraph based on the concept model Every home containsmultiple rooms (living room bedroom kitchen and so on)Every room is equipped with 15 kinds of sensors includingtemperature humidity illumination volume PM10 PM25O3 CO SO2 and NO2

43 Scenarios

431 Streaming Semantic Mash-Up Outdoor AQI is avail-able to us for years while little attention is paid to indoorAQI which is also important both for customers and fordevice suppliers For customers the indoor AQI can help

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 3: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of Distributed Sensor Networks 3

important challenges for IOT data such as the real time andscalability

23 Stream Processing for Semantic Data There are sev-eral semantic stream data processing engines includingStreaming SPARQL [18] C-SPARQL [19] and CQELS [20]Streaming SPARQL extends SPARQL to process data streamsC-SPARQL defines an extension of SPARQL whose dis-tinguishing feature is the support of continuous queriesthat is queries registered over RDF data streams and thencontinuously executed CQELS is a native and adaptive queryprocessor for unified query processing over Linked StreamData and Linked Data

However most of these works only focus on the semanticquery for Linked Stream Data ignoring other commondemands of IOT applications including semantic mash-upand reasoningWhat is more the systems are designed to runon a single machine while our system goes beyond that andspecifically focuses on the common scalability issues for IOTapplications

3 Proposed Framework and ElasticProcessing Engine

In this section we propose the large-scale real-time semanticprocessing framework for IOT applications and elaboratethe elastic processing engine to explain how it provides thecapabilities for performing various IOT applications

31 Framework Figure 2 shows the architecture of oursemantic processing framework In general it consists of fiveparts physical entities layer abstract entities layer window-based data stream layer virtual entities layer and elasticsemantic engine layer

311 Physical Entities Layer Physical entities layer is locatedin the lowest layer of the framework which is responsible forcollecting raw sensor data in real time Every physical entityrepresents a tangible element that can be sensed by sensorsthat are deployed in the oneM2MField Domain environmentand that is not specific to a particular IOT applicationin this environment According to the oneM2M projectstandardization every kind of sensors is to be organized bylogical entity (AE) and common services entity (CSE) whichprovide application logic and common services respectively

312 Abstract Entities Layer Abstract entities layer is respon-sible for receiving and implementing the abstraction forthe physical devices by the semantic annotation of proxysoftware The abstraction layer aims at hiding the complexityof devices and environments by providing a standard formatto represent devices So from the view of upper layer all theheterogeneous physical sensors can be seen as unified datastreams

313Window-BasedData StreamLayer The layer focuses onextracting related data streams into the windows according

to the demands of upper applications In the real-worldIOT applications data takes the form of continuous streamsinstead of the form of finite datasets stored in a traditionalrepository This is the case for traffic monitoring environ-ment monitoring disaster management telecommunicationmanagement manufacturing and many other domainsEvery sensor corresponds to a window with a certain size

314 Virtual Entities Layer Virtual entities layer aggregatesthe related window data required by every virtual entityVirtual entity is a new resource created by multiple windowdata streams which is used to accomplish an applicationservice For our latter use case if user in a home requeststhe service for Discomfort Index (DI) a new virtual entitywill be generated through aggregating corresponding homeappliance sensors (such as temperature heater and aircleaner sensors) Then we can get the service of DI by thevirtual entity

315 Elastic Semantic Engine Layer The elastic semanticengine layer is the key of the architecture The layer isresponsible for receiving of outer requests creating of cor-responding virtual entities interacting with static web ofdata and real-time returning of continuous results Our workmainly focuses on the layer We will discuss it in detail in thenext section

32 Elastic Streaming Processing Engine Our elastic seman-tic streaming processing engine provides various commonIOT services by constructing corresponding virtual entitiesincluding IOT semantic mash-up query and reasoningEvery virtual entity aggregates the RDF streams from cor-responding several windows A window extracts the latestelements from the sensor stream Besides the streamingIOT data some applications need auxiliary backgroundknowledge such as LinkedOpenData DBpedia and Linked-Geodata

In this part related definitions are first given then weelaborate on the 3 functional modules of the engines

Definition 1 (RDF stream (S)) The basic data unit for RDFstream is a quad (⟨119904 119901 119900 119905⟩) A RDF stream is defined as anordered sequence of pairs where every pair is constituted bymultiple basic data units denoted as 119863119895119894 where 119894 representsthe identification (ID) of certain sensor and 119895 is the times-tamp For example 119878119894 = 119863

0119894 1198631119894 1198632119894 119894 isin N denotes the

RDF stream data of the 119894th sensor

Definition 2 (window (W)) A window is a subset of theRDF streams given a time range 119905 119882119894(119905) = 119863

0119894 1198631119894

1198632119894 119863

119905minus1119894 119905 isin N denotes the RDF stream data of the

119894th sensor within the latest 119905 logical time units For example1198820(3) can represent the data of Sensor0 within the last 3seconds

Definition 3 (virtual window (V)) Virtual window aggre-gates the related data needed by a virtual entity which

4 International Journal of Distributed Sensor Networks

Sound monitor

serviceAE

Sound monitorCSE

Sound monitor

Mca

Weather sensors

Mcc

Physical entities

Sound sensors

AnnotationProxies

Abstract entities

Window-baseddata stream

Virtual entities

Mcc

Weather monitor

serviceAE

Weather monitorCSE

Weather monitor

Mcc

Mcc

GPS monitorserviceAE

GPS monitorCSE

GPS monitor

Mcc

GPS sensors

Mcc

Light monitorserviceAE

Light monitorCSE

Light monitor

Mcc

Light sensors

Backgroundknowledge

Semantic query Semantic mash-up Semantic reasoningElastic semantic

engine

IN-CSE

IOT applications

middot middot middot

middot middot middotmiddot middot middot

middot middot middot middot middot middot middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

T0

T1

T2

T3

T4

V1 V2 V3 Vn

W0 W1 W2Wk W12

W13Wn

S0 S1 S2 Sk S12 S13 Sn middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

Other devices

D00

D10

D20

D30

D40

D0k

D1k

D2k

D3k

D4k

D0n

D1n

D2n

D3n

D4n

Figure 2 Large-scale real-time semantic processing framework for IOT applications

includes the corresponding window and background knowl-edge 119861 = (119904 119901 119900) A virtual window can be denoted as 119881119894 =119882119894 119861119894 where 119882119894 represents the set of windows aggregated

by the virtual window 119881119894 and 119861119894 is the set of background

knowledge bases needed by 119881119894

321 IOT Semantic Mash-Up Semantic mash-up is oneof the most basic demands in IOT domain since manyIOT applications rely on the task It provides functionalitiesto support new services by aggregating multiple disperseresources For example ldquocompute the indoor air quality index(AQI) of a roomrdquo is a typical mash-up application whichneeds to accomplish the task based on various window datasources including PM25 O3 and CO

The mash-up task is formalized via the concepts offiltering and recombination Given a set of RDF streams 119878 =

1198780 1198781 1198782 119878119873 119873 is the number of sensors streams Afiltering is a function 120592 119878 rarr 119879 which maps the primitiveRDF streams to a triple set 119879 = (119904 119901 119900) A recombinationis a mapping 120574 119879 rarr 119879

1015840 which transforms 119879 to 1198791015840 based

on the mash-up formulas Take indoor AQI for example 119879represents the triples containing the concentration of relatedsensors 120574 denotes the mapping formula for computing theindividual AQI

322 IOT Semantic Query IOT semantic query is a commonfunction for IOT applications It enhances the IOT discov-ery mechanism to allow locating and linking resources orservices based on their semantic information such as ldquoget

International Journal of Distributed Sensor Networks 5

phasRoom

pvalueType

Home Room Sensor

Type

phasSensorValue

Time

phasValue

ptimeStamp

URI httphemorghome URI httphemorgroomROOM_ID URI httphemorgsensorSENSOR_ID

p=ldquohttphemorgpredicaterdquo

Figure 3 The simple concept model for home environment monitoring

the temperature of the room0rdquo and ldquoget the all rooms whosePM25 ge 80rdquo

The query task is formalized via the concept of mappingWe denote as 119868 119861 119871 and 119881 respectively the domains ofIRIs blank nodes literals and variables which are all disjointWe also define 119879 = (119868 cup 119861 cup 119871) A mapping 120583 is a partialfunction 120583 119881 rarr 119879 which gives the bindings for all thevariables of a query Evaluation occurs when an input graphpattern (denoted as 119875) in the query is matched against avirtual window (119881) 119875 is a set of triple patterns 119905 = (119904 119901 119900)

such that 119904 119901 119900 isin (119881 cup 119879) We then define dom(120583) as thesubset of 119881 where 120583 is defined (ie the domain of 120583) and usethe notation 120583(119909) to refer to the bindings of variable 119909 in 120583

323 IOT Semantic Reasoning Reasoning is a mechanism toderive new implicit knowledge from semantically annotateddata and to answer complex user query It can be imple-mented as a piece of software to be able to infer logicalconsequences from a set of asserted facts or axioms ManyIOT services belong to the application type For examplewe can infer the Human Comfort Index based on thetemperature and humidity the dangerous level of gas leakingand so on

The reasoning task for IOT applications can be seen as theprocess of applying the reasoning rules in IOT data to derivenew facts We denote as 119882 and 119861 respectively the windowsof sensor streams and background knowledge 119865 representsa set of facts that we want to 120574 contains a set of rules 120574 =

1198771 1198772 1198773 Thus the reasoning task is formalized as 120575

(119882 119861)120574997888rarr 119865

4 Use Case Home Environment Monitoring

In this section we give a common IOT use case It is designedto facilitate the smart real-time monitoring to the homeenvironment We first give an overview of the use case thenthe datamodel is presented At last three concrete applicationexamples are introduced

41 Overview Nowadays people are paying much attentionto the environmental problems since we are facing a seriesof serious environmental pollution types such as smogdisaster and water pollution To deal with these challengesgovernments deploy lots of outdoor monitoring stations tocapture and publish real-time environmental information to

the public However there is limited work in the indoorenvironmentalmonitoring due to a lack of sensor devices andprocessing infrastructure

With the popularity of smart home appliances (egheater air conditioner humidifier and air cleaner) equippedwith environment sensors (eg sensors for temperaturehumidity CO1 CO2 and VOC) large volumes of datafrom all aspects of indoor environment are available whichmakes it possible to implement various home monitoringapplications including emergency detection and indoor airquality index Presently many commercial companies suchas Huawei Cisco Intel and Telecom are planning to deployand develop related hardware and software infrastructure toprovide similar services

Our use case considers the scenario suppose a number ofhouseholds in a city have installed relevant smart appliancesthey want to get a series of environment monitoring servicesfrom the supplier including Indoor Air Pollution Index(API) Indoor Sensor Discovery and Human Comfort Index(119868HC) The three cases correspond to the above three kindsof IOT applications IOT semantic mash-up IOT semanticquery and IOT semantic reasoning

42 Data Model As the paper mainly focuses on the back-ground streaming data processing for IOT applications wedo not create a complex ontology to semantically annotate allthe various IOT data Conversely we design a simple conceptmodel for the home environment monitoring scenario (seeFigure 3)Themodel captures three types of resources homeroom and sensor The label under the resource denotes itsURI ldquoprdquo is the namespace of the properties Every sensorentity has three properties type value and time

Figure 4 shows a snapshot of the stream knowledgegraph based on the concept model Every home containsmultiple rooms (living room bedroom kitchen and so on)Every room is equipped with 15 kinds of sensors includingtemperature humidity illumination volume PM10 PM25O3 CO SO2 and NO2

43 Scenarios

431 Streaming Semantic Mash-Up Outdoor AQI is avail-able to us for years while little attention is paid to indoorAQI which is also important both for customers and fordevice suppliers For customers the indoor AQI can help

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 4: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

4 International Journal of Distributed Sensor Networks

Sound monitor

serviceAE

Sound monitorCSE

Sound monitor

Mca

Weather sensors

Mcc

Physical entities

Sound sensors

AnnotationProxies

Abstract entities

Window-baseddata stream

Virtual entities

Mcc

Weather monitor

serviceAE

Weather monitorCSE

Weather monitor

Mcc

Mcc

GPS monitorserviceAE

GPS monitorCSE

GPS monitor

Mcc

GPS sensors

Mcc

Light monitorserviceAE

Light monitorCSE

Light monitor

Mcc

Light sensors

Backgroundknowledge

Semantic query Semantic mash-up Semantic reasoningElastic semantic

engine

IN-CSE

IOT applications

middot middot middot

middot middot middotmiddot middot middot

middot middot middot middot middot middot middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

T0

T1

T2

T3

T4

V1 V2 V3 Vn

W0 W1 W2Wk W12

W13Wn

S0 S1 S2 Sk S12 S13 Sn middot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

Other devices

D00

D10

D20

D30

D40

D0k

D1k

D2k

D3k

D4k

D0n

D1n

D2n

D3n

D4n

Figure 2 Large-scale real-time semantic processing framework for IOT applications

includes the corresponding window and background knowl-edge 119861 = (119904 119901 119900) A virtual window can be denoted as 119881119894 =119882119894 119861119894 where 119882119894 represents the set of windows aggregated

by the virtual window 119881119894 and 119861119894 is the set of background

knowledge bases needed by 119881119894

321 IOT Semantic Mash-Up Semantic mash-up is oneof the most basic demands in IOT domain since manyIOT applications rely on the task It provides functionalitiesto support new services by aggregating multiple disperseresources For example ldquocompute the indoor air quality index(AQI) of a roomrdquo is a typical mash-up application whichneeds to accomplish the task based on various window datasources including PM25 O3 and CO

The mash-up task is formalized via the concepts offiltering and recombination Given a set of RDF streams 119878 =

1198780 1198781 1198782 119878119873 119873 is the number of sensors streams Afiltering is a function 120592 119878 rarr 119879 which maps the primitiveRDF streams to a triple set 119879 = (119904 119901 119900) A recombinationis a mapping 120574 119879 rarr 119879

1015840 which transforms 119879 to 1198791015840 based

on the mash-up formulas Take indoor AQI for example 119879represents the triples containing the concentration of relatedsensors 120574 denotes the mapping formula for computing theindividual AQI

322 IOT Semantic Query IOT semantic query is a commonfunction for IOT applications It enhances the IOT discov-ery mechanism to allow locating and linking resources orservices based on their semantic information such as ldquoget

International Journal of Distributed Sensor Networks 5

phasRoom

pvalueType

Home Room Sensor

Type

phasSensorValue

Time

phasValue

ptimeStamp

URI httphemorghome URI httphemorgroomROOM_ID URI httphemorgsensorSENSOR_ID

p=ldquohttphemorgpredicaterdquo

Figure 3 The simple concept model for home environment monitoring

the temperature of the room0rdquo and ldquoget the all rooms whosePM25 ge 80rdquo

The query task is formalized via the concept of mappingWe denote as 119868 119861 119871 and 119881 respectively the domains ofIRIs blank nodes literals and variables which are all disjointWe also define 119879 = (119868 cup 119861 cup 119871) A mapping 120583 is a partialfunction 120583 119881 rarr 119879 which gives the bindings for all thevariables of a query Evaluation occurs when an input graphpattern (denoted as 119875) in the query is matched against avirtual window (119881) 119875 is a set of triple patterns 119905 = (119904 119901 119900)

such that 119904 119901 119900 isin (119881 cup 119879) We then define dom(120583) as thesubset of 119881 where 120583 is defined (ie the domain of 120583) and usethe notation 120583(119909) to refer to the bindings of variable 119909 in 120583

323 IOT Semantic Reasoning Reasoning is a mechanism toderive new implicit knowledge from semantically annotateddata and to answer complex user query It can be imple-mented as a piece of software to be able to infer logicalconsequences from a set of asserted facts or axioms ManyIOT services belong to the application type For examplewe can infer the Human Comfort Index based on thetemperature and humidity the dangerous level of gas leakingand so on

The reasoning task for IOT applications can be seen as theprocess of applying the reasoning rules in IOT data to derivenew facts We denote as 119882 and 119861 respectively the windowsof sensor streams and background knowledge 119865 representsa set of facts that we want to 120574 contains a set of rules 120574 =

1198771 1198772 1198773 Thus the reasoning task is formalized as 120575

(119882 119861)120574997888rarr 119865

4 Use Case Home Environment Monitoring

In this section we give a common IOT use case It is designedto facilitate the smart real-time monitoring to the homeenvironment We first give an overview of the use case thenthe datamodel is presented At last three concrete applicationexamples are introduced

41 Overview Nowadays people are paying much attentionto the environmental problems since we are facing a seriesof serious environmental pollution types such as smogdisaster and water pollution To deal with these challengesgovernments deploy lots of outdoor monitoring stations tocapture and publish real-time environmental information to

the public However there is limited work in the indoorenvironmentalmonitoring due to a lack of sensor devices andprocessing infrastructure

With the popularity of smart home appliances (egheater air conditioner humidifier and air cleaner) equippedwith environment sensors (eg sensors for temperaturehumidity CO1 CO2 and VOC) large volumes of datafrom all aspects of indoor environment are available whichmakes it possible to implement various home monitoringapplications including emergency detection and indoor airquality index Presently many commercial companies suchas Huawei Cisco Intel and Telecom are planning to deployand develop related hardware and software infrastructure toprovide similar services

Our use case considers the scenario suppose a number ofhouseholds in a city have installed relevant smart appliancesthey want to get a series of environment monitoring servicesfrom the supplier including Indoor Air Pollution Index(API) Indoor Sensor Discovery and Human Comfort Index(119868HC) The three cases correspond to the above three kindsof IOT applications IOT semantic mash-up IOT semanticquery and IOT semantic reasoning

42 Data Model As the paper mainly focuses on the back-ground streaming data processing for IOT applications wedo not create a complex ontology to semantically annotate allthe various IOT data Conversely we design a simple conceptmodel for the home environment monitoring scenario (seeFigure 3)Themodel captures three types of resources homeroom and sensor The label under the resource denotes itsURI ldquoprdquo is the namespace of the properties Every sensorentity has three properties type value and time

Figure 4 shows a snapshot of the stream knowledgegraph based on the concept model Every home containsmultiple rooms (living room bedroom kitchen and so on)Every room is equipped with 15 kinds of sensors includingtemperature humidity illumination volume PM10 PM25O3 CO SO2 and NO2

43 Scenarios

431 Streaming Semantic Mash-Up Outdoor AQI is avail-able to us for years while little attention is paid to indoorAQI which is also important both for customers and fordevice suppliers For customers the indoor AQI can help

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 5: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of Distributed Sensor Networks 5

phasRoom

pvalueType

Home Room Sensor

Type

phasSensorValue

Time

phasValue

ptimeStamp

URI httphemorghome URI httphemorgroomROOM_ID URI httphemorgsensorSENSOR_ID

p=ldquohttphemorgpredicaterdquo

Figure 3 The simple concept model for home environment monitoring

the temperature of the room0rdquo and ldquoget the all rooms whosePM25 ge 80rdquo

The query task is formalized via the concept of mappingWe denote as 119868 119861 119871 and 119881 respectively the domains ofIRIs blank nodes literals and variables which are all disjointWe also define 119879 = (119868 cup 119861 cup 119871) A mapping 120583 is a partialfunction 120583 119881 rarr 119879 which gives the bindings for all thevariables of a query Evaluation occurs when an input graphpattern (denoted as 119875) in the query is matched against avirtual window (119881) 119875 is a set of triple patterns 119905 = (119904 119901 119900)

such that 119904 119901 119900 isin (119881 cup 119879) We then define dom(120583) as thesubset of 119881 where 120583 is defined (ie the domain of 120583) and usethe notation 120583(119909) to refer to the bindings of variable 119909 in 120583

323 IOT Semantic Reasoning Reasoning is a mechanism toderive new implicit knowledge from semantically annotateddata and to answer complex user query It can be imple-mented as a piece of software to be able to infer logicalconsequences from a set of asserted facts or axioms ManyIOT services belong to the application type For examplewe can infer the Human Comfort Index based on thetemperature and humidity the dangerous level of gas leakingand so on

The reasoning task for IOT applications can be seen as theprocess of applying the reasoning rules in IOT data to derivenew facts We denote as 119882 and 119861 respectively the windowsof sensor streams and background knowledge 119865 representsa set of facts that we want to 120574 contains a set of rules 120574 =

1198771 1198772 1198773 Thus the reasoning task is formalized as 120575

(119882 119861)120574997888rarr 119865

4 Use Case Home Environment Monitoring

In this section we give a common IOT use case It is designedto facilitate the smart real-time monitoring to the homeenvironment We first give an overview of the use case thenthe datamodel is presented At last three concrete applicationexamples are introduced

41 Overview Nowadays people are paying much attentionto the environmental problems since we are facing a seriesof serious environmental pollution types such as smogdisaster and water pollution To deal with these challengesgovernments deploy lots of outdoor monitoring stations tocapture and publish real-time environmental information to

the public However there is limited work in the indoorenvironmentalmonitoring due to a lack of sensor devices andprocessing infrastructure

With the popularity of smart home appliances (egheater air conditioner humidifier and air cleaner) equippedwith environment sensors (eg sensors for temperaturehumidity CO1 CO2 and VOC) large volumes of datafrom all aspects of indoor environment are available whichmakes it possible to implement various home monitoringapplications including emergency detection and indoor airquality index Presently many commercial companies suchas Huawei Cisco Intel and Telecom are planning to deployand develop related hardware and software infrastructure toprovide similar services

Our use case considers the scenario suppose a number ofhouseholds in a city have installed relevant smart appliancesthey want to get a series of environment monitoring servicesfrom the supplier including Indoor Air Pollution Index(API) Indoor Sensor Discovery and Human Comfort Index(119868HC) The three cases correspond to the above three kindsof IOT applications IOT semantic mash-up IOT semanticquery and IOT semantic reasoning

42 Data Model As the paper mainly focuses on the back-ground streaming data processing for IOT applications wedo not create a complex ontology to semantically annotate allthe various IOT data Conversely we design a simple conceptmodel for the home environment monitoring scenario (seeFigure 3)Themodel captures three types of resources homeroom and sensor The label under the resource denotes itsURI ldquoprdquo is the namespace of the properties Every sensorentity has three properties type value and time

Figure 4 shows a snapshot of the stream knowledgegraph based on the concept model Every home containsmultiple rooms (living room bedroom kitchen and so on)Every room is equipped with 15 kinds of sensors includingtemperature humidity illumination volume PM10 PM25O3 CO SO2 and NO2

43 Scenarios

431 Streaming Semantic Mash-Up Outdoor AQI is avail-able to us for years while little attention is paid to indoorAQI which is also important both for customers and fordevice suppliers For customers the indoor AQI can help

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 6: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

6 International Journal of Distributed Sensor Networks

httphemorghome

httphemorgroomlivingroom_1

httphemorgsensor00000001temp

256

2014-05-06 170146

httphemorgroombedroom_1

httphemorgroomkitchen_1

httphemorgroomstudyroom_1

httphemorgroombathroom_1

phasRoom

httphemorgsensor00000016

httphemorgsensor00000017

PM25

800

2014-05-06 170146

humidity

670

2014-05-06 170146

phasRoom

phasRoom

phasRoomphasRoom

pvalueType

phasSensor

phasSensor

phasSensor

phasSensor

phasValuepsamplingTime

phasValue

phasValue

pvalueType

pvalueType

psamplingTime

psamplingTime

middot middot middotmiddot middot middotmiddot middot middotmiddot middot middot

middot middot middotmiddot middot middot

middot middot middotmiddot middot middotmiddot middot middot

Figure 4 A snapshot of the stream knowledge graph

them keep track of the latest situation of the house and thetop air pollutants For suppliers the AQI data can help themmonitor their devices and have a better understanding of theneeds of different customers

The indoor AQI task is a typical IOT semantic mash-upapplication since it needs to integrate multiple window datasources and combine them to complete a specific work TheindoorAQI task is composed of two phasesThe first step is tocompute the individual AQI (IAQI) for a pollutant Equation(1) gives the computing formula for IAQIp based on [21]The parameters in the equation are relevant to the specificpollutant Related pollutants include PM10 PM25 O3 COSO2 and NO2 Then these IAQIs will be sorted based on (2)The final result will be displayed by a sequence of IAQIs ina descending order which will keep customers informed ofthe noticeable pollutants For more details readers can referto [21] Consider

IAQIp =IAQIHi minus IAQILoBPHi minus BPLo

(119862119901 minus BPLo) + IAQILo (1)

AQI = max IAQI1 IAQI2 IAQI3 IAQI119899 (2)

432 Streaming Semantic Query The streaming semanticquery provides us with a basic function to discover and querythe IOT resources in real time We implement the following6 query examples to illustrate its applications (Table 1) Allstreaming queries are showed in Appendix A

433 Streaming Semantic Reasoning Reasoning is ubiqui-tous in the IOT environment We can derive correspondingconclusions if certain data streams trigger reasoning rulesFor example we can get warnings if some pollutantsrsquo concen-tration exceeds normal range such as temperature and COOther reasoning examples include inferring the health statusand sleep quality of a person based on some wearable devicessuch as smart band

Table 1 IOT streaming query examples

Query Goal

Q1 Query the type and value of all sensors in a specificroom

Q2 Query the value of PM25 sensor in a specific room

Q3 Query the value of all CO sensors and correspondingroom ID

Q4 Query the value of all SO2 sensors and correspondingsensor ID

Q5 Query all the room ID and sampling time withhumidity sensor

Q6 Query the temperature and sampling time in a specificroom

Here we give the example of reasoning the humancomfort level The application will help us to keep track ofthe conditions of indoor rooms and automatically adjust theindoor environment to prevent heatstroke or cold in timeSpecifically two kinds of sensor streams (temperature andhumidity) will be first integrated to compute the HumanComfort Index according to (3) Then based on reasoningrules in Appendix B the level of human comfort will bederived Consider

119868HC = 119879 minus 055 (1 minus 119867119877) (119879 minus 58) (3)

5 Experiment and Evaluation

In this section we introduce the experiments and evalua-tions First the experimental environment is briefly presentedincluding the configuration and data Then extended exper-iments are performed to evaluate the systemrsquos functionalityand scalability

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 7: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of Distributed Sensor Networks 7

(PM10 650 58)(PM25 870 115)

(CO 2716 27)

(PM10 650)(PM25 870)

(CO 2716)

Map Map

(Type value) (Type value IAQI) (Type AQI)

(PM25 115)

(PM10 58)(CO 27)

tnsimtn+1 tnsimtn+1 tnsimtn+1

(O3 13)

(SO2 66)(NO2 69)

(NO2 550)(SO2 810)

(O3 430)

(NO2 550 69)(SO2 810 66)

(O3 430 13)

(a) A snapshot of indoor AQI streaming mash-up

Value

Value

Time

Time

ldquo339rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo157rdquo^^lthttpwwww3org2001XMLSchemafloatgtldquo196rdquo^^lthttpwwww3org2001XMLSchemafloatgt

ldquo2014-05-27 181046rdquoldquo2014-05-27 181051rdquo

ldquo2014-05-27 181056rdquoldquo2014-05-27 181051rdquo

Time 1401185460000ms

Time 1401185455000ms

(b) A snapshot of indoor CO streaming query

(temp 236)

(comfort 720)

(720 1)

(humidity 377)

Time 1401099375000ms

Time 1401099375000ms

Time 1401099375000ms

(c) A snapshot of indoor human comfort streaming reasoning

Figure 5 The snapshot of indoor environment monitoring scenarios

51 Experiment Setup

Configuration The experiment is implemented on a SPARKcluster with three machines Each node has 16GB DDR3RAM 8-core Intel Xeon E5606 CPUs at 213 GHz and 15 TBdisk The nodes are connected by the network with thebandwidth of 1000Ms All the nodes use CentOS64 with thesoftware types JDK-170 Scala-1101 and SPARK-090

Data The experimental data is generated by our streamdata generator whose schema is based on the concept modelin Figure 3 The main parameters of the generator are 119877

and 119879 denoting the number of homes and sampling timerespectively The number of homes is in proportion to thenumber of sensors denoted by119873119904 (119873119904 = 15 lowast 5 lowast 119877 where 15and 5 represent the number of sensors in a roomand rooms ina home) Sampling time stimulates the rate of sensor streamThe average data size generated by a sensor within a samplingtime is 05 (KB) Data generator and all the source codes are

available in (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

52 Functional Evaluation For functional experiment wefirst briefly introduce the implementation of the elasticstreaming semantic engine Then based on the proposedengine 3 kinds of representative IOT applications are pre-sented to illustrate the functional characteristics of oursystem

We built our elastic streaming processing engine basedon the efficient in-memory cluster computing frameworkSPARK which provides us with rich data abstraction andoperation abstraction tomeet the needs of various IOT appli-cations For the data model we use the DStream (DiscretizedStream) to model the window streams For the processingmodel operators provided by SPARK such as ldquofilterrdquo andldquomaprdquo are translated into the processing primitives to effec-tively implement the different IOT scenarios

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 8: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

8 International Journal of Distributed Sensor NetworksTD

(s)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 30000

Ns = 90000

Ns = 120000

Ns = 150000

Figure 6 Processing time (TD) with increased sensors in singlenode

Presently we have preliminarily implemented the IOTmash-up subsystem query subsystem and reasoning subsys-tem Every subsystem acts as a module of our elastic seman-tic processing engines Once an IOT application requestsservice corresponding subsystem will be activated to runa SPARK job to return continuous results Figure 5 showspartial running results of the previous 3 use cases For moreresults readers can access (httpsgithubcomhualichenxiSemantic-IOT-EnginetreemasterExperiment)

53 Scalability Evaluation For scalability experiment we usethe AQI use case to illustrate the performance of our engineby increasing the number of sensors streams During theprocess of SPARK streaming execution we will write a totaldelay (TD) into the log file after the data in a time slice hasbeen processed completely The parameter records the totaltime from receiving window data to output final results Inour experiment the time slice (D) is set as 5 seconds and wewill run the program for 300 seconds That is to say 60 TDwill be written into the log file

Figures 6 and 7 show the trend of the processing time(TD) in single node and clusterwith varied sensors For singlenode experiment the number of sensors is varied from 15000to 150000 For cluster experiment the number of sensors isvaried from 75000 to 750000The two figures only show theprocessing time for parts of sensors so that we can recognizethe broken line well From both figures in the beginningof executing a SPARK job TD is not stable (0sim50) for allvaried sensors After a while TD will stay in a comparativelystable level Here we choose these TD in the last 250 s andcompute their average value denoted as TDSA To capturethe fluctuation of the processing time we also compute thestandard deviation 120590 of TDSA

Equation (4) computes the systemrsquos throughput119876 (MBs)05 is the average data size generated by a sensor in a sampling

TD (s

)

Execution time (s)

6

5

4

3

2

1

00 50 100 150 200 250 300

Ns = 75000

Ns = 150000

Ns = 300000

Ns = 375000

Figure 7 Processing time (TD) with increased sensors in cluster

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

times104

60

55

50

45

40

35

30

25

20

1515 45 75 105 135

06

05

04

03

02

01

0

Figure 8Throughput andTDwith increased sensors in single node

time119873119878 is the number of sensors and TDSA is the processingtime Consider

119876 =1

1024times

05119873119904

TDSA (4)

sizeup =computing time for processing 119898 times datacomputing time for processing data

(5)

Tables 2 and 3 show the execution results in singlenode and cluster Figures 6 and 7 show the throughput andprocessing time with increased sensors We can conclude thefollowing results from the tables

Firstly we can get the correlation among relevant vari-ables TDSA 119876 and 119873119904 From Figures 8 and 9 we can seethat TDSA and 119876 increase with the increasing numbers ofsensors But when the ratio of TDSA to D reaches a certain

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 9: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of Distributed Sensor Networks 9

Q(M

Bs)

Ns

TDSAD

Q (MBs)TDSAD

06

07

05

04

03

02

01

0

200180160140120100

80604020

0375 1125 1875 2625 3375

times105

Figure 9 Throughput and TD with increased sensors in cluster

Table 2 Throughput and sizeup in single node

119873119904 TD (s) TDD 120590 119876 (MBs) Sizeup15000 0308 617 006584 23759 130000 0566 1132 008999 25879 183645000 0635 1270 009619 34605 20660000 0727 1454 011524 40305 23675000 0751 1502 011416 48769 24490000 0821 1642 010602 53518 266105000 0956 1912 011979 53635 310120000 1218 2437 013368 48092 395135000 1785 3570 019057 36930 579150000 2440 4881 024599 30012 792

value the throughputwill decrease rapidlyThis is because thecomputing capability of the systemwill not be able to catch upwith the rate of the input data stream As a result the delaycaused by the last time slice will have an effect on the nextprocess and the system will becomemore andmore unstableThe evident increasing of 120590 also reflects the result that TDSAhas a larger fluctuation The correlation analysis can help uscontrol the rate of input stream and set proper time slice toaccommodate the ability of the system

Secondly Tables 2 and 3 show that our system achieveshigh throughputs more than 53MBs and 175MBs in singlenode and cluster Benefiting from the systemrsquos elastic process-ing ability it can concurrently process more than 300000sensor streams efficiently

At last the tables show that our system achieves excellentscalability For both single and cluster configuration thesizeup (see (5)) of 119898 times input is much less than 119898Particularly for the cluster when the input stream increasesby 6 times (119873119904 = 262 500) the processing time only increasesby less than 2 (172) times The results mean that the TDincreases much more slowly than input data size and oursystem works better in processing larger input stream Atthe same time the two tables also show that the processingcapability of cluster is much better than single node Forexample when the number of input stream sensors is 150000the execution time in cluster is 0575 compared to 2440

Table 3 Throughput and sizeup in cluster

119873119904 (k) TD (s) TDD 120590 119876 (MBs) Sizeup37500 0438 876 008675 41825 175000 0543 1085 008929 67474 124112500 0566 1132 010169 97025 129150000 0575 1149 010676 127452 131187500 0623 1246 013582 146922 142225000 0627 1254 013051 175160 140262500 0753 1507 014888 170142 172300000 0991 1983 017464 147753 226337500 2519 5037 056164 65431 575375000 3294 6589 078245 55583 752

in single node The best throughput in cluster (175MBs) ismore than 3 times the one in single node (53MBs) It provesour system achieves good flexibility and elastic scalabilityit can adapt to various different application scenarios andrequirements by adding computing nodes

To sum up the results demonstrate excellent scalabilityregarding both the size of input stream and number of nodes

6 Conclusion and Future Work

To effectively process massive streaming IOT data thepaper presents a large-scale real-time semantic processingframework for various IOT applications According to theframework we have implemented an elastic streaming enginebased on popular large-scale distributed computing platformSPARK Based on the engine a typical use case on homeenvironment monitoring is given to illustrate the efficiencyof our engine The results show that our system can scalefor large number of sensors streams with different types ofIOT applications For future work we are planning to deployspatial semantic support in our distributed semantic engineto process all kinds of location-based IOT applications suchas taxi service and parking service

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 10: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

10 International Journal of Distributed Sensor Networks

Appendices

We provide the SPARQL queries used in the experimentalsection of streaming semantic query

A IOT Streaming Semantic Query Examples

PREFIX p lthttphemorgpredicategt

Q1 SELECTtypevalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor pvalueTypetype

Q2 SELECTvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquoPM25rsquo

Q3 SELECTroomvalue FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquoCOrsquo

Q4 SELECTsensorvalue FROM STREAM

lthttphemorgstreamshomegtWHERE

sensor phasValuevaluesensor pvalueType rsquoSO2rsquo

Q5 SELECTroomtime FROM STREAM

lthttphemorgstreamshomegtWHERE room

phasSensorsensorsensor phasValuevaluesensor

pvalueType rsquohumidity rsquosensor psamplingTime

time

Q6 SELECTvaluetime FROM STREAM

lthttphemorgstreamshomegtWHERE

lthttphemorgroombedroom1gt phasSensor

sensorsensor phasValuevaluesensor pvalueType

rsquotemprsquosensor psamplingTimetime

B IOT Streaming Semantic ReasoningExample

See Table 4

Table 4 Human comfort table

HC index range Level HC description86sim88 +4 Very hot80sim85 +3 Hot76sim79 +2 Warm71sim75 +1 Slightly warm59sim70 0 Comfortable51sim58 minus1 Slightly cool39sim50 minus2 Cool26sim38 minus3 Coldle25 minus4 Very cold

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

Thiswork is funded byNSFC61473260 andNational Key SampTSpecial Projects 2015ZX03003012-004 and YB2013120143 ofHuawei

References

[1] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Volume 1 CISCOWhite PaperCISCO 2011

[2] V Cackovic and Z Popovic ldquoAbstraction and semantics sup-port in m2m communicationsrdquo in Proceedings of the 36thInternational Convention on Information and CommunicationTechnology Electronics and Microelectronics (MIPRO rsquo13) pp404ndash408 Opatija Croatia May 2013

[3] C Bizer T Heath and T Berners-Lee ldquoLinked datamdashthe storyso farrdquo International Journal on Semantic Web and InformationSystems vol 5 no 3 pp 1ndash22 2009

[4] C Bizer J Lehmann G Kobilarov et al ldquoDBpediamdasha crys-tallization point for the web of datardquo Web Semantics ScienceServices and Agents on the World Wide Web vol 7 no 3 pp154ndash165 2009

[5] S Auer J Lehmann and S Hellmann ldquoLinkedgeodata addinga spatial dimension to the web of datardquo inThe Semantic WebmdashISWC 2009 vol 5823 of Lecture Notes in Computer Science pp731ndash746 Springer Berlin Germany 2009

[6] M Compton P Barnaghi L Bermudez et al ldquoThe SSN ontol-ogy of theW3C semantic sensor network incubator grouprdquoWebSemantics Science Services and Agents on the World Wide Webvol 17 pp 25ndash32 2012

[7] M Zaharia M Chowdhury T Das et al ldquoResilient distributeddatasets a fault-tolerant abstraction for in-memory clustercomputingrdquo in Proceedings of the 9th USENIX Conference onNetworked Systems Design and Implementation (NSDI rsquo12) p 2USENIX Association San Jose Calif USA April 2012

[8] A Sheth C Henson and S S Sahoo ldquoSemantic sensor webrdquoIEEE Internet Computing vol 12 no 4 pp 78ndash83 2008

[9] M Eid R Liscano and A El Saddik ldquoA universal ontology forsensor networks datardquo in Proceedings of the IEEE International

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 11: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of Distributed Sensor Networks 11

Conference on Computational Intelligence for Measurement Sys-tems and Applications (CIMSA rsquo07) pp 59ndash62 IEEE OstuniItaly June 2007

[10] M Botts and A Robin ldquoOpengis sensor model language (sen-sorml) implementation specificationrdquo OpenGIS Implementa-tion Specification (OGC) 2007 pp 7

[11] A Gyrard C Bonnet and K Boudaoud ldquoEnrich machine-to-machine data with semantic web technologies for cross-domain applicationsrdquo in Proceedings of the IEEE World Forumon Internet of Things (WF-IoT rsquo14) pp 559ndash564 Seoul SouthKorea March 2014

[12] S Hu H Wang C She and J Wang ldquoAgOnt ontology foragriculture internet of thingsrdquo IFIPAdvances in Information andCommunication Technology vol 344 no 1 pp 131ndash137 2011

[13] D Ejigu M Scuturici and L Brunie ldquoAn ontology-basedapproach to context modeling and reasoning in pervasivecomputingrdquo in Proceedings of the 5th Annual IEEE InternationalConference on Pervasive Computing andCommunicationsWork-shops (PerCom Workshops rsquo07) pp 14ndash19 IEEE White PlainsNY USA March 2007

[14] Z Li C-H Chu W Yao and R A Behr ldquoOntology-drivenevent detection and indexing in smart spacesrdquo in Proceedings ofthe 4th IEEE International Conference on Semantic Computing(ICSC rsquo10) pp 285ndash292 IEEE Pittsburgh Pa USA September2010

[15] X H Wang D Q Zhang T Gu and H K Pung ldquoOntologybased context modeling and reasoning using owlrdquo in Proceed-ings of the 2nd IEEE Annual Conference on Pervasive Computingand CommunicationsWorkshops (PerCom rsquo04) pp 18ndash22 IEEEOrlando Fla USA March 2004

[16] T Strang C Linnhoff-Popien and K Frank ldquoCoOL a contextontology language to enable contextual interoperabilityrdquo inDistributed Applications and Interoperable Systems vol 2893of Lecture Notes in Computer Science pp 236ndash247 SpringerBerlin Germany 2003

[17] H Chen T Finin and A Joshi ldquoUsing owl in a pervasivecomputing brokerrdquo DTIC Document 2005

[18] A Bolles M Grawunder and J Jacobi ldquoStreaming SPARQLmdashextending SPARQL to process data streamsrdquo in The SemanticWeb Research and Applications vol 5021 of Lecture Notes inComputer Science pp 448ndash462 Springer Berlin Germany2008

[19] D F Barbieri D Braga S Ceri E Della Valle and MGrossniklaus ldquoC-sparql sparql for continuous queryingrdquo inProceedings of the 18th International Conference on World WideWeb (WWW rsquo09) pp 1061ndash1062 ACM Madrid Spain April2009

[20] D Le-Phuoc H N M Quoc C Le Van and M HauswirthldquoElastic and scalable processing of linked stream data in thecloudrdquo in The Semantic WebmdashISWC 2013 vol 8218 of LectureNotes in Computer Science pp 280ndash297 Springer BerlinGermany 2013

[21] Chinese air quality indexspecifications [PhD dissertation] 2012

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 12: Research Article Large-Scale Real-Time Semantic Processing ...downloads.hindawi.com/journals/ijdsn/2015/365372.pdf · Framework for Internet of Things ... Nowadays, the advanced sensor

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of