Disaster recovery switching method and device, nonvolatile storage medium and electronic device

By acquiring and processing resource information from business systems, determining deployment topology, and automating the switching process, the problem of low efficiency in resource information changes during disaster recovery switching is solved, achieving efficient and flexible disaster recovery switching.

CN118890266BActive Publication Date: 2025-12-12CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410869439.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-12-12
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In existing technologies, when resource information in system modules needs to be changed during disaster recovery switching, all resource information involved in the switching process needs to be modified, resulting in low efficiency and insufficient flexibility in the modification process.

Method used

By acquiring resource information from multiple resource objects in the business system, the deployment topology information is determined, and the switchover process is used to process the objects to be switched, including verifying, identifying, and updating resource information, thereby achieving an automated disaster recovery switchover process.

Benefits of technology

It improves the efficiency of resource information changes during disaster recovery switching, reduces the workload of changes, and enhances the flexibility and reliability of disaster recovery switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890266B_ABST
    Figure CN118890266B_ABST
Patent Text Reader

Abstract

The application discloses a disaster recovery switching method and device, a nonvolatile storage medium and an electronic device. The method comprises the following steps: acquiring resource information of each resource object in a plurality of resource objects in a business system; determining deployment topology information of the business system; determining a target subtask for disaster recovery switching of the business system; performing arrangement processing on the target subtask according to a received arrangement instruction, and determining the arranged target subtask as a switching process; determining a to-be-switched object indicated by a disaster recovery switching task from a switching object, and performing switching processing on the to-be-switched object by using the switching process. The application solves the technical problem of low change efficiency caused by the fact that, during the disaster recovery switching process, if resource information in a system module needs to be changed, resource information involved in all switching processes needs to be changed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer system management and disaster recovery switching, in particular, to a disaster recovery switching method and device, a nonvolatile storage medium and an electronic device. BACKGROUND

[0002] In today's increasingly digital and highly interconnected information technology environment, system continuity and reliability are critical to the normal operation of enterprises and organizations, especially telecommunications operators, which carry business related to the national economy and people's livelihood. Once an abnormality occurs, it will cause great social impact and economic losses.

[0003] Therefore, telecommunications key systems that affect user perception are vigorously promoting disaster recovery construction. To improve disaster recovery switching efficiency, the industry has developed disaster recovery switching automation systems that arrange and automatically execute each step of disaster recovery switching. Such disaster recovery switching automation systems need to design each operation of disaster recovery switching in advance and record all the changes involved in the system in advance.

[0004] However, the system architecture of telecommunications is very complex, and a system often contains multiple modules such as access gateways, container deployment applications, host deployment applications, cache components, message queue components, configuration management components, distributed service framework components, distributed application coordination service components, distributed search and analysis engine components, database proxy components, and database components. If each switching scenario needs to be listed, each switching scenario needs to be configured with switching steps and combined into a switching process, and each switching step needs to list the configurations and restarted applications that need to be changed during disaster recovery switching. The configuration complexity is high, and the flexibility is low. When the assets in these system modules are scaled up or down, the asset information involved in all switching processes needs to be changed, and there are many change points and a large amount of change work. If there is a omission, it will cause an abnormality in disaster recovery switching.

[0005] Currently, there is no effective solution to the above problems. SUMMARY

[0006] The embodiments of the present application provide a disaster recovery switching method and device, a nonvolatile storage medium, and an electronic device to at least solve the technical problem of low change efficiency caused by the need to change all resource information involved in the switching process when the resource information in the system module needs to be changed.

[0007] According to an aspect of the embodiments of the present application, a disaster recovery switching method is provided, comprising: obtaining resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise: switching objects and deployment objects, the switching objects comprise: service components, databases and application services, the deployment objects comprise: hosts and containers, and the switching objects are deployed on the deployment objects; determining deployment topology information of the business system, wherein the deployment topology information comprises: upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; determining target sub-tasks for disaster recovery switching of the business system, wherein the target sub-tasks comprise: a first sub-task for verifying the deployment topology information, a second sub-task for identifying the upstream and downstream resource objects in the deployment topology information, and a third sub-task for updating the resource information; performing arrangement processing on the target sub-tasks according to a received arrangement instruction, and determining the target sub-tasks after the arrangement processing as a switching process; determining a to-be-switched object indicated by a disaster recovery switching task from the switching objects, and performing switching processing on the to-be-switched object by using the switching process.

[0008] Optionally, the obtaining of the resource information of each resource object in the plurality of resource objects in the business system comprises: obtaining first resource information of the host in a production environment and second resource information of the host in a disaster recovery environment, wherein the first resource information and the second resource information comprise: hardware resource information, operating system information and network security information; obtaining third resource information of the container in the production environment and fourth resource information of the container in the disaster recovery environment, wherein the third resource information and the fourth resource information comprise: storage capacity information and data backup time interval information; obtaining fifth resource information of the service component in the production environment and sixth resource information of the service component in the disaster recovery environment, wherein the fifth resource information and the sixth resource information comprise: application program resource information and service level agreement information; obtaining seventh resource information of the database in the production environment and eighth resource information of the database in the disaster recovery environment, wherein the seventh resource information and the eighth resource information comprise: connection restriction information and network resource information; and obtaining ninth resource information of the application service in the production environment and tenth resource information of the application service in the disaster recovery environment, wherein the ninth resource information and the tenth resource information comprise: information of the host on which the application service is deployed, information of the container on which the application service is deployed, and a configuration file of the application service.

[0009] Optionally, after the obtaining of the resource information of each resource object in the plurality of resource objects in the business system, the method further comprises: establishing an association relationship between configuration items and the fifth resource information, the sixth resource information, the seventh resource information, the eighth resource information, the ninth resource information and the tenth resource information in a configuration file used for configuring the business system.

[0010] Optionally, the determining the deployment topology information of the business system comprises: obtaining real deployment information between each switching object detected in the topology canvas to obtain a plurality of calling relationship information, wherein each calling relationship information comprises a source object and a target object; obtaining identification information of each switching object; and determining upstream and downstream resource objects of each switching object according to the identification information of each switching object and the calling relationship information corresponding to each switching object.

[0011] Optionally, the determining the upstream and downstream resource objects of each switching object according to the identification information of each switching object and the calling relationship information corresponding to each switching object comprises: in a case where the target switching object is the source object, taking other switching objects in the target calling relationship information corresponding to the target switching object as the downstream resource objects, wherein the target switching object is any one of the switching objects; in a case where the target switching object is the target object, taking other switching objects in the target calling relationship information as the upstream resource objects; and in a case where the target switching object is an object other than the source object and the target object, determining switching objects between the source object and the target switching object as the upstream resource objects and determining switching objects between the target switching object and the target object as the downstream resource objects.

[0012] Optionally, the first subtask for verifying the deployment topology information is configured to perform the following steps: determining whether there is a first target switching object not including the upstream resource object and / or the downstream resource object in the deployment topology information, and if so, determining that the deployment topology information is abnormal; determining whether there is a target application service not configured with an association relationship with a target service component in the deployment topology information, and if so, determining that the deployment topology information is abnormal, wherein the target application service is an application service dependent on the target service component; and in a case where it is determined that the deployment topology information is abnormal, re-determining the deployment topology information of the business system.

[0013] Optionally, the second subtask for identifying the upstream and downstream resource objects in the deployment topology information is configured to perform the following steps: obtaining target identification information of a second target switching object for disaster recovery switching; determining first target calling relationship information corresponding to the second target switching object according to the target identification information, wherein the first target calling relationship information comprises a first source object and a first target object; and if it is determined that the identification information of the first source object is consistent with the target identification information or it is determined whether the identification information of the first target object is consistent with the target identification information in the first target calling relationship information, performing encapsulation processing on the second target switching object and other switching objects in the first target calling relationship information to obtain a target encapsulation object.

[0014] Optionally, the third subtask for updating the resource information is configured to perform the following steps: querying a target configuration file where the target identification information is located, and querying a configuration item in the target configuration file and a target association relationship between each switching object in the target encapsulation object; updating the target association relationship according to the resource information of each switching object in the target encapsulation object; determining deployment information of the second target switching object, wherein the deployment information includes host deployment information or container deployment information, the host deployment information includes a deployment host, a deployment directory, a deployment account, a deployment password, stop and start commands of the second target switching object, and the container deployment information includes a container cluster, a namespace, and a service identification; and updating the resource information of the second target switching object in the primary and backup environments of the business system according to the deployment information of the second target switching object.

