Double-system hot standby switching method and system for multiplied 2-vote-2 structure

By performing dual verification during the switching of the main and standby systems, data consistency and synchronization between the main and standby systems are ensured, and the problem of difficulty in ensuring consistency during switching in the prior art is solved, and the stability and security of the system are improved.

CN119576659APending Publication Date: 2025-03-07CRSC URBAN RAIL TRANSIT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411650061.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, it is difficult to ensure data consistency and synchronization between the main and standby systems when switching between the main and standby systems.

Method used

By periodically obtaining the state factors of the two systems, calculate the system status and system status of each system, and perform double verification in each system based on the calculation results and the status sent by the other system to ensure the correctness of the system calculation.

Benefits of technology

This dual verification mechanism reduces the possibility of misjudgment, improves the stability and security of the system, and ensures the consistency and synchronization of data during the switching of the main and standby systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576659A_ABST
    Figure CN119576659A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of railway signal control, provides a double-system hot standby switching method and system for a 2 * 2-vote-2 structure, and aims to solve the technical problem that data consistency and synchronism between a main system and a standby system are difficult to ensure when the main system and the standby system are switched and taken over in the prior art. Comprising the following steps: periodically acquiring state factors of two systems, and calculating a local system state and an opposite system state of each system based on the state factors; the two systems respectively send the respective calculated local system state and opposite system state to the opposite system; in each system, according to the local system state and the opposite system state calculated by the current system and the local system state and the opposite system state sent by the opposite system, judging whether the system cutting calculation is correct or not, and if the system cutting calculation is correct, generating a system cutting result; and each system executes a system switching operation according to the system switching result generated by the current system. According to the invention, main-standby switching can be rapidly carried out, the service interruption time is reduced, and the recovery speed of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of railway signal control, and in particular relates to a dual-system hot standby switching method and system for a 2-by-2-out-of-2 structure. Background Art

[0002] The 2x2-take-2 structure consists of two completely independent systems (system A and system B), each of which has two independent computers (A1 / A2 and B1 / B2). In each system, the two computers independently process the same input signal and perform calculations. If the calculation results of the two computers are consistent, the output of the system is considered valid. If the results are inconsistent or any computer self-checks and finds a fault, the system is considered unavailable.

[0003] In the prior art, data consistency checks are performed within each system (e.g., A1 and A2 in system A) and between different systems (e.g., system A and system B). If the output results of the two computing nodes (A1 and A2) in the system are consistent, the system is considered healthy; if they are inconsistent, it is necessary to further determine whether there is a fault. Similarly, if the output results of the two systems are consistent, the system is considered to be in good condition; if they are inconsistent, further fault detection is required. If a system is detected to have a fault (e.g., system A) and the other system (system B) is working properly, the system will automatically switch to the normal system to continue working.

[0004] The prior art has the following technical problems:

[0005] In the prior art, it is difficult to ensure data consistency and synchronization between the primary and standby systems when performing a switchover and takeover of the primary and standby systems. Summary of the invention

[0006] The present invention provides a dual-system hot standby switching method and system for a 2x2-out-of-2 structure, aiming to solve the technical problem in the above-mentioned prior art that it is difficult to ensure data consistency and synchronization between the primary and standby systems when performing switching and takeover of the primary and standby systems.

[0007] The technical solution of the present invention to solve the above technical problem is as follows: a dual-system hot standby switching method for a 2x2-out-of-2 structure, comprising:

[0008] Periodically acquiring state factors of the two systems, and calculating the own system state and the opposite system state of each system based on the state factors;

[0009] The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system;

[0010] The two systems send their own system states and counterpart system states calculated by each system to the other system respectively;

[0011] In each system, according to the local system state and the opposite system state calculated by the current system and the local system state and the opposite system state sent by the other system, it is judged whether the system switching calculation is correct. If it is correct, the system switching result is generated;

[0012] Each system performs a system switching operation according to the system switching result generated by the current system.

[0013] Furthermore, the target state mentioned above includes a master system state and a non-master system state, and the non-master system state includes a backup system state and a standby state.

[0014] Furthermore, the above-mentioned state factors include communication state and working state, and calculating the local state and peer state of each system specifically includes:

[0015] Detect the communication status between the two systems. If the communication is normal, calculate the local system status and peer system status of each system by detecting the working status of the system.

[0016] If the communication is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively;

[0017] If the communication is interrupted, the own system states of both systems are output as the master system state, and the peer system states of both systems are output as the standby state.

[0018] Furthermore, the above-mentioned state factors also include synchronization state, and calculating the local system state and the peer system state of each system by detecting the working state of the system specifically includes:

