Pipeline transportation is the fifth transportation modes besides highway, railway, waterway and aviation. It is widely used because of low operating costs, high transport efficiency, and being used across a variety of regions  . In petrochemical pipeline transportation, because of its geographical distance or other restrictions, most pipeline led underground  . Corrosion is one of the main causes of destruction and failure of buried pipelines, because of the complexity of medium and environment. The inner and outer walls of pipeline are easily corroded, and they can cause a series of irreversible harm  . Therefore, it is very important to protect pipeline away from corrosion. This paper mainly introduced the main detection technology and the protective measures for corrosion of internal and external corrosion.
2. Corrosion of Buried Pipelines
The corrosion types of buried pipelines can be divided into two categories according to their formation and location: internal corrosion and external corrosion  . There were four factors influencing corrosion of buried steel pipeline: Environment, corrosion protection effect, steel pipe material and manufacturing process, stress level  . Jing Liu  analyzed the corrosion of buried pipeline from 4 main types of soil corrosion: soil electrochemical corrosion, chemical corrosion, microbial corrosion and stray current corrosion. In this paper, the corrosion protection of buried steel pipeline was studied from the aspects of internal corrosion and external corrosion.
3. Internal Corrosion
According to the theory of universal internal corrosion, the corrosion of pipeline was caused by the corrosion of the pipeline medium, the main types of internal corrosion included dissolve oxygen corrosion, H2S corrosion, CO2 corrosion, multiphase flow erosion corrosion, sulfate reducing bacteria corrosion and so on  . Desheng Chen  believed that the existence of water was an important reason for pipeline internal corrosion, for the main gas transmit pipeline, it constituted corrosion of original battery due to the existence of water electrolyte, so the pipeline would corrode, the amount of liquid water in pipeline, water flow parameters (gas velocity, wall shear stress, pipe angle, etc.) and other factors determined that whether the particular part of pipeline water logging or not and the corrosion rate. At present, the research on corrosion mechanism of CO2 or H2S is more effective at home and abroad, for the coexistence of two systems, especially under high temperature and high pressure, there is less research for coexistence of two systems, especially under the condition of high temperature and high pressure, the study of H2S and CO2 corrosion in multiphase flow media is few, the study of internal corrosion in the actual operating conditions is also few.
3.1. Internal Corrosion Detection Technology
When internal corrosion occurred, it usually performance full or partial wall thickness thinning of pipeline, pipeline internal corrosion detection technology is mainly for the measurement and analysis of pipe wall changes  . The main methods of pipeline corrosion detection are magnetic flux leakage method, ultrasonic method, eddy current testing method, laser detection method and television measurement method, transient electromagnetic method (TEM), etc. TEM method is transmitting or receiving transient electromagnetic signals above the buried pipeline, and analyzing the transient electromagnetic signal, thus determined residual mean wall thickness. Lijia Wu  detected and simulated corrosion of metal pipe by TEM method. In practical, the most commonly used internal corrosion detection technology are magnetic flux leakage method and ultrasonic method, but there are some limitations, ultrasonic method is limited by the transport medium, it is difficult to be used in the gas pipeline detection, there is a blind spot, which requires a high degree of surface roughness of the pipe wall, and the detection results are affected by the impurities in the pipe. The magnetic flux leakage method is influenced by geometry and shape of pipe, pipe material, wall thickness and pipe diameter.
3.2. Internal Corrosion Protection Measures
The main control measures for internal: adding corrosion inhibitor, inner coating protection and lining anticorrosion technology and composite pipe technology. Xinjun Gu  , etc. selected the best corrosion inhibitor from 20 kinds of corrosion inhibitors, this corrosion inhibitor had obvious corrosion resistance for Xia Yibai pipeline, it could extend service life of pipeline for more than 40 years, with an average reduction of repair costs about $100 thousand. Yinlong Zhang  screened the corrosion inhibitor in oil field and analyzed the composition of corrosion inhibitor, the mechanism and its application were studied. Internal coating technology can effectively solve the problem of pipeline corrosion, epoxy resin powder coating and polyethylene powder coating are usually used in engineering. Lining corrosion prevention is also a good pipeline anti-corrosion technology, nowadays, glass fiber reinforced plastic composite is a good organic lining material, the material has high strength, resistance to acid, alkali, salt, brine corrosion, electrical and thermal insulation as well as good, the anticorrosion performance is better than that of the inner coating. Composite pipe technology mainly have lined glass fiber reinforced plastic and lined composite pipe, bimetal composite pipe and ceramic lined composite pipe. Wenjun Bi  improved enameling process, developed a manufacturing method of enamel composite pipe and tested its corrosion resistance, the results showed that the coating has good corrosion resistance, good coating bonding property and suit for oil and gas medium.
4. External Corrosion
There are 3 types of external corrosion of buried pipelines: Soil corrosion, casing corrosion, erosion corrosion. There are 4 main types of soil corrosion in buried pipeline: Soil electrochemical corrosion, chemical corrosion, microbial corrosion and stray current corrosion  . Soil corrosion means corrosion of materials by different composition and properties of soil, soil corrosion factors mainly have: Soil chemical properties, physical properties, electrochemical properties. Because the large numbers of casing pipes, casing corrosion mechanism is complicated and has shielding effect of conventional cathode protection, casing corrosion can be divided into normal and abnormal corrosion  . Erosion corrosion means fluid erode the pipe when the pipe exposed in the river, the surface of pipe will occur pit or destroyed, pipeline corrosive reaction products will enter into inner pipe  .
4.1. The Main Detection Technology of Pipeline Corrosion
Nowadays, there are 6 main methods for detecting outer covering layer, DC potential gradient method (DCVG), Pearson method, AC current attenuation method, direct current voltage, frequency and frequency selection method, close interval potential method (CIPS)  . DC potential gradient methods (DCVG), Pearson detection method, AC current attenuation method are mainly used to detect the damage of outer cover. DC current voltage method, variable frequency and frequency selection method are mainly used for detection of coating insulation resistance, CIPS evaluate outer covering indirect through detect the protection potential of pipeline. Renyu Guo  used DCVG/CIPS to detect and analyze the external anticorrosive coating’s corrosion condition of Daqing petrochemical raw gas pipeline, the results showed that the corrosion condition of external corrosion protection layer was serious and the cathodic protection effect was poor. Junyun Zhao etc.  used CIPS/DCVG and GPS to locate the coating defect of pipeline which influenced by stray current.
4.2. External Corrosion Protection Measures
For the corrosion protection measures of buried steel pipeline, there are external corrosion protection and catholic protection  . The external corrosion protection layer is covered on the outer wall of the buried pipeline, isolate them from soil, commonly used external anti-corrosion layer are:
1) 3PE: it is suite for various soil environments especially suitable for harsh environment with high mechanical strength requirements.
2) Double layer epoxy powder coating: it is suite for drilling and rock section, but it less applied in large diameter pipeline because of high coasts.
3) Fusion bonded epoxy powder coating: it applied to argillaceous soil and drill cross section which have strong soil stress, it is not applicable to rocks, swamps and high water levels.
4) Petroleum asphalt anticorrosive coating: the method has been phased out, because this method has some disadvantages like high water absorption during use, poor resistance to soil stress, poor resistance to plant roots, limited temperature range, etc.
Cathodic protection is a common corrosion protection measure for buried steel pipeline, it can divide to sacrificial anode method and impressed current method.
1) Sacrificial anode method: Cathodic protection technology is a kind of electrochemical protection technology, its principle is apply external current to the surface of the corroded metal structure, the protected structure become cathode, thus, the electron migration of metal corrosion is inhibited, it can avoid or reduce the occurrence of corrosion. Commonly used anode materials are magnesium alloy, aluminum alloy, zinc alloy, etc.
2) Impressed current method: Impressed current method is one of the methods of electrochemical protection, this method supply an external DC power and an auxiliary anode, forcing electrons from the soil to the protected metal, made the protected metal structure lower than surrounding environment. Graphite electrode is often used as auxiliary anode in practical application.
Drained current protection is making stray current back to distribution network which produce leakage current, in order to eliminate stray current corrosion of pipeline. When the current is constant, the method used tributary to drain. When the current is altering, the method used polarity to drain. When the current is complicate, the method forces to drain. Junyun Zhao  used drain current protection and cathodic protection to restrain stray current, in order to achieve effective cathodic protection.
For the influence factors of pipeline corrosion and corrosion principle, pipeline corrosion prevention design is usually able to effectively prevent the corrosion of the pipeline. Although the buried pipeline corrosion treatment technology has been more mature, it still needs to continue to practice research, so as to ensure the safe operation of the pipeline.
 Li, C.Y., Feng, X.Y., Li, B.Q., et al. (2016) Causes of Failure of Crude Oil Gathering Pipelines in Qinghai Oil Field and Countermeasures. Corrosion & Protection in petrochemical industry, No. 4, 52-54.
 Chen, D.S., Long, Y.Y., Wang, S.P., et al. (2012) DCVG+CIPS Technology in the Purification of Oil Pipe Used in the Detection of Long Distance Pipeline. Oil & Gas Storage and Transportation, No. 8, 615-616+647.
 Zhao, J.Y., Teng, Y.P., Zhang, F., et al. (2011) Practice of Pipeline CIPS/DCVG Combination Detection under Stray Current Interference. Petroleum Engineering Construction, No. 7, 523-527+471-472.