Public safety in smart cities under the edge computing concept

—The transformation of cities into smart cities is a crucial issue in improving the living conditions of the inhabitants. One of the major goals of the smart city concept is to modernize the urban management utilizing technical tools that offer state-of-the-art technologies. Recent years have disclosed a remarkable proliferation of compute-intensive safety and security applications in smart cities. Such applications continuously generate enormous amounts of data which demand strict latency-aware computational processing capabilities. To address the limitations of cloud computing for enabling real-time smart city environments, edge computing is a viable solution. Initially, this paper, discusses the trends, the requirements and the technologies for public safety in smart cities under an edge computing concept. Then, proposes the concept and the development of an edge computing platform, namely Distributed Edge Computing IoT Platform (DECIoT), integrating to a smart building sensing system with an NG112 call functionality and a chemical precursor spectroscopic system


I. INTRODUCTION
Nowadays, the transformations of cities into smart cities is a crucial factor in improving the living conditions of the inhabitants. One of the major goals of the smart city concept is to modernize the urban management utilizing technical tools that offer state-of-the-art technologies. Also another goal of the smart city concept is to apply ecological standards while saving resources and achieving the expected results also in special information management [1][2]. In the bibliography there are several definitions of smart cities. According to [3], a city becomes smart, "when investments in human and social capital and traditional and modern Information and Communication Technology (ICT) fuel sustainable economic growth and a high quality of life, with a wise management of natural resources, through participatory governance". In [4] the authors consider a smart city as "a place where traditional networks and services are made more flexible, efficient, and sustainable with the use of information, digital and telecommunication technologies, to improve its operations for the benefit of its inhabitants. Smart cities are greener, safer, faster and friendlier." In [5] the authors set a base ground for their further research. According to their study, "the smart city by the integration of technology and natural environment increases the effectiveness of processes in every field of its functioning, in order to achieve sustainable development, safety and health of inhabitants with the aim for increasing the quality of life of citizens, near community and environment". Summarizing somewhat the above, a smart city is a city that uses digital technology to connect, protect, and enhance the lives of citizens. Fig. 1. Smart city elements as defined in [1,[6][7] Cities can be defined as smart if they have the following elements ( Fig. 1) [1,[6][7]: i) the smart economy (measured by entrepreneurship and a city's productivity, adaptation to changes, international cooperation etc), ii) the smart mobility (perceived by the accessibility of information and communication infrastructure, through the development of sustainable and safe transport), iii) the smart environment (measured by the pollution levels, environmental protection activities and resource management methods), iv) smart people (characterised by the level of lifelong learning, social and ethnic diversity, creativity, openness and participation in public life), v) smart living (measured by cultural facilities, living conditions such health, safety and housing, educational facilities, tourist attractiveness and social cohesion, and v) smart governance (expressed by the transparency of city management, social participation, the the implementation of development strategies and level of public services and the implementation of development strategies.

II. IOT AND EDGE-COMPUTING IN SMART CITIES
Recent years have disclosed a remarkable proliferation of compute-intensive safety and security applications in smart cities [8][9][10][11][12]. Such applications continuously generate enormous amounts of data which demand strict latency-aware computational processing capabilities [13]. The use of expensive dedicated computing hardware with sufficient storage capacity is able cope with the challenges of massive scale computing and storage. To eliminate the need for dedicated expensive computing hardware, cloud computing was introduced. Cloud computing is considered a powerful technology that is intended to enhance the Quality of Experience (QoE) as provides, in a cost-effective and elastic manner, on-demand storage and processing capabilities. The main advantages of the cloud computing are: i) scalability, ii) elasticity, iii) multitenancy, iv) sufficient storage capacity, and v) resource pooling. Such advantages have made its adoption possible in several applications [14][15]. However, the main cloud computing inherent limitations are: i) high latency, ii) non-context-aware behavior, iii) no support for mobility pose serious limitations on its use in real-time smart environments, and iv) suffering from processing time inefficiency due to the large overhead of smart city device data.
To address the limitations of cloud computing for enabling real-time smart city environments, edge computing is a viable solution [16][17][18]. Edge computing is a cutting-edge computing paradigm characterized primarily by: i) context-awareness ii) its geo-distributed operation, iii), mobility support, iv) low latency, and v) migrating computing resources (such as computing power, data, and applications), from the remote cloud to the network edge, and thus enables numerous realtime smart city services. According to [19], three different emerging technologies (cloudlet, fog computing, and mobile edge computing), have been used in the literature to bring the striking features of cloud computing to the edge. Concerning the security, edge computing infrastructure is able to exhibit novel security risks and challenges due to its distributed nature in contrast to a centralized cloud [20]. The main edge computing security risks can be categorized as follow: i) denial of service attacks, ii) man in the middle situations, iii) physical damage, and iv) privacy leakage. To enable security to the involved components (virtualization platforms, distributed and peer-to-peer systems, wireless networking technologies, etc), diverse security mechanisms must be implemented. In [13] the authors provide the core requirements to turn the vision of edge computing enabled smart cities into reality: • Scalability & Reliability: considers resilient to hardware failures, resilient to software flaws, scalable hardware and software.
• Sustainability: considers hybrid energy sources, energy harvesting, renewable Energy Sources, and energy efficient design.
• Resources Management: considers user-defined utility based resource management, and adaptive resource management.
• Business Model: considers pricing model, services and products, customers, and distribution.
• Context-awareness: considers network load and capacity, and smart devices location.
• Elasticity: considers prediction of user demands, and elastic services.
• Security: considers decentralized security, and cyber security.

