An abnormal recovery method, device and equipment of a primary and backup machine and a storage medium

By real-time detection and automatic switching of the primary and backup machine's operating status in the message center's automatic recovery mechanism, the problems of low efficiency and high manpower cost of primary and backup machine abnormal recovery are solved, achieving efficient and stable abnormal recovery.

CN115695154BActive Publication Date: 2025-11-25CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211136786.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2025-11-25
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

When the primary and backup machines fail, existing technologies require manual restoration of the primary and backup machines to their initial state, resulting in low recovery efficiency and high labor costs.

Method used

By detecting the operating status of the primary and backup machines in real time when the automatic recovery mechanism of the message center is activated, and automatically switching their role status, the abnormal recovery of the primary and backup machines can be realized, avoiding manual intervention.

Benefits of technology

It improved the efficiency of anomaly recovery, reduced labor costs, and ensured the stable operation of the business and the stability of recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695154B_ABST
    Figure CN115695154B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an abnormal recovery method and device of a master and backup machine, equipment and a storage medium, relating to the technical field of task scheduling. The method comprises the following steps: when an automatic recovery mechanism of a message center is started, detecting running states of a master and a backup machine in a service system. If the running state of the master is closed, the running state of the backup machine is started, and the backup machine is in a master role state, starting the master to make the master in a backup role state; then closing the backup machine to make the master switch from the backup role state to the master role state, and starting the backup machine to make the backup machine in the backup role state. When the master is abnormally closed, the automatic recovery mechanism is used to automatically start the master, and the master is recovered to the master role state, and the backup machine is switched to the backup role state, so that the initial state of the master and the backup machine is automatically recovered when the master is abnormally closed, and the initial state of the master and the backup machine does not need to be manually recovered, thereby improving the efficiency of abnormal recovery, reducing the labor cost, and ensuring the stable operation of the business.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of task scheduling, and particularly relates to an abnormal recovery method and device of a master and a backup machine, an equipment and a storage medium. BACKGROUND

[0002] As a new generation of message transmission hub, the message center reduces the coupling degree between applications, improves the application business bearing capacity and concurrent processing capacity. In order to ensure the service quality of the message center, the message center adopts a master-slave mode, that is, the minimum service unit of the message center is two machines, which are a master and a backup machine. When the master machine is abnormal, the backup machine provides services to the outside.

[0003] However, when the master and backup machines are abnormal, the initial state of the master and backup machines (the master is a master role state program, and the backup is a backup role state program) needs to be manually restored, which results in low efficiency of abnormal recovery and high labor cost. SUMMARY

[0004] Embodiments of the present application provide an abnormal recovery method and device of a master and a backup machine, an equipment and a storage medium, which are used to automatically recover when the master and backup machines are abnormal, thereby improving the efficiency of abnormal recovery and reducing labor cost.

[0005] In one aspect, the present application provides an abnormal recovery method of a master and a backup machine, comprising:

[0006] When an automatic recovery mechanism of the message center is started, the running states of the master and the backup machine in a service system are detected, and the service system is located in the message center;

[0007] If the running state of the master is closed, the running state of the backup machine is started, and the backup machine is in a master role state, the master is started to make the master in a backup role state;

[0008] The backup machine is closed to make the master switch from the backup role state to the master role state;

[0009] The backup machine is started to make the backup machine in a backup role state.

[0010] In the embodiment of the present application, when the automatic recovery mechanism of the message center is started, the running states of the master and the backup in the real-time detection service system are detected. When the master is abnormally closed, the master is automatically started, and the master is recovered to the master role state, and the backup is switched to the backup role state, so that the initial state of the master and the backup is automatically recovered when the master is abnormally closed, and the initial state of the master and the backup does not need to be manually recovered, thereby improving the efficiency of abnormal recovery, reducing the labor cost, and ensuring the stable operation of the business. The running states and the role states of the master and the backup are combined to automatically recover the master and the backup, so that the state conflict when the master and the backup are individually recovered is avoided, thereby improving the stability of abnormal automatic recovery.

