Abstract:
Aiming at the common problems of existing coal-mine gas risk monitoring and early-warning models, including single-dimensional risk identification, insufficient early-warning interpretability, and scarce training data for abnormal working conditions, this paper proposes a coal mine gas risk monitoring and early-warning method based on prompt engineering and fine-tuning. Firstly, rule-driven prompt templates are designed according to the threshold criteria of key indicators such as gas concentration and emission rate specified in the
Coal Mine Safety Regulations, and time-series data under normal working conditions are “anomalized” based on regulatory thresholds. Secondly, a prompt template capable of comprehensively analyzing both normal and abnormal time-series data is constructed. The template guides the DeepSeek-R1 model to generate structured analysis results with reasoning chains, through which a high-quality supervised fine-tuning dataset is obtained. On this basis, Low-Rank Adaptation (LoRA) fine-tuning technology is adopted for domain-specific fine-tuning of the DeepSeek-R1-Distill-Qwen-7B model, and a coal-mine gas risk early-warning model named MineGuard-Qwen is established. The experimental results demonstrate that the proposed model achieves outstanding performance on the test set: the
F1-score for alarm level judgment reaches 0.944; the
BLEU value and
ROUGE value for the emergency decision-making generation task are 0.63 and 0.60, respectively; and the
F1-score for risk type identification is 0.958. All metrics outperform the baseline model DeepSeek-R1. Furthermore, double-blind evaluation (0-10 scoring scale) conducted by five coal-mine safety experts shows that the model meets practical application requirements in terms of decision-making operability, regulatory compliance, and risk-identification accuracy.