Live data analytics with IoT intelligence-sensing system in public transportation for COVID-19 pandemic

The COVID-19 pandemic has presented an unprecedented challenge to the entire world It is a humanitarian crisis on a global scale The virus continues to spread throughout nations, putting health systems under enormous pressure in the battle to save lives With this growing crisis, companies and researchers worldwide are searching for ways to overcome the challenges associated with this virus Also, the transport sector will play a critical role in revitalizing economies while simultaneously containing the spread of COVID-19 As the virus is still cir-culating, the only solution is to redesign public transportation to make people feel safe In this paper, we have proposed a system based on computer vision and IoT sensor infrared technology with live data analytics The proposed system is capable of gathering, storing, analyzing, processing, and handling the vast amount of data produced by the IoT sensors, and provides the users with real-time information on potential events affecting public transport, thereby enabling users to make well-informed and timely decisions The evaluation showed that, despite the complexity of the system, it performs well © 2021, Tech Science Press All rights reserved


Introduction
Since the first report of coronavirus disease 2019  at Wuhan, China in December 2019, according to the Center for Systems Science and Engineering of Johns Hopkins University, it has now affected at least 41 million people worldwide and been responsible for more than one million deaths [1]. The COVID-19 pandemic has presented an unprecedented challenge to the entire world. It is a humanitarian crisis on a global scale. The virus continues to spread throughout nations worldwide, putting health systems under enormous pressure in the battle to save lives.
With this growing epidemic, researchers around the world are searching for ways to cope with the complexities of this virus, to mitigate its spread, and to create a vaccine for this disease. Science and technology have an important part to play in this crisis. For example, various countries have concentrated on artificial intelligence (AI) technology early in the epidemic of the virus by focusing on facial recognition cameras to detect infected humans, robots and drones to deliver food and medicines to patients and disinfect public places, to patrol streets, and broadcast voice messages to the public urging them to stay at home.
The transport sector will play a critical role in moving economies again while containing the spread of COVID-19. Many people need to leave their homes and use public transport to generate income. The provision of products and services still depends on workers reaching their workplaces, and many of those who must continue to move depend on public transportation systems, which are uniquely positioned to carry large numbers of passengers across crowded urban areas. Even during an outbreak, public transportation remains a critical service to the communities as the backbone of sustainable mobility and essential for economic recovery. However, public transport systems can be considered a risk environment [2], because: 1. There are a great number of people in a confined space with limited ventilation. 2. There is no system for identifying potentially sick persons.
As the virus is still circulating, the only solution is to redesign public transportation so that people feel safe.
It is time consuming to apply to commuters the popular method of temperature checking due to the crowding of people, and not all public transport points and stops can be covered. We have proposed a system based on computer vision and IoT sensor infrared technology with live data analytics. This system makes it possible to track passengers in a contactless, reliable, and efficient manner and, unlike traditional systems, people will be unaware of it. With this technology in place, people with an elevated body temperature or abnormal breathing rate can be located quickly and accurately.
The envisioned goal of this research is to create live-data analytics with an IoT intelligence-sensing system. The proposed system is capable of gathering, storing, analyzing, processing, and handling the vast amount of data produced by IoT sensors, and provides the users with real-time information on the potential public transport events, thereby enabling users to make well-informed and timely decisions. This research paper addresses the following questions: 1. What are the functions that need to be implemented in IoT sensing intelligence system? 2. What are the challenges facing the processing and management of the vast amount of intelligent data being generated?
The rest of the paper is structured as follows: The background and current literature related to this field of study are presented in Section 2. The architecture of the proposed structure consisting of three functional layers is presented in Section 3. This work is motivated by describing motivation example in Section 4. In Section 5, experiments based on the distributed MongoDB database with parallel processing tasks that leverage the benefits offered by Apache Spark are discussed. Section 6 concludes the paper and suggests future research directions.

