Disaster recovery control method and device, computer device and storage medium

By acquiring and applying disaster recovery control information during the state transition from user mode to kernel mode on a cloud host, and utilizing eBPF technology for rapid disaster recovery control, the problem of low efficiency in traditional disaster recovery control is solved, and efficient disaster recovery control is achieved.

CN119520244BActive Publication Date: 2026-01-20CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411628091.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2026-01-20
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Traditional disaster recovery control methods rely on manual operation and fixed strategies, resulting in low efficiency and difficulty in responding quickly when a disaster occurs.

Method used

The cloud host obtains disaster recovery control information while running in user mode, and performs disaster recovery control by filtering target control conditions and modes that match the system status information when switching to kernel mode, and uses eBPF technology to improve data exchange rate.

Benefits of technology

It achieves rapid disaster recovery control at the kernel level, improving disaster recovery control efficiency and reducing hardware resource consumption and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520244B_ABST
    Figure CN119520244B_ABST
Patent Text Reader

Abstract

The application relates to a disaster recovery control method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining disaster recovery control information of a cloud host from a control end under the condition that the cloud host runs in a user state, the disaster recovery control information comprising a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions; in response to a running state switching event that the cloud host switches from the user state to a kernel state, obtaining system state information of the cloud host; in the disaster recovery control conditions, screening a target control condition matched with the system state information, and determining a target control mode corresponding to the target control condition from the disaster recovery control modes; and using the above method, the cloud host is in the kernel state, the cloud host is controlled according to the target control mode, kernel-level rapid disaster recovery control is realized, and the disaster recovery control efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and in particular to a disaster recovery control method and device, computer equipment, a storage medium and a computer program product. BACKGROUND

[0002] In today's enterprise environment, it is particularly important to maintain the high availability and stability of IT systems. When a system or service fails, the service needs to be switched to a backup system or component to ensure uninterrupted operation of the business and system stability.

[0003] In the traditional technology, disaster recovery control is dependent on manual operation and fixed strategies. Since there are many disaster recovery control steps, the manual disaster recovery control process is complex and time-consuming, and it is difficult to respond quickly when a disaster occurs, so there is still a problem of low disaster recovery control efficiency. SUMMARY

[0004] Therefore, it is necessary to provide a disaster recovery control method, device, computer equipment, computer readable storage medium and computer program product capable of improving the efficiency of disaster recovery control in view of the above technical problems.

[0005] In a first aspect, the present application provides a disaster recovery control method applied to a cloud host, the method comprising: obtaining, from a control end, disaster recovery control information of the cloud host in a case where the cloud host runs in a user state; the disaster recovery control information comprising a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions; in response to a running state switching event in which the cloud host switches from the user state to a kernel state, obtaining system state information of the cloud host; screening a target control condition matching the system state information from the disaster recovery control conditions, and determining a target control mode corresponding to the target control condition from the disaster recovery control modes; and performing disaster recovery control on the cloud host according to the target control mode.

[0006] In one of the embodiments, the system state information comprises parameter values of a plurality of preset parameters; and the screening of the target control condition matching the system state information from the disaster recovery control conditions comprises: determining, for each of the disaster recovery control conditions, a condition parameter used to represent the disaster recovery control condition; if the condition parameter corresponding to the disaster recovery control condition is included in the plurality of preset parameters, the disaster recovery control condition is determined as a candidate control condition; and for each of the candidate control conditions, if a parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as the target control condition matching the system state information.

[0007] In one of the embodiments, the number of target control modes is multiple, and the disaster recovery control of the cloud host according to the target control mode comprises: obtaining an expected recovery time of each target control mode; and performing the disaster recovery control of the cloud host according to the target control mode with the shortest expected recovery time.

[0008] In one of the embodiments, the method further comprises: loading the disaster recovery control information to the storage space in the kernel mode when the cloud host runs in the user mode; and the method further comprises: reading the disaster recovery control information from the storage space when the cloud host runs in the kernel mode.

[0009] In one of the embodiments, the obtaining of the disaster recovery control information of the cloud host from the control end comprises: obtaining multiple preset control information configured for the cloud host from the control end; performing control condition verification on each preset control information, and determining the preset control information passing the control condition verification as first control information; performing control mode verification on each preset control information, and determining the preset control information passing the control mode verification as second control information; and integrating the first control information and the second control information to obtain the disaster recovery control information of the cloud host.

[0010] In one of the embodiments, the method further comprises: in the case that the cloud host runs in the user mode, obtaining updated disaster recovery control script and disaster recovery control information from the control end in response to a disaster recovery control update event; the obtaining of the system state information of the cloud host comprises: calling the disaster recovery control script to obtain the system state information of the cloud host; and the screening of the target control condition matching the system state information from the disaster recovery control conditions comprises: screening the target control condition matching the system state information from multiple disaster recovery control conditions contained in the updated disaster recovery control information.

[0011] In a second aspect, the application further provides a disaster recovery control device. The device comprises:

[0012] The control information obtaining module is configured to obtain, when the cloud host runs in a user mode, disaster control information of the cloud host from a control end; the disaster control information comprises a plurality of disaster control conditions and a disaster control mode corresponding to each of the disaster control conditions; the state information obtaining module is configured to obtain system state information of the cloud host in response to a running state switching event in which the cloud host switches from the user mode to a kernel mode; the condition screening module is configured to screen, among the disaster control conditions, a target control condition matched with the system state information, and determine a target control mode corresponding to the target control condition from the disaster control modes; and the disaster control module is configured to perform disaster control on the cloud host according to the target control mode.

[0013] In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0014] When the cloud host runs in a user mode, disaster control information of the cloud host is obtained from a control end; the disaster control information comprises a plurality of disaster control conditions and a disaster control mode corresponding to each of the disaster control conditions; system state information of the cloud host is obtained in response to a running state switching event in which the cloud host switches from the user mode to a kernel mode; among the disaster control conditions, a target control condition matched with the system state information is screened, and a target control mode corresponding to the target control condition is determined from the disaster control modes; and disaster control is performed on the cloud host according to the target control mode.

