Cloud center primary / standby switching methods, devices, electronic equipment, media and products

By acquiring active detection and passive reporting status values ​​from the cloud center, performing feature extraction and weight assignment, and fusion calculation to obtain the switching confidence level, the instability problem caused by the disaster recovery arbitration system in the cloud computing environment is solved, and more reliable primary and backup switching decisions are achieved.

CN123123129APending Publication Date: 2026-11-17NEW H3C BIG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611520901.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing disaster recovery arbitration system cannot operate stably in the cloud computing environment due to the inconsistency between the active detection mode and the passive reporting mode, which reduces the reliability of cloud computing services and user experience.

Method used

By acquiring the status values ​​from active detection and passive reporting, feature extraction and weight assignment are performed, and the switching confidence is obtained through fusion calculation. This controls the switching from the primary center to the backup center, thereby quantifying the reliability of the primary-backup switching.

Benefits of technology

This improves the reliability of primary/standby failover decisions in cloud centers, reduces the risk of erroneous and missed failovers, and enhances the reliability and user experience of cloud computing services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123129A_ABST
    Figure CN123123129A_ABST
Patent Text Reader

Abstract

This invention relates to the field of cloud computing technology and discloses a method, apparatus, electronic device, medium, and product for primary / standby switching of a cloud center. The method for primary / standby switching of a cloud center includes: obtaining a first detection state value and a second detection state value in the current decision cycle; in response to the inconsistency between the first and second detection state values, obtaining a first weight corresponding to the active detection mode and a second weight corresponding to the passive reporting mode; performing a fusion operation on the first and second detection state values ​​based on the first and second weights to obtain the switching confidence level corresponding to the primary center; and controlling the switching from the primary center to the standby center based on the switching confidence level. This invention improves the accuracy of primary / standby switching judgment and enhances the reliability and user experience of cloud computing services by fusing the active detection results and passive reporting results to determine whether a primary / standby switch of the cloud center is needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, specifically to methods, devices, electronic equipment, media, and products for switching between primary and backup cloud centers. Background Technology

[0002] With the widespread adoption of cloud computing technology, disaster recovery arbitration systems are typically deployed within cloud computing infrastructure to ensure the continuity of cloud services. These systems continuously monitor the normal operation of both primary and backup centers and automatically trigger failover when the primary center fails, switching service traffic to the backup center.

[0003] Disaster recovery arbitration systems in related technologies typically employ a dual-mode data acquisition approach, consisting of an active detection mode and a passive reporting mode. In the active detection mode, the arbitration node periodically calls the cloud center's data interface to determine whether the cloud center is alive from an external perspective. In the passive reporting mode, the cloud center periodically reports its normal status to the disaster recovery arbitration system.

[0004] However, in real-world, complex cloud production environments, when the active detection mode fails while the passive reporting mode succeeds, the disaster recovery arbitration system faces a dilemma. If no failover is performed, service interruption may occur due to network jitter; if a failover is performed directly, data inconsistency may result from a real failure of the main center, thus preventing the stable operation of cloud computing services and greatly reducing the reliability of cloud computing services and user experience. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic device, medium, and product for primary / backup switching in a cloud center, to solve the problem that disaster recovery arbitration systems in related technologies cause unstable operation of cloud computing services, reducing the reliability of cloud computing services and user experience.

[0006] In a first aspect, the present invention provides a method for primary / standby switching in a cloud center. The cloud center includes a primary center and a standby center. The method includes: acquiring a first detection state value and a second detection state value in the current decision cycle, wherein the first detection state value is a state value generated by actively detecting the primary center, and the second detection state value is a state value reported by the primary center; in response to the inconsistency between the first and second detection state values, acquiring a first weight corresponding to the active detection mode and a second weight corresponding to the passive reporting mode; performing a fusion operation on the first and second detection state values ​​based on the first and second weights to obtain the switching confidence level corresponding to the primary center; and controlling the switching from the primary center to the standby center based on the switching confidence level.

[0007] The cloud center primary / backup switchover method provided in this invention simultaneously collects the first detection status value generated by the active detection primary center and the second detection status value reported by the primary center within the current decision-making cycle, achieving dual-channel status acquisition and avoiding the information bias caused by a single monitoring method. In response to inconsistencies between the first and second detection status values, a first weight corresponding to the active detection mode and a second weight corresponding to the passive reporting mode are obtained. Weight reading logic is triggered only when the two types of detection results conflict, distinguishing between consistent and inconsistent status scenarios. Based on the first and second weights, the first and second detection status values ​​are fused to obtain the switchover confidence level corresponding to the primary center, transforming conflicting binary status information into a quantifiable indicator, improving the precision of fault assessment. Based on the switchover confidence level, the switchover from the primary center to the backup center is controlled. Using the quantified switchover confidence level as the basis for determining primary / backup switchover reduces the risk of erroneous or missed switchovers in primary / backup switchover scenarios, improving the reliability of cloud center primary / backup switchover decisions.

[0008] In one optional implementation, obtaining the first detection state value and the second detection state value in the current decision-making cycle includes: obtaining first state data and second state data in the current decision-making cycle, wherein the first state data is the state data corresponding to the active detection mode; and the second state data is the state data corresponding to the passive reporting mode; performing feature extraction on the first state data and the second state data respectively to obtain a first feature value corresponding to the first state data and a second feature value corresponding to the second state data; extracting the active detection result from the first feature value to determine the first detection state value corresponding to the active detection result; and extracting the passive detection result from the second feature value to determine the second detection state value corresponding to the passive detection result.

[0009] The cloud center master / standby switching method provided in this invention extracts features from the first state data collected in the master detection mode to obtain a first feature value that characterizes the operation of the master center. Based on the extracted first feature value, it identifies the active detection results and assigns values ​​to the active detection mode according to the active detection results. This converts unstructured detection information into first detection state values ​​that can be used for subsequent quantitative calculations, providing a unified format input for subsequent multi-source information fusion. It also extracts features from the passively reported second state data and assigns values ​​to the passive reporting mode according to the passive detection results. This converts the passively reported original alarms and health score information into second detection state values ​​in a unified quantitative format, standardizing the dual-channel monitoring data and facilitating subsequent weight fusion calculations.

[0010] In one optional implementation, determining a first detection state value corresponding to the active detection result includes: in response to the active detection result being in a normal state, using a first preset value as the first detection state value; in response to the active detection result being in an unknown state, using a second preset value as the first detection state value; in response to the active detection result being in an abnormal state, using a third preset value as the first detection state value; wherein the first preset value is less than the second preset value, and the second preset value is less than the third preset value.

