Abstract

Objective. This research aimed to explore the application of a mathematical model based on deep learning in hospital infection control of novel coronavirus (COVID-19) pneumonia. Methods. First, the epidemic data of Beijing, China, were utilized to make a definite susceptible-infected-removed (SIR) model fitting to determine the estimated value of the COVID-19 removal intensity β, which was then used to do a determined SIR model and a stochastic SIR model fitting for the hospital. In addition, the reasonable β and γ estimates of the hospital were determined, and the spread of the epidemic in hospital was simulated, to discuss the impact of basal reproductive number changes, isolation, vaccination, and so forth on COVID-19. Results. There was a certain gap between the fitting of SIR to the remover and the actual data. The fitting of the number of infections was accurate. The growth rate of the number of infections decreased after measures, such as isolation, were taken. The effect of herd immunity was achieved after the overall immunity reached 70.9%. Conclusion. The SIR model based on deep learning and the stochastic SIR fitting model were accurate in judging the development trend of the epidemic, which can provide basis and reference for hospital epidemic infection control.

1. Introduction

Novel coronavirus (COVID-19) is one of the current coronaviruses that can infect humans. On December 1, 2019, the first suspected case of COVID-19 was admitted to Jinyintan Hospital in Wuhan. After that, major hospitals in Wuhan received similar unidentified pneumonia patients one after another. The Wuhan Municipal Health Commission started an epidemiological investigation on December 29. On January 8, 2020, experts from the National Health Commission of China announced that the pathogen was a novel coronavirus [1]. According to the report of the Wuhan Health Commission on January 16, 41 new patients were reported in Wuhan, and 19 new cases were reported on January 19. Zhong Nanshan, head of the national expert team, said on January 20 that the disease was “human-to-human infectious” and that 217 new cases had been reported in Wuhan that day. The first cases were reported in Tianjin, Jiangxi, Zhejiang, and Henan provinces on January 21, marking the start of a full-scale outbreak of COVID-19 in China. As of March 1, the total number of confirmed cases in China has reached 80,000. Meanwhile, other countries have also reported the emergence of novel coronavirus infections. At present, the epidemic in China has been basically brought under control through continuous efforts. However, the epidemic continues to spread in other countries and the international situation is still grim. Against the background of global economic integration, the prevention and control of the epidemic must not be slackened. Currently, research on the COVID-19 model is mostly focused on the whole region [2]. There have been very few studies on hospitals. However, as the main battlefield of antiepidemic, it is very necessary to study the law of epidemic transmission and its control transmission. Specifically, health care workers are more likely to come into contact with patients and get sick. When health care workers get sick, it is not only a major blow to the health care system, but it also increases the risk to the general population. This is extremely detrimental to the prevention and control of the epidemic [3].

The use of models to study infection began as early as the 18th century. The concept of establishing a model to solve the spread of infectious diseases was first proposed by Bernoulli when he studied the smallpox virus. By the middle of the 20th century, scientists began systematic research on it. In 1926, Kermack and Mckendrick proposed the classic susceptible-infected-removed (SIR) warehouse model [4]. Various subsequent models were proposed based on that. Later, as the research on infectious disease models continues to deepen, scientists have further subdivided and characterized different infectious diseases, such as SIR and SIES models. In recent years, infectious disease models have developed rapidly with the development of computing power and big data. Many scientists modeled various infectious diseases. For example, some scientists established an SIR model with H1N1 as the research object and conducted a simulation study on it. There were many similar examples [5]. A large amount of research data showed that the establishment of infectious disease research models can effectively predict the development trend of infectious diseases, which was extremely important for the treatment and control of infectious diseases. The establishment of infectious disease models has occupied an irreplaceable and important position in modern infectious disease research.

Therefore, a SIR and stochastic model was established based on the data of the whole area of Beijing. Then, the data of the hospital was used as the research data to carry out empirical analysis on the model. It was expected to provide a basis for epidemic control and subsequent similar events.

2. Research Methods

