The continuous development of information communication technology and energy coupling technology has gradually transformed traditional energy systems into modern integrated energy systems with typical cyber physical characteristics. Therefore, the resilience analysis of integrated energy systems in the context of cyber physical system is more complicated. This paper described the interrelationships between cyber system and energy system in terms of control, energy supply, and network topology connection. At the same time, with the consideration of dynamic power flow of natural gas and the coupling relationship between physical layer and cyber layer in distribution network reconfiguration, a resilience optimization analysis model of integrated cyber electricity-gas system based on directed multicommodity flow model was established. Moreover, a two-step optimization framework of resilience and economy was constructed. Firstly, the network reconfiguration was performed with the minimum load loss as the optimization goal, and then the economic operation optimization was solved by alternating direction multipliers method (ADMM) based on the network structure determined in the first step. Finally, case study was presented to verify the validity and correctness of the model and method.