• Interoperability: considers interoperable interfaces, and open source Frameworks
New Internet of Things (IoT) applications including Augmented Reality (AR), Virual Reality (VR), Digital Twins (DT), virtual simulations, real-time searching engines and discovery services bring new challenges [21]. Digital twins (DTs) are virtual representations of physical assets and things across their life cycle using real-time sensor data. The DTs can be utilised to expose a set of services allowing to execute certain operations and produce data describing the physical thing activity. Figure 2 depicts a high-level overview of IoT based smart city environments enabled by edge computing as defined by [13]. These IoT based smart environments leverage connected smart sensors and IoT devices to improved life standards as well as security and safety for citizens. IoT can be defined in several ways since it is associated with a variety of technologies and concepts in literature. In [19], the authors refer the common and frequently occurring features among different IoT definitions: i) existence of a global network infrastructure enabling a unique addressing scheme, connectivity among heterogeneous IoT nodes and seamless integration, ii) IoT nodes must be locatable, addressable, readable, autonomous and recognizable, iii) existence of heterogeneous technologies, iv) association of services, and v) intelligent interfaces between things and humans. The next step is enabling the resource intensive and strict latency IoT based smart city applications. Edge computing provides a promising way of enabling these applications by offering computation and storage resources with low latency.  [13] The next wave of IoT and Industrial Internet of Things (IIoT) brings new technological developments that incorporate radical advances in Artificial Intelligence (AI), edge computing processing, new sensing capabilities, more security protection and autonomous functions accelerating progress towards the ability for IoT systems to self-develop, self-maintain and selfoptimise [21]. On the other hand, Artificial Intelligence of Things (AIoT) is seamlessly controlling and optimising the systems and their environment, analysing data from devices to applications. AIoT is able to be integrated into IoT/IIoT digital platforms that support artificial/augmented intelligence, and control and optimise the automation processes and thus support the next wave of innovation. Such activity includes the adoption of federated learning concepts for the creation of lowlatency intelligent IoT applications and new AI business models, by extracting common knowledge from participating IoT devices, while enabling reduced bandwidth use, localised personalisation of models, and granular data security and compliant privacy policy. In similar concept, several machine learning edge computing studies have been implemented [22][23]. According to Strategic Research and Innovation Agenda (SRIA) document [24], there are a plenty of research and innovation priorities for IoT in several applications such: i) healthcare, ii) wearables, iii) farming, iv) cities and communities, v) smart mobility and autonomous vehicles, vi) water management, vii) energy, viii) buildings, and ix) industry and manufacturing.