[0011] The cloud center primary / backup switchover method provided in this embodiment of the invention, in response to a normal state result from active detection, uses a first preset value as a first detection state value, assigns a fixed first preset value to the normal state determined by active detection, completes the standardized assignment of normal scenarios, and sets a second preset value separately for an unknown state result from active detection, quantifying the uncertain state. For an abnormal state result from active detection, a third preset value is assigned to quantify and mark the fault scenario.

[0012] In one optional implementation, determining a second detection state value corresponding to a passive detection result includes: in response to a passive detection value being greater than a first preset detection value, using the first preset value as the second detection state value; the passive detection value is used to characterize the passive detection result; in response to no passive detection value being obtained, using the second preset value as the second detection state value; in response to a passive detection value being less than the second preset detection value or an error occurring in the passive detection value, using a third preset value as the second detection state value; wherein, the first preset detection value is greater than the second preset detection value.

[0013] The cloud center master / slave switching method provided in this embodiment of the invention assigns a first preset value to represent the normal state for scenarios where high health scores are passively reported. It also assigns a separate value to scenarios where no valid scores are reported passively, avoiding direct misjudgment of faults due to missing data. When the passively reported health indicators are low or the reported data is incorrect, a third preset value is assigned to mark the abnormality, thereby improving the completeness of abnormal scenario identification.

[0014] In one optional implementation, the first detection state value and the second detection state value are fused based on the first weight and the second weight to obtain the handover confidence corresponding to the main center. This includes: weighting and summing the first detection state value and the second detection state value according to the first weight and the second weight to obtain a weighted summation result; superimposing the weighted summation result with the bias parameter value to obtain the handover confidence; the bias parameter value is used to characterize the prior judgment tendency of the handover from the main center to the backup center.

[0015] The cloud center primary / standby switchover method provided in this invention introduces a bias parameter to carry a pre-defined prior tendency of the service, adapting to the different service tolerance levels for switchover risks. It weights the state values ​​according to the credibility weights of the two detection modes, quantifies and fuses dual-channel monitoring information, distinguishes the credibility of the two detections, and avoids misjudgments caused by equal weighting of conflicting information. Based on the prior tendency, the dual-channel fusion result is superimposed, and a switchover confidence score is generated by combining historical experience and real-time detection data, improving the service adaptability of the switchover confidence score.

[0016] In one optional implementation, controlling the switching from the primary center to the backup center based on the switching confidence level includes: controlling the switching from the primary center to the backup center in response to a switching confidence level greater than or equal to a first preset confidence level; generating an alarm message in response to a switching confidence level less than the first preset confidence level and a switching confidence level greater than or equal to a second preset confidence level; wherein the first preset confidence level is greater than the second preset confidence level.

[0017] The cloud center primary / standby switchover method provided in this invention sets a first pre-set confidence level as a hard threshold for triggering primary / standby switchover. Switchover is only performed when the fault risk is sufficiently high, avoiding unnecessary primary / standby switchovers in low-risk scenarios and reducing service jitter. In response to a switchover confidence level less than the first pre-set confidence level and a switchover confidence level greater than or equal to a second pre-set confidence level, only an alarm is triggered without performing a switchover, achieving fault pre-detection.

[0018] In one optional implementation, the master-slave switching method of the cloud center further includes: in response to the first probe state value and the second probe state value being consistent, taking the probe result corresponding to the first probe state value and the second probe state value as the running state of the master center.

[0019] The master-slave switching method for cloud centers provided in this embodiment of the invention directly accepts the detection result when the first detection state value and the second detection state value are consistent, without the need to perform weight fusion calculation, thus simplifying the decision-making process. When the results of the two channels are consistent, the determination result is more reliable, ensuring the efficiency of state determination.

[0020] In an optional implementation, the master-slave switching method of the cloud center further includes: obtaining a first historical detection state value and a second historical detection state value in multiple historical decision cycles; the first historical detection state value is the historical state value generated by the active detection master center, and the second historical detection state value is the historical state value reported by the master center; adjusting the first initial weight and the second initial weight according to the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight.

[0021] The cloud center master / backup switching method provided in this embodiment of the invention collects multi-cycle dual-channel historical detection data, dynamically and adaptively adjusts the weights, and dynamically corrects the initial weights of the two detection paths using historical time-series data. It can adaptively allocate credibility according to the long-term performance of the detection mode, thereby improving the long-term stability of the fusion judgment.

[0022] In one optional implementation, adjusting the first initial weight and the second initial weight based on the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight includes: obtaining the historical active detection result corresponding to each first historical detection state value and the historical passive detection result corresponding to each second historical detection state value; in response to the consistency between each historical active detection result and each historical passive detection result, increasing the second initial weight by a first preset coefficient in each historical decision cycle to obtain the first weight and the second weight; in response to the historical active detection result being in an abnormal state and the historical passive detection result being in a normal state, and the main center's operating state being determined to be in an abnormal state, decreasing the second initial weight by a second preset coefficient to obtain the first weight and the second weight; in response to the historical active detection result being in an abnormal state and the historical passive detection result being in a normal state within a preset time window, decreasing the first initial weight by a third preset coefficient to obtain the first weight and the second weight.

[0023] The cloud center primary / backup switchover method provided in this invention analyzes historical data corresponding to active and passive detection results, providing a classification basis for weight optimization in different conflict scenarios and realizing scenario-based differentiated weight correction. If all historical active detection results are consistent with all historical passive detection results, it indicates that the passive reporting channel is reliable, thus increasing the passive reporting weight. If historical active detection results are abnormal, and historical passive detection results are normal, and the primary center's operating status is determined to be abnormal, it indicates that passive reporting has failed, thus reducing the passive reporting weight. If historical active detection results are abnormal, and historical passive detection results are normal within a preset time window, it indicates network jitter has occurred, and active detection is interfered with, thus reducing the active detection weight.

[0024] In one optional implementation, the master-slave switching method of the cloud center further includes: obtaining the network latency fluctuation of the master center in each historical decision cycle; and in response to the network latency fluctuation being greater than a preset fluctuation threshold, reducing the first initial weight by a fourth preset coefficient in the historical decision cycle.

[0025] The cloud center master / slave switching method provided in this embodiment of the invention introduces network latency fluctuation as a correlation factor for weight adjustment. When network jitter is large, the active detection weight is reduced to reduce the interference caused by active detection misjudgment due to network fluctuation, increase the proportion of passive reporting results in fusion computing, and adapt to the judgment requirements in unstable network scenarios.