[0011] Optionally, the method further comprises:

[0012] If the running state of the master is starting, and the running state of the backup is closing, the backup is started so that the backup is in the backup role state.

[0013] In the embodiment of the present application, when the master is normally running, and the backup is in the closing state, the backup is automatically started and recovered to the backup role state, so that the service system always maintains the running state of the master-backup mode, thereby when the master fails, the backup can continue to provide services, and the stable operation of the business is ensured.

[0014] Optionally, the method further comprises:

[0015] If the running state of the master is starting, and the master is in the backup role state, and the running state of the backup is starting, and the backup is in the master role state, the backup is closed so that the master is switched from the backup role state to the master role state.

[0016] The backup is started so that the backup is in the backup role state.

[0017] In the embodiment of the present application, when the master is in the backup role state, and the backup is in the master role state, the master is switched to the master role state by closing the backup, and the backup is in the backup role state by starting the backup, so that the master and the backup are automatically recovered to the initial state, and the initial state of the master and the backup does not need to be manually recovered, thereby the efficiency of abnormal recovery can be improved, the labor cost is reduced, and the service system provides stable services.

[0018] Optionally, the method further comprises:

[0019] If the running state of the master is closing, and the running state of the backup is closing, no processing is performed.

[0020] In the embodiment of the present application, when the running states of the master and the backup are both closing, this state is by default the active maintenance time, and no processing is performed, thereby reducing the influence of the automatic recovery mechanism on other running mechanisms of the system.

[0021] Optionally, before the message center's automatic recovery mechanism is activated, the following also applies:

[0022] It is confirmed that the message encryption component of the message center is in normal working order.

[0023] In this embodiment of the application, before the automatic recovery mechanism is executed, it is first determined whether the encryption component of the message center is in a normal state, so as to ensure that the message center can start normally, thereby ensuring that the automatic recovery mechanism starts normally, thus enhancing the reliability of the automatic recovery mechanism.

[0024] Optionally, it also includes:

[0025] The automatic recovery mechanism is triggered by parameterized settings.

[0026] In this embodiment, the automatic recovery mechanism is triggered to start or stop by setting parameters, without the need for manual start or stop, thereby improving the efficiency of the automatic recovery mechanism and ensuring its safe and reliable operation.

[0027] On one hand, embodiments of this application provide an anomaly recovery device for primary and backup machines, the device comprising:

[0028] The detection module is used to detect the operating status of the host and standby machines in the service system when the automatic recovery mechanism of the message center is activated. The service system is located in the message center.

[0029] The startup module is used to start the host so that the host is in the standby role if the host is in the off state, the standby is in the startup state, and the standby is in the primary role state.

[0030] The shutdown module is used to shut down the backup machine so that the host machine switches from the backup role state to the host role state.

[0031] The startup module is also used to start the standby machine so that the standby machine is in standby role status.

[0032] Optionally, the startup module is further configured to:

[0033] If the host machine is in the "start" state and the standby machine is in the "shutdown" state, then the standby machine is started to put it into standby mode.

[0034] Optionally, the closing module is further configured to:

[0035] If the host is running in the "start" state and is in the "standby" state, and the standby machine is running in the "start" state and is in the "primary" state, then the standby machine is shut down so that the host switches from the "standby" state to the "primary" state.

[0036] The startup module is also used for:

[0037] Start the standby machine to put it into standby mode.

[0038] Optionally, the detection module is further configured to:

[0039] If both the host and the standby host are in a shutdown state, no action is taken.

[0040] Optionally, the detection module is further configured to:

[0041] It is confirmed that the message encryption component of the message center is in normal working order.

[0042] Optionally, the detection module is further configured to:

[0043] The automatic recovery mechanism is triggered by parameterized settings.