[0015] Optionally, the updating of the resource information of the second target switching object in the primary and backup environments of the business system according to the deployment information of the second target switching object includes: if the deployment information includes the host deployment information, logging in the deployment directory of the deployment host according to the deployment account and the deployment password, and executing the stop and start commands in the deployment directory to restart the second target switching object; if the deployment information includes the container deployment information, calling an application programming interface corresponding to the service identification to restart the second target switching object; and updating a running state of the second target switching object in the primary and backup environments of the business system after the second target switching object is restarted.

[0016] Optionally, the switching process is used to perform the switching processing on the switching object, including: determining whether the switching object has primary and backup resource information in the resource information; if the switching object has the primary and backup resource information, determining whether the switching object is included in the deployment topology information; if the switching object is included in the deployment topology information, determining whether a first target upstream and downstream resource object corresponding to the switching object is included in the deployment topology information; if the first target upstream and downstream resource object is included in the deployment topology information, determining a target calling relationship between the switching object and the first target upstream and downstream resource object; determining a second target upstream and downstream resource object according to the target calling relationship, wherein the resource information of the second target upstream and downstream resource object is changed according to the change of the resource information of the switching object; restarting the switching object and the second target upstream and downstream resource object to perform the switching processing on the switching object, and replacing identification information of the business system before the restarting with identification information of the business system after the restarting.

[0017] According to a further aspect of the embodiments of the present application, a disaster recovery switching device is also provided, comprising: an acquisition module configured to acquire resource information of each resource object in a plurality of resource objects in a service system, wherein the plurality of resource objects comprise a switching object and a deployment object, the switching object comprises a service component, a database and an application service, the deployment object comprises a host and a container, and the switching object is deployed on the deployment object; a first determination module configured to determine deployment topology information of the service system, wherein the deployment topology information comprises upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; a second determination module configured to determine a target subtask for disaster recovery switching of the service system, wherein the target subtask comprises a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating the resource information; an arrangement module configured to arrange the target subtask according to a received arrangement instruction, and determine the arranged target subtask as a switching process; and a switching module configured to determine a to-be-switched object indicated by a disaster recovery switching task from the switching object, and perform switching processing on the to-be-switched object by using the switching process.

[0018] According to a further aspect of the embodiments of the present application, a nonvolatile storage medium is also provided, comprising a stored program, wherein the program controls a device where the storage medium is located to perform the above disaster recovery switching method when the program is running.

[0019] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the processor is configured to run a program stored in the memory, and the program controls the electronic device to perform the above disaster recovery switching method when the program is running.

[0020] According to a further aspect of the embodiments of the present application, a computer program is also provided, wherein the computer program is executed by a processor to implement the above disaster recovery switching method.

[0021] According to a further aspect of the embodiments of the present application, a computer program product is also provided, comprising a nonvolatile computer readable storage medium, wherein the nonvolatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the above disaster recovery switching method.

[0022] In the embodiment of the present application, resource information of each resource object in a plurality of resource objects in a service system is acquired, wherein the plurality of resource objects include: a switching object and a deployment object, the switching object includes: a service component, a database and an application service, and the deployment object includes: a host and a container, and the switching object is deployed on the deployment object; deployment topology information of the service system is determined, wherein the deployment topology information includes: upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; a target subtask for disaster recovery switching of the service system is determined, wherein the target subtask includes: a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating the resource information; the target subtask is arranged according to the received arrangement instruction, and the arranged target subtask is determined as a switching process; a to-be-switched object indicated by a disaster recovery switching task is determined from the switching object, and the to-be-switched object is switched by using the switching process, so as to achieve the purpose that in the disaster recovery switching process, if the resource information in the system module needs to be changed, the resource information involved in all switching processes does not need to be changed, thereby realizing the technical effect of improving the resource information change efficiency in the disaster recovery switching process, and further solving the technical problem of low change efficiency caused by the fact that in the disaster recovery switching process, if the resource information in the system module needs to be changed, the resource information involved in all switching processes needs to be changed. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application, but do not limit the present application. In the drawings:

[0024] Figure 1 is a flowchart of a disaster recovery switching method according to an embodiment of the present application;

[0025] Figure 2 is a flowchart of another disaster recovery switching method according to an embodiment of the present application;

[0026] Figure 3 is a schematic diagram of a calling relationship according to an embodiment of the present application;

[0027] Figure 4 is a flowchart of a switching process according to an embodiment of the present application;

[0028] Figure 5 is a structural diagram of a disaster recovery switching device according to an embodiment of the present application;

[0029] Figure 6 is a hardware structural block diagram of a computer terminal of a disaster recovery switching method according to an embodiment of the present application. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] According to an embodiment of this application, a method embodiment of a disaster recovery switching method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0033] Figure 1 This is a flowchart of a disaster recovery switching method according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0034] Step S102: Obtain resource information for each resource object among multiple resource objects in the business system. The multiple resource objects include: switching objects and deployment objects. Switching objects include: service components, databases, and application services. Deployment objects include: hosts and containers. Switching objects are deployed on deployment objects.

[0035] In disaster recovery switchover, the deployment objects usually refer to the physical or virtual environments that host service components, databases, and application services. Here are detailed descriptions of these deployment objects. Hosts can be physical servers or virtual machines. They are the foundation that run service components, databases, and application services. In disaster recovery switchover, the high availability of hosts is very important. It may be necessary to deploy clustering technologies such as server clustering or virtual machine clustering to achieve failover. Containers are lightweight, portable, and self-contained software runtime environments that are widely used in containerization technologies such as Docker. Containerization technologies allow applications and their dependencies to be packaged together, simplifying the deployment and migration process. In disaster recovery switchover, containers can be quickly migrated between different hosts or clusters, enabling rapid recovery of services.

[0036] For switchover objects in disaster recovery switchover, the following are some key considerations. Service components: Ensure that the configuration of service components in hosts or containers can be quickly migrated to backup sites and seamlessly integrated into existing infrastructure. Database: Disaster recovery switchover of databases may involve data replication, mirroring, snapshotting, or backup and recovery. For containerized deployment of databases, data volume persistence and migration strategies may need to be considered. Application services: Disaster recovery switchover of application services needs to ensure that applications can be quickly started and run in hosts or containers at backup sites. Application configuration, environment variables, and dependencies need to be synchronized with backup sites.

[0037] Service components, for example: Platform as a Service (PaaS) components.

[0038] For example, resource information of service components includes: configuration files: contain configuration parameters required for service running. Dependencies: service components may depend on other services or libraries. Log files: log information during service running. Permission settings: user permissions and system permissions required for service running. Network settings: network interface configuration of service components, including IP address, port, etc.

[0039] Resource information of databases includes: database instances: running instances of database services. Data files: files that store database data, such as MySQL data files, PostgreSQL WAL logs, etc. Configuration files: configuration parameters of databases, such as connection settings, storage engines, etc. Backup information: backup strategy and backup files of databases. Users and permissions: account and permission settings of database users.

[0040] The resource information of the application service includes: application code: the source code or compiled binary file of the application program. Configuration file: the running configuration of the application program, such as database connection string, API key, etc. Dependency library: external library or framework required for the running of the application program. Environment variable: environment variable required for the running of the application program. Log file: running log of the application program.

[0041] The resource information of the host includes: hardware specification: hardware configuration such as CPU, memory, storage and network interface. Operating system: operating system and its version running on the host. Network configuration: IP address, subnet mask, gateway and DNS settings of the host. System service: system service and daemon running on the host. Security setting: security policy of the host, such as firewall rule, security update, etc.

[0042] The resource information of the container includes: container image: container image containing the application program and its running environment. Container configuration: running parameters of the container, such as CPU, memory limit, storage volume mounting, etc. Container network: network settings of the container, including port mapping and network interface. Container state: running state of the container, such as start, stop, pause, etc. Container log: log information generated during the running of the container.