[0015] In a fourth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0016] When the cloud host runs in a user mode, disaster control information of the cloud host is obtained from a control end; the disaster control information comprises a plurality of disaster control conditions and a disaster control mode corresponding to each of the disaster control conditions; system state information of the cloud host is obtained in response to a running state switching event in which the cloud host switches from the user mode to a kernel mode; among the disaster control conditions, a target control condition matched with the system state information is screened, and a target control mode corresponding to the target control condition is determined from the disaster control modes; and disaster control is performed on the cloud host according to the target control mode.

[0017] In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:

[0018] In the case where the cloud host runs in the user state, the disaster recovery control information of the cloud host is obtained from the control end; the disaster recovery control information comprises a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions; in response to a running state switching event in which the cloud host switches from the user state to the kernel state, the system state information of the cloud host is obtained; among the disaster recovery control conditions, a target control condition matching the system state information is screened, and a target control mode corresponding to the target control condition is determined from the disaster recovery control modes; and the cloud host is controlled according to the target control mode.

[0019] The disaster recovery control method, device, computer device, storage medium and computer program product described above, in the case where the cloud host runs in the user state, the disaster recovery control information of the cloud host is obtained from the control end; the disaster recovery control information comprises a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions; in the case where the cloud host runs in the user state, the disaster recovery control information of the cloud host is obtained from the control end; the disaster recovery control information comprises a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions; in response to a running state switching event in which the cloud host switches from the user state to the kernel state, the system state information of the cloud host is obtained; among the disaster recovery control conditions, a target control condition matching the system state information is screened, and a target control mode corresponding to the target control condition is determined from the disaster recovery control modes; and the cloud host is controlled according to the target control mode. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 An application environment diagram of the disaster recovery control method in an embodiment;

[0021] Figure 2 A flowchart of the disaster recovery control method in an embodiment;

[0022] Figure 3 A flowchart of the method for determining a target control condition in an embodiment;

[0023] Figure 4 A flowchart of the disaster recovery control method in another embodiment;

[0024] Figure 5 A flowchart of the method for eBPF cloud host disaster recovery control in an embodiment;

[0025] Figure 6 An eBPF cloud host disaster recovery control system in an embodiment;

[0026] Figure 7 a flowchart of a disaster recovery switching method in an embodiment;

[0027] Figure 8 a structural block diagram of a disaster recovery control device in an embodiment;

[0028] Figure 9 an internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0029] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0030] The disaster recovery control method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . The control end 102 communicates with the cloud host 104 through a network. The data storage system can store data that needs to be processed by the cloud host 104. The data storage system can be integrated on the cloud host 104, or placed on the cloud or other network servers.

[0031] The cloud host 104 obtains the disaster recovery control information of the cloud host 104 from the control end 102 in the case that the cloud host 104 runs in a user state, and the disaster recovery control information includes a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions. The cloud host 104 obtains system state information of the cloud host 104 in response to a running state switching event that the cloud host 104 switches from the user state to the kernel state. The cloud host 104 screens a target control condition matching the system state information from the disaster recovery control conditions, and determines a target control mode corresponding to the target control condition from the disaster recovery control modes. The cloud host 104 performs disaster recovery control on the cloud host 104 according to the target control mode.

[0032] The control end 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The cloud host 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0033] In an embodiment, as shown in Figure 2 , a disaster recovery control method is provided. Taking the cloud host 104 in Figure 1 as an example, the method includes the following steps.

[0034] S202, in the case where the cloud host runs in the user state, obtaining the disaster recovery control information of the cloud host from the control terminal.

[0035] The cloud host can be a cloud computing service based on virtualization technology. The cloud host can be a plurality of independent virtual hardware systems simulated on a physical server through virtualization technology, and each virtual hardware system can run a different customer operating system. The resources of the cloud host include CPU, memory, disk, and other computing components, which are virtualized and not real physical electronic components.

[0036] The cloud host can also be a physical hardware relied on by a cloud computing server. Specifically, the cloud computing service can be a service relying on physical hardware such as servers, storage devices, and network devices.

[0037] The user state can represent a state of the kernel, and the state of the kernel can include the user state and the kernel state. For example, in an operating system, the kernel state (Kernel Mode) and the user state (User Mode) are two different CPU running modes, which correspond to different permission levels and resource access capabilities. The user state is the state in which the user program runs in the operating system, and the access of the program to the system resources is limited, and the program cannot directly use the system resources or change the working state of the CPU. The kernel state is the state in which the kernel of the operating system runs, and has complete access permission and can perform critical tasks such as memory management and hardware operation.

[0038] Specifically, when the cloud host is in the user state, the access of the program to the system resources is limited, and the program cannot directly use the system resources or change the running state of the CPU. When the cloud host is in the kernel state, the program has complete access permission to the system resources and can perform critical tasks such as memory management and hardware operation, and the program runs in the CPU in the kernel state with faster processing rate.

[0039] The control terminal can represent a terminal in communication with the cloud host and used for sending disaster recovery control information to the cloud host. The control terminal can be a terminal interacting with the computing service represented by the cloud host, and the control terminal can also be a terminal in communication connection with the server relied on by the cloud host. The control terminal can also be a terminal or server corresponding to the management platform of the server relied on by the cloud host.

[0040] The disaster recovery control information can include a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each disaster recovery control condition.

[0041] The disaster tolerance control condition is a specific condition for configuring the disaster tolerance information. The disaster tolerance control condition can specifically include a preset state of a network state of the cloud host, a preset port of the cloud host, or a CPU load rate of the cloud host being greater than a preset value. The disaster tolerance control mode can represent a specific control means for the cloud host. For example, the disaster tolerance control mode can be traffic control, capacity expansion, traffic migration, and the like.