[0044] On one hand, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method for abnormal recovery of a primary and backup machine.

[0045] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the above-described primary / backup machine abnormal recovery method.

[0046] On one hand, embodiments of this application provide a computer program product, the computer program product including a computer program stored on a computer-readable storage medium, the computer program including program instructions, which, when executed by a computer device, cause the computer device to perform the steps of the above-described method for abnormal recovery of the primary and backup machines.

[0047] In this embodiment, when the automatic recovery mechanism of the message center is activated, the operating status of the primary and backup machines in the service system is monitored in real time. If the operating status of the primary and / or backup machines is abnormal, the initial state of the primary and backup machines is automatically restored without manual restoration, thereby improving the efficiency of anomaly recovery and reducing labor costs. Before the automatic recovery mechanism is executed, it is first determined whether the encryption component of the message center is in a normal state to ensure that the message center can start normally, thus ensuring the normal startup of the automatic recovery mechanism and enhancing its reliability. The automatic recovery mechanism is triggered to start or stop through parameter settings, eliminating the need for manual activation or deactivation, thereby improving its efficiency and ensuring its secure and reliable operation. Attached Figure Description

[0048] Figure 1 A system architecture diagram provided for an embodiment of this application;

[0049] Figure 2 A flowchart illustrating a method for abnormal recovery of a primary and backup machine provided in this application embodiment. Figure 1 ;

[0050] Figure 3 This application provides a schematic diagram of various scenarios for primary and backup machines in its embodiments.

[0051] Figure 4 A flowchart illustrating a method for abnormal recovery of a primary and backup machine provided in this application embodiment. Figure 2 ;

[0052] Figure 5 A schematic diagram of the structure of a fault recovery device for a primary / standby machine provided in an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0054] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] refer to Figure 1 This is a system architecture diagram applicable to the embodiments of this application. The system includes at least a terminal device 101 and a message center 102. The number of terminal devices 101 can be one or more.

[0056] The terminal device 101 has business applications pre-installed in it. The terminal device 101 can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to these.

[0057] Message center 102 provides services for business applications. Message center 102 includes multiple service systems 103, each service system 103 including a primary system 104 and a backup system 105.

[0058] The primary server 104 and the backup server 105 can be a server cluster or a distributed system composed of multiple physical servers, or they can be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 101 and the message center 102 can be directly or indirectly connected via wired or wireless communication, which is not limited herein. The fault recovery method for the primary and backup servers in this embodiment is applicable to each service system 103 in the message center 102. It should be noted that the acquisition, storage, use, and processing of data in the message center in this application comply with the relevant provisions of national laws and regulations.

[0059] based on Figure 1 The system architecture diagram shown in this application illustrates the flowchart of a method for abnormal recovery of primary and backup machines. Figure 2 As shown, the process of this method is executed by a computer device, which can be... Figure 1 The message center shown includes the following steps:

[0060] Step 201: When the automatic recovery mechanism of the message center is started, check the running status of the primary and backup machines in the service system.

[0061] Specifically, the server system resides in the message center. The message center uses a master-slave model, with the smallest allocation unit (server system) consisting of two machines: one master (running a program designated as the master) and one standby (running a program designated as the standby). Configuration updates can only be performed when the master is in the master role; the master and standby roles cannot be interchanged. When both machines start up, the machine that starts first assumes the master role, and the machine that starts later assumes the standby role. If a program on one of the machines terminates abnormally, the machine that did not experience an abnormal termination assumes the master role.

[0062] In some embodiments, the operating states of the primary and backup machines in the service system can be categorized into the following scenarios:

[0063] 1. Normal scenario: The primary machine starts up, and after a period of time, the standby machine starts up. Both are in the startup state, with the primary machine in the primary role and the standby machine in the standby role.

[0064] 2. Abnormal Scenario 1: The primary machine fails, and the backup machine is promoted to the primary role;

