Research on the Prediction Method of Monthly Hidden Danger Quantity in Coal Mine Based on BP Neural Network Periodic Combination Model

,


Introduction
Coal mining is a complex project covering many aspects, and the production environment dynamically changes and gradually becomes complicated during its continuous forward mining process [1,2]. At the same time, the safety production of the coal mine is afected by people, machines, materials, environment, and management, which inevitably generate many safety hazards [3]. In the process of safety hazard management in the coal mine, if the safety hazards are not timely investigated, and management measures are taken, it will inevitably cause accidents, which will seriously endanger the lives and properties of coal mine employees. Terefore, predicting the number of monthly hidden dangers in coal mines can provide theoretical guidance and promote coal mine managers to take preventive measures to detect and manage hidden dangers. Tis can further improve the safety of coal mines and achieve the purpose of preventing and controlling coal mine accidents. To better extract potential information from the historical coal mine hidden danger data and to consider the seasonal characteristics of coal mine safety hazards, this study introduces a monthly regulation index and develops a backpropagation (BP) neural network periodic combination prediction model based on an optimization algorithm.
Te rest of this paper is as follows. Te second part reviews the current literature and presents the innovation points. Te third part presents the methodological model. Te fourth part presents the data sources and the accuracy test criteria. Te ffth part analyzes the experimental results. Te sixth part summarizes the article as well as the outlook.

Literature Review
Coal mine hidden danger prediction refers to using relevant prediction models or studying the future system safety conditions to make predictions and timely implementation of coal mine hidden danger precontrol. It is the basis for scientifc safety decision-making, and the prediction of hidden hazards can help understand the current and even the future development of the system's safety situation in a period that is of great signifcance for accident prevention and containment of major accidents.
Among the various types of predictions of coal mine hazards, the prediction methods used are gray theory models [4], time series models [5], linear regression [6], nonlinear regression [7], and neural networks [8,9]. Depending on the mode of operation, forecasting models are often classifed into two main types [10]: traditional forecasting methods and machine learning-based forecasting methods. First, there is the gray theory prediction model, which predicts systems containing uncertainties, and this method is considered a traditional prediction method. Second, software technology featuring machine learning has apparent advantages in high-accuracy ftting and short-term prediction, among which neural network models have high prediction accuracy and are widely used in coal mine safety.
Tis paper provides a detailed review of the two major categories and fve specifc models mentioned above, summarized in Table 1. From Table 1, the advantages and disadvantages of several commonly used prediction models can be easily understood, and the scope of application of each type of model is also presented. All fve models selected in the following table have been widely used in coal mine forecasting. However, only 2 to 3 studies are shown behind each model due to space constraints.
By combining the characteristics, strengths, and weaknesses of the fve models mentioned earlier, although all these models can be applied to the feld of coal mine forecasting, there are gaps in the forecasting performance of each model. To better grasp the salient predictive characteristics of each model, a comparison table was drawn from three aspects: data characteristics, prediction period length, and variable type. According to Table 2, the prediction performance of each model can be more easily understood.
Te research subject of this paper is the number of hidden dangers in a coal mine. Te prediction of this data set includes the following three characteristics: (1) Te prediction of the number of hidden hazards relies only on historical data, and due to the diversity of input data selection, this data set can belong to both univariate and multivariate prediction. (2) Te coal mine hidden dangers have seasonal characteristics; i.e., this factor needs to be used to further correct the accuracy of the hidden hazards prediction model during the prediction of the number of hidden hazards. (3) Te number of hidden dangers in the coal mine in the last month is the ultimate prediction target, so it is necessary to select a model that has advantages in short-term prediction. It was concluded from the analysis that the BP model and its improved BP model applied to the predictions in this study.
Te BP model and the improved BP model are outlined as follows. With the rapid development of artifcial neural network models, the gradient descent class of algorithms has received extensive attention from academia as the most dominant optimization algorithm in neural network models. Stochastic gradient descent (SGD) is the most basic optimization algorithm in the gradient class of algorithms. Although it can avoid the interference of redundant data, accelerate the convergence speed, and enable online learning, the variance of the updated values is large, and the convergence process will produce fuctuations. It may fall into minimal values, and it is difcult to choose the appropriate learning rate. Terefore, based on the SGD algorithm, which treats the iterative descent process as a physical system, Polyak and Nesterov proposed the momentum gradient method [23] and the NAGW [24] algorithm, respectively. Tese two algorithms will add the previous update vector before updating the gradient to become a momentum so that its velocity accumulates in the same update direction and decreases in a diferent update direction. In addition, based on the SGD algorithm, algorithms that use the previous update information to adaptively adjust the learning rate have been proposed, such as the AdaGrad algorithm [25], the AdaDelta algorithm [26], and the RMSPorp algorithm [27]. Te Adam algorithm [28] precisely applies both momentum and adaptive techniques and combines both advantages, making it one of the most used optimization algorithms in neural network models today.
At present, scholars have extensively discussed various predictions within the feld of coal mining. At the same time, there is the same universality in the application of neural networks, which can be applied to the prediction of the number of hidden dangers in this study. In summary, the innovation points of this study contain two main aspects. First, this study combined the BP neural network optimized by Adam's algorithm with the monthly cycle factor to develop a new high-accuracy combined forecasting technique. Second, the new method in this study is applied in the study of predicting the number of hidden hazards in a coal mine to provide the coal mine safety managers with corresponding auxiliary decisions.