[0042] Specifically, the cloud host can determine a running state of itself. In a case where the cloud host is in a user mode, the cloud host can obtain the disaster tolerance control information of itself from the control end. In a case where the cloud host is in a kernel mode, the cloud host does not obtain the disaster tolerance control information of the cloud host from the control end.

[0043] In one of the embodiments, the cloud host can directly obtain the disaster tolerance control information of the cloud host from the control end. The cloud host can also obtain the disaster tolerance control information of the cloud host from other cloud hosts. For example, the cloud host A can obtain the disaster tolerance control information a of the cloud host A from the control end. The cloud host A can also obtain the disaster tolerance control information a of the cloud host A from other cloud host B, which can effectively relieve the communication pressure between the control end and the cloud host.

[0044] In one of the embodiments, the cloud host can also obtain updated disaster tolerance control information from the control end in a case where the cloud host is running in the user mode and in response to a disaster tolerance control update event.

[0045] In one of the embodiments, the cloud host can also obtain a plurality of preset control information configured for the cloud host from the control end. The cloud host can verify each preset control information, and determine the preset control information that passes the verification as the disaster tolerance control information.

[0046] S204, in response to a running state switching event of the cloud host switching from the user mode to the kernel mode, obtaining system state information of the cloud host.

[0047] The running state switching event can represent a triggering event of the state switching of the cloud host. The triggering event can be a system call event, an interrupt event, and an exception event. Illustratively, the system call event can represent an event in which the user state process actively requests to switch to the kernel state. Through the system call, the user program can request the operating system to provide services such as file operation, memory management, and the like. The interrupt and exception events can represent events corresponding to the occurrence of an interrupt of a hardware device or an exception of a program.

[0048] The system state information can represent state information of the operating system in the cloud host. Specifically, the state information can include a process name, a CPU load, a memory load, a network load, and a port state, and the like.

[0049] The process name can represent the name of a program running in the cloud host, and can be used to monitor and manage the performance and resources of the system. In the Linux system, a variety of commands can be used to find the process name, such as ps, top, htop, lsof, and pgrep. For example, the ps -A command can list all running processes.

[0050] The CPU load can represent the workload of the central processing unit of the cloud host when processing tasks, usually expressed in percentage, reflecting the relative relationship between the number of tasks currently processed by the CPU and the maximum number of tasks that can be processed simultaneously by the system. The load average of the system can be viewed through the uptime command. The resource usage of the Linux system in real time can be viewed through the top command.

[0051] The memory load can represent the usage of the memory in the system of the cloud host. The process and resource usage of the Linux system in real time, including the memory usage, can be viewed through the top command.

[0052] The network load can represent the ability of the cloud host to transmit and process data packets in the network, and is usually used to measure the degree of busyness and performance of a network or system. The specific network load can be evaluated by viewing the traffic, packet loss rate, and other indicators of the network interface.

[0053] The port state can represent the current working state of the network port of the cloud host, such as listening, established, time_wait, close_wait, etc. In the Linux system, commands such as netstat, lsof, ss, etc. can be used to view the port state. For example, netstat -ntlp can view the state of all TCP ports.

[0054] Specifically, the cloud host can determine that the running state of the cloud host is in the kernel state in response to a running state switching event in which the cloud host switches from the user state to the kernel state. In the case where the running state of the cloud host is in the kernel state, the cloud host can obtain system state information of the cloud host.

[0055] Specifically, the cloud host can obtain a set of acquisition instructions configured for the system state information. The cloud host obtains the state information corresponding to each instruction in the set of acquisition instructions based on the instructions in the set of acquisition instructions. The cloud host obtains the system state information by synthesizing the state information.

[0056] In one of the embodiments, the cloud host can update the version of each instruction in the instruction set to obtain a new instruction corresponding to each instruction. When each new instruction passes the instruction compliance check, the cloud host can obtain state information corresponding to each new instruction according to the new instruction. The cloud host can obtain system state information by synthesizing the state information.

[0057] S206, in each disaster control condition, a target control condition matching the system state information is selected, and a target control mode corresponding to the target control condition is determined from each disaster control mode.

[0058] The target control condition can represent a disaster control condition matching the system state information. The target control mode represents a disaster control mode corresponding to the target control mode. The target control condition can correspond to one or more target control modes.

[0059] Specifically, when the target control condition corresponds to one target control mode, the cloud host can perform disaster control on the cloud host according to the target control mode. When the target control condition corresponds to multiple target control modes, the cloud host can select each target control mode to obtain a final control mode. The cloud host performs disaster control on the cloud host according to the final control mode.

[0060] Specifically, the system state information can include parameter values of each of a plurality of preset parameters. The cloud host can determine a condition parameter for representing each disaster control condition. If the condition parameter corresponding to the disaster control condition is included in the plurality of preset parameters, the cloud host can determine the disaster control condition as a candidate control condition. For each candidate control condition, if the parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the cloud host can determine the candidate control condition as a target control condition matching the system state information.

[0061] Specifically, the cloud host can also respond to the control condition selection event to select, from each disaster control condition, a target control condition matching the system state information, and determine, from each disaster control mode, a target control mode corresponding to the target control condition.

[0062] S208, according to the target control mode, the cloud host is controlled.

[0063] The target control mode can include at least traffic control, traffic migration, capacity expansion, etc.

[0064] Traffic forwarding can represent the process of forwarding data flows in a network from one node to another. This is commonly used to implement data exchange or routing functions between different nodes in the network. For example, in a cloud environment, traffic forwarding can be achieved by configuring public network routing rules to ensure that data packets can correctly reach the target host. In addition, traffic forwarding can also be achieved through port mapping, such as forwarding the traffic of a certain port of the public IP to the corresponding port of the internal host.

[0065] Traffic migration can represent the transfer of business traffic between different hosts or clusters to achieve load balancing or failover. For example, when scaling a database, traffic can be diverted to the new database through routing switching of the database splitting rule, thereby achieving a smooth scaling process.