[0019] Detect the working status between the two systems. If the working status is normal, calculate the local system status and the peer system status of each system by detecting the synchronization status between the two systems.

[0020] If the working state fails, the target state of one of the systems is defined as the main system state, and the target state of the other system is defined as the standby state, and the main system state and the counterpart system state of the two systems are generated and output accordingly.

[0021] Furthermore, the above-mentioned state factors also include a system switching request, and calculating the local system state and the peer system state of each system by detecting the synchronization state between the two systems specifically includes:

[0022] Detecting the synchronization state between the two systems, and if the synchronization state is normal, calculating the local system state and the peer system state of each system through the system switching request;

[0023] If the synchronization state is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively.

[0024] Furthermore, the above-mentioned state factors also include health status. The system status and peer status of each system calculated by the system switching request specifically include:

[0025] Use application software to determine whether each system has a fault. If not, calculate the local system status and the peer system status of each system by detecting the health status of the two systems.

[0026] If one of the systems has a fault, the state of the own system and the state of the opposite system of the system with the fault are output as the standby state and the main system state respectively, and the state of the own system and the state of the opposite system of the system without the fault are output as the main system state and the standby state respectively;

[0027] If both systems have faults, the local system state and the opposite system state of the system in the main system state will be output as the main system state and the standby state respectively, and the local system state and the opposite system state of the system in the non-main system state will be output as the standby state and the main system state respectively.

[0028] Furthermore, the above-mentioned calculation of the local system state and the counterpart system state of each system by detecting the health states of the two systems specifically includes:

[0029] Calculate the health values ​​of the two systems and determine whether the health values ​​of the two systems are equal. If they are not equal, output the system status and the counterpart system status of the system with a higher health value as the main system status and the backup system status respectively, and output the system status and the counterpart system status of the system with a lower health value as the backup system status and the main system status respectively.

[0030] Further, the above judgment on whether the tangent system calculation is correct is specifically as follows:

[0031] The state judgment equation is used to judge whether the tangent system calculation is correct. The formula of the state judgment equation is as follows:

[0032] G 本系 =G′ 对系

[0033] G 对系 =G′ 本系

[0034] Among them, G 本系 Indicates the current system state, G 对系 Represents the current system state, G′ 对系 represents the state of the pair system calculated, G′ 本系Indicates the state of the system calculated for the system;

[0035] If the tangent system is calculated correctly, then G 本系 As a result of the current system.

[0036] The beneficial effect of adopting the above technical solution is that each system of the present invention not only calculates its own target state, but also receives the target state of the other system, and verifies it through the state judgment equation to ensure that the calculation results of both parties are consistent. This double verification mechanism reduces the possibility of misjudgment and improves the stability and security of the system.

[0037] In a second aspect, in order to solve the above technical problem, the present invention further provides a dual-system hot standby switching system for a 2x2-out-of-2 structure, comprising:

[0038] A state calculation module, used for periodically acquiring state factors of the two systems, and calculating the own system state and the counterpart system state of each system based on the state factors;

[0039] The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system;

[0040] The state transmission module is used for the two systems to send their own system states and counterpart system states calculated by each system to the other system;

[0041] The state judgment module is used to judge whether the system switching calculation is correct in each system according to the system state and the opposite system state calculated by the current system and the system state and the opposite system state sent by the other system. If correct, the system switching result is generated.

[0042] The system switching module, each system performs a system switching operation according to the system switching result generated by the current system.

[0043] Furthermore, the above-mentioned status factors include communication status, working status, synchronization status, handoff request and health status.

[0044] Compared with the prior art, the present invention has the following advantages:

[0045] 1. When calculating the local and peer status of each system, the present invention comprehensively considers multiple factors such as communication status, working status, synchronization status, switching request and health status, ensuring more comprehensive fault detection and processing. By periodically acquiring and analyzing the status factors of each system, potential faults can be discovered in time and appropriate measures can be taken to isolate them. Once a fault or inconsistent status is detected, the system can quickly perform active-standby switching, reduce service interruption time, and improve system recovery speed.

[0046] 2. In the present invention, each system not only calculates its own target state, but also receives the target state of the other system and verifies it through the state judgment equation to ensure that the calculation results of both parties are consistent. This double verification mechanism reduces the possibility of misjudgment and improves the stability and security of the system.

[0047] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic flow chart of a dual-system hot standby switching method for a 2x2-out-of-2 structure according to an embodiment of the present invention is shown;

