The paper focus on dynamic bayesian network (DBN) inference system and its application on the natural gas transmission and distribution network for the system fault diagnosis which is including time restriction (that is the earliest start time and the latest end time) for task. DBN is a graphic model which can describe the relationships between variable data, and used for reasoning. After we research the basic model of DBN, and the maximum depend algorithm is improved which which can increase the feasibility of natural gas transmission and distribution network system. we can see the new model is more accuracy than the traditional technical fault diagnosis clearly. Also, simulation result can verify the design of DBN is effectively and valuable.