Program fault rapid recovery method and system of relay protection system

By using a multi-core heterogeneous system for monitoring and real-time operation on an independent CPU core, combined with memory allocation and CRC verification, the problem of equipment loss of protection caused by relay protection system program failures is solved, achieving rapid recovery and continuous protection.

CN121560633APending Publication Date: 2026-02-24NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511637646.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Faults in relay protection systems require manual restarts and parameter resetting, causing power equipment to lose protection during faults, which is costly in terms of manpower and resources and carries high risks.

Method used

A multi-core heterogeneous system is adopted, with the monitoring system and the real-time system running on independent CPU cores respectively. Through memory allocation and CRC verification, the relay protection program can be quickly restored, including image recording and backup mechanisms.

Benefits of technology

It enables automatic and rapid recovery of the relay protection system, avoids system restart, ensures that power equipment is always protected, and reduces the consumption of manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560633A_ABST
    Figure CN121560633A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power system protection automation, and provides a method and system for quickly recovering a program fault of a relay protection system, and the method comprises the steps: employing a multi-core heterogeneous system on the relay protection system; the slave core runs a relay protection program through a real-time system; the main core supervises a relay protection program running on a real-time system through a supervision system; the real-time system distributes relay protection programs to a read-only area and a writable area of a slave core memory area respectively; carrying out CRC (Cyclic Redundancy Check) on the relay protection program in the read-only area by the supervision system; the supervision system carries out mirror image recording of relay protection program initialization; after the relay protection program encounters fault collapse during running, the supervision system quickly recovers the relay protection program; and when the relay protection program runs, after the supervision system finds that the read-only area of the slave core is tampered, the relay protection program is recovered. According to the method, system restarting can be effectively avoided, the operation process of reinitializing hardware and software is avoided, and rapid recovery of the relay protection system can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system protection automation technology, and in particular to a method and system for rapid recovery of program faults in relay protection systems. Background Technology

[0002] The real-time performance and reliability of relay protection products for the protection and detection functions of power equipment and power grid equipment are crucial. When a relay protection program malfunctions, on-site personnel need to restart the program, reset relevant parameters, and even restart related circuit boards or the entire device. Each restart of the relay protection system requires support from on-site technicians, consuming significant manpower and resources. Before the relay protection system recovers, the power equipment will be in a dangerous period of unprotection. Enabling relay protection systems to automatically and quickly recover from faults has always been a key goal for relay protection product development teams. Summary of the Invention

[0003] The purpose of this invention is to solve at least one technical problem in the background art and to provide a method and system for rapid recovery of program faults in a relay protection system.

[0004] To achieve the above objectives, the present invention provides a method for rapid recovery of program faults in a relay protection system, comprising: A multi-core heterogeneous system is used in the relay protection system. The multi-core heterogeneous system includes a supervisory system and a real-time system, in which the master core runs the supervisory system and the slave cores run the real-time system. The slave core runs the relay protection program through the real-time system; the master core accesses the slave core's memory area through the supervisory system and supervises the relay protection program running on the real-time system through the supervisory system. The relay protection program running on the real-time system uses the slave core's memory area according to the plan. The real-time system allocates the read-only part and the writable part of the relay protection program content to the read-only area and the writable area of ​​the slave core's memory area, respectively. The monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core; The monitoring system performs a mirror recording of the relay protection program initialization. When the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on the mirror recording of the relay protection program initialization. When the relay protection program is running, if the monitoring system detects that the read-only area of ​​the kernel has been tampered with, it will quickly restore the relay protection program based on the image recording of the relay protection program initialization.

[0005] According to one aspect of the present invention, the read-only area includes: a code segment and a read-only data segment; the writable area includes a writable data segment, a heap, and a stack; The code segment, the read-only data segment, and the writable data segment are addresses allocated when the relay protection program is loaded, while the heap and stack are addresses allocated when the relay protection program is running.

[0006] According to one aspect of the present invention, the monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core, including: The real-time system reads the relay protection program on the Flash memory, stores the code segment and read-only data segment of the relay protection program in the read-only area, and stores the writable data segment in the writable area; The real-time system notifies the monitoring system to perform CRC verification on the relay protection program in the read-only area.

[0007] According to one aspect of the present invention, the monitoring system performs mirror recording of relay protection program initialization, comprising: Initialize and configure the relay protection program, and allocate the stack to the writable area; When dynamically allocating memory for relay protection programs, the heap is in the writable area; Set the initial values ​​required for the relay protection program to run; After the relay protection program completes its initial configuration, it notifies the monitoring system. The monitoring system then transfers the relay protection program from the writable area to another backup memory area and notifies the real-time system to run the relay protection program.