Construction of a Model for Predicting the Number of Hidden Dangers in Coal Mine Monthly
3.1. BP Neural Network. BP neural network is a multilayer feedforward neural network trained according to the error backward propagation algorithm. It consists of three parts: the input layer, the hidden layer (one layer or multilayer structure), and the output layer [29]. Its basic structure is shown in Figure 1.

Mathematical Problems in Engineering
Te algorithm consists of two processes: forward propagation and backward propagation. In the forward propagation process, the input information from the input layer is computed layer by layer and passed to the output layer to obtain the actual output value. If the error between the actual output and desired values does not meet the desired requirement, it is transferred to the backward propagation process. Te reverse propagation process is the process of modifying the network weights and biases layer by layer from the output layer through errors to the input layer and then forward propagation through the updated weights and biases. Te optimal weights and biases are obtained through cyclic forward and backward propagation training, which is the neural networks' learning process.
Te specifc steps of the BP neural network algorithm are as follows: (1) Initialize parameter values.
Te weights ω and biases b are randomly initialized to values between -1 and 1. Each node has a bias, ω (n) ij representing the weight of the i-th node in layer n-1 to the j-th node in layer n, and b j representing the bias of the j-th neuron in layer n.  Grey Use a small amount of incomplete information to establish a gray diferential model; make a vague and longterm description of the development law of things High accuracy: sample does not require regularity and large numbers; suitable for medium and long-term prediction Ignore the internal mechanism of the system; unable to refect system changes dynamically Coal mine gas emission forecast [11] Ground settlement forecast [12] ARIMA  [19] Neural network It abstracts the human brain neural network from the perspective of information processing; it is usually a logical expression of an algorithm Provide self-learning functions and high-speed search optimal solutions; ultimately approach any complex nonlinear relationship; be able to learn and adapt to unknown or uncertain systems Unable to explain the reasoning process and the basis of reasoning; unable to work when the data are insufcient; converting all inference into numerical calculations will lead to the loss of information Risk status prediction of coal mine rock explosion [20] Coal and gas outburst prediction [21] Diagnosis of coal mining equipment [22] Mathematical Problems in Engineering 3 (2) Forward propagation. Te formula for the forward propagation process from the input layer to the hidden layer is as follows: where f (x) is the activation function and is calculated as follows: Te implicit layer to the output layer is calculated similarly to formula (1), and the actual output value can be found. (3) Backward propagation.
Te backward propagation process continuously updates the weights and biases between layers based on the error between the actual output value and the desired output value of the output layer. Te loss function uses the mean square error, given by the following formula: (4) Repeat steps 2 and 3 for continuous update iterations. In the actual situation, the learning training is terminated when the error converges to the target value, or the number of iterations reaches a predetermined value. Otherwise, restart the training. After the training is stopped, the fnal simulation results are output.