[0066] Scaling can represent increasing the hardware or software resources of a cloud host to meet the needs of an application. Scaling can be divided into two ways: one is to scale the whole machine, including increasing CPU, memory, storage devices, etc.; the other is to scale specific components, such as expanding memory, disk or CPU. Scaling strategy can dynamically adjust resources according to business needs to address access latency and resource overload issues. For example, by increasing bandwidth or adjusting bandwidth size to cope with traffic changes.

[0067] Specifically, the cloud host corresponding to the target control mode can obtain the expected recovery time of each target control mode. The cloud host can perform disaster recovery control on itself according to the target control mode with the shortest expected recovery time.

[0068] Specifically, the cloud host can also determine a selected control mode from the target control modes in response to a control mode selection event. The cloud host performs disaster recovery control on itself according to the selected control mode. Disaster recovery control can include traffic control, traffic migration, scaling, etc.

[0069] For example, the cloud host can also determine traffic control from traffic control, traffic migration, and scaling in response to a control mode selection event. The cloud host performs traffic control on itself according to the selected control mode.

[0070] In the aforementioned disaster recovery control method, when the cloud host is running in user mode, disaster recovery control information is obtained from the control terminal. This information includes multiple disaster recovery control conditions and their corresponding disaster recovery control modes. This facilitates subsequent disaster recovery control in kernel mode, improving efficiency. In response to the cloud host switching from user mode to kernel mode, system status information is obtained. Among the various disaster recovery control conditions, target control conditions matching the system status information are selected, and the target control mode corresponding to the target control condition is determined from the various disaster recovery control modes. Using this method, when the cloud host is in kernel mode, it performs disaster recovery control according to the target control mode, achieving rapid kernel-level disaster recovery control and thus improving efficiency.

[0071] In one embodiment, such as Figure 3 The flowchart shown illustrates the method for determining target control conditions. The system status information includes the parameter values ​​of multiple preset parameters. S206 includes S302 to S306, wherein:

[0072] S302, for each disaster recovery control condition, determine the condition parameters used to characterize the disaster recovery control condition.

[0073] The preset parameters can be, for example, process name, CPU load, memory load, network load, and port status. The parameter values ​​can be specific values ​​of the preset parameters. For example, process name XX, CPU load 70%, etc.

[0074] Conditional parameters can be specific parameters that characterize disaster recovery control conditions. For example, specific parameters can be process name, CPU load, memory load, network load, and port status.

[0075] The parameters characterizing different disaster recovery control conditions can vary. For example, the parameters for disaster recovery control condition 1 are CPU load and memory load. Another example is the parameters for disaster recovery control condition 2, which are port number and process name.

[0076] S304 If multiple preset parameters include condition parameters corresponding to disaster recovery control conditions, then the disaster recovery control conditions will be determined as candidate control conditions.

[0077] Among them, the multiple preset parameters include the condition parameters corresponding to the disaster recovery control conditions, which can indicate that the disaster recovery control conditions are applicable to judging the parameter values ​​corresponding to the multiple preset parameters.

[0078] The candidate control condition can represent a disaster recovery control condition in which each condition parameter corresponds to a preset parameter. For example, the plurality of preset parameters include preset parameter a and preset parameter b, and a disaster recovery control condition including at least one of condition parameter a and condition parameter b can be determined as a candidate control condition. If the disaster recovery control condition further includes condition parameter c, the disaster recovery control condition is not a candidate control condition.

[0079] S306, for each candidate control condition, if the parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as a target control condition matched with the system state information.

[0080] The parameter range can represent a specific parameter value range configured for the condition parameter. For example, when the condition parameter is CPU load rate, the parameter range can be that the CPU load rate is greater than 70%. For another example, when the condition parameter is memory load rate, the parameter range can be that the memory load rate is greater than 80%.

[0081] The parameter range of the condition parameter containing the parameter value of the preset parameter corresponding to the condition parameter can mean that the CPU load rate greater than 70% contains the CPU load rate of 72%.

[0082] It should be noted that if the preset parameters are CPU load rate and memory load rate, and a certain candidate control condition only includes the parameter range corresponding to the CPU load rate. If the parameter range contains the parameter value of the CPU load rate, the candidate control condition is a target control condition matched with the system state information.

[0083] In this embodiment, for each disaster recovery control condition, a condition parameter used to represent the disaster recovery control condition is determined, if the plurality of preset parameters include the condition parameter corresponding to the disaster recovery control condition, the disaster recovery control condition is determined as a candidate control condition, for each candidate control condition, if the parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as a target control condition matched with the system state information, each disaster recovery control condition is filtered according to the preset parameter and the condition parameter to obtain the candidate control condition, and each candidate control condition is filtered according to the parameter range of the condition parameter and the parameter value of the preset parameter to obtain the target control condition matched with the system state information, thereby reducing the consumption of hardware resources and improving the subsequent disaster recovery control efficiency.

[0084] In one embodiment, the number of target control modes is multiple, and the cloud host is controlled for disaster recovery according to the target control mode, including: obtaining the expected recovery time of each target control mode. The cloud host is controlled for disaster recovery according to the target control mode with the shortest expected recovery time.

[0085] The preset recovery time can represent a time required for the cloud host to exclude a disaster risk. Specifically, the preset recovery time can represent a time interval from a cloud host disaster alarm time to a cloud host disaster alarm release time. More specifically, the expected recovery time can represent a control duration of the cloud host in the target control mode.

[0086] Specifically, the cloud host can obtain a recovery time target configured for the cloud host, and an expected recovery time of each target control mode. The cloud host can filter a target recovery duration shorter than the recovery time target from the expected recovery times. If the number of target recovery durations is more than one, the cloud host can randomly determine a target control mode corresponding to a target recovery duration from the target recovery durations, and perform disaster control on the cloud host according to the target control mode.

[0087] In one of the embodiments, if the duration of each expected recovery time is greater than the recovery time target, the cloud host can perform disaster control on the cloud host according to the target control mode with the shortest expected recovery time.

