Introduction

In an unprecedented move, China locks down the megacity named Wuhan, in which the novel coronavirus was first reported, in the hopes stopping the spread of deadly coronavirus. During the lockdown, all railway, port, and road transportation were suspended in Wuhan city. With the increasing number of infections and fast person-to-person spreading, hospitals are overwhelmed with patients. Later, the disease has been identified in many other countries around the globe [1, 2]. Subsequently, the World Health Organization (WHO) announced that the virus can cause a respiratory disease with clinical presentation of cough, fever, and lung inflammation. As more countries are experienced dozens of cases or community transmission, WHO characterized COVID-19 disease as a pandemic.

In such unprecedented situation, doctors and health care workers are putting their life at risk to contain the disease. Furthermore, to isolate infected people and combatting the outbreak, many hospitals are converted to COVID-19 quarantine ward. Moreover, a surge of COVID-19 patients has introduced long queues at hospitals for isolation and treatment [3]. With such high number of infections, emergency responders have been working non-stop sending patients to the hospital and overcrowded hospitals refused to in more patients. For instance, recently, in Italy, medical resources are in short supply, and hospitals have had to give priority to people with a significant fever and shortness of breath over others with less severe symptoms [4].

As the COVID-19 continues to spread, countries around the glob are implementing strict measures intensify the lockdown, from mass quarantine to city shutdown, to slow down the fast transmission of coronavirus [5, 6]. During the lockdown, people are only allowed to go out for essential work such as purchasing food or medicine. Ceremonies and gatherings of more than two people are not permitted. These strict rules of quarantine only allow few to move around the city including delivery drivers providing vital lifeline. On the other hand, few countries, such as Japan, has declared a state of emergency in many cities in an attempt to tackle the spread of the virus. Although COVID-19 started as a health crisis, it possibly acts as a gravest threat to the world economy since 2008 global financial crisis [7].

COVID-19 epidemic affects all sectors of the economy from manufacturing and supply chains to universities. It is also affect businesses and daily lives especially in countries where the COVID-19 has hit the hardest. The shortage of supply chain has knock-on effects on economic sector and the demand side (such as trade and tourism). This makes a supply constraint of the producer and causing a restraint in consumer’s demand, this may lead to demand shock due to psychological contagion. To prevent such widespread fallout, central banks and policymakers have been rolling out emergency measures to reassure businesses and stabilize financial markets to support economy in the phase of COVID-19. Currently, most countries are in the same boat with leading responsibility of Group Twenty and international organizations [7]. To meet the responsibility, many companies and academic institutions around the world made efforts to produce COVID-19 vaccine. However, health experts state that it may take time to produce an effective vaccine.

As an effective vaccine for COVID-19 is not probably to be in market until the begin of next year, management of lockdown is an imperative need. Thus, public health officials combat the virus by manual tracking of recent contacts history of positive COVID-19 cases. This manual contact-tracing is very useful at the early spreading stage of the virus. However, when the number of confirmed cases was increased tremendously in some countries, manual contact-tracing of each individual is labor-intensive and requires huge resources [8]. For example, an outbreak of the COVID-19 at a funeral ceremony in an avenue in Erbil, Kurdistan Region left regional government with hundred of potential contacts. This situation or many other scenarios of massive number of cases burden the government on trying to manual tracking all contacts [9]. It is risky that health authorities cannot easily trace recent COVID-19 carrier cases, so that its probability of occurrence and its impact can hardly be measured.

Technology can potentially be useful for digital contact-tracing of positive coronavirus cases [10]. Smartphone can use wireless technology data to track people when they near each other. In particular, when someone is confirmed with positive COVID-19, the status of the smartphone will be updated and, then, the app will notify all phones in the vicinity. For example, if someone tests positive of COVID-19 and stood near a person in the mall earlier that week. The COVID-19 carrier would not be able to memorize the person’s name for manual contact-tracing. In this scenario, the smartphone contact-tracing app is very promising to notify that person [11]. This automated virus tracking approach could really transform the ability of policymakers and health authorities to contain and control the epidemic. In this situation, a dashboard is required to assist governments and health authorities to predict when lockdown and self-quarantine will end.