[0008] According to one aspect of the present invention, after the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on a mirror recording of the relay protection program initialization, including: When the relay protection program encounters a null pointer exception, an assertion error, or a function return error, it cannot continue execution. The real-time system detects the relay protection program crash and notifies the monitoring system; and / or, when the relay protection program runs away, the monitoring system detects that an error has occurred in the relay protection program. The monitoring system uses the backup memory area to restore the relay protection program of the writable area, allowing the relay protection program to quickly return to the initial configuration state.

[0009] According to one aspect of the present invention, when the relay protection program is running, after the monitoring system detects that the read-only area of ​​the slave core has been tampered with, it quickly restores the relay protection program based on the mirror recording of the relay protection program initialization, including: The monitoring system periodically performs CRC checks on the relay protection program in the read-only area. If the check fails, the monitoring system notifies the real-time system to reload the read-only area, restore the writable area using the contents of the backup memory area, and then notifies the real-time system to run the relay protection program.

[0010] To achieve the above objectives, the present invention also provides a rapid recovery system for program faults in a relay protection system, comprising: A multi-core heterogeneous system configuration module is used in a relay protection system. The multi-core heterogeneous system includes a monitoring system and a real-time system, in which the master core runs the monitoring system and the slave cores run the real-time system. The system function configuration module allows the slave core to run a relay protection program through a real-time system; the master core accesses the slave core's memory area through a monitoring system and monitors the relay protection program running on the real-time system through the monitoring system. The memory allocation module allows the relay protection program running on the real-time system to use the slave core's memory area according to the plan. The real-time system allocates the read-only and writable parts of the relay protection program content to the read-only and writable areas of the slave core's memory area, respectively. The CRC check module is used by the monitoring system to perform CRC checks on the relay protection program in the read-only area of ​​the slave core. The mirror recording module is used by the monitoring system to perform mirror recording of the relay protection program initialization. The first relay protection program recovery module allows the monitoring system to quickly restore the relay protection program based on the mirror recording of the relay protection program initialization after the program encounters a fault and crashes during operation. The second relay protection program recovery module is used to quickly restore the relay protection program based on the image recording of the relay protection program initialization after the monitoring system detects that the read-only area of ​​the slave core has been tampered with during the operation of the relay protection program.

[0011] To achieve the above objectives, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the fast recovery method for program faults of the relay protection system as described above.

[0012] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for rapid recovery of program faults in a relay protection system as described above.

[0013] According to the present invention, the present invention is based on a multi-core heterogeneous system, allowing the monitoring system and the real-time system to run on independent CPU cores. The relay protection program on the real-time system allocates memory and sets initial values ​​during initialization. The mirror backup of this memory area can be used to restore the program to the initialization state and continue running. This can effectively avoid system restart and avoid re-initializing the hardware and software operation process. Therefore, it can realize the rapid recovery of the relay protection system and ensure that the power equipment is always in a protected state. Attached Figure Description

[0014] Figure 1A flowchart illustrating a method for rapid recovery of program faults in a relay protection system according to an embodiment of the present invention; Figure 2 This diagram schematically illustrates the configuration of the real-time system memory area and the supervisory system memory area according to one embodiment of the present invention. Detailed Implementation

[0015] The invention will now be discussed with reference to exemplary embodiments. It should be understood that the described embodiments are merely intended to enable those skilled in the art to better understand and thus implement the invention, and are not intended to imply any limitation on the scope of the invention.

[0016] As used herein, the term "comprising" and its variations are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "at least partially based on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment".

[0017] Figure 1 This is a schematic flowchart illustrating a method for rapid recovery from program faults in a relay protection system according to an embodiment of the present invention. Figure 1 As shown, in this embodiment, the method for rapid recovery of program faults in a relay protection system includes: A multi-core heterogeneous system is used in the relay protection system. The multi-core heterogeneous system includes a supervisory system and a real-time system, in which the master core runs the supervisory system and the slave cores run the real-time system. The slave core runs the relay protection program through the real-time system; the master core accesses the slave core's memory area through the supervisory system and supervises the relay protection program running on the real-time system through the supervisory system. The relay protection program running on the real-time system uses the slave core's memory area according to the plan. The real-time system allocates the read-only part and the writable part of the relay protection program content to the read-only area and the writable area of ​​the slave core's memory area, respectively. The monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core; The monitoring system performs mirror recording (mirror backup) of the relay protection program initialization. When the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on the mirror recording of the relay protection program initialization. When the relay protection program is running, if the monitoring system detects that the read-only area of ​​the kernel has been tampered with, it will quickly restore the relay protection program based on the image recording of the relay protection program initialization.

