Keywords

1 Introduction

The percentage of the total population living in urban regions is increasing rapidly, and is estimated to reach 66% in 2050, according to a demographic estimate by the United Nations [19]. This growing mass movement of people to urban areas engenders various challenges for the cities of the future with regard to human health, air pollution, traffic congestion, waste management, etc. [2]. Intelligent information and communication technology (ICT) can tackle these challenges by making use of data from myriads of (end-user) devices connected to the Internet of Things (IoT), as well as existing data sources, with the goal to combine and analyze this data and use the results as a basis for future guidelines and decisions.

By integrating all the aforementioned technologies, the notion of “Smart City” aims at optimizing “the efficiency of city operations and services and connect to citizens” [8]. Nonetheless, while the Smart City innovation brings value to the citizens by fostering sustainability and safeguarding environmental concerns, it creates various research challenges such as interoperability and cross-platform implementation. To enforce interoperability across heterogeneous systems and cross-platform implementations, IoT standards and semantic technologies have been proposed as a solution to simplify interoperability.

In this paper, a Smart City application is introduced, implemented in a way that conforms with the recent trends in IoT interoperability and Smart Cities applications. In parallel, through this application applications, an attempt is made to shed more light on the importance of semantic technologies as well as open IoT APIs for realizing a sustainable Systems-of-Systems ecosystem. The rest of this paper is structured as follows: Sect. 2 introduces the key enabling technologies for Smart Cities and discusses the role that semantic technologies and IoT standards will have to play in future IoT. Section 3 outlines a specific class of applications that we consider prototypical to illustrate the challenges. Section 4 presents the approach and Sect. 5 provides the implementation details. Finally, Sect. 6 closes the paper sketching future work.

2 Related Work

Santana et al. [18] have identified four main enabling technologies that are pervasive across all the state-of-the-art Smart Cities platforms. Specifically, they have identified: (a) Internet of Things [4, 12], as a network of physical devices and smart objects that will serve as data sources for the various Smart Cities applications; (b) Big Data [10] to facilitate the storage and processing of the vast amount of data received by the cities; (c) Cloud Computing [3], offering elastic computing capabilities for the plethora of services and data; (d) Cyber-Physical Systems [13, 21], that enable the interaction between the various systems and the city environment. Nonetheless, for sustaining an open innovation ecosystem for Smart Cities which would build upon the System-of-Systems paradigm, several authors [4, 5, 9, 12] have argued that semantic technologies and open IoT standards constitute one of the catalytic factors that will permit the success and further development of Smart Cities’ applications and services. Semantic technologies as well as open IoT communication protocols and data formats ensure an interoperable communication across heterogeneous systems of systems, and constitute a key facilitator for IoT [9, 12].

3 Scenario Overview

The application under consideration is to provide a system that recommends citizens a number of places (“points of interest” (POI)) that have better environmental conditions compared to the places where they are currently located. Such a point of interest may, for instance, have higher temperature and lower humidity on a cold winter day and therefore constitutes a better environment for the citizen. The scenario’s business value lies in its potential for generalization. Points of interest may also be inferred by taking traffic data into account to identify congested areas. Furthermore, the notion can be extended to areas of interest, warning citizens for instance, of particularly polluted regions or acute security threats. The approach and implementation method we present in this work can also be applied to support these applications.

Fig. 1.
figure 1

Overview of the Smart City application.

From a technological perspective, this scenario illustrates how the different enabling technologies that were identified in Sect. 2 can be used to provide solutions to the various Smart Cities challenges. Figure 1 illustrates an overview of the proposed solution. We describe the processing steps by introducing the following scenario:

An end user is interested in finding POIs with better environmental conditions. For that reason, she/he subscribes to implemented Smart City application and accepts to send her/his geo-coordinates (step 1 on Fig. 1). In the next step, the application receives the user data, and in parallel requests for local environmental data (temperature and humidity) and POIs near the region where the user is currently on (steps 2 and 3 on Fig. 1). Based on the retrieved data, the application infers the local environmental conditions for the POIs and the user locations (step 4 on Fig. 1), and sends back the result to the user (step 5 on Fig. 1).

This simplistic scenario can be further be extended to include different kinds of data sources such as traffic data, pollution data, etc. Despite its simplicity, however, it can illustrate various key aspects that Smart Cities applications face. This application scenario includes a variety of different communication transactions across different and heterogeneous data provides (that may include cyber-physical systems) and data consumers. At the same time, the amount of data that the Smart City application receives can quite easily grow significantly enough so that the use of Big Data technologies will be a non-negotiable decision. Similarly, the end users, the environmental data as well as the POI data all provide geo-coordinates information. This raises the importance of sharing a common semantic description of this information so as to facilitate the information integration.

4 Approach

Visual programming languages and frameworks are increasingly used in the IoT era [6]. One typical example is Node-REDFootnote 1; an open source visual programming tool, implemented by the IBM Emerging Technology organization. Node-RED, is based on Node.js and constitutes a mature visual programming framework that has gained large attention by the IoT community. It ships with a large set of nodes (“building blocks”) and allows the programing to be performed in a “drag and drop” way. Deployment of programs implemented this way (“flows”) in the runtime can be performed with just a single press of a button. In our prototype implementation, Node-RED constitutes a key component of our proposed solution, that allows a browser-based visual programming of the Smart Cities applications.