[0026] Secondly, the present invention provides a primary / backup switching device for a cloud center. The cloud center includes a primary center and a backup center. The primary / backup switching device includes: a status value acquisition module, used to acquire a first detection status value and a second detection status value in the current decision cycle, wherein the first detection status value is a status value generated by actively detecting the primary center, and the second detection status value is a status value reported by the primary center; a weight acquisition module, used to acquire a first weight corresponding to the active detection mode and a second weight corresponding to the passive reporting mode in response to the inconsistency between the first detection status value and the second detection status value; a status value fusion module, used to perform a fusion operation on the first detection status value and the second detection status value based on the first weight and the second weight to obtain the switching confidence level corresponding to the primary center; and a primary / backup switching module, used to control the switching from the primary center to the backup center based on the switching confidence level.

[0027] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the master-slave switching method of the cloud center described in the first aspect or any corresponding embodiment thereof.

[0028] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the master-slave switching method of the cloud center described in the first aspect or any corresponding embodiment thereof.

[0029] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the master-slave switching method of the cloud center described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0030] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0031] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first type of master-slave switching method for cloud centers according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the second process of the primary / standby switchover method in a cloud center according to an embodiment of the present invention; Figure 4This is a schematic diagram of the third process of the primary / standby switchover method in a cloud center according to an embodiment of the present invention; Figure 5 This is a structural block diagram of the master / slave switching device of the cloud center according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0034] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0035] As an optional application scenario of this invention, such as Figure 1 As shown, the primary / backup failover system of this cloud center may include at least one computer device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and computer devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 via a network 110.

[0036] Specifically, computer equipment can be smartphones, tablets, laptops, PDAs, desktop computers, game consoles, smart TVs, smart wearable devices, in-vehicle terminals, VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranets, local area networks, wide area networks, mobile communication networks, and combinations thereof.

[0037] In related technologies, disaster recovery arbitration systems use Boolean values ​​(normal / abnormal) to determine the operational status of the main center. However, in complex cloud production environments, this single-perspective Boolean value judgment has significant limitations, leading to a high false positive rate. First, there is a risk of distorted self-reported health, as passively reported data originates from within the cloud center. If the monitoring agent within the cloud center is maliciously hijacked, for example, by implanting logic bombs or cache deception, or if the agent itself is unable to refresh its status due to resource exhaustion, the center may appear to be faulty even though the reported status is normal. Second, there is a risk of false positives from external probes. Active probes rely on the network link between the arbitration point and the cloud center. If only the network between the arbitration point and the cloud center experiences momentary jitter, packet loss, or firewall blocking, while the cloud center itself is operating normally, active probes may incorrectly identify it as a center failure (FalsePositive), triggering unnecessary failover and causing intermittent service interruptions. Finally, the rigidity of static weights treats active detection and passive reporting as conditions with equal weight, requiring both to be consistent to confirm the status. This NAND logic lacks flexible probabilistic decision-making capabilities when facing conflicting scenarios, such as active detection timing out but passive reporting being perfectly healthy, or vice versa. It often adopts conservative strategies, such as only issuing alarms without switching over, or blindly switching over, failing to ensure both security and availability.

[0038] Therefore, disaster recovery arbitration systems in related technologies lack dynamic adaptive capabilities, and data weights are statically configured. For example, they always assume that external probes are more reliable than internal reports, or vice versa. Once the network environment changes (such as link congestion) or internal monitoring components malfunction, the system cannot automatically adjust its judgment strategy, leading to long-term misjudgments. The chain of evidence is broken; it only focuses on the current state at a single moment, failing to incorporate factors such as historical consistency ratios, data timeliness decay, and signal source stability into the decision model. For nodes that have just experienced a false alarm, the system still gives them the same trust, failing to effectively identify unreliable reports. Manual intervention is costly; due to the insufficient accuracy of automated adjudication, operations and maintenance personnel have to frequently intervene to handle alarms caused by suspected faults or network jitter, increasing operational complexity.

[0039] This invention provides a method for master-slave failover in a cloud center. By fusing active detection results and passive reporting results, it determines whether a master-slave failover is needed in the cloud center, thereby improving the accuracy of master-slave failover judgment and enhancing the reliability of cloud computing services and user experience.

[0040] According to an embodiment of the present invention, a method for primary / backup switching in a cloud center is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0041] This embodiment provides a primary / backup switching method for a cloud center, which can be used in computer equipment. The computer equipment includes a disaster recovery arbitration system, which is used to control the primary / backup switching. Figure 2 This is a flowchart of a first method for primary / standby failover in a cloud center according to an embodiment of the present invention. The cloud center includes a primary center and a standby center, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the first detection state value and the second detection state value in the current decision cycle. The first detection state value is the state value generated by the active detection main center, and the second detection state value is the state value reported by the main center.

[0042] The decision cycle is a pre-set time window for state detection, judgment and processing. This set of master-slave switchover judgment logic is executed periodically and repeatedly. The current decision cycle is the current time window. For example, the decision cycle can be 5 seconds.

[0043] The primary center is the cloud center node that is currently providing business services to the outside world, while the backup center is a backup cloud center. When the primary center fails, the backup center takes over the business.

[0044] The first probe status value is the main center status probe value obtained in the active probe mode. In the active probe mode, the disaster recovery arbitration system acts as an observer, actively initiating external observation behaviors such as API (Application Programming Interface) calls and heartbeat detection to the cloud center. The disaster recovery arbitration system (DRAS) is a system used to monitor the health status of the cloud management plane and make switching decisions.

[0045] Specifically, the first detection status value can be 0, 1 or 0.5. When the first detection status value is 0, it means that the main center is normal (Healthy) in active detection mode. When the first detection status value is 1, it means that the main center is abnormal (Down) in active detection mode. When the first detection status value is 0.5, it means that the status of the main center is unknown (Unknown) in active detection mode.

[0046] The second detection status value is the main center status detection value obtained in the passive reporting mode. In the passive reporting mode, the cloud center acts as the observed entity and actively pushes its own health status, log metadata, etc. to the disaster recovery arbitration system.

[0047] Specifically, the second detection status value can be 0, 1 or 0.5. When the second detection status value is 0, it indicates that the main center is normal (Healthy) in passive reporting mode. When the second detection status value is 1, it indicates that the main center is abnormal (Down) in passive reporting mode. When the second detection status value is 0.5, it indicates that the status of the main center is unknown (Unknown) in passive reporting mode.

[0048] In a specific example, the main center health check interface is called periodically. The interface returns the first probe status value, and the main center's internal monitoring service detects its own operating status and sends it to the disaster recovery arbitration system as the second probe status value.

[0049] In step S202, in response to the inconsistency between the first detection state value and the second detection state value, the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode are obtained.

[0050] The first weight is the confidence weight assigned to the active detection mode, which represents the credibility of the active detection results; the second weight is the confidence weight assigned to the passive reporting mode, which represents the credibility of the results reported by the main center.

