Disaster recovery control method and device, computer equipment and storage medium
By obtaining disaster recovery control information in the user state of the cloud host and filtering the control mode according to the system state in the kernel state, it realizes automated disaster recovery control, which solves the problem of low disaster recovery control efficiency in traditional methods and improves response speed and efficiency.
Patent Information
- Application Number
- CN202411628091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-14
AI Technical Summary
Traditional disaster recovery control methods rely on manual operations and fixed strategies, resulting in low efficiency in disaster recovery control and difficulty in responding to disasters quickly.
It provides a disaster recovery control method, which realizes automated disaster recovery control by obtaining disaster recovery control information when the cloud host is running in the user state, and filters target control conditions and modes based on the system status information in the kernel state.
Improve disaster recovery control efficiency, realize rapid disaster recovery control at the kernel level, and reduce manual intervention and response time.
Smart Images

Figure CN119520244A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a disaster recovery control method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] In today's enterprise environment, it is particularly important to maintain 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 business operation and system stability.
[0003] In traditional technology, disaster recovery control relies on manual operation and fixed strategies. Due to the large number of disaster recovery control steps, the manual disaster recovery control process is complex and time-consuming, making it difficult to respond quickly when a disaster occurs. The problem of low disaster recovery control efficiency still exists. Summary of the invention
[0004] Based on this, it is necessary to provide a disaster recovery control method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of disaster recovery control in response to the above technical problems.
[0005] In a first aspect, the present application provides a disaster recovery control method, which is applied to a cloud host, and the method includes: when the cloud host is running in user mode, obtaining disaster recovery control information of the cloud host from a control end; the disaster recovery control information includes multiple disaster recovery control conditions, and disaster recovery control modes corresponding to each of the disaster recovery control conditions; in response to an operation state switching event in which the cloud host switches from the user mode to the kernel mode, obtaining system status information of the cloud host; among each of the disaster recovery control conditions, screening a target control condition that matches the system status information, and determining a target control mode corresponding to the target control condition from each of the disaster recovery control modes; and performing disaster recovery control on the cloud host according to the target control mode.
[0006] In one embodiment, the system status information includes parameter values of multiple preset parameters; among the disaster recovery control conditions, screening the target control condition that matches the system status information includes: for each disaster recovery control condition, determining the condition parameter used to characterize the disaster recovery control condition; if the multiple preset parameters include the condition parameter corresponding to the disaster recovery control condition, then determining the 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 includes the parameter value of the preset parameter corresponding to the condition parameter, then determining the candidate control condition as the target control condition that matches the system status information.
[0007] In one embodiment, there are multiple target control modes, and performing disaster recovery control on the cloud host according to the target control modes includes: obtaining the expected recovery time of each target control mode; and performing disaster recovery control on the cloud host according to the target control mode with the shortest expected recovery time.
[0008] In one of the embodiments, the method further includes: when the cloud host runs in user state, loading the disaster recovery control information into the storage space of the kernel state; the method further includes: when the cloud host runs in kernel state, reading the disaster recovery control information from the storage space.
[0009] In one of the embodiments, the obtaining of disaster recovery control information of the cloud host from the control end includes: obtaining multiple preset control information configured for the cloud host from the control end; performing a control condition check on each of the preset control information, and determining the preset control information that passes the control condition check as the first control information; performing a control mode check on each of the preset control information, and determining the preset control information that passes the control mode check as the second control information; and obtaining the disaster recovery control information of the cloud host by combining the first control information and the second control information.
[0010] In one of the embodiments, the method further includes: when the cloud host is running in user mode, 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; obtaining the system status information of the cloud host includes: calling the disaster recovery control script to obtain the system status information of the cloud host; filtering the target control condition that matches the system status information from each of the disaster recovery control conditions includes: filtering the target control condition that matches the system status information from the multiple disaster recovery control conditions contained in the updated disaster recovery control information.
[0011] In a second aspect, the present application also provides a disaster recovery control device. The device comprises:
[0012] A control information acquisition module is used to obtain the disaster recovery control information of the cloud host from the control end when the cloud host runs in the user state; the disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each of the disaster recovery control conditions; a status information acquisition module is used to obtain the system status information of the cloud host in response to an operation status switching event of the cloud host switching from the user state to the kernel state; a condition screening module is used to screen the target control condition matching the system status information from each of the disaster recovery control conditions, and determine the target control mode corresponding to the target control condition from each of the disaster recovery control modes; a disaster recovery control module is used to perform disaster recovery control on the cloud host according to the target control mode.
[0013] In a third aspect, the present application further provides a computer device. The computer device includes 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 user mode, disaster recovery control information of the cloud host is obtained from a control end; the disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each of the disaster recovery control conditions; in response to an operation state switching event in which the cloud host switches from the user mode to the kernel mode, system state information of the cloud host is obtained; among each of 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 each of the disaster recovery control modes; and disaster recovery control is performed on the cloud host according to the target control mode.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0016] When the cloud host runs in user mode, disaster recovery control information of the cloud host is obtained from a control end; the disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each of the disaster recovery control conditions; in response to an operation state switching event in which the cloud host switches from the user mode to the kernel mode, system state information of the cloud host is obtained; among each of 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 each of the disaster recovery control modes; and disaster recovery control is performed on the cloud host according to the target control mode.
[0017] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0018] When the cloud host runs in user mode, disaster recovery control information of the cloud host is obtained from a control end; the disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each of the disaster recovery control conditions; in response to an operation state switching event in which the cloud host switches from the user mode to the kernel mode, system state information of the cloud host is obtained; among each of 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 each of the disaster recovery control modes; and disaster recovery control is performed on the cloud host according to the target control mode.
[0019] The above-mentioned disaster recovery control method, device, computer equipment, storage medium and computer program product, when the cloud host is running in user mode, obtains 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 mode corresponding to each disaster recovery control condition, so that the cloud host can perform disaster recovery control in the kernel state in the future, thereby improving the efficiency of disaster recovery control. In response to the running state switching event of the cloud host switching from user state to kernel state, the system state information of the cloud host is obtained, and the target control condition matching the system state information is selected from each disaster recovery control condition, and the target control mode corresponding to the target control condition is determined from each disaster recovery control mode. With the above-mentioned method, when the cloud host is in the kernel state, the cloud host is subjected to disaster recovery control according to the target control mode, thereby realizing rapid disaster recovery control at the kernel level, thereby improving the efficiency of disaster recovery control. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] FIG1 is a diagram of an application environment of a disaster recovery control method according to an embodiment;
[0021] FIG2 is a schematic diagram of a flow chart of a disaster recovery control method in an embodiment;
[0022] FIG3 is a schematic flow chart of a method for determining target control conditions in one embodiment;
[0023] FIG4 is a schematic diagram of a flow chart of a disaster recovery control method in another embodiment;
[0024] FIG5 is a flow chart of a method for disaster recovery control of an eBPF cloud host in one embodiment;
[0025] FIG6 is an eBPF cloud host disaster recovery control system in one embodiment;
[0026] FIG7 is a schematic diagram of a process flow of a disaster recovery switching method in one embodiment;
[0027] FIG8 is a structural block diagram of a disaster recovery control device in one embodiment;
[0028] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] The disaster recovery control method provided in the embodiment of the present application can be applied to the application environment shown in FIG1. The control terminal 102 communicates with the cloud host 104 through the network. The data storage system can store data that the cloud host 104 needs to process. The data storage system can be integrated on the cloud host 104, or it can be placed on the cloud or other network servers.
[0031] When the cloud host 104 is running in the user state, the cloud host 104 obtains the disaster recovery control information of the cloud host 104 from the control terminal 102. The disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each disaster recovery control condition. In response to the running state switching event of the cloud host 104 switching from the user state to the kernel state, the cloud host 104 obtains the system state information of the cloud host 104. The cloud host 104 selects the target control condition matching the system state information from each disaster recovery control condition, and determines the target control mode corresponding to the target control condition from each disaster recovery control mode. The cloud host 104 performs disaster recovery control on the cloud host 104 according to the target control mode.
[0032] The control terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The cloud host 104 may be implemented using an independent server or a server cluster consisting of multiple servers.
[0033] In one embodiment, as shown in FIG. 2 , a disaster recovery control method is provided, which is described by taking the method applied to the cloud host 104 in FIG. 1 as an example, including:
[0034] S202, when the cloud host runs in user mode, obtaining disaster recovery control information of the cloud host from the control end.
[0035] Among them, cloud hosting can be a cloud computing service based on virtualization technology. Cloud hosting can simulate multiple independent virtual hardware systems on a physical server through virtualization technology, and each virtual hardware system can run different client operating systems. The resources of cloud hosting include computing components such as CPU, memory, and disk. These components are virtualized, not real physical electronic components.
[0036] A cloud host can also be a physical hardware that a cloud computing server relies on. Specifically, a cloud computing service can be a service that relies on physical hardware such as servers, storage devices, and network devices.
[0037] User state can represent a state of the kernel, and the state of the kernel can include user state and kernel state. For example, in an operating system, kernel mode and user mode are two different CPU operating modes, which correspond to different permission levels and resource access capabilities. User state is the state in which user programs are running in the operating system. At this time, the program's access to system resources is restricted, and it cannot directly use system resources or change the working state of the CPU. Kernel state is the state in which the operating system kernel is running, with full access rights, and can perform key tasks such as memory management and hardware operations.
[0038] Specifically, when the cloud host is in user mode, the program's access to system resources is limited, and it cannot directly use system resources or change the CPU's operating state. When the cloud host is in kernel mode, the program has full access to system resources and can perform key tasks such as memory management and hardware operations. The program runs faster in the kernel-mode CPU.
[0039] The control end can represent a terminal that communicates with the cloud host and is used to send disaster recovery control information to the cloud host. The control end can be a terminal that interacts with the computing service represented by the cloud host, or a terminal that has a communication connection with the server that the cloud host relies on, or a terminal or server corresponding to the management platform of the server that the cloud host relies on.
[0040] The disaster recovery control information may include multiple disaster recovery control conditions and disaster recovery control modes corresponding to each disaster recovery control condition.
[0041] The disaster recovery control condition is a specific condition for the disaster recovery information configuration. The disaster recovery control condition may specifically include the preset state of the cloud host's network status, the cloud host's port being a preset port, or the cloud host's CPU load rate being greater than a preset value. The disaster recovery control mode may represent a specific control method for the cloud host. For example, the disaster recovery control model may be flow control, capacity expansion, flow migration, etc.
[0042] Specifically, the cloud host can determine its own operating status. When the cloud host is in user mode, the cloud host can obtain its own disaster recovery control information from the control end. When the cloud host is in kernel mode, the cloud host's disaster recovery control information is not obtained from the control end.
[0043] In one embodiment, the cloud host can directly obtain the disaster recovery control information of the cloud host from the control end. The cloud host can also obtain the disaster recovery control information of the cloud host from other cloud hosts. For example, cloud host A can obtain the disaster recovery control information a of cloud host A from the control end. Cloud host A can also obtain the disaster recovery control information a of cloud host A from other cloud host B, which can effectively alleviate the communication pressure between the control end and the cloud host.
[0044] In one of the embodiments, the cloud host may also obtain updated disaster recovery control information from the control end in response to a disaster recovery control update event when the cloud host is running in user mode.
[0045] In one embodiment, the cloud host may also obtain multiple preset control information configured for the cloud host from the control terminal. The cloud host may verify each preset control information and determine the preset control information that passes the verification as the disaster recovery control information.
[0046] S204 , in response to an operation state switching event in which the cloud host switches from a user state to a kernel state, obtaining system state information of the cloud host.
[0047] Among them, the running state switching event can represent the 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. Exemplarily, the system call event can represent an event in which a user state process actively requests to switch to kernel state. Through the system call, the user program can request the operating system to provide services, such as file operations, memory management, etc. Interrupt and exception events can represent the corresponding events when a hardware device is interrupted or a program encounters an exception.
[0048] The system status information may represent the status information of the operating system in the cloud host. Specifically, the status information may include process name, CPU load, memory load, network load, port status, etc.
[0049] Taking the Linux operating system as an example, the process name can represent the name of the program running in the cloud host, which can be used to monitor and manage the performance and resources of the system. In the Linux system, you can use a variety of commands to find the process name, such as ps, top, htop, lsof, and pgrep. For example, use the ps -A command to list all running processes.
[0050] CPU load indicates the workload of the cloud host's central processing unit when processing tasks. It is usually expressed as a percentage, reflecting the relative relationship between the number of tasks currently being processed by the CPU and the maximum number of tasks that the system can handle simultaneously. You can use the uptime command to view the system load average. You can use the top command to view the real-time Linux system resource usage.
[0051] Memory load indicates the memory usage of the cloud host system. You can use the top command to view real-time Linux system processes and resource usage, including memory usage.
[0052] Network load indicates the cloud host's ability to transmit and process data packets in the network, and is usually used to measure the busyness and performance of a network or system. The specific network load can be evaluated by viewing indicators such as the traffic and packet loss rate of the network interface.
[0053] The port status can indicate the current working status of the cloud host's network port, such as listening, established, time_wait, close_wait, etc. In the Linux system, you can use commands such as netstat, lsof, ss, etc. to view the port status. For example, netstat -ntlp can view the status of all TCP ports.
[0054] Specifically, the cloud host can determine that the running state of the cloud host is the kernel state in response to the running state switching event of the cloud host switching from the user state to the kernel state. When the running state of the cloud host is in the kernel state, the cloud host can obtain the system state information of the cloud host.
[0055] Specifically, the cloud host can obtain an acquisition instruction set configured for system status information. The cloud host obtains the status information corresponding to each instruction based on the instructions in the acquisition instruction set. The cloud host obtains the system status information by integrating each status information.
[0056] In one embodiment, the cloud host can perform version updates on each instruction in the instruction set to obtain new instructions corresponding to each instruction. When each new instruction passes the instruction compliance check, the cloud host can obtain status information corresponding to each instruction based on each new instruction. The cloud host can obtain system status information by integrating various status information.
[0057] S206: Filter the target control condition that matches the system status information from among the disaster recovery control conditions, and determine the target control mode corresponding to the target control condition from among the disaster recovery control modes.
[0058] The target control condition may represent a disaster recovery control condition that matches the system status information. The target control mode represents a disaster recovery control mode corresponding to the target control mode. The target control condition may 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 recovery 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 filter each target control mode to obtain a final control mode. The cloud host performs disaster recovery control on the cloud host according to the final control mode.
[0060] Specifically, the system status information may include parameter values of each of the multiple preset parameters. The cloud host may determine the conditional parameter used to characterize the disaster recovery control condition for each disaster recovery control condition. If the multiple preset parameters include the conditional parameter corresponding to the disaster recovery control condition, the cloud host may determine the disaster recovery control condition as a candidate control condition. For each candidate control condition, if the parameter range of the conditional parameter in the candidate control condition includes the parameter value of the preset parameter corresponding to the conditional parameter, the cloud host may determine the candidate control condition as a target control condition that matches the system status information.
[0061] Specifically, the cloud host can also respond to the control condition selection event, select the target control condition matching the system status information from among the disaster recovery control conditions, and determine the target control mode corresponding to the target control condition from among the disaster recovery control modes.
[0062] S208, performing disaster recovery control on the cloud host according to the target control mode.
[0063] Among them, the target control mode may at least include flow control, flow migration, capacity expansion, etc.
[0064] Traffic forwarding can refer to the process of forwarding data flow in the network from one node to another. This is usually 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 traffic from a certain port of the public IP to the corresponding port of the intranet host.
[0065] Traffic migration can mean transferring business traffic between different hosts or clusters to achieve load balancing or failover. For example, when the database is expanded, the traffic can be transferred to the new database through routing switching of the database partitioning rules, thus achieving a smooth expansion process.
[0066] Capacity expansion can mean increasing the hardware or software resources of a cloud host to meet the needs of an application. Capacity expansion can be divided into two ways: one is to expand the overall capacity of a single machine, including adding CPU, memory, storage devices, etc.; the other is to expand the capacity of specific components, such as expanding memory, disk or CPU. Capacity expansion strategies can dynamically adjust resources according to business needs to deal with access delays 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 respond to the control mode selection event and determine the selected control mode in each target control mode. The cloud host performs disaster recovery control according to the selected control mode. Disaster recovery control can include flow control, flow migration, capacity expansion, etc.
[0069] For example, the cloud host can also determine the flow control in flow control, flow migration, and capacity expansion in response to the control mode selection event. The cloud host performs flow control on itself according to the selected control mode.
[0070] In the above disaster recovery control method, when the cloud host is running in user mode, the disaster recovery control information of the cloud host is obtained from the control end, and the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control mode corresponding to each disaster recovery control condition, so that the cloud host can perform disaster recovery control in the kernel mode in the future, thereby improving the efficiency of disaster recovery control. In response to the running state switching event of the cloud host switching from user mode to kernel mode, the system state information of the cloud host is obtained, and the target control condition matching the system state information is selected from each disaster recovery control condition, and the target control mode corresponding to the target control condition is determined from each disaster recovery control mode. With the above method, when the cloud host is in the kernel mode, it performs disaster recovery control according to the target control mode, thereby realizing rapid disaster recovery control at the kernel level, thereby improving the efficiency of disaster recovery control.
[0071] In one embodiment, as shown in the flowchart of the method for determining the target control condition in FIG. 3 , the system state information includes parameter values of a plurality of preset parameters, and S206 includes S302 to S306, wherein:
[0072] S302: For each disaster recovery control condition, determine a condition parameter for characterizing the disaster recovery control condition.
[0073] The preset parameters may be, for example, process name, CPU load, memory load, network load, port status, etc. The parameter value may be a specific value of the preset parameter, for example, the process name is XX, the CPU load is 70%, etc.
[0074] The condition parameter may be a specific parameter that represents the disaster recovery control condition, for example, the specific parameter may be a process name, CPU load, memory load, network load, port status, etc.
[0075] For different disaster recovery control conditions, the condition parameters representing different disaster recovery control conditions may be different. For example, the condition parameters corresponding to disaster recovery control condition 1 are CPU load and memory load. For another example, the condition parameters corresponding to disaster recovery control condition 2 are port number and process name.
[0076] S304: If the multiple preset parameters include a condition parameter corresponding to the disaster recovery control condition, the disaster recovery control condition is determined as a candidate control condition.
[0077] Among them, the multiple preset parameters include condition parameters corresponding to the disaster recovery control condition, which can indicate that the disaster recovery control condition is suitable for determining parameter values corresponding to the multiple preset parameters.
[0078] The candidate control condition may represent a disaster recovery control condition whose condition parameters all correspond to preset parameters. For example, if the multiple preset parameters include preset parameter a and preset parameter b, a disaster recovery control condition that only includes at least one of condition parameter a and condition parameter b may be determined as a candidate control condition. If the disaster recovery control condition also 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 includes 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.
[0080] The parameter range may represent a specific parameter value range configured for the conditional parameter. For example, when the conditional parameter is the CPU load rate, the parameter range may be a CPU load rate greater than 70%. For another example, when the conditional parameter is the memory load rate, the parameter range may be a memory load rate greater than 80%.
[0081] The parameter range of the conditional parameter includes the parameter value of the preset parameter corresponding to the conditional parameter, which may indicate that a CPU load rate greater than 70% includes a CPU load rate of 72%.
[0082] It should be noted that if the preset parameters are CPU load rate and memory load rate, a candidate control condition only has a parameter range corresponding to the CPU load rate. If the parameter range includes the parameter value of the CPU load rate, the candidate control condition is the target control condition that matches the system status information.
[0083] In this embodiment, for each disaster recovery control condition, a condition parameter used to characterize the disaster recovery control condition is determined. If multiple preset parameters include a 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 includes the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as a target control condition that matches the system status information. First, the disaster recovery control conditions are screened according to the preset parameters and the condition parameters to obtain the candidate control conditions. According to the parameter range of the condition parameter and the parameter value of the preset parameter, the candidate control conditions are screened to obtain the target control condition that matches the system status information, thereby reducing hardware resource consumption and improving subsequent disaster recovery control efficiency.
[0084] In one embodiment, there are multiple target control modes, and disaster recovery control is performed on the cloud host according to the target control modes, including: obtaining the expected recovery time of each target control mode, and performing disaster recovery control on the cloud host according to the target control mode with the shortest expected recovery time.
[0085] The preset recovery time may indicate the time required for the cloud host to eliminate the disaster recovery risk. Specifically, it may indicate the time interval from the time when the cloud host disaster recovery alarm appears to the time when the cloud host disaster recovery alarm is released. More specifically, the expected recovery time may indicate the control time of the cloud host disaster recovery control using the target control mode.
[0086] Specifically, the cloud host can obtain the recovery time objective configured for the cloud host and the expected recovery time of each target control mode. The cloud host can select the target recovery time shorter than the recovery time objective from the expected recovery times. If there are multiple target recovery times, the cloud host can randomly determine the target control mode corresponding to the target recovery time from the multiple target recovery times, and perform disaster recovery 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 objective, the cloud host can perform disaster recovery control on the cloud host according to the target control mode with the shortest expected recovery time.
[0088] The Recovery Time Objective (RTO) can be expressed as the maximum tolerable time required for the system to resume normal operation after a failure or disaster. For example, if the RTO is set to one hour, then the business can withstand a certain degree of downtime during this time, and exceeding this time period may lead to adverse consequences.
[0089] In one embodiment, the cloud host can predict the recovery time of each target control mode to obtain the expected recovery time of each target control mode. Specifically, for each target control mode, the cloud host can determine the average of the historical recovery time of the target control mode as the expected recovery time of the target control mode.
[0090] In this embodiment, there are multiple target control modes, and the expected recovery time of each target control mode is obtained. Disaster recovery control is performed on the cloud host according to the target control mode with the shortest expected recovery time, ensuring that the time for disaster recovery control of the cloud host is the shortest, thereby improving the efficiency of disaster recovery control.
[0091] In one embodiment, the disaster recovery control method further includes: when the cloud host is running in user mode, loading the disaster recovery control information into the storage space of the kernel mode. The disaster recovery control method further includes: when the cloud host is running in kernel mode, reading the disaster recovery control information from the storage space.
[0092] The kernel state storage space may represent a higher address space. For example, in a 64-bit system, the kernel state address space is located in the high address part, which is conducive to improving the resource call rate of the storage space.
[0093] Specifically, the cloud host can use the eBPF technology to load disaster recovery control information into the kernel state storage space.
[0094] Among them, eBPF (Extended Berkeley Packet Filter) is a user space program running in the Linux kernel, compiled into eBPF bytecode by LLVM / Clang, and the bytecode instructions are passed to the kernel through the system call bpf(). The eBPF program can be executed when a specific event is triggered, and data exchange between kernel space and user space can be achieved through eBPF maps.
[0095] In one of the embodiments, the cloud host runs a user space program and transfers the bytecode instructions to the kernel's storage space through a system call bpf(), thereby implementing the process of loading the disaster recovery control information into the kernel state storage space.
[0096] Specifically, when the cloud host is running in user mode, 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 disaster recovery control modes corresponding to each disaster recovery control condition. The cloud host can load the disaster recovery control information into the storage space of 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 user mode to kernel mode. The cloud host can read the disaster recovery control information from the storage space when the cloud host is running in kernel mode. The cloud host can filter the target control condition that matches the system state information from each disaster recovery control condition, and determine the target control mode corresponding to the target control condition from each disaster recovery control mode. The cloud host can perform disaster recovery control on the cloud host according to the target control mode.
[0097] In this embodiment, when the cloud host runs in user mode, the disaster recovery control information is loaded into the storage space of the kernel state. The storage space of the kernel state stores the disaster recovery control information. When the cloud host runs in kernel mode, the disaster recovery control information is read from the storage space. Since the storage space of the kernel state realizes data exchange between the kernel space and the user space through eBPF mapping (maps), the data exchange rate is improved, thereby improving the disaster recovery control efficiency.
[0098] In one embodiment, disaster recovery control information of a cloud host is obtained from a control end, including: obtaining multiple preset control information configured for the cloud host from the control end, performing a control condition check on each preset control information, determining the preset control information that passes the control condition check as first control information, performing a control mode check on each preset control information, determining the preset control information that passes the control mode check as second control information, and obtaining the disaster recovery control information of the cloud host by combining the first control information and the second control information.
[0099] The preset control information may represent control information for personalized configuration of the cloud host. The preset control information may include preset control conditions and preset control modes.
[0100] The preset control condition may represent a specific condition for the disaster recovery information configuration, for example, a preset condition of the network status of the cloud host, a port of the cloud host being a preset port, and a CPU load rate of the cloud host being greater than a preset value.
[0101] The preset control mode may represent a specific control method for the cloud host. For example, the disaster recovery control model may be flow control, capacity expansion, flow migration, etc.
[0102] The control condition check indicates checking the preset control condition of the preset control information. The first control information indicates the preset control information that passes the preset control condition.
[0103] The control mode check indicates checking the preset control mode of the preset control information. The second control information indicates the preset control information through the preset control mode.
[0104] Specifically, the cloud host can perform integrity check on the preset control conditions in the preset control information to obtain control condition check results. Exemplarily, the cloud host performs semantic analysis on the preset control conditions in the preset control information to obtain semantic analysis results. When the semantic analysis result shows that the semantic integrity is greater than the preset integrity, the cloud host can determine the preset control information as the first control information. Similarly, the cloud host can also perform integrity check on the preset control mode in the preset control information to obtain the second control information, which will not be elaborated here.
[0105] In one of the embodiments, after obtaining the first control information and the second control information, there are multiple ways to integrate the first control information and the second control information, and 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 simultaneously 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 in the first control information and the second control information in response to a selection event for the disaster recovery control information.
[0106] In this embodiment, multiple preset control information for cloud host configuration is obtained from the control end, control condition verification is performed on each preset control information, preset control information that passes the control condition verification is determined as first control information, control mode verification is performed on each preset control information, preset control information that passes the control mode verification is determined as second control information, and the first control information and the second control information are combined to obtain disaster recovery control information of the cloud host. The control condition and the control mode can be checked for integrity, thereby improving the accuracy of the disaster recovery control information.
[0107] In one embodiment, referring to FIG. 2 and as shown in FIG. 4 , the disaster recovery control method further includes:
[0108] S402, when the cloud host is running in user mode, 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.
[0109] The disaster recovery control update event may represent an event triggered by the control end.
[0110] The updated disaster recovery control information may be newly configured control information. The updated disaster recovery control script may be a newly issued script for obtaining disaster recovery control information. The script may be a shell script. Shell script is a script programming language used for automated tasks and batch processing, and is mainly run 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 automated tasks, batch processing, system management and configuration, etc.
[0111] Specifically, the cloud host can obtain updated disaster recovery control scripts and disaster recovery control information from the control end in response to a disaster recovery control update event while running in user mode.
[0112] Exemplarily, the cloud host can obtain an updated shell script and updated disaster recovery control information from the control end in response to a disaster recovery control update event while running in user mode.
[0113] S204 includes S404, calling a disaster recovery control script to obtain system status information of the cloud host.
[0114] The disaster recovery control script may be a shell script or other types of scripts.
[0115] Specifically, in response to a running state switching event in which the cloud host switches from a user state to a kernel state, the cloud host calls a disaster recovery control script to obtain system state information of the cloud host.
[0116] S206 includes S406, screening a target control condition matching the system status information from a plurality of disaster recovery control conditions included in the updated disaster recovery control information.
[0117] Specifically, the cloud host may select a target control condition that matches the system status information from a plurality of disaster recovery control conditions included in the updated disaster recovery control information.
[0118] In one of the embodiments, the system status information includes parameter values of each of a plurality of preset parameters. The cloud host may determine a plurality of disaster recovery control conditions included in the updated disaster recovery control information as new disaster recovery control conditions. The cloud host may determine, for each new disaster recovery control condition, a condition parameter used to characterize the new disaster recovery control condition. The cloud host may determine the new disaster recovery control condition as a candidate control condition if the plurality of preset parameters include a condition parameter corresponding to the new disaster recovery control condition. For each candidate control condition, the cloud host may determine the candidate control condition as a target control condition that matches the system status information 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.
[0119] In this embodiment, when the cloud host is running in user mode, in response to a disaster recovery control update event, an updated disaster recovery control script and disaster recovery control information are obtained from the control end, the disaster recovery control script is called to obtain the system status information of the cloud host, and from the multiple disaster recovery control conditions contained in the updated disaster recovery control information, the target control conditions that match the system status information are screened, and each disaster recovery control information can be updated, which is beneficial to keeping the disaster recovery control information version at the latest version and improving the efficiency and accuracy of disaster recovery control.
[0120] In a cloud computing environment, especially when facing large-scale host deployment, traditional disaster recovery monitoring, policy configuration and response switching methods are inefficient. In view of this, in one embodiment, as shown in FIG5 , a method for disaster recovery control of a cloud host based on eBPF is provided, including:
[0121] S502, when the cloud host runs in user mode, obtain multiple preset control information configured for the cloud host from the control end.
[0122] Exemplarily, the method can be applied to the eBPF cloud host disaster recovery control system shown in FIG6 .
[0123] Among them, CFF-Manager can be a cloud WEB management and control platform, which is used to upgrade and control the eBPF program. Specifically used for: 1. Sending eBPF program code to the cloud host, you can issue commands to upgrade, compile, load the eBPF code into the kernel, etc.; 2. Performing policy management for different cloud hosts, issuing and updating policy configurations. CFF-Update can be an upgrade module, which can be a shell script to support receiving shell commands issued by the cloud management and control platform to upgrade the program, update the policy configuration, etc. CFF-Strategy can be a policy module, which is used to receive the updated policy configuration of the cloud, and update it to the kernel module at the same time, and store it in the eBPF Map. CFF-Event can be an event matching module, which is used to match policies based on the collected data and determine whether a failover is required. CFF-Failover can be a disaster recovery control module, which is used to make policy judgments on received events. If the policy match is met, a failover operation is performed through eBPF, including transferring traffic and migrating cloud hosts. The remaining kernel basic modules are used to: 1. Load the eBPF code in user state to kernel state for execution; 2. Monitor the specified system resources in the policy configuration, including (process name, port number, CPU load, memory load, network load); 3. Collect data for the specified resources and push events to user state.
[0124] Exemplary, as shown in FIG7, the process diagram of the disaster recovery switching method includes: 1. The cloud control platform targets different cloud hosts; 2. Through the CFF-Update script module, the code is compiled and loaded into the kernel module at the system level; at the same time, the policy configuration code issued by the cloud will be loaded into the kernel; 3. The cloud control platform can issue different policy configurations according to different cloud host configurations and scenarios. For example, cloud host A needs to monitor whether the application with the process name Java exists; cloud host B monitors whether port 22 is alive; cloud host C monitors the CPU and memory load, etc.; 4. The application loaded by the eBPF mechanism continuously monitors the data and status of the operating system in the kernel state. If the matching conditions of the policy are met, the matching results are transmitted through CFF-Event; 5. CFF-Failover will perform different disaster recovery switching operations according to different events; for example, the network traffic of this machine can be transferred to machine B; or the cloud host can be notified to migrate or expand to ensure the availability of resources.
[0125] The disaster recovery switching method 1. Fast disaster recovery switching based on kernel level to reduce RTO time; 2. Based on cloud + kernel level configuration, cloud hosts of different models can support personalized policy configuration; 3. Kernel-based disaster recovery strategy and switching can reduce system resource usage and user impact.
[0126] S504: Perform control condition verification on each preset control information, and determine the preset control information that passes the control condition verification as the first control information.
[0127] S506: Perform a control mode check on each preset control information, and determine the preset control information that passes the control mode check as the second control information.
[0128] S508, combining 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 includes a plurality of disaster recovery control conditions and disaster recovery control modes corresponding to the respective disaster recovery control conditions.
[0130] S510, when the cloud host is running in 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 terminal.
[0131] S512, when the cloud host runs in user mode, the disaster recovery control information is loaded into the storage space of the kernel mode.
[0132] S514 , in response to the running state switching event of the cloud host switching from the user state to the kernel state, obtaining system state information of the cloud host.
[0133] S516, calling the disaster recovery control script to obtain the system status information of the cloud host.
[0134] S518, when the cloud host runs in kernel mode, read disaster recovery control information from the storage space.
[0135] S520: For each disaster recovery control condition, determine a condition parameter for characterizing the disaster recovery control condition.
[0136] The system status information includes parameter values of multiple preset parameters.
[0137] S522: If the multiple preset parameters include a condition parameter corresponding to the disaster recovery control condition, the disaster recovery control condition is determined as a candidate control condition.
[0138] S524: 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, the candidate control condition is determined as the target control condition matching the system state information.
[0139] S526: Filter the target control condition that matches the system status information from the multiple disaster recovery control conditions included in the updated disaster recovery control information.
[0140] S528, determining a target control mode corresponding to the target control condition from various disaster recovery control modes.
[0141] S530: Obtain the expected recovery time of each target control mode.
[0142] S532, performing disaster recovery control on the cloud host according to the target control mode with the shortest expected recovery time.
[0143] S534, when the cloud host is running in user mode, 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, calling the disaster recovery control script to obtain the system status information of the cloud host.
[0145] S538: Filter the target control condition that matches the system status information from the multiple disaster recovery control conditions included in the updated disaster recovery control information.
[0146] In the present embodiment, in the first aspect, when the cloud host is running in the user state, the disaster recovery control information of the cloud host is obtained from the control end, and the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control mode corresponding to each disaster recovery control condition, so that the cloud host can perform disaster recovery control in the kernel state in the future, thereby improving the efficiency of disaster recovery control. In response to the running state switching event of the cloud host switching from the user state to the kernel state, the system state information of the cloud host is obtained, and the target control condition matching the system state information is selected from each disaster recovery control condition, and the target control mode corresponding to the target control condition is determined from each disaster recovery control mode. By adopting the above method, when the cloud host is in the kernel state, the cloud host is subjected to disaster recovery control according to the target control mode, thereby realizing rapid disaster recovery control at the kernel level, thereby improving the efficiency of disaster recovery control.
[0147] Secondly, the multi-level architecture design combining cloud control + user state + kernel state supports the rapid disaster recovery switching capability of cloud hosts; personalized policy configuration based on eBPF kernel Map storage: supports different disaster recovery conditions and strategies for different cloud hosts; the program flow of rapid disaster recovery switching developed based on eBPF: reduces system resource usage, reduces user resource impact, and has the ability to quickly achieve RTO.
[0148] Third, it allows personalized kernel-level policy configuration on hosts of different models. By performing data monitoring, policy judgment, and switching execution at the kernel level, this embodiment ensures a rapid response when a disaster recovery event occurs, significantly reduces the recovery time objective (RTO), and thus improves the stability and reliability of the entire system.
[0149] Fourthly, 1. Real-time monitoring: Using eBPF technology to monitor and collect data on system calls, network traffic and key performance indicators at the kernel level in real time. These real-time data can quickly identify potential faults and performance bottlenecks, providing solid data support for disaster recovery switching decisions. 2. Personalized and dynamically adjusted disaster recovery strategies: This method can configure and adjust personalized disaster recovery strategies for different models 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 status. 3. Automated disaster recovery control: When the system detects a fault or reaches the preset switching conditions, the eBPF kernel operation can automatically trigger the disaster recovery switching operation in real time and quickly without manual intervention, thereby improving the efficiency and accuracy of fault response. 4. Fast response time: Through the efficient ability to perform fault switching in the kernel, this method significantly shortens the response time of disaster recovery switching, ensures that the system can recover quickly when a fault occurs, guarantees business continuity, and significantly reduces the recovery time objective (RTO). 5. Reduce resource usage and intrusiveness: This method runs and is loaded in kernel state, which has less impact on the security and resources of the operating system and reduces the intrusiveness to the user environment. This allows this method to reduce the system burden as much as possible while improving system monitoring and fault handling capabilities.
[0150] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages 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 to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiment of the present application also provides a disaster recovery control device for implementing the disaster recovery control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more disaster recovery control device embodiments provided below can refer to the limitations on the disaster recovery control method above, and will not be repeated here.
[0152] In one embodiment, as shown in FIG8 , a disaster recovery control device is provided, including: a control information acquisition module 802, a state information acquisition module 804, a condition screening module 806 and a disaster recovery control module 808, wherein:
[0153] The control information acquisition module 802 is used to acquire the disaster recovery control information of the cloud host from the control end when the cloud host is running in the user state; the disaster recovery control information includes multiple disaster recovery control conditions and the disaster recovery control mode corresponding to each disaster recovery control condition;
[0154] The state information acquisition module 804 is used to 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;
[0155] The condition screening module 806 is used to screen the target control conditions that match the system status information from among the disaster recovery control conditions, and determine the target control mode corresponding to the target control conditions from among the disaster recovery control modes;
[0156] The disaster recovery control module 808 is used to perform disaster recovery control on the cloud host according to the target control mode.
[0157] In one of the embodiments, the system status information includes parameter values of multiple preset parameters; the condition screening module 806 is also used to determine, for each disaster recovery control condition, a condition parameter used to characterize the disaster recovery control condition; if the multiple preset parameters include a 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 includes the parameter value of the preset parameter corresponding to the condition parameter, the candidate control condition is determined as a target control condition that matches the system status information.
[0158] In one embodiment, there are multiple target control modes; the disaster recovery control module 808 is also used to obtain the expected recovery time of each target control mode; and the cloud host is subjected to disaster recovery control according to the target control mode with the shortest expected recovery time.
[0159] In one of the embodiments, the disaster recovery control device also includes: a loading module, which is used to load the disaster recovery control information into the storage space of the kernel state when the cloud host runs in the user state; and a reading module, which is used to read the disaster recovery control information from the storage space when the cloud host runs in the kernel state.
[0160] In one of the embodiments, the control information acquisition module 802 is also used to obtain multiple preset control information configured for the cloud host from the control end; perform control condition verification on each preset control information, and determine the preset control information that passes the control condition verification as the first control information; perform control mode verification on each preset control information, and determine the preset control information that passes the control mode verification as the second control information; and obtain the disaster recovery control information of the cloud host by combining the first control information and the second control information.
[0161] In one of the embodiments, the disaster recovery control device also includes: an update module, which is used to obtain an updated disaster recovery control script and disaster recovery control information from the control end in response to a disaster recovery control update event when the cloud host is running in user mode; a status information acquisition module 804, which is also used to call the disaster recovery control script to obtain the system status information of the cloud host; a condition screening module 806, which is also used to screen the target control condition that matches the system status information from the multiple disaster recovery control conditions contained in the updated disaster recovery control information.
[0162] Each module in the above-mentioned disaster recovery control device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0163] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as 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 used to provide computing and control capabilities. The memory of the computer device includes 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 operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store disaster recovery control information data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a disaster recovery control method is implemented.
[0164] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0165] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0167] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A disaster recovery control method, characterized in that: Applied to a cloud host, the method includes: When the cloud host is running in user mode, disaster recovery control information of the cloud host is obtained from the control end; the disaster recovery control information includes multiple disaster recovery control conditions and disaster recovery control modes corresponding to each of the disaster recovery control conditions; In response to an operation state switching event in which the cloud host switches from the user state to the kernel state, obtaining system state information of the cloud host; In each of the disaster recovery control conditions, a target control condition matching the system status information is selected, and a target control mode corresponding to the target control condition is determined from each of the disaster recovery control modes; According to the target control mode, disaster recovery control is performed on the cloud host.
2. The method according to claim 1, characterized in that The system status information includes parameter values of respective multiple preset parameters; The step of selecting a target control condition that matches the system status information from among the disaster recovery control conditions includes: For each of the disaster recovery control conditions, determining a condition parameter for characterizing the disaster recovery control condition; If the multiple preset parameters include a condition parameter corresponding to the disaster recovery control condition, determining the disaster recovery control condition as a candidate control condition; For each of the candidate control conditions, 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, the candidate control condition is determined as the target control condition matching the system state information.
3. The method according to claim 1, characterized in that There are multiple target control modes, and performing disaster recovery control on the cloud host according to the target control mode includes: Obtaining the expected recovery time of each of the target control modes; The cloud host is subjected to disaster recovery control 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 comprises: When the cloud host is running in user mode, loading the disaster recovery control information into the storage space of the kernel mode; The method further comprises: When the cloud host runs 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 obtaining the disaster recovery control information of the cloud host from the control end includes: Acquire multiple preset control information configured for the cloud host from the control terminal; Performing a control condition check on each of the preset control information, and determining the preset control information that passes the control condition check as the first control information; Performing a control mode check on each of the preset control information, and determining the preset control information that passes the control mode check as the second control information; The first control information and the second control information are combined to obtain disaster recovery control information of the cloud host.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the cloud host is running in user mode, in response to a disaster recovery control update event, obtaining an updated disaster recovery control script and disaster recovery control information from the control terminal; The obtaining of the system status information of the cloud host includes: Calling the disaster recovery control script to obtain system status information of the cloud host; The step of selecting a target control condition that matches the system status information from among the disaster recovery control conditions includes: A target control condition matching the system status information is screened from a plurality of disaster recovery control conditions included in the updated disaster recovery control information.
7. A disaster recovery control device, characterized in that: Applied to a cloud host, the device comprises: A control information acquisition module, used to obtain the disaster recovery control information of the cloud host from the control end when the cloud host runs in the user state; 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; a state information acquisition module, configured to acquire system state information of the cloud host in response to an operation state switching event in which the cloud host switches from the user state to the kernel state; A condition screening module, used to screen the target control condition matching the system status information from among the disaster recovery control conditions, and determine the target control mode corresponding to the target control condition from among 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, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Kernel mode and user mode data exchange method used for virtual container system disaster recovery
CN104503863A
Disaster recovery architecture configuration method and device, disaster recovery architecture switching method and device, equipment and storage medium
CN111158949A
Cloud host backup method and device, electronic equipment and readable storage medium
CN118838752A
Disaster recovery switching method and device, nonvolatile storage medium and electronic equipment
CN118890266A
Disaster recovery method and apparatus for virtualization platform
WO2020088533A1
Cited By
Memory system, memory system disaster recovery control method and electronic equipment
CN120010791A