Data synchronization anomaly monitoring method and device, computer equipment and storage medium
By extracting local and global features of nodes and links in the power grid database system and combining them with time series analysis, the problem of inaccurate database synchronization status monitoring in traditional technologies has been solved, achieving more efficient anomaly monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SOUTHERN POWER GRID DIGITAL GRID GRP CO LTD
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-21
AI Technical Summary
In traditional technologies, the accuracy of data synchronization status monitoring in database synchronization mechanisms is not high, especially in power grid database systems with multiple nodes, multiple links, and strong correlations, where existing methods cannot effectively monitor database synchronization status.
By acquiring data from each node and transmission link, enhanced node features, including local and global features, are extracted, and time-series features are extracted. Combined with anomaly prediction models, the anomaly monitoring results for database synchronization are determined.
It improves the accuracy of data synchronization status monitoring in the database synchronization system, enabling more accurate identification of node and link anomalies and adapting to dynamic changes in the power grid database system.
Smart Images

Figure CN121901957A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of database technology, and in particular to a method, apparatus, computer equipment, and storage medium for monitoring data synchronization anomalies. Background Technology
[0002] With the development of digital technology, the database synchronization mechanism for various power grid services exhibits a topological characteristic of "multi-node, multi-link, and strong correlation." Monitoring the data synchronization status of the database synchronization mechanism is crucial for ensuring the normal operation of various power grid services.
[0003] Traditional technologies typically perform status analysis on only a single link, which results in low accuracy in monitoring the data synchronization status of database synchronization mechanisms. Summary of the Invention
[0004] Therefore, it is necessary to provide a data synchronization anomaly monitoring method, device, computer equipment, and storage medium to address the aforementioned technical problems, thereby improving the accuracy of data synchronization status monitoring in database synchronization mechanisms.
[0005] Firstly, this application provides a method for monitoring database synchronization anomalies, including:
[0006] During database synchronization, node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times are obtained.
[0007] Based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0008] For each node, feature extraction is performed on the enhanced node features of the node at different sampling times to obtain the local and global features of the node at different sampling times; and,
[0009] Temporal features of the node are obtained by extracting local and global features corresponding to multiple sampling points.
[0010] Based on the timing characteristics of each node and / or the transmission link data at different sampling times, the abnormal monitoring results of database synchronization are determined.
[0011] In one embodiment, the step of extracting features from the enhanced node features at different sampling times to obtain the local and global features of the node at different sampling times includes:
[0012] For each sampling time, local feature extraction is performed on the enhanced node features of the node at that sampling time to obtain the local features of the node at that sampling time;
[0013] Global features of the node at the sampling time are obtained by performing global feature extraction on the local features of the node and the local features of the neighboring nodes at the sampling time.
[0014] In one embodiment, the step of extracting local features from the enhanced node features of the node at the sampling time to obtain the local features of the node at the sampling time includes:
[0015] For any neighboring node of the node, the neighboring node features are determined based on the node splicing features and the node weights; wherein, the node splicing features are the splicing results of the enhanced node features of the node at the sampling time and the enhanced node features of the neighboring node at the sampling time, and the node weights are used to characterize the importance of the neighboring node to the node;
[0016] Based on the characteristics of the neighboring nodes of the node, the local characteristics of the node at the sampling time are determined.
[0017] In one embodiment, the step of performing global feature extraction on the local features of the node at the sampling time and the local features of the node's neighboring nodes at the sampling time to obtain the global features of the node at the sampling time includes:
[0018] Based on the local features of the node at the sampling time and the local features of the node's direct neighbor nodes at the sampling time, the first mean feature of the node at the sampling time is determined;
[0019] For each of the direct neighbor nodes of the node, a second mean feature of the direct neighbor node at the sampling time is determined based on the local features of the direct neighbor node at the sampling time and the local features of the direct neighbor node's direct neighbor node at the sampling time.
[0020] Based on the first mean feature and the second mean features of each of the node's direct neighbor nodes, the global features of the node at the sampling time are determined.
[0021] In one embodiment, the step of extracting temporal features from the local and global features of the node at multiple sampling points to obtain the temporal features of the node includes:
[0022] The local and global features of the node at the same sampling time are concatenated to obtain the temporal concatenation features of the node at each sampling time.
[0023] The temporal characteristics of the node are determined based on the temporal splicing characteristics of the node at each sampling time.
[0024] In one embodiment, the abnormal monitoring result of the database synchronization includes the fault type; determining the abnormal monitoring result of the database synchronization based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times includes:
[0025] Outliers for each node are determined based on the similarity between the temporal characteristics of each node and the reference characteristics of the corresponding reference node.
[0026] Based on the transmission link data of each transmission link at different sampling times, the link characteristics of each transmission link are determined, and the outliers of each link are determined based on the similarity between the link characteristics of each transmission link and the reference link characteristics of the corresponding reference link.
[0027] The first mean value corresponding to the outlier value of each node and the second mean value corresponding to the outlier value of each link are weighted to obtain the global outlier value.
[0028] Determine the database synchronization failure type based on at least one of the following: abnormal values of each node, abnormal values of each link, and global abnormal values.
[0029] In one embodiment, the method further includes:
[0030] Obtain the target data combination corresponding to multiple sampling times; wherein, the target data combination corresponding to each sampling time includes the temporal characteristics of each node, the outliers of each node, the outliers of each link, and the global outliers;
[0031] The target data corresponding to multiple sampling times is combined and input into the anomaly prediction model to obtain the predicted data combination and confidence level at different times in the future period.
[0032] Based on the combination and confidence level of the predicted data at different times within the future period, determine the target response strategy;
[0033] The target response strategy is adopted to adjust the synchronization mechanism of the database.
[0034] Secondly, this application also provides a data synchronization anomaly monitoring device, comprising:
[0035] The acquisition module is used to acquire node data of each node participating in the synchronization at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times during the database synchronization process.
[0036] The first determining module is used to determine the enhanced node features of each node at different sampling times based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0037] The extraction module is used to extract features from the enhanced node features of each node at different sampling times to obtain the local features and global features of the node at different sampling times; and to extract temporal features from the local features and global features of the node at multiple sampling points to obtain the temporal features of the node.
[0038] The second determining module is used to determine the abnormal monitoring results of database synchronization based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times.
[0039] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0040] During database synchronization, node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times are obtained.
[0041] Based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0042] For each node, feature extraction is performed on the enhanced node features of the node at different sampling times to obtain the local and global features of the node at different sampling times; and,
[0043] Temporal features of the node are obtained by extracting local and global features corresponding to multiple sampling points.
[0044] Based on the timing characteristics of each node and / or the transmission link data at different sampling times, the abnormal monitoring results of database synchronization are determined.
[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0046] During database synchronization, node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times are obtained.
[0047] Based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0048] For each node, feature extraction is performed on the enhanced node features of the node at different sampling times to obtain the local and global features of the node at different sampling times; and,
[0049] Temporal features of the node are obtained by extracting local and global features corresponding to multiple sampling points.
[0050] Based on the timing characteristics of each node and / or the transmission link data at different sampling times, the abnormal monitoring results of database synchronization are determined.
[0051] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0052] During database synchronization, node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times are obtained.
[0053] Based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0054] For each node, feature extraction is performed on the enhanced node features of the node at different sampling times to obtain the local and global features of the node at different sampling times; and,
[0055] Temporal features of the node are obtained by extracting local and global features corresponding to multiple sampling points.
[0056] Based on the timing characteristics of each node and / or the transmission link data at different sampling times, the abnormal monitoring results of database synchronization are determined.
[0057] The aforementioned data synchronization anomaly monitoring method, apparatus, computer equipment, and storage medium, during database synchronization, acquire node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times. Based on the node data of each node and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined. Each enhanced node feature includes the node's initial node features and the initial node features of its neighboring nodes. For each node, feature extraction is performed on the enhanced node features at different sampling times to obtain the node's local and global features at different sampling times. Furthermore, temporal feature extraction is performed on the local and global features of the node at multiple sampling points to obtain the node's temporal features. Based on the temporal features of each node and / or the transmission link data of each transmission link at different sampling times, the anomaly monitoring result of database synchronization is determined. This scheme, in monitoring the database synchronization status, takes into account both node data and transmission link data, as well as the local and global features of the database synchronization system, thereby improving the accuracy of data synchronization status monitoring of the database synchronization system. Attached Figure Description
[0058] 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.
[0059] Figure 1 This is a flowchart illustrating a database synchronization anomaly monitoring method in one embodiment;
[0060] Figure 2 This is a flowchart illustrating the process of determining the local and global features of a node in one embodiment.
[0061] Figure 3 This is a flowchart illustrating the process of determining the local features of a node at a sampling time in one embodiment.
[0062] Figure 4 This is a flowchart illustrating the process of determining the global features of a node at a sampling time in one embodiment.
[0063] Figure 5 This is a flowchart illustrating the process of determining the temporal characteristics of a node in one embodiment;
[0064] Figure 6 This is a flowchart illustrating the process of determining the anomaly monitoring results for database synchronization in one embodiment.
[0065] Figure 7 This is a flowchart illustrating the process of adjusting the database synchronization mechanism in one embodiment;
[0066] Figure 8 This is a structural block diagram of a database synchronization anomaly monitoring device in one embodiment;
[0067] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0068] 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.
[0069] The database synchronization anomaly monitoring method provided in this application embodiment can be applied to application scenarios of database synchronization anomaly monitoring, specifically to application scenarios of database synchronization anomaly monitoring in power grids.
[0070] This method can be executed by a server or a terminal. The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses.
[0071] In one exemplary embodiment, such as Figure 1 As shown, a method for monitoring database synchronization anomalies is provided. Taking the application of this method to a server as an example, the method includes the following steps:
[0072] S101, during the database synchronization process, obtain the node data of each node participating in the synchronization at different sampling times and the transmission link data of each transmission link involved in the synchronization process at different sampling times.
[0073] In this context, nodes are hardware devices or software modules that participate in database synchronization, such as database servers and data relay nodes. Taking a power grid metering system as an example, nodes can be master stations, terminals, substations, etc.
[0074] Node data includes various information reflecting the node status, including but not limited to basic attributes (such as node type, CPU load, etc.), related attributes (such as the number of access links, the number of historical anomalies, etc.), and status attributes (such as data write throughput, query response latency, etc.).
[0075] A transmission link is a channel connecting two nodes for data synchronization, such as a Change Data Capture (CDC) synchronization link from node A to node B.
[0076] Transmission link data is used to reflect various information about the status of the transmission link, such as synchronization delay, packet loss rate, bandwidth utilization, CDC capture frequency, and data consistency verification results.
[0077] For example, data can be collected using monitoring tools deployed on nodes and transmission links. For instance, a data collection agent can be installed on each node to collect data such as CPU load and data write throughput in real time; network monitoring tools can collect data such as synchronization latency and packet loss rate of the transmission link, and store and organize the data according to a set sampling interval (e.g., every 10 seconds).
[0078] S102, based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, determine the enhanced node characteristics of each node at different sampling times.
[0079] For example, the node data can be preprocessed first, including outlier handling, standardization, and classification feature encoding, to obtain the initial node features of each node; then, the neighboring nodes of each node are determined, and the initial node features of the neighboring nodes are extracted; finally, the initial node features of the current node are fused with the initial node features of the neighboring nodes, for example, by feature concatenation, to form enhanced node features.
[0080] Each enhanced node feature includes the node's initial node features and the initial node features of its neighboring nodes. In other words, the enhanced node feature is a feature vector that integrates the initial node features of the current node and the initial node features of its neighboring nodes, reflecting the relationship between the node and its neighbors. The initial node features are features directly extracted from node data to characterize the node's own state; for example, feature vectors formed after preprocessing data such as CPU load and data write throughput. Neighboring nodes are nodes directly connected to the current node via a transmission link. For example, if node A is directly connected to nodes B and C, then nodes B and C are neighbors of node A.
[0081] S103, for each node, perform feature extraction on the enhanced node features of the node at different sampling times to obtain the local features and global features of the node at different sampling times; and, perform temporal feature extraction on the local features and global features of the node at multiple sampling points to obtain the temporal features of the node.
[0082] For example, a hierarchical feature extraction architecture can be adopted. First, the enhanced node features are processed through a local feature extraction module (such as the Graph Attention Network (GAT) layer) to capture the local correlation between the current node and its direct neighbors, thus obtaining local features. For instance, the GAT layer calculates attention weights to characterize the importance of neighboring nodes to the current node, and then aggregates the features of neighboring nodes to obtain local features.
[0083] The local features are then further processed by the global feature extraction module (Graph Sample and Aggregate (GraphSAGE) layer), which aggregates the features of multi-order neighbor nodes to obtain global features. For example, the GraphSAGE layer uses mean aggregation to aggregate the local features of second-order and third-order neighbor nodes layer by layer to form global features.
[0084] For example, the local and global features at each sampling time can be concatenated to obtain the temporal concatenated features at each sampling time; then, a temporal feature extraction module (such as a Temporal Graph Convolutional Network (T-GCN) layer) is used to process the temporal concatenated features at multiple consecutive sampling times to capture the trend of feature changes over time and obtain the temporal features.
[0085] For example, temporal splicing features from nearly 30 sampling times can be selected to form a feature sequence, which is then input into the T-GCN layer. This layer combines the ability of Graph Convolutional Network (GCN) to capture spatial correlations and Long Short-Term Memory (LSTM) network to capture temporal correlations, and outputs temporal features.
[0086] Local features reflect the local relationships between the current node and its immediate neighbors, such as the interaction between the node's own state and the states of its immediate neighbors. Global features reflect the relationships between all nodes in the entire database synchronization topology network, demonstrating the impact of the global topology on the current node. Temporal features are extracted from local and global features across multiple consecutive sampling times, reflecting the trend of node state changes over time.
[0087] S104. Based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times, determine the abnormal monitoring results of database synchronization.
[0088] For example, the abnormal monitoring results of database synchronization can be determined solely based on the timing characteristics of each node; or solely based on the transmission link data of each transmission link at different sampling times; or the abnormal monitoring results of database synchronization can be determined based on the timing characteristics of each node and the transmission link data of each transmission link at different sampling times.
[0089] For example, the timing characteristics of each node can be compared with the timing characteristics corresponding to node failures to determine whether there are any abnormal nodes; or, based on the transmission link characteristics determined by the transmission link data, each transmission link characteristic can be compared with the transmission link characteristics corresponding to link failures to determine whether there are any abnormal links; or, based on the timing characteristics of each node and the characteristics of each transmission link, it can be analyzed whether there are database composite failures. For instance, failures can be identified through analysis models or through feature matching.
[0090] The anomaly monitoring results include, but are not limited to, information such as whether an anomaly exists, the level of the anomaly, the type of the anomaly (such as single-link failure, node failure, cross-link composite failure), and the root cause of the anomaly.
[0091] The aforementioned data synchronization anomaly monitoring method, during database synchronization, acquires node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times. Based on the node data of each node and the transmission link data of each transmission link at different sampling times, it determines the enhanced node features of each node at different sampling times. Each enhanced node feature includes the node's initial node features and the initial node features of its neighboring nodes. For each node, feature extraction is performed on the enhanced node features at different sampling times to obtain the node's local and global features at different sampling times. Furthermore, temporal feature extraction is performed on the local and global features of the node at multiple sampling points to obtain the node's temporal features. Based on the temporal features of each node and / or the transmission link data of each transmission link at different sampling times, the anomaly monitoring result of the database synchronization is determined. This scheme, in monitoring the database synchronization status, takes into account both node data and transmission link data, as well as the local and global features of the database synchronization system, thereby improving the accuracy of data synchronization status monitoring of the database synchronization system.
[0092] In some alternative implementations, see [link to relevant documentation]. Figure 2 , Figure 2A flowchart illustrating the process of determining the local and global features of a node is provided, specifically including the following steps:
[0093] S201, For each sampling time, local feature extraction is performed on the enhanced node features of the node at the sampling time to obtain the local features of the node at the sampling time.
[0094] For example, for each sampling time, the enhanced node features at that sampling time can be input into a local feature extraction module (such as a GAT layer). This module measures the importance of each neighboring node to the current node by calculating attention weights, and then aggregates the features of the neighboring nodes according to the attention weights, and combines them with the features of the current node itself to obtain local features.
[0095] For example, the number of attention heads in the GAT layer can be set to 8, and the hidden layer dimension can be set to 64. The aggregated features can be non-linearly transformed using the Leaky Rectified Linear Unit (LeakyReLU) activation function to output local features F. loc The expression is:
[0096]
[0097] in, For node v i Local features, For activation function, For attention weights, This is the weight matrix. For node v i Enhanced features and node v j The splicing features of the enhanced features, For node v i The set of direct neighbor nodes.
[0098] For example, at a certain sampling time, the enhanced node feature of node 1 is a 36-dimensional vector, which is input into the GAT layer. The GAT layer calculates the attention weights of the neighboring nodes 2 and 3 of node 1 as 0.6 and 0.4, respectively. The features of the neighboring nodes 2 and 3 are weighted and summed according to the attention weights, and then fused with the features of node 1 itself. After processing by the activation function, a 64-dimensional local feature is output.
[0099] S202, global feature extraction is performed on the local features of the node at the sampling time and the local features of the node's neighboring nodes at the sampling time to obtain the global features of the node at the sampling time.
[0100] For example, after obtaining the local features of each node, the neighboring nodes (including direct and indirect neighbors) of each node are determined, and the local features of the neighboring nodes are extracted. Then, the local features of the current node and the local features of the neighboring nodes are aggregated by a global feature extraction module, such as the GraphSAGE layer, to obtain the global features F of the node at the sampling time. glo For example, the GraphSAGE layer uses mean aggregation to aggregate the local features of second-order and third-order neighbor nodes layer by layer to form global features. The parameters of the GraphSAGE layer are configured as follows: hidden layer dimension 128, number of layers 2, and dropout rate 0.2.
[0101]
[0102] in, After aggregation at level k, the nodes global features This is the weight matrix. It is the mean aggregation function. After aggregation at level k-1, the nodes Features After aggregation at level k-1, the nodes neighboring nodes Its characteristics.
[0103] The above embodiments, by extracting local and global features step by step, first focus on the local association between the current node and its direct neighbor nodes, and then extend to the global association between multi-level neighbor nodes. This allows for a deeper and more comprehensive capture of the topological features of the database synchronization system. The extraction of local features can accurately reflect the direct interaction relationships between nodes, while the extraction of global features can reflect the impact of the entire topology network on the nodes. The combination of the two makes feature extraction more comprehensive and accurate, providing reliable feature support for the accurate determination of subsequent anomaly monitoring results and further improving the accuracy of anomaly monitoring.
[0104] In some alternative implementations, see [link to relevant documentation]. Figure 3 , Figure 3 A flowchart illustrating the process of determining the local features of a node at a sampling time is provided, specifically including the following steps:
[0105] S301: For any neighboring node of a node, determine the characteristics of the neighboring node based on the node splicing characteristics and the node weight.
[0106] Among them, the node splicing feature is the splicing result of the enhanced node feature of the node at the sampling time and the enhanced node feature of the neighboring node at the sampling time, and the node weight is used to characterize the importance of the neighboring node to the node; the neighboring node feature is the feature vector obtained after weighting the node splicing feature, which can reflect the contribution of the neighboring node to the current node.
[0107] For example, for each neighboring node of the current node, the enhanced node features of the current node can be concatenated with the enhanced node features of the neighboring node. For example, if the enhanced node features of the current node are 36-dimensional and the enhanced node features of the neighboring node are also 36-dimensional, the concatenated features will result in a 72-dimensional node concatenation feature.
[0108] Furthermore, an attention mechanism can be used to calculate node weights. For example, the concatenated features of the nodes can be input into a fully connected layer for linear transformation to obtain initial weight values. Then, the initial weight values of all neighboring nodes can be normalized using the softmax function to obtain the final node weights, ensuring that the sum of the weights of all neighboring nodes is 1.
[0109] The neighbor node features can be obtained by multiplying the concatenated node features with their corresponding node weights. For example, if the concatenated node features are a 72-dimensional vector and the node weight is 0.6, then multiplying each element of the vector by 0.6 will yield the 72-dimensional neighbor node features.
[0110] S302, determine the local features of the node at the sampling time based on the characteristics of the neighboring nodes of each neighboring node.
[0111] For example, the features of all neighboring nodes can be aggregated, for example by summing, averaging, or concatenating. The aggregated results are then processed by an activation function to obtain local features.
[0112] In the above embodiments, by calculating node weights, the importance of different neighboring nodes to the current node can be adaptively measured. Based on node splicing features and node weights, neighboring node features are determined, which can more accurately capture the correlation strength between the current node and each neighboring node. Finally, by aggregating neighboring node features to obtain local features, the local features can more accurately reflect the local correlation between nodes, further improving the accuracy of feature extraction.
[0113] In some alternative implementations, see [link to relevant documentation]. Figure 4 , Figure 4 A flowchart illustrating the process of determining the global features of a node at a sampling time is provided, specifically including the following steps:
[0114] S401, Based on the local features of the node at the sampling time and the local features of the node's direct neighbor nodes at the sampling time, determine the first mean feature of the node at the sampling time.
[0115] Among them, direct neighbor nodes are nodes that are directly connected to the current node through a transmission link, i.e., first-order neighbor nodes.
[0116] For example, the mean of the local features of the current node and the local features of all its direct neighbors can be calculated to obtain the first mean feature. For instance, if the local feature of the current node is a 64-dimensional vector and there are two direct neighbors whose local features are also 64-dimensional vectors, the corresponding elements of these three vectors can be added together and then divided by 3 to obtain the 64-dimensional first mean feature.
[0117] The first mean feature is the mean feature of the local features of the current node and the local features of its direct neighbors, which is used to reflect the overall association features between the current node and its first-order neighbors.
[0118] S402, for each direct neighbor node of a node, determine the second mean feature of the direct neighbor node at the sampling time based on the local features of the direct neighbor node at the sampling time and the local features of the direct neighbor node's direct neighbor node at the sampling time.
[0119] For example, for each direct neighbor node, the local features of that direct neighbor node and the mean of the local features of all its direct neighbors (including the current node and other second-order neighbors) can be calculated to obtain the second mean feature of that direct neighbor node.
[0120] For example, the local feature of the direct neighbor node 2 is a 64-dimensional vector. Its direct neighbor nodes include the current node 1, node 4, and node 5. The local features of these three nodes are each 64-dimensional vectors. Adding the corresponding elements of these four vectors and dividing by 4 yields the 64-dimensional second mean feature.
[0121] S403, Based on the first mean feature and the second mean feature of each direct neighbor node of the node, determine the global feature of the node at the sampling time.
[0122] For example, the first mean feature can be fused with the second mean feature of all direct neighbor nodes, for example, by feature concatenation, weighted summation, etc., to obtain the global feature.
[0123] For example, the first mean feature is 64-dimensional, and the second mean features of the two direct neighbor nodes are each 64-dimensional. After concatenating these three vectors, a 192-dimensional vector is obtained. After processing through a fully connected layer, a 128-dimensional global feature is output.
[0124] In the above embodiments, by calculating the first mean feature and the second mean feature in a hierarchical manner, the scope of feature aggregation is gradually expanded from first-order neighbor nodes to second-order neighbor nodes, which can more comprehensively capture the global correlation features of the entire topology network. The first mean feature reflects the close relationship between the current node and its direct neighbor nodes, while the second mean feature reflects the relationship between the direct neighbor nodes and their more distant neighbor nodes. The global feature obtained by fusing the two features can more accurately reflect the position and status of the current node in the entire topology network, providing a more comprehensive global perspective for subsequent anomaly monitoring and helping to improve the detection accuracy of global faults and cross-link composite faults.
[0125] In some alternative implementations, see [link to relevant documentation]. Figure 5 , Figure 5 A flowchart for determining the temporal characteristics of nodes is provided, which includes the following steps:
[0126] S501, the local features and global features corresponding to the node at the same sampling time are concatenated to obtain the temporal concatenated features of the node at each sampling time.
[0127] For example, for each sampling time, the local features F of the node at that time can be... loc and global features F glo By splicing the data, the temporal splicing features of the nodes at that moment are obtained [F]. loc F glo ].
[0128] S502, Based on the temporal splicing characteristics of the node at each sampling time, determine the temporal characteristics F of the node. ms .
[0129] For example, temporal features from multiple consecutive sampling times can be concatenated to form a temporal feature sequence, which is then input into a temporal feature extraction module (such as a T-GCN layer or an LSTM layer). This module processes the temporal feature sequence, captures the trends and patterns of feature changes over time, and outputs the temporal features. For instance, temporal features from nearly 30 sampling times can be concatenated to form a 30×192 feature sequence, which is then input into a T-GCN layer. This layer captures spatial correlations in the feature sequence through GCN and temporal correlations through LSTM, ultimately outputting 256-dimensional temporal features.
[0130] In the above embodiments, by splicing local and global features at the same sampling time, a temporal splicing feature that can comprehensively reflect the multi-dimensional association of nodes at that time is formed; then, temporal features are extracted based on the temporal splicing features of multiple consecutive sampling times, which can capture the pattern of node features changing over time and effectively adapt to the dynamic scenario where the database synchronization topology changes in real time with the load; the temporal features not only contain the spatial association information of nodes, but also integrate the change information of the time dimension, so that when subsequent anomaly monitoring is performed based on the temporal features, the anomalies that gradually evolve over time can be identified more accurately, thereby improving the timeliness and accuracy of anomaly monitoring.
[0131] In some alternative implementations, see [link to relevant documentation]. Figure 6 , Figure 6 A flowchart is provided to determine the anomaly monitoring results of database synchronization, specifically including the following steps:
[0132] S601, determine the outliers of each node based on the similarity between the temporal characteristics of each node and the reference characteristics of the corresponding reference node.
[0133] The reference node is a node of the same type and similar operating environment as the current node, operating under normal conditions in the database synchronization system. The reference feature is the time-series characteristic of the reference node under normal operating conditions, serving as a benchmark for determining whether the current node is abnormal.
[0134] For example, we can first collect the temporal features of reference nodes under normal operating conditions to establish a reference feature library. For the temporal features of the current node, we calculate its similarity with the corresponding reference features in the reference feature library, for example, using methods such as cosine similarity or Euclidean distance. We then convert the similarity into node outliers; for example, the smaller the similarity, the larger the node outlier. For instance, node outlier = 1 - cosine similarity. The node outlier is used to measure the degree of difference between the temporal features of the current node and the reference features. The greater the difference, the larger the node outlier, and the more likely the node is to be anomaly.
[0135] For example, the outlier value of each node can be calculated using the following formula:
[0136]
[0137] in, For node v i outliers, C node Let c be the reference feature cluster center set (clustered by node type), and c be the reference feature cluster center. For node v i The temporal characteristics, For node v i The cosine similarity between the temporal features and the reference features of the corresponding reference node.
[0138] S602, based on the transmission link data of each transmission link at different sampling times, determine the link characteristics of each transmission link, and based on the similarity between the link characteristics of each transmission link and the reference link characteristics of the corresponding reference link, determine the outlier values of each link.
[0139] The reference link is a link of the same type and similar transmission conditions as the current transmission link under normal operating conditions of the database synchronization system. The reference link characteristics are those of the reference link under normal operating conditions, serving as a benchmark for determining whether the current transmission link is abnormal.
[0140] For example, transmission link data can be preprocessed, including outlier handling, standardization, and encoding, to obtain link features. These features characterize the state of the transmission link, such as a vector composed of preprocessed features like synchronization delay and packet loss rate. Furthermore, link features of reference links under normal operating conditions can be collected to establish a reference link feature library. The similarity between the current transmission link's features and the corresponding reference link features in the library is calculated, and this similarity is converted into link outliers. Link outliers are numerical values used to measure the degree of difference between the current transmission link's features and the reference link's features; the greater the difference, the larger the link outlier, and the more likely the link is to be abnormal.
[0141] For example, the outlier values for each link can be determined using the following calculation formula:
[0142]
[0143] Among them, C edge The reference link feature cluster center set (clustered according to link type) is used as the reference link feature cluster center set. To integrate edge features, For link Node association with outliers, This is the reference feature vector of the link. To enhance the cosine similarity between the current link's feature vector and the reference feature vector, , For link Two-end nodes v i and v j Node outliers.
[0144] S603, weighted average of the first mean value corresponding to the outlier value of each node and the second mean value corresponding to the outlier value of each link to obtain the global outlier value.
[0145] For example, a first mean of outliers across all nodes and a second mean of outliers across all links can be calculated. Furthermore, weights can be assigned to the first and second means based on the characteristics of the database synchronization system and actual needs; for example, the weight of the first mean can be set to 0.3 and the weight of the second mean to 0.7. Then, the results of multiplying the first mean by its weight and the second mean by its weight are added together to obtain the global outlier value.
[0146] For example, global outliers can be determined using the following formula:
[0147]
[0148] in, This is a global outlier. Let E be a set of nodes. t For a set of transmission links, For transmission links Outlier.
[0149] S604. Determine the database synchronization failure type based on at least one of the following: abnormal values of each node, abnormal values of each link, and global abnormal values.
[0150] For example, anomaly threshold ranges and fault type determination rules can be preset, and the fault type can be determined based on node anomalies, link anomalies, and global anomalies, combined with the determination rules.
[0151] For example, if a node's abnormal value is greater than 0.4 and all its associated links have abnormal values greater than 0.3, it is determined to be a node failure; if a link's abnormal value is greater than 0.4 and the corresponding node's abnormal value is less than 0.2, it is determined to be a single link failure; if at least two unrelated links have abnormal values greater than 0.4 and there is a common upstream node with an abnormal value greater than 0.3, it is determined to be a cross-link composite failure.
[0152] For example, an outlier threshold range can be preset, and then the outlier level can be determined according to the judgment rules. The specific judgment logic is as follows:
[0153] Mild abnormality: S node or S edge ∈[0.2, 0.4] or S glo ∈[0.15, 0.3];
[0154] Moderate abnormality: S node or S edge ∈[0.4, 0.6] or S glo ∈[0.3, 0.5];
[0155] Severe abnormality: S node or S edge >0.6 or Sglo >0.5.
[0156] Then, based on the anomaly level and anomaly type, a handling strategy can be determined. The specific implementation logic is as follows:
[0157] Management of minor abnormalities:
[0158] a. Single link failure: Automatically restart the CDC process for that link and record the failure log.
[0159] b. Nodes with light load but high load: Trigger node cache cleanup and prioritize scheduling low-load nodes to handle synchronization tasks.
[0160] Moderate abnormality management:
[0161] a. Node failure: Automatically switch all links associated with the node to the backup node and send an alarm to the terminal.
[0162] b. Cross-link anomaly: Temporarily reduce the synchronization priority of the abnormal link and allocate additional bandwidth to the critical link.
[0163] Severe abnormality management:
[0164] a. Global anomaly: Triggers a system-level emergency plan, suspends non-critical synchronization tasks, initiates multi-node collaborative expansion, and pushes alarms to personnel's mobile devices simultaneously.
[0165] In the above embodiments, by calculating node anomaly values and link anomaly values respectively, the specific location of the anomaly can be accurately located; by combining the first mean and the second mean to obtain the global anomaly value, the anomaly degree of the entire database synchronization system can be comprehensively reflected; based on node anomaly values, link anomaly values and global anomaly values, combined with preset judgment rules, different types of faults can be accurately identified, solving the problems of difficult root cause location and difficulty in distinguishing fault types in traditional technologies, providing a clear basis for anomaly handling, and helping to improve the efficiency of anomaly handling.
[0166] In some alternative implementations, see [link to relevant documentation]. Figure 7 , Figure 7 A flowchart illustrating the adjustment of a database synchronization mechanism is provided, specifically including the following steps:
[0167] S701, obtain the target data combination corresponding to multiple sampling times.
[0168] The target data combination corresponding to each sampling moment includes the temporal characteristics of each node, outliers of each node, outliers of each link, and global outliers, which can comprehensively reflect the status and abnormal situations of the database synchronization mechanism.
[0169] For example, the timing characteristics of each node, outliers of each node, outliers of each link, and global outliers of each sampling time can be collected in the order of sampling time, and these data can be combined to form the target data combination for each sampling time.
[0170] S702, the target data combination corresponding to multiple sampling times is input into the anomaly prediction model to obtain the prediction data combination and confidence level at different times in the future period.
[0171] Among them, the anomaly prediction model is a model used to predict abnormal situations of the database synchronization mechanism in the future. For example, it can be a model built based on bidirectional LSTM, graph attention temporal aggregation, etc.
[0172] For example, target data from multiple consecutive sampling times can be combined into an input sequence and input into a pre-trained anomaly prediction model. The model processes the input sequence, captures the temporal variation patterns and anomaly evolution trends of the data, and outputs the predicted data combinations and corresponding confidence levels for different times in the future period.
[0173] For example, the anomaly prediction model uses a bidirectional LSTM + graph attention temporal aggregation structure. The input is a sequence of target data combinations from the last 30 sampling times, and the output is a combination of predicted data and confidence scores for each time point every 10 seconds in the next 5 minutes.
[0174] The predicted data set consists of prediction results from the anomaly prediction model at different times within the future period, including the predicted time-series characteristics of each node, outliers of each node, outliers of each link, and global outliers. The confidence score is an evaluation value of the reliability of the predicted data set by the anomaly prediction model, ranging from 0 to 1. The higher the confidence score, the more reliable the prediction result.
[0175] S703 determines the target response strategy based on the combination and confidence level of predicted data at different times within the future period.
[0176] For example, response strategy judgment rules can be pre-set to determine the corresponding response strategy based on the predicted outliers and confidence levels in the predicted data combinations at different future times. For instance, if the predicted global outlier is greater than 0.3 and the confidence level is greater than 0.9 for more than 80% of the future time period, it is judged as a high-confidence prediction, corresponding to emergency preventive operations; if the predicted global outlier is in the range of [0.2, 0.3] for 50%-80% of the time period and the confidence level is greater than 0.8, it is judged as a medium-confidence prediction, corresponding to routine preventive operations; if the predicted global outlier is greater than or equal to 0.2 or the confidence level is less than or equal to 0.8 for less than 50% of the time period, it is judged as a low-confidence prediction, only the trend is recorded, and no specific operation is triggered.
[0177] Emergency preventative measures include activating backup resources 10 minutes in advance and real-time monitoring of the associated nodes or links of the anomaly sources corresponding to the predicted data combinations. Routine preventative measures include updating anomaly values every 5 seconds and increasing the feature collection dimensions for predicting anomaly sources. Feedback on the handling effect is also provided; for example, the anomaly value is recalculated within one minute after handling, and if S... glo If the decrease is greater than or equal to 50%, the action is deemed effective; otherwise, the action strategy is automatically adjusted, for example, switching to a backup plan.
[0178] S704 employs a target-response strategy to adjust the database synchronization mechanism.
[0179] The database synchronization mechanism is the configuration and process for data synchronization between databases, including priority settings for synchronization links, data transmission bandwidth allocation, and node task scheduling.
[0180] For example, the configuration of the database synchronization mechanism can be adjusted according to the determined target response strategy. For instance, emergency preventive operations may include activating backup resources in advance, suspending non-critical synchronization tasks, and initiating multi-node collaborative expansion; routine preventive operations may include updating the anomaly score every 5 seconds, increasing the feature collection dimensions for predicting anomaly sources, and temporarily increasing the synchronization priority of critical links.
[0181] In the above embodiments, anomaly prediction models are used to predict anomalies in the future and output confidence levels. This allows for the early prediction of potential anomalies and the development of targeted response strategies based on the prediction results and confidence levels. This enables proactive adjustments to the database synchronization mechanism, allowing for preventative measures that effectively reduce the probability of anomalies or mitigate their impact. Furthermore, different confidence levels correspond to different response strategies, resulting in more rational resource allocation and avoiding over- or under-prevention, thus further ensuring the stable operation of the database synchronization system.
[0182] In some optional implementations, the local feature extraction module, global feature extraction module, temporal feature extraction module, and anomaly prediction model in the above embodiments can be trained in the following ways:
[0183] Taking the data synchronization system as an example of the metering system synchronization network, we assume that the metering system synchronization network contains N nodes and M transmission links, and define the dynamic graph Gt=(Vt, Et, Xt, Et) as follows: feat ), where the node set Vt represents the active nodes at time t, and each node vi∈Vt contains 3 types of attributes:
[0184] a. Basic attributes: Node type, CPU load (%);
[0185] b. Related attributes: Number of access links, number of historical anomalies;
[0186] c. Status attributes: Data write throughput (MB / s), query response latency (ms);
[0187] The edge set Et represents the active synchronization link at time t, and each edge e ij ∈Et represents the synchronous link from node vi to node vj, which includes topology attributes (link priority: high / medium / low).
[0188] Node feature matrix Xt: dimension N×12;
[0189] Edge feature matrix Et feat Dimension M×8 (8-dimensional link characteristics: synchronization delay, packet loss rate, bandwidth utilization, CDC capture frequency, data consistency verification results, etc.);
[0190] Topology update mechanism: Scan the node / link status every 10 seconds, automatically add new active nodes / links to the graph structure, and remove offline nodes / links (such as when a temporary synchronization task ends) to ensure that Gt is consistent with the actual topology.
[0191] For small sample scenarios, a sample set is constructed based on topological similarity to reduce the dependence on annotation:
[0192] Normal graph samples: Select dynamic graph sequences {G1norm, G2norm, ..., GTnorm} (T≥10000, one time step every 10s) from the past 12 months without abnormal periods, and divide them into 3 sub-sample sets according to peak / flat / valley load;
[0193] Anomaly graph sample:
[0194] a. Real anomalies: Collect dynamic graphs of historically marked anomaly periods (including three types: single-link failure, node failure, and cross-link composite failure);
[0195] b. Synthetic anomalies: Controllable anomalies are injected into normal image samples to expand the number of anomalous samples to half the size of normal samples;
[0196] Sample balancing and enhancement: "Topology perturbation enhancement" (slightly adjusting the edge weights of normal graph samples, such as ±5% bandwidth utilization) is used to generate similar samples, so that the ratio of positive to negative samples is maintained at 1:2, and the total number of samples is ≥30,000.
[0197] For scenarios with small sample sizes and dynamic topology, a two-stage training and dynamic update mechanism is designed:
[0198] Two-stage training:
[0199] a. Pre-training (150 rounds): The local feature extraction module, global feature extraction module, temporal feature extraction module, and anomaly prediction model are trained using labeled samples and synthetic anomaly samples. The optimizer is AdamW (learning rate of 0.001, weight decay of 0.0005).
[0200] b. Fine-tuning (80 rounds): Incorporate a prediction task and use time-series dynamic graph samples for joint optimization, with a total loss L. total =0.6×Ldet+0.4×Lpred, where Ldet is the loss of the anomaly detection task, which measures the error of the model in identifying the current node, link, or global anomaly, and Lpred is the loss of the anomaly prediction model. The learning rate decays to 0.0001, and the topology cluster centers are adjusted every 20 rounds.
[0201] Dynamic updates and overfit suppression:
[0202] a. Online update: Fine-tune the model parameters every 7 days using newly added normal / abnormal samples (only update the fully connected layers and attention weights, taking <1 hour) to adapt to topology changes;
[0203] b. Overfit suppression: Early stopping (stop if the validation set loss does not decrease for 30 consecutive rounds), DropBlock (probability of 0.25, for graph features), and model ensemble (voting among 3 different initialization models, taking the majority result).
[0204] It should be understood that although the steps in the flowcharts of the embodiments described above 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 embodiments described above 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 of other steps.
[0205] Based on the same inventive concept, this application also provides a database synchronization anomaly monitoring device for implementing the database synchronization anomaly monitoring method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the database synchronization anomaly monitoring device provided below can be found in the limitations of the database synchronization anomaly monitoring method described above, and will not be repeated here.
[0206] In one exemplary embodiment, such as Figure 8As shown, a database synchronization anomaly monitoring device is provided, comprising:
[0207] The acquisition module 10 is used to acquire node data of each node participating in the synchronization at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times during the database synchronization process.
[0208] The first determining module 20 is used to determine the enhanced node features of each node at different sampling times based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes.
[0209] The extraction module 30 is used to extract features from the enhanced node features of each node at different sampling times to obtain the local and global features of the node at different sampling times; and to extract temporal features from the local and global features of the node at multiple sampling points to obtain the temporal features of the node.
[0210] The second determining module 40 is used to determine the abnormal monitoring results of database synchronization based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times.
[0211] The aforementioned data synchronization anomaly monitoring device, during database synchronization, acquires node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times. Based on the node data of each node and the transmission link data of each transmission link at different sampling times, it determines the enhanced node features of each node at different sampling times. Each enhanced node feature includes the node's initial node features and the initial node features of its neighboring nodes. For each node, feature extraction is performed on the enhanced node features at different sampling times to obtain the node's local and global features at different sampling times. Furthermore, temporal feature extraction is performed on the local and global features corresponding to multiple sampling points to obtain the node's temporal features. Based on the temporal features of each node and / or the transmission link data of each transmission link at different sampling times, the anomaly monitoring result of the database synchronization is determined. This scheme, in monitoring the database synchronization status, takes into account both node data and transmission link data, as well as the local and global features of the database synchronization system, thereby improving the accuracy of data synchronization status monitoring of the database synchronization system.
[0212] In one embodiment, the extraction module 30 includes:
[0213] The local extraction unit is used to extract local features of the enhanced node features at each sampling time, so as to obtain the local features of the node at the sampling time.
[0214] The global extraction unit is used to extract global features from the local features of the node at the sampling time and the local features of the node's neighboring nodes at the sampling time, so as to obtain the global features of the node at the sampling time.
[0215] In one embodiment, the local extraction unit is specifically used for:
[0216] For any neighboring node of a node, the features of the neighboring node are determined based on the node splicing features and the node weights. The node splicing features are the splicing results of the enhanced node features of the node at the sampling time and the enhanced node features of the neighboring nodes at the sampling time. The node weights are used to characterize the importance of the neighboring nodes to the node. Based on the neighboring node features of each neighboring node of the node, the local features of the node at the sampling time are determined.
[0217] In one embodiment, the global extraction unit is specifically used for:
[0218] Based on the local features of the node at the sampling time and the local features of the node's direct neighbors at the sampling time, the first mean feature of the node at the sampling time is determined; for each direct neighbor of the node, based on the local features of the direct neighbor node at the sampling time and the local features of the direct neighbor node's direct neighbors at the sampling time, the second mean feature of the direct neighbor node at the sampling time is determined; based on the first mean feature and the second mean features of each direct neighbor of the node, the global feature of the node at the sampling time is determined.
[0219] In one embodiment, the extraction module 30 is specifically used for:
[0220] The local and global features of a node at the same sampling time are concatenated to obtain the temporal concatenation feature of the node at each sampling time; the temporal features of the node are determined based on the temporal concatenation feature of the node at each sampling time.
[0221] In one embodiment, the anomaly monitoring results of database synchronization include the fault type; the second determination module 40 is specifically used for:
[0222] Outliers for each node are determined based on the similarity between the temporal characteristics of each node and the reference characteristics of the corresponding reference node. Link characteristics for each transmission link are determined based on the transmission link data at different sampling times, and outliers for each link are determined based on the similarity between the link characteristics of each transmission link and the reference characteristics of the corresponding reference link. A weighted average is applied to the first mean of each node's outlier and the second mean of each link's outlier to obtain a global outlier. The database synchronization failure type is determined based on at least one of the node outliers, link outliers, and global outliers.
[0223] In one embodiment, the device further includes an adjustment module for:
[0224] Obtain target data combinations corresponding to multiple sampling times; wherein, the target data combination corresponding to each sampling time includes the temporal characteristics of each node, outliers of each node, outliers of each link, and global outliers; input the target data combinations corresponding to multiple sampling times into the anomaly prediction model to obtain the predicted data combinations and confidence levels at different times in the future period; determine the target response strategy based on the predicted data combinations and confidence levels at different times in the future period; and adjust the database synchronization mechanism using the target response strategy.
[0225] Each module in the aforementioned data synchronization anomaly monitoring device 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.
[0226] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this 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 an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores database synchronization data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a data synchronization anomaly monitoring method.
[0227] Those skilled in the art will understand that Figure 9 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.
[0228] In one exemplary embodiment, a computer device is 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 of the data synchronization anomaly monitoring method described in any of the above embodiments.
[0229] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the data synchronization anomaly monitoring method described in any of the above embodiments.
[0230] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the data synchronization anomaly monitoring method described in any of the above embodiments.
[0231] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0232] 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.
[0233] 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.
[0234] 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 method for monitoring database synchronization anomalies, characterized in that, The method includes: During database synchronization, node data of each participating node at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times are obtained. Based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times, the enhanced node features of each node at different sampling times are determined; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes. For each node, feature extraction is performed on the enhanced node features of the node at different sampling times to obtain the local and global features of the node at different sampling times; and, Temporal features of the node are obtained by extracting local and global features corresponding to multiple sampling points. Based on the timing characteristics of each node and / or the transmission link data at different sampling times, the abnormal monitoring results of database synchronization are determined.
2. The method according to claim 1, characterized in that, The step of extracting features from the enhanced node features at different sampling times to obtain the local and global features of the node at different sampling times includes: For each sampling time, local feature extraction is performed on the enhanced node features of the node at that sampling time to obtain the local features of the node at that sampling time; Global features of the node at the sampling time are obtained by performing global feature extraction on the local features of the node and the local features of the neighboring nodes at the sampling time.
3. The method according to claim 2, characterized in that, The step of extracting local features from the enhanced node features of the node at the sampling time to obtain the local features of the node at the sampling time includes: For any neighboring node of the node, the neighboring node features are determined based on the node splicing features and the node weights; wherein, the node splicing features are the splicing results of the enhanced node features of the node at the sampling time and the enhanced node features of the neighboring node at the sampling time, and the node weights are used to characterize the importance of the neighboring node to the node; Based on the characteristics of the neighboring nodes of the node, the local characteristics of the node at the sampling time are determined.
4. The method according to claim 2, characterized in that, The step of extracting global features from the local features of the node at the sampling time and the local features of the node's neighboring nodes at the sampling time to obtain the global features of the node at the sampling time includes: Based on the local features of the node at the sampling time and the local features of the node's direct neighbor nodes at the sampling time, the first mean feature of the node at the sampling time is determined; For each of the direct neighbor nodes of the node, a second mean feature of the direct neighbor node at the sampling time is determined based on the local features of the direct neighbor node at the sampling time and the local features of the direct neighbor node's direct neighbor node at the sampling time. Based on the first mean feature and the second mean features of each of the node's direct neighbor nodes, the global features of the node at the sampling time are determined.
5. The method according to any one of claims 1-4, characterized in that, The step of extracting temporal features from the local and global features of the node at multiple sampling points to obtain the temporal features of the node includes: The local and global features of the node at the same sampling time are concatenated to obtain the temporal concatenation features of the node at each sampling time. The temporal characteristics of the node are determined based on the temporal splicing characteristics of the node at each sampling time.
6. The method according to any one of claims 1-4, characterized in that, The abnormal monitoring results of the database synchronization include the fault type; the determination of the abnormal monitoring results of the database synchronization based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times includes: Outliers for each node are determined based on the similarity between the temporal characteristics of each node and the reference characteristics of the corresponding reference node. Based on the transmission link data of each transmission link at different sampling times, the link characteristics of each transmission link are determined, and the outliers of each link are determined based on the similarity between the link characteristics of each transmission link and the reference link characteristics of the corresponding reference link. The first mean value corresponding to the outlier value of each node and the second mean value corresponding to the outlier value of each link are weighted to obtain the global outlier value. Determine the database synchronization failure type based on at least one of the following: abnormal values of each node, abnormal values of each link, and global abnormal values.
7. The method according to claim 6, characterized in that, The method further includes: Obtain the target data combination corresponding to multiple sampling times; wherein, the target data combination corresponding to each sampling time includes the temporal characteristics of each node, the outliers of each node, the outliers of each link, and the global outliers; The target data corresponding to multiple sampling times is combined and input into the anomaly prediction model to obtain the predicted data combination and confidence level at different times in the future period. Based on the combination and confidence level of the predicted data at different times within the future period, determine the target response strategy; The target response strategy is adopted to adjust the synchronization mechanism of the database.
8. A data synchronization anomaly monitoring device, characterized in that, The device includes: The acquisition module is used to acquire node data of each node participating in the synchronization at different sampling times and transmission link data of each transmission link involved in the synchronization process at different sampling times during the database synchronization process. The first determining module is used to determine the enhanced node features of each node at different sampling times based on the node data of each node at different sampling times and the transmission link data of each transmission link at different sampling times; wherein, each enhanced node feature includes the initial node features of the node and the initial node features of the node's neighboring nodes. The extraction module is used to extract features from the enhanced node features of each node at different sampling times to obtain the local features and global features of the node at different sampling times; and to extract temporal features from the local features and global features of the node at multiple sampling points to obtain the temporal features of the node. The second determining module is used to determine the abnormal monitoring results of database synchronization based on the timing characteristics of each node and / or the transmission link data of each transmission link at different sampling times.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.