2.1. Determination of SIR Model

Based on a set of ordinary differential equations, the population was divided into three types: susceptible, infected, and evacuated to establish the SIR model. Susceptible persons were represented by St, which meant the number of susceptible persons, and the susceptible persons were defined as healthy people who had not yet been infected with the disease. Infected people were expressed by It, which meant the number of people infected at time t, which was defined as a group that had been infected and could transmit from person to person. The migrants were represented by Rt, which meant the number of migrants at time t, which was defined as the people who had been isolated, passed away, or recovered from immunity. Assuming that an epidemic occurred in a closed environment, the effects of normal birth rate and death rate were excluded, while population dynamics were ignored, and the total population was counted as N. Then,

In a unit of time at time t, if the infection intensity was β, the number of new infections was . At time t, the number of people who were evacuated due to death and recovery was proportional to the number of infections. If the intensity of removal was calculated as r, the number of people who were evacuated was . The specific SIR model with different parameters is shown in Figure 1.

2.2. Stochastic SIR Model

For the stochastic SIR model, the stochastic process is as follows: for a given probability space and a given parameter set T, each parameter satisfies . Then, is the random variable defined in the probability space , and the corresponding random process in the probability space is denoted as or . The discrete state continuous-time Markov process is as follows: in a random process , if there are any integer n and space states I, , and their states meet the following conditions:

Then, the stochastic process is a discrete state continuous Markov process. Continuous-time Markov chain: for the random process , if there are any integers n and state space I, , and the state satisfies the following conditions:

Then, the stochastic process is called the continuous-time Markov process, also known as the process . The transition probability function: let be a continuous countable Marko chain; then, for any i, the transition probability is as follows:

The above Markov chain is called the time homogenous Markov chain, and its transition probability is only related to the time interval and has nothing to do with the time selection. Therefore, when only the time homogenous Markov chain was considered, the above formula can be rewritten as follows:

The transition probability matrix is defined as follows:

Chapman–Kolmogorov equation: for any , there is the following equation:

Its matrix form is as follows:

The transition rate matrix is defined as follows:

According to , the following equation is acquired:

Further, equation (11) is acquired:

Then, the following equation is obtained:

The pure generative process is defined as follows:

The birth and death processes are shown as follows:

A susceptible person was likely to become infected with a probability of . The probability that an infected person would recover or die and become a remover is . The probability of the above two occurrences is . Therefore, the transition probability of a binary random process is as follows:

β and γ are removal coefficients. Specific infectious disease random models and least square cases under different coefficients are shown in Figures 2 and 3.

2.3. Parameter Estimation

Least square method: assuming unknown parameters , then the number of infected persons is , the simulated value of the number of infected persons is , and the residual is and the sum of squares of the residual is as follows:Weighted least square method: the recent data was given a large weight, while the long-term data was given a smaller weight, , so the sum of squares of the residual is as follows:

2.4. Empirical Study on COVID-19 in Hospital

Firstly, the SIR model was used to fit the epidemic situation of the hospital. In the SIR model, the whole population was classified into susceptible persons , infected persons , and displaced persons . New diagnoses in hospital every day are shown in Figure 4. The number of newly diagnosed patients in hospital on a daily basis was consistent with the basic trend in the SIR model, so the SIR model can be used for fitting.

The parameter estimation of the SIR model was determined. The number of communicators was taken as the number of confirmed cases on the day minus the number of deaths and ceases on the day, and the cumulative number of deaths and ceases was obtained as follows:It = number confirmed on a day − cumulative number of deaths and cures.Rt = cumulative number of deaths and cures

The number of persons hospitalized with the virus per day and the cumulative number of deaths and discharges are the number of evacuees. Then, the differential equation of SIR model is determined as follows:

The initial value was , and the parameters to be evaluated were S0, β, and γ. The least square method was used to estimate the unknown parameters. First, the following definition is made to estimate :

