Abstract:
To solve 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 a knowledge graph and a large language model was proposed. The ontology of the knowledge graph covering 30 types of drilling anomalies and risks was constructed via a simplified seven-step method. A large model extraction strategy integrating chain-of-thought and self-supervised enhancement was adopted to realize the automatic extraction of entities such as drilling anomalies, anomaly characteristics, inspection parameters, and solutions, and Neo4j was used for graph storage and visualization. An intelligent monitoring and question-answering framework of “entity recognition, semantic retrieval, multi-hop query, and large model response” was constructed, and an automated evaluation index system was designed to evaluate the performance of the method. The results indicate that the proposed large language 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 and pure large language model question answering in question-answering accuracy, comprehensiveness, and knowledge consistency, effectively suppressing model hallucinations. Field case verifications, including overflow, stuck pipe, and drill string leakage, show that this method can accurately identify drilling anomalies and provide treatment measures highly consistent with on-site practice. Under a simulated wellsite hardware environment, the analysis of a single anomaly takes 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 highly reliable technical solution for the intelligent monitoring and risk prevention of drilling anomalies under complex working conditions.