III. OUR APPROACH
In the concept of the EU funded project "Smart Spaces Safety and Security for All Cities (S4AllCities)" (https://www.s4allcities.eu/), the goal that is are pursued is to make cities' infrastructures, services, ICT systems and IoT safe and resilient while promoting intelligence and information sharing amongst security stakeholders. Thus, advanced technological and organisational solutions into a marketoriented, unified cyber-physical security management framework will be integrated. The system is focused on riskbased open smart spaces security management, cybersecurity shielding, suspicious activity, behaviour tracking, the identification of unattended objects, the real-time estimation of cyber-physical risks in multiple locations and measures activation for effective crisis management. This work will play a role in promoting good safety and security practices in cities.
Our contribution in this project is focused on the design and development of an edge computing platform called Distributed Edge Computing IoT Platform (DECIoT). The DECIoT platform is addressing among others the problem of gathering, filtering and aggregating data, interacts with the IoT devices, provides security and system management, provides alerts and notifications, executes commands, stores data temporarily for local persistence, transforms/process data and in the end exports the data in formats and structures that meet the needs of other platforms. This whole process is being done by using open source microservices that are state of the art in the area of distributed edge IoT solutions. The DECIoT will be intergrated with several types of sensors and devices. In this study, the concept of two systems that will be intergrated with the DECIoT is presented, namely Smart Building Sensors System -Next Generation 112 (SB112) and Fourier Transform -Near Infrared (FT-NIR) spectroscopic system.

A. DECIoT
The DECIoT (Fig. 3) is built upon a collection of opensource micro-services that span from the edge of the physical realm on the Device Services Layer, with the Core Services Layer and the Support Layer at the center, and the Application Layer on the top. The DECIoT is based on the EdgeX foundry open source frameworks (https://www.edgexfoundry.org/) which is considered as a highly flexible and scalable framework that facilitates interoperability between devices and applications at the IoT Edge [25]. The EdgeX Foundry framework was developed to standardize and simplify edge computing for the IIoT. It provides an operable open-source platform, in which all microservices can run on various operating systems in the form of containers, and support dynamic addition or reduction of functions, with strong scalability. At present, the application fields of EdgeX Foundry have involved several industries such as retail, manufacturing [26], energy [27], urban parks, transportation [28] and other industries. Below, we quote in more detail each of the layers of the DECIoT: • Physical devices: all devices and systems that produce data, connect to DECIoT and send data.
• Device Service Layer: the connection layer of DECIoT, capable of actuating devices and collecting data from devices.
• Core Services Layer: the core layer of DECIoT used for storing data, commanding and registering devices.
• Support Services Layer: includes microservices for local/edge analytics and typical application duties such as logging, scheduling and data filtering.
• Application Services Layer: Application Services are the means to extract, transform and send data from the DECIoT to other endpoints (e.g. central middleware/broker) or Applications.
• Message bus: all microservices communicate with each other by using the same message bus.
The DECIoT interfaces are provide below. It should be noted that additional protocols maybe be supported: • Device Layer Interface: The interface (type: MQTT, REST, Virtual) will be used by devices to send data to DECIoT and receive commands.
• Application Layer Interface: The interface (type Kafka) that is used to send data to core system.
• Commands Interface: An interface (type REST API) capable of actuating the device and getting real time data on demand.

B. SB112
The Smart Building Sensors System -Next Generation 112 (SB112) (Fig. 4) is a system that can be deployed in critical buildings, infrastructures, etc. It integrates a smart building sensing platform that is capable of using a variety of sensing devices to take measurements related to indoor air quality, and enables the automatic initiation of NG112 call regarding the existence of dangerous situations (fire detection, gas leakage, etc. in the form of an alert). Several state of the art frameworks can be found in literature that enable automatic initiation of NG112 call [29][30]. Such frameworks can fully contribute to critical infrastructure monitoring and buildings in complex urban scenes [31][32]. In detail, the SB112 components are a sensor node and a gateway. The sensor node is built upon a microcontroller and is equipped with sensors, that will be able to monitor indoor environments and has connectivity with the gateway device which serves as DECIoT platform. The data from the sensors are being aggregated by the DECIoT gateway and through it, they are forwarded as is to the core system platform. Moreover, it is possible to setup multiple gateways and each gateway can be connected to multiple sensor nodes, leading to a highly scalable platform. Extending this system developed in the next generation emergency services (NEXES) project (https://cordis.europa.eu/project/id/653337), the DECIoT platform is fully contributes an added value as it is used to filter and process the data in order to detect abnormal values in the sensor measurements, which lead to the detection of an emergency situation.
After an emergency situation is detected, there are a number of actions that are made. Firstly, a CAP (Common Alerting Protocol) message is generated containing relevant information and sensor measurements to indicate and clarify the type of emergency. Afterwards, a connection with the PSAP (Public Safety Answering Point) is established using SIP (Signal Initiation Protocol) and the CAP message is sent to the PSAP. Additionally, bidirectional communication is also possible, meaning the PSAP can send requests to the DECIoT platform (e.g. the PSAP can send a request for more sensor data). This also enables the capability of actuating the sensor devices, allowing reconfiguration on the fly. The information included at the middleware can be consumed from a smart cities control center or any internal or external control platform that monitors the smart buildings.

C. FT-NIR
The Fourier Transform -Near Infrared (FT-NIR) spectroscopic system is a low-cost, non-destructive and portable sensor for the chemical precursor detection of explosives. It is able to provide a real-time monitoring of chemical precursors in powder form in the spectral range of 1100-2500 nm, without any need of sample preparation while the analysis can be done while keeping the sample intact. The operation of the FT-NIR sensor is controlled by a microcontroller which is responsible also for the processing of the raw data, the production and the analysis of the measurement spectra [33][34]. It also compares the spectra with a data reference library, identifying the chemical precursors of explosives. The sensor has also an external optical scan head for sample illumination and collection of the diffused light adding the characteristic of remote detection and identification. The optical scan-head is an add-on unit, consisting of sets of lenses responsible for collimating the measurement beam from the light source towards the sample and for collecting the diffused light from the sample to the FT-NIR engine. This unit extends the capabilities of the FT-NIR sensor to realizing measurements from a close distance from the sample. The microcontroller has an integrated communication module which is responsible for sharing the measurement spectra and the results to the edge tier of DECIoT for further processing and temporary storage. It should be noted that safety regulations and suitable laboratory environments for implementation and testing of the FT-NIR system have been addressed. The new trends and state of the art technologies for public safety in smart cities indicates the edge computing paradigm as a viable solution to address and manage the enormous amounts of data which demand strict latency-aware computational processing capabilities. Following such trends, this paper proposes the concept and the development of an edge computing platform, namely Distributed Edge Computing IoT Platform (DECIoT). The DECIoT is based on the EdgeX foundry open source framework which is considered as a highly flexible and scalable framework that facilitates interoperability between devices and applications at the IoT Edge. The DECIoT is able to be efficiently integrated with several systems. Here, in this paper, two workflow architectures for two corresponding systems are discussed that can be intergraded with the DECIoT. Such systems are associated with an smart building sensing system with NG112 call functionality as well as chemical precursor spectroscopic system.

ACKNOWLEDGMENT
This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 883522.