[0051] The inconsistency between the first and second detection state values ​​indicates that the detection results of the active detection mode and the passive reporting mode are inconsistent, meaning that at least one of the results is biased. It is necessary to combine the weights to perform a fusion calculation to determine the result. At this time, it is necessary to call the pre-configured initial weights or the adaptive weights calculated based on the historical decision cycle.

[0052] In a specific example, the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode are pre-stored. When the first detection state value and the second detection state value are inconsistent, the first weight and the second weight are directly obtained. It is also possible to count the number of times the active detection mode and the passive reporting mode have been correctly judged in history, and use the historical accuracy rate as the weight. The initial weight can also be adjusted according to the detection situation of the historical detection cycle to obtain the first weight and the second weight.

[0053] In some optional implementations, in response to the first detection state value and the second detection state value being consistent, the detection result corresponding to the first detection state value and the second detection state value is taken as the operating state of the main center.

[0054] If the first detection state value and the second detection state value are the same, it means that the detection results of the active detection mode and the passive reporting mode are consistent. The detection result can be directly accepted without performing weight fusion calculation, which simplifies the decision-making process. When the results of the two channels are consistent, the judgment result is more reliable and ensures the efficiency of state judgment.

[0055] Step S203: Based on the first weight and the second weight, perform a fusion operation on the first detection state value and the second detection state value to obtain the switching confidence level corresponding to the main center.

[0056] The switching confidence score is a comprehensive value obtained through fusion calculation. The switching confidence score is used to determine whether to trigger a switch from the primary center to the backup center.

[0057] Specifically, the first detection state value and the second detection state value are weighted and fused according to the first weight and the second weight to obtain the switching confidence level corresponding to the main center. For example, the first product result is obtained by multiplying the first weight and the first detection state value, the second product result is obtained by multiplying the second weight and the second detection state value, and the switching confidence level corresponding to the main center is obtained by summing the first product result and the second product result.

[0058] Step S204: Based on the switching confidence level, control the switching from the primary center to the backup center.

[0059] The switch from the primary center to the backup center involves migrating business traffic from the primary center to the backup center, where the backup center takes over the business.

[0060] Specifically, a single threshold can be compared with the handover confidence level, and the handover from the primary center to the backup center can be controlled based on the comparison result. Alternatively, multiple thresholds can be compared with the handover confidence level, and the handover from the primary center to the backup center can be controlled based on the comparison result.

[0061] The primary / backup failover method for cloud centers provided in this embodiment simultaneously collects the first detection status value generated by the active detection primary center and the second detection status value reported by the primary center within the current decision-making cycle, achieving dual-channel status acquisition and avoiding the information bias caused by a single monitoring method. In response to inconsistencies between the first and second detection status values, the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode are obtained. The weight reading logic is triggered only when the two types of detection results conflict, distinguishing between consistent and inconsistent status scenarios. Based on the first and second weights, the first and second detection status values ​​are fused to obtain the failover confidence level corresponding to the primary center, transforming conflicting binary status information into a quantifiable indicator, improving the granularity of fault assessment. Based on the failover confidence level, the failover from the primary center to the backup center is controlled. Using the quantified failover confidence level as the basis for determining primary / backup failover reduces the risk of erroneous or missed failovers in primary / backup failover scenarios, improving the reliability of primary / backup failover decisions in cloud centers.

[0062] This embodiment provides a primary / backup switching method for a cloud center, which can be used in computer equipment. The computer equipment includes a disaster recovery arbitration system, which is used to control the primary / backup switching. Figure 3 This is a second flowchart of a primary / standby failover method for a cloud center according to an embodiment of the present invention. The cloud center includes a primary center and a standby center, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain the first detection state value and the second detection state value in the current decision cycle. The first detection state value is the state value generated by the active detection main center, and the second detection state value is the state value reported by the main center.

[0063] Specifically, step S301 includes: Step S3011: Obtain the first state data and the second state data in the current decision cycle. The first state data is the state data corresponding to the active detection mode; the second state data is the state data corresponding to the passive reporting mode.

[0064] The first state data is the raw data collected in the active probing mode. For example, the first state data includes the K8s API (Container Orchestration Platform Application Programming Interface) response time, Pod (the smallest schedulable and manageable computing unit) status list, ETCD (Distributed Key-Value Store) connectivity, and HTTP (HyperText Transfer Protocol) status code.

[0065] Specifically, the K8s API response time is the time taken from initiating a probe request to receiving a response; the Pod status list is the set of all Pod statuses obtained by calling the K8s API; ETCD connectivity is used to verify whether the K8s control plane can read and write ETCD metadata storage; and the HTTP status code is the HTTP return code returned by the access interface.

[0066] The second status data is the raw data actively pushed up by the internal monitoring component of the main center in the passive reporting mode. For example, the second status data includes: health_score (health score, range, for example, 0-100 points), details (details structure, containing a list of Pod status details collected locally by the main center and a list of internal alarms in the main center), and timestamp (reporting timestamp).

[0067] Specifically, health_score is used to characterize the health value of the main center detected in passive reporting mode. The lower the score, the more serious the fault. detail is used to store detailed evidence, and timestamp is used to mark the data collection time.

[0068] Step S3012: Perform feature extraction on the first state data and the second state data respectively to obtain the first feature value corresponding to the first state data and the second feature value corresponding to the second state data.

[0069] Feature extraction is performed on the first state data to obtain multiple first feature values. These first feature values ​​may include Dtime_out (a boolean flag used to determine whether the active probe has timed out), Dlatency (probe round-trip delay), and Dstatus_code (HTTP status code).

[0070] Feature extraction is performed on the second-state data to obtain multiple second feature values, including: Rscore (score), Rfreshness (data freshness, obtained based on the difference between the current time and the reported timestamp), and Rhistory_consistency (historical consistency marker).

[0071] Step S3013: Extract the active detection result from the first feature value and determine the first detection state value corresponding to the active detection result.

[0072] Among them, active detection results are extracted from multiple first feature values. For example, the active detection results can include normal state, abnormal state or unknown state.

[0073] In some optional implementations, step S3013 above includes: Step a1: In response to the active detection result being in a normal state, the first preset value is used as the first detection state value.

[0074] The first preset value can be set according to the requirements. For example, the first preset value can be 0. When the active detection result is a normal state (Healthy), the first detection state value is assigned to 0.

[0075] Step a2: In response to the unknown state of the active detection result, the second preset value is used as the first detection state value.

[0076] The second preset value can be set according to requirements. For example, the second preset value can be 0.5. When the active detection result is unknown, the first detection state value is assigned to 0.5.

[0077] Step a3: In response to the abnormal state of the active detection result, the third preset value is used as the first detection state value; wherein, the first preset value is less than the second preset value, and the second preset value is less than the third preset value.

[0078] The third preset value can be set according to requirements. For example, the third preset value can be 1. When the active detection result is an abnormal state (Down), the first detection state value is assigned to 1.