[0088] The recovery time target (RTO) can represent a maximum tolerable time required for a system to recover normal operation after a failure or disaster. For example, if the RTO is set to one hour, the business can tolerate a certain degree of downtime within this time period, and exceeding this time period may lead to adverse consequences.

[0089] In one of the embodiments, the cloud host can predict the recovery time of each target control mode to obtain an expected recovery time of each target control mode. Specifically, for each target control mode, the cloud host can determine the mean value of the historical recovery time of the target control mode as the expected recovery time of the target control mode.

[0090] In this embodiment, the number of target control modes is more than one, the expected recovery time of each target control mode is obtained, and the cloud host is controlled according to the target control mode with the shortest expected recovery time, which ensures that the disaster control time of the cloud host is the shortest and improves the disaster control efficiency.

[0091] In one of the embodiments, the disaster control method further includes loading the disaster control information to a storage space in the kernel state when the cloud host runs in the user state. The disaster control method further includes reading the disaster control information from the storage space when the cloud host runs in the kernel state.

[0092] The storage space in the kernel state can represent a higher address space. For example, in a 64-bit system, the kernel state address space is located in the high address part. This is conducive to improving the resource call rate of the storage space.

[0093] Specifically, the cloud host can use the eBPF technology to load the disaster recovery control information to the storage space in the kernel state.

[0094] Wherein, eBPF (Extended Berkeley Packet Filter) is a user space program running in the Linux kernel, which is compiled into eBPF bytecode through LLVM / Clang, and the bytecode instructions are transmitted into the kernel through the system call bpf(). The eBPF program can be executed when a specific event is triggered, and the data exchange between the kernel space and the user space can be realized through eBPF maps.

[0095] In one of the embodiments, the cloud host runs a user space program, transmits the bytecode instructions into the storage space in the kernel through the system call bpf(), and realizes the process of loading the disaster recovery control information to the storage space in the kernel state.

[0096] Specifically, in the case that the cloud host runs in the user state, the cloud host can obtain the disaster recovery control information of the cloud host from the control end, and the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control modes corresponding to each disaster recovery control condition. The cloud host can load the disaster recovery control information to the storage space in the kernel state. The cloud host can obtain the system state information of the cloud host in response to the running state switching event of the cloud host switching from the user state to the kernel state. The cloud host can read the disaster recovery control information from the storage space in the case that the cloud host runs in the kernel state. The cloud host can screen the target control condition matching the system state information from the disaster recovery control conditions, and determine the target control mode corresponding to the target control condition from the disaster recovery control modes. The cloud host can perform disaster recovery control on the cloud host according to the target control mode.

[0097] In this embodiment, in the case that the cloud host runs in the user state, the disaster recovery control information is loaded to the storage space in the kernel state, and the storage space in the kernel state stores the disaster recovery control information. In the case that the cloud host runs in the kernel state, the disaster recovery control information is read from the storage space. Since the storage space in the kernel state realizes the data exchange between the kernel space and the user space through eBPF maps, the data exchange rate is improved, and the disaster recovery control efficiency is improved.

[0098] In one embodiment, the disaster recovery control information of the cloud host is obtained from the control end, including: obtaining a plurality of preset control information configured for the cloud host from the control end, performing control condition verification on each preset control information, determining the preset control information passing the control condition verification as first control information, performing control mode verification on each preset control information, determining the preset control information passing the control mode verification as second control information, and comprehensively obtaining the disaster recovery control information of the cloud host from the first control information and the second control information.

[0099] The preset control information can represent the control information configured for the individualization of the cloud host. The preset control information can include preset control conditions and preset control modes.

[0100] The preset control condition can represent a specific condition configured for the disaster recovery information, for example, a preset condition of the network state of the cloud host, a preset port of the cloud host, and a CPU load rate of the cloud host greater than a preset value.

[0101] The preset control mode can represent a specific control means for the cloud host. For example, the disaster recovery control model can be flow control, capacity expansion, flow migration, etc.

[0102] The control condition verification represents the verification of the preset control condition of the preset control information. The first control information represents the preset control information passing the preset control condition.

[0103] The control mode verification represents the verification of the preset control mode of the preset control information. The second control information represents the preset control information passing the preset control mode.

[0104] Specifically, the cloud host can perform integrity verification on the preset control condition in the preset control information to obtain a control condition verification result. For example, the cloud host performs semantic analysis on the preset control condition in the preset control information to obtain a semantic analysis result, and in the case that the semantic analysis result is greater than a preset integrity, the cloud host can determine the preset control information as the first control information. Similarly, the cloud host can also perform integrity verification on the preset control mode in the preset control information to obtain the second control information, which will not be described herein.

[0105] In one embodiment, after obtaining the first control information and the second control information, the first control information and the second control information can be determined as the disaster recovery control information of the cloud host in various ways. The cloud host can determine the same control information in the first control information and the second control information as the disaster recovery control information of the cloud host. The cloud host can also determine the first control information and the second control information as the disaster recovery control information of the cloud host. The cloud host can also determine the disaster recovery control information of the cloud host from the first control information and the second control information in response to a selection event of the disaster recovery control information.

[0106] In this embodiment, the multiple preset control information configured for the cloud host is acquired from the control end, control condition verification is performed on each preset control information, the preset control information passing the control condition verification is determined as the first control information, control mode verification is performed on each preset control information, the preset control information passing the control mode verification is determined as the second control information, and the disaster recovery control information of the cloud host is obtained by comprehensively combining the first control information and the second control information. The integrity of the control condition and the control mode can be verified, and the accuracy of the disaster recovery control information is improved.

[0107] In one embodiment, with reference to Figure 2 As shown in Figure 4 The disaster recovery control method further includes:

[0108] S402, in the case where the cloud host runs in the user state, the updated disaster recovery control script and the disaster recovery control information are acquired from the control end in response to a disaster recovery control update event.

[0109] The disaster recovery control update event can represent an event triggered by the control end.