[0018] Furthermore, according to one embodiment of the present invention, the read-only area includes: a code segment and a read-only data segment (read-only global variables); the writable area includes a writable data segment (writable global variables), a heap, and a stack; The code segment, the read-only data segment, and the writable data segment are addresses allocated when the relay protection program is loaded, while the heap and stack are addresses allocated when the relay protection program is running.

[0019] like Figure 2 As shown, in this embodiment, the memory area used by the relay protection program is divided into read-only and writable areas according to access type. These areas are all located in the memory area of ​​the real-time system. The monitoring system can read the memory area of ​​the real-time system and backs up the program in the writable area of ​​the real-time system to the memory space of the monitoring system as a mirror file for the recovery program. The relay protection program running on the real-time system is unaware of the backup operation of the monitoring system. Furthermore, as... Figure 2 As shown, the monitoring system has a backup memory area, which corresponds to the writable area mentioned above, and is used for mirror backup of the relay protection program initialization (initialization configuration).

[0020] Furthermore, according to one embodiment of the present invention, the monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core, including: The real-time system reads the relay protection program on the Flash memory, stores the code segment and read-only data segment of the relay protection program into the read-only area, and stores the writable data segment into the writable area; The real-time system notifies the monitoring system to perform CRC verification on the relay protection program in the read-only area.

[0021] Furthermore, according to one embodiment of the present invention, the monitoring system performs mirror recording of the relay protection program initialization, including: Initialize and configure the relay protection program, and allocate the stack to the writable area; When dynamically allocating memory for relay protection programs, the heap is in the writable area; Set the initial values ​​required for the relay protection program to run; After the relay protection program completes its initial configuration, it notifies the monitoring system. The monitoring system then transfers the relay protection program from the writable area to another backup memory area and notifies the real-time system to run the relay protection program.

[0022] Furthermore, according to one embodiment of the present invention, after the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on a mirror recording of the relay protection program initialization, including: When the relay protection program encounters a null pointer exception, an assertion error, or a function return error, it cannot continue execution. The real-time system detects the relay protection program crash and notifies the monitoring system; and / or, when the relay protection program runs away, the monitoring system detects that an error has occurred in the relay protection program. The monitoring system uses the backup memory area to restore the relay protection program of the writable area, allowing the relay protection program to quickly return to the initial configuration state; The monitoring system notifies the real-time system to run relay protection procedures.

[0023] Furthermore, according to one embodiment of the present invention, when the relay protection program is running, after the monitoring system detects that the read-only area of ​​the kernel has been tampered with, it quickly restores the relay protection program based on the mirror recording of the relay protection program initialization, including: The monitoring system periodically performs CRC checks on the relay protection program in the read-only area. If the check fails, it means that the relay protection program in the read-only area has been tampered with. The monitoring system notifies the real-time system to reload the read-only area and restore the writable area with the contents of the backup memory area, so that the program can quickly return to the initial configuration state. Then, the monitoring system notifies the real-time system to run the relay protection program.

[0024] According to the above-described solution of the present invention, the present invention is based on a multi-core heterogeneous system, allowing the monitoring system and the real-time system to run on independent CPU cores. The relay protection program on the real-time system allocates memory and sets initial values ​​during initialization. The mirror backup of this memory area can be used to restore the program to the initialization state and continue running. This can effectively avoid system restart and avoid re-initializing the hardware and software operation process. Therefore, it can realize the rapid recovery of the relay protection system and ensure that the power equipment is always in a protected state.

[0025] Furthermore, to achieve the above objectives, the present invention also provides a rapid recovery system for program faults in a relay protection system, comprising: A multi-core heterogeneous system configuration module is used in a relay protection system. The multi-core heterogeneous system includes a monitoring system and a real-time system, in which the master core runs the monitoring system and the slave cores run the real-time system. The system function configuration module allows the slave core to run a relay protection program through a real-time system; the master core accesses the slave core's memory area through a monitoring system and monitors the relay protection program running on the real-time system through the monitoring system. The memory allocation module allows the relay protection program running on the real-time system to use the slave core's memory area according to the plan. The real-time system allocates the read-only and writable parts of the relay protection program content to the read-only and writable areas of the slave core's memory area, respectively. The CRC check module is used by the monitoring system to perform CRC checks on the relay protection program in the read-only area of ​​the slave core. The mirror recording module is used by the monitoring system to perform mirror recording of the relay protection program initialization. The first relay protection program recovery module allows the monitoring system to quickly restore the relay protection program based on the mirror recording of the relay protection program initialization after the program encounters a fault and crashes during operation. The second relay protection program recovery module is used to quickly restore the relay protection program based on the image recording of the relay protection program initialization after the monitoring system detects that the read-only area of ​​the slave core has been tampered with during the operation of the relay protection program.