[0079] Specifically, in response to a normal state result from active detection, a first preset value is used as the first detection state value. A fixed first preset value is assigned to the normal state determined by active detection to complete the standardized assignment of normal scenarios. A second preset value is set separately for an unknown state result from active detection to quantify the uncertain state. For an abnormal state result from active detection, a third preset value is assigned to quantify and mark the fault scenario.

[0080] Step S3014: Extract the passive detection result from the second feature value and determine the second detection state value corresponding to the passive detection result.

[0081] Among them, active detection results are extracted from multiple second feature values. For example, passive detection results may include normal state, abnormal state, or unknown state.

[0082] In some optional implementations, step S3014 above includes: Step b1: In response to the passive detection value being greater than the first preset detection value, the first preset value is used as the second detection state value; the passive detection value is used to characterize the passive detection result.

[0083] The first preset detection value can be set according to the actual situation. For example, the first preset detection value can be 80. When the passive detection value is greater than 80, the switch from the main center to the backup center will not be performed, and the second detection status value will be assigned to 0.

[0084] In step b2, in response to the failure to obtain a passive detection value, the second preset value is used as the second detection state value.

[0085] When the passive detection score is unknown, the main center is determined to be in an unknown state, and the second detection state value is assigned to 0.5.

[0086] Step b3: In response to the passive detection value being less than the second preset detection value or the passive detection value being incorrect, the third preset value is used as the second detection state value; wherein, the first preset detection value is greater than the second preset detection value.

[0087] The second preset detection value can be set according to the actual situation. For example, the second preset detection value can be 20. When the passive detection value is less than 20 or an error is clearly reported, the main center is determined to be in an abnormal state, and the second detection state value is assigned to 1.

[0088] In the above implementation, for scenarios where high health scores are passively reported, a first preset value is assigned to represent a normal state. For scenarios where no valid scores are reported passively, a separate value is assigned to avoid misjudging faults directly due to missing data. When the passively reported health indicators are low or the reported data is incorrect, a third preset value is assigned to mark an anomaly, thereby improving the completeness of anomaly scenario identification.

[0089] In a specific example, after the probe task is started, the first state data and the second state data are acquired in parallel. The K8s API and the Controller interface are called to record the response time and status. The first state data is obtained, the latest passive reporting record is read from ETCD, and the timeliness of the data is verified according to the timestamp. If it is expired, it is marked as an unknown state.

[0090] In step S302, in response to the inconsistency between the first detection state value and the second detection state value, the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode are obtained.

[0091] Access the trust model table in local memory, read the first and second weights from the trust model table, check the conflict situation of the previous decision cycle, and update the first and second weights according to the conflict situation of the previous decision cycle. The trust model table is a data table that stores the historical decision credibility of different detection modes, which can provide historical decision basis for this weight allocation. The trust model table includes the first weight and the second weight.

[0092] Step S303: Based on the first weight and the second weight, perform a fusion operation on the first detection state value and the second detection state value to obtain the switching confidence level corresponding to the main center.

[0093] Specifically, step S303 includes: Step S3031: The first detection state value and the second detection state value are weighted and summed according to the first weight and the second weight to obtain the weighted summation result.

[0094] Step S3032: The weighted summation result is superimposed with the bias parameter value to obtain the switching confidence; the bias parameter value is used to characterize the prior judgment tendency of the switching from the primary center to the backup center.

[0095] The bias parameter value can be fine-tuned according to the business strategy and is used to fine-tune the strategy bias. The initial value is 0.

[0096] Specifically, by reading the current business policy configuration information, the bias parameter value that matches the current business type is obtained from the business policy configuration information.

[0097] For example, the formula for determining the switching confidence level can be: ; in, To switch confidence levels, This is the first detection state value. As the first weight, This is the second detection state value. As the second weight, This is the bias parameter value.

[0098] Switch the confidence level to a value between 0 and 1. The closer the value is to 1, the greater the possibility of a failure in the main center.

[0099] Step S304: Based on the switching confidence level, control the switching from the primary center to the backup center.

[0100] Specifically, step S304 includes: In step S3041, in response to the switching confidence level being greater than or equal to the first preset confidence level, the main center is controlled to switch to the backup center.

[0101] The first preset confidence level can be set according to the actual situation. For example, the first preset confidence level can be 0.7. When the switching confidence level is greater than or equal to 0.7, the main center is determined to be faulty, and the main center is controlled to switch to the backup center.

[0102] After the control center switches to the backup center, a decision record is generated and written to ETCD (containing the confidence level and weight of this decision for auditing).

[0103] After the control center switches to the backup center, the control center is marked as a "fault source". In the initial stage of the next decision cycle, if the passive report shows normal again, the second weight is further reduced until new verification proves that it has recovered reliably.

[0104] In a specific example, when the first detection state value of the active detection mode is 1 and the second detection state value of the passive reporting mode is 0, the main center has recently experienced multiple false alarms from passive reporting, the second weight has dropped to 0.2, and the first weight is 0.8. Substituting these values ​​into the formula for determining the switching confidence level, we obtain a switching confidence level of 0.8. Since the switching confidence level is greater than 0.7, it is determined that the main center is experiencing a true fault, and the main center is switched to the backup center.

[0105] Step S3042: In response to the switching confidence being less than the first preset confidence and the switching confidence being greater than or equal to the second preset confidence, an alarm message is generated; wherein the first preset confidence is greater than the second preset confidence.

[0106] The second preset confidence level can be set according to the actual situation. For example, the second preset confidence level can be 0.3. When the switching confidence level is less than 0.7 and the switching confidence level is greater than or equal to 0.3, the main center is determined to enter the alarm state, the detection frequency is increased, alarm information is sent, and automatic switching is not performed.

[0107] Alarm information may include suspected network jitter. If no failover is triggered this time, and the conclusion is to generate alarm information within 3 decision cycles, manual intervention is required for inspection.

[0108] In a specific example, when a false positive occurs during active network probing, meaning the main center itself is operating normally, but issues such as momentary jitter, packet loss, or firewall blocking in the network link between the disaster recovery arbitration system and the main center cause the active probing to incorrectly determine that the cloud center is down, the first probing status value in the active probing mode is 1, and the second probing status value in the passive reporting mode is 0. The main center has recently performed extremely well, and the conclusions in multiple consecutive probings are highly consistent. The second weight has risen to 0.9, while the first weight has dropped to 0.5 due to recent network jitter. Substituting these values ​​into the formula for determining the switching confidence level, we get a switching confidence level of 0.5. Since the switching confidence level is less than 0.7 but greater than 0.3, it is determined to be a false positive caused by active network probing fluctuations. Switching is suppressed, only alarm information is generated, and confirmation is awaited in the next decision cycle.

