To better prevent the occurrence of hidden dangers of coal mine accidents and ensure the safety production of coal mine enterprises. This paper mines and analyses the pattern of historical monthly hidden danger quantity in the coal mine and constructs three models: the traditional backpropagation (BP) neural network model, the BP neural network based on the adaptive moment estimation optimization algorithm (Adam-BP) model, and the BP neural network prediction model with the introduction of monthly moderators (Month-Adam-BP). The experimental results show that the Adam-BP model can improve the prediction accuracy, in which the mean absolute percentage error (MAPE) improves by 8.93%, the root mean square error (RMSE) improves by 8.15%, the postdifference ratio C improves by 0.04, and the small error probability P improves by 0.12; the Month-Adam-BP model with the introduction of the monthly adjustment factor further improves the prediction accuracy, in which MAPE improves by 2.61%, RMSE improves by 5.41%, the postdifference ratio C improves by 0.06, and the small error probability P improves by 0.03. And the Month-Adam-BP model prediction accuracy reaches the level 2 standard with credible prediction effect; it can also be used to predict coal mines with periodic characteristics of hidden hazard data. Our prediction results show that the predicted number of hidden hazards in this coal mine for the next month is 29, which is an increase compared to the number of hidden dangers in the previous month. Thus, the coal mine safety managers need to strengthen the management of hidden hazards further to prevent accidents, which can better serve the standardization of coal mine safety production and ensure the smooth production of the coal mine.

1. 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 affected 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. Therefore, 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. This 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.

The rest of this paper is as follows. The second part reviews the current literature and presents the innovation points. The third part presents the methodological model. The fourth part presents the data sources and the accuracy test criteria. The fifth part analyzes the experimental results. The sixth part summarizes the article as well as the outlook.

2. 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 scientific 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 significance 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 classified 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 fitting and short-term prediction, among which neural network models have high prediction accuracy and are widely used in coal mine safety.

This paper provides a detailed review of the two major categories and five specific 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 five 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 five models mentioned earlier, although all these models can be applied to the field 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.

The research subject of this paper is the number of hidden dangers in a coal mine. The prediction of this data set includes the following three characteristics: (1) The 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) The 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) The 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.

The BP model and the improved BP model are outlined as follows. With the rapid development of artificial 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 fluctuations. It may fall into minimal values, and it is difficult to choose the appropriate learning rate. Therefore, 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. These 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 different 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]. The 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 field 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.

3. 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.

The 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. The 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. The optimal weights and biases are obtained through cyclic forward and backward propagation training, which is the neural networks’ learning process.

The specific steps of the BP neural network algorithm are as follows:(1)Initialize parameter values.The weights and biases b are randomly initialized to values between -1 and 1. Each node has a bias, representing the weight of the i-th node in layer n-1 to the j-th node in layer n, and bj representing the bias of the j-th neuron in layer n.(2)Forward propagation.The 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:The implicit layer to the output layer is calculated similarly to formula (1), and the actual output value can be found.(3)Backward propagation.The 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. The 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 final simulation results are output.

3.2. 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]. The 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. Therefore, 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 first-order moment estimation and second-order moment estimation of the gradient. The method has a definite range of learning rates for each iteration after bias correction, making the parameters relatively smooth. The calculation formulas are as follows:where are the decay coefficients, and are the first-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.

3.3. Monthly Reconciliation Periodic Model

BP neural network is the fitting 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. The 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 different months after removing the seasonal factors (2)Solving for the monthly reconciliation indices in different months based on the ratio of the predicted to the actual values(3)Solving for the mean value of the reconciliation index for the same month(4)Regulation index normalization

Therefore, 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:

3.4. 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. The flow of forecasting is shown in Figure 2.

4. Data Source and Accuracy Check

4.1. 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 different 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 first 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.

4.2. 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 difference test method. To evaluate the accuracy of the prediction model, the magnitude of the mean absolute percentage error (MAPE) and the root mean square error (RMSE) is used in this paper. In contrast, the commonly used posterior difference test [32] is used to test the prediction model.

