The invention discloses a rotating machinery fault diagnosis method based on zero trial learning and feature extraction, which belongs to the field of deep learning and fault diagnosis, and comprises a feature refining module which mainly solves the problem of cross-dataset deviation existing in most existing methods and integrates semantic visual mapping into a unified generative model, so that the fault diagnosis efficiency is improved. In order to refine visual features of visible and invisible class samples, adaptive edge center loss is introduced to explicitly encourage intra-class compactness and inter-class separability, and the adaptive edge center loss is combined with semantic cycle consistency constraints, so that a feature refinement module can learn more distinct feature representations related to classes and semantics, and the robustness of the features is improved. According to the method, the problem of cross-dataset deviation is effectively solved, low efficiency and over-fitting risks of fine tuning are avoided, and the method has remarkable performance gain.