Thus, an estimate of 0.071 for is obtained, representing a recovery time of approximately 14 days per patient. Then, the least square estimation of S0 and β is carried out by using the estimated value of the obtained . The parameter domain of unknown parameters is , and the minimum value SSE is found to obtain the 3D stereogram and contour map. The least square estimate of S0 and β is as follows:

The sum of squares of the residuals is as follows:

Then, the obtained is used for the least square estimation of β and γ. The parameter domain of unknown parameters is , the minimum value within the range is found, and the 3D stereogram and contour map are obtained. The least squares estimate is as follows:

The corresponding residual peace is as follows:

Parameter estimation of stochastic SIR model was as follows. Simulation steps of the stochastic process are as follows: (i) when , the initial value is set as . (ii) Random numbers with exponential distribution parameter are generated. (iii) Random number k that obeys uniform distribution is generated. Let , if , then . If , then . (iv) The pretransfer state is replaced with the posttransfer state ; the previous process is repeated, and the process is terminated when or when . The initial value is the same as that of the determined SIR model. The grid is taken and the parameter domain is set as . The minimum value of SSE is obtained via MATLAB, to draw the 3D stereogram and contour diagram. The least square estimate of the position parameter is as follows:

For the determined SIR model, the parameter fitting is substituted to extract the I change image. For the stochastic SIR model, the I1 change image is also obtained by fitting its 10,000 orbits and averaging the values of the orbits on the whole point (Figure 5).

Although there is a certain gap in the image, considering the error that may occur in the operation is acceptable, the previous view is confirmed. The determined SIR model is regarded as the value of the whole point of the stochastic SIR model. When the stochastic SIR model has enough orbits to eliminate its random interference, the average value of the two is converged. The results of the two are similar, but the process is opposite. The determined SIR model is regarded as a macroscopic change. The stochastic SIR model is a microscopic action, which determines the change of a single person each time, which is more in line with objective changes. The changes in the three types of populations in the SIR model are not achieved overnight, so the stochastic SIR model is more convincing and more reasonable than the determined SIR model.

2.5. Statistical Methods

SPSS 22.0 data analysis software was used to analyze the data. The counting data were expressed as a percentage, and the measurement data were expressed as mean ± standard deviation. Analysis of variance was used to compare the data between groups, and was considered statistically significant.

3. Results

3.1. Results Comparisons

The percentage error between the daily number of infected people and the actual number after February 12, the comparison between the fitting number of infected people and the real number, and the comparison of the number of displaced people are shown in Figure 6. For accurate data, the error control was better. There was not much difference between the fit number and the real number of infected people. There was a certain error in the fitting of the number of patients removed, which may be caused by a large number of patients during the epidemic and the failure of timely treatment and death of some patients or their self-healing.

3.2. Estimation of the Basic Regeneration Number

The variation of effective regenerative number and the relationship between basal regenerative number and herd immunity are shown in Figure 7. The effective number of regenerations in the first day was the basic number of regenerations, and the effective number of regenerations decreased as the susceptible person became infected. After the isolation of infected people and other measures, the susceptible group continued to shrink. The effect of herd immunity was achieved when the immune population reached 70.9% in the population, that is, when the basic regeneration number was less than or equal to 1. When the base regeneration number was less than or equal to 1, the outbreak would only occur in a small area and ended quickly.

3.3. Influences of Infection Intensity on the Development of the Epidemic

The number of people infected under different infection intensities is shown in Figure 8. When β decreased to 30%, the peak number of infections decreased significantly, and when β decreased to 50%, the peak number of infections decreased further. As β went down, the ability of the new coronet to infect went down, so did the peak number of infections. Although it had a small effect on the total number of people infected, it can slow the progression of the epidemic and reduce the pressure on medical care by delaying the peak.

3.4. The Impact of Vaccines and Other Measures on the Outbreak