[0043] In step S104, the deployment topology information of the business system is determined, wherein the deployment topology information includes: upstream and downstream resource objects of each switching object and calling relationship between each switching object and the upstream and downstream resource objects.

[0044] In disaster recovery switching, the upstream and downstream resource objects of the switching object usually refer to other systems, services or components that directly interact with or depend on the main switching object. These resource objects are crucial for ensuring the continuity and integrity of the service. For example, the upstream resource objects include: user interface: users interact with the service through web interface, mobile application or desktop client. Front-end service: such as API gateway or front-end proxy, which handles requests from users and forwards them to back-end services. Load balancer: responsible for distributing traffic to different service instances to achieve high availability and load balancing. Authentication service: system for user authentication and authorization, such as LDAP, OAuth server, etc. Monitoring and logging service: service for monitoring system status and recording logs, used for fault detection and performance analysis.

[0045] The downstream resource objects include: back-end service: application program or service component that handles business logic. Database service: database system that stores business data. Message queue and middleware: system for asynchronous communication and data exchange, such as Kafka, RabbitMQ, etc. File storage and object storage: storage system for storing static files, pictures, videos and other resources. Backup and recovery system: system for data backup and data recovery in case of failure.

[0046] In step S106, a target subtask for disaster recovery switching of the service system is determined, wherein the target subtask includes: a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating the resource information.

[0047] In step S108, the target subtask is arranged according to the received arrangement instruction, and the arranged target subtask is determined as the switching process.

[0048] In other words, according to the sequence of the disaster recovery switching operation of the service system, the atomic tasks configured in step S106 are designed as a complete switching process.

[0049] Specifically, the user selects the atomic tasks configured by the system and imports them into the switching process arrangement window; and the atomic task information is stored. The user connects the atomic tasks through the directed arrows to identify the sequence of the atomic task execution; and the atomic task connection relationship information of the switching process is stored.

[0050] In step S110, the to-be-switched object indicated by the disaster recovery switching task is determined from the switching object, and the switching process is used to perform switching processing on the to-be-switched object.

[0051] That is, according to the switching process and the switching object selected by the user in the disaster recovery switching task, the upstream and downstream association information identified in the deployment topology information is executed to complete the automatic operation of the disaster recovery switching of the service system. Preferably, the disaster recovery switching progress can also be displayed in real time on a large screen.

[0052] Step S110 specifically includes the following steps: 1. The user creates a disaster recovery switching task, selects the arranged switching process, the resource object to be switched, and the switching direction (production-disaster recovery, disaster recovery-production), and initiates task execution. 2. According to the resource object to be switched, the corresponding resource object information is obtained, the topology is automatically checked, the upstream and downstream association relationship is identified, the system modules affected by the switching are determined, the disaster recovery switching related configuration modification, application restart and other tasks are automatically executed, and the disaster recovery switching automation execution is realized.

[0053] According to the above steps, resource information of each resource object in the plurality of resource objects in the business system is acquired, wherein the plurality of resource objects include: a switching object and a deployment object, the switching object includes: a service component, a database and an application service, and the deployment object includes: a host and a container, and the switching object is deployed on the deployment object; deployment topology information of the business system is determined, wherein the deployment topology information includes: upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; a target subtask for disaster recovery switching of the business system is determined, wherein the target subtask includes: a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating the resource information; the target subtask is arranged according to the received arrangement instruction, and the arranged target subtask is determined as a switching process; a to-be-switched object indicated by a disaster recovery switching task is determined from the switching object, and the to-be-switched object is switched by using the switching process, so that if the resource information in the system module needs to be changed during the disaster recovery switching process, the resource information involved in all switching processes does not need to be changed, and the technical effect of improving the resource information change efficiency in the disaster recovery switching process is achieved.

[0054] According to some optional embodiments of the present application, the resource information of each resource object in the plurality of resource objects in the business system can be acquired by the following method:

[0055] In step S1021, the first resource information of the host in the production environment and the second resource information of the host in the disaster recovery environment are acquired, wherein the first resource information and the second resource information include: hardware resource information, operating system information and network security information.

[0056] For example, the first resource information includes: hardware specifications: CPU model, core number, frequency. Memory size and type: storage device capacity and performance. Network interface card type and bandwidth. Operating system: operating system type and version; system patch and update status. Network configuration: IP address, subnet mask, default gateway; DNS server address; firewall rules and security group settings. System services and daemons: system service list running on the host. Application programs and dependencies: all application programs and their versions deployed on the host; application program dependency libraries and frameworks. Data storage: types and amounts of data stored on the host; data backup and recovery policies. Monitoring and logging: monitoring system deployment and monitoring indicators: security settings: access control, user permissions and authentication mechanisms.

[0057] Second resource information, for example: Backup host hardware specifications: backup hardware resources that match or are appropriate for the production environment. Backup operating system: compatible operating system version and configuration with the production environment. Backup network configuration: network settings of the backup site, ensuring network communication with the production environment. Backup application and dependencies: backup versions of applications and dependent libraries. Data synchronization status: frequency, method, and delay of data replication and synchronization. Backup and recovery mechanism: data backup strategy, storage location, and recovery process. Monitoring and log synchronization: synchronization status of monitoring systems and collection of log information. Consistency of security settings: ensure that the security settings of the backup environment are consistent with the production environment. Switching and failover configuration: automated scripts and manual switching processes for failover. Testing and verification: records and results of regular testing of disaster recovery capabilities. Resource availability: availability and readiness of backup resources to support rapid switching. Disaster recovery plan: detailed disaster recovery steps and responsibility allocation. Communication protocol: communication protocol and port used during disaster recovery switching.

[0058] In step S1022, third resource information of the container in the production environment and fourth resource information of the container in the disaster recovery environment are obtained, wherein the third resource information and the fourth resource information include storage capacity information and data backup time interval information.

[0059] For example, the third resource information includes: container image: container image name and version containing the application and its dependencies. Container registry: access information of private or public registry for storing container images. Container orchestration tool: such as Kubernetes, Docker Swarm, etc., used to manage the deployment, expansion and operation and maintenance of containers. Container configuration: running parameters of containers, including CPU, memory limit, environment variable, etc. Container network: container network configuration, including network interface, port mapping, service discovery, etc. Storage volume and persistence: configuration of data volume and storage volume used by containers, and data persistence strategy.

[0060] For example, the fourth resource information includes: backup container image: backup container image consistent with the production environment and its storage location. Backup registry: registry for storing backup images and its access information. Backup orchestration tool configuration: container orchestration tool configuration in the disaster recovery environment, ensuring consistency with the production environment. Backup network configuration: network settings of the backup site, ensuring communication between containers and external access.

[0061] In step S1023, fifth resource information of the service component in the production environment and sixth resource information of the service component in the disaster recovery environment are obtained, wherein the fifth resource information and the sixth resource information include application resource information and service level agreement information.

[0062] Among them, the fifth resource information is, for example: platform service: the type of service provided, such as database service, message queue, cache service, etc. Service instance: specific instance of each service, including configuration and scale. Service quota and limit: usage limit of each service, such as database connection number, storage capacity, etc. Service API: API endpoint and document for accessing and managing services. Service dependency: other services or components required for service running.

[0063] The sixth resource information is, for example: backup service instance: backup of service instance corresponding to production environment. Backup service API: API for accessing and managing backup service. Backup service quota and limit: usage limit of backup service, ensuring consistency with production environment. Backup service monitoring: tool for monitoring backup service performance and status. Backup service log: log collection and access policy of backup service.

[0064] In step S1024, the seventh resource information of the database in the production environment and the eighth resource information in the disaster recovery environment are obtained, wherein the seventh resource information and the eighth resource information include: connection limit information, network resource information.

[0065] Among them, the seventh resource information is, for example: database instance: running database server and instance information, including version and configuration. Database schema: database architecture, including table structure, index, view, stored procedure, etc. Data volume and growth: current database storage data volume and expected data growth trend. Data access pattern: application access pattern to database, including query frequency and type. Backup strategy: database backup plan, including full backup, incremental backup and log backup.

