The quality of mechanical assembly is of utmost importance in ensuring the overall product quality and operational performance. However, the existing methods for diagnosing mechanical assembly deviations often fail to meet the practical requirements for assessing assembly quality. This paper introduces a novel approach by incorporating probabilistic graphical model theory into the manufacturing field. Proposing an assembly deviation diagnosis method based on Structure-Variable Dynamic Bayesian Networks (SVDBN). Initially, the assembly process is analyzed, and the dynamic structure and node types of the network are defined. The stress effects resulting from assembly deviations are examined, and the dependency relationships between the nodes are determined. Through learning the initial network and the probability table of the transfer network for each time slice, constructing a diagnostic network model. Subsequently, a forward and backward operator inference algorithm is introduced, which utilizes the network structure to gather evidence variables during the assembly process of the actual system. This enables us to infer the probabilities associated with each deviation source. Finally, the proposed method is validated using the winder chuck shaft assembly to verify the feasibility of the SVDBN model in diagnosing mechanical assembly deviations.