Figures 9 and 10 show the comparison of 30% vaccine-covered and 30% vaccine-covered and quarantined with no measures of infection. When vaccine coverage reached 30 percent, both the peak daily patient count and the cumulative number of patients declined by 34 percent. When the vaccine was covered by 30% and the isolation measures were taken, the peak daily cumulative number of patients and the total cumulative number of patients decreased further, by 70%. Vaccine coverage and isolation control were proven effective.

4. Discussion

Infectious diseases have always been one of the common and dangerous factors threatening human life and health. Because of their tendency to spread on a large scale, they lead to not only the demise of individuals but also the demise of species, nations, and even civilizations. Civilizations have been wiped out by infectious diseases throughout human history. Early Spanish explorers to Latin America, for example, discovered that the Mayas and Incas who had lived there for generations were wiped out by smallpox [6]. In addition to that, there have been a number of similar epidemics in human history, such as the plague in the heartland of Mongolia in the east and the Black Death in the west. These have caused great disasters to human society. There were many similar cases. In ancient China, there were 261 plague cases recorded, and some scholars even found records of plague in oracle bones. To sum up, infectious diseases have a huge impact on human society [7]. Human beings have never stopped fighting against infectious diseases. As early as the pre-Qin period, China cut off the source of infection through isolation and other means. Modern western scholars performed smallpox virus research, and the smallpox virus has been eliminated. Another example is the outbreak of plague in Northeast China during the period of the Republic of China. Liande Wu, a medical doctor, was ordered to stop a deadly infectious disease [8].

With the continuous development of modern science and technology and medical treatment, the medical level has improved a lot. Human research on infectious diseases is deepening, but bacteria and viruses are also constantly mutating and evolving. All kinds of new pathogens emerge in an endless stream. For example, there was the outbreak of hepatitis C in China in 1989 and the middle east respiratory syndrome (MERS), which was prevalent in a small area in the Middle East a few years ago, and SARS which was prevalent in a large area in the world in 2003. In recent years, as the range of human activities continues to expand, the boundary between human beings and nature is getting lower and lower, which leads to the increasing probability of human being being infected with infectious diseases [9]. For example, the H1NI virus which emerged in 2009 originally appeared in birds. After continuous mutation, it eventually became parasitic on people. It took the lives of tens of thousands of people in the United States and caused a huge burden to the American society. There are more than 3,000 known viruses, and this is just the tip of the iceberg. Human beings have a long way to go in the prevention and treatment of infectious diseases [10].

Using models to study infection began as early as the 18th century. The concept of establishing a model to solve the spread of infectious diseases was first proposed by Bernoulli when he studied the smallpox virus. By the middle of the 20th century, scientists began systematic research on it. In 1926, Kermack and Mckendrick proposed the classic susceptible-infected-removed (SIR) warehouse model [11]. Various subsequent models were proposed based on that. Later, as the research on infectious disease models continues to deepen, scientists have further subdivided and characterized different infectious diseases, such as SIR and SIES models. In recent years, infectious disease models have developed rapidly with the development of computing power and big data. Many scientists modeled various infectious diseases [12]. For example, some scientists established an SIR model with H1N1 as the research object and conducted a simulation study on it [13]. There were many similar examples. A large amount of research data showed that the establishment of infectious disease research models can effectively predict the development trend of infectious diseases, which was extremely important for the treatment and control of infectious diseases. The establishment of infectious disease models has occupied an irreplaceable and important position in modern infectious disease research. Therefore, the SIR model and SIR stochastic model based on deep learning were established in this work to explore the development law of the COVID-19.