[0109] In some alternative implementations, a switch from the primary center to the backup center is not performed in response to a switch confidence level that is less than a second preset confidence level.

[0110] For example, if the switch confidence level is less than 0.3, the switch from the primary center to the backup center will not be performed, and monitoring can continue.

[0111] The cloud center master-slave switchover method provided in this embodiment extracts features from the first state data collected in the master detection mode to obtain a first feature value that can characterize the operation of the master center. Based on the extracted first feature value, the active detection results are identified, and the active detection mode is assigned a value according to the active detection results. This converts the unstructured detection information into a first detection state value that can be used for subsequent quantitative calculations, providing a unified format input for subsequent multi-source information fusion. Features are extracted from the passively reported second state data, and the passive reporting mode is assigned a value according to the passive detection results. This converts the passively reported original alarms and health score information into a second detection state value in a unified quantitative format, standardizing the dual-channel monitoring data and facilitating subsequent weight fusion calculations. A first pre-set confidence level is set as a hard threshold to trigger master-slave switchover, ensuring that switchover is only performed when the fault risk is sufficiently high, avoiding unnecessary master-slave switchover in low-risk scenarios and reducing service jitter. If the handover confidence level is less than the first preset confidence level and the handover confidence level is greater than or equal to the second preset confidence level, only an alarm is triggered and no handover is performed, thus achieving fault pre-detection. If the handover confidence level is less than the second preset confidence level, the handover from the primary center to the backup center is not performed, thus reducing unnecessary alarms.

[0112] In some alternative implementations, the above method may further include: Step c1: Obtain the first historical detection state value and the second historical detection state value from multiple historical decision-making cycles; the first historical detection state value is the historical state value generated by the active detection main center, and the second historical detection state value is the historical state value reported by the main center.

[0113] In a specific example, there can be 10 historical decision-making periods. The first historical detection state value and the second historical detection state value can be obtained in multiple historical decision-making periods. The first initial weight and the second initial weight can be adjusted according to the comparison result of the first historical detection state value and the second historical detection state value in each historical decision-making period. Alternatively, after the end of each historical decision-making period, the weight update logic can be executed to adjust the first initial weight and the second initial weight in real time.

[0114] Step Sc2: Adjust the first initial weight and the second initial weight based on the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight.

[0115] For example, the first initial weight can be 0.7, indicating that the default active detection mode is more objective, and the second initial weight can be 0.3, indicating that the initial trust level of the passive reporting mode is lower.

[0116] Specifically, the historical active detection results corresponding to each first historical detection state value and the historical passive detection results corresponding to each second historical detection state value are obtained.

[0117] Historical active detection results include normal, abnormal, or unknown states, and historical passive detection results also include normal, abnormal, or unknown states.

[0118] In response to the consistency between all historical active detection results and all historical passive detection results, the second initial weight is increased by the first preset coefficient in each historical decision cycle to obtain the first weight and the second weight.

[0119] If the historical active detection results and historical passive detection results are consistent across 10 historical decision-making cycles, and are either all in a normal state, all in an abnormal state, or all in an unknown state, it indicates that the historical active detection results and historical passive detection results are highly consistent. Therefore, the passive reporting channel is considered reliable. The first preset coefficient is added to the second initial weight to obtain the second weight, and the first initial weight is used as the first weight.

[0120] The first preset coefficient can be set according to the actual situation. The first preset coefficient can be 0.05. The formula for determining the second weight can be: ; in, As the second weight, Second initial weights, The first preset coefficient, To take the smaller of the two values.

[0121] In response to the historical active detection results being in an abnormal state and the historical passive detection results being in a normal state, and the determination that the main center's operating state is in an abnormal state, the second initial weight is reduced by the second preset coefficient to obtain the first weight and the second weight.

[0122] If the historical active detection results are in an abnormal state and the historical passive detection results are in a normal state, and the main center's operating status is determined to be in an abnormal state, it indicates that passive reporting has failed (possibly due to Agent freezing or malicious deception). The second initial weight is significantly reduced, and the first initial weight is used as the first weight. The second preset coefficient can be 0.2.

[0123] The formula for determining the second weight can be: ; in, As the second weight, Second initial weights, This is the second preset coefficient. To take the larger of the two values.

[0124] In response to the historical active detection results being in an abnormal state, and the historical passive detection results being in a normal state within a preset time window, the first initial weight is reduced by a third preset coefficient to obtain the first weight and the second weight.

[0125] The preset time window can be 3-5 historical decision-making cycles, and the third preset coefficient can be 0.03.

[0126] If the historical active detection results are abnormal, and the historical passive detection results are normal within the preset time window, it indicates that the interference with active detection may be due to network jitter. Therefore, the weight of active detection should be reduced, and the second initial weight should be used as the second weight.

[0127] The formula for determining the first weight can be: ; in, As the first weight, As the first initial weight, This is the third preset coefficient. To take the larger of the two values.

[0128] In addition to the rules for adjusting the first and second initial weights mentioned above, the network latency fluctuation of the main center in each historical decision-making cycle can also be obtained; in response to the network latency fluctuation exceeding the preset fluctuation threshold, the first initial weight is reduced by the fourth preset coefficient in the historical decision-making cycle.

[0129] In the active probing mode, the network latency fluctuation is obtained by the time difference between the time of receiving the active probing result and the time of sending the active probing request. The preset fluctuation threshold can be 3 times the average network latency fluctuation within the sliding window.

[0130] When network latency fluctuations exceed the preset fluctuation threshold, it indicates that the network latency is too high and the active detection mode is being interfered with. The weight of active detection is reduced, and the second initial weight is used as the second weight. The fourth preset coefficient can be 0.5 times the first initial weight.

[0131] The formula for determining the first weight can be: ; in, As the first weight, As the first initial weight, This is the fourth preset coefficient. To take the larger of the two values.

[0132] The first weight can also be determined using the following formula: ; in, As the first weight, This is the first initial weight.

[0133] The cloud center master / backup switching method of this invention collects multi-cycle dual-channel historical probe data, dynamically and adaptively adjusts the weights, and dynamically corrects the initial weights of the two probes using historical time-series data. It can adaptively allocate credibility based on the long-term performance of the probe mode, improving the long-term stability of the fusion judgment. It analyzes the active and passive probe results corresponding to the historical data, providing a classification basis for weight optimization in different conflict scenarios, and realizing scenario-based differentiated weight correction. If all historical active probe results are consistent with all historical passive probe results, it indicates that the passive reporting channel is reliable, and the passive reporting weight is increased. If the historical active probe result is abnormal, and the historical passive probe result is normal, and the main center's operating status is determined to be abnormal, it indicates that passive reporting has failed, and the passive reporting weight is reduced. If the historical active probe result is abnormal, and the historical passive probe result is normal within a preset time window, it indicates that network jitter has occurred, and active probes are interfered with, and the active probe weight is reduced. By introducing network latency fluctuations as a correlation factor for weight adjustment, the weight of active detection is reduced when network jitter is large, thereby reducing the interference caused by network fluctuations leading to misjudgments of active detection and increasing the proportion of passive reporting results in fusion computing, thus adapting to the judgment requirements in unstable network scenarios.