However, the fact that Node-RED is based on JavaScript, restricts the type of computations that can be performed. For instance, although there are programming libraries for performing numerical computations in JavaScript such as stdlibFootnote 2, programming languages such as R, Python, Julia [16] are more popular to perform various data-science related tasks. For that reason, the Node-RED environment was extended with a Python node that allows the execution of Python code inside the Node-RED environment. The node acts a proxy to well-known Python modules and libraries such as NumPy [20], SciPy [11], scikit-learn [15], PyTorch [14], as well as frameworks that provide a Python API such as TensorFlow [1].

To allow for the execution of SPARQL queries to be performed in a generic and graphically coherent way, inside the Node-RED environment, we created a Node-RED node and made it publicly availableFootnote 3. The implementation is based on the Python node and on the Python RDFlibFootnote 4 module. In addition, we use a MongoDBFootnote 5 database for storing the sensor data. Semantic technologies and open IoT communication and adherence to data format standards are key for an interoperable IoT. In particular, the standards O-MI (Open Messaging Interface)Footnote 6 and O-DF (Open Data Format)Footnote 7, provided by the Open Group, were used as they provide a means for standardized communication and data formatting and offer support for semantic annotations. A recent overview of these standards is provided by Robert et al. [17].

5 Implementation and Discussion

We implement the scenario described in Sect. 3 for a specific use case in Lyon, focusing on temperature and humidity as the main characteristics of an individual citizen’s environmental situation. To acquire temperature and humidity data for the city of Lyon, the public API of NetatmoFootnote 8 is used. Figure 2 illustrates the workflow as implemented in Node-RED. The nodes “Get Netatmo Token” and “Lyon Netatmo” extract temperature and humidity sensor data. To retrieve various points of interest, we make use of the Sophox serviceFootnote 9, which allows the simultaneous execution of queries both to OpenStreetMap and Wikidata. The query is illustrated in Listing 1.

A description of the terms used in OpenStreetMap can be found in [7]. The process is illustrated in the node “OpenStreetMap Query”. Finally, all these sensor data are stored in a MongoDB database. To get the citizen’s position we use an O-MI call and parse the received response. The process is illustrated in the node “Read O-MI Node” and “Parse O-DF Message”. In the next step, the geo-coordinates are extracted (“Extract Geo-coordinates” on Fig. 2) and the closest POIs that have better environmental position than the place that the user currently is are computed (“Find closest POIs”). The aforementioned action is achieved by running a geospatial query on the MongoDB database. Finally, the result is visualized on Node-RED and can be seen on Fig. 3. In Sect. 3, it was briefly discussed how this Smart City application shows the importance of the various Smart Cities enabling technologies that were introduced in Sect. 2. Since the focus of this paper is on the IoT interoperability, we will focus in the rest of this section on the importance of using standardized Open APIs and Semantic technologies for the Smart City Applications. Figure 2 already illustrated different communication transactions and data formats between the different information providers to the Smart City application. To access the temperature and humidity data, the Netatmo’s RESTful API was used which provided the sensor data as JSON payloads. In the case that the coverage of these data were inadequate for the user’s location under consideration, more sensor solution providers should be considered by the application. The communication layer as well as the data formats of these systems would be different from the ones used by the Netatmo company. What is more, the terms as well as the semantics of these different data formats may differ too. For that reason, we have chosen to use the Open Messaging Interface as well as the Open Data Format, provided by the Open Group. These allow the application to access the user’s data in a common and standardized way. At the same time, it makes the visual programming easier as the communication across different systems can be achieved with only two nodes. On the contrary, each time a new sensor provider should be taken into account special consideration should be given so as to establish the communication.

figure a

Moreover, as it was already mentioned in Sect. 3, a common semantic layer between the different data payloads is extremely important so as to establish a common understanding. For instance, using different terminology and formatting while representing latitude, longitude and altitude information requires an additional programming effort so as to transform them in a common representation. In parallel, semantically annotated data allow for advanced inferencing and for complex queries across different data sources, as it was illustrated in Listing 1. It is important to also note that the key enabler that allowed the information fusion between the knowledge graphs of OpenStreetMap and Wikidata was the common way of representing the geo-coordinates information.

Fig. 2.
figure 2

Node-RED flow of the proposed solution.

Fig. 3.
figure 3

Visualization of POIs with better environmental conditions.

6 Conclusion and Outlook

Semantic and IoT technologies are among the key enabling technologies to tackle the challenges of future citizens, caused by increasing population in urban areas. In this paper, we presented an approach and documented the implementation of a Smart City application, using a visual programming framework and leveraging heterogeneous data sources that conform to open IoT and semantic Web standards. The application allows evaluating the benefits of these technologies in an IoT context. In our future work we will further validate the approach by covering more advanced applications and data sources, including extensive experimentation and evaluation.