The high-speed railway is a deeply coupled system with strong and weak electrical equipment, while complex electromagnetic interference (EMI) consequently brings potential risks and hazards to signaling safety. Since the incident reports on signaling failure intrinsically reflect the generation and evolution mechanism of equipment failures, relying on text mining technology, this paper tries to extract failure-related entities and constructs a knowledge graph to clarify the negative impact of the on-site electromagnetic environment. Firstly, based on convolutional neural networks (CNN), a supervised deep learning model for Chinese text classification is established to generate a corpus containing only railway failures caused by EMI. Then, the bidirectional long short-term memory (BiLSTM) and bidirectional encoder representations from transformers (BERT) algorithms are adopted to build the named entity recognition (NER) model. A NER algorithm more suitable for Chinese text features is proposed through ensemble modeling, training verification, and comparative evaluation. Finally, the knowledge storage and visualization of relational graph construction based on the Neo4j database are realized according to the obtained failure-related entities. This knowledge topology network effectively explores the inherent relationship between EMI factors and railway safety, as well as provides support for improving the safety assessment and enhancing the anti-interference performance of the equipment.