The application provides a city lifeline pipeline
corrosion risk early warning method based on digital twinning, which comprises the following steps: S1, obtaining pipeline internal operation parameters, pipeline external environmental parameters and external
corrosion rate data according to a monitoring
control system and detection equipment; S2, constructing an internal
corrosion rate prediction model based on digital-physical fusion and a physically guided neural network; S3, constructing an external corrosion rate prediction model based on a
particle swarm optimization algorithm and a
relevance vector machine; S4, complementing and time registering the pipeline external corrosion rate data according to a spline interpolation method; S5, constructing a pipeline corrosion risk grading early warning method; and S6, establishing a digital-twinning-based
underground pipeline full-life service cycle corrosion risk
early warning system according to steps S1 to S5. The application realizes real-time corrosion risk grading early warning and residual life prediction of multiphase flow underground pipelines in the full-life service cycle, and guides the detection, repair and maintenance work of the multiphase flow underground pipelines under the corrosion risk.