Outpatient volume is an important index in hospital operation and management,which is of great significance to hospital management decision-making and out-patient medical resource allocation.The influencing factors of outpatient volume are complex,and the direction and degree of the effect are difficult to quantify,so it is difficult to predict the outpatient volume by influencing factors.Therefore,this paper will analyze the number of outpatient visits from the perspective of time series,and realize the effective prediction of outpatient visits through the time series prediction modeling.Firstly,an improved Firefly Algorithm(FA)was proposed to optimize Long short-term Memory(LSTM)neural network(LSTM)for the time distribution of outpatient sequence data.In order to optimize the hyperparameter combination of LSTM model,the model takes the hyperparameter of LSTM model as the initial population of FA to conduct iterative optimization.In the process of iteration,the mechanism of increasing population diversity is proposed.By calculating the population diversity of FA,the algorithm is judged to be in local optimal.Secondly,an adaptive diversity increase mechanism was introduced to effectively balance the demand for population diversity during evolution.Finally,adaptive swimming parameters are added at the end of iteration to avoid local oscillation.The improved FA is used to optimize the hyperparameters of THE LSTM model and match the optimal parameter combination for the LSTM model to improve the accuracy of the LSTM model prediction.After the completion of the model construction,the validity of the proposed prediction model was verified,and the improved FA optimized LSTM model was applied to the prediction of outpatient visits for hypertension and cardiopulmonary diseases in four regions of Gansu province,and good prediction results were achieved,which reflected that the algorithm proposed in this paper improved the prediction accuracy of outpatient visits to a certain extent.Secondly,there is a close relationship between heavy metal pollution and diseases,which is reflected in the fluctuation of outpatient visits.In view of the non-time series distribution of heavy metal pollution data,a single factor pollution index calculation method was proposed to evaluate the heavy metal pollution level and assign corresponding weights,which were connected with other time series data into a vector to form a new time series.After the input sequence is complicated,further feature extraction is required to ensure the accuracy of prediction.Therefore,based on the improved FA optimized LSTM model,a prediction model of LSTM outpatient visits based on multi-scale attentional convolution feature extraction layer is proposed.The multi-scale module constructs a three-layer parallel Convolutional CNN network based on Convolutional Neural Networks(CNN),and sets different Convolutional kernels to capture input feature information.At the same time,the attention mechanism module is embedded to achieve the maximum retrieval of feature information.The feature information extracted by the multi-scale attention convolution layer is transmitted to the improved LSTM network through the full connection layer.Thus,the prediction model is completed.Finally will this paper set up the prediction model is compared with other models,the experimental results show that,this article describes the prediction model to a certain extent,improve the prediction accuracy,reflect the heavy metal pollution to a certain extent can cause Men Zhen Liang fluctuation change,it will be for the people reasonable medical treatment and hospital reasonable allocate health resources has certain reference significance. |