Disaster recovery method, terminal equipment and storage medium
By deploying equipment in the main and backup sites of the 5G network, using network equipment to interact with heartbeat information, and implementing site status monitoring and switching, the problems of waste of resources and low versatility in the existing technology are solved, and efficient disaster recovery system operation is achieved.
Patent Information
- Application Number
- CN202311014095.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-25
AI Technical Summary
Among the existing disaster recovery technologies, the reuse rate of arbitration sites is extremely low, resulting in serious resource waste. The use of network equipment to undertake arbitration functions requires design and upgrade based on communication protocols, resulting in a significant reduction in the universality of network equipment.
By deploying the first and second devices in the main site and the standby site, and using network devices to interact with heartbeat information, monitoring and switching of site status is achieved, the need to set up an additional arbitration site is avoided.
It greatly reduces resource waste, improves the universality of network equipment, and solves the problem of arbitration single point of failure, ensuring the normal operation of the disaster recovery system.
Smart Images

Figure CN119520235A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a disaster recovery method, terminal equipment and storage medium. Background Art
[0002] With the development of 5G technology, the demand for network data security control and data disaster recovery is becoming increasingly urgent. Currently, the deployment of microservices and containers on Platform as a Service (PaaS) has become the basic management architecture specification of 5G. In the process of developing disaster recovery technology that meets the constraints of PaaS infrastructure, it is necessary to purchase servers and software to deploy arbitration sites separately to manage the primary and backup sites, and the arbitration sites set up can no longer be used for other purposes, so the reuse rate is extremely low, resulting in serious waste of resources. When a single point failure occurs at the arbitration site itself, it can no longer play an arbitration role in the disaster recovery system.
[0003] In order to solve the problem of waste of resources caused by setting up a separate arbitration site, the arbitration function is currently performed by network equipment between the primary site and the backup site. However, the network equipment needs to be designed and upgraded based on the communication protocol, which greatly reduces the versatility of the network equipment. Summary of the invention
[0004] The main purpose of the present application is to provide a disaster recovery method, terminal equipment and storage medium, which are used to solve the problem that the existing arbitration function is performed by network equipment between the primary site and the backup site, but the network equipment needs to be designed and upgraded based on the communication protocol, resulting in a significant decrease in the versatility of the network equipment.
[0005] In a first aspect, an embodiment of the present application provides a disaster recovery method, which is applied to a first device at a first site, wherein the first site includes the first device and a first disaster recovery component, the first device is communicatively connected to a network device, the second site includes the second device and a second disaster recovery component, the network device is communicatively connected to the second device, the first device interacts with the first disaster recovery component for first heartbeat information and generates first site information based on the first heartbeat information and sends it to the network device, the second device interacts with the second disaster recovery component for second heartbeat information and generates second site information based on the second heartbeat information and sends it to the network device, wherein the first site is a backup site and the second site is a primary site; the method includes:
[0006] Acquire reception result information about the second site information fed back by the network device;
[0007] According to the receiving result information, it is determined whether to switch the first site to a primary site.
[0008] In a second aspect, an embodiment of the present application provides a disaster recovery method, which is applied to a second device at a second site, wherein the second site includes the second device and a second disaster recovery component, the first site includes the first device and a first disaster recovery component, the first device is communicatively connected to a network device, the network device is communicatively connected to a second device at the second site, the first device interacts with the first disaster recovery component for first heartbeat information and generates first site information based on the first heartbeat information and sends it to the network device, the second device interacts with the second disaster recovery component for second heartbeat information and generates second site information based on the second heartbeat information and sends it to the network device, wherein the first site is a backup site and the second site is an active site; the method includes:
[0009] Sending an information query request to the network device, wherein the information query request is used to obtain status information about the network device fed back by the network device;
[0010] If the state information fed back by the network device based on the information query request is not received, the second site is switched to a standby site.
[0011] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing a connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the disaster recovery method provided in the first aspect are implemented, or the steps of the disaster recovery method provided in the second aspect are implemented.
[0012] In a fourth aspect, an embodiment of the present application provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the disaster recovery method provided in the first aspect, or to implement the steps of the disaster recovery method provided in the second aspect.
[0013] The main purpose of the embodiment of the present application is to provide a disaster recovery method, a terminal device and a storage medium, which aims to solve the problem that the reuse rate of the arbitration site deployed separately in the research and development process of the existing disaster recovery technology is extremely low, resulting in serious waste of resources, and the use of network equipment to undertake the arbitration function needs to be designed and upgraded based on the communication protocol, resulting in a significant decrease in the versatility of the network equipment. The disaster recovery method provided is applied to the first device of the first site, the first site includes a first device and a first disaster recovery component, the first device is connected to the network device in communication, the second site includes a second device and a second disaster recovery component, the network device is connected to the second device in communication, the first device and the first disaster recovery component interact with the first heartbeat information and generate the first site information based on the first heartbeat information and send it to the network device, the second device and the second disaster recovery component interact with the second heartbeat information and generate the second site information based on the second heartbeat information and send it to the network device. The method provided obtains the reception result information about the second heartbeat information fed back by the network device through the first device; according to the reception result information, it is determined whether to switch the first site to the main site. By obtaining the reception result information of the second heartbeat information sent by the primary site by the network device through the first device of the backup site, the backup site can confirm whether it needs to be upgraded to the primary site according to the reception status of the second heartbeat information to ensure the normal operation of the disaster recovery method. The disaster recovery method provided does not require the additional arbitration site to be set up, thereby greatly reducing resource waste, and also simplifies the demand for network equipment and improves the versatility of network equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic block diagram of the structure of a disaster recovery system provided by an embodiment of the present application;
[0015] Figure 2 It is a schematic diagram of an interface of an arbitration agent software provided in an embodiment of the present application;
[0016] Figure 3 It is a structural schematic diagram of a device provided in an embodiment of the present application;
[0017] Figure 4 This is a working diagram of a disaster recovery system provided by an embodiment of the present application;
[0018] Figure 5 This is a schematic flow chart of the steps of a disaster recovery method provided by an embodiment of the present application;
[0019] Figure 6 is a schematic flow chart of steps of another disaster recovery method provided by an embodiment of the present application;
[0020] Figure 7 is a schematic flow chart of the steps of a site switching method provided in an embodiment of the present application;
[0021] Figure 8 It is a schematic flow chart of the steps of a working status confirmation method provided by an embodiment of the present application;
[0022] Fig. 9 is a schematic flow chart of steps of another site switching method provided in an embodiment of the present application;
[0023] Fig.10 is a schematic flow chart of steps of another disaster recovery method provided by an embodiment of the present application;
[0024] Fig.11 It is a schematic block diagram of a terminal device provided in an embodiment of the present application.
[0025] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0028] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be understood that, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first site and the second site are only used to distinguish different sites, and their order is not limited. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit them to be different.
[0030] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0031] To facilitate understanding of the embodiments of the present application, some words involved in the embodiments of the present application are briefly explained below.
[0032] 1. Disaster recovery: Disaster recovery is a relatively broad concept. In a broad sense, disaster recovery is a system engineering, including all contents related to business continuity. For IT, disaster recovery is to provide a computer system that can prevent the user's business system from being damaged by various disasters. In a narrow sense, disaster recovery refers to the establishment of two or more sets of IT systems with the same functions, which can monitor the health status and switch functions with each other. When the main site stops working due to an accident (such as fire, earthquake, city power outage, etc.), the entire application system can use the backup site to quickly recover and continue to work. The main purpose of disaster recovery is to ensure business continuity as much as possible when a disaster occurs in the production system due to natural or man-made reasons.
[0033] The component used to switch the working status of the primary site and the backup site is called a disaster recovery component.
[0034] 2. Network equipment: Common IT / CT equipment in the network, characterized by being used for data record storage and supporting arbitration agents to write, update and query the records. It can be structured database storage or unstructured data storage. Structured database storage includes but is not limited to relational databases and non-relational database data tables; unstructured data storage includes but is not limited to text, XML, HTML, JSON, and various reports.
[0035] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0036] With the development of 5G technology, the demand for network data security control and data disaster recovery is becoming increasingly urgent. Currently, deployment in the form of microservices and containers on Platform as a Service (PaaS) has become the basic management architecture specification for telecommunications 5G. Disaster recovery technology also needs to keep pace with the times to meet the disaster recovery requirements under the constraints of this infrastructure. Existing disaster recovery technology has the following problems:
[0037] 1. High cost. A separate arbitration site needs to be deployed, which not only requires the purchase of servers and software deployment, but also requires special maintenance.
[0038] 2. The reuse rate is low. The dedicated arbitration node cannot be used for other purposes. The reuse rate is extremely low, resulting in serious waste of resources.
[0039] 3. Single point failure. There is already active-standby disaster recovery control technology. After adding an arbitration site, a three-site mode is formed, which enhances the reliability of disaster recovery status judgment. However, there is a single arbitration site failure, that is, the arbitration site itself fails, and the arbitration site cannot play an arbitration role.
[0040] 4. Low universality. Although there are disaster recovery technologies that use network equipment to perform arbitration functions, network equipment requires special design and upgrades, which has a high threshold. Not only is it not universal, but it also has a great impact on the existing network.
[0041] To solve the above problems, please refer to Figure 1 , Figure 1 The structural schematic block diagram of a disaster recovery system 10 provided by an embodiment of the present application is shown. The disaster recovery system 10 includes a first site 11, a second site 12 and a network device 13. The first site 11 includes a first device 111 and a first disaster recovery component 112, and the first device 111 is communicatively connected to the network device 13. The second site 12 includes a second device 121 and a second disaster recovery component 122. The network device 13 is communicatively connected to the second device 121, the first device 111 and the first disaster recovery component 112 exchange first heartbeat information and generate first site information based on the first heartbeat information and send it to the network device 13, the second device 121 and the second disaster recovery component 122 exchange second heartbeat information and generate second site information based on the second heartbeat information and send it to the network device 13, wherein the first site 11 is a backup site, and the second site 12 is an active site.
[0042] Specifically, the first site 11 and the second site 12 include multiple terminal devices, and one terminal device is selected in each of the two sites to install arbitration agent software, so as to serve as the first device 111 and the second device 121. The network device 13 is connected to the first device 111 and the second device 121, and supports the first device 111 and the second device 121 to write, update and query arbitration agent information.
[0043] It should be noted that the first device 111 and the second device 121, as the arbitration agent side in the disaster recovery system 10, provide compatible common network equipment communication protocols, including but not limited to telent, ssh, netconf, QX, jdbc, and TNS. Through these protocols, the parsed heartbeat information of the device and the disaster recovery component is written and updated into the network device 13, and the written information is queried from the network device 13. At the same time, the relevant interfaces are opened, and the interface commands can be edited by oneself.
[0044] It should be noted that the first device 111 and the second device 121 write (update) information of the network device 13, including but not limited to the site identifier (IP), site role, disaster recovery status, update time and arbitration agent status.
[0045] For example, Figure 2 As shown, Figure 2 The interface diagram of an arbitration agent software provided by an embodiment of the present application is shown. In the arbitration agent software, the first device 111 as SITEA can obtain the reception result information about the second site information from the network device 13, and judge whether the second site 12 (SITEB) is in working state at this time, and then the first device 111 judges whether it is necessary to upgrade the first site 11 to the main site. At the same time, the second device 121 can also send an information query request to any network device 13 in the disaster recovery system 10 according to the IP address, and the information query request is used to obtain the status information about the network device 13 fed back by the network device 13. Then the second device 121 judges whether it is necessary to upgrade the second site 12 to the main site.
[0046] In some embodiments, Figure 3 As shown, Figure 3 The following is a schematic diagram showing the structure of a device provided in an embodiment of the present application. Figure 3 The first device 111 and the second device 112 include four submodules, including a first communication module with the disaster recovery component, which is used to interact with the disaster recovery component of the site, including the parsing and encapsulation of the heartbeat message and the sending of the disaster recovery switching message. It also includes a second communication module with the network device 13, which is used to interact with the network device 13, including writing, updating, and querying information from the network device. And a link building module, which is used to maintain the communication connection with the network device 13. There is also an arbitration algorithm module, which is used to comprehensively judge based on the information parsed by the first communication module with the disaster recovery component and the second communication module with the network device 13, and give a disaster recovery switching command for site switching.
[0047] In some embodiments, the network device 13 may include one network device, or may be a network device cluster composed of multiple network devices 13. The number of network devices 13 is set according to the working requirements of the disaster recovery system 10, and the embodiment of the present application does not limit the number of network devices. Through the design of the network device set, the arbitration agent integrates the fusion judgment design of the multi-network device transfer information, so that the arbitration single point failure is completely solved.
[0048] For example, Figure 4 As shown, Figure 4 The following is a schematic diagram showing the operation of a disaster recovery system 10 provided in an embodiment of the present application. Figure 4 and Figure 1, the primary site is the second site 12, the backup site is the first site 11, the GR is the disaster recovery component, and the ARB is the first device 111 and the second device 121. The disaster recovery system 10 includes four network devices 13, and the first device 111 and the second device 121 of the primary site and the backup site can write, update and query arbitration agent information with each network device 13.
[0049] By using the disaster recovery system 10 provided in the embodiment of the present application, by deploying the first device 111 and the second device 121 in the first site 11 and the second site 12 respectively, the disaster recovery system provided has the following advantages:
[0050] 1. Low cost: The arbitration agent is designed as a dual-active application component first device 111 and second device 121 running on the active-standby disaster recovery system, and no additional servers are needed to deploy arbitration sites. The disaster recovery system 10 transfers information with the help of the network device 13. The network device 13 only needs to store two pieces of information and support query and update. Generally speaking, these are capabilities that the network device 13 already has, and no or only a small amount of transformation and upgrading is required.
[0051] 2. Improve resource reuse rate: The arbitration agent is designed as a component-level software module, and the active-active system runs on the disaster recovery system 10. The resource occupation is shared between the primary site and the backup site. The lightweight design makes the resource consumption very small, and the existing site resources are directly reused. With the help of network device 13 to transfer information, but after lightweight design and the core logic of the component agent, the final solution has very little impact on the main functions of the network device 13, which can be almost ignored.
[0052] 3. Solved the single point failure problem of arbitration: Through the design of network equipment collection, the arbitration agent integrates the fusion judgment design of multi-network equipment transfer information, so that the single point failure of arbitration is completely solved.
[0053] 4. Improve versatility: Avoid excessive modification and design of the network device 13, use the existing communication protocol and communication capabilities of the network device 13, and add an open design, which can flexibly configure custom scripts, greatly improving the versatility of the disaster recovery system 10.
[0054] See also Figure 5 , Figure 5 A schematic flow chart showing the steps of a disaster recovery method provided by an embodiment of the present application is shown. The disaster recovery method provided is applied to Figures 1 to 4 The first device 111 in the first site 11 provided in any embodiment.
[0055] like Figure 5 As shown, the provided disaster recovery method includes steps S101 to S102.
[0056] S101. Obtain reception result information about second site information fed back by a network device.
[0057] Specifically, the first site 11 is used as a standby site, and a first device 111 is deployed as an arbitration device. The first device 111 can initiate a request to the network device 13 during the operation of the disaster recovery system 10 to obtain the reception result information about the second site 12 information. It is used to determine whether the arbitration agent second device 121 in the second site 12 as the primary site communicates normally with the network device 13. It is used to determine whether the first site 11 needs to be promoted to the primary site to maintain the normal operation of the disaster recovery system 10.
[0058] Exemplarily, the first device 111 obtains the reception result information about the second site information fed back by the network device from the network device 13 within a preset period. The preset period is set according to the working requirements of the disaster recovery system 10, thereby ensuring that the disaster recovery system 10 can promptly upgrade the first site 11 to the main site if it is in an abnormal state.
[0059] In some embodiments, please refer to Figure 6 , Figure 6 FIG. 1 is a schematic flow chart of another disaster recovery method provided by an embodiment of the present application. Figure 5 The difference between the methods provided is that Figure 6 The provided disaster recovery method also includes step S201.
[0060] S201. Send message information to a network device, where the message information is used to obtain the network device's reception result information about the second site information, and the network device responds to the message information.
[0061] The first device 111 sends the message information to the network device 13 through the built-in arbitration agent software, and when the network device 13 responds to the message information, the first device 111 can obtain the reception result information about the second site information, thereby greatly simplifying the steps of the disaster recovery method provided in the embodiment of the present application.
[0062] S102. Determine whether to switch the first site to the primary site according to the received result information.
[0063] Specifically, the first device 111 can determine the working state of the second site 12 as the main site at this time by obtaining the reception result information about the second site information fed back by the network device 13, and then when it is determined that the second site 12 can maintain normal transmission of the second site information to the network device 13, the first site 11 still serves as a backup site, and when the second site 12 cannot normally send the second site information to the network device 13, the first device 111 controls the first site 11 to upgrade to the main site. The provided method simplifies the requirements for network devices and improves the versatility of network devices without the need to set up additional arbitration sites, thereby greatly reducing resource waste.
[0064] It should be noted that after the first device 111 switches the first site 11 to the primary site, whether the second site 12 is downgraded to the backup site needs to be arbitrated by the second device 121 inside the second site 12. After the first site 11 is switched to the primary site, if the reception result information obtained by the first device 111 indicates that the second site 12 can send the second site information normally, the first device 111 will also downgrade the first site 12 back to the backup site to ensure the normal operation of the disaster recovery system 10.
[0065] In some embodiments, please refer to Figure 7 , Figure 7 The method provided in the embodiment of the present application includes steps S301 to S303.
[0066] S301. Confirm whether the second site is in working state based on the received result information.
[0067] S302: If the second site is not in working state, generate first switching information.
[0068] S303: Send the first switching information to the first disaster recovery component, so as to switch the first site to the primary site.
[0069] According to the reception result information fed back by the network device 13, when it is confirmed that the second site 12 is not in working state, the first device 111 generates first switching information and sends it to the first disaster recovery component 112 to maintain the normal operation of the disaster recovery system 10. At this time, the first disaster recovery component 112 starts to work. Then, the first site 11 is switched to the main site, ensuring that the provided disaster recovery system can be in normal working state in real time.
[0070] Exemplarily, the receiving result information includes the first time when the network device 13 receives the second site information. Figure 8 , Figure 81 is a schematic flow chart of the steps of a working status confirmation method provided in an embodiment of the present application. The provided method includes steps S301a to S301b.
[0071] S301a. Determine whether the second device sends the second site information to the network device within a preset period based on the first time.
[0072] S301b. If the second device does not send the second site information to the network device within the preset period, it is confirmed that the second site is not in a working state.
[0073] The first time when the first device 111 receives the second site information through the network device 13 and the current time can determine whether the second device 121 sends the second site information to the network device 13 within the preset period. For example, if the preset time is 5 minutes, and the interval between the current time and the first time is 10 minutes, the second device 121 does not send the second site information to the network device 13 within the preset period. In this way, the first device 111 can quickly confirm whether the second site 12 is in working state and switch the site state in time.
[0074] It should be noted that, in some embodiments, please refer to Fig. 9 , Fig. 9 is a schematic flow chart of the steps of another site switching method provided in an embodiment of the present application. Figure 7 The difference between the methods provided is that Fig. 9 The provided method also includes steps S304 to S306.
[0075] S304. Obtain sub-receiving result information about the second site information fed back by the network device, where the sub-receiving result information includes a second time when the network device receives the second site information.
[0076] S305. If the second time is after the first time, confirm that the second site is in working state, and generate second switching information.
[0077] S306. Send the second switching information to the first disaster recovery component, so as to switch the first site to the standby site.
[0078] After the first device 111 upgrades the first site 11 from a backup site to a primary site, the first site 11 still needs to obtain the sub-receiving result information about the second site information fed back by the network device 13, and the sub-receiving result information includes the second time when the network device 13 receives the second site information. If the second time is later than the first time, it proves that the second site has released the abnormal recovery work, and the first site 11 no longer needs to work as the primary site. The first device 111 generates a second switching information and sends it to the first disaster recovery component 112, so that the first site 11 is downgraded to a backup site again. The method provided can enable the primary site and the backup site in the disaster recovery system 10 to confirm the appropriate working status in time.
[0079] Exemplarily, in some embodiments, the first site 11 is in communication connection with the second site 12. Before generating the first switching information, it also includes: judging whether the communication connection between the first site 11 and the second site 12 is disconnected based on the first site information, and generating the first switching information when the communication connection between the first site 11 and the second site 12 is disconnected. After sending the first switching information to the first disaster recovery component 112 for switching the first site 11 to the primary site, it also includes: judging whether the communication connection between the first site 11 and the second site 12 is restored based on the first site information, and generating the second switching information for switching the first site 11 to the backup site when the communication connection between the first site 11 and the second site 12 is restored.
[0080] When the first device 111 parses the internal heartbeat information with the first disaster recovery component 112 to obtain that the network between the first site 11 and the second site 12 is interrupted, the first device 111 is used to generate first switching information to the first disaster recovery component 112 for switching the first site 11 to the primary site. When the first device 111 parses the internal heartbeat information with the first disaster recovery component 112 to obtain that the network between the first site 11 and the second site 12 is restored, the first device 111 is used to generate second switching information to the first disaster recovery component 112 for switching the first site 11 back to the backup site. This allows the first site 11 to switch to the primary site in a timely manner when a communication anomaly occurs at the second site 12.
[0081] By adopting the disaster recovery method provided in the embodiment of the present application, the first device 111 of the backup site obtains the reception result information of the network device 13 about the second heartbeat information sent by the primary site, so that the backup site can confirm whether it needs to be upgraded to the primary site according to the reception status of the second heartbeat information to ensure the normal operation of the disaster recovery method. The disaster recovery method provided does not require the additional arbitration site to be set up, thereby greatly reducing resource waste, and also simplifies the requirements for the network device 13, thereby improving the versatility of the network device 13.
[0082] See also Fig.10 , Fig.10 A schematic flow chart showing the steps of a disaster recovery method provided by an embodiment of the present application is shown. The disaster recovery method provided is applied to Figures 1 to 4 The first device 111 in the first site 11 provided in any embodiment.
[0083] like Fig.10 As shown, the provided disaster recovery method includes steps S401 to S402.
[0084] S401. Send an information query request to a network device, where the information query request is used to obtain status information about the network device fed back by the network device.
[0085] Specifically, the second site 12 is used as the primary site, and a second device 121 is deployed thereon as an arbitration device. The second device 121 can initiate an information query request to the network device 13 during the operation of the disaster recovery system 10 to obtain status information about the network device 13. It is used to determine whether the arbitration agent second device 121 in the second site 12 as the primary site communicates normally with the network device 13. It is used to determine whether the second site 12 needs to be downgraded to a standby site to maintain the normal operation of the disaster recovery system 10.
[0086] Exemplarily, the second device 121 initiates an information query request to the network device 13 within a preset period. The preset period is set according to the working requirements of the disaster recovery system 10, thereby ensuring that the disaster recovery system 10 can timely reduce the second site 11 to a standby site if it is in an abnormal state.
[0087] S402: If the state information fed back by the network device based on the information query request is not received, the second site is switched to a standby site.
[0088] Specifically, the second device 121 initiates an information query request to the network device 13. If the second device 121 does not receive the status information fed back by the network device 13 based on the information query request, it can be determined that the working status of the second site 12 as the main site is abnormal, and then the second device 121 controls the second site 12 to be downgraded to a standby site. The provided method does not need to set up an additional arbitration site, thereby greatly reducing resource waste, and also simplifies the requirements for network devices and improves the versatility of network devices.
[0089] It should be noted that after the second device 121 switches the second site 12 to the backup site, whether the first site 11 is promoted to the primary site needs to be arbitrated by the first device 111 inside the first site 11. After the second site 12 is switched to the backup site, if the second device 121 sends an information query request to the network device again and can receive the status information fed back by the network device based on the information query request, the second device 121 will also upgrade the second site 12 back to the primary site to ensure the normal operation of the disaster recovery system 10.
[0090] In some embodiments, switching the second site to a backup site includes: generating third switching information, sending the third switching information to the second disaster recovery component, for switching the second site to a backup site; the first site is in communication connection with the second site, and before switching the second site to a backup site, it also includes: judging whether the communication connection between the first site and the second site is disconnected based on the second site information, for generating third switching information when the communication connection between the first site and the second site is disconnected.
[0091] When the second device 121 determines that it cannot receive the state information fed back by the network device based on the information query request, it generates third switching information to the second disaster recovery component 122, which is used to switch the second site 12 to a backup site. It ensures that the disaster recovery system 10 provided can timely reduce the primary site to a backup site when the primary site cannot work normally.
[0092] By adopting the disaster recovery method provided in the embodiment of the present application, when the second device 121 at the primary site is unable to obtain the status information of the feedback from the network device 13 regarding the information query request, the second device 121 can downgrade the primary site to a backup site. The provided disaster recovery method not only eliminates the need to set up an additional arbitration site, thereby greatly reducing resource waste, but also simplifies the demand for network equipment and improves the versatility of network equipment.
[0093] See also Fig.11 , Fig.11 A terminal device is shown. Fig.11 As shown, an embodiment of the present application proposes a terminal device 200, which includes a memory 210, a processor 220, a program stored in the memory and executable on the processor, and a data bus 230 for realizing connection and communication between the processor 220 and the memory 210. When the program is executed by the processor, the steps of the disaster recovery method as described in any one of the embodiments of the present application are realized.
[0094] An embodiment of the present application provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the disaster recovery method as described in any one of the embodiments of the present application.
[0095] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the present application is not limited thereby. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application shall be within the scope of the present application.
Claims
1. A disaster recovery method, characterized in that: A first device applied to a first site, the first site includes the first device and a first disaster recovery component, the first device is communicatively connected to a network device, the second site includes the second device and a second disaster recovery component, the network device is communicatively connected to the second device, the first device and the first disaster recovery component exchange first heartbeat information and generate first site information based on the first heartbeat information and send it to the network device, the second device and the second disaster recovery component exchange second heartbeat information and generate second site information based on the second heartbeat information and send it to the network device, wherein the first site is a standby site and the second site is a primary site; the method includes: Acquire reception result information about the second site information fed back by the network device; According to the receiving result information, it is determined whether to switch the first site to a primary site.
2. The method according to claim 1, characterized in that Before obtaining the reception result information about the second site information fed back by the network device, the method further includes: Send message information to the network device, the message information is used to obtain the network device's reception result information about the second site information, and the network device responds to the message information.
3. The method according to claim 1, characterized in that The determining, according to the receiving result information, whether to switch the first site to a primary site includes: confirming whether the second station is in a working state based on the receiving result information; If the second station is not in the working state, generating first switching information; The first switching information is sent to the first disaster recovery component to switch the first site to the primary site.
4. The method according to claim 3, characterized in that The receiving result information includes a first time when the network device receives the second site information; The confirming whether the second station is in a working state based on the receiving result information includes: determining, based on the first time, whether the second device sends the second site information to the network device within a preset period; If the second device does not send the second site information to the network device within the preset period, it is confirmed that the second site is not in the working state.
5. The method according to claim 4, characterized in that After sending the first switching information to the first disaster recovery component for switching the first site to the primary site, the method further includes: Acquire sub-receiving result information about the second site information fed back by the network device, where the sub-receiving result information includes a second time when the network device receives the second site information; If the second time is after the first time, confirm that the second site is in the working state, and generate second switching information; The second switching information is sent to the first disaster recovery component to switch the first site to the standby site.
6. The method according to claim 3, characterized in that The first site is communicatively connected with the second site; Before generating the first switching information, the method further includes: determining, based on the first site information, whether the communication connection between the first site and the second site is disconnected, and generating the first switching information if the communication connection between the first site and the second site is disconnected; After sending the first switching information to the first disaster recovery component for switching the first site to the primary site, the method further includes: Based on the first site information, it is determined whether the communication connection between the first site and the second site is restored, and when the communication connection between the first site and the second site is restored, second switching information is generated to switch the first site to the standby site.
7. A disaster recovery method, characterized in that: A second device applied to a second site, the second site includes the second device and a second disaster recovery component, the first site includes the first device and a first disaster recovery component, the first device is communicatively connected to a network device, the network device is communicatively connected to a second device at the second site, the first device interacts with the first disaster recovery component for first heartbeat information and generates first site information based on the first heartbeat information and sends it to the network device, the second device interacts with the second disaster recovery component for second heartbeat information and generates second site information based on the second heartbeat information and sends it to the network device, wherein the first site is a standby site and the second site is an active site; the method includes: Sending an information query request to the network device, wherein the information query request is used to obtain status information about the network device fed back by the network device; If the state information fed back by the network device based on the information query request is not received, the second site is switched to a standby site.
8. The method according to claim 7, characterized in that The switching the second site to a standby site includes: Generate third switching information, and send the third switching information to the second disaster recovery component, so as to switch the second site to a standby site; The first site is in communication connection with the second site, and before the second site is switched to the standby site, the method further includes: The method comprises determining whether the communication connection between the first site and the second site is disconnected based on the second site information, and generating the third switching information when the communication connection between the first site and the second site is disconnected.
9. A terminal device, characterized in that: The terminal device includes: a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the disaster recovery method as described in any one of claims 1 to 6 are realized, or the steps of the disaster recovery method as described in any one of claims 7 to 8 are realized.
10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the disaster recovery method as described in any one of claims 1 to 6, or to implement the steps of the disaster recovery method as described in any one of claims 7 to 8.