The relay protection equipment that has been put into operation is likely to fail due to incorrect or unreasonable setting values. Due to the strict operating system of the equipment, operation and maintenance personnel cannot directly conduct comprehensive testing and inspection of the relay protection equipment that has been put into operation. Simulate real relay protection input, output, and logic operation modules, and build a power grid model that is consistent with the external power grid environment of relay protection. Real time update the model of actual relay protection operation data is obtained through the secondary online monitoring system of the substation, and combined with data analysis algorithms, achieve normal operation, fault deduction, health status evaluation, and other services of relay protection in the digital twin environment, Thus, it effectively solves the potential safety hazards such as setting errors, hardware abnormalities, and circuit abnormalities in relay protection, which is of great significance for the safe and reliable operation of substations.