[0066] The eighth resource information is, for example: backup database instance: database server and instance information for disaster recovery. Backup data synchronization: data synchronization mechanism and status from production database to disaster recovery database. Backup data consistency: ensure consistency of backup data with production data. Backup storage capacity: storage capacity required for backup data in disaster recovery environment. Backup recovery strategy: strategy and steps for recovering from backup data to disaster recovery database. Disaster recovery RPO and RTO: data loss and recovery time target in disaster recovery environment.

[0067] In step S1025, the ninth resource information of the application service in the production environment and the tenth resource information in the disaster recovery environment are obtained, wherein the ninth resource information and the tenth resource information include: information of the host on which the application service is deployed, information of the container on which the application service is deployed, and configuration file of the application service.

[0068] The ninth resource information is, for example: application server: server instance running the application, including physical server or virtual machine. Application configuration: configuration file and environment variable of the application. Application dependency: external library, framework and other services required for application running. Application code: source code or compiled binary file of the application. Application database connection: connection string and access permission of the application to the database. Application performance monitoring: tool and index for monitoring application performance. Application log recording: generation, storage and access method of application log.

[0069] The tenth resource information is, for example: disaster recovery application server: standby server instance for disaster recovery. Disaster recovery application configuration: backup configuration file and environment variable consistent with the production environment. Disaster recovery application dependency synchronization: ensure synchronization and availability of application dependency in the disaster recovery environment. Disaster recovery application code version: code version of the application in the disaster recovery environment, ensuring consistency with the production environment. Disaster recovery database connection: connection configuration of the application to the backup database in the disaster recovery environment.

[0070] Preferably, after step S102 is performed, the following steps can also be performed:

[0071] In the configuration file for configuring the business system, the association relationship between the configuration item and the fifth resource information, the sixth resource information, the seventh resource information, the eighth resource information, the ninth resource information and the tenth resource information is established.

[0072] On the other hand, step S102 can also be implemented by the following method: taking the switching of PaaS components of the business system as an example, 1. The user creates business system information. 2. The user configures the host and container resource information of the business system production and disaster recovery environment. 3. The user configures the PaaS component information used by the business system production and disaster recovery environment. 4. The user configures the database information of the business system production and disaster recovery environment. 5. The user configures the application information of the business system production and disaster recovery environment, including the deployed host / container, deployment directory / container cluster and namespace, application configuration file, application start / stop command, etc. 6. Classify and manage all the above resource information, and mark each type of resource information. 7. The user configures the correspondence between the configuration item in the business system configuration file and the system application, component and database. The configuration item in the business system configuration file is associated with the parameter field corresponding to the application, component and database in the system to provide a basis for configuration file modification.

[0073] In some optional embodiments of the present application, the deployment topology information of the business system is determined, including the following steps:

[0074] Step S1041, real deployment information between each switching object detected in the topology canvas is obtained to obtain a plurality of call relationship information, wherein each call relationship information includes: source object and target object.

[0075] In step S1042, the identification information of each switching object is obtained.

[0076] In step S1043, the upstream and downstream resource objects of each switching object are determined according to the identification information of each switching object and the calling relationship information corresponding to each switching object.

[0077] Specifically, the user selects the application, PaaS component, and database object information configured by the system, and imports them into the topology canvas. The node information of the topology is stored. The user connects the application, component, and database through a directed arrow, and identifies the calling dependency relationship between the application, component, and database. The connection relationship information of the topology is stored.

[0078] Further, step S1043 can be implemented by the following method: in the case where the target switching object is a source object, the other switching objects in the target calling relationship information corresponding to the target switching object are taken as the downstream resource objects, wherein the target switching object is any one of the switching objects; in the case where the target switching object is a target object, the other switching objects in the target calling relationship information are taken as the upstream resource objects; in the case where the target switching object is an object other than the source object and the target object, the switching objects between the source object and the target switching object are determined as the upstream resource objects, and the switching objects between the target switching object and the target object are determined as the downstream resource objects.

[0079] As some optional embodiments of the present application, the first subtask for verifying the deployment topology information is used to perform the following steps: judging whether there is a first target switching object not including the upstream resource object and / or the downstream resource object in the deployment topology information, and if there is, determining that the deployment topology information is abnormal; judging whether there is a target application service not configured with an association relationship with a target service component in the deployment topology information, and if there is, determining that the deployment topology information is abnormal, wherein the target application service is an application service dependent on the target service component; in the case where it is determined that the deployment topology information is abnormal, the deployment topology information of the business system is re-determined.

[0080] That is, first, the deployment topology information is obtained according to the system information, it is judged whether there is at least one and more node connection relationships in the topology connection information cells object, if there is, it is judged that the resource configuration is normal, if the topology information fails to be obtained or there is no one and more connection relationships in the topology information, it is judged that the resource configuration is abnormal. It is analyzed whether the application of the dependent component is configured with the corresponding configuration item association relationship according to the node front and back relationship of the topology connection, if the corresponding association relationship is obtained, it is judged that the resource configuration is normal, if the corresponding association relationship is not obtained, it is judged that the resource configuration is abnormal.

[0081] In some optional embodiments of the present application, the second subtask for identifying the upstream and downstream resource objects in the deployment topology information is used to perform the following steps:

[0082] Obtaining target identification information of a second target switching object for disaster recovery switching; determining first target invocation relationship information corresponding to the second target switching object according to the target identification information, wherein the first target invocation relationship information includes a first source object and a first target object; if it is determined that the identification information of the first source object is consistent with the target identification information or it is determined that the identification information of the first target object is consistent with the target identification information in the first target invocation relationship information, performing encapsulation processing on the second target switching object and other switching objects in the first target invocation relationship information to obtain a target encapsulation object.

[0083] That is, according to the switching application / component, resource information and application deployment topology information are obtained, and according to the cells array object in the topology information, the resource node ID is searched, the target node value is equal to the corresponding node ID, which indicates that there is an upstream dependency, and the source node value is equal to the corresponding node ID, which indicates that there is a downstream dependency; the switching resource object node ID and the corresponding upstream and downstream object node ID are encapsulated into affected object information and transmitted to the downstream execution node.

[0084] As another optional embodiment of the present application, the third subtask for updating the resource information is used to perform the following steps: querying a target configuration file in which the target identification information is located, and querying the configuration items in the target configuration file and the target association relationship of each switching object in the target encapsulation object; updating the target association relationship according to the resource information of each switching object in the target encapsulation object; determining the deployment information of the second target switching object, wherein the deployment information includes host deployment information or container deployment information, wherein the host deployment information includes a deployment host, a deployment directory, a deployment account, a deployment password, a stop and start command of the second target switching object, and the container deployment information includes a container cluster, a namespace, and a service identification; and updating the resource information of the second target switching object in the primary and backup environments of the business system according to the deployment information of the second target switching object.

[0085] Further, according to the deployment information of the second target switching object, the resource information of the second target switching object in the master-slave environment of the business system is updated, including the following steps: if the host deployment information is included in the deployment information, the deployment directory of the deployment host is logged in according to the deployment account and the deployment password, and the stop and start commands are executed in the deployment directory to restart the second target switching object; if the container deployment information is included in the deployment information, the corresponding application programming interface is called to restart the service identifier to restart the second target switching object; after the second target switching object is restarted, the running state of the second target switching object in the master-slave environment of the business system is updated.

[0086] On the other hand, the third subtask for updating the resource information is used to execute the following steps: receiving the result data of the analysis of the upstream and downstream nodes in the topology, querying the corresponding configuration file and the configuration item and component association relationship according to the analyzed resource object nodeId affected by the switching, updating the parameter value corresponding to the configuration item in the configuration file according to the parameter modification relationship of the configuration, and updating to the environment; the corresponding configuration file is updated by logging into the host in the form of independent configuration file, and the corresponding configuration file is updated by the API provided by the configuration management center in the form of unified configuration management center.

[0087] The result data of the analysis of the upstream and downstream nodes in the topology is received, the application information affected by the switching is determined, and the deployment information of the application is obtained. The deployment host, deployment directory, deployment account, account password, and start and stop commands of the application are obtained in the host deployment mode, the deployment host is logged in to enter the deployment directory, the stop and start commands are executed to restart the application; the container cluster, namespace, and corresponding service name are obtained in the container deployment mode, and the container underlying application service restart API is called to implement the restart operation.