This study first reviews the current solutions to combat COVID-19. Then, we developed a smartphone-based approach to automatically and widely trace the contacts for confirmed COVID-19 cases. Particularly, contact-tracing approach creates a list of individuals in the vicinity and notifying contacts or officials of confirmed COVID-19 cases. This approach is not only providing awareness to individuals they are in the proximity to the infected area, but also tracks the incidental contacts that the COVID-19 carrier might not recall. Thereafter, we developed a dashboard to provide a plan for policymakers’ officials on how lockdown/mass quarantine can be safely lifted, and hence tackling the economic crisis. Applying mass quarantine to people who might be exposed to contiguous COVID-19 in specific areas without any plan and information of infected people in those areas will lead to economic collapse. For example, if there are limited confirmed COVID-19 cases in some areas, restrictions on mass gatherings should be eased and consequently relaxing social distancing among people to allow them for necessary shopping and using transportation.

From a technical standpoint, we summarize the most important contributions of this paper as follows:

  1. 1.

    We build a tracking model based on positional information of registered users to conduct contact-tracing of confirmed COVID-19 cases.

  2. 2.

    We propose a smart lockdown management to predict level of mass quarantine in those areas.

  3. 3.

    To notify contacts for confirmed cases, we also developed a notification model to cluster lockdown regions.

The rest of this paper is organized as follows. The section “Related Work” provides the literature review on recent advances of developed AI systems for COVID-19 detection. This is followed by presenting an overview of the proposed approach and details of the designed algorithm in the section “Proposed Smartphone-Based Contact-Tracing”. The section “Experiments and Deployment” presents the experiments which are conducted in the paper. Finally, the section “Conclusion” concludes the paper.

Related Work

Countries practice many restrictions to respond the fast transmission of COVID-19 pandemic including quarantining people with toughest level of social restrictions, closing public and private sectors, and early diagnosis of infected people via recent technologies. However, none of these solutions will be considered as permanent cure due to bad effecting of the daily life. Apparently, such solutions have dramatic and chronic impact on social and economic dimensions. Therefore, there is a need for digital contact-tracing to tackle the afore-said issues. In this section, recent trends on contact-tracing are investigated and compared with the proposed approach.

Several solutions ranging from company’s products to an academic research studies have been proposed in mitigate the negative consequences of COVID-19. In particular, an application in Singapore named smartphone-based contact-tracing is developed, Aarogya Setu [12] is also used in India to support the difficulty of COVID-19 situations. Furthermore, some solutions are under development in United Kingdom in collaboration with giant companies including Google and Apple [13]. In [14], a new system has been implemented using onboard smartphone Bluetooth technology to track people who exposed confirmed cases. The system can notify the nearby users in the public area when the infected users are approaching and the area will be quarantined to control the spreading of the virus in the vicinity. However, such study will not provide a comprehensive solution to predict the lockdown area and will not updating the prediction issue, periodically.

In another attempt, authors in [15] proposed a new de- centralized approach to track the contact-tracing, which is named CAUDHT (Contact tracing Application Using a Distributed Hash Table). The approach is trying to preserve the privacy issue of the users (including public health users and infected users), since the system is exchanging data in a blind signature mechanism [16, 17]. Furthermore, the approach uses the distributed hash table method to messaging between the users. However, if such approach is implemented on the distributed server, it needs huge computation and incurs huge cost. In comparison to their proposed system, the proposed approach is working on temporal tracked information of the registered users, which is not required a large space on the server. Furthermore, most of the computations of the system including notifying users can be run on the smartphone users. In [18], the authors modeled on how COVID-19 spreads over populations [19] in countries in terms of the transmission speed and containing its spreading. In the model, R is representing the reproduction number, which is defined the ability of the virus in infecting other people as a chain of contagious infection. Infected individuals rapidly infect a group of people over very short period of time, which then yields an outbreak. On the contrary, the infection would be in control if the probability gets closer of one person to infect less than one other person [20]. This is exactly happening in Fig. 1; when people (black color) who have come into contact with an infected person (red color), the infection would be spread rapidly.

Fig. 1
figure 1

Identifying and alerting people (black color) who have come into contact with a person (red color) infected with COVID-19