[0065] 3. Abnormal Scenario 2: The primary server is normal, the backup server fails, and the primary server remains in the primary role.

[0066] 4. Abnormal Scenario 3: The standby machine starts first, and the primary machine starts later, so the primary machine is in standby role and the standby machine is in primary role.

[0067] For example, such as Figure 3 As shown, after the program starts, the primary and backup machines can be in different states. When the primary machine starts and the backup machine also starts, with the primary machine in the primary role and the backup machine in the backup role, this is the normal scenario; when the primary machine and the backup machine shut down normally or abnormally, the corresponding program shuts down.

[0068] When the primary machine is not started, but the backup machine is started and the backup machine is in the primary role, this is abnormal scenario 1; when the backup machine is shut down normally or abnormally, the corresponding program is closed.

[0069] When the primary machine starts up but the backup machine does not, and the primary machine is in the primary role, this is abnormal scenario 2; when the primary machine shuts down normally or abnormally, the corresponding program shuts down.

[0070] When the standby machine starts first, followed by the primary machine, and the standby machine is in the primary role while the primary machine is in the backup role, this is abnormal scenario 3. When the primary and standby machines shut down normally or abnormally, the corresponding programs close.

[0071] In some embodiments, the automatic recovery mechanism can be triggered to start or stop by parameterization settings.

[0072] In this embodiment, the automatic recovery mechanism is triggered to start or stop by setting parameters, without the need for manual start or stop, thereby improving the efficiency of the automatic recovery mechanism and ensuring its safe and reliable operation.

[0073] Step 202: If the host machine is in a shutdown state and the standby machine is in a startup state, and the standby machine is in the host role state, then start the host machine to put the host machine in the standby role state.

[0074] Specifically, when the primary machine is in a shutdown state, the standby machine is in a startup state, and the standby machine is in the primary role state, it indicates that the above-mentioned abnormal scenario 1 has occurred. Then, the primary machine is started to put it in the standby role state. At this time, the primary machine is in the standby role state, while the standby machine is in the primary role state, thus changing from the above-mentioned abnormal scenario 1 to abnormal scenario 3.

[0075] Step 203: Shut down the standby machine to switch the primary machine from standby role to primary role.

[0076] Specifically, after the standby machine is shut down, the retained primary machine automatically switches from standby role to primary role. At this time, the primary machine starts up and is in primary role, while the standby machine is shut down, thus changing from the above-mentioned abnormal scenario 3 to abnormal scenario 2.

[0077] Step 204: Start the standby machine to put it into standby mode.

[0078] Specifically, once the host machine has been restored to the primary role, the standby machine is then started, thereby restoring the standby machine to the standby role, that is, restoring from the above abnormal scenario 2 to the above normal scenario 1.

[0079] In this embodiment, when the automatic recovery mechanism of the message center is activated, the operating status of the primary and backup machines in the service system is monitored in real time. When the primary machine shuts down abnormally, it is automatically restarted and restored to its primary role, while the backup machine is switched to its backup role. This achieves automatic restoration of the initial states of the primary and backup machines when the primary machine shuts down abnormally, eliminating the need for manual restoration. This improves the efficiency of abnormal recovery, reduces labor costs, and ensures stable business operation. By combining the operating and role states of the primary and backup machines for automatic recovery, state conflicts that occur when the primary and backup machines recover independently are avoided, thereby improving the stability of automatic abnormal recovery.

[0080] In some embodiments, if the host machine is in the running state of "start" and the standby machine is in the running state of "shutdown", then the standby machine is started to put the standby machine into standby role state.

[0081] Specifically, when the host machine is in the "start" state and the standby machine is in the "shutdown" state, the host machine is in the primary role state, indicating that the above-mentioned abnormal scenario 2 has occurred. At this time, starting the standby machine to put it in the standby role state can restore the system from the above-mentioned abnormal scenario 2 to the above-mentioned normal scenario 1.