The posterior difference test is a method to test the model based on the statistics between the actual value and the predicted value . That is, the residual 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 prediction error based on the absolute value of each sample. The main calculation steps are as follows:(1)Calculate the absolute value of the residual between the actual and predicted values .(2)Compute the variance s1 of the overall actual data.(3)Compute the mean value of the residuals between the actual and predicted values. Then, calculate the variance s2 of the overall data of the residuals.(4)Calculate the postdifference ratio .(5)Solve for the probability of small errors .

Finally, we can obtain two critical data in the posterior difference, namely, the postdifference ratio C and the small error probability . Generally, it is believed that the smaller the post difference ratio C, the better, because the smaller the value of C, the larger the s1 and the smaller the s2. The larger the s1, the larger the variance of the historical data, and the greater the dispersion of the historical data. s2 is smaller, the smaller the variance of the residuals, or the smaller the dispersion of the residuals. The smaller C indicates that the difference 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 is, the better, because the larger indicates that there are more points where the difference between the residuals and the mean of the residuals is less than the given 0.6745s1. Therefore, we can use these two important indicators, C and , to comprehensively evaluate the prediction model’s accuracy, as shown in Table 5.

5. Experiments and Analysis of Results

5.1. Experimental Data Parameter Setting

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

5.2. 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 short-term 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. The fitted plots of the predicted and actual values of different models are shown in Figure 3.

Figure 3 shows that the area difference (shaded part) consisting of predicted and actual values with the time axis varies under different models. We can see that the shaded region in Figure 3(b) has the largest area, and the fluctuation 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. Therefore, it can be judged that the algorithm that introduces the monthly cycle combination model has a better forecasting effect.

To scientifically assess and characterize the accuracy of multiple models, we introduced the mean absolute percentage error (MAPE) to measure the prediction error. As one of the tools widely used to calculate the prediction error, MAPE is counted on the principle that the smaller the value, the higher the accuracy of the model.

Figure 4 shows the prediction results of the three models in the number of coal mine hazards. It can be visually seen that the average accuracy of most data points in the three models is between 80% and 100%; the prediction accuracy of the Month-Adam-BP model is better than the other two models; the MAPE value below 6% proves that the prediction results of this study are convincing. In addition, the optimized combined model has more obvious advantages than the traditional model.

Based on the error values, the MAPE of the BP, Adam-BP, and Month-Adam-BP models are 15.72%, 7.79%, and 5.18%, respectively. This result proves that the optimized combined model has a better accuracy rate in the study of this paper. Therefore, the prediction results are credible. In addition, root mean square error (RMSE) is often used as a predictive metric for machine learning model prediction. Table 6 gives the MAPE and RMSE values. The RMSE shows measurements that are consistent with the values found for MAPE above.

As seen in Table 6, the values of postdifference ratio C and small error probability 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 > , and then, the accuracy level of the model is determined to be Max , which further verifies that the model has credible prediction results.

6. Conclusions

This 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 fluctuations, which may fall into the minimal value, it is difficult to choose the appropriate learning rate. The 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 fit plots, error measures, and posterior difference tests, are selected to analyze the prediction effects of the three models. The results show that the combined model proposed in this paper has very high fitting accuracy, low error rate, and high fitting accuracy. The Adam-BP model can increase the prediction accuracy, in which MAPE increases by 8.93%, RMSE increases by 8.15%, the postdifference 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 postdifference ratio C increased by 0.06, and the small error probability increased by 0.03, and the model prediction accuracy reached level 2, which has credible prediction effect. 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.

The 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 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. The next step is to use other methods and more effective algorithms to improve the accuracy rate.

Data Availability

The authors confirm that the data supporting the findings of this study are available within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


This work was supported by the National Key Research Project of China (No. 2018YFC08080306) and the Fundamental Research Funds for Central Universities (No. 3142018050). The authors wish to thank the anonymous reviewers.