摘要
Oil and gas pipelines are crucial infrastructures in the oil and gas industry, responsible for transporting resources and connecting supply and demand. However, the complex operational environment, influenced by external and internal factors, leads to varying degrees of damage or structural failures as service time increases. If these defects are not identified and repaired promptly, they can result in serious safety incidents, endangering lives and property. To address the problems of uneven recognition accuracy and insufficient generalization ability of traditional oil and gas pipeline defect recognition and classification methods under different working conditions, the paper utilizes convolutional neural network (CNN) to extract spatial features from the ultrasonic echo sequences, which are then cascaded to long short-term memory (LSTM) network to mine the temporal features hidden within the ultrasonic echo sequences. Next, by employing a multi-head self-attention mechanism to dynamically adjust weights based on feature importance, the accuracy of defect identification and classification is improved. Validation using actual ultrasonic echo data from pipeline defects shows that the accuracy rates for identifying and classifying signals with no defects, as well as with defects at depths of 2, 5, and 8 mm, are 94, 89, 100, and 100%, respectively. The corresponding precision, recall, and F1-score all exceed 90%, significantly outperforming traditional methods. Furthermore, under the multi-condition noise resistance and generalization validation, the model consistently maintains an accuracy rate of over 90%, demonstrating robust noise resistance and strong generalization capabilities.