[0082] In this embodiment, when the host is running normally and the standby is off, the standby is automatically started and restored to standby role status, so that the service system always maintains the primary and standby mode operation state. Thus, when the host fails, the standby can continue to provide services, ensuring the stable operation of the business.

[0083] In some embodiments, if the host is running in the startup state and the host is in the standby role state, and the standby machine is running in the startup state and the standby machine is in the primary role state, then the standby machine is shut down to switch the host from the standby role state to the primary role state, and then the standby machine is started to put the standby machine in the standby role state.

[0084] Specifically, when the host machine is in the startup state and in the standby role state, and the standby machine is in the startup state and in the primary role state, it indicates that the above-mentioned abnormal scenario 3 has occurred. At this time, shut down the standby machine to switch the host machine from the standby role state to the primary role state, that is, change from the above-mentioned abnormal scenario 3 to abnormal scenario 2. Then start the standby machine to put the standby machine in the standby role state, and you can recover from the above-mentioned abnormal scenario 2 to the normal scenario 1.

[0085] In this embodiment, when the host is in standby mode and the standby machine is in primary mode, the host is switched to primary mode by shutting down the standby machine and then restarting the standby machine to return to standby mode. This allows the host and standby machines to automatically return to their initial states without the need for manual restoration. This improves the efficiency of anomaly recovery, reduces labor costs, and ensures that the service system provides stable service.

[0086] In some embodiments, if both the host and the standby host are in a shutdown state, no action is taken.

[0087] Specifically, when both the primary and backup machines are shut down, the system will default to this time as the system's active maintenance period, so the automatic recovery mechanism will not respond.

[0088] In this embodiment of the application, when both the primary and backup machines are in a closed state, this state is assumed to be active maintenance time, and no processing is performed, thereby reducing the impact of the automatic recovery mechanism on other operating mechanisms of the system.

[0089] In some embodiments, in order to ensure that the automatic recovery mechanism starts smoothly, the message encryption component of the message center is determined to be in a normal state before the automatic recovery mechanism of the message center starts.

[0090] Specifically, since the normal operation of the message center depends on the state of the message encryption component, and the activation of the automatic recovery mechanism depends on the activation of the message center, the state of the message encryption component is a condition for the automatic recovery mechanism to operate. Therefore, before the automatic recovery mechanism of the message center is activated, it is first determined that the message encryption component of the message center is in a normal state, then the message center is started, and subsequently the automatic recovery mechanism is activated. It should be noted that the message center is not limited to relying solely on the message encryption component to start. When the message center also depends on the state of other components to start, the state of those other components also needs to be checked as a condition for the automatic recovery mechanism to activate. This application does not specifically limit this.

[0091] In this embodiment of the application, before the automatic recovery mechanism is executed, it is first determined whether the encryption component of the message center is in a normal state, so as to ensure that the message center can start normally, thereby ensuring that the automatic recovery mechanism starts normally, thus enhancing the reliability of the automatic recovery mechanism.

[0092] In some embodiments, the automatic recovery mechanism does not conflict with the application-active maintenance window of the message center. When the message center starts or stops, the automatic recovery mechanism can be turned on and off accordingly. By periodically checking and judging the automatic recovery mechanism and routine system maintenance actions, the automatic recovery mechanism is not executed when routine system maintenance actions are performed, thereby minimizing the impact of the automatic recovery mechanism on other system operating mechanisms.

[0093] To better explain the embodiments of this application, the following describes a method for abnormal recovery of a primary and backup machine provided by the embodiments of this application, in conjunction with a specific implementation scenario. The process of this method can be described by: Figure 1 The message center service system shown executes as follows: Figure 4 As shown:

[0094] Step 401: Set parameters to enable or disable the automatic recovery mechanism.

[0095] Step 402: Determine whether the message encryption component is in a normal state. If yes, proceed to step 403; otherwise, proceed to step 405.