[0026] Furthermore, according to one embodiment of the present invention, the read-only area includes: a code segment and a read-only data segment (read-only global variables); the writable area includes a writable data segment (writable global variables), a heap, and a stack; The code segment, the read-only data segment, and the writable data segment are addresses allocated when the relay protection program is loaded, while the heap and stack are addresses allocated when the relay protection program is running.

[0027] like Figure 2 As shown, in this embodiment, the memory area used by the relay protection program is divided into read-only and writable areas according to access type. These areas are all located in the memory area of ​​the real-time system. The monitoring system can read the memory area of ​​the real-time system and backs up the program in the writable area of ​​the real-time system to the memory space of the monitoring system as a mirror file for the recovery program. The relay protection program running on the real-time system is unaware of the backup operation of the monitoring system. Furthermore, as... Figure 2 As shown, the monitoring system has a backup memory area, which is a mirror backup of the aforementioned writable area used for relay protection program initialization (initialization configuration).

[0028] Furthermore, according to one embodiment of the present invention, the monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core, including: The real-time system reads the relay protection program on the Flash memory, stores the code segment and read-only data segment of the relay protection program into the read-only area, and stores the writable data segment into the writable area; The real-time system notifies the monitoring system to perform CRC verification on the relay protection program in the read-only area.

[0029] Furthermore, according to one embodiment of the present invention, the monitoring system performs mirror recording of the relay protection program initialization, including: Initialize and configure the relay protection program, and allocate the stack to the writable area; When dynamically allocating memory for relay protection programs, the heap is in the writable area; Set the initial values ​​required for the relay protection program to run; After the relay protection program completes its initial configuration, it notifies the monitoring system. The monitoring system then transfers the relay protection program from the writable area to another backup memory area and notifies the real-time system to run the relay protection program.

[0030] Furthermore, according to one embodiment of the present invention, after the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on a mirror recording of the relay protection program initialization, including: When the relay protection program encounters a null pointer exception, an assertion error, or a function return error, it cannot continue execution. The real-time system detects the relay protection program crash and notifies the monitoring system; and / or, when the relay protection program runs away, the monitoring system detects that an error has occurred in the relay protection program. The monitoring system uses the backup memory area to restore the relay protection program of the writable area, allowing the relay protection program to quickly return to the initial configuration state; The monitoring system notifies the real-time system to run relay protection procedures.

[0031] Furthermore, according to one embodiment of the present invention, when the relay protection program is running, after the monitoring system detects that the read-only area of ​​the kernel has been tampered with, it quickly restores the relay protection program based on the mirror recording of the relay protection program initialization, including: The monitoring system periodically performs CRC checks on the relay protection program in the read-only area. If the check fails, it means that the relay protection program in the read-only area has been tampered with. The monitoring system notifies the real-time system to reload the read-only area and restore the writable area with the contents of the backup memory area, so that the program can quickly return to the initial configuration state. Then, the monitoring system notifies the real-time system to run the relay protection program.

[0032] According to the above-described solution of the present invention, the present invention is based on a multi-core heterogeneous system, allowing the monitoring system and the real-time system to run on independent CPU cores. The relay protection program on the real-time system allocates memory and sets initial values ​​during initialization. The mirror backup of this memory area can be used to restore the program to the initialization state and continue running. This can effectively avoid system restart and avoid re-initializing the hardware and software operation process. Therefore, it can realize the rapid recovery of the relay protection system and ensure that the power equipment is always in a protected state.

[0033] Furthermore, to achieve the above objectives, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the fast recovery method for program faults of the relay protection system as described above.

[0034] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for rapid recovery of program faults in a relay protection system as described above.

[0035] Those skilled in the art will recognize that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0036] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and equipment can be referred to the corresponding process in the foregoing method implementation, and will not be repeated here.

[0037] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0038] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0039] In addition, the functional modules in the embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0040] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the sending / receiving methods of various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0041] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in this application.

[0042] It should be understood that the sequence number of each step in the invention and its embodiments does not absolutely imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

Claims