[0050] Figure 2 A schematic diagram showing the steps of a dual-system hot standby switching method for a 2x2-out-of-2 structure according to an embodiment of the present invention is shown;

[0051] Figure 3 A schematic structural diagram of a dual-system hot standby switching method for a 2x2-out-of-2 structure according to an embodiment of the present invention is shown;

[0052] Figure 4 A system block diagram of a dual-system hot standby switching system for a 2-by-2-out-of-2 structure according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Figure 1 FIG. 4 shows a flow chart of a dual-system hot standby switching method for a 2x2-out-of-2 structure according to an embodiment of the present invention. Figure 1 and Figure 2As shown, a dual-system hot standby switching method for a 2x2-out-of-2 structure according to an embodiment of the present invention includes:

[0055] Periodically acquiring state factors of the two systems, and calculating the own system state and the opposite system state of each system based on the state factors;

[0056] The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system;

[0057] The two systems send their own system states and counterpart system states calculated by each system to the other system respectively;

[0058] In each system, according to the local system state and the opposite system state calculated by the current system and the local system state and the opposite system state sent by the other system, it is judged whether the system switching calculation is correct. If it is correct, the system switching result is generated;

[0059] Each system performs a system switching operation according to the system switching result generated by the current system.

[0060] In this embodiment, the entire system switching process is automated, from state detection to generation of system switching results to execution of system switching operations, which reduces the need for manual intervention and improves the response speed and accuracy of the system.

[0061] Optionally, the target state includes a master system state and a non-master system state, and the non-master system state includes a backup system state and a standby state.

[0062] Optionally, the state factors include a communication state and a working state, and calculating the local system state and the peer system state of each system specifically includes:

[0063] Detect the communication status between the two systems. If the communication is normal, calculate the local system status and peer system status of each system by detecting the working status of the system.

[0064] If the communication is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively;

[0065] If the communication is interrupted, the own system states of both systems are output as the master system state, and the peer system states of both systems are output as the standby state.

[0066] Among them, since the subsequent status factors require the two systems to perform data transmission for detection, the communication status of the two systems is detected first.

[0067] In this embodiment, the status factors are checked in order of priority from communication status to health status, ensuring that the key factors (communication status) are processed first, thereby ensuring the stable operation of the system.

[0068] In this embodiment, Figure 3 As shown in the figure, 6 general-purpose computers are used to build a 2x2-out-of-2 structure. There are three devices in each of the I and II series, which are defined as machine A, machine B, and machine C respectively. The two series realize the 2x hot standby redundancy function. Machines A and B in the series realize the 2-out-of-2 safety computing function, and machine C is used as a communication machine. The three devices in the series and the corresponding devices between the series are connected through redundant Ethernet. All communication interfaces of external devices are connected only to machine C in the two series through Ethernet.

[0069] Among them, when IA-I IA, I BI IB, and I CI IC are partially interrupted and partially normal, it is in a communication abnormality situation; when I AI IA, I BI IB, and I CI IC are all interrupted, it is in a communication interruption situation.

[0070] Optionally, the state factor also includes a synchronization state, and calculating the local system state and the peer system state of each system by detecting the working state of the system specifically includes:

[0071] Detect the working status between the two systems. If the working status is normal, calculate the local system status and the peer system status of each system by detecting the synchronization status between the two systems.

[0072] If the working state fails, the target state of one of the systems is defined as the main system state, and the target state of the other system is defined as the standby state, and the main system state and the counterpart system state of the two systems are generated and output accordingly.

[0073] In this embodiment, Figure 2 As shown, the dual system includes system I and system II; if the dual system working state fails and the current state is consistent (dual main system, dual backup system, dual standby), the target state of system I is defined as the main system state, and the target state of system II is defined as the standby state, and the system state and the system state of the two systems are generated and output accordingly;

[0074] If the working status of the two systems fails and is inconsistent (one system is the backup system and the other is on standby), the local system status and the opposite system status of the system in the backup system switching state will be output as the main system status and the standby status respectively, and the local system status and the opposite system status of the system in the standby state will be output as the standby status and the main system status respectively.

[0075] Optionally, the state factor also includes a system switching request, and calculating the local system state and the peer system state of each system by detecting the synchronization state between the two systems specifically includes:

[0076] Detecting the synchronization state between the two systems, and if the synchronization state is normal, calculating the local system state and the peer system state of each system through the system switching request;

[0077] If the synchronization state is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively.

[0078] Optionally, the state factor further includes a health state, and calculating the local system state and the peer system state of each system through the system switching request specifically includes:

[0079] Use application software to determine whether each system has a fault. If not, calculate the local system status and the peer system status of each system by detecting the health status of the two systems.

[0080] If one of the systems has a fault, the state of the own system and the state of the opposite system of the system with the fault are output as the standby state and the main system state respectively, and the state of the own system and the state of the opposite system of the system without the fault are output as the main system state and the standby state respectively;

[0081] If both systems have faults, the local system state and the opposite system state of the system in the main system state will be output as the main system state and the standby state respectively, and the local system state and the opposite system state of the system in the non-main system state will be output as the standby state and the main system state respectively.

[0082] In this embodiment, the system provides an interface for the application software, allowing the application software to send a switching request based on its own judgment. This enhances the flexibility and adaptability of the system, allowing the application layer to also participate in the system's fault management and switching process.

[0083] Optionally, the local system state and the peer system state of each system are calculated by detecting the health states of the two systems, specifically including:

[0084] Calculate the health values ​​of the two systems and determine whether the health values ​​of the two systems are equal. If they are not equal, output the system status and the counterpart system status of the system with a higher health value as the main system status and the backup system status respectively, and output the system status and the counterpart system status of the system with a lower health value as the backup system status and the main system status respectively.

[0085] In this embodiment, by calculating and comparing the health values ​​of the two systems, when both systems are normal but have different health levels, the healthier system can be selected as the primary system, further improving the reliability and stability of the system.

[0086] Optionally, the method for judging whether the tangent system calculation is correct is as follows:

[0087] The state judgment equation is used to judge whether the tangent system calculation is correct. The formula of the state judgment equation is as follows:

[0088] G 本系 =G′ 对系

[0089] G 对系 =G′ 本系

[0090] Optional, G 本系 Indicates the current system state, G 对系 Represents the current system state, G′ 对系 represents the state of the pair system calculated, G′ 本系 Indicates the state of the system calculated for the system;

[0091] If the tangent system is calculated correctly, then G 本系 As a result of the current system.

[0092] In this embodiment, the state judgment equation is used to verify and ensure that the calculation results of both parties are consistent. If the calculation results are inconsistent, it means that a fault has occurred. At this time, the system switching is not performed to prevent the occurrence of a faulty system switching scenario, and wait for the two systems to recalculate and interactively confirm. This double verification mechanism of the present invention reduces the possibility of misjudgment and improves the stability and security of the system.

[0093] In this embodiment, if the two systems have confirmed the switching result, the switching is immediately executed, and the working state of the system is directly modified to the confirmed target switching state of the system G. 本系 According to this rule, the system is modified to work in the target state G. 对系 , so far the complete switching logic is completed.

[0094] Based on Figure 1 Based on the same principle as the method shown in , the embodiment of the present invention also provides a dual-system hot standby switching system for a 2-by-2-out-of-2 structure, such as Figure 4 As shown in, including:

[0095] A state calculation module, used for periodically acquiring state factors of the two systems, and calculating the own system state and the counterpart system state of each system based on the state factors;

[0096] The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system;

[0097] The state transmission module is used for the two systems to send their own system states and counterpart system states calculated by each system to the other system;

[0098] The state judgment module is used to judge whether the system switching calculation is correct in each system according to the system state and the opposite system state calculated by the current system and the system state and the opposite system state sent by the other system. If correct, the system switching result is generated.

[0099] The system switching module, each system performs a system switching operation according to the system switching result generated by the current system.

[0100] The dual-system hot standby switching system for a 2x2-out-of-2 structure in an embodiment of the present invention can execute the dual-system hot standby switching method for a 2x2-out-of-2 structure provided in an embodiment of the present invention, and the implementation principle thereof is similar. The actions performed by each module and unit in the dual-system hot standby switching system for a 2x2-out-of-2 structure in each embodiment of the present invention correspond to the steps in the dual-system hot standby switching method for a 2x2-out-of-2 structure in each embodiment of the present invention. For the detailed functional description of each module of the dual-system hot standby switching system for a 2x2-out-of-2 structure, please refer to the corresponding description in the dual-system hot standby switching method for a 2x2-out-of-2 structure shown in the previous text, which will not be repeated here.

[0101] The modules involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a module does not limit the module itself in some cases.

[0102] Based on the same principle as the method shown in the embodiments of the present invention, an electronic device is also provided in the embodiments of the present invention, which may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.

[0103] The memory is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor. The processor is used to execute the application code stored in the memory to implement the content shown in the above method embodiment.

[0104] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.

[0105] According to another aspect of the present invention, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the implementation modes of the above-mentioned various embodiments.