One important aspect is how the number of infected people looks like depends on several factors, such as the number of vulnerable people in the communities, the time takes to recover a person without symptoms, the social contacts and possibility of infecting them with coronavirus. Furthermore, another factor will affect fast spreading of coronavirus is the frequency of visiting crowded places such as malls and mini- markets [21]. Thus, policymakers and public health authorities are responsible to manage and plan a convenient way to contain the epidemic. Moreover, countries at the early stage of virus spreading need to control the epidemic by typically isolating and testing suspected cases tracing their contact and quarantine those people in case they are infected. Testing and contact-tracing at wide scale, the better the chance of containment.

In the case of COVID-19, research studies have been conducted for containment or controlling the fast spreading, and hence helping policymakers and societies in ending this epidemic [22]. In [23], the authors have investigated the importance of confirmed COVID-19 case isolation that could play a key role in controlling the disease. They have utilized a mathematical model to measure the effectiveness of this strategy in controlling the transmission speed of COVID-19. To achieve this goal, a stochastic transmission model is developed to overcome the fast person-to-person transmission of COVID-19. According to their research study, controlling virus transmission is within 12 weeks or by a threshold of accumulative 5000 cases. However, controlling the spread of the virus using this mathematical approach is highly correlated to other factors like pathogen and the reaction of people.

One key role to track infected people and predict ending lockdown is contact-tracing. When a patient is diagnosed with infectious disease like COVID-19, contact-tracing is an important step to slowing down the transmission [24]. This technique seeks to identify people who have had close contact with infected individuals and who, therefore, may be infect themselves. This targeted strategy reduces the need for stay at home periods. However, manual contact-tracing is subject to a person’s ability to recall everyone they have come in contact over a 2 week period. In [24], the authors exploited the cellphone’s bluetooth to constantly advertise the presence of people. These anonymous advertisements, named chirps in Bluetooth, are not containing positional or personally identifiable information. Every phone stores all the chirps that it has sent and overheard from nearby phones. Their system uses these lists to enable contact-tracing for people diagnosed with COVID-19. This system not only traces infected individuals, but also estimates distance between individuals and amount of time which they spent in close proximity to each other. When a person is diagnosed with COVID-19, doctors would coordinate with the patient to upload all the chirps sent out by their phone to the public database. Meanwhile, people who have not been diagnosed can their phones do a daily scan of public database, to see if their phones have overheard any of the chirps used by people later diagnosed by COVID-19. This indicates that they were in close prolonged contact with that anonymous individual. Figure 2 shows the procedure of exchanging anonymous ID among users for contact-tracing.

Fig. 2
figure 2

Community-driven contact-tracing based on Bluetooth signal

Proposed Smartphone-Based Contact Tracing

As stated in the aforementioned section, manual contact-tracing is labor-intensive task. In this section, we detail out each part of the proposed smartphone-based digital contact-tracing, as shown in Fig. 3. The main idea of the proposed framework in Fig. 3 to enable digital contact-tracing to end lockdown and the same time preventing the virus from spread- ing. The best thing to do seems to be let people go out for their business, but any body tests positive of COVID-19, we would be able, through proposed framework, to trace everybody in contact with the confirmed case and managing the lockdown and mass quarantine. This will confirm preventing the spread of the virus to the rest of the people.

Fig. 3
figure 3

A framework of contact-tracing using smartphone-based approach

The first step of the proposed contact-tracing model is registration of users. There is no doubt registration and coverage of high percentage of population is very significant for effective pandemic control. Users provide information such as name, phone number, post code, status of the COVID-19 disease (Positive, Negative, or recovered). Effectiveness of the application and digital contact-tracing depends on two factors speed and coverage. For the proposed framework, we utilize Global Navigation Satellite System (GNSS) receiver for outdoor environment, whereas Bluetooth low energy is used in indoors. In our proposed model, Bluetooth technology does not need make a connection setup between the users, while the system only requires the discovery process to retrieve the MAC address of the nearby users and then performs the process of matching the infected users with their MAC addresses. Speed depends on how to reduce the time required for contact-tracing from few days to hours or minutes. The more people register in the system, the better performance of the system in terms of both speed and coverage of contact-tracing.