[0110] The updated disaster recovery control information can be newly configured control information. The updated disaster recovery control script can be a newly issued script for acquiring disaster recovery control information. The script can be a shell script. A shell script is a script programming language for automating tasks and batch processing, mainly running in Unix and Linux operating systems. It executes commands through an interpreter, can call system commands, programming statements and tools, and can process files and data. Shell scripts usually have a.sh file extension, are simple and intuitive to write, and are suitable for automation tasks, batch processing, system management and configuration, etc.

[0111] Specifically, the cloud host can acquire the updated disaster recovery control script and the disaster recovery control information from the control end in response to a disaster recovery control update event in the case where the cloud host runs in the user state.

[0112] For example, the cloud host can acquire the updated shell script and the updated disaster recovery control information from the control end in response to a disaster recovery control update event in the case where the cloud host runs in the user state.

[0113] S204 includes S404, the system state information of the cloud host is acquired by calling the disaster recovery control script.

[0114] The disaster recovery control script can be a shell script or other type of script.

[0115] Specifically, the cloud host acquires the system state information of the cloud host by calling the disaster recovery control script in response to a running state switching event in which the cloud host switches from the user state to the kernel state.

[0116] S206 includes S406, filtering a target control condition matching the system state information from the plurality of disaster recovery control conditions contained in the updated disaster recovery control information.

[0117] Specifically, the cloud host can filter a target control condition matching the system state information from the plurality of disaster recovery control conditions contained in the updated disaster recovery control information.

[0118] In one embodiment, the system state information includes parameter values of a plurality of preset parameters. The cloud host can determine the plurality of disaster recovery control conditions contained in the updated disaster recovery control information as new disaster recovery control conditions. The cloud host can determine a condition parameter for characterizing each new disaster recovery control condition. If the plurality of preset parameters contain the condition parameter corresponding to the new disaster recovery control condition, the cloud host can determine the new disaster recovery control condition as a candidate control condition. For each candidate control condition, if the parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the cloud host can determine the candidate control condition as a target control condition matching the system state information.

[0119] In this embodiment, when the cloud host runs in the user state, in response to the disaster recovery control update event, the updated disaster recovery control script and disaster recovery control information are obtained from the control end, the system state information of the cloud host is obtained by calling the disaster recovery control script, and the target control condition matching the system state information is filtered from the plurality of disaster recovery control conditions contained in the updated disaster recovery control information. Each disaster recovery control information can be updated, which is beneficial to keep the version of the disaster recovery control information up to date, and is beneficial to improve the disaster recovery control efficiency and accuracy.

[0120] In the cloud computing environment, especially when facing large-scale host deployment, the traditional disaster recovery monitoring, strategy configuration and response switching mode is inefficient. Therefore, in one embodiment, as shown in Figure 5 , a cloud host disaster recovery control method based on eBPF is provided, including:

[0121] S502, in the case where the cloud host runs in the user state, obtaining a plurality of preset control information configured for the cloud host from the control end.

[0122] For example, the method can be applied to an eBPF cloud host disaster recovery control system as shown in Figure 6 .

[0123] CFF-Manager can be a cloud-based web management platform used for eBPF program upgrades and management. Specifically, it's used for: 1. Distributing eBPF program code to cloud hosts, issuing commands to upgrade, compile, and load the eBPF code into the kernel; 2. Managing policies for different cloud hosts, distributing and updating policy configurations. CFF-Update can be an upgrade module, specifically a shell script, used to receive shell commands from the cloud management platform for program upgrades and policy configuration updates. CFF-Strategy can be a policy module, used to update policy configurations received from the cloud and simultaneously distribute these updates to the kernel module, storing them in the eBPF Map. CFF-Event can be an event matching module, used to perform policy matching based on collected data to determine if failover is necessary. CFF-Failover can be a disaster recovery control module, used to judge policies received from events; if policy matching is satisfied, failover operations are performed via eBPF, including traffic transfer and cloud host migration. The remaining kernel basic modules are used for: 1. Loading user-space eBPF code into kernel space for execution; 2. Monitoring system resources specified in the policy configuration, including (process name, port number, CPU load, memory load, network load); 3. Collecting data and pushing events to user space for specified resources.

[0124] For example, such as Figure 7 The flowchart shown illustrates the disaster recovery failover method, which includes: 1. A cloud management platform for different cloud hosts; 2. The CFF-Update script module compiles and loads the code into the kernel module at the system level; simultaneously, it loads the policy configuration code issued by the cloud into the kernel; 3. The cloud management platform can issue different policy configurations based on different cloud host configurations and scenarios. For example, cloud host A needs to monitor whether an application with the process name "Java" exists; cloud host B needs to monitor whether port 22 is active; cloud host C needs to monitor CPU and memory load, etc.; 4. The application loaded by the eBPF mechanism continuously monitors the operating system's data and status in kernel mode. If the policy matching conditions are met, the matching result is transmitted through CFF-Event; 5. CFF-Failover will perform different disaster recovery failover operations based on different events; for example, it can transfer all network traffic of this machine to machine B; it can also notify the cloud host to migrate or expand to ensure resource availability.

[0125] This disaster recovery switching method features: 1. Kernel-level fast disaster recovery switching, reducing RTO time; 2. Cloud + kernel-level configuration, enabling personalized policy configuration for different cloud host models; 3. Kernel-based disaster recovery policies and switching, reducing system resource consumption and user impact.

[0126] S504, performing control condition verification on each preset control information, and determining the preset control information passing the control condition verification as first control information.

[0127] S506, performing control mode verification on each preset control information, and determining the preset control information passing the control mode verification as second control information.

[0128] S508, synthesizing the first control information and the second control information to obtain disaster recovery control information of the cloud host.

[0129] The disaster recovery control information comprises a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each of the disaster recovery control conditions.

[0130] S510, in a case where the cloud host runs in a user mode, in response to a disaster recovery control update event, obtaining an updated disaster recovery control script and disaster recovery control information from a control end.

