基于提示词工程和微调的煤矿瓦斯风险监测预警研究

    Research on coal mine gas risk monitoring and early-warning based on prompt engineering and fine-tuning

    • 摘要: 针对现有煤矿瓦斯风险监测预警模型普遍存在风险识别维度单一、预警可解释性不足及异常工况训练数据稀缺等问题,本文提出一种基于提示词工程和微调的煤矿瓦斯风险监测预警方法。首先,依据《煤矿安全规程》中关于瓦斯浓度、涌出速率等关键指标的阈值标准,设计规则驱动的提示词模板,将正常工况时序数据按规程阈值“异常化”。其次,构建能够综合分析正常时序数据及异常时序数据的提示词模板,该模板能够引导DeepSeek-R1模型生成带推理链的结构化分析结果,此过程将获得高质量监督微调数据集。在此基础上,采用低秩自适应(Low-Rank Adaptation,LoRA)微调技术对DeepSeek-R1-Distill-Qwen-7B模型进行领域微调,构建煤矿瓦斯风险预警模型MineGuard-Qwen。实验结果表明,该模型在测试集上表现优异:警报等级判断F1值为0.944,应急决策生成任务的BLEU值与ROUGE值分别为0.63和0.60,风险类型识别F1值达0.958,各项指标均优于基准模型DeepSeek-R1。此外,经五位煤矿安全专家双盲评估(0~10分),其在决策可操作性、规程合规性和风险识别准确性方面均符合实际应用要求。

       

      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.

       

    /

    返回文章
    返回