There are many states in the operation of the transformer, which can correctly divide the operating state, which is of great significance for the maintenance and fault diagnosis of the transformer. Firstly, the derivative models of Markov chain are analyzed in detail and Hidden Semi-Markov Models (HSMM) are constructed. And then, the state of the transformer operation process is described in HSMM by introducing the correspondence of "micro-state macro-state". Finally, the HSMM fault diagnosis process covering the historical state of the transformer and including feature extraction, state classification and fault identification process is established. Through the analysis of the transformer DGA fault diagnosis, the results show the effectiveness of the proposed method.