# An IoT-Based COVID-19 Prevention and Control System for Enclosed Spaces
## 3 Materials and Methods
### Risk Assessment Model  
Potential COVID-19-positive individuals may enter an enclosed place, putting others at risk. As a whole, the closer an uninfected person is to an infected person, the greater the risk of infection. Moreover, due to the pollutants produced by infected individuals, the space is still at risk of infecting people after infected individuals leave, and the infectivity of pollutants left in the site will gradually decrease with the passage of time. The risk assessment model will assess the infection risk of all relevant people during the period from the time the infected individual enters the enclosed space to the time when he is diagnosed with COVID-19. Ideally, all relevant people should be isolated and nucleic acid tested, and even the whole city should be shut down. However, this is an impossible measure in many countries, so a relatively accurate risk assessment model is necessary. The model divides people into different risk levels and provides information for them and managers. It is up to the authorities and regulations to decide what measures to take. Nowadays, many countries that have adopted strict measures are also gradually improving the efficiency of pandemic prevention and control. Recently, the concept of \"possible contacts in time and space\" has been put forward by the health departments in China, and people who appear in the same area as infected individuals for a certain period of time are likely to meet this definition. At present, this is mainly realized by base station positioning technology, which requires the cooperation of base stations and mobile phones. This model based on the indoor positioning technology provide accurate assessment services. The enclosed space is divided into many grids (each grid 20 m \(\times\) 20 m) such as Figure 6, and every person's arrival and leaving times at a grid are recorded. In Figure 6, a COVID-19-positive individual is in a grid, and the location of this grid is denoted as \((a,b)\), and the risk level of this grid is seen as \"Extremely High\" at this moment. There are four risk levels for each grid: \"Extremely High = 1\", \"High = 2\", \"Medium = 3\", and \"Low = 4\". They change in real time. Risk levels at this moment of other grids \((x,y)\) follow Equation (22). \[\text{Risk Level}=\left\{\begin{array}{c}\begin{array}{c}\text{Let us assume that the patient disappears directly at this moment. Then, every grid launches a timer. Suppose the time from the disappearance of the patient is \(t\), and the principles of risk level changes follows Table 4.  
When \(0<t\leq 1\) h, the risk level of all grids remains unchanged. The second row in the table represents that when \(1<t\leq 6\) h, the former grid with \"Extremely High\" risk level is \"High\", etc. The risk level can only be reduced by two levels at most. A patient cannot disappear directly in a grid. He can only leave from the boundary. When he moves, the new grid he steps in will be subsequently defined as \"Extremely High\" level and other grids will change their levels according to Equation (22). Visually, it is like \"sliding\" the original risk distribution window with the patient's footsteps. The risk level is influenced by both Equation (22) and Table 4, and the final risk level of a grid is the highest result. An example is presented in Figure 7. At 12:00, a patient was at D and all grids are defined as \"High\" risk level (except D). He entered E at 12:05 without leaving. After 5 h, the timer at E defines the risk level as \"High\" according to Table 4, but Equation (22) considers E as \"Extremely High\", so the final definition is \"Extremely High\" for \"\(Extremely\)\(High>\)\(High\)\". Each grid may start more than one timer because of the continuous movement of a patient, and we only recognize the results that are considered the riskiest.