Background and Related Work
Governments worldwide have responded to the circumstances of the unprecedented COVID-19 pandemic. Many countries and regions have imposed stricter measures on public transport operators to prevent and help to curb the spread of the viruses. The body temperature of passengers is being scanned to contain the spread of COVID-19, and symptom screening has become a ubiquitous tool in the global response. The primary goal of this activity is to contain the spread of COVID-19 by reducing as much as possible the contact between groups of people.
Several technologies have been applied to devise direct and indirect techniques to monitor body temperature and breathing activity. For example, for body temperature, infrared thermometers (IRT) are fast, convenient, and easy to use [3,4]. Regarding respiratory rate, these techniques include direct contact such as microphone [5,6], magnetic induction [7,8] and capacitive [9,10], and indirect techniques (contactless) such as laser radar detection [11,12], electromagnetic radar detection [13,14], ultrasonic radar detection [15][16][17], thermographic imaging [18], and video camera imaging [19]. However, each of these techniques requires different type of monitoring and has benefits and drawbacks. More details about these techniques can be found in references [20,21].
The available scientific literature supports the use of a wide range of no-contact, infrared thermometer, and temperature scanning solutions to detect elevated temperatures 1 . These devices have many benefits, in that they help to determine whether a passenger has a COVID-19 infection. This study supports using the thermal image processing approach that uses a thermal camera equipped with IRT to remotely sense multiple symptoms in passengers Fig. 1.
Thermal imaging is a non-contact and non-intrusive technique that uses thermal or infrared sensors capable of displaying the temperature of humans and measuring their respiratory rate. These cameras are being leveraged in many industrial and/or research fields including medical diagnostics, meteorology, environmental studies, and architecture, where temperature is a key variable.
The IoT devices have limited processing power in computing and storage resources to perform advanced analytical tasks. Cloud computing provides a very powerful solution for IoT application, service, and resource management [22][23][24]. The integration of cloud infrastructure with IoT architecture brings significant advantages to IoT including data analytical tasks [22]. However, the transmission of data over the Internet between IoT devices and the cloud increases the delay and traffic of the network. To reduce the latency and network traffic between IoT devices and the cloud, fog architecture is used to overcome several problematic issues [23,25].
Existing traditional approaches for addressing challenges of COVID-19 in the transport sector do not achieve success and may not be sufficient to prevent and help to curb the spread of the viruses. The cloud-based live data analytics with an IoT intelligence-sensing system discussed in this paper, offer a number of advantages. However, we need more than just sensors and internet access to construct a tool that is highly effective. Indeed, this infrastructure must be backed by a system capable of capturing, storing, analyzing, processing, and handling the vast amount of data produced by IoT sensors (the big data challenge). Fig. 2 demonstrates the system configuration that allows task automation based on the data that the interconnected sensors collect. Furthermore, it provides the users with real-time information about the potential public transport events to enable the users to make well-informed and timely decisions. 1 https://www.fda.gov/medical-devices/coronavirus-covid-19-and-medical-devices/non-contact-temperatureassessment-devicesduring-covid-19-pandemic

IoT Layer
The IoT layer is the backbone of the whole system since it acquires data through different wireless networks. The IoT nodes are constituted by sensors that measure different parameters such as body temperature and respiratory rates to detect the health status of passengers on public transport.  Additionally, IoT sensors are based on a public transport tracker system that gathers information about passenger locations. Definition 1. A sensor measurement S i consists a sequence of tuples T i 4 (T 1 , …, T n ) that contain a set of attributes such as: T i = (v i , (t si ,l si ) ) where v i is a sensed value, t si is the timestamp, l si represent the location of sensor.
The parameter measurements are described below: BODY TEMPERATURE PARAMETERS MEASUREMENT: As is known, human body temperature is one of the main vital signs of illness. It is most commonly measured in the medical community at regular intervals and often at home to try to quantify an individual's degree of "sickness". In public transportation, thermal imaging cameras are equipped with sensors that are capable of obtaining accurate measurements of human body temperature.

PHYSIOLOGICAL PARAMETERS MEASUREMENT:
The other main symptoms of COVID-19 are a cough and shortness of breath. Hence, the respiratory rate and cough frequency need to be measured to analyze a passenger's health. The remote monitoring of breathing rates using infrared thermography has emerged as a promising monitoring and diagnostic technology in a wide range of medical fields. Also, cough sounds can be captured by a collection of microphones.

LOCATION PARAMETERS COLLECTION:
In this context, sensors are represented by tracker-based GSM/GPRS/GPS systems mounted in public transport vehicles that capture geo-localization and provide public transport monitoring in real time.

FOG Layer
The fog computing layer enables the interoperability of heterogeneous sources of data and offers a comprehensive solution ranging from data collection and pre-processing to the cloud. The fog layer includes a number of powerful servers that receive data from the IoT sensor layer, pre-processing and uploading it to the cloud as needed. Fog architecture is used to overcome several problematic issues: Fog computing is used to reduce traffic between IoT sensors and the cloud. Fog computing provides short communication paths, accelerating automated analysis and decisionmaking processes. Fog computing enhances data security as data is pre-processed by the local network in which sensitive data can remain internal or be encrypted or anonymized before being uploaded to the cloud.

CLOUD Layer
Due to its sophistication and scaling capabilities, the key benefits and advantages driving the widespread adoption of cloud computing are its ability to store massive amounts of data, and handle computationintensive data processing and analysis tasks. This layer is responsible for managing, storing, and analyzing efficiently all the data that are collected by the system. This layer includes the following functional modules: Cloud Sensor Data Manager, Big Data Analyzer, Graphical User Interface.
The Cloud Sensor Data Manager acts as a central repository responsible for maintaining and providing access to fog-layer information. In order to be integrated into a MongoDB distributed database, all sensor data and geo-location data obtained from public transport are sent in real time to a JSON parsing system. MongoDB is the perfect choice for data management since it uses JSON documents to store information like tables and rows in a relational database. The Big Data Analyzer is able to process and analyze the data coming from the fog layer. To do this, the analyzer implements two modules: batch processing module, and services module, as shown in Fig. 4.
The batch processing module extracts information from the cloud sensor data manager. The module implements the distributed MongoDB database with parallel processing tasks that take advantage of the benefits offered by Apache Spark. Combining the fastest analysis engine (Spark) with the fastestgrowing database (MongoDB) enables companies to conduct accurate real-time analysis easily. The service module provides a temporary repository for storing the results obtained from IoT data analysis and publishing/subscribing frameworks for applications to access this information. This module facilitates the use of big data analysis results by enabling access to the data by exposing the API (Application Programming Interface).