[0088] After the application / component switching is successfully executed, the running state of the switching object in the master-slave environment of the system is updated, that is, which resource is currently used as the master, providing a judgment basis for the rollback switching of the business system.

[0089] In some optional embodiments, the switching process of the to-be-switched object can be implemented by the following method: determining whether the to-be-switched object has master and standby resource information in the resource information, determining whether the to-be-switched object is included in the deployment topology information in the case of determining that the to-be-switched object has master and standby resource information, determining whether the first target upstream and downstream resource object corresponding to the to-be-switched object is included in the deployment topology information in the case of the to-be-switched object being included in the deployment topology information, determining the target calling relationship between the to-be-switched object and the first target upstream and downstream resource object in the case of the first target upstream and downstream resource object being included in the deployment topology information, determining the second target upstream and downstream resource object according to the target calling relationship, wherein the resource information of the second target upstream and downstream resource object changes according to the change of the resource information of the to-be-switched object, restarting the to-be-switched object and the second target upstream and downstream resource object to perform the switching process on the to-be-switched object, and replacing the identification information of the business system before the restart with the identification information of the business system after the restart.

[0090] In summary, through the above steps, first, the resources of the business system are divided into multiple types, including host / container, component, database, application, etc., the components, databases, and applications are aggregated to form a deployment topology, and the calling dependency relationship between the modules is identified by a directed arrow; in disaster recovery switching, the application deployment topology is identified and searched according to the application or component to be switched, the other application services affected by the switching component / application are automatically analyzed, and the configuration items of the application service configuration file are analyzed; the configuration items of the affected configuration file are automatically updated according to the application / component information after the switching, and the application is automatically restarted according to the application deployment mode, thereby realizing the disaster recovery switching operation of the application / component.

[0091] Figure 2 is a flowchart of another disaster recovery switching method according to an embodiment of the present application, as shown in Figure 2 the method includes the following steps:

[0092] Step S201, the source management module configures the resource information of the business system, including host, container, PaaS component, database, application service, domain name resolution, and corresponding configuration information.

[0093] Step S202, the topology construction module constructs the application deployment topology information of the system according to the actual deployment of the system.

[0094] Step S203, the atomic task module creates atomic tasks involved in the disaster recovery switching of the business system, including resource configuration verification, identification of system topology analysis upstream and downstream nodes, identification of associated configuration and configuration file update, application service restart, system state update, etc.

[0095] Step S204, the flow arrangement module arranges and designs the atomic task configured in step 3 into a complete switching flow according to the sequence of the business system disaster recovery switching operation.

[0096] Step S205, the disaster recovery switching module creates a disaster recovery switching task and executes, the system executes corresponding configuration file update, application service restart and other operations based on the upstream and downstream association information obtained by the topology identification according to the switching flow and switching object selected in the disaster recovery switching task, completes the automatic operation of the disaster recovery switching of the business system; at the same time, the disaster recovery switching progress is displayed in real time on the large screen.

[0097] According to some optional embodiments of the present application, step S201 can be implemented by the following method:

[0098] Step S2011, the user creates business system information.

[0099] Step S2012, the user configures the host and container resource information of the business system production and disaster recovery environment.

[0100] Step S2013, the user configures the PaaS component information used by the business system production and disaster recovery environment.

[0101] Step S2014, the user configures the database information of the business system production and disaster recovery environment.

[0102] Step S2015, the user configures the application information of the business system production and disaster recovery environment, including the deployed host / container, deployment directory / container cluster and namespace, application configuration file, application start / stop command, etc.

[0103] Step S2016, the disaster recovery switching automation system classifies and stores all the above resource information and manages them, and each type of resource information is labeled.

[0104] Step S2017, the user configures the correspondence between the configuration items in the business system configuration file and the system application, component and database, and forms an association between the configuration items in the configuration file of the business system and the corresponding parameter fields of the application, component and database in the system, providing a basis for configuration file modification.

[0105] According to some optional embodiments of the present application, step S202 can be implemented by the following method:

[0106] Step S2021, the user selects the system configured application, PaaS component and database object information and imports it into the topology canvas.

[0107] Step S2022, the disaster recovery switching automation system stores the node information of the topology.

[0108] Step S2023, the user connects the application, component, database through the directed arrow, and identifies the calling dependency relationship between the application, component, database, wherein the calling dependency relationship is as shown in the following table. Figure 3

[0109] Step S2024, the disaster recovery switching automation system stores the connection relationship information of the topology.

[0110] Exemplarily, the node information of the above topology is as follows:

[0111] Topology node example

[0112]

[0113] Field description: sysId: the business system number of the home, globally unique; nodeId: automatically generated object number, globally unique; nodeType: resource object type, 1 for application, 2 for PaaS component, and 3 for database; nodeName: resource object name.

[0114] The connection relationship information of the topology is as follows:

[0115] Topology example

[0116]

[0117]

[0118] Field description: sysId: the business system number of the home, globally unique; cells: topology connection relationship array object; source: the starting node number of the topology directed arrow; target: the ending node number of the topology directed arrow.

[0119] After the system obtains the number of a certain system resource object, the source (source) and target (target) information in the topology connection relationship can be queried to analyze the upstream and downstream nodes directly associated with the resource object, which serves as the basis for modifying the configuration and restarting the application during the disaster recovery switching.

[0120] In some optional embodiments of the present application, step S203 can be implemented by the following method:

[0121] ​Step S2031, resource configuration verification: verify the completeness of resource configuration, first acquire application topology information according to system information, detect that the topology connection information cells object at least exists one and more node connection relationship, if exists, it is judged that the resource configuration is normal, if the topology information is acquired unsuccessfully or one and more connection relationship does not exist in the topology information, it is judged that the resource configuration is abnormal; according to the node front and back relationship of topology connection, whether the application of dependent component is configured with corresponding configuration item association relationship is analyzed, if the corresponding association relationship is acquired, it is judged that the resource configuration is normal, if the corresponding association relationship is not acquired, it is judged that the resource configuration is abnormal.

[0122] Step S2032, analyze the upstream and downstream nodes on the topology: acquire resource information and application deployment topology information according to the switched application / component, find in the cells array object in the topology information according to the resource's nodeId, the target node value is equal to the corresponding nodeId, which indicates that there is an upstream dependence, the source node value is equal to the corresponding nodeId, which indicates that there is a downstream dependence; the switched resource object nodeId and the corresponding upstream and downstream object nodeId are encapsulated into affected object information and delivered to the downstream execution node.

[0123] Step S2033, configuration file identification and update: receive the result data of the topology upstream and downstream node analysis, according to the analyzed resource object nodeId affected by switching, query the corresponding configuration file and the configuration item and component association relationship of the configuration file, update the parameter value corresponding to the configuration item in the configuration file according to the configured parameter modification relationship, and update to the environment; the independent configuration file form updates the corresponding configuration file by logging into the host, and the unified configuration management center form updates the corresponding configuration file through the API provided by the configuration management center.

[0124] Step S2034, application service restart: receive the result data of the topology upstream and downstream node analysis, clear the application information affected by switching, acquire the deployment information of the application. Acquire the deployment host, deployment directory, deployment account, account password, application start and stop command of the host deployment mode, log in the deployment host, enter the deployment directory, execute the stop and start command to realize application restart; acquire the container cluster, namespace, corresponding service name, etc. of the container deployment mode, call the application service restart API of the container bottom layer to realize the restart operation.

[0125] Step S2035, system state update: after the application / component switching execution is successful, update the running state of the switching object in the master and standby environment of the system, that is, which resource is currently used as the master, to provide a judgment basis for the failback switching of the business system.

[0126] As some optional embodiments of the present application, step S204 can be implemented by the following method:

[0127] Step S2041, the user selects the atomic task configured by the system and imports it into the switching process arrangement window.

[0128] Step S2042, the disaster recovery switching automation system stores the atomic task information.

[0129] Step S2043, the user connects the atomic tasks through the directed arrows to identify the execution order of the atomic tasks.

[0130] Step S2044, the disaster recovery switching automation system stores the atomic task connection relationship information of the switching process.

[0131] For example, the storage sample of the switching process is as follows: atomic task node sample:

[0132]

