{'fraction_non_alphanumeric': 0.03323142363418849, 'fraction_numerical': 0.008773095839425761, 'mean_word_length': 4.980524642289348, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A risk assessment system of COVID-19 based on Bayesian inference

The novel coronavirus disease (COVID-19) has now spread to most countries in the world. Preventing and controlling the risk of the coronavirus disease has rapidly become a major concern. A risk assessment system of novel coronavirus disease is proposed based on Bayesian inference in this paper. The system includes multiple handheld terminals and a cloud processing centre. The handheld terminal measures, records, and uploads the individual’s physical information (e.g., body temperature, cough) and GPS information of the terminal. We establish a Bayesian diagnosis network to deduce the risk probability related to the individual’s detection information. The cloud obtains the individual’s detection information and positions in last 14 days, and estimates the epidemic risk probability using Bayesian inference. This probability can be helpful for relevant institutions to judge the individual’s risk levels and corresponding measures. This risk assessment system, which assesses the COVID-19 risk of subjects dynamically, can not only assist and guide the normalization of epidemic prevention and control in relevant institutions, but also assist in epidemiological case tracing.


Introduction
In December 2019, the novel coronavirus disease (COVID-19) was first reported in Wuhan City of China [1]. Unfortunately, the epidemic has spread out globally and rapidly, which has brought great challenges to the world's public health security. According to data from the World Health Organization on May 29, there have been more than 5.77 million confirmed cases of new coronary pneumonia worldwide, and more than 360,000 deaths have been caused. More than 200 countries and regions have been affected by the epidemic.
As there is still no specific antiviral agents and vaccines available to treat this new infection, preventing person-to-person transmission measures, such as keeping suitable social distance, family quarantine, and even locking down entire cities to restrict the flow of people, have so far become the main, if not only, choice for many countries [2]. However, these measures are still not sufficient to stop the rapid spread of this coronavirus at a global scale. The epidemic has caused varying degrees of impact on the economies of many countries. How to maintain normal production and living order, ensure smooth transportation and normal flow of personnel, rectify and standardize the order of the market economy, and improve safety in production is the current focus of many countries.
There has been some research on diagnosing Coronavirus Disease 2019 (COVID-19) using Artificial Intelligence. In [3][4][5], systems to diagnose COVID-19 that utilized conventional neural network (CNN) were developed. However, the system neural network is difficult to interpret, requires large data to train, time and capital intensive and utilizes a lot of memory to execute the network. In [6], an expert system for diagnosing COVID-19 was designed using Clips and Delphi expert system languages. The system results showcased high detection accuracy, but failed to diagnose respiratory tract diseases with overlapping symptoms with COVID-19. In [7], Bayesian Belief Network (BBN) was utilized in diagnosing COVID-19 with its symptoms. The system had an accuracy of 99.38% in predicting COVID-19 without the influence of the overlapping symptoms.
There has been some research on prediction and risk assessment. In [8], a hybrid SRIMA-WBF model was proposed to deal with the real-time forecasts of the daily COVID-19 cases in five different countries. The risk of COVID-19 was also assessed in [8], and some strategies are affirmed because of their obvious effectiveness. In [9], a method is proposed to dynamically assess the infection risk of ships based a data-driven and machine learning approach.
In order to control the spread of the epidemic, this paper proposes a risk assessment system of COVID-19 based on Bayesian inference. The system estimates the individual's epidemic risk probability using Bayesian inference, which is based on the individual's detection information and positions in last 14 days.
After the epidemic progresses to a stable stage, the epidemic prevention work will become normal for practical production and living considerations, which requires that the staff's daily epidemic prevention work should be simplified as much as possible, and the results should be as accurate as possible. The system can collect personal information and whereabouts using a terminal, upload and evaluate personal risks in real time, which can simplify the process. The epidemic prevention and control work is normalized, which will inevitably generate a large amount of data. The evaluation system can evaluate the risk levels of different regions and communities based on big data, guide the accurate prevention and control work, which can help maintain normal production and living order.
The rest of the paper is organized as follows. In Section 2, we discuss the development of the overall model in assessing the infection risks. Sections 3 provides the conclusions and outlines the findings and further work.

Bayesian Network
The Bayesian network is a directed acyclic graph model, which uses probabilities to illustrate the conditional admissibility that exists between routers on the graph. Bayesian networks (BNs) play a central role in a wide range of automated reasoning applications. Bayesian inference is a statistical inference method in which Bayes' theorem is used to update the probability of a hypothesis when additional evidence or information becomes available, and it is an important technique in statistics, and especially in mathematical statistics. Bayesian network is based on the Bayes theorem which relies on probability.
The Bayes' theorem is represented in the mathematical equation below: Where, P(a) is the probability of event "a" happening without any information about event "b". It is called the "Prior". P(a/b) is the conditional probability of event "a" happening given that event "b" has already occurred. It is otherwise called the "Posterior". P(b/a) is the conditional probability of event "b" happening given that event "a" has already occurred. It is called the "Likelihood". P(b) is the probability of event "b" happening without any information about event "a". It is called the "Marginal Likelihood".
Bayesian inference is an important inference method in artificial intelligence, especially in probability prediction. Bayesian inference is the process of using Bayes' theorem to derive attributes about populations or probability distributions from data. Bayesian reasoning does not need to store a lot of data all the time, but constantly updates the previous probabilities based on observations. In fact, the Bayesian framework updates the probability in real time while processing the data, which has obvious benefits when dealing with big data.

Overall Framework
The main procedure used in this system is described in Figure 1. As shown, a risk assessment system of COVID-19 is composed of multiple handheld terminal devices and a cloud processing centre. The handheld terminal measures, records, and uploads the individual's physical information (e.g., body temperature, coughing) and GPS information of the terminal. The cloud obtains individual's detection information and positions in last 14 days, and estimates the individual's epidemic risk probability using Bayesian inference.

Cloud processing center
Data storage Data Security Risk assessment Data cloud synchronization Figure 1. The main procedure of the risk assessment system.
The system records the individual's physical through the handheld terminals, records the individual's recent whereabouts information, and assesses the individual's current epidemic risk in the cloud processing centre. In addition, the system can assist in epidemiological investigations and provide basic data for the formulation and improvement of future vaccination and epidemic prevention and control strategies.
The overall Bayesian Inference Network for risk assessing is described in Figure 2. The basis of reasoning mainly includes three layers: the epidemic situation in the current region, the physical information of the individual, and the place where the individual has recently visited. The epidemic situation in the region should be derived from official data. The key data is the total population, the number of confirmed and suspected COVID-19 population in the region. In addition, according to the diagnosed and suspected population distribution, the risk probabilities of different fragmented regions can be obtained. Pay attention to privacy violations here. The physical information of the individual only considers the records of the current detection time. The Bayesian diagnostic network (Figure 3) was used to infer the probability of risk from the individual's physical information. The positions of the individual in the last N days that stored in the cloud and the information of the COVID-19 risk location in the region should be integrated to calculate the risk probability.  Figure 2. The overall Bayesian network in the risk assessment system.

risk assessment based on physical information
According to the diagnosis network in [7] and the quick detection, we establish the Bayesian diagnosis network as shown in Fig. 3. In [10], it was stated that the symptoms of this disease are fever, cough, sore throat, tiredness, aches, sneezing, nasal congestion, malaise, diarrhoea, septic shock, pneumonia and difficulty in breathing. In a quick detection, the information we can obtain quickly and conveniently includes: body temperature, which can be measured by contact or non-contact infrared equipment, cough and sneezing, which can be obtained by observation. For further requirement, the inspector can obtain information such as whether the individual has a tiredness, dyspnoea or sore throat through consultation. Based on the information given in [1] ，which introduced clinical features of patients infected with COVID-19 in Wuhan, China, we set up the diagnosis network shown in Figure 3. Based on the established Bayesian network, the epidemiological risk probability of the subjects can be inferenced.  Assuming that the individual's detection information collected by the terminal inspector includes fever, cough, sneezing, aches, tiredness, dyspnoea, and sore throat. Denote it as info= {fever, cough, sneezing, aches, tiredness, dyspnoea, sore throat}, in which each variable is a Boolean.
According to the individual's detection information info= {fever, cough, …}, according to the Bayesian diagnosis network in Figure 3, the probability p 0 of epidemic risk based on the individual's detection information can be calculated according to the Bayesian diagnosis network.
According to the data and analysis given in [1],  19) is the overall disease risk probability of the region, and the value is calculated by the official data. The probability of fever p(fever) is the probability of fever in the region, which can be calculated based on local medical statistics. Similar to the probabilities p(cough), p(sneezing), p(aches), p(tiredness), p(dyspnoea) and p(sore throat).
The probability of COVID-19 p(COVID − 19) should be calculated based on local official epidemic prevention data. The formula is as follows: Where N A is the number of the residents in the region, and N COVID−19 is the number of COVID-19 diagnosed and suspected.
The probabilities p(fever), p(cough) can be updated iteratively. The update formula is as follows: Where N Ω is the total number of people detected in the region; N fever is the number of fevers detected in the region; N cough is the number of coughs detected in the region.
Finally, the probability p detection of the epidemic risk based on the individual's detection information can be obtained.
The probability p detection of the epidemic risk can be obtained in the CPT, or we can calculate it using the formula as follows. According to the relevance of symptoms, we sort the information in info, as {fever, cough, dyspnoea, tiredness, sneezing, aches, sore throat}, and denote the symptoms as sym i (1 ≤ i ≤ 7). p(COVID − 19|fever info ) = p(COVID − 19|sym 1 ) Denote the risk probability of COVID-19 on condition of the first two symptoms as: Assuming that the risk locations {a 1 , a 2 , ⋯ , a n } , the safety distances {l 1 , l 2 , ⋯ , l n } and risk weights{w 1 , w 2 , ⋯ , w n } in the region have been calculated using the official data. For the location m i , calculate the probability p ij = f(m i , a j , w j ) of the individual's position m i and the risk point a j in the region.
Here, c i is a coefficient to reflect the attenuation of the time series' impact on the current risk, and decreases as i increases. Here, we take c 0 = 1, c i = 1 i . For the location m i , calculate the Epidemic risk probability p i as follows.
For the individual, the position epidemic risk probability p can be calculated as follows:

the total probability
Combining the signs and whereabouts of the subject, we give the total probability of epidemic risk p as follows. p = p detection + p position (14)

Some consideration in the system
According to official epidemic data and medical advice, the risk locations {a 1 , a 2 , ⋯ , a n } and the safety distances {l 1 , l 2 , ⋯ , l n } and risk weights {w 1 , w 2 , ⋯ , w n } in the region should be given carefully and updated regularly. In order to effectively prevent a resurgence in the pandemic and resume work and production smoothly, the Alibaba Group has developed a tracing health QR (Quick Response) code system to identify different degrees of infection risks based on people's daily activities and movements. Combined with QR, the probability can divide the risk into three levels, corresponding to different epidemic prevention strategies.

Conclusion
Preventing and controlling the increasing severe risk of COVID-19 has currently become one of the main concerns of many countries when taking measures to protect their citizens and to restart the economy. A risk assessment system of novel coronavirus is proposed based on Bayesian inference in this paper. The system collects the physical information of the subject based on the handheld terminal, and estimates the epidemic risk probability using Bayesian inference. This risk assessment system, which assesses the COVID-19 risk of subjects dynamically, can not only assist and guide the normalization of epidemic prevention and control in relevant institutions, but also assist in epidemiological case tracing.
However, there are still many directions to improve the approach both at the data and methodological levels. The region's risk locations and the safety distances, which should be given carefully and updated regularly, can be also inferenced by the system. But the method should be rebuilt. Posteriors in the system should be learned and updated by big data.