1. A method for rapid recovery of program faults in a relay protection system, characterized in that, include: A multi-core heterogeneous system is used in the relay protection system. The multi-core heterogeneous system includes a supervisory system and a real-time system, in which the master core runs the supervisory system and the slave cores run the real-time system. The slave core runs the relay protection program through the real-time system; the master core accesses the slave core's memory area through the supervisory system and supervises the relay protection program running on the real-time system through the supervisory system. The relay protection program running on the real-time system uses the slave core's memory area according to the plan. The real-time system allocates the read-only part and the writable part of the relay protection program content to the read-only area and the writable area of ​​the slave core's memory area, respectively. The monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core; The monitoring system performs a mirror recording of the relay protection program initialization. When the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on the mirror recording of the relay protection program initialization. When the relay protection program is running, if the monitoring system detects that the read-only area of ​​the kernel has been tampered with, it will quickly restore the relay protection program based on the image recording of the relay protection program initialization.

2. The method for rapid recovery of program faults in a relay protection system according to claim 1, characterized in that, The read-only area includes a code segment and a read-only data segment; the writable area includes a writable data segment, a heap, and a stack. The code segment, the read-only data segment, and the writable data segment are addresses allocated when the relay protection program is loaded, while the heap and stack are addresses allocated when the relay protection program is running.

3. The method for rapid recovery of program faults in a relay protection system according to claim 1, characterized in that, The monitoring system performs CRC verification on the relay protection program in the read-only area of ​​the slave core, including: The real-time system reads the relay protection program on the Flash memory, stores the code segment and read-only data segment of the relay protection program in the read-only area, and stores the writable data segment in the writable area; The real-time system notifies the monitoring system to perform CRC verification on the relay protection program in the read-only area.

4. The method for rapid recovery of program faults in a relay protection system according to claim 1, characterized in that, The monitoring system performs mirror recording of the relay protection program initialization, including: Initialize and configure the relay protection program, and allocate the stack to the writable area; When dynamically allocating memory for relay protection programs, the heap is in the writable area; Set the initial values ​​required for the relay protection program to run; After the relay protection program completes its initial configuration, it notifies the monitoring system. The monitoring system then transfers the relay protection program from the writable area to another backup memory area and notifies the real-time system to run the relay protection program.

5. The method for rapid recovery of program faults in a relay protection system according to claim 4, characterized in that, After the relay protection program encounters a fault and crashes during operation, the monitoring system quickly restores the relay protection program based on a mirror recording of the relay protection program's initialization, including: When the relay protection program encounters a null pointer exception, an assertion error, or a function return error, it cannot continue execution. The real-time system detects the relay protection program crash and notifies the monitoring system; and / or, when the relay protection program runs away, the monitoring system detects that an error has occurred in the relay protection program. The monitoring system uses the backup memory area to restore the relay protection program of the writable area, allowing the relay protection program to quickly return to the initial configuration state.

6. The method for rapid recovery of program faults in a relay protection system according to claim 5, characterized in that, When the relay protection program is running, if the monitoring system detects that the read-only area of ​​the slave core has been tampered with, it quickly restores the relay protection program based on the mirror recording of the relay protection program initialization, including: The monitoring system periodically performs CRC checks on the relay protection program in the read-only area. If the check fails, the monitoring system notifies the real-time system to reload the read-only area, restore the writable area using the contents of the backup memory area, and then notifies the real-time system to run the relay protection program.

7. A rapid recovery system for program faults in relay protection systems, characterized in that, include: A multi-core heterogeneous system configuration module is used in a relay protection system. The multi-core heterogeneous system includes a monitoring system and a real-time system, in which the master core runs the monitoring system and the slave cores run the real-time system. The system function configuration module allows the slave core to run relay protection programs in real time. The master core accesses the memory area of ​​the slave core through the monitoring system, and monitors the relay protection program running on the real-time system through the monitoring system. The memory allocation module allows the relay protection program running on the real-time system to use the slave core's memory area according to the plan. The real-time system allocates the read-only and writable parts of the relay protection program content to the read-only and writable areas of the slave core's memory area, respectively. The CRC check module is used by the monitoring system to perform CRC checks on the relay protection program in the read-only area of ​​the slave core. The mirror recording module is used by the monitoring system to perform mirror recording of the relay protection program initialization. The first relay protection program recovery module allows the monitoring system to quickly restore the relay protection program based on the mirror recording of the relay protection program initialization after the program encounters a fault and crashes during operation. The second relay protection program recovery module is used to quickly restore the relay protection program based on the image recording of the relay protection program initialization after the monitoring system detects that the read-only area of ​​the slave core has been tampered with during the operation of the relay protection program.

8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements a method for rapid recovery of program faults in a relay protection system as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method for rapid recovery of program faults in a relay protection system as described in any one of claims 1-6.