[0133] Field description: sysId: the business system number to which it belongs, globally unique; flowId: automatically generated process number, globally unique; atomTaskId: atomic task number, globally unique; atomTaskName: atomic task name; atomTaskParams: parameters required for atomic task execution.

[0134] Process connection relationship sample:

[0135]

[0136]

[0137] Field description:

[0138] sysId: the business system number to which it belongs, globally unique; flowId: automatically generated process number, globally unique; edges: process array object; from: starting task number of the process directed arrow; to: end task number of the process directed arrow.

[0139] In some optional embodiments of the present application, step S205 can be implemented through the following method:

[0140] Step S2051, the user creates a disaster recovery switching task, selects the arranged switching process, the resource object to be switched, and the switching direction (production-disaster recovery, disaster recovery-production), and initiates task execution.

[0141] Step S2052, the disaster recovery switching automation system acquires the corresponding resource object information according to the resource object to be switched, automatically inquires the topology, identifies the upstream and downstream association relationship, determines the system modules affected by the switching, automatically performs the disaster recovery switching related configuration modification, application restart and other tasks, and realizes the automatic execution of the disaster recovery switching.

[0142] Figure 4 is a flowchart of a switching process according to an embodiment of the present application, as shown in Figure 4 Step S205 can also be implemented by the following method.

[0143] IF (the switched resource object does not have primary and backup resources) THEN

[0144] The switching process is abnormally exited and stopped.

[0145] } ELSE {

[0146] IF (the switched resource object is not in the topology) THEN

[0147] The switching process is abnormally exited and stopped.

[0148] } ELSE {

[0149] According to the switching resource object number, the upstream and downstream application information in the topology connection relationship is found.

[0150] According to the upstream and downstream application information analyzed after the topology identification, the application configuration item association relationship is acquired.

[0151] According to the switching direction in the switching task, the application configuration item association relationship, and the target information of the switching object, the corresponding configuration item is updated.

[0152] According to the deployment mode of the upstream and downstream applications analyzed after the topology identification, if the host deployment is used, the application service is restarted by using the pre-configured application restart command; if the container deployment is used, the application service is restarted through the container operation interface.

[0153] The running identifier of the business system after the switching is updated, that is, whether the current system or component runs in the production environment or the disaster recovery environment, to provide a judgment basis for the reverse switching of the system.

[0154] The process is normally exited.

[0155] } END IF

[0156] } END IF.

[0157] It should be noted that if the resource object to be switched changes, only a new task needs to be created in step 205 to select a new resource object to be switched; if the specific resource instance of the resource object is scaled, only the resource information needs to be updated in step S201. The disaster recovery switching configuration step is greatly simplified, and the configuration complexity is obviously reduced.

[0158] Through the above steps, in the complex system architecture scenario of telecommunications, the business system topology is identified, and configuration updating and application restart are performed based on the topology identification result to complete the automatic execution of the switching operation: according to the switching components / applications specified in the switching task, the affected upstream and downstream modules are quickly identified in the topology information according to the unique identifier of the switching object; according to the identified affected modules, the association between the configuration items in the configuration file of the application module and the components, databases, and applications is obtained, the configuration information of the associated objects is automatically obtained according to the execution direction of the switching task (production-disaster recovery, disaster recovery-production), the corresponding configuration items are automatically updated, and the updated configuration item information is validated according to the deployment mode of the application module to achieve rapid restart. This disaster recovery switching method can use a unified atomic task and switching process when switching different components, and only needs to specify the module to be switched in the specific switching task. Taking a system that needs to set N component switching processes and each switching process has M switching steps as an example, the traditional disaster recovery switching system needs (M+1+1)*N configuration steps to complete all component switching processes and switching task configurations, and the embodiment only needs M+1+N configuration steps. The expansion and contraction of telecommunications applications are frequent, and only the host / container information corresponding to the related system modules needs to be modified when the business system is expanded or contracted, and the system disaster recovery switching scheme and process do not need to be changed. When a component / application is added or deleted in the system, only the component / application object information and application deployment topology of the system need to be updated, and the system disaster recovery switching scheme and process do not need to be changed. The operation and maintenance complexity is reduced, and the disaster recovery switching efficiency and accuracy are improved.

[0159] Further, in the complex system architecture scenario of telecommunications, the construction method of the business system topology suitable for disaster recovery switching needs: the embodiment constructs the association relationship in the form of topology through the configuration management of the deployment resources, components, databases, and application services of the business system, and intuitively displays the affected modules when the business system components / applications are switched.

[0160] Further, in the complex system architecture scenario of telecommunications, the storage method of the business system topology: the embodiment stores the resource objects and resource types respectively through the application, component, and database configuration management in the business system, and constructs the topology association information of the business system through the unique identifier of the resource. According to the resource object type, the specific details of the production and disaster recovery environments are stored.

[0161] Further, in the context of a complex telecommunications system architecture, the management of business system configuration files: the present embodiment configures application-related configuration files in different environments when the business system application objects are managed, supports independent configuration file and unified configuration center management methods, and adapts to common configuration file types such as yaml and properties; the configuration items of components that may need to be switched are pre-configured, and the pre-configuration supports both the mode of selecting existing resource information and the form of complete customization.

[0162] Figure 5 is a structural diagram of a disaster recovery switching device according to an embodiment of the present application, as shown in the figure, the device comprises: Figure 5

[0163] The acquisition module 50 is configured to acquire resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise switching objects and deployment objects, the switching objects comprise service components, databases, and application services, and the deployment objects comprise hosts and containers, and the switching objects are deployed on the deployment objects.

[0164] The first determination module 52 is configured to determine deployment topology information of the business system, wherein the deployment topology information comprises upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects.

[0165] The second determination module 54 is configured to determine target sub-tasks for disaster recovery switching of the business system, wherein the target sub-tasks comprise a first sub-task for verifying the deployment topology information, a second sub-task for identifying the upstream and downstream resource objects in the deployment topology information, and a third sub-task for updating the resource information.

[0166] The arrangement module 56 is configured to arrange the target sub-tasks according to the received arrangement instructions, and determine the arranged target sub-tasks as a switching process.

[0167] The switching module 58 is configured to determine a to-be-switched object indicated by a disaster recovery switching task from the switching objects, and perform switching processing on the to-be-switched object by using the switching process.

[0168] ​Optionally, the acquiring the resource information of each resource object in the plurality of resource objects in the business system comprises: acquiring first resource information of the host in the production environment and second resource information of the host in the disaster recovery environment, wherein the first resource information and the second resource information comprise: hardware resource information, operating system information, network security information; acquiring third resource information of the container in the production environment and fourth resource information of the container in the disaster recovery environment, wherein the third resource information and the fourth resource information comprise: storage capacity information, data backup time interval information; acquiring fifth resource information of the service component in the production environment and sixth resource information of the service component in the disaster recovery environment, wherein the fifth resource information and the sixth resource information comprise: application program resource information, service level agreement information; acquiring seventh resource information of the database in the production environment and eighth resource information of the database in the disaster recovery environment, wherein the seventh resource information and the eighth resource information comprise: connection limit information, network resource information; acquiring ninth resource information of the application service in the production environment and tenth resource information of the application service in the disaster recovery environment, wherein the ninth resource information and the tenth resource information comprise: information of the host on which the application service is deployed, information of the container on which the application service is deployed, and configuration file of the application service.

[0169] Optionally, after the acquiring the resource information of each resource object in the plurality of resource objects in the business system, the method further comprises: establishing an association relationship between the configuration item and the fifth resource information, the sixth resource information, the seventh resource information, the eighth resource information, the ninth resource information and the tenth resource information in the configuration file used for configuring the business system.

[0170] Optionally, the determining the deployment topology information of the business system comprises: acquiring real deployment information between each switching object detected in the topology canvas to obtain a plurality of call relationship information, wherein each call relationship information comprises: a source object and a target object; acquiring identification information of each switching object; and determining upstream and downstream resource objects of each switching object according to the identification information of each switching object and the call relationship information corresponding to each switching object.

