Lossless primary / backup failover risk control method for isolated vector clusters under real-time power interaction

By collecting and analyzing real-time operating data in real-time power interaction scenarios, adaptively optimizing switching parameters and implementing dynamic lossless switching, the problems of data consistency and risk assessment in primary and backup switching are solved, and the high reliability and security of the power system are achieved.

CN123121963APending Publication Date: 2026-11-17GUANGDONG ELECTRIC POWER COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611154942.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing master-slave switching methods cannot guarantee the consistency of vector data in real-time power interaction scenarios. Static preset switching parameters are difficult to adapt to real-time operating condition fluctuations. The lack of a full-process risk quantification assessment and prevention mechanism may lead to switching anomalies affecting upper-level power services.

Method used

By collecting real-time operation data in real-time power interaction scenarios, a cluster status feature dataset is generated. The switching parameters are analyzed and adaptively optimized using a preset master-slave switching model. Combined with incremental mirror synchronization and dual-channel isolated transmission, dynamic lossless switching is implemented, and risk prevention and control information is generated.

Benefits of technology

It enables lossless primary/backup switching in real-time power interaction scenarios, improving the reliability and security of switching, avoiding data loss or state disorder, and ensuring the continuity of power services and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123121963A_ABST
    Figure CN123121963A_ABST
Patent Text Reader

Abstract

This application relates to a lossless primary / backup switchover risk control method for isolated vector clusters under real-time power interaction. The method includes: collecting real-time operating data of the isolated vector cluster under real-time power interaction scenarios to generate a corresponding cluster state feature dataset; analyzing the cluster state feature dataset based on a preset primary / backup switchover model to determine initial switchover parameters for the primary / backup switchover process; obtaining real-time deviation information between the initial switchover parameters and the actual primary / backup operating states, and adaptively optimizing the initial switchover parameters based on the deviation information to obtain optimized switchover parameters; and performing dynamic lossless switchover processing on the isolated vector cluster based on the optimized switchover parameters to generate risk prevention and control information for the primary / backup switchover process. This method improves the reliability and security of primary / backup switchover under real-time power interaction scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of high availability technology for power information systems, and in particular to a lossless primary / backup switching risk control method for isolated vector clusters under real-time power interaction. Background Technology

[0002] With the advancement of new power system construction, real-time interactions among multiple entities such as power generation, grid, load, and storage are becoming increasingly frequent. Massive amounts of high-dimensional vector data (such as equipment operation characteristic vectors, load forecast vectors, and dispatch decision vectors) need to be stored, retrieved, and synchronized with low latency in isolated vector clusters. To ensure the continuity of power services, isolated vector clusters generally adopt a primary-backup architecture, achieving fault tolerance and load balancing through primary-backup node switching.

[0003] However, existing primary / backup switching methods still have the following shortcomings in real-time power interaction scenarios: First, the consistency of vector data between primary and backup nodes is difficult to guarantee during the switching process, which can easily lead to data loss or state disorder, failing to meet the requirements of lossless operation; Second, the switching parameters are mostly statically preset, making it difficult to dynamically adjust them according to the real-time operating conditions of the cluster, which can easily lead to switching failure when there are fluctuations in node load, state synchronization, and vector data consistency; Third, there is a lack of risk quantification assessment and hierarchical prevention and control mechanisms for the entire switching process, which often affects upper-level power services and causes cascading failures once switching anomalies occur.

[0004] Therefore, there is an urgent need to provide an adaptive switching parameter optimization method that can comprehensively consider node load, state synchronization and vector data consistency, and to build a lossless switching execution mechanism and a hierarchical risk prevention and control mechanism covering the entire process before, during and after the switching, so as to improve the reliability and security of master-slave switching of isolated vector clusters in real-time power interaction scenarios. Summary of the Invention

[0005] Therefore, it is necessary to provide a lossless master-slave switching risk control method for isolated vector clusters under real-time power interaction, which can improve the reliability and security of master-slave switching in real-time power interaction scenarios.

[0006] Firstly, this application provides a lossless primary / backup switching risk control method for isolated vector clusters under real-time power interaction, the method comprising:

[0007] Collect real-time operation data of isolated vector clusters in real-time power interaction scenarios and generate corresponding cluster status feature datasets;

[0008] Based on the preset primary / standby switchover model, the cluster state feature dataset is analyzed to determine the initial switchover parameters for the primary / standby switchover process.

[0009] The initial switching parameters are obtained in real time, and the actual primary / standby operating status is adjusted accordingly to adaptively optimize the initial switching parameters and obtain optimized switching parameters.

[0010] Based on the optimized switching parameters, the isolated vector cluster is dynamically and losslessly switched, generating risk prevention and control information for the primary / standby switching process.

[0011] In one optional embodiment, the step of collecting real-time operational data of the isolated vector cluster under the real-time power interaction scenario and generating a corresponding cluster state feature dataset includes:

[0012] The cluster monitoring nodes collect the master node load index, the backup node status synchronization parameters, and the vector data transmission latency parameters as real-time operating data.

[0013] The real-time running data is preprocessed for time alignment and feature extraction to remove communication jitter interference and extract vector data consistency-related features;

[0014] Based on the extracted features, a cluster state feature dataset is constructed that includes switching response latency, vector data consistency, and the operating status of the isolated vector cluster.

[0015] In one optional embodiment, the step of analyzing the cluster state feature dataset based on a preset primary / standby switchover model to determine the initial switchover parameters for the primary / standby switchover process includes:

[0016] A feasibility analysis of switching is performed on the cluster state feature dataset using a preset primary / standby switching model to identify the state response characteristics of primary and standby nodes and the consistency distribution of vector data.

[0017] Based on the state response characteristics and the consistent distribution of vector data, a multi-objective optimization algorithm is used to generate initial switching parameters;

[0018] If the initial switching parameters meet the preset switching performance constraints, they are used as the initial switching parameters; otherwise, a prompt message indicating that the switching parameters failed to initialize is output.

[0019] In one optional embodiment, the step of obtaining real-time deviation information between the initial switching parameters and the actual primary / standby operating state, and adaptively optimizing the initial switching parameters based on the deviation information to obtain optimized switching parameters, includes:

[0020] Based on the working condition distribution of the isolated vector cluster, a first monitoring point group, a second monitoring point group, and a third monitoring point group are set with the initial switching parameters as the reference. The first monitoring point group corresponds to the node load distribution, the second monitoring point group corresponds to the primary and backup node status synchronization distribution, and the third monitoring point group corresponds to the vector data consistency distribution.

[0021] Calculate the operational deviations between the initial switching parameters and the first, second, and third monitoring point groups, and generate real-time deviation information;

[0022] Based on the real-time deviation information, the initial switching parameters are adaptively optimized by normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing them, and iteratively optimizing the results.

[0023] In one optional embodiment, the adaptive optimization of the initial switching parameters based on the real-time deviation information, using a method of normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, followed by weighted summation and iterative optimization, includes:

[0024] Based on the node load deviation of the first monitoring point group, the load-related component of the initial switching parameter is dynamically adjusted until the node load deviation is balanced.

[0025] After the load deviation is balanced, the synchronization-related component of the switching parameter is adjusted based on the state synchronization deviation of the second monitoring point group until the state synchronization deviation meets the preset balance condition.

[0026] After the state synchronization deviation meets the preset equilibrium condition, the vector consistency correlation component of the switching parameter is adjusted based on the vector data consistency deviation of the third monitoring point group until the vector data consistency deviation meets the preset convergence condition, and the optimized switching parameter is determined.

[0027] In one optional embodiment, the step of performing dynamic lossless switching processing on the isolated vector cluster based on the optimized switching parameters to generate risk prevention and control information for the primary / standby switching process includes:

[0028] Based on the node load change rate, state synchronization deviation change rate, and vector data consistency change rate in the isolated vector cluster operating condition distribution, the operating conditions of the primary / standby switchover process are divided into multiple dynamic segments.

[0029] Real-time acquisition of state fluctuation data for each dynamic segment, and dynamic adjustment of switching processing parameters for the isolation vector cluster based on the differences in state fluctuation data between segments using a fuzzy control algorithm;

[0030] Based on the adjusted processing parameters, risk control indicators are calculated based on node load variance, state synchronization accuracy volatility, and vector data consistency deviation, and risk control information is generated.

[0031] In one optional embodiment, the state fluctuation data includes the node load of the isolated vector cluster, state synchronization accuracy, and vector data consistency; the generation of risk prevention and control information includes:

