Abstract:
Aiming at the problems of frequent engineering anomalies, poor generalization and insufficient interpretability of traditional data-driven models, as well as the tendency of large language models to produce professional "hallucinations" in deep and unconventional oil and gas drilling, an intelligent monitoring and analysis method for drilling anomalies based on knowledge graph and large language model is proposed. The ontology of knowledge graph covering 30 types of drilling anomalies and risks is constructed by a simplified seven-step method. A large model extraction strategy integrating chain-of-thought and self-supervised enhancement is adopted to realize the automatic extraction of entities such as drilling anomalies, anomaly characteristics, inspection parameters and solutions, and Neo4j is used for graph storage and visualization. An intelligent monitoring and question-answering framework of "entity recognition–semantic retrieval–multi-hop query–large model response" is constructed, and an automatic evaluation index system is designed to verify the method performance. The results show that the proposed large model extraction method achieves a maximum F1-score of 96.9% in four types of entity recognition tasks, significantly outperforming the traditional BERT-BiLSTM-CRF model. The fusion method is superior to pure knowledge graph question answering and pure large language model question answering in accuracy, comprehensiveness and knowledge consistency, effectively suppressing model hallucinations. Field case verification including overflow, stuck pipe and drill string leakage shows that the method can accurately identify drilling anomalies and provide treatment measures highly consistent with on-site practice. In a simulated wellsite hardware environment, the analysis time for a single anomaly is 13.7~22.2 s with a low overall missed alarm rate, and the timeliness and stability meet engineering requirements. The constructed edge-cloud collaborative deployment architecture can adapt to wellsite computing conditions, providing an interpretable and reliable technical solution for intelligent monitoring and risk prevention of drilling anomalies under complex working conditions.