COVID-19 is one of the current coronaviruses that can infect humans. On December 1, 2019, the first suspected case of COVID-19 was admitted to Jinyintan Hospital in Wuhan. After that, major hospitals in Wuhan received similar unidentified pneumonia patients one after another. The Wuhan Municipal Health Commission started an epidemiological investigation on December 29. On January 8, 2020, experts from the National Health Commission of China announced that the pathogen was a novel coronavirus. According to the report of the Wuhan Health Commission on January 16, 41 new patients were reported in Wuhan, and 19 new cases were reported on January 19. Zhong Nanshan, head of the national expert team, said on January 20 that the disease was “human-to-human infectious” and that 217 new cases had been reported in Wuhan that day [14]. The first cases were reported in Tianjin, Jiangxi, Zhejiang, and Henan provinces on January 21, marking the start of a full-scale outbreak of COVID-19 in China. As of March 1, the total number of confirmed cases in China has reached 80,000. Meanwhile, other countries have also reported the emergence of novel coronavirus infection. At present, the epidemic in China has been basically brought under control through continuous efforts. However, the epidemic continues to spread in other countries and the international situation is still grim. Against the background of global economic integration, the prevention and control of the epidemic must not be slackened. Currently, research on the COVID-19 model is mostly focused on the whole region. There have been very few studies on hospitals. However, as the main battlefield of antiepidemic, it is very necessary to study the law of epidemic transmission and its control transmission. Specifically, health care workers are more likely to come into contact with patients and get sick. When health care workers get sick, it not only is a major blow to the health care system but also increases the risk to the general population this is extremely detrimental to the prevention and control of the epidemic [15].

Therefore, a retrospective analysis of the occurrence of COVID-19 in hospital was performed by using the SIR model based on deep learning and the SIR stochastic model. Based on the SIR model, the COVID-19 epidemic situation in Wuhan was studied, and the research time was from January 23, 2020, to March 31, 2020. The law of the spread of the epidemic was discovered through daily epidemic information and restoring of its development process. Finally, some valuable information was obtained through the model, which had positive significance for potential prevention and control work in the future. The determined SIR model and stochastic SIR model were taken as the core, and then the Wuhan area was modeled. First, S0 was used as the parameter to be estimated, and its range was determined by MATLAB to find a better fitting effect. Then, the obtained o value was used to find β and Y suitable for the Wuhan area. In the stochastic SIR model, the continuous-time Markov Chain was used to fit S0, B, and y again. The residual square SSE chart of the daily number of infected persons was plotted through the computer running 5,000 orbits, and the extreme points of the infection intensity B and the recovery intensity were found, which were compared with the determination of the SIR equation, and the error was within a reasonable range. Then, a simulation of 10,000 orbits was implemented to draw a simulation diagram of the three groups of people, which showed that the determined SIR model was the mean process of the stochastic SIR model without considering the covariance. Finally, the different results of changing the intensity of infection and the intensity of removal on the development of the epidemic were discussed. It was found that quarantine, vaccine, and other measures had an impact on the development of the epidemic. The intensity of infection was a key factor affecting the outbreak. It was also found that the SIR model and stochastic model based on deep learning had an ideal prediction effect on the development trend of the epidemic.

5. Conclusion

The deep learning SIR model and stochastic SIR model were used to retrospectively study the occurrence of COVID-19 in hospital. It was found that the above two models were accurate in predicting the development trend of the epidemic and had a high prospect in hospital epidemic control. In addition, vaccine, isolation, and infection intensity had a great impact on the development of the epidemic, and the epidemic can be controlled from these three aspects when similar situations occur in the future. However, due to the limited sample and space, the study on this issue is not comprehensive and in-depth enough. In future study and work, it will expand the sample for further study.

This work was developed based on the determined SIR model and stochastic SIR model. Although some effects were achieved in predictive analysis, there are many shortcomings. First, the variability of B and y is not fully considered, which are set as a constant. From the beginning to the end of the epidemic, B and y may change due to various reasons such as the government’s control and the update of medical resources, so the patient’s ability to get infected should go down, and the level of recovery should go up as various drugs are tested, In the future, we can consider its time-varying function to conform to objective facts. Secondly, the description index of the model is too single. For the most critical infection intensity and recovery intensity, population mobility, medical resource level, and aging rate in each region are different, which are all important parameters affecting the accuracy of the model. In the future, it can be considered as a breakthrough to continuously optimize model equations and parameters to achieve more accurate results.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

Authors’ Contributions

Ting Liu and Yanling Bai contributed equally to this work.