[0096] Step 403: Determine whether the application is in active maintenance state. If yes, proceed to step 405; otherwise, proceed to step 404.

[0097] Step 404: Determine whether the system is in routine maintenance mode. If yes, proceed to step 405; otherwise, proceed to step 406.

[0098] Step 405: Stop the automatic recovery mechanism from starting.

[0099] Step 406: When the primary machine is shut down, the standby machine is started, and the standby machine is in the primary role state, start the primary machine to put the primary machine in the standby role state.

[0100] Step 407: Shut down the standby machine to put the primary machine in the primary role.

[0101] Step 408: Start the standby machine to put it into standby role status.

[0102] Step 409: When the primary machine is started, the standby machine is shut down, and the primary machine is in the primary role state, start the standby machine so that the standby machine is in the standby role state.

[0103] Step 410: When the primary machine starts up, the standby machine starts up, and the standby machine is in the primary role state while the primary machine is in the standby role state, shut down the standby machine to make the primary machine be in the primary role state.

[0104] Step 411: Start the standby machine to put it into standby role status.

[0105] In this embodiment, when the automatic recovery mechanism of the message center is activated, the operating status of the primary and backup machines in the service system is monitored in real time. If the operating status of the primary and / or backup machines is abnormal, the initial state of the primary and backup machines is automatically restored without manual restoration, thereby improving the efficiency of anomaly recovery and reducing labor costs. Before the automatic recovery mechanism is executed, it is first determined whether the encryption component of the message center is in a normal state to ensure that the message center can start normally, thus ensuring the normal startup of the automatic recovery mechanism and enhancing its reliability. The automatic recovery mechanism is triggered to start or stop through parameter settings, eliminating the need for manual activation or deactivation, thereby improving its efficiency and ensuring its secure and reliable operation.

[0106] Based on the same technical concept, embodiments of this application provide a fault recovery device for primary and backup machines, such as... Figure 5 As shown, the device 500 includes:

[0107] The detection module 501 is used to detect the operating status of the host and standby machines in the service system when the automatic recovery mechanism of the message center is started.

[0108] The startup module 502 is used to start the host so that the host is in the standby role state if the host is in the off state, the standby is in the startup state, and the standby is in the primary role state.

[0109] Shutdown module 503 is used to shut down the standby machine to switch the master machine from the standby role state to the master role state;

[0110] The startup module 502 is also used to start the standby machine so that the standby machine is in standby role state.

[0111] Optionally, the startup module 502 is further configured to:

[0112] If the host machine is in the "start" state and the standby machine is in the "shutdown" state, then the standby machine is started to put it into standby mode.

[0113] Optionally, the closing module 503 is further configured to:

[0114] If the host is running in the "start" state and is in the "standby" state, and the standby machine is running in the "start" state and is in the "primary" state, then the standby machine is shut down so that the host switches from the "standby" state to the "primary" state.

[0115] Optionally, the startup module 502 is further configured to:

[0116] Start the standby machine to put it into standby mode.

[0117] Optionally, the detection module 501 is further configured to:

[0118] If both the host and the standby host are in a shutdown state, no action is taken.

[0119] Optionally, the detection module 501 is further configured to:

[0120] It is confirmed that the message encryption component of the message center is in normal working order.

[0121] Optionally, the detection module 501 is further configured to:

[0122] The automatic recovery mechanism is triggered by parameterized settings.

[0123] In this embodiment, an automatic recovery mechanism is employed, eliminating the need for manual restoration of the primary and backup machines to their initial states. This improves the efficiency of anomaly recovery and reduces labor costs. Secondly, when the roles of primary and backup machines are swapped, the automatic recovery mechanism can still restore the backup machine to its backup role and the primary machine to its primary role, maintaining the original roles and improving the efficiency of tasks that previously relied on sequential execution. Before executing the automatic recovery mechanism, it is necessary to determine whether the encryption component of the message center is in a normal state. The state of the encryption component determines whether to execute the automatic recovery mechanism. The automatic recovery mechanism also relies on parameter settings; triggering the automatic recovery mechanism by setting these parameters enhances the rigor of the service system and strengthens the reliability of the automatic recovery mechanism.

