The present invention relates to a rail traffic real-time fault diagnosis method based on data comparative analysis and a rail traffic real-time fault diagnosis system based on data comparative analysis. The method comprises the steps of (1) collecting the historical monitoring data and real-time monitoring data of rail traffic signal equipment, (2) according to the correlation relationship between the parameters of the historical monitoring data, obtaining a comparative analysis model of a normal state and a fault state, (3) according to the comparative analysis model of the fault state, generating the classification model of fault through classifier training, (4) for the real-time monitoring data, judging the normal state or abnormal state of equipment operation through the comparative analysis model, and carrying out fault alarming if the state if the abnormal state, (5) for the data of the abnormal state, carrying out fault diagnosis and classification through a fault analysis model, and outputting a fault diagnosis result. According to the method and the system, the fault of the equipment is diagnosed through classification and comparative analysis methods, and the problems of heavy workload, low efficiency and high risk in the artificial diagnosis of a railway signaling system failure are effectively solved.