## 7 Discussion  
In this paper, when discussing the optimization of coal mine equipment safety inputs, an optimization framework based on digital twin technology is proposed to address the limitations of the traditional input approach due to the influence of subjective judgment and the lack of diversified solutions. The framework achieves the optimization of safety investment solutions through the joint drive of data and models, and deeply analyzes the optimization process of equipment safety input from different perspectives. In this specific case study, the optimization solution is taken as an example of the enterprise's coal mine equipment safety investment in January 2024, as shown in Figure 15.  
The results show that the optimized scenario significantly reduces 19.4% in terms of accident losses, and this optimization is significant compared to the historical safety investment scenarios of the company, which proves the effectiveness of the optimization model. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Method** & **Time** & **Total Investment** & \(\mathbf{X_{1}}\) & \(\mathbf{X_{2}}\) & \(\mathbf{X_{3}}\) & \(\mathbf{X_{4}}\) & \(\mathbf{X_{5}}\) & \(\mathbf{Y}\) \\ \hline \multirow{3}{*}{Traditional method} & January 2024 & 1639 & 356 & 218 & 567 & 394 & 104 & 49 \\  & February 2024 & 1723 & 467.17 & 338.32 & 297.20 & 531.72 & 88.58 & 40.18 \\ \multirow{3}{*}{Digital twin} & January 2024 & 1846 & 356 & 425 & 567 & 394 & 104 & 37.14 \\  & February 2024 & 1516 & 318.36 & 288.04 & 257.72 & 394.16 & 75.8 & 41.58 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Coal mine S enterprise equipment safety investment program (in ten thousand CNY). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Item** & **Traditional Method** & **Digital Twins** & **Difference** \\ \hline Accident loss & 89.18 & 78.72 & 10.46 \\ Total investment & 3362 & 3362 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Plan comparison. Further, this paper explores the optimization process of equipment safety investment under different scenarios using the digital twin technique, respectively. During January and February 2024, although the total investment of the enterprise remains constant, the scenario guided by the digital twin technique realizes a reduction of CNY 104,600 in terms of accidental losses compared to the traditional approach, which corresponds to a reduction of 11.73% in accidental losses. To further address the issue of quantifying the economic benefits of total investment, this paper proposes, from a predictive perspective, the idea of forecasting accident losses following the implementation of safety investment plans. Considering the characteristics of coal mine equipment safety investments, this study selects the BP neural network as the predictive model and compares it with other forecasting methods, as illustrated in Figure 16. The results show that the BP model performs well on both the training and testing datasets, with an R\({}^{2}\) value close to 1 for the training set, indicating that the model fits the training data well. Meanwhile, the high R\({}^{2}\) value for the testing set demonstrates the model's strong generalization capability, effectively predicting unseen data. In addition, in order to further improve the prediction performance, the improved particle swarm optimization (IPSO) algorithm is used in this paper to optimize the BP model and compared with the traditional BP and PSO-BP models as shown in Figure 17. The experimental results show that the IPSO-BP model performs the best, with its high R2 values on both training and test sets, especially on the test set, where its performance is  
Figure 16: Comparison of different prediction methods. Figure 15: Comparison between traditional and optimized solutions. almost perfect. This indicates that the model is extremely capable of capturing data features and making predictions.