BP Neural Network Based on Adam Optimization.
To optimize the loss function in the BP neural network, various algorithms can be utilized, such as gradient descent, elastic gradient descent, conjugate gradient, and the LBFGS method [30]. Te most commonly used optimization algorithm is the gradient descent algorithm [31], which centers on minimizing the objective function and updating the corresponding parameter values for each variable in each iteration according to the opposite direction of the objective function in the gradient of that variable. Although the gradient learning algorithm has achieved outstanding results in neural network learning, there are many problems to be solved. Collectively, Adam's algorithm is a better optimizer in many cases. Terefore, this paper will also use Adam's algorithm [28] as an experimental optimizer instead of the traditional stochastic gradient descent algorithm.
Adam is an adaptive learning rate method that combines inertia retention and environment awareness advantages. It dynamically adjusts the learning rate of each parameter using frst-order moment estimation and second-order moment estimation of the gradient. Te method has a defnite range of learning rates for each iteration after bias correction, making the parameters relatively smooth. Te calculation formulas are as follows: where β 1 , β 2 are the decay coefcients, and m t , v t are the frst-order moment estimate and second-order moment estimate of the gradient, respectively. Formula (5) is Adam's updated formula, which is constantly updated further to adjust the weights and biases in the neural network.

Monthly Reconciliation Periodic
Model. BP neural network is the ftting of data by the curve. In consideration of the seasonal characteristics of the coal mine hidden danger data, the monthly adjustment index is introduced to modify the model. Te basic steps for calculating the monthly adjustment index are as follows: (1) According to the established BP neural network simulation forecasting model, solving the predicted values of diferent months after removing the seasonal factors y(k), k � 1, 2, . . . , 12 (2) Solving for the monthly reconciliation indices in diferent months based on the ratio of the predicted to the actual values P(k) � y(k) y(k) , k � 1, 2 . . . , 12.
(3) Solving for the mean value of the reconciliation index for the same month (4) Regulation index normalization Terefore, we can acquire a combined neural network prediction model by multiplying the formula (8) with the resultant values predicted by the BP neural network, and the formula is as follows:

Monthly Hidden Danger Number Prediction Model.
In this paper, based on the improvement of the BP neural network using Adam's algorithm, we constructed a combined prediction model by combining the monthly regulation periodic index. Te fow of forecasting is shown in Figure 2.

Data Source.
Based on the number of hidden dangers in a coal mine for a total of 36 months from January 2016 to December 2018 as the original data (see Table 3), we adopt the number of hidden dangers in 3 consecutive diferent months as input data and the actual number of hidden dangers in the fourth month as output data which constructs the sample data set of this paper (see Table 4). As shown in Table 4, ID is the serial number of the input sample; input data are the hidden data value of the frst three months of the corresponding sample, and output data are the actual data of the corresponding sample. For example, the input data of the 1st sample are Jan-2016, Feb-2016, and Feb-2016 in order, and the output data are Apr-2016.

Precision Inspection.
To determine if the model's accuracy meets the desired standards, it is common practice to evaluate the model's accuracy after it has been constructed.
In the actual test process, the test methods are generally as follows: the residual size test method, correlation test method, and posterior diference test method. To evaluate the accuracy of the prediction model, the magnitude of the mean absolute percentage error (MAPE) MAPE � 100%/n n i�1 | (y i − y i )/y i | and the root mean square error (RMSE) RMSE � �������������� 1/n n i�1 |y i − y i | 2 is used in this paper. In contrast, the commonly used posterior difference test [32] is used to test the prediction model.
Te posterior diference test is a method to test the model based on the statistics between the actual value y i and the predicted value y i . Tat is, the residual e(i) is used as the basis to calculate the probability of the smaller residual point and the indicator's size related to the variance of the  (1) Calculate the absolute value of the residual between the actual and predicted values e(i) � |y i − y i |. Finally, we can obtain two critical data in the posterior diference, namely, the postdiference ratio C and the small error probability P. Generally, it is believed that the smaller the post diference ratio C, the better, because the smaller the value of C, the larger the s 1 and the smaller the s 2 . Te larger the s 1 , the larger the variance of the historical data, and the greater the dispersion of the historical data. s 2 is smaller, the smaller the variance of the residuals, or the smaller the dispersion of the residuals. Te smaller C indicates that the diference between the predicted and actual values obtained from the model is not too discrete, despite the dispersion of the historical data. And the larger the small error probability indicator P is, the better, because the larger P indicates that there are more points where the diference between the residuals and the mean of the residuals is less than the given 0.6745s 1 . Terefore, we can use these two important indicators, C and P, to comprehensively evaluate the prediction model's accuracy, as shown in Table 5.

