Cooperative Semantic Sensor Networks for pervasive computing contexts Michele Ruta, Floriano Scioscia, Agnese Pinto, Filippo Gramegna, Saverio Ieva, Giuseppe Loseto, Eugenio Di Sciascio Politecnico di Bari - via E. Orabona 4, Bari (I-70125), Italy {name.surname}@poliba.it Abstract—The Semantic Web of Things (SWoT) merges the Internet of Things with knowledge representation and reasoning techniques borrowed from the Semantic Web, in order to improve resource management and discovery. This paper proposes a SWoT framework in Wireless Sensor Networks (WSNs) enabling cooperative discovery of sensors and actuators. A backward- compatible extension of the Constrained Application Protocol (CoAP) makes possible to use semantic matchmaking via non- standard reasoning to better characterize the resource discovery. The framework also integrates nimble data stream mining to detect and annotate high-level events through raw data gathered from the environment. A cooperative environmental monitoring case study in Hybrid Sensor and Vehicular Networks (HSVN) is presented together with experiments on a real testbed to assess feasibility and benefits of proposal. Index TermsCoAP, Cooperative sensing, Semantic Web, In- ternet of Things, Resource discovery, Matchmaking, Data mining I. I NTRODUCTION The convergence of the Semantic Web and the Internet of Things (IoT) visions is known as the Semantic Web of Things (SWoT) [1]: semantically rich and machine-understandable information are envisioned to be embedded into real-world things, places and events, by means of inexpensive, unobtru- sive, disposable micro-devices. This enables novel classes of advanced and interoperable services and applications. In order to implement SWoT frameworks, pervasive computing issues must be faced, including: volatility of resources and devices; hardware and software heterogeneity; adaptivity to context; computational resource limitations. In such a situation, re- source discovery is a crucial feature. The Constrained Application Protocol (CoAP) [2] is one of the most adopted application-layer protocols for interoperable object and sensor networks, but it currently supports only basic data-oriented representation and retrieval of resources, relying on string matching of attributes, with trivial “yes/no” results. Exact matches are quite unlikely in WSN scenarios, populated with heterogeneous sensors and devices from several indepen- dent vendors and administrators. This paper proposes a comprehensive SWoT framework inducing decentralized, advanced discovery capabilities in Wireless Sensor Networks. It exploits semantic metadata to annotate data streams and sources, devices, events of interest and services, with a well-defined high-level meaning w.r.t. shared domain vocabularies (ontologies). The proposal in- cludes: (i) backward-compatible slight extensions to CoAP and its resource discovery protocol, the Constrained RESTful En- vironments (CoRE) Link Format 1 ; (ii) a semantic-based micro- matchmaking framework grounded on non-standard reasoning [3] featuring resource retrieval and ranking and supporting approximate matches; (iii) event detection and annotation by means of agile data mining algorithms on raw data gathered by a Semantic Sensor Network (SSN, i.e., a semantic-enhanced WSN), using the SSN-XG ontology [4] as terminology. The proposed approach is clarified and further validated by means of a case study on cooperative environmental risk monitoring and management in Hybrid Sensor and Vehicular Networks (HSVNs). In order to execute experiments, the framework was implemented in a prototypical testbed with real devices. The remainder of the paper is as follows. Related work is discussed in Section II, while Section III describes the proposed framework in detail. Section IV presents a possible case study, whose numerical experiments are reported in Section V, before conclusion. II. RELATED WORK CoAP [2] is an HTTP-like protocol for interconnected objects, designed for machine-to-machine interoperation in resource-constrained nodes. Following the REST (REpresen- tational State Transfer) architectural style, CoAP adopts a loosely coupled client/server model, based on stateless oper- ations on resource representations. Clients access resources via synchronous request/response interactions, using HTTP- derived methods (GET, PUT, POST, DELETE). CoAP is acquiring relevance for its lightweight impact on storage and computation, resulting useful for a variety of application domains [5], [6], [7], and particularly Sensor Networks. In latest years, interesting Semantic Sensor Networks (SSN) approaches were developed to integrate WSNs and smart objects with Semantic Web technologies. Every information resource in the Semantic Web is annotated with metadata in RDF 2 expressed w.r.t. an RDF Schema 3 or OWL 4 ontology. 1 CoRE Link Format, IETF CoRE Working Group RFC 6690, August 2012, http://tools.ietf.org/html/rfc6690 2 Resource Description Framework 1.1 Concepts and Abstract Syntax, W3C Recommendation, 25 February 2014. https://www.w3.org/TR/rdf11-concepts/ 3 RDF Schema 1.1, W3C Recommendation, 25 February 2014 https://www.w3.org/TR/rdf-schema/ 4 OWL 2 Web Ontology Language Document Overview (Second Edition), W3C Recommendation, 11 December 2012, http://www.w3.org/TR/owl2- overview/