[0032] The node load, state synchronization accuracy, and vector data consistency of each dynamic segment are statistically analyzed, and the node load variance, state synchronization accuracy volatility, and vector data consistency deviation between each segment are calculated.

[0033] If the variance, volatility, and deviation are all within the preset safety range, then the risk control information during the primary / backup switching process is controllable.

[0034] If any of the variance, volatility, or deviation exceeds the preset safety range, the risk control information indicates a risk during the master / slave switchover process, and triggers a tiered risk control instruction.

[0035] In one optional embodiment, the feasibility analysis of the cluster state feature dataset using a preset master-slave switchover model includes:

[0036] Offline training is performed on the preset master-slave switching model based on historical switching sample data to obtain a state response feature library and a vector data consistency benchmark library.

[0037] The cluster status feature dataset is matched and compared with the feature library and the benchmark library to generate a switching feasibility assessment value;

[0038] When the switching feasibility assessment value is lower than a preset threshold, the switching parameter re-initialization process is triggered.

[0039] In one optional embodiment, the dynamic lossless switching process for the isolated vector cluster includes:

[0040] Before the switchover, incremental mirroring synchronization of the primary node vector data is performed, and sparse consistency verification is used to confirm that the primary and backup node vector data are consistent.

[0041] During the switchover, a dual-channel isolation transmission mechanism is used to synchronize the vector operation status snapshot of the master node to the standby node;

[0042] After the switchover, the backup node is checked for continued status based on the snapshot of the vector's running status. If the checkover passes, the lossless switchover is confirmed to be successful; otherwise, the switchover exception handling process is triggered.

[0043] In one alternative embodiment, the method further includes:

[0044] When a graded risk control instruction is triggered during the primary / standby switchover process, the risk level is classified into general risk, major risk, and severe risk according to the degree of risk exceeding the limit.

[0045] For general risks, the switching processing parameters are dynamically adjusted and the current switching process is maintained; for significant risks, the switching process is paused and the switching parameters are re-optimized; for severe risks, the switching rollback command is executed immediately, and the isolated vector cluster is restored to its stable operating state before the switch based on the vector running state snapshot.

[0046] Record risk warning information and switchover rollback results to generate traceability information for primary / standby switchover risk prevention and control.

[0047] The aforementioned risk control method for lossless master-slave switching of isolated vector clusters under real-time power interaction collects real-time operating data of the isolated vector cluster and constructs a feature dataset containing vector data consistency. It then uses a three-stage adaptive optimization of switching parameters based on a normalized weighted deviation formula for three sets of monitoring points. This overcomes the problems of statically preset switching parameters and difficulty in adapting to real-time operating condition fluctuations, significantly improving the environmental adaptability of master-slave switching. Through a full-process lossless switching execution mechanism combining incremental mirror synchronization, dual-channel isolated transmission, and status continuation verification, it effectively ensures the consistency of vector data between master and backup nodes, solving the problems of data loss or status disorder during switching and truly achieving lossless switching of the vector cluster. Furthermore, through risk quantification assessment based on node load variance, status synchronization accuracy volatility, and vector data consistency deviation, as well as differentiated prevention and control instructions for general, significant, and severe risks, it compensates for the lack of a full-process risk prevention and control mechanism in existing methods, avoiding the chain transmission of switching anomalies to upper-level power services, thereby comprehensively improving the reliability and security of master-slave switching of isolated vector clusters in real-time power interaction scenarios. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart of the risk control process for lossless primary / backup switching of an isolated vector cluster under real-time power interaction in one embodiment.

[0050] Figure 2 This is a flowchart of a method for determining initial switching parameters during a primary / standby switchover process in one embodiment.

[0051] Figure 3 This is a flowchart illustrating a method for managing risk control information during a primary / standby switchover process in one embodiment.

[0052] Figure 4This is a structural block diagram of a lossless primary / backup switching risk control device for isolated vector clusters under real-time power interaction in one embodiment.

[0053] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0056] like Figure 1 As shown, this embodiment achieves precise control over the entire process of primary / backup switching of isolated vector clusters in real-time power interaction scenarios through a four-stage process of acquisition, analysis, optimization, and processing: multi-dimensional acquisition of real-time operational data provides a complete data foundation for switching decisions; model-based initial switching parameter generation ensures switching feasibility; real-time deviation-driven adaptive optimization improves the adaptability of parameters to dynamic operating conditions; and dynamic lossless switching processing and risk prevention information generation ensure the losslessness of vector data and the continuity of upper-layer power services during the switching process. In an exemplary embodiment, such as... Figure 1 As shown, a lossless primary / standby switchover risk control method for isolated vector clusters under real-time power interaction is provided. The method is applied to a server for illustration, including:

[0057] S102: Collect real-time operating data of isolated vector clusters in real-time power interaction scenarios and generate corresponding cluster status feature datasets.

[0058] In new power systems, isolated vector clusters are typically deployed at dispatch master stations, municipal branch centers, or edge computing nodes to store high-dimensional data such as equipment operation characteristic vectors, load forecast vectors, and dispatch decision vectors. Considering the security isolation requirements between the production control area and the management information area, cluster monitoring agents deployed at primary and backup nodes collect load indicators such as CPU utilization, memory usage, and vector index read / write throughput of the primary node, as well as synchronization parameters such as the backup node's status heartbeat and log sequence number, at intervals of, for example, 10ms to 100ms, through unidirectional isolation devices or secure data exchange platforms. They also synchronously record the end-to-end latency of vector data transmission between the primary and backup nodes. The monitoring agent performs time-series alignment of the collected data based on the Precise Time Protocol (PTP) and uses sliding window filtering (window length selectable from 50ms to 200ms) to eliminate communication jitter, extracting vector data consistency characteristics such as the primary and backup node vector hash check matching rate and incremental synchronization queue depth. This leads to the construction of a feature dataset covering three dimensions: handover response latency, vector data consistency, and cluster operating status. This provides a complete data foundation for subsequent handover feasibility analysis, ensuring that a globally reliable state view can be formed even in scenarios involving cross-isolation boundaries.

[0059] S104: Based on the preset primary / standby switchover model, analyze the cluster state characteristic dataset to determine the initial switchover parameters for the primary / standby switchover process.

[0060] The pre-defined primary / standby switchover model can employ machine learning models such as random forests, gradient boosting trees, or multilayer perceptrons. During the offline phase, it is trained using historical primary / standby switchover sample data accumulated by the power dispatching system to learn the mapping relationship between cluster state characteristics and switchover performance. During online operation, the aforementioned feature dataset is input into the model, which outputs primary / standby node state response characteristic indicators and vector data consistency distribution. Based on this, multi-objective optimization algorithms, such as the NSGA-II non-dominated sorting genetic algorithm, are used to seek the Pareto optimal solution among switchover latency, data consistency, and resource consumption, generating initial switchover parameters including the switchover trigger threshold, synchronization window size, and heartbeat detection cycle. It should be noted that the initial switchover parameters must be validated against pre-defined switchover performance constraints, including a switchover latency upper limit (e.g., ≤200ms) and a vector data consistency lower limit (e.g., ≥99.9%). If the validation passes, it serves as the benchmark for subsequent optimization; otherwise, a message indicating parameter initialization failure is output, thus preventing unqualified parameters from entering the actual switchover process and ensuring the reliability of the switchover decision source.

[0061] S106: Obtain the real-time deviation information between the initial switching parameters and the actual primary / standby operating status, and adaptively optimize the initial switching parameters based on the deviation information to obtain optimized switching parameters.

[0062] Due to dynamic factors such as power load fluctuations and network communication jitter, deviations between initial switching parameters and actual operating conditions are inevitable. This step compares the initial switching parameters with the real-time operating conditions reported by the primary and backup nodes to calculate multi-dimensional real-time deviation information, including node load deviation, state synchronization deviation, and vector data consistency deviation. It then dynamically adjusts the switching parameters at the component level: increasing the synchronization window when the load deviation is large, shortening the heartbeat detection cycle when the state synchronization deviation is large, and initiating an incremental synchronization acceleration mechanism when the vector data consistency deviation is large, ensuring that the switching parameters always closely match the actual operating conditions of the current cluster. Preferably, the adaptive optimization employs a closed-loop feedback mechanism, recalculating the deviations after each round of adjustment. The convergence criterion is that the normalized value of each type of deviation is less than a preset threshold (e.g., 5%) and remains stable for multiple consecutive sampling periods (e.g., 3 periods). If this condition is not met, iterative iteration continues until optimized switching parameters capable of supporting lossless switching are obtained. This effectively solves the problem that traditional static preset parameters are difficult to adapt to the dynamic operating conditions of real-time power interaction scenarios.