[0171] Optionally, the upstream and downstream resource objects of each switching object are determined according to the identification information of each switching object and the corresponding invocation relationship information of each switching object, including: in a case where the target switching object is a source object, taking other switching objects in the target invocation relationship information corresponding to the target switching object as downstream resource objects, wherein the target switching object is any one of the switching objects; in a case where the target switching object is a target object, taking other switching objects in the target invocation relationship information as upstream resource objects; in a case where the target switching object is an object other than the source object and the target object, determining switching objects between the source object and the target switching object as upstream resource objects, and determining switching objects between the target switching object and the target object as downstream resource objects.

[0172] Optionally, the first subtask for verifying the deployment topology information is used to perform the following steps: determining whether there is a first target switching object not including upstream and / or downstream resource objects in the deployment topology information, and if so, determining that the deployment topology information is abnormal; determining whether there is a target application service not configured with an association relationship with a target service component in the deployment topology information, and if so, determining that the deployment topology information is abnormal, wherein the target application service is an application service dependent on the target service component; in a case where it is determined that the deployment topology information is abnormal, re-determining the deployment topology information of the business system.

[0173] Optionally, the second subtask for identifying the upstream and downstream resource objects in the deployment topology information is used to perform the following steps: obtaining target identification information of a second target switching object for disaster recovery switching; determining first target invocation relationship information corresponding to the second target switching object according to the target identification information, wherein the first target invocation relationship information includes a first source object and a first target object; if it is determined that the identification information of the first source object is consistent with the target identification information, or it is determined that the identification information of the first target object is consistent with the target identification information, in the first target invocation relationship information, performing encapsulation processing on the second target switching object and other switching objects in the first target invocation relationship information to obtain a target encapsulation object.

[0174] Optionally, the third subtask for updating the resource information is configured to perform the following steps: querying a target configuration file where the target identification information is located, and querying a configuration item in the target configuration file and a target association relationship between each switching object in the target encapsulation object; updating the target association relationship according to the resource information of each switching object in the target encapsulation object; determining deployment information of the second target switching object, wherein the deployment information includes host deployment information or container deployment information, the host deployment information includes a deployment host, a deployment directory, a deployment account, a deployment password, a stop and start command of the second target switching object, and the container deployment information includes a container cluster, a namespace, and a service identification; and updating the resource information of the second target switching object in the primary and backup environments of the business system according to the deployment information of the second target switching object.

[0175] Optionally, the updating of the resource information of the second target switching object in the primary and backup environments of the business system according to the deployment information of the second target switching object includes: if the deployment information includes the host deployment information, logging in the deployment directory of the deployment host according to the deployment account and the deployment password, and executing the stop and start command in the deployment directory to restart the second target switching object; if the deployment information includes the container deployment information, calling an application programming interface corresponding to the service identification to restart the second target switching object; and updating a running state of the second target switching object in the primary and backup environments of the business system after the second target switching object is restarted.

[0176] Optionally, the switching process is used to perform the switching processing on the switching object, including: determining whether the switching object has primary and backup resource information in the resource information; if the switching object has the primary and backup resource information, determining whether the switching object is included in the deployment topology information; if the switching object is included in the deployment topology information, determining whether a first target upstream and downstream resource object corresponding to the switching object is included in the deployment topology information; if the first target upstream and downstream resource object is included in the deployment topology information, determining a target calling relationship between the switching object and the first target upstream and downstream resource object; determining a second target upstream and downstream resource object according to the target calling relationship, wherein the resource information of the second target upstream and downstream resource object is changed according to the change of the resource information of the switching object; restarting the switching object and the second target upstream and downstream resource object to perform the switching processing on the switching object, and replacing the identification information of the business system before the restart with the identification information of the business system after the restart.

[0177] It should be noted that the above Figure 5Each of the modules in the foregoing embodiments can be a program module (for example, a program instruction set for implementing a certain specific function) or a hardware module. For the hardware module, it can be in the form of, but not limited to, a processor or a processor for implementing the functions of the modules.

[0178] It should be noted that, Figure 5 The preferred implementation of the embodiments shown in the foregoing embodiments can be understood with reference to Figure 1 and Figure 2 The related descriptions of the embodiments shown in the foregoing embodiments will not be repeated here.

[0179] Figure 6 A hardware structure block diagram of a computer terminal for implementing the disaster recovery switching method is shown. As shown in Figure 6 The computer terminal 60 can include one or more (shown in the figure as 602a, 602b, …, 602n) processors 602 (the processor 602 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 604 for storing data, and a transmission module 606 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that, Figure 6 The structure shown is only schematic, and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 60 can include more or fewer components than those shown in Figure 6 or have a different configuration than that shown in Figure 6 .

[0180] It should be noted that the one or more processors 602 and / or other data processing circuits described above can be referred to as "data processing circuits" herein. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements combined into the computer terminal 60 in whole or in part. As referred to in the embodiments of the present application, the data processing circuit controls as a processor (for example, the selection of the variable resistance terminal path connected to the interface).

[0181] The memory 604 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the disaster recovery switching method in the embodiments of the present application. The processor 602 executes various functional applications and data processing by running the software programs and modules stored in the memory 604, i.e., implements the disaster recovery switching method described above. The memory 604 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 604 can further include memories remotely arranged with respect to the processor 602, which can be connected to the computer terminal 60 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0182] The transmission module 606 is configured to receive or send data via a network. The specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 60. In one example, the transmission module 606 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 606 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.

[0183] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computer terminal 60.

[0184] It should be noted that, in some optional embodiments, the above Figure 6 The computer terminal shown can include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that, Figure 6 is merely one example of a particular implementation, and is intended to illustrate the types of components that can be present in the computer terminal described above.

[0185] It should be noted that, Figure 6 The computer terminal shown is configured to execute Figure 1 and Figure 2 the disaster recovery switching method shown, and thus the related explanations in the execution method of the above commands also apply to the electronic device, which will not be described herein again.

[0186] The embodiments of the present application also provide a non-volatile storage medium, which includes a stored program, wherein the program controls the device where the storage medium is arranged to execute the disaster recovery switching method described above when the program is running.

[0187] The non-volatile storage medium executes a program performing the following functions: obtaining resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise: switching objects and deployment objects, the switching objects comprise: service components, databases, and application services, and the deployment objects comprise: hosts and containers, and the switching objects are deployed on the deployment objects; determining deployment topology information of the business system, wherein the deployment topology information comprises: upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; determining target sub-tasks for disaster recovery switching of the business system, wherein the target sub-tasks comprise: a first sub-task for verifying the deployment topology information, a second sub-task for identifying the upstream and downstream resource objects in the deployment topology information, and a third sub-task for updating the resource information; performing arrangement processing on the target sub-tasks according to a received arrangement instruction, and determining the target sub-tasks after the arrangement processing as a switching process; and determining a to-be-switched object indicated by a disaster recovery switching task from the switching objects, and performing switching processing on the to-be-switched object by using the switching process.

[0188] The application further provides an electronic device, comprising a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program performs the disaster recovery switching method described above.

[0189] The processor is configured to run a program performing the following functions: obtaining resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise: switching objects and deployment objects, the switching objects comprise: service components, databases, and application services, and the deployment objects comprise: hosts and containers, and the switching objects are deployed on the deployment objects; determining deployment topology information of the business system, wherein the deployment topology information comprises: upstream and downstream resource objects of each switching object and a calling relationship between each switching object and the upstream and downstream resource objects; determining target sub-tasks for disaster recovery switching of the business system, wherein the target sub-tasks comprise: a first sub-task for verifying the deployment topology information, a second sub-task for identifying the upstream and downstream resource objects in the deployment topology information, and a third sub-task for updating the resource information; performing arrangement processing on the target sub-tasks according to a received arrangement instruction, and determining the target sub-tasks after the arrangement processing as a switching process; and determining a to-be-switched object indicated by a disaster recovery switching task from the switching objects, and performing switching processing on the to-be-switched object by using the switching process.

[0190] The above application embodiment serial numbers are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0191] In the above embodiments of the application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0192] In the above embodiments of the present application, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with relevant laws, regulations and standards, necessary protection measures are taken, the public order and good customs are not violated, and corresponding operation portals are provided for the user to select authorization or refusal.

[0193] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.

[0194] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed to multiple units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0195] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0196] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part that essentially contributes to the related art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk and various program code storage media.