[0124] Based on the same technical concept, embodiments of this application provide a computer device, which may be a terminal or a server, such as... Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to at least one processor. In this embodiment, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 Taking the connection between processor 601 and memory 602 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.

[0125] In this embodiment of the application, the memory 602 stores instructions that can be executed by at least one processor 601. By executing the instructions stored in the memory 602, at least one processor 601 can perform the steps included in the above-described method for abnormal recovery of the primary and backup machines.

[0126] The processor 601 is the control center of the computer device, capable of connecting various parts of the computer device via various interfaces and lines. It performs primary / backup fault recovery by running or executing instructions stored in the memory 602 and retrieving data stored in the memory 602. Optionally, the processor 601 may include one or more processing units. The processor 601 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.

[0127] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0128] Memory 602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 602 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 602 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0129] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the above-described method for abnormal recovery of the primary and backup machines.

[0130] Based on the same inventive concept, this application provides a computer program product, characterized in that the computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer device, the computer device performs the steps of the above-described abnormal recovery method for primary and backup machines.

[0131] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0132] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0135] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for abnormal recovery of primary and backup machines, characterized in that, include: It is confirmed that the message encryption component of the message center is in a normal state, and the state of the message encryption component is a condition for the automatic recovery mechanism to operate; The automatic recovery mechanism does not conflict with the application active maintenance window of the message center, and the automatic recovery mechanism is not executed when the system performs routine maintenance actions; When the automatic recovery mechanism of the message center is activated, the operating status of the primary and backup machines in the service system is detected. The service system is located in the message center, which operates in a primary / backup mode. If the host machine is in a shutdown state, the standby machine is in a startup state, and the standby machine is in a primary role state, then the host machine is started to put the host machine into a standby role state. Shutting down the backup machine allows the primary machine to switch from the backup role state to the primary role state. Start the standby machine to put it into standby mode.

2. The method as described in claim 1, characterized in that, Also includes: If the host machine is in the "start" state and the standby machine is in the "shutdown" state, then the standby machine is started to put it into standby mode.

3. The method as described in claim 1, characterized in that, Also includes: If the host is in the running state of being started and the host is in the standby role state, and the standby machine is in the running state of being started and the standby machine is in the primary role state, then the standby machine is shut down so that the host switches from the standby role state to the primary role state; Start the standby machine to put it into standby mode.

4. The method as described in claim 1, characterized in that, Also includes: If both the host and the standby host are in a shutdown state, no action is taken.

5. The method as described in claim 1, characterized in that, Also includes: The automatic recovery mechanism is triggered by parameterized settings.

6. A fault recovery device for a primary / standby machine, characterized in that, include: The detection module is used to determine that the message encryption component of the message center is in a normal state, and the state of the message encryption component is a condition for the automatic recovery mechanism to operate. The automatic recovery mechanism does not conflict with the application active maintenance window of the message center, and the automatic recovery mechanism is not executed when the system performs routine maintenance actions; When the automatic recovery mechanism of the message center is activated, the operating status of the primary and backup machines in the service system is detected. The service system is located in the message center, which operates in a primary / backup mode. The startup module is used to start the host so that the host is in the standby role if the host is in the off state, the standby is in the startup state, and the standby is in the primary role state. The shutdown module is used to shut down the backup machine so that the host machine switches from the backup role state to the host role state. The startup module is also used to start the standby machine so that the standby machine is in standby role status.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the method according to any one of claims 1 to 5.

9. A computer program product, characterized in that, The computer program product includes a computer program stored on a computer-readable storage medium, the computer program including program instructions that, when executed by a computer device, cause the computer device to perform the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for providing service redundancy between a master server and slave server

    CN110865907A