Experimental Data Parameter Setting.
We use the constructed sample of the coal mine's historical hidden danger data (Table 4) as the training data. Te learning rate is set to 0.5, and the accuracy is 0.0009. Te number of hidden layers is set to one layer, and the number of neurons contained in the hidden layers is set to 7. Te number of training iterations is set to 1000. Te data are normalized at the time of input.

Analysis of Results.
In this paper, the prediction of monthly hidden danger quantity is performed by the input of rolling historical hidden danger quantity, so the prediction algorithm in this paper is more suitable for the shortterm prediction of monthly hidden danger quantity in the coal mine. To verify the superiority of the Adam-optimized BP neural network periodic combination model (Month-Adam-BP), this paper predicted the monthly hidden danger quantity of coal mine with the traditional BP neural network prediction model (BP), the Adam-optimized BP neural network prediction model (Adam-BP), and the combination model with the introduction of monthly adjustment factor separately. Te ftted plots of the predicted and actual values of diferent models are shown in Figure 3. Figure 3 shows that the area diference (shaded part) consisting of predicted and actual values with the time axis varies under diferent models. We can see that the shaded region in Figure 3(b) has the largest area, and the fuctuation between the predicted and actual values is apparent; on the contrary, the shady part in Figure 3(d) has the smallest area, and the oscillation between the predicted and actual values is smaller. Terefore, it can be judged that the algorithm that introduces the monthly cycle combination model has a better forecasting efect.
As seen in Table 6, the values of postdiference ratio C and small error probability P in the Month-Adam-BP model are 0.32 and 0.94, respectively. By comparing the determination criteria in Table 5, C < 0.35 and 0.95 > P > 0.80, and then, the   accuracy level of the model is determined to be Max 1, 2 { } � 2, which further verifes that the model has credible prediction results.

. Conclusions
Tis paper aims to develop a combined prediction technique based on the BP neural network to accurately predict the number of hidden dangers in a coal mine. To overcome the problems that the convergence process of traditional BP neural network produces fuctuations, which may fall into the minimal value, it is difcult to choose the appropriate learning rate. Te Adam algorithm is used to optimize the BP neural network, and based on the characteristics of the coal mine hidden danger data, the monthly adjustment factor is introduced, and the Month-Adam-BP combined prediction model is proposed.
In this paper, three criteria for quantifying the quality of prediction techniques, such as data ft plots, error measures, and posterior diference tests, are selected to analyze the prediction efects of the three models. Te results show that the combined model proposed in this paper has very high ftting accuracy, low error rate, and high ftting accuracy. Te Adam-BP model can increase the prediction accuracy, in which MAPE increases by 8.93%, RMSE increases by 8.15%, the postdiference ratio C increases by 0.04, and the small error probability P increases by 0.12. And the Month-Adam-BP model can increase the prediction accuracy, in which MAPE increased by 2.61%, RMSE increased by 5.41%, the postdiference ratio C increased by 0.06, and the small error probability P increased by 0.03, and the model prediction accuracy reached level 2, which has credible prediction efect. Based on this, this study concludes that the developed combined model can make reliable predictions of the number of hidden hazards in a coal mine and provides auxiliary decisions for coal mine safety production managers to ensure safe coal mine production further. Also, the research method in this paper can be used in other coal mine's hidden danger quantity prediction projects with periodic data.
Te prediction results using the developed Month-Adam-BP combination model show that the predicted number of hazards in this coal mine for the next month is 29, which is an increase compared to the number of hazards Adam-BP Month-Adam-Bp  in the previous month, and the coal mine safety managers need to prevent accidents by strengthening the management of hazards. Although the algorithm developed in this paper has credible results in the prediction of hidden dangers in this coal mine, there is still much room for improvement in its accuracy rate. Te next step is to use other methods and more efective algorithms to improve the accuracy rate.

Data Availability
Te authors confrm that the data supporting the fndings of this study are available within the article.

Conflicts of Interest
Te authors declare that they have no conficts of interest.