[0134] In a specific example, the cloud center includes a primary center and a backup center, and the primary / backup switchover of the cloud center is controlled through a disaster recovery arbitration system, such as... Figure 4 As shown, the process includes the following steps: The disaster recovery arbitration system initiates a probe task to actively probe and obtain the probed values. The main center passively reports the probed values ​​and obtains the passively reported values. The active probed values ​​and passively reported values ​​are compared to determine if a conflict has occurred. If no conflict has occurred, the operating status is directly output. If a conflict has occurred, the historical consistency table is queried to obtain the dynamic weight. The active probed values ​​and passively reported values ​​are weighted and fused according to the dynamic weight to obtain the switchover confidence. When the switchover confidence is greater than or equal to 0.7, a switchover is triggered. When the switchover confidence is less than 0.7 but greater than or equal to 0.3, the switchover is suppressed, the probe frequency is increased, and alarm information is generated. When the switchover confidence is less than 0.3, the main center is determined to be healthy, and monitoring continues.

[0135] The cloud center primary / standby failover method of this invention significantly improves arbitration accuracy. By introducing a dynamic Bayesian trust model, it effectively solves two major pain points: false alarms due to network jitter and false agent reports. In complex network environments, it can accurately identify true and false faults, reducing the false failover rate by more than 90%, while avoiding prolonged business interruptions due to missed judgments. It adapts to changes in the network environment, automatically adjusting the trust level of different data sources based on historical performance. For example, in areas with frequent network fluctuations, it automatically reduces reliance on active probing, instead trusting stable passive reports, without requiring manual configuration modifications. It provides end-to-end traceability and auditability; each arbitration decision is calculated based on a specific chain of evidence (weight value, historical consistency, timeliness) and recorded in a complete audit log. Operations personnel can clearly review the process, greatly reducing the difficulty of troubleshooting. The smooth disaster recovery failover experience, through probabilistic adjudication, avoids drastic failover shocks and provides operations personnel with buffer time, achieving smoother and more secure disaster recovery management.

[0136] This embodiment also provides a primary / backup switching device for a cloud center, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0137] This embodiment provides a primary / standby switching device for a cloud center, such as... Figure 5 As shown, it includes: The status value acquisition module 501 is used to acquire the first detection status value and the second detection status value in the current decision cycle. The first detection status value is the status value generated by the active detection main center, and the second detection status value is the status value reported by the main center.

[0138] The weight acquisition module 502 is used to acquire the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode in response to the inconsistency between the first detection state value and the second detection state value.

[0139] The state value fusion module 503 is used to perform a fusion operation on the first detection state value and the second detection state value based on the first weight and the second weight to obtain the switching confidence level corresponding to the main center.

[0140] The primary / standby switching module 504 is used to control the switching from the primary center to the standby center based on the switching confidence level.

[0141] In some optional implementations, the status value acquisition module 501 includes: The first feature extraction unit is used to acquire the first state data and the second state data in the current decision cycle. The first state data is the state data corresponding to the active detection mode; the second state data is the state data corresponding to the passive reporting mode.

[0142] The first state value determination unit is used to extract features from the first state data and the second state data respectively to obtain the first feature value corresponding to the first state data and the second feature value corresponding to the second state data.

[0143] The second feature extraction unit is used to extract the active detection result from the first feature value and determine the first detection state value corresponding to the active detection result.

[0144] The second state value determination unit is used to extract the passive detection result from the second feature value and determine the second detection state value corresponding to the passive detection result.

[0145] In some optional implementations, the first state value determination unit includes: The first response subunit is used to respond to the active detection result being in a normal state by using the first preset value as the first detection state value.

[0146] The second response subunit is used to respond to the unknown state of the active detection result by using the second preset value as the first detection state value.

[0147] The third response subunit is used to respond to an abnormal state in the active detection result by using a third preset value as the first detection state value; wherein the first preset value is less than the second preset value, and the second preset value is less than the third preset value.

[0148] In some optional implementations, the second state value determination unit includes: The fourth response subunit is used to respond to a passive detection value being greater than a first preset detection value, and to use the first preset value as the second detection state value; the passive detection value is used to characterize the passive detection result.

[0149] The fifth response subunit is used to respond to the failure to obtain a passive detection value, in which case the second preset value is used as the second detection state value.

[0150] The sixth response subunit is used to respond to a passive detection value being less than a second preset detection value or an error occurring in the passive detection value, by using a third preset value as the second detection state value; wherein, the first preset detection value is greater than the second preset detection value.

[0151] In some optional implementations, the state value fusion module 503 includes: The weighted summation unit is used to perform a weighted summation on the first detection state value and the second detection state value according to the first weight and the second weight to obtain the weighted summation result.

[0152] The numerical overlay unit is used to overlay the weighted summation result with the bias parameter value to obtain the switching confidence; the bias parameter value is used to characterize the prior judgment tendency of the switching from the primary center to the backup center.

[0153] In some optional implementations, the primary / standby switching module 504 includes: A switching control unit is used to control the main center to switch to the backup center in response to a switching confidence level greater than or equal to a first preset confidence level.

[0154] An alarm information generation unit is used to generate alarm information in response to a handover confidence level that is less than a first preset confidence level and a handover confidence level that is greater than or equal to a second preset confidence level; wherein the first preset confidence level is greater than the second preset confidence level.

[0155] In some optional implementations, the primary / standby switching device of the cloud center further includes: The running status determination module is used to determine the running status of the main center when the first detection status value and the second detection status value are consistent.

[0156] In some optional implementations, the primary / standby switching device of the cloud center further includes: The historical data acquisition module is used to acquire the first historical detection state value and the second historical detection state value in multiple historical decision-making cycles; the first historical detection state value is the historical state value generated by the active detection main center, and the second historical detection state value is the historical state value reported by the main center.

[0157] The weight adjustment module is used to adjust the first initial weight and the second initial weight according to the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight.

[0158] In some optional implementations, the weight adjustment module includes: The detection result acquisition unit is used to acquire the historical active detection results corresponding to each first historical detection state value, and the historical passive detection results corresponding to each second historical detection state value.

[0159] The weight adjustment unit is used to increase the second initial weight by a first preset coefficient in each historical decision cycle to obtain the first weight and the second weight, in response to the consistency between each historical active detection result and each historical passive detection result.

