Centrifugal compressors are key equipment in the natural gas pipeline network of the petrochemical industry, and their high failure rate can cause significant economic losses to the affiliated enterprises. This article proposes an ontology based fault diagnosis method for centrifugal compressors. Firstly, this method takes the centrifugal compressor fault analysis reports accumulated by petrochemical enterprises as the knowledge source, extracts fault diagnosis knowledge from the knowledge source through ontology modeling, and promotes the integration, sharing, and reuse of fault diagnosis knowledge. Then, a fault diagnosis knowledge base was constructed using the ontology software Protégé, and rule?based reasoning (RBR) was implemented using the Semantic Web Rule Language (SWRL). The knowledge was stored and queried using the software Neo4j. The effectiveness of this fault diagnosis method has been confirmed through testing the oil system composed of centrifugal compressors. The results show that this method improves the application efficiency of fault knowledge and provides a high?quality knowledge foundation for the diagnosis and decision?making of centrifugal compressors.