Definition 3. (information extraction)
: Is a subset of data tuples L that are extracted from a set of original data tuples T using extraction analysis (filtering) operation:

GRAPHICAL USER INTERFACE (GUI)
is responsible for translating the analyzed information into rich content and displaying it. In the system, two GUIs are available: The web application (Main Station) The mobile app (Public Transport app) The user turns on location permissions in the mobile app, and the mobile app collects the latitude and longitude points. The API location filter is utilized to send notifications to users within a certain radius around those points. Another micro-service investigates how public transport vehicle positions change in a given area near users waiting at bus or tram stops or train stations in order to send to their mobile apps messages warning about potential events. The development of the mobile APP is outside the scope of this paper.

Motivational Example
In order to stimulate our scientific work, in the following, we discuss a scenario where the passengers' health status is monitored in public transport to contain the spread of COVID-19 by limiting contact between groups of people as much as possible that could have been avoided by means of the IoT intelligence-sensing system. For instance, train number: 23 travels from station A to station B. The IoT nodes are constituted by sensors monitoring in real time the health status of passengers on public transport. If live data analytics with IoT intelligence-sensing system detects a passenger with temperature ≥ 38 C or other parameter measurement indicators are not normal, it sends alert messages, via a mobile app, to users close to the positions of public transport vehicles to notify them of possible events. For example, train number: 23, carriage number: 3 has possible emergency. Do not ride! The same method applies to other modes of public transport.
However, the effectiveness of this system depends on the response time. In fact, it is possible to limit contact between people only if the warning message reaches the users in a short period of time. The performance of the entire system depends on the ability to quickly process a large amount of IoT sensor data. Hence, an effective and reliable storage and processing system for big data is urgently needed. Live data analytics with IoT intelligence-sensing system can be summarized as the pseudo-code shown in Algorithm 1. An example of analyzing and extracting temperature signal of passengers is shown in Algorithm 2 and Fig. 5. Also, Tab. 1 displays the rules configured for handling an event.

Prototype Implementation
The live data analytics with IoT intelligence-sensing system is implemented in Python, and the MongoDB distributed database is applied to handle the data store. MongoDB is also integrated with Apache Spark to extend analytics capabilities even further to perform real-time analytics and machine learning. The mobile APP implementation is outside the scope of this paper.
In this experiment, we use a virtual dataset for public transport passengers whose body temperature is obtained. We assume that each IoT sensor sends data every 60 s, and we have 1000 public transport vehicles equipped with an IoT sensor in our system. The aim of our experiments was to check whether our system prototype was able to send timely warning notifications to users so as to limit their contact with other people. Also, the latency of the 4G network is always taken into account when sending data from the public transport vehicle to our infrastructure and sending back the alert message from our infrastructure to users. We conducted several tests.
First, we increased the dataset of public transport vehicles and users to investigate and determine the capabilities and the shortcomings of our system. Fig. 6 shows that, when the number of public transport vehicles increases, the processing time of the live data analytics with IoT intelligence-sensing system increases, and the time roughly depends on the dataset size linearly. The request is executed multiple times in order to obtain reliable results. Furthermore, in the experiments, the mongoDB supports the GeoJSON objects to process the locationbased information. Fig. 7 demonstrates the output of the GeoJSON format conversion of row data and insertion into MongoDB so that GeoSpatial queries can be executed. In order to visually examine the corresponding scatter plot of the experiment, Figs. 8 and 9 display the scatterplot red and blue dots which show the corresponding scatterplot of users near a bus stop who need to be sent an alert message.
The above analysis confirms the effectiveness of our live data analytics with IoT intelligence-sensing system. In fact, if 1000 public transport vehicles are equipped with our system's IoT sensors, and with a standard 4G delay for sending data and alerts equal to 50 milliseconds, our system is able to send an alerts notification in 1.24 s for a distance of 2 km as shown in Fig. 10. Briefly, live data analytics with an IoT intelligence sensing system is capable of collecting, storing, analyzing, processing, and managing the vast amount of data generated by IoT sensors, and provides the users with real-time information about potential public transport events, thereby enabling the users to make well-informed and timely decisions.

Conclusion
Live data analytics with IoT intelligence sensing-based risk alerting system is proposed to face the challenges of COVID-19 in transport sector. The infrastructure of the proposed model backed by a system capable of collecting, storing, analyzing, processing, and managing the vast amount of data generated by IoT sensors. There are several challenges that need to be addressed in future work. We plan on evaluating the impact of security in the proposed system. Also, we will investigate challenges associated with IoT such as privacy protection, granular access control, cryptography authorized information-driven security, secure data repository, data provenance, and granular scrutiny. In addition, further experiments will be conducted in order to evaluate the system's behavior and performance.