In the second step, Global Positioning System (GPS) receiver is used by the proposed model to track either individuals or a group of people visiting to a common place. The GPS service class updates user coordinates to the database in every few seconds. Once a registered user reports gets infected with COVID-19, his test result would be send to the public database in central computer server. Other registered users will regularly check those central server provider for possible positive COVID-19 cases they were in contact in the past 2 weeks. Server is responsible to compare the infected ID with its list of stored IDs. A push notification will be send, by the server, to those who were in contact with a person tests positive. It is important to note that the information would be revealed to the central server is an ID of the phone. In another scenario, tracking users’ position information could be periodically stored on the server for the purpose of exchanging notifications. Furthermore, this means that only the infected users’ information would need to be stored on the server. Certainly, the records of infected area should be updated periodically. Therefore, the system does not need huge computations on the server because of the issue of tracking infected users would be run on the smartphone. The only function that should be run of the server is the lockdown area prediction function.

Fire-based cloud messaging is used to send push notification to multiple devices even the apps are paused or running in the background. Many apps send push notification, which indicate an alert to the users. This is happen when a person is approaching someone who is infected with COVID-19 or nearby a lockdown area. To protect the privacy of those who have the coronavirus, we only include an alerting message into the push notification. This certainly would be very useful for entire population to make informed decision about not getting close to COVID-19 area. However, this notification would help the public health professionals rather than replace it.

The proposal is also including a lockdown prediction model. The model is working based on the collect geographic in- formation and crowding level of the registered users in the system. There are many algorithms to perform the cluster- ing on collected data including k-means Clustering, Mean-Shift Clustering, Density-Based Spatial Clustering of Applications with Noise (DBSCAN), Expectation–Maximization (EM) Clustering using Gaussian Mixture Models (GMM), and Agglomerative Hierarchical Clustering. However, the k-means clustering is the fast method among the other algorithm to find and allocate points with respect to the discovered clusters or group of points [25]. For the reason of time and space complexity, in this study, the k-means clustering algorithm is used and implemented to prediction process. In this study, k-means as an unsupervised machine learning algorithm is used to cluster the users’ positions information and predict that the area should be locked down or not based on the same empirical thresholds.

Experiments and Deployment

This section presents the details of how the proposed approach will be implemented. The proposal includes two main parts. First, deploying an application on Android-based smartphone which will be used by the users and track/send mobility information of the users to the system. While the second side is a web portal (including a comprehensive dashboard) to monitor and predict the visited area that should be locked down or not.

  1. A.

    Smartphone Application

  2. 1.

    An Android application is implemented on the smartphone. The application lets the users to register their information into the proposed system including name, postcode or zip code, phone number, age, Bluetooth MAC address, gender, and COVID-19 status. The Bluetooth MAC address is automatically captured through the application without user interaction. The COVID-19 status includes three options which might be COVID-19, None COVID-19, and recovered. Figure 4a shows a snapshot of the application form for the registration process.

  3. 2.

    Once the users have completed the registration process, they can enter into the position tracking model. The tracking model is to send user’s position information into the database of the system as well as shows the google map regarding to their positions, as shown in Fig. 4b.

  4. 3.

    Beside this, the users are also can receive the notification or alert about the areas which have been visited by infected users. The notification is working in the background, i.e., the user may be paused the application and uses other application on the smartphone. However, when the user opens the application and enters the infected area will receive the alert dialog. Figure 4c and Fig. 4d show an example of the notification and alert dialog. The notification and dialog alert models are also configure both outdoors and indoors. For example, for outdoors, the GNSS position information of the users is used to measure the distance between any two users’ positions, and then, if the distance is less than 5 m, then the notification or the alert dialog would be raised. However, for indoors, the application scans for Bluetooth devices in the vicinity, and then, the result of the scan is matching with pre-registered MAC addressed in the system. If the matched MAC addresses have COVID-19 or recovered cases, then the notification model and the alert dialog will notify the users about having COVID-19 or recovered users in the scan area.

  5. B.

    System Dashboard/Portal

    A web portal for the system’s administrators is designed and implemented using HTML5, PHP, JAVAScript, and google Map API. This part of the system is to monitoring and tracing the registered users only in terms of how the areas (which have been visited by users) should be lockdown or not? To this end, an unsupervised machine learning (UML) algorithm has been implemented in the system. There are several UML algorithms including Neural networks, Anomaly detection, Clustering, etc. However, for this system, k-means Clustering algorithm is used to predict the lockdown approach for the visited area. The k-means algorithm, first, reads the tracked users’ position information and their status COVID-19. Then, in the next step, it will calculate the centroid position of the areas based on the DASV seeding method. The DASV method is an efficient algorithm to select the best centroid position among a set of nearest positions in the vicinity. In this study, two different spaces have been selected via DASV method, since only two crowded area are tested. Then, the centroid positions will be updated based on how the positions are nearest to each them. The pseudo code of the k-means clustering algorithm is shown in Algorithm 1.

    figure a
