At present, the key factors affecting the safety of oil and gas fields and oil pipelines are that the total number of drilling and oil theft cases is still very large, major drilling and oil theft cases have occurred, and the economic losses have also become significant. Local refining enterprises have been repeatedly hit hard. The illegal planning problems of some small refineries in some places are still very prominent, and the problems of occupying oil wells and illegally extracting oil in a few places are also important. In addition, while pipelines connect oil and gas resources and the market, the contradictions between economic construction and urban and rural development are also increasingly prominent, and the criminal pressure above the pipelines and the hazards caused by third-party construction to the pipelines are also increasing. In addition, the impact of pipeline construction and operation on the surrounding environment cannot be ignored.