[0063] S108: Based on optimized switching parameters, perform dynamic lossless switching processing on isolated vector clusters and generate risk prevention and control information for the primary / standby switching process.

[0064] After obtaining optimized switching parameters, the cluster switching controller coordinates the primary and backup nodes to complete the switching process. This process covers three stages: pre-switching vector data pre-synchronization, state takeover during switching, and post-switching service continuation, ensuring that real-time power interaction services are not subject to perceptible interruptions or data loss. During this process, the system collects state fluctuation data in real time at each stage. A fuzzy control algorithm calculates risk control indicators based on node load variance, state synchronization accuracy fluctuation rate, and vector data consistency deviation. The fuzzy control algorithm uses predefined membership functions and a fuzzy rule base to map risk levels. Typically, if the load variance is large and the consistency deviation is high, the risk level is determined to be severe. It is worth noting that risk control information can be used as real-time feedback for dynamic parameter fine-tuning during the current switching process, and also as log records for post-event traceability. When the risk exceeds the preset safety range, a tiered risk control instruction is further triggered, thereby preventing the transmission and spread of primary / backup switching anomalies to higher-level scheduling, protection, metering, and other power services, ensuring the overall stable operation of the new power system.

[0065] This embodiment provides a complete data foundation for switching decisions through multi-dimensional acquisition of real-time operational data, overcoming the limitations of existing methods that rely on static configuration or single-dimensional information. It generates initial switching parameters by pre-setting a primary / backup switching model, avoiding the poor parameter adaptability issues caused by manual experience-based configuration and ensuring the scientific nature of switching decisions from the outset. Through real-time deviation-driven adaptive optimization, the switching parameters dynamically adapt to real-time operating conditions such as power load fluctuations and network communication jitter, solving the problem of existing static pre-set parameters being unable to adapt to dynamic conditions and significantly improving the environmental adaptability of the switching process. By synchronously generating dynamic lossless switching processing and risk prevention information, it achieves quantified risk perception throughout the switching process while ensuring lossless vector data flow, preventing the chain reaction of switching anomalies to upper-level scheduling, protection, metering, and other power services. This comprehensively improves the reliability, adaptability, and security of primary / backup switching in isolated vector clusters under real-time power interaction scenarios.

[0066] In some embodiments, a three-stage process—signal acquisition, preprocessing and feature extraction, and feature dataset construction—is used to refine the real-time operating data of the isolated vector cluster. Synchronous acquisition of multi-source signals provides the raw data foundation for switching decisions; time-series alignment preprocessing and jitter removal ensure data quality; and feature extraction oriented towards vector data consistency makes subsequent analysis more targeted, thereby significantly improving the reliability and usability of the cluster status feature dataset. Specifically, the process of acquiring real-time operating data of the isolated vector cluster in a real-time power interaction scenario and generating a corresponding cluster status feature dataset includes: collecting master node load indicators, backup node status synchronization parameters, and vector data transmission delay parameters as real-time operating data through cluster monitoring nodes; performing time-series alignment preprocessing and feature extraction on the real-time operating data, removing communication jitter interference, and extracting vector data consistency-related features; and constructing a cluster status feature dataset based on the extracted features, including switching response delay, vector data consistency, and the operating status of the isolated vector cluster.

[0067] For example, in real-time power interaction scenarios, cluster monitoring nodes are typically deployed as independent, lightweight agent processes on the host machines of primary and backup nodes or near edge gateways, simultaneously collecting three types of signals at configurable intervals, such as 10ms to 100ms. The primary node load metrics include CPU utilization, memory usage, disk I / O throughput, and vector index read / write TPS, reflecting the primary node's real-time carrying capacity. Backup node status synchronization parameters include status heartbeat sequence number, Raft or Paxos consensus protocol log offset, and incremental synchronization queue depth, reflecting the backup node's adherence to the primary node's status. Vector data transmission latency parameters are measured by embedding timestamp probes between primary and backup nodes to determine the end-to-end round-trip time (RTT). Considering the secondary security requirements of power monitoring systems, data collection across production control zones and management information zones is transmitted via unidirectional isolation devices or secure data exchange platforms, thereby achieving multi-source data aggregation without compromising isolation boundaries and providing complete raw data for subsequent preprocessing.

[0068] Considering that primary and backup nodes may be deployed across data centers or regions, and that clocks from different data sources may have millisecond-level offsets, timing alignment preprocessing is based on Precision Time Protocol (PTP) or Network Time Protocol (NTP) to uniformly map all signals to the same time base, ensuring strict alignment of multi-source data at the same sampling moment. Building upon this, a sliding window filter (window length selectable from 50ms to 200ms) combined with a three-standard-deviation criterion is used to eliminate abnormal sampling points caused by network jitter or momentary packet loss, smoothing the data curve. Furthermore, feature extraction focuses on the vector data consistency dimension, calculating quantitative indicators such as the primary / backup node vector hash verification matching rate, incremental synchronization queue backlog depth, and vector update lag cycles, supplemented by statistical features of basic dimensions such as load and synchronization, including mean, variance, and rate of change, to form a structured feature vector, providing high-quality input for subsequent switchover feasibility analysis.

[0069] The constructed cluster status feature dataset is organized in a structured manner, using timestamps as the primary key, and covers feature fields across three dimensions: Switching response latency (including predicted switching time, heartbeat response latency, and state takeover latency); vector data consistency (including vector hash matching rate, incremental synchronization lag, and sparse vector verification deviation); and isolated vector cluster operational status (including primary / standby node health scores, load balancing, and network reachability metrics). Notably, the feature dataset can be cached locally to support real-time analysis, or, after anonymization, fed back to the offline training library for continuous iteration of the preset primary / standby switching model. This resulting feature dataset combines real-time performance, completeness, and traceability, laying a solid data foundation for lossless primary / standby switching decisions in isolated vector clusters under real-time power interaction scenarios.

[0070] like Figure 2As shown, in some embodiments, a three-stage process of switching feasibility analysis—multi-objective optimization generation—constraint verification is used to accurately generate initial switching parameters for the master-slave switchover process: feasibility analysis based on a preset master-slave switchover model uncovers key decision-making criteria in the cluster state characteristics; the multi-objective optimization algorithm seeks the optimal balance among multiple mutually constraining indicators; and the constraint verification mechanism effectively intercepts unqualified parameters, ensuring the scientific nature and reliability of the switchover decision from the source. Specifically, based on the preset master-slave switchover model, the cluster state characteristic dataset is analyzed to determine the initial switching parameters for the master-slave switchover process. This includes: performing a switchover feasibility analysis on the cluster state characteristic dataset using the preset master-slave switchover model to identify the state response characteristics and vector data consistency distribution of the master and slave nodes; generating initial switching parameters using a multi-objective optimization algorithm based on the state response characteristics and vector data consistency distribution; using the initial switching parameters when they meet preset switching performance constraints; otherwise, outputting a message indicating that the switching parameter initialization failed.

[0071] The pre-defined primary / standby switchover model can employ machine learning models such as Random Forest, XGBoost, or Multilayer Perceptron (MLP). During offline training, it is trained using historical primary / standby switchover sample data accumulated in the power dispatching system. This sample data covers various typical scenarios, including normal switchover, abnormal switchover, and rollback switchover, enabling the model to learn the mapping relationship between cluster state characteristics and switchover performance. During online runtime, the cluster state characteristic dataset is fed into the model as an input vector. The model output includes two key types of information: first, the state response characteristics of the primary and standby nodes, reflected in quantitative indicators such as the primary node state freeze latency after switchover triggering, the standby node state takeover latency, and the slope of the heartbeat response curve; second, the vector data consistency distribution, reflected in histograms of hash matching rates for different vector shards and the accumulation status of incremental synchronization queues at different time scales. This provides a comprehensive characterization of the current cluster switchover feasibility, offering a reliable decision-making basis for subsequent parameter generation.

