The invention discloses a method and a 
system for monitoring safety of an oil and 
gas pipeline based on unmanned aerial vehicle line patrol and a 
software storage device. The method comprises the steps of S1, acquiring multi-
source data generated by 
safety monitoring of the oil and 
gas pipeline with an unmanned aerial vehicle; S2, carrying out 
risk identification on a mono-temporal image accordingto a characteristic 
library obtained by historical risk characteristic training, carrying out the 
risk identification on a multi-temporal image by use of a saturation-based 
change detection method toidentify change regions between different time phases, calculating and combining mono-temporal and multi-temporal 
risk identification results; S3, reappearing an inspection process of the unmanned aerial vehicle for the oil and 
gas pipeline in a three-dimensional platform; S4, carrying out 
route planning of the unmanned aerial 
vehicle inspection and analysis of a water-flooded space of the pipeline; and S5, outputting a pipeline hidden danger report which includes a risk identification report and a 
spatial analysis report, and making a decision according to the pipeline hidden danger report.According to the method and the 
system for monitoring the safety of the oil and gas pipeline based on unmanned aerial vehicle line patrol and the 
software storage device, the safety management cost ofthe oil and gas pipeline is effectively reduced, the 
safety monitoring efficiency is improved and the operation and 
maintenance management level of a 
pipe network is enhanced.