Green synthesis and metal oxide composites have attracted much attention from researchers of industry and academia. As a typical application of green synthesis and metal oxide composites, the continuous change of industrial technology and the continuous improvement of the social and economic level, the demand for oil and gas are also increasing. However, the spatial gap between the place of origin and the place of demand for oil and gas resources is large, so the long-distance oil and gas pipeline came into being. However, under the action of time, coupled with the corrosion effect of the soil due to deep burial, some pipelines have serious aging and corrosion phenomena. Therefore, in order to give corresponding guarantees for economic development, we need to conduct in-depth research and analysis of the corrosion of oil and gas long-distance pipelines and give effective solutions. In this paper, the corrosion rate prediction of buried oil and gas pipelines is studied in Changqing gas field. By improving the inertial weights and learning factors of the traditional particle swarm algorithm, the parameters of the generalized regression neural network are optimized and selected, and the corrosion rate prediction model of buried pipelines is finally constructed. Comparative analysis with other swarm intelligence algorithms shows that the improved particle swarm algorithm has stronger convergence ability and higher prediction accuracy than the BP model and SVM model. In addition, based on the detection data collected at the site of the gathering and transportation pipeline in Changqing gas field, this paper uses the extreme value distribution theory and the local corrosion progress formula to establish a prediction model for the residual life of corrosion of buried pipelines. The model established in this paper can effectively determine the risk pipe segment of buried pipeline and provide a decision-making basis for pipeline management departments. The work provides an important application guidance to green synthesis and metal oxide composites.