[0072] Considering that master-slave switching requires balancing multiple mutually constraining objectives such as switching latency, vector data consistency, and node resource consumption, mature methods such as the NSGA-II non-dominated sorting genetic algorithm or the MOPSO multi-objective particle swarm optimization algorithm can be used for multi-objective optimization. Specifically, the aforementioned state response characteristics and vector data consistency distribution are used as input constraints, and adjustable parameters such as the switching trigger threshold, synchronization window size, heartbeat detection cycle, and incremental synchronization concurrency are used as decision variables. The optimization objectives are to minimize predicted switching latency, maximize vector data consistency, and minimize resource consumption. After several generations of population evolution or particle iteration, a Pareto optimal solution set is obtained. Preferably, a set of solutions is selected from the Pareto solution set based on the priority weights of the real-time power interaction scenario (e.g., assigning higher weight to the consistency objective in scenarios prioritizing consistency). These initial switching parameters serve as the baseline values ​​for subsequent adaptive optimization.

[0073] To prevent unqualified parameters from entering the actual switching process, the system performs constraint verification on the aforementioned initial switching parameters. Preset switching performance constraints include, but are not limited to: a maximum switching latency (e.g., ≤200ms to match the hard requirements of real-time interaction in power monitoring systems), a minimum vector data consistency limit (e.g., ≥99.9%), a maximum resource utilization limit for primary and backup nodes (e.g., CPU utilization ≤80%), and a reasonable range for heartbeat detection cycles (e.g., 10ms to 50ms). If the verification passes, the set of parameters is confirmed as the initial switching parameters and formally used as the input benchmark for the next stage of adaptive optimization. If any constraint fails the verification, the system outputs a switching parameter initialization failure message to the operation and maintenance management platform, reminding operation and maintenance personnel to check whether the input feature data is abnormal, whether the model needs to be retrained, or whether the optimization algorithm weights need to be reconfigured. This prevents unqualified parameters from causing switching anomalies and ensures the reliability of the primary / backup switching decision from the outset.

[0074] In some embodiments, a three-stage process of monitoring point group setting—real-time deviation calculation—formulaic adaptive optimization is used to achieve multi-dimensional fine optimization of the initial switching parameters: the differentiated settings of the three sets of monitoring points enable the switching parameters to respond simultaneously to the operational fluctuations of the three key dimensions of load, synchronization and vector consistency; real-time deviation calculation ensures the real-time nature of the optimization drive; and the normalized weighted formula achieves quantitative balance and unified adjustment among multi-dimensional deviations, fundamentally improving the adaptability of the switching parameters to dynamic operating conditions. The process involves acquiring real-time deviation information between the initial switching parameters and the actual primary / standby operating status, and adaptively optimizing the initial switching parameters based on this deviation information to obtain optimized switching parameters. This includes: setting up a first monitoring point group, a second monitoring point group, and a third monitoring point group based on the initial switching parameters, with the first monitoring point group corresponding to the node load distribution, the second monitoring point group corresponding to the primary / standby node status synchronization distribution, and the third monitoring point group corresponding to the vector data consistency distribution; calculating the operating deviation between the initial switching parameters and the first, second, and third monitoring point groups to generate real-time deviation information; and then, based on the real-time deviation information, performing weighted summation and iterative optimization on the initial switching parameters by normalizing the node load deviation, status synchronization deviation, and vector data consistency deviation of each monitoring point to obtain optimized switching parameters.

[0075] For each monitoring point, the system subtracts the measured operating value at that point from the expected value corresponding to the initial switching parameters to obtain the instantaneous deviation at that point. Then, combining the sampling weights and confidence levels of each monitoring point, it aggregates these deviations to form three types of multi-dimensional real-time deviation information: node load deviation, state synchronization deviation, and vector data consistency deviation. Preferably, transient spike data is removed using a three-standard-deviation criterion to avoid abnormal sampling misleading the optimization direction.

[0076] Based on real-time deviation information, the initial switching parameters are adaptively optimized by normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing the results, and iteratively optimizing the optimization.

[0077]

[0078] In the formula, To optimize the switching parameters, i.e., the target parameter values ​​output in this iteration; These are the initial switching parameters, i.e., the baseline parameters generated based on the preset primary / standby switching model; These represent the node load deviation, state synchronization deviation, and vector data consistency deviation at the i-th monitoring point, respectively. These are reference values ​​for the corresponding dimensions, used to normalize the three types of deviations with different dimensions to the dimensionless interval, so that they can be weighted and summed in the same formula; These are the weighting coefficients for the three types of bias, and they satisfy... It can be flexibly configured to adjust the sensitivity of different dimensions according to the real-time power interaction scenario. For example, in scenarios sensitive to consistency, it can be configured to adjust the sensitivity of different dimensions. Take 0.5, and Take 0.25 for each; The adjustment factor, with a value between 0.1 and 0.5, is used to control the step size of a single iteration, avoiding parameter oscillations caused by excessive adjustment in a single round; N is the total number of monitoring points. The mean value is obtained by summing the normalized weighted deviations of the N monitoring points, so that the optimization direction reflects the overall trend of the cluster rather than local noise.

[0079] In the specific operation process, taking the parameter optimization of a single switch as an example, the system first collects the instantaneous deviations of N monitoring points, substitutes them into the normalization term to calculate the relative amounts of the three types of deviations, and then multiplies them by weights and sums them to obtain the comprehensive deviation contribution of each monitoring point; the sum of the contributions of all monitoring points is divided by N to obtain the average weighted deviation; finally, it is multiplied by the adjustment factor. And superimposed on Up, that is, to obtain the current round. In real-time power interaction scenarios, this formula can simultaneously drive the coordinated update of multiple switching parameter components such as synchronization window, heartbeat cycle, and incremental synchronization concurrency, ensuring that the parameters always closely match the actual operating conditions of the cluster.

[0080] After each round of optimization is completed, the system will As the next round Substitute the values ​​back into the input to form a closed-loop iteration. The convergence criterion is that the normalized values ​​of the three types of deviations are all less than a preset threshold (e.g., 5%) and remain stable for multiple consecutive sampling periods. If the condition is not met, continue iterating until the switching parameters finally converge to an optimized value that can support lossless switching.

[0081] In some embodiments, a three-stage progressive optimization process—load component adjustment, synchronization component adjustment, and vector consistency component adjustment—is used to achieve refined, hierarchical adjustment of switching parameters. The process converges step-by-step according to the priority of the impact of load, state synchronization, and vector data consistency, avoiding mutual interference during multi-dimensional component synchronization adjustments and ensuring the stable solidification of the optimization effect of each dimension, thereby significantly improving the convergence speed and stability of the optimized switching parameters. Specifically, based on real-time deviation information, the initial switching parameters are adaptively optimized by normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing the results iteratively. This includes: dynamically adjusting the load-related components of the initial switching parameters based on the node load deviation of the first monitoring point group until the node load deviation is balanced; after the load deviation is balanced, adjusting the synchronization-related components of the switching parameters based on the state synchronization deviation of the second monitoring point group until the state synchronization deviation meets a preset balance condition; and after the state synchronization deviation meets the preset balance condition, adjusting the vector consistency-related components of the switching parameters based on the vector data consistency deviation of the third monitoring point group until the vector data consistency deviation meets a preset convergence condition, thus determining the optimized switching parameters.

[0082] Considering that node load is the most fundamental dimension affecting the feasibility of primary / standby failover, the system first uses node load deviation as the driving force to prioritize adjustments to load-related components in the initial failover parameters, such as synchronization window size, incremental synchronization concurrency, and batch commit granularity. Specifically, the adjustment strategy is as follows: when the primary node load deviation is high, the synchronization window is appropriately increased and the concurrency is reduced to alleviate the pressure on the primary node; when the standby node load deviation is high, the amount of data synchronized in a single batch is reduced to match the standby node's takeover capacity with the actual load. Preferably, the standard deviation of the normalized load deviation of each collection point in the first monitoring point group is less than a preset threshold (e.g., 3%) as the balancing criterion. If balancing is not achieved, iterative adjustments are continuously made to avoid failover due to load imbalance, thus laying a stable foundation for subsequent dimension adjustments.

[0083] With the load components converged, the system enters the second phase, adjusting synchronization-related components driven by state synchronization deviation. These components include the heartbeat detection period, consensus protocol log synchronization window, and state takeover timeout threshold. Specifically, if the backup node lags significantly in following the master node's state, the heartbeat detection period is shortened and the log synchronization window is expanded to accelerate state alignment. If synchronization jitter is severe, the takeover timeout threshold is appropriately extended to avoid erroneous failover. Preset balancing conditions are set, for example, that the normalized state synchronization deviation is less than 4% and remains stable for three consecutive sampling periods. Only after this condition is met can the system proceed to the next phase, ensuring that the adjustment effect of the synchronization dimension is not compromised by subsequent operations.