[0197] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method of failover, the method comprising: The method comprises the following steps: obtaining resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise a switching object and a deployment object, the switching object comprises a service component, a database and an application service, and the deployment object comprises a host and a container, and the switching object is deployed on the deployment object; determining deployment topology information of the business system, wherein the deployment topology information comprises upstream and downstream resource objects of each switching object and a calling relationship between the each switching object and the upstream and downstream resource objects; determining a target subtask for disaster recovery switching of the business system, wherein the target subtask comprises a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating resource information; arranging the target subtask according to a received arrangement instruction, and determining the arranged target subtask as a switching process; determining a to-be-switched object indicated by a disaster recovery switching task from the switching object, and performing switching processing on the to-be-switched object by using the switching process.

2. The method of claim 1, wherein, The method for obtaining resource information of each resource object in a plurality of resource objects in a business system comprises the following steps: obtaining first resource information of the host in a production environment and second resource information of the host in a disaster recovery environment, wherein the first resource information and the second resource information comprise hardware resource information, operating system information and network security information; obtaining third resource information of the container in the production environment and fourth resource information of the container in the disaster recovery environment, wherein the third resource information and the fourth resource information comprise storage capacity information and data backup time interval information; obtaining fifth resource information of the service component in the production environment and sixth resource information of the service component in the disaster recovery environment, wherein the fifth resource information and the sixth resource information comprise application program resource information and service level agreement information; obtaining seventh resource information of the database in the production environment and eighth resource information of the database in the disaster recovery environment, wherein the seventh resource information and the eighth resource information comprise connection restriction information and network resource information; obtaining ninth resource information of the application service in the production environment and tenth resource information of the application service in the disaster recovery environment, wherein the ninth resource information and the tenth resource information comprise information of the host on which the application service is deployed, information of the container on which the application service is deployed, and a configuration file of the application service.

3. The method of claim 2, wherein, After obtaining the resource information of each resource object in the plurality of resource objects in the business system, the method further comprises the following steps: establishing an association relationship between a configuration item and the fifth resource information, the sixth resource information, the seventh resource information, the eighth resource information, the ninth resource information and the tenth resource information in a configuration file used for configuring the business system.

4. The method of claim 1, wherein, The method for determining the deployment topology information of the business system comprises the following steps: Obtaining real deployment information between each switching object detected in the topology canvas to obtain a plurality of calling relationship information, wherein each calling relationship information includes a source object and a target object; Obtaining identification information of each switching object; Determining upstream and downstream resource objects of each switching object according to the identification information of each switching object and the calling relationship information corresponding to each switching object.

5. The method of claim 4, wherein, Determining upstream and downstream resource objects of each switching object according to the identification information of each switching object and the calling relationship information corresponding to each switching object, comprising: In the case that the target switching object is the source object, taking other switching objects in the target calling relationship information corresponding to the target switching object as downstream resource objects, wherein the target switching object is any one of the switching objects; In the case that the target switching object is the target object, taking other switching objects in the target calling relationship information as upstream resource objects; In the case that the target switching object is an object other than the source object and the target object, determining switching objects between the source object and the target switching object as upstream resource objects and determining switching objects between the target switching object and the target object as downstream resource objects.

6. The method of claim 1, wherein, A first subtask for verifying the deployment topology information, for performing the following steps: Determining whether there is a first target switching object not including upstream and / or downstream resource objects in the deployment topology information, and if there is, determining that the deployment topology information is abnormal; Determining whether there is a target application service not configured with an association relationship with a target service component in the deployment topology information, and if there is, determining that the deployment topology information is abnormal, wherein the target application service is an application service dependent on the target service component; In the case that it is determined that the deployment topology information is abnormal, re-determining the deployment topology information of the business system.

7. The method according to claim 1 or 6, characterized in that, A second subtask for identifying upstream and downstream resource objects in the deployment topology information, for performing the following steps: Obtaining target identification information of a second target switching object for disaster recovery switching; Determining first target calling relationship information corresponding to the second target switching object according to the target identification information, wherein the first target calling relationship information includes a first source object and a first target object; If it is determined in the first target calling relationship information that the identification information of the first source object is consistent with the target identification information, or it is determined whether the identification information of the first target object is consistent with the target identification information, performing encapsulation processing on the second target switching object and other switching objects in the first target calling relationship information to obtain a target encapsulation object.

8. The method of claim 7, wherein, A third subtask for updating resource information, for performing the following steps: Querying a target configuration file in which the target identification information is located, and querying a configuration item in the target configuration file and a target association relationship of each switching object in the target encapsulation object; updating the target association relationship according to resource information of each switching object in the target packaging object; determining deployment information of the second target switching object, wherein the deployment information comprises host deployment information or container deployment information, and the host deployment information comprises a deployment host, a deployment directory, a deployment account, a deployment password, a stop and start command of the second target switching object, and the container deployment information comprises a container cluster, a namespace, and a service identifier; updating resource information of the second target switching object in a primary / backup environment of the business system according to the deployment information of the second target switching object.

9. The method of claim 8, wherein, The updating of the resource information of the second target switching object in the primary / backup environment of the business system according to the deployment information of the second target switching object comprises: if the deployment information comprises the host deployment information, logging in the deployment directory of the deployment host according to the deployment account and the deployment password, and executing the stop and start command in the deployment directory to restart the second target switching object; if the deployment information comprises the container deployment information, calling an application programming interface corresponding to a restarted service identifier to restart the second target switching object; updating a running state of the second target switching object in the primary / backup environment of the business system after the second target switching object is restarted.

10. The method of claim 1, wherein, The switching of the to-be-switched object by using the switching process comprises: determining whether the to-be-switched object has primary / backup resource information in the resource information, and determining whether the to-be-switched object is included in the deployment topology information in a case where the to-be-switched object has the primary / backup resource information; in a case where the to-be-switched object is included in the deployment topology information, determining whether a first target upstream / downstream resource object corresponding to the to-be-switched object is included in the deployment topology information; in a case where the first target upstream / downstream resource object is included in the deployment topology information, determining a target invocation relationship between the to-be-switched object and the first target upstream / downstream resource object; determining a second target upstream / downstream resource object according to the target invocation relationship, wherein resource information of the second target upstream / downstream resource object changes according to a change in the resource information of the to-be-switched object restarting the to-be-switched object and the second target upstream / downstream resource object to switch the to-be-switched object, and replacing identifier information of the business system before being restarted with identifier information of the business system after being restarted.

11. A failover device, comprising: comprise: an acquisition module configured to acquire resource information of each resource object in a plurality of resource objects in a business system, wherein the plurality of resource objects comprise switching objects and deployment objects, the switching objects comprise service components, databases, and application services, the deployment objects comprise hosts and containers, and the switching objects are deployed on the deployment objects; The first determining module is configured to determine deployment topology information of the service system, wherein the deployment topology information comprises upstream and downstream resource objects of each switching object and a calling relationship between the each switching object and the upstream and downstream resource objects. The second determining module is configured to determine a target subtask of the service system for disaster recovery switching, wherein the target subtask comprises a first subtask for verifying the deployment topology information, a second subtask for identifying the upstream and downstream resource objects in the deployment topology information, and a third subtask for updating resource information. The arrangement module is configured to arrange the target subtask according to the received arrangement instruction, and determine the arranged target subtask as a switching process. The switching module is configured to determine a to-be-switched object indicated by a disaster recovery switching task from the switching objects, and perform switching processing on the to-be-switched object by using the switching process.

12. A non-volatile storage medium, comprising: The non-volatile storage medium comprises a stored program, wherein when the program is running, the non-volatile storage medium controls a device in which the non-volatile storage medium is located to perform the disaster recovery switching method in any one of claims 1 to 10.

13. An electronic device, comprising: Comprise: A memory and a processor, wherein the processor is configured to run a program stored in the memory, and when the program is running, the disaster recovery switching method in any one of claims 1 to 10 is performed.

14. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the disaster recovery switching method in any one of claims 1 to 10. The computer program is executed by the processor to implement the disaster recovery switching method in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Personalized data disaster tolerance method and device

    CN110784498A

  • Disaster recovery method and system supporting multi-cloud production environment

    CN114780301A