Fig. 4
figure 4

The consequent steps of the smartphone application

Once, the process of the clustering of the tracked users’ positions information has completed, a set of clusters will be produced. Then, for each cluster, the distances between the positions of the different users are calculated. This is to calculate how many times the users, in the vicinity, are approaching to each other (from now called AEO). For this study, five users (user A with marker-yellow color, user B with marker-orange color, user C with marker-pink color, user D with marker-green color, and user E with marker-blue color) are participated into the system in two different areas in USA. Therefore, two different scenarios via the five users are conducted for the k-means algorithm, as shown in Fig. 5. In the first scenario, the users are walking and they are located in Denver area in Colorado, USA, while in the second scenario, they are located in Aspen area in Colorado, USA. Each user, at every 1 s sends their location information (including latitude and longitude), and duration of each scenario is 1 min of walking. Therefore, approximately each user sends 60 records of location information to the server.

Fig. 5
figure 5

Tracing five users in two different scenarios

A threshold for the approaching distance has been initialized to 5 m, i.e., if user A has been approached around 5 m to user B, or C, or D, or E, it means that the users are too near to other users. For the two scenarios, if AEO is greater than 10, the system assumes that this area is too crowed and the system will predict that the area should be locked down. However, if the value of AEO is less than ten times, it means that the area should not be locked down.

For ten trial experiments, the model predicts that the Denver area in the first scenario should be locked down, since the five users during the walking in the area are approaching to each other for 55 times and they passed the threshold (i.e., 5 m). However, in the second scenario, the same trials have been tested parallel with the second scenario, and the model predicted that the Aspen area does not need to be locked down, since the users are walked far to each other. Both scenarios results are shown in Fig. 6. As an initial study, only two different scenarios in two different areas are analyzed. However, more complex scenarios and hypothesis in the future could be conducted.

Fig. 6
figure 6

The results of the prediction model for both scenarios

Discussion

Lockdown area prediction using recent technologies, especially via onboard smartphones technologies, is the necessity for most of the countries. Such management is very important for the purpose of economic sector and the demand side including trade and tourism. This practical research has shown that the lockdown issue for an intended area could be predicted using machine learning algorithms such as K-Means clustering algorithm. The algorithm is implemented on a server as well as the server receives the tracked location information of the smartphone users. This is followed by send back notifications from the server to the users to notify them for the crowded area and controlling the spreading the coronavirus COVID-19. Furthermore, this management is also giving a feedback for the policymakers about of locked down area or not. The time and space complexity of the implemented algorithm on the server is depending on the size of the number of participant users. To this end, proposed approach, temporary, uses the tracked location information only for purpose of lockdown prediction issue. Therefore, the approach keeps the privacy of the participant smartphone users. A set of experiments and trials have been conducted to prove the validity of the proposed approach. However, further study for setting up server, managing the implemented algorithm, and providing robust security/privacy issues is needed.

Conclusion

At the emergence of COVID-19, many countries worldwide are commonly practiced social distancing, mass quarantine, and even strict lockdown measures. Smart lockdown management is a pressing need to ease lockdown measures in places where people are practicing social distance. In this paper, we developed a smartphone-based approach to inform people when they are in proximity to an infected area with COVID-19. We also developed a dashboard to advise health authorities on how specific area safely get people back to their normal life. The proposed prediction model is used positional information and distance measurements of the registered users in the proximity. The policymakers and public health authorities would be able to take benefit from the proposed dashboard to get latest statistics on COVID-19 cases and lockdown recommendation in different areas. The weak point of this study is the privacy issue of tracking position information of the users. This issue would be solved by applying encryption algorithms, in near future. However, the weak point of this proposal is that: in the further study, more experimental and complex scenarios are also needed to verify the validity of the proposed system. For example, if the number of recorded of tracked users is wider and if the prediction model is intended to use for a bigger city includes New Work city in United State or London in United Kingdom; also, using deep learning algorithms rather than of using only K-Means algorithm. Hopefully, in near future, these requirements would be considered for the public health care system.