[0131] S512, in a case where the cloud host runs in the user mode, loading the disaster recovery control information to a storage space in a kernel mode.

[0132] S514, in response to a running state switching event in which the cloud host switches from the user mode to the kernel mode, obtaining system state information of the cloud host.

[0133] S516, calling the disaster recovery control script to obtain the system state information of the cloud host.

[0134] S518, in a case where the cloud host runs in the kernel mode, reading the disaster recovery control information from the storage space.

[0135] S520, determining, for each disaster recovery control condition, a condition parameter used to represent the disaster recovery control condition.

[0136] The system state information comprises a plurality of preset parameters and a parameter value of each of the preset parameters.

[0137] S522, if the plurality of preset parameters comprises the condition parameter corresponding to the disaster recovery control condition, determining the disaster recovery control condition as a candidate control condition.

[0138] S524, for each candidate control condition, if a parameter range of the condition parameter in the candidate control condition comprises the parameter value of the preset parameter corresponding to the condition parameter, determining the candidate control condition as a target control condition matched with the system state information.

[0139] S526, screening the target control condition matched with the system state information from a plurality of disaster recovery control conditions comprised in the updated disaster recovery control information.

[0140] S528, determine the target control mode corresponding to the target control condition from each disaster recovery control mode.

[0141] S530, obtain the expected recovery time of each target control mode.

[0142] S532, perform disaster recovery control on the cloud host according to the target control mode with the shortest expected recovery time.

[0143] S534, in the case that the cloud host runs in the user state, in response to a disaster recovery control update event, obtaining an updated disaster recovery control script and disaster recovery control information from the control end.

[0144] S536, call the disaster recovery control script to obtain the system state information of the cloud host.

[0145] S538, from the plurality of disaster recovery control conditions contained in the updated disaster recovery control information, filter the target control condition matching the system state information.

[0146] In this embodiment, in the first aspect, in the case that the cloud host runs in the user state, the disaster recovery control information of the cloud host is obtained from the control end, the disaster recovery control information includes a plurality of disaster recovery control conditions and a disaster recovery control mode corresponding to each disaster recovery control condition, so as to facilitate subsequent disaster recovery control of the cloud host in the kernel state, and improve the disaster recovery control efficiency. In response to the running state switching event that the cloud host switches from the user state to the kernel state, the system state information of the cloud host is obtained, the target control condition matching the system state information is filtered from the plurality of disaster recovery control conditions, and the target control mode corresponding to the target control condition is determined from the plurality of disaster recovery control modes. By using the above method, when the cloud host is in the kernel state, the disaster recovery control of the cloud host is performed according to the target control mode, the fast disaster recovery control at the kernel level is realized, and the disaster recovery control efficiency is improved.

[0147] The second aspect is to support the fast disaster recovery switching capability of the cloud host based on the multi-level architecture design of cloud management and control + user state + kernel state. Based on the personalized strategy configuration stored in the eBPF kernel Map, different disaster recovery condition strategies of different cloud hosts are supported. Based on the program flow of the fast disaster recovery switching developed based on eBPF, the system resource occupation is reduced, the user resource influence is reduced, and the fast RTO capability is realized.

[0148] The third aspect allows personalized kernel-level strategy configuration on different types of hosts. By performing data monitoring, strategy judgment and switching execution at the kernel level, this embodiment ensures fast response in the event of disaster recovery events, significantly reduces the recovery time objective (RTO), and thus improves the stability and reliability of the entire system.

[0149] Fourthly, 1. Real-time monitoring: Utilizing the eBPF technology, the system call, network traffic and key performance indicators are monitored and data collected in real time at the kernel level. These real-time data can quickly identify potential faults and performance bottlenecks, providing solid data support for disaster switching decisions. 2. Personalized and dynamically adjusted disaster recovery strategy: The method can configure and adjust personalized disaster recovery strategies for different types of cloud hosts. The dynamic adjustment of this strategy is based on real-time monitoring data to ensure that the disaster recovery strategy always matches the current business needs and system state. 3. Automated disaster control: When the system detects a fault or reaches the preset switching condition, the eBPF kernel operation can automatically trigger the disaster recovery switching operation in real time without human intervention, thereby improving the efficiency and accuracy of fault response. 4. Fast response time: Through the efficient ability of fault switching in the kernel, the method significantly shortens the response time of disaster recovery switching, ensuring that the system can quickly recover when a fault occurs, ensuring business continuity and significantly reducing the recovery time objective (RTO). 5. Reduce resource occupation and invasiveness: The method runs in the kernel state, has less impact on the safety and resources of the operating system, and reduces the invasiveness to the user environment, so that the method can improve the system monitoring and fault handling capability while minimizing the system burden.

[0150] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.

[0151] Based on the same inventive concept, the embodiments of the present application also provide a disaster control device for implementing the disaster control method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more disaster control device embodiments provided below can refer to the limitations of the disaster control method described above, which will not be repeated here.

[0152] In one embodiment, as shown in Figure 8 a disaster control device is provided, comprising: a control information acquisition module 802, a state information acquisition module 804, a condition screening module 806 and a disaster control module 808, wherein:

[0153] The control information obtaining module 802 is configured to obtain, when the cloud host runs in the user mode, disaster control information of the cloud host from a control end, wherein the disaster control information comprises a plurality of disaster control conditions and a disaster control mode corresponding to each of the disaster control conditions.

[0154] The state information obtaining module 804 is configured to obtain system state information of the cloud host in response to a running state switching event in which the cloud host switches from the user mode to the kernel mode.

[0155] The condition screening module 806 is configured to screen, from the disaster control conditions, a target control condition matched with the system state information, and determine a target control mode corresponding to the target control condition from the disaster control modes.

[0156] The disaster control module 808 is configured to perform disaster control on the cloud host according to the target control mode.