[0160] The weight adjustment unit is used to reduce the second initial weight by a second preset coefficient in response to the historical active detection result being in an abnormal state, the historical passive detection result being in a normal state, and the determination that the main center's operating state is in an abnormal state, so as to obtain the first weight and the second weight.

[0161] The weight adjustment unit is used to reduce the first initial weight by a third preset coefficient in response to the historical active detection result being in an abnormal state and the historical passive detection result being in a normal state within a preset time window, so as to obtain the first weight and the second weight.

[0162] The weight adjustment unit is used to obtain the network latency fluctuation of the main center in each historical decision cycle. In response to the network latency fluctuation being greater than the preset fluctuation threshold, the first initial weight is reduced by the fourth preset coefficient in the historical decision cycle.

[0163] The cloud center master / slave switching device provided in this embodiment of the invention can execute the cloud center master / slave switching method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0164] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0165] The following is a detailed reference. Figure 6 This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0166] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0167] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the master / slave failover method of the cloud center according to embodiments of the present invention.

[0168] Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0169] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the master / slave failover method of the cloud center shown in the above embodiments is implemented.

[0170] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0171] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for primary / standby failover in a cloud center, characterized in that, The cloud center includes a primary center and a backup center, and the method includes: Obtain the first and second detection status values ​​in the current decision cycle. The first detection status value is the status value generated by the main center through active detection, and the second detection status value is the status value reported by the main center. In response to the inconsistency between the first detection state value and the second detection state value, the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode are obtained. Based on the first weight and the second weight, the first detection state value and the second detection state value are fused to obtain the switching confidence level corresponding to the main center; Based on the switching confidence level, control the switching from the primary center to the backup center.

2. The method according to claim 1, characterized in that, The acquisition of the first and second detection state values ​​in the current decision cycle includes: Acquire first state data and second state data in the current decision-making cycle. The first state data is the state data corresponding to the active detection mode; the second state data is the state data corresponding to the passive reporting mode. Feature extraction is performed on the first state data and the second state data respectively to obtain the first feature value corresponding to the first state data and the second feature value corresponding to the second state data; Extract the active detection result from the first feature value, and determine the first detection state value corresponding to the active detection result; The passive detection result is extracted from the second feature value, and the second detection state value corresponding to the passive detection result is determined.

3. The method according to claim 2, characterized in that, Determining the first detection state value corresponding to the active detection result includes: In response to the active detection result being in a normal state, the first preset value is used as the first detection state value; In response to the active detection result being unknown, the second preset value is used as the first detection state value; In response to the active detection result being an abnormal state, the third preset value is used as the first detection state value; Wherein, the first preset value is less than the second preset value, and the second preset value is less than the third preset value.

4. The method according to claim 3, characterized in that, Determining the second detection state value corresponding to the passive detection result includes: In response to a passive detection value being greater than a first preset detection value, the first preset value is used as the second detection state value; the passive detection value is used to characterize the passive detection result. In response to the failure to obtain the passive detection value, the second preset value is used as the second detection state value; In response to the passive detection value being less than the second preset detection value or the passive detection value being incorrect, the third preset value is used as the second detection state value; wherein, the first preset detection value is greater than the second preset detection value.

5. The method according to any one of claims 1 to 4, characterized in that, The step of fusing the first detection state value and the second detection state value based on the first weight and the second weight to obtain the switching confidence level corresponding to the main center includes: The first detection state value and the second detection state value are weighted and summed according to the first weight and the second weight to obtain the weighted summation result; The weighted summation result is superimposed with the bias parameter value to obtain the switching confidence level; the bias parameter value is used to characterize the prior judgment tendency of the switching from the primary center to the backup center.

6. The method according to any one of claims 1 to 4, characterized in that, The step of controlling the handover from the primary center to the backup center based on the handover confidence level includes: In response to the switching confidence level being greater than or equal to a first preset confidence level, the primary center is controlled to switch to the backup center; In response to the handover confidence being less than the first preset confidence and the handover confidence being greater than or equal to the second preset confidence, an alarm message is generated; wherein the first preset confidence is greater than the second preset confidence.

7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In response to the first detection state value and the second detection state value being consistent, the detection results corresponding to the first detection state value and the second detection state value are taken as the operating state of the main center.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Acquire the first historical detection state value and the second historical detection state value in multiple historical decision cycles; the first historical detection state value is the historical state value generated by the main center through active detection, and the second historical detection state value is the historical state value reported by the main center; The first initial weight and the second initial weight are adjusted based on the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight.

9. The method according to claim 8, characterized in that, The step of adjusting the first initial weight and the second initial weight based on the first historical detection state value and the second historical detection state value to obtain the first weight and the second weight includes: Obtain the historical active detection results corresponding to each of the first historical detection state values, and the historical passive detection results corresponding to each of the second historical detection state values; In response to the consistency between all the historical active detection results and all the historical passive detection results, the second initial weight is increased by a first preset coefficient in each historical decision cycle to obtain the first weight and the second weight; In response to the historical active detection result being in an abnormal state and the historical passive detection result being in a normal state, and the determination that the main center's operating state is in an abnormal state, the second initial weight is reduced by a second preset coefficient to obtain the first weight and the second weight. In response to the historical active detection result being in an abnormal state, and the historical passive detection result being in a normal state within a preset time window, the first initial weight is reduced by a third preset coefficient to obtain the first weight and the second weight.

10. The method according to claim 9, characterized in that, The method further includes: Obtain the network latency fluctuation of the main center for each of the historical decision-making cycles; In response to the network latency fluctuation being greater than a preset fluctuation threshold, the first initial weight is reduced by a fourth preset coefficient during the historical decision period.

11. A primary / backup switching device for a cloud center, characterized in that, The cloud center includes a primary center and a backup center, and the device includes: The status value acquisition module is used to acquire the first detection status value and the second detection status value in the current decision cycle. The first detection status value is the status value generated by the main center through active detection, and the second detection status value is the status value reported by the main center. The weight acquisition module is used to acquire the first weight corresponding to the active detection mode and the second weight corresponding to the passive reporting mode in response to the inconsistency between the first detection state value and the second detection state value. The state value fusion module is used to perform a fusion operation on the first detection state value and the second detection state value based on the first weight and the second weight to obtain the switching confidence level corresponding to the main center; The primary / backup switching module is used to control the switching from the primary center to the backup center based on the switching confidence level.

12. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the master-slave switching method of the cloud center as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the master-slave switching method for the cloud center as described in any one of claims 1 to 10.

14. A computer program product, characterized in that, Includes computer instructions, which are used to cause a computer to execute the master-slave switching method for the cloud center as described in any one of claims 1 to 10.