[0106] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0107] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0108] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0109] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

Claims

1. A dual-system hot standby switching method for a 2x2-out-of-2 structure, characterized in that: include: Periodically acquiring state factors of the two systems, and calculating the own system state and the opposite system state of each system based on the state factors; The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system; The two systems send their own system states and counterpart system states calculated by each system to the other system respectively; In each system, according to the current system state and peer system state calculated by the current system and the peer system state sent by the other system, it is determined whether the system switching calculation is correct. If correct, a system switching result is generated. Each system performs a system switching operation according to the system switching result generated by the current system.

2. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 1, characterized in that: The target state includes a master system state and a non-master system state, and the non-master system state includes a backup system state and a standby state.

3. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 2, characterized in that: The state factors include communication state and working state. Calculating the local state and peer state of each system specifically includes: Detect the communication status between the two systems. If the communication is normal, calculate the local system status and peer system status of each system by detecting the working status of the system. If the communication is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively; If the communication is interrupted, the own system states of both systems are output as the master system state, and the peer system states of both systems are output as the standby state.

4. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 3, characterized in that: The state factors also include synchronization state, and the local state and peer state of each system are calculated by detecting the working state of the system, specifically including: Detect the working status between the two systems. If the working status is normal, calculate the local system status and the peer system status of each system by detecting the synchronization status between the two systems. If the working state fails, the target state of one of the systems is defined as the main system state, and the target state of the other system is defined as the standby state, and the main system state and the counterpart system state of the two systems are generated and output accordingly.

5. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 4, characterized in that: The state factor also includes a system switching request. The system state and peer state of each system are calculated by detecting the synchronization state between the two systems. Specifically, the following are included: Detecting the synchronization state between the two systems, and if the synchronization state is normal, calculating the local system state and the peer system state of each system through the system switching request; If the synchronization state is abnormal, the own system state and the opposite system state of the system in the master system state are output as the master system state and the standby state respectively, and the own system state and the opposite system state of the system in the non-master system state are output as the standby state and the master system state respectively.

6. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 5, characterized in that: The state factor also includes health status. The system status and peer status of each system are calculated through the system switching request, specifically including: Use application software to determine whether each system has a fault. If not, calculate the local system status and the peer system status of each system by detecting the health status of the two systems. If one of the systems has a fault, the state of the own system and the state of the opposite system of the system with the fault are output as the standby state and the main system state respectively, and the state of the own system and the state of the opposite system of the system without the fault are output as the main system state and the standby state respectively; If both systems have faults, the local system state and the opposite system state of the system in the main system state will be output as the main system state and the standby state respectively, and the local system state and the opposite system state of the system in the non-main system state will be output as the standby state and the main system state respectively.

7. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 6, characterized in that: By detecting the health status of the two systems, the local system status and the counterpart system status of each system are calculated, including: Calculate the health values ​​of the two systems and determine whether the health values ​​of the two systems are equal. If they are not equal, output the system status and the counterpart system status of the system with a higher health value as the main system status and the backup system status respectively, and output the system status and the counterpart system status of the system with a lower health value as the backup system status and the main system status respectively.

8. A dual-system hot standby switching method for a 2x2-out-of-2 structure according to claim 7, characterized in that: To judge whether the tangent system calculation is correct, we need to: The state judgment equation is used to judge whether the tangent system calculation is correct. The formula of the state judgment equation is as follows: G 本系 =G′ 对系 G 对系 =G′ 本系 Among them, G 本系 Indicates the current system state, G 对系 Represents the current system state, G′ 对系 represents the state of the pair system calculated, G′ 本系 Indicates the state of the system calculated for the system; If the tangent system is calculated correctly, then G 本系 As a result of the current system.

9. A dual-system hot standby switching system for a 2x2-out-of-2 structure, characterized in that: include: A state calculation module, used for periodically acquiring state factors of the two systems, and calculating the own system state and the counterpart system state of each system based on the state factors; The local system state is used for the target state of the current system, and the opposite system state is used to represent the target state of the other system except the current system; The state transmission module is used for the two systems to send their own system states and counterpart system states calculated by each system to the other system; The state judgment module is used to judge whether the system switching calculation is correct in each system according to the system state and the opposite system state calculated by the current system and the system state and the opposite system state sent by the other system. If correct, the system switching result is generated. The system switching module, each system performs a system switching operation according to the system switching result generated by the current system.

10. A dual-system hot standby switching system for a 2x2-out-of-2 structure according to claim 9, characterized in that: The status factors include communication status, working status, synchronization status, handoff request and health status.