[0157] In one of the embodiments, the system state information comprises parameter values of a plurality of preset parameters, and the condition screening module 806 is further configured to determine, for each of the disaster control conditions, a condition parameter used to represent the disaster control condition, and determine, as a candidate control condition, the disaster control condition if the condition parameter corresponding to the disaster control condition is included in the plurality of preset parameters. For each of the candidate control conditions, if a parameter range of the condition parameter in the candidate control condition contains the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as the target control condition matched with the system state information.

[0158] In one of the embodiments, the number of target control modes is a plurality, and the disaster control module 808 is further configured to obtain an expected recovery time of each of the target control modes, and perform disaster control on the cloud host according to the target control mode with the shortest expected recovery time.

[0159] In one of the embodiments, the disaster control apparatus further comprises a loading module configured to load the disaster control information to a storage space in the kernel mode when the cloud host runs in the user mode, and a reading module configured to read the disaster control information from the storage space when the cloud host runs in the kernel mode.

[0160] In one of the embodiments, the control information obtaining module 802 is further configured to obtain, from the control end, a plurality of preset control information configured for the cloud host, perform control condition verification on each of the preset control information, determine, as first control information, the preset control information passing the control condition verification, perform control mode verification on each of the preset control information, determine, as second control information, the preset control information passing the control mode verification, and obtain the disaster control information of the cloud host by integrating the first control information and the second control information.

[0161] In one of the embodiments, the disaster control device further comprises an updating module, configured to, in response to a disaster control updating event, acquire an updated disaster control script and disaster control information from the control end, in the case that the cloud host runs in the user mode; the state information acquisition module 804 is further configured to acquire system state information of the cloud host by invoking the disaster control script; and the condition screening module 806 is further configured to screen a target control condition matched with the system state information from a plurality of disaster control conditions contained in the updated disaster control information.

[0162] The modules in the disaster control device described above can be implemented by software, hardware and combinations thereof, in whole or in part. The modules described above can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be invoked and executed by the processor to perform the operations corresponding to the modules.

[0163] In one of the embodiments, a computer device is provided, which can be a server, and the internal structure diagram thereof can be as shown in Figure 9 The computer device comprises a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store disaster control information data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a disaster control method.

[0164] Those skilled in the art can understand that Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0165] In one of the embodiments, a computer device is provided, comprising a memory and a processor, and the memory stores a computer program. The processor implements the method steps described above when executing the computer program.

[0166] In an embodiment, a computer readable storage medium is provided, having stored thereon a computer program, which, when executed by a processor, implements the method steps described above.

[0167] In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method steps described above.

[0168] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of the methods. Any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0169] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.

[0170] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A disaster recovery control method, characterized in that, Applied to cloud servers, the method includes: When the cloud host is running in user mode, the disaster recovery control information of the cloud host is obtained from the control terminal; the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control mode corresponding to each of the disaster recovery control conditions. In response to the cloud host switching from user mode to kernel mode, obtain the system status information of the cloud host; Among the disaster recovery control conditions, target control conditions that match the system status information are selected, and the target control mode corresponding to the target control condition is determined from each of the disaster recovery control modes. Disaster recovery control is performed on the cloud host according to the target control mode.

2. The method according to claim 1, characterized in that, The system status information includes the parameter values ​​of multiple preset parameters; The step of filtering target control conditions that match the system status information from among the disaster recovery control conditions includes: For each of the disaster recovery control conditions, determine the condition parameters used to characterize the disaster recovery control conditions; If the plurality of preset parameters include the condition parameter corresponding to the disaster recovery control condition, then the disaster recovery control condition is determined as a candidate control condition. For each candidate control condition, if the parameter range of the condition parameter in the candidate control condition includes the parameter value of the preset parameter corresponding to the condition parameter, then the candidate control condition is determined as the target control condition that matches the system state information.

3. The method according to claim 1, characterized in that, The number of target control modes is multiple, and the disaster recovery control of the cloud host according to the target control modes includes: Obtain the expected recovery time for each of the target control modes; Disaster recovery control is performed on the cloud host according to the target control mode with the shortest expected recovery time.

4. The method according to claim 1, characterized in that, The method further includes: When the cloud host is running in user mode, the disaster recovery control information is loaded into the kernel mode storage space; The method further includes: When the cloud host is running in kernel mode, the disaster recovery control information is read from the storage space.

5. The method according to claim 1, characterized in that, The step of obtaining the disaster recovery control information of the cloud host from the control terminal includes: Obtain multiple preset control information configured for the cloud host from the control terminal; Each of the preset control information is verified for control conditions, and the preset control information that passes the control condition verification is determined as the first control information. Perform control mode verification on each of the preset control information, and determine the preset control information that passes the control mode verification as the second control information; By combining the first control information and the second control information, the disaster recovery control information of the cloud host is obtained.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: When the cloud host is running in user mode, in response to a disaster recovery control update event, it obtains the updated disaster recovery control script and disaster recovery control information from the control terminal. The process of obtaining the system status information of the cloud host includes: The disaster recovery control script is invoked to obtain the system status information of the cloud host; The step of filtering target control conditions that match the system status information from among the disaster recovery control conditions includes: From the multiple disaster recovery control conditions included in the updated disaster recovery control information, target control conditions that match the system status information are selected.

7. A disaster recovery control device, characterized in that, Applied to cloud servers, the device includes: The control information acquisition module is used to acquire the disaster recovery control information of the cloud host from the control terminal when the cloud host is running in user mode; the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control mode corresponding to each of the disaster recovery control conditions. The status information acquisition module is used to acquire the system status information of the cloud host in response to the running state switching event of the cloud host switching from the user mode to the kernel mode; The condition filtering module is used to filter target control conditions that match the system status information from each of the disaster recovery control conditions, and to determine the target control mode corresponding to the target control condition from each of the disaster recovery control modes. The disaster recovery control module is used to perform disaster recovery control on the cloud host according to the target control mode.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Disaster recovery architecture configuration method and device, disaster recovery architecture switching method and device, equipment and storage medium

    CN111158949A

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

    CN118890266A