In order to predict gas explosion disasters rapidly and accurately, this study utilizes real-time data collected from the intelligent mining system, including mine safety monitoring, personnel positioning, and video surveillance. Firstly, the coal mine disaster system is decomposed into sub-systems of disaster-causing factors, disaster-prone environments, and vulnerable bodies, establishing an early warning index system for gas explosion disasters. Then, a training set is randomly selected from known coal mine samples, and the training sample set is processed and analyzed using Matlab software. Subsequently, a training model based on the random forest classification algorithm is constructed, and the model is optimized using two parameters, Mtry and Ntree. Finally, the constructed random forest-based gas explosion early warning model is compared with a classification model based on the support vector machine (SVM) algorithm. Specific coal mine case studies are conducted to verify the applicability of the optimized random forest algorithm. The experimental results demonstrate that: The optimized random forest model has achieved 100% accuracy in predicting gas explosion disaster of coal mines, while the accuracy of SVM model is only 75%. The optimized model also shows lower model error and relative error, which proves its high performance in early warning of coal mine gas explosion. This study innovatively combines intelligent mining system with multidimensional data analysis, which provides a new method for coal mine safety management.