[0084] After completing the first two phases of adjustments, the system fine-tunes the core consistency dimension of the vector cluster. Vector consistency deviation drives the updates of vector consistency-related components, including sparse vector verification granularity, incremental mirror synchronization frequency, and hash verification sampling ratio. For example, when the vector hash matching rate between primary and backup nodes declines, the hash verification sampling ratio is increased and the incremental mirror synchronization frequency is shortened. When the sparse vector alignment deviation exceeds expectations, the verification granularity is refined, enabling rapid identification and repair of local inconsistencies. Preset convergence conditions are set, for example, a normalized vector data consistency deviation of less than 2% and a vector hash matching rate of no less than 99.9%. Once these conditions are met, the results of this round of adjustments are output as optimized switching parameters. It is worth noting that the essence of this three-stage progressive optimization lies in decoupling the multi-dimensional coupled problem into sequentially controllable sub-problems. This retains the normalized weighted formula's grasp of the global trend while avoiding inter-dimensional tug-of-war through phased solidification, enabling the optimized switching parameters to converge stably under the highly dynamic conditions of real-time power interaction scenarios.

[0085] like Figure 3 As shown, this embodiment achieves dynamic and lossless processing of the primary / standby switchover process through a three-stage process: dynamic segmentation of operating conditions, adjustment of fuzzy control parameters, and calculation of risk control indicators. The segmentation of operating conditions based on multidimensional rate of change enables the switchover process to have self-sensing capability of operating conditions. The introduction of fuzzy control algorithm enables the processing parameters to be nonlinearly self-adjusted according to the differences of each segment. The calculation of comprehensive risk control indicators transforms the operational fluctuations of the switchover process into quantifiable and comparable risk signals, thereby significantly improving the robustness and controllability of the switchover process. Specifically, based on optimized switching parameters, dynamic lossless switching processing is performed on the isolated vector cluster to generate risk prevention and control information for the master-slave switching process. This includes: dividing the operating conditions of the master-slave switching process into multiple dynamic segments according to the node load change rate, state synchronization deviation change rate, and vector data consistency change rate in the operating condition distribution of the isolated vector cluster; collecting state fluctuation data of each dynamic segment in real time, and dynamically adjusting the switching processing parameters of the isolated vector cluster using a fuzzy control algorithm based on the differences in state fluctuation data between segments; and calculating risk prevention and control indicators based on node load variance, state synchronization accuracy fluctuation rate, and vector data consistency deviation according to the adjusted processing parameters, thereby generating risk prevention and control information.

[0086] The handover process is not uniform; the load impact, synchronization pressure, and vector update intensity vary significantly across different stages. In this step, the system continuously calculates three operational indicators: node load change rate, state synchronization deviation change rate, and vector data consistency change rate. The joint abrupt change point of these three indicators serves as the segment boundary, dividing the entire handover process into multiple dynamic segments, including the handover preparation segment, state takeover segment, vector synchronization segment, and service continuation segment. Specific segmentation methods can employ a sliding window-based CUSUM cumulative sum detection algorithm or a Bayesian change point detection algorithm to identify abrupt change points. For example, when the weighted sum of the three change rates exceeds twice the baseline standard deviation at a certain moment and continues to deviate for several consecutive sampling periods, it is determined to be a segment boundary. This dynamic segmentation allows subsequent processing parameter adjustments to be tailored to the characteristics of different stages, rather than using a uniform processing strategy, thus avoiding processing granularity mismatch issues during critical handover stages.

[0087] Within each dynamic segment, the system collects state fluctuation data in real time at periods ranging from 10ms to 50ms. The collected data includes multi-dimensional quantitative indicators such as node load, state synchronization accuracy, and vector data consistency. Based on the statistical differences in the mean, variance, and trends of the state fluctuation data between segments, a fuzzy control algorithm is used to nonlinearly adjust the switching processing parameters, including synchronization concurrency, heartbeat response threshold, and incremental mirror synchronization frequency. The fuzzy control algorithm maps the quantitative indicators to low, medium, and high-level fuzzy linguistic variables using predefined membership functions and performs rule reasoning through a fuzzy rule base. A typical rule, such as adjusting the synchronization concurrency to medium-low if load fluctuation is high and consistency fluctuation is medium, outputs the specific parameter adjustment amount after defuzzification upon rule triggering. Notably, compared to traditional PID control, fuzzy control is more adaptable to nonlinear and strongly coupled operating conditions in real-time power interaction scenarios, enabling the switching processing parameters to maintain a stable response when operating conditions change rapidly.

[0088] After the switching parameters are adjusted, the system further quantifies and assesses the operational risks of the switching process. Specifically, the variance of the node load sequence within each dynamic segment is calculated to reflect the severity of load fluctuations; the volatility of the state synchronization accuracy sequence is calculated to reflect synchronization stability; and the deviation of the vector data consistency sequence is calculated to reflect the degree to which vector data consistency deviates from the benchmark. These three indicators are normalized and then weighted and fused according to preset weights (e.g., load variance weight 0.3, state synchronization accuracy volatility weight 0.3, and vector data consistency deviation weight 0.4, which can be adjusted according to scenario sensitivity) to obtain a comprehensive risk control index. When the comprehensive index is within a preset safety range, risk control information indicating controllable risk is generated; when the index exceeds the safety range, risk control information is generated with an over-limit dimension identifier, serving as the criterion for triggering subsequent tiered risk control commands, thereby achieving closed-loop risk management throughout the entire primary / standby switching process.

[0089] In some embodiments, by statistically calculating the fluctuation data of each dynamic segment and jointly judging the three indicators, the risk of the switching process can be accurately identified and graded, so that the generation of risk prevention and control information has a clear quantitative basis.

[0090] The status fluctuation data includes the node load, status synchronization accuracy, and vector data consistency of the isolated vector cluster. Risk control information is generated, including: statistical analysis of the node load, status synchronization accuracy, and vector data consistency of each dynamic segment; calculation of the node load variance, status synchronization accuracy volatility, and vector data consistency deviation between segments; if the variance, volatility, and deviation are all within a preset safety range, the risk control information indicates that the primary / backup switchover process is controllable; if any of the variance, volatility, or deviation exceeds a preset safety range, the risk control information indicates that the primary / backup switchover process is at risk, and triggers a tiered risk control instruction.

[0091] During each dynamic segment of the handover process, the system continuously collects state fluctuation data with sampling periods ranging from 10ms to 50ms. Node load is reflected as a normalized composite value of CPU utilization, memory usage, and vector index read / write TPS, etc. State synchronization accuracy is reflected as the accuracy with which the backup node follows the master node's state, such as consensus protocol log matching rate and heartbeat response consistency rate. Vector data consistency is reflected as a composite value of master-backup node vector hash matching rate, sparse vector alignment consistency rate, and incremental synchronization queue residual depth, etc. Statistically, the system calculates the variance of the node load sequence collected in each segment to quantify the degree of load jitter; it calculates the volatility of the state synchronization accuracy sequence, for example, using the ratio of the sequence standard deviation to the mean to characterize synchronization stability; and it calculates the deviation of the vector data consistency sequence, for example, using the normalized absolute difference between the measured consistency and the benchmark consistency to characterize the degree of consistency deviation. These three indicators characterize the operational fluctuations of the handover process from different dimensions, collectively constituting the quantitative input for risk assessment.

[0092] The preset safety range is set based on the reliability requirements of real-time power interaction scenarios. For example, the node load variance should not exceed 0.05, the state synchronization accuracy fluctuation rate should not exceed 3%, and the vector data consistency deviation should not exceed 2%. Specific thresholds can be statistically calibrated based on historical switching sample data. When all three indicators fall within their respective safety ranges, it indicates that the load, synchronization, and consistency dimensions of the current switching process are all in a stable operating state. Based on this, the system generates risk control information that is manageable, and the switching process continues to proceed according to the predetermined optimized switching parameters without additional intervention.

[0093] If any of the three indicators exceeds the corresponding safety range, the system determines that the handover process poses a risk and generates corresponding risk control information. This information includes an identifier of the exceeding dimension and a quantified value of the degree of exceeding the limit. For example, if the vector data consistency deviation exceeds the limit, the measured value is 3.5%, and the exceedance is 75%. Preferably, the system uses the product of the number of exceeding dimensions and the degree of exceeding the limit as a comprehensive risk measure, serving as the trigger criterion for subsequent tiered risk control instructions. When the comprehensive measure is small, a lighter approach is preferred; when the comprehensive measure is large, a stronger intervention approach is preferred, thus avoiding resource waste or risk spread caused by a one-size-fits-all response. It is worth noting that the joint judgment mechanism of the three indicators ensures that risk identification covers the core operational dimensions of the handover process. Any anomaly in any dimension can be captured in a timely manner, effectively preventing handover failures caused by blind spots in a single dimension, and laying the foundation for the accurate triggering of subsequent tiered risk control instructions.

[0094] In some embodiments, a three-stage process of offline model training, feature matching and comparison, and feasibility assessment feedback is used to enable the preset master-slave switchover model to have the ability to accurately assess the feasibility of switching based on the current cluster status, thus ensuring the scientific nature of the initial switchover parameters from the source.

[0095] The process of performing a switchover feasibility analysis on the cluster state feature dataset using a preset master-slave switchover model includes: training the preset master-slave switchover model offline based on historical switchover sample data to obtain a state response feature library and a vector data consistency benchmark library; matching and comparing the cluster state feature dataset with the feature library and the benchmark library to generate a switchover feasibility assessment value; and triggering a switchover parameter re-initialization process when the switchover feasibility assessment value is lower than a preset threshold.

[0096] Historical handover sample data is derived from the master-slave handover logs accumulated by the power dispatching system during long-term operation. The sample types cover typical scenarios such as normal handover, abnormal handover, and rollback handover. Each sample includes cluster state characteristics before and after the handover, handover execution results, and handover performance indicators. During the offline training phase, the system uses machine learning models such as Random Forest, XGBoost, or Multilayer Perceptron (MLP) to learn from the sample data. The model input is a cluster state feature vector, and the output is master-slave node state response characteristic indicators and vector data consistency distribution. After multiple rounds of training and cross-validation, feature patterns with significant discriminative power are extracted from the model and archived separately, forming a state response feature library and a vector data consistency benchmark library. The state response feature library stores response characteristic templates such as master-slave node state takeover latency, heartbeat response curves, and consensus synchronization rates under different operating conditions. The vector data consistency benchmark library stores consistency benchmark templates such as master-slave node vector hash matching rate and sparse vector comparison consistency rate under different load intensities. Both libraries are periodically and incrementally updated as new samples accumulate, ensuring the model's adaptability to the latest operating conditions.

[0097] During online operation, the system calculates the similarity between the currently collected cluster state feature dataset and templates in the state response feature library and vector data consistency benchmark library. Similarity calculation can employ methods such as cosine similarity, Euclidean distance, or Dynamic Time Warping (DTW). Each matching result is weighted and weighted to obtain a comprehensive evaluation value reflecting the feasibility of the current cluster switchover, for example, with the value range normalized to 0 to 1. Specifically, samples with high matching scores are considered to have higher evaluation values ​​if most correspond to normal switchover samples, and lower evaluation values ​​if most correspond to abnormal or rollback samples. This allows for a quantitative assessment of the current switchover feasibility, providing a reliable basis for subsequent switchover parameter generation and decision-making.

[0098] The preset threshold is set according to the reliability requirements of the real-time power interaction scenario, for example, 0.7. When the switching feasibility assessment value is lower than this threshold, it indicates that the current cluster state deviates significantly from historical normal switching samples, and directly executing the switch carries a high risk of anomalies. Based on this, the system triggers a switching parameter re-initialization process: first, the cluster state feature dataset is re-collected to eliminate the influence of transient disturbances; if the assessment value is still lower than the threshold after re-collection, the system prompts the operation and maintenance personnel to check whether the model training data needs to be expanded or whether the weights of the multi-objective optimization algorithm need to be reconfigured, thereby preventing unreliable initial switching parameters from entering the actual switching process.

[0099] In some embodiments, a three-stage timing connection is achieved—incremental mirroring synchronization before switching, dual-channel isolated transmission during switching, and state continuation verification after switching—to realize lossless vector data transfer throughout the primary-backup switching process, ensuring the reliable achievement of the lossless switching goal from a mechanism perspective. Specifically, the dynamic lossless switching process for the isolated vector cluster includes: before switching, incremental mirroring synchronization of the primary node's vector data is performed, and sparse consistency verification confirms the consistency of the primary and backup node vector data; during switching, a dual-channel isolated transmission mechanism is used to synchronize the primary node's vector running state snapshot to the backup node; after switching, state continuation verification is performed on the backup node based on the vector running state snapshot. If the verification passes, the lossless switching is confirmed as successful; otherwise, a switching anomaly handling process is triggered.

[0100] Considering the continuous updates of master node vector data in real-time power interaction scenarios, full synchronization would incur unacceptable transmission overhead and latency. Therefore, the system employs an incremental mirror synchronization mechanism before the switchover phase, transmitting only vector fragments that have changed since the last synchronization to the standby node. Specifically, the master node maintains a change log, recording the version number and change timestamp of each vector fragment. The standby node uses this log to request incremental data from the master node and writes it to its local storage. After synchronization, the system initiates sparse consistency verification: instead of verifying all vectors one by one, it randomly selects a number of vector fragments based on a preset sampling ratio (e.g., 5% to 10%), calculates and compares the hash values ​​of the corresponding fragments on the master and standby nodes, and simultaneously performs full verification on critical business vectors (e.g., scheduling decision vectors). Preferably, when the sampling verification matching rate is not less than 99.9% and all critical vectors are consistent, the vector data of the master and standby nodes is confirmed to be consistent, and the switchover execution phase can begin; otherwise, a retransmission mechanism for the deviated fragments is triggered until consistency is achieved, thus achieving high-reliability consistency assurance before the switchover with low overhead.

[0101] During the switchover process, the operating status of the primary node needs to be transmitted to the backup node within a very short time, and state loss due to single-link failure must be avoided. To this end, the system employs a dual-channel isolation transmission mechanism, establishing two physically or logically independent transmission channels between the primary and backup nodes. For example, one channel might be via the dedicated network within the production control zone, and the other via a backup scheduling data network. These two channels are isolated from each other in terms of routing, equipment, and timing. Under this mechanism, the primary node generates a vector operating status snapshot of its current operating state. This snapshot includes key state elements such as active vector indexes, unpersisted vectors in memory, consensus protocol log positions, and session context. The snapshot is sent to the backup node in parallel through both channels. The backup node performs a consistency comparison of the two received data streams and then merges and stores the data. Notably, even if one channel is interrupted due to a momentary failure, the other channel can still take over the transmission task, significantly reducing the probability of state loss during the switchover and enabling the isolated vector cluster to reliably complete state takeover even in cross-security partition scenarios.

[0102] After the switchover is completed, the standby node takes over the role of the primary node to provide services. The system performs continuity verification on the standby node's operating status based on the previously received and persisted vector operating status snapshot. Specific verification items include: whether the active vector index has been completely rebuilt, whether the consensus protocol log position has been correctly continued, whether unpersistent vectors have been successfully recovered, and whether the query response of external services remains consistent with the business context before the switchover. When all verification items pass, the system confirms a successful lossless switchover and officially issues a switchover completion notification to the upper-layer power business. If any verification fails, such as detecting a missing vector index or a jump in the consensus log position, the system determines that the switchover is abnormal and triggers the switchover abnormality handling process, which includes state rollback, compensation synchronization, or manual intervention to prevent the abnormal state from polluting subsequent business operations. Thus, through layer-by-layer checks in the three stages of pre-switchover, during-switchover, and post-switchover, the system ensures lossless vector data and service continuity throughout the entire primary-standby switchover process of the isolated vector cluster in real-time power interaction scenarios.

[0103] In some optional embodiments, a three-stage mechanism of refined risk level classification, differentiated graded handling, and full-process traceability recording is adopted to achieve precise response and closed-loop management of anomalies during the primary / standby switchover process. This avoids business interruption caused by over-handling and prevents risk spread caused by insufficient response. Risk levels are classified into general risk, significant risk, and severe risk based on the degree of risk exceeding limits. The method further includes: when a graded risk control instruction is triggered during the primary / standby switchover process, the risk level is classified into general risk, significant risk, and severe risk based on the degree of risk exceeding limits; for general risks, the switchover processing parameters are dynamically adjusted and the current switchover process is maintained; for significant risks, the switchover process is paused and switchover parameter re-optimization is initiated; for severe risks, a switchover rollback instruction is immediately executed, and the isolated vector cluster is restored to its stable operating state before the switchover based on the vector operating state snapshot; risk warning information and switchover rollback results are recorded to generate traceability information for primary / standby switchover risk control.

[0104] The degree of risk exceeding limits is comprehensively measured based on the number and magnitude of exceeding limits in three indicators: node load variance, state synchronization accuracy volatility, and vector data consistency deviation. Specifically, the system calculates the normalized exceedance magnitude of the measured value of each exceedance indicator relative to the preset safety range upper limit, and then weights and sums these values ​​based on the number of exceedance dimensions to obtain a comprehensive risk measurement value. Preferably, when the comprehensive measurement value falls into the first interval (e.g., 0 to 0.3) and only a single dimension exceeds the limit, it is judged as a general risk, such as slight fluctuations in load variance while synchronization and consistency dimensions remain stable; when the comprehensive measurement value falls into the second interval (e.g., 0.3 to 0.6) or two indicators exceed the limit simultaneously, it is judged as a significant risk, such as dual pressure on load and synchronization; when the comprehensive measurement value is greater than the third threshold (e.g., 0.6), or all three indicators exceed the limit simultaneously, or the single exceedance magnitude of vector data consistency deviation exceeds 50%, it is judged as a severe risk, because consistency failure has the greatest impact on real-time power interaction services. The threshold can be statistically calibrated based on historical switching sample data and flexibly adjusted according to scenario requirements.

[0105] For general risks, the switching processing parameters are dynamically adjusted and the current switching process is maintained; for significant risks, the switching process is paused and the switching parameters are re-optimized; for severe risks, the switching rollback command is executed immediately, and the isolated vector cluster is restored to its stable operating state before the switchback based on the vector running state snapshot.

[0106] Specifically, for general risks, the system uses fuzzy control algorithms to perform lightweight adjustments to switching parameters, such as moderately increasing the synchronization window or fine-tuning the heartbeat detection cycle, to bring the operational state back to a safe range without interrupting the switching process, thus ensuring business continuity. For larger risks, the system pauses key actions in the current switching process and triggers re-optimization of switching parameters: it re-collects cluster state feature datasets and obtains new optimized switching parameters through normalized weighted bias iteration. Switching execution resumes after the new parameters converge and pass evaluation. For severe risks, the system immediately issues a switch rollback command to the cluster switching controller, restoring the primary and backup nodes to their stable operating state before the switch based on the vector operational state snapshot retained during the switch. This includes rebuilding the active vector index before the switch, rolling back consensus protocol log positions, and restoring the session context, ensuring that the isolated vector cluster can maintain business availability even in severe abnormal scenarios. It is worth mentioning that the three-level differentiated handling strategy is uniformly scheduled by the rule base of the fuzzy control algorithm, achieving a reasonable balance between lightweight and strong intervention in risk response.

[0107] Record risk warning information and switchover rollback results to generate traceability information for primary / standby switchover risk prevention and control.

[0108] To support post-event analysis and continuous optimization, the system records each risk warning and switchover rollback result in a structured log to the traceability information database. Log fields include the risk trigger timestamp, exceedance dimension identifier, exceedance magnitude quantification, risk level, actions taken, and processing time. This traceability information can be used for real-time alarms and situational awareness on the operations and maintenance side, and can also be periodically fed back into the training data of the preset primary / standby switchover model. This serves as new samples to improve the model's ability to identify new abnormal scenarios, thus forming a closed-loop optimization chain of switchover execution—risk prevention—traceability feedback—model iteration, continuously improving the reliability and security of lossless primary / standby switchover of isolated vector clusters in real-time power interaction scenarios.

[0109] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0110] Based on the same inventive concept, this application also provides a power real-time interactive isolation vector cluster lossless master-slave switching risk control device for implementing the above-mentioned power real-time interactive isolation vector cluster lossless master-slave switching risk control method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more power real-time interactive isolation vector cluster lossless master-slave switching risk control device embodiments provided below can be found in the limitations of the power real-time interactive isolation vector cluster lossless master-slave switching risk control method described above, and will not be repeated here.

[0111] In one exemplary embodiment, such as Figure 4 As shown, a lossless primary / backup switching risk control device for isolated vector clusters under real-time power interaction is provided, comprising:

[0112] The acquisition module 401 is used to acquire real-time operating data of the isolated vector cluster in the real-time power interaction scenario and generate the corresponding cluster status feature dataset.

[0113] The initial switching parameter determination module 402 is used to analyze the cluster state feature dataset based on the preset master-slave switching model and determine the initial switching parameters of the master-slave switching process.

[0114] The optimized switching parameter acquisition module 403 is used to acquire real-time deviation information between the initial switching parameters and the actual main / standby operating status, and to adaptively optimize the initial switching parameters based on the deviation information to obtain optimized switching parameters.

[0115] The risk prevention and control information generation module 404 is used to perform dynamic lossless switching processing on the isolated vector cluster based on optimized switching parameters, and generate risk prevention and control information for the primary and backup switching process.

[0116] In some optional embodiments, the acquisition module 401 is specifically used to acquire the master node load index, backup node status synchronization parameters and vector data transmission delay parameters as real-time running data through the cluster monitoring node; perform time-series alignment preprocessing and feature extraction on the real-time running data, remove communication jitter interference and extract vector data consistency-related features; and construct a cluster status feature dataset containing switching response delay, vector data consistency and isolated vector cluster running status based on the extracted features.

[0117] In some optional embodiments, the initial switching parameter determination module 402 is specifically used to perform a switching feasibility analysis on the cluster state feature dataset using a preset master-slave switching model, identify the state response characteristics and vector data consistency distribution of the master and slave nodes; generate initial switching parameters using a multi-objective optimization algorithm based on the state response characteristics and vector data consistency distribution; when the initial switching parameters meet the preset switching performance constraints, they are used as initial switching parameters; otherwise, a prompt message indicating that the switching parameter initialization failed is output.

[0118] In some optional embodiments, the aforementioned optimized switching parameter determination module is specifically used to set up a first monitoring point group, a second monitoring point group, and a third monitoring point group based on the working condition distribution of the isolated vector cluster, with the initial switching parameters as the benchmark. The first monitoring point group corresponds to the node load distribution, the second monitoring point group corresponds to the primary and backup node status synchronization distribution, and the third monitoring point group corresponds to the vector data consistency distribution. The module calculates the operational deviation between the initial switching parameters and the first, second, and third monitoring point groups to generate real-time deviation information. Based on the real-time deviation information, the module performs adaptive optimization of the initial switching parameters by normalizing the node load deviation, status synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing the results, and iteratively optimizing the parameters to obtain optimized switching parameters.

[0119] In some optional embodiments, the optimized switching parameter determination module is specifically used to dynamically adjust the load-related component of the initial switching parameters based on the node load deviation of the first monitoring point group until the node load deviation is balanced; after the load deviation is balanced, adjust the synchronization-related component of the switching parameters based on the state synchronization deviation of the second monitoring point group until the state synchronization deviation meets the preset balance condition; after the state synchronization deviation meets the preset balance condition, adjust the vector consistency-related component of the switching parameters based on the vector data consistency deviation of the third monitoring point group until the vector data consistency deviation meets the preset convergence condition, and determine the optimized switching parameters.

[0120] In some optional embodiments, the risk prevention and control information generation module 404 is specifically used to divide the operating conditions of the master-slave switchover process into multiple dynamic segments based on the node load change rate, state synchronization deviation change rate, and vector data consistency change rate in the operating condition distribution of the isolated vector cluster; collect the state fluctuation data of each dynamic segment in real time, and dynamically adjust the switchover processing parameters of the isolated vector cluster using a fuzzy control algorithm based on the differences in state fluctuation data between segments; and calculate the risk prevention and control indicators based on the node load variance, state synchronization accuracy fluctuation rate, and vector data consistency deviation based on the adjusted processing parameters to generate risk prevention and control information.

[0121] In some optional embodiments, the risk prevention and control information generation module 404 is specifically used to statistically analyze the node load, state synchronization accuracy, and vector data consistency of each dynamic segment, and to calculate the node load variance, state synchronization accuracy volatility, and vector data consistency deviation between each segment; if the variance, volatility, and deviation are all within a preset safety range, then the risk prevention and control information indicates that the risk of the master-slave switching process is controllable.

[0122] If any of the variance, volatility, or deviation exceeds the preset safety range, the risk control information indicates that there is a risk during the master / slave switchover process, and triggers a tiered risk control instruction.

[0123] In some optional embodiments, the initial switching parameter determination module 402 is specifically used to perform offline training on a preset master-slave switching model based on historical switching sample data to obtain a state response feature library and a vector data consistency benchmark library; to match and compare the cluster state feature dataset with the feature library and the benchmark library to generate a switching feasibility assessment value; and to trigger a switching parameter re-initialization process when the switching feasibility assessment value is lower than a preset threshold.

[0124] In some optional embodiments, the risk prevention and control information generation module 404 is specifically used to perform incremental mirror synchronization of the primary node vector data before switching, and to confirm the consistency of the primary and backup node vector data through sparse consistency verification; during switching, a dual-channel isolation transmission mechanism is used to synchronize the vector running status snapshot of the primary node to the backup node; after switching, the status continuation verification of the backup node is performed based on the vector running status snapshot. If the verification passes, the lossless switching is confirmed to be successful; otherwise, the switching anomaly handling process is triggered.

[0125] In some optional embodiments, the risk prevention and control information generation module 404 is specifically used to classify the risk level into general risk, major risk, and severe risk according to the degree of risk exceeding the limit when a graded risk prevention and control instruction is triggered during the primary / standby switchover process; for general risks, dynamically adjust the switchover processing parameters and maintain the current switchover process; for major risks, pause the switchover process and start switchover parameter re-optimization; for severe risks, immediately execute the switchover rollback instruction and restore the isolated vector cluster to the stable operating state before the switchover based on the vector running state snapshot; record the risk warning information and the switchover rollback results, and generate traceability information for primary / standby switchover risk prevention and control.

[0126] The various modules in the aforementioned lossless primary / backup switching risk control device for isolated vector clusters under real-time power interaction can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0127] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores the data involved in the aforementioned methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a lossless primary / backup switching risk control method for isolated vector clusters under real-time power interaction.

[0128] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0129] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0132] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0133] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A power real-time interaction under isolation vector cluster lossless active-standby switching risk control method, characterized in that, The method includes: Collect real-time operation data of isolated vector clusters in real-time power interaction scenarios and generate corresponding cluster status feature datasets; Based on the preset primary / standby switchover model, the cluster state feature dataset is analyzed to determine the initial switchover parameters for the primary / standby switchover process. The initial switching parameters are obtained in real time, and the actual primary / standby operating status is adjusted accordingly to adaptively optimize the initial switching parameters and obtain optimized switching parameters. Based on the optimized switching parameters, the isolated vector cluster is dynamically and losslessly switched, generating risk prevention and control information for the primary / standby switching process.

2. The method of claim 1, wherein, The method involves collecting real-time operational data of the isolated vector cluster under a real-time power interaction scenario to generate a corresponding cluster state feature dataset, including: The cluster monitoring nodes collect the master node load index, the backup node status synchronization parameters, and the vector data transmission latency parameters as real-time operating data. The real-time running data is preprocessed for time alignment and feature extraction to remove communication jitter interference and extract vector data consistency-related features; Based on the extracted features, a cluster state feature dataset is constructed that includes switching response latency, vector data consistency, and the operating status of the isolated vector cluster.

3. The method according to claim 1, characterized in that, The process of analyzing the cluster state feature dataset based on a preset primary / standby switchover model to determine the initial switchover parameters for the primary / standby switchover process includes: A feasibility analysis of switching is performed on the cluster state feature dataset using a preset primary / standby switching model to identify the state response characteristics of primary and standby nodes and the consistency distribution of vector data. Based on the state response characteristics and the consistent distribution of vector data, a multi-objective optimization algorithm is used to generate initial switching parameters; If the initial switching parameters meet the preset switching performance constraints, they are used as the initial switching parameters; otherwise, a message indicating that the switching parameters failed to initialize is output.

4. The method according to claim 1, characterized in that, The step of obtaining real-time deviation information between the initial switching parameters and the actual primary / standby operating state, and adaptively optimizing the initial switching parameters based on the deviation information to obtain optimized switching parameters, includes: Based on the working condition distribution of the isolated vector cluster, a first monitoring point group, a second monitoring point group, and a third monitoring point group are set with the initial switching parameters as the reference. The first monitoring point group corresponds to the node load distribution, the second monitoring point group corresponds to the primary and backup node status synchronization distribution, and the third monitoring point group corresponds to the vector data consistency distribution. Calculate the operational deviations between the initial switching parameters and the first, second, and third monitoring point groups, and generate real-time deviation information; Based on the real-time deviation information, the initial switching parameters are adaptively optimized by normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing them, and iteratively optimizing the results.

5. The method according to claim 4, characterized in that, The initial switching parameters are adaptively optimized based on the real-time deviation information by normalizing the node load deviation, state synchronization deviation, and vector data consistency deviation of each monitoring point, then weighting and summing the results and iteratively optimizing the optimization. This includes: Based on the node load deviation of the first monitoring point group, the load-related component of the initial switching parameter is dynamically adjusted until the node load deviation is balanced. After the load deviation is balanced, the synchronization-related component of the switching parameter is adjusted based on the state synchronization deviation of the second monitoring point group until the state synchronization deviation meets the preset balance condition. After the state synchronization deviation meets the preset equilibrium condition, the vector consistency correlation component of the switching parameter is adjusted based on the vector data consistency deviation of the third monitoring point group until the vector data consistency deviation meets the preset convergence condition, and the optimized switching parameter is determined.

6. The method according to any one of claims 1 to 5, characterized in that, The process of dynamically and losslessly switching the isolated vector cluster based on the optimized switching parameters, and generating risk prevention and control information for the primary / standby switching process, includes: Based on the node load change rate, state synchronization deviation change rate, and vector data consistency change rate in the isolated vector cluster operating condition distribution, the operating conditions of the primary / standby switchover process are divided into multiple dynamic segments. Real-time acquisition of state fluctuation data for each dynamic segment, and dynamic adjustment of switching processing parameters for the isolation vector cluster based on the differences in state fluctuation data between segments using a fuzzy control algorithm; Based on the adjusted processing parameters, risk control indicators are calculated based on node load variance, state synchronization accuracy volatility, and vector data consistency deviation, and risk control information is generated.

7. The method according to claim 6, characterized in that, The state fluctuation data includes the node load of the isolated vector cluster, state synchronization accuracy, and vector data consistency; the generation of risk prevention and control information includes: The node load, state synchronization accuracy, and vector data consistency of each dynamic segment are statistically analyzed, and the node load variance, state synchronization accuracy volatility, and vector data consistency deviation between each segment are calculated. If the variance, volatility, and deviation are all within a preset safety range, then the risk control information during the primary / backup switching process is controllable. If any of the variance, volatility, or deviation exceeds a preset safety range, the risk control information indicates a risk during the master / slave switching process, and triggers a tiered risk control instruction.

8. The method according to claim 3, characterized in that, The feasibility analysis of switching over the cluster state feature dataset using a preset master-slave switchover model includes: Offline training is performed on the preset master-slave switching model based on historical switching sample data to obtain a state response feature library and a vector data consistency benchmark library. The cluster status feature dataset is matched and compared with the feature library and the benchmark library to generate a switching feasibility assessment value; When the switching feasibility assessment value is lower than a preset threshold, the switching parameter re-initialization process is triggered.

9. The method according to claim 1, characterized in that, The dynamic lossless switching process for the isolated vector cluster includes: Before the switchover, incremental mirroring synchronization of the primary node vector data is performed, and sparse consistency verification is used to confirm that the primary and backup node vector data are consistent. During the switchover, a dual-channel isolation transmission mechanism is used to synchronize the vector operation status snapshot of the master node to the standby node; After the switchover, the backup node is checked for continued status based on the snapshot of the vector's running status. If the checkover passes, the lossless switchover is confirmed to be successful; otherwise, the switchover exception handling process is triggered.

10. The method according to claim 9, characterized in that, The method further includes: When a graded risk control instruction is triggered during the primary / standby switchover process, the risk level is classified into general risk, major risk, and severe risk according to the degree of risk exceeding the limit. For general risks, the switching processing parameters are dynamically adjusted and the current switching process is maintained; for significant risks, the switching process is paused and the switching parameters are re-optimized; for severe risks, the switching rollback command is executed immediately, and the isolated vector cluster is restored to its stable operating state before the switch based on the vector running state snapshot. Record risk warning information and switchover rollback results to generate traceability information for primary / standby switchover risk prevention and control.