The safe storage and transportation of oil and natural gas are of great significance to the people’s life,industrial generation and national defense construction.In order to ensure the safety of the oil pipeline,the leakage detection technology is used to detect the oil pipeline,and the detection data in the leakage magnetic field is analyzed to determine whether the pipeline is defective.However,the magnetic flux leakage data may be abnormal or missing due to the influence of the sensor or the environment.Before processing and analyzing the data,in order to ensure the authenticity and usability of the data,it is necessary to eliminate the outliers of the magnetic flux leakage data and reconstruct the missing data generated after the abnormality is removed.The specific research contents are as follows:Firstly,we design a data validation decision algorithm and data correction algorithm.A three-level data sampling algorithm is designed for effectiveness evaluation.Data correction is divided into mileage point correction and baseline correction.In the baseline correction,a two-stage correction method is proposed.Lastly,the algorithms proposed are simulated to evaluate the advantages and disadvantages.Secondly,a data anomaly detection algorithm is designed.In the light of the different features of abnormal data,three different anomaly detection algorithms are designed:anomaly detection algorithm based on local outlier factor LOF,anomaly detection algorithm based on isolated forest and multi-form sliding anomaly detection algorithm.The algorithm is simulated to test the accuracy of anomaly detection.Thirdly,a reconstruction model of missing data based on variational autoencoder(VAE)is proposed.After the abnormal data detection algorithm,there will be a large number of missing in the magnetic flux leakage data set,especially when the missing appears at the defect,it will greatly affect the analysis of the pipeline corrosion degree in the later period.Aiming at this problem,a defect reconstruction model based on VAE is designed,but the model cannot generate the reconstructed data in the absence of specific categories,and the reconstructed data cannot highly match the input missing data.Therefore,additional conditions are introduced to improve the model,and a missing data reconstruction model based on conditional variational autoencoder CVAE is also proposed.Finally,use these two models to simulate and verify the missing defect data,and use the MAPE and RMSE error indicators to evaluate the reconstruction accuracy of the two reconstruction models from multiple perspectives.Through comparative analysis,it is proved that the improved CVAE model is superior to the VAE model in the reconstruction of missing data.Finally,a reconstruction model of missing data based on adversarial conditional variational autoencoder is proposed.According to the analysis of the reconstruction results of CVAE,although the CVAE model can generate samples in a targeted manner,the quality of the generated samples is not high.Finally,on the basis of summarizing the whole thesis,the future research direction is prospected.Considering the strong generation ability of GAN,a fusion model CVAE-GAN based on CVAE and GAN is proposed.This model combines the advantages of CVAE and GAN,avoids their respective disadvantages,and generates high-quality samples steadily.The proposed CVAE-GAN model can not only reconstruct the missing magnetic flux leakage data,but also generate a large amount of real and diverse defect sample data,which solves the problem of low accuracy of the defect detection model due to insufficient samples and lack of diversity of samples,and prepared for the analysis of pipeline corrosion and pipeline life evaluation in the later stage. |