The Prediction of New Medical Resources in China during COVID-19 Epidemic Period Based on Artificial Neural Network Model Optimized by Genetic Algorithm

In this paper, a neural network model is constructed to predict the number of new infections, and on the basis of this model, the demand for medical resources of new infections is further predicted. Firstly, the traditional Back Propagation neural network is optimized by genetic algorithm, which solves the problem that Back Propagation neural network is easy to fall into the local optimal solution in the prediction. Taking the number of severe patients, the number of cured patients, the number of deaths, and the number of suspected patients on the first day of the new crown period as the input variables, and the number of newly diagnosed patients on the second day as the output variable, a new Back Propagation neural network is constructed Novel coronavirus pneumonia model is constructed. Secondly, according to the official documents on the new crown pneumonia research and the guide for the use of medical resources, the linear function of the infection proportion and the normal distribution function of each symptom duration are constructed. Finally, combined with the above two contents, a complete process is designed to achieve the medical treatment for the newly infected patients. Prediction of the demand for medical resources.


Introduction
COVID-19 has a huge impact on the whole world. There are two key issues throughout the epidemic, what is the trend of the number of patients and whether the medical resources are sufficient. In view of these problems, many experts give their own opinions. Artificial Neural Network (ANN) models have become more and more popular in the field of prediction in recent years. Yan et al. used Artificial Neural Network to predict the recovery of traffic flow, bus flow and truck flow during the epidemic, providing a way for railway departments to monitor traffic flow when responding to the national policy of resuming work and production [1] .Ye et al. took various factors affecting adolescent COVID-19 coping ability as input variables and established BP Neural Network to predict and analyze comprehensive coping ability [2] .In the process of fighting against the epidemic, the prediction of medical resources can provide a powerful reference for the government in resource dispatching. Xu et al. took the human resource scheduling of large 3Agrade hospitals during the epidemic as the main research object to provide references for the human resource scheduling of hospitals [3] . Huang  (temperature and humidity) as well as the implementation of control measures, to establish the global prediction system [19] . Jin pointed out that many existing forecasting models lacked a reliable model basis and were ineffective, so he built a new mathematical model to analyse the scale of the epidemic [20] . Liang et al. used the deep learning method to predict the probability of patients being critically ill within 5 days, 10 days and 30 days respectively, so as to conduct early triage for patients reasonably.With AILab technology as the core, this paper determines 10 patient characteristic indicators through machine learning selection variable algorithm. This model can predict the risk of COVID-19 progressing to critical illness based on the clinical characteristics of COVID-19 patients on admission [21] .Wang et al. used the exponential smoothing model to predict the COVID-19 epidemic in Hubei Province [22] , but the long-term prediction effect of the exponential smoothing method was poor, so we needed more advanced prediction models.

Data on COVID-19 Patients
The data of the patients in this study were obtained from the website AkShare's Online Documentation, whose website is https://www.akshare.xyz/zh_CN/latest/. The site is a Python-based financial data interface, where data can be crawled directly by Python. In order to better cover the entire epidemic period, relevant data from January 20, 2020 to June 23, 2020 were selected. As for the data for July 2020 and beyond, due to the fact that the data of each variable is relatively small compared with the previous data and the epidemic situation is basically under control, so it is not selected. These data mainly include variables such as "confirmed ", "death ", "cured ", "input", "severe" and "suspect ". Since the activation function adopted in this paper is an S-type function, the function will be relatively gentle when the input value is large. In this paper, the values of "dead", "heal", "severe", and "suspect" the previous day are used to predict the value of "confirm" the next day. The specific data is shown below: In addition, as the input value is small compared with other variables, this value is deleted in the analysis. Finally, the four input variables identified in this paper are: severe number, cured number, deaths number, suspected number. The output variable is newly diagnosed number.

Proportion of COVID-19 patients.
According to relevant information, the overall proportion of each symptom in China can be determined as follows: mild patients: 22.8%, ordinary patients: 57.4%, severe patients: 13.8%, critical patients: 4.7% [5] . The relevant data of France during the epidemic are as follows: mild patients: 30%, ordinary patients: 56%, severe patients: 9.4%, critical patients: 4% [6] .We can see the difference is small, it can be considered that the proportions of symptoms in the two countries are similar, they are likely to satisfy the same epidemic dynamics model.

The hospitalization time.
According to the joint report of China and the World Health Organization, the median time from onset to clinical recovery is about 2 weeks for mild cases and about 3-6 weeks for severe or critical cases, the time from onset to severe symptoms such as hypoxia was 1 week. Among the patients who died, the time range from onset to death was 2-8 weeks.

Data on Medical Resources
At present, China adopts the following measures to treat patients with different symptoms: Medical care shift system (4 shifts) for all patients, working hours (6h/d). For mild patients: 125:1 for doctors and 20:1 for nurses. For Ordinary patients: 10:1 for doctors, 3:1 for nurses and 10:1 for care workers. For severe patients: 5:1 for doctors, 3:1 for nurses and 5:1 for care workers. For critical patients: 1:1 for doctors, 3:1 for nurses, 2:1 for care workers,1:1 for ventilators. The following materials are also required: protective clothing, isolation gown (change per day), N95 medical masks (change per day), medical protective masks (change per four hours), goggles, boot/leg covers (change per day), shoe covers (change per day), gloves (change per day), and isolation caps.

Study on Prediction Model of the Number of Infections
Studies on the trend of COVID-19 infection can be divided into two categories, based on statistical methods or based on dynamic methods. In the study based on statistical methods Jin by establishing a mathematical model for China epidemic development of 30 provincial-level administrative region prediction, quantitative analysis on the scale of the outbreak, which indicates that the confirmed date in 30 provinces growth probability around February 19 tend to zero [16] .The only variable based on this method is the number of confirmed cases and the influence of other factors is ignored. Yang et al. obtained the specific number of infected people in Wuhan based on the analysis of the confirmed rate of COVID-19 in 50 cities in China [18] . In the study based on the dynamics method, Mei et al. proposed an IR prediction model based on the SIR model and the Extreme Learning Machine to predict the number of infected people, confirmed people and cured people during the epidemic in real time [17] .In this paper, the Artificial Neural Network is used to predict the number of infections.

Algorithm Design
3.1.1. The Meaning of optimization. The traditional BP Neural Network uses the "gradient descent" in the solution process, but the gradient descent is easy to fall into the local optimal solution in the solution process. This may result in the following two situations for the obtained weight value: 1) Fall into local optimum 2) As the number of times increases, the gradient will become smaller and smaller, resulting in worse and worse effect for weight updating. Genetic Algorithm can help us to find the global optimal solution. If the iterative process of Neural Network can be improved and the search scope can be rapidly reduced, the domain of optimal solution can be found in a great possibility. Therefore, this paper will use Genetic Algorithm to optimize the construction process of Artificial Neural Network, in order to effectively improve the prediction effect of artificial neural network, and at the same time effectively improve the operation speed.

The process of optimization.
The optimization of neural network method has a lot of kinds, such as optimize the topology structure or parameters, this paper is to use genetic algorithm to optimize parameters of neural network, make the parameter falls in the domain of the optimal solution as soon as possible, avoid the local optimal solution, if the optimal solution can't meet the requirements, then using traditional BP Neural Network model based on the values of parameters to simulate again. Mathematical model: For the i-th neuron, x1, X2, XJ are the inputs of neurons, and the inputs are usually the independent variables that have a key impact on the system model, W1, W2 WJ is the connection weight to adjust the weight ratio of each input. There are many ways to input signals to neurons. In this paper, we use S-type activation function. Finally, through this neuron, the output results are as follows: net = x1w1 + x2w2 +……+ xjwj yk = f(net) = Compared with the traditional BP neural network, this paper uses genetic algorithm to optimize its parameters in the iterative process, which needs to calculate the loss value and fitness value. Then, the roulette method is used to iterate its parameters. The corresponding values are as follows:  (1) respectively. When determining the intermediate variables, this paper refers to the following formula: Number of middle layer neurons = number of input layers * 2 + 1 = 9.Therefore, the number of neurons in the middle layer in this paper is 9, and the s-type activation function is selected as the activation function. At the same time, a dictionary is defined to set the initial parameters of the neuron topology structure.
This function is a single neuron transmission function created to simulate the process of neuron transmission from one layer to another. The purpose is to make the conduction process of our neural network composed of many such processes and can adapt to a variety of neural network structures.
The function can integrate the previous functions to realize the numerical transfer in neural network.

Genetic function.
This is a function to generate the initial population, but the generated initial population is the parameter value we need in this neural network, namely the values of "w1", "W2", "B1" and "B2".
First, the loss function is defined. The activation function of neural network is used in the calculation. For a single sample, the specific calculation process is as follows: Loss = * * w2 -y Due to the large number of samples, it is a multi-dimensional vector. According to the above function, the result is a column of vectors, and the mean value of the vector is taken as the loss value.
This function is used to calculate fitness, but different from the common genetic algorithm, the measurement of fitness here comes from the previous loss function. The greater the loss is, the worse This function is used to realize the process of natural selection and complete the process of crossover and mutation needed in the genetic process. The crossover probability is set as 0.5 in this paper, and the mutation probability as 0.1.
This function is used to complete the parameter iteration process required in this article. The epochs is the number of cycles, which is set to 1000 in this article.

Analysis of prediction results.
In this paper, the called data is divided into training set and test set, among which training set accounts for 70% of the total data set and corresponding test set accounts for 30%. In this paper, a total of 154 samples are obtained, corresponding to 108 training samples and 46 test samples. The selection process is randomly selected from the data set.

New Medical Resource Demand Prediction Based on Prediction Model
The prediction of medical resources in this paper aims to predict how much more medical resources will be needed by newly infected people. This paper first determined the proportion of patients with various symptoms, then determined the length of stay of patients with various symptoms based on the existing data, and finally calculated the number of new patients who would increase the demand for medical resources according to the existing treatment measures for patients with different symptoms.

Ratio of Symptoms
A simple analysis can be made of the proportion of COVID-19 patients with different symptoms in China and France, as shown in the graph of the transformation of symptoms in France:

Figure 1. Number of COVID-19 infections and change in proportion in France
According to the data from France, 30% of the infected people have mild symptoms, 80% of these symptoms will recover by themselves and do not need treatment, but 14% need to be sent to the hospital for oxygen delivery treatment, and 6% need to be sent to the ICU for emergency treatment [6] .The relationship between COVID-19 infection rates in China is shown in the figure below [5]  types. These symptoms are not isolated from each other, but more likely to be manifested as mild symptoms at first, possibly recovering, and then common symptoms, recovery or further deterioration. Based on the above data, in order to better simulate the proportion of the above symptoms and the conversion relationship, the following process was carried out in this paper: 1) Determine the proportion of infected patients presenting with mild symptoms. Based on 22.8% of China, assuming that it satisfies a linear distribution, the confidence interval of 90% is [11.4%, 34.2%] 2) Some people with mild symptoms heal on their own, while others get worse. The proportion of the conversion is generated by the proportion of mildly symptomatic infections determined based on 1) and a random number generator. The ratio of cure and the ratio of further deterioration (1-cure ratio) were finally calculated.
3) Circulation 2), finally the infection ratio of severe patients and critically ill patients was obtained In the whole operation process, the following three conditions should be followed: 1) There is a 90% chance that the generated data will fall within this range 2) Its value is randomly generated by a random number generator between (0,1) when determining further worsening symptoms 3) All disease rates follow a linear distribution

The Hospitalization Time
In this paper, it is assumed that the hospitalization time follows a normal distribution, so a normal distribution function can be fitted according to the limit range of clinical time of each symptom. The hospitalization time of each person can be generated according to this normal function. In this paper, patients with mild symptoms and patients with normal symptoms shared a normal function distribution of hospitalization time, severe and critically ill patients share a normal function distribution. It is defined that the cure time of mild patients and ordinary patients is about 1-3 weeks, and the hospitalization time of severe patients and critically ill patients is about 2-8 weeks. Assuming that they obey the normal distribution, the following is the normal distribution function of the hospitalization time of patients based on 90% confidence level and 95% confidence level.

Calculated Consumption
According to the above steps, this paper has the number of new COVID-19 patients, the proportion of infection with different degrees of symptoms and the ratio of interconversion, the hospitalization time of patients with different symptoms and the consumption of medical resources of infected patients with each symptom. The steps for calculating the consumption of each resource are shown as follows: 1) According to the proportion function of mild patients, the proportion of mild patients was randomly generated, and according to the random number generator, the proportion of ordinary patients, the proportion of severe patients and the proportion of critical patients were determined 2) The number of newly infected persons with each symptom was calculated according to the proportion of each symptom 3) The for loop was used to calculate the hospitalization time of each person according to the normal distribution function of the hospitalization time of each symptom, and according to the hospitalization time, the consumption of resources of each person belonging to each symptom was calculated 4) Summation Finally, the results are as follows: 29~33 Oxygen inhalation equipment 29~33 According to the above forecast, medical resources such as gloves, shoe covers and isolation caps will require more new medical resources because they are disposable, which is much higher than other medical resources. Ventilators and oxygen inhalation equipment will also require less patients due to their small proportion of patients. This suggests that our predictions are in line with reality. Since the resource forecast quantity given in this paper is a range, it is suggested that the decision can be made according to the decision habit of the decision-maker.

Conclusions
In this paper, the traditional BP neural network is optimized by genetic algorithm, so that the neural network can avoid falling into the local optimal solution during prediction. According to the experimental data, the loss value of the prediction results of the improved algorithm declines faster and reaches less than 0.09315, which shows a good simulation effect. When predicting the demand of new patients for medical resources, this paper uses linear function to fit the proportion distribution of patients with various symptoms, and uses normal distribution function to fit the distribution of the hospitalization time of patients with various symptoms, and finally calculates the range value of the total demand of new patients for various medical resources. On the whole, the relative size of these values is consistent with the actual allocation of resources. However, from the point of the whole process, in this paper, based on artificial neural network model to predict resource requirements, is CCME 2020 Journal of Physics: Conference Series 1815 (2021) 012033 IOP Publishing doi:10.1088/1742-6596/1815/1/012033 8 based on "people infected with the supply of medical resources in the first place", under this assumption, however, in the whole course of the disease resistant medical resources assigned to uninfected also is the key step in the outbreak, should be in the same important position.