Power grid fault prediction method and system based on power grid fusion terminal

By using comparative learning and generative adversarial networks to process semantic differences in power grid convergence terminals, a spatiotemporal weighted graph is constructed. This solves the problem of mismatch between historical data and feature space of new versions in power grid convergence terminals during version iteration, and achieves deep fusion of dynamic and static data and improves the real-time performance and accuracy of fault prediction.

CN122020247APending Publication Date: 2026-05-12TONGCHUAN POWER SUPPLY CO OF STATE GRID SHAANXI ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TONGCHUAN POWER SUPPLY CO OF STATE GRID SHAANXI ELECTRIC POWER CO LTD
Filing Date
2026-01-27
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

During version iterations, the feature space of historical data and new versions of the power grid convergence terminal becomes mismatched. Dynamic and static data are difficult to integrate deeply due to spatiotemporal heterogeneity, resulting in decreased fault prediction accuracy and control strategy failure. Traditional methods cannot dynamically adapt to changes in power grid topology and data semantic drift, and cannot meet the requirements of new power systems for real-time performance, accuracy and scalability.

Method used

By adapting the data feature space of historical and current versions of the power grid convergence terminal, contrastive learning networks and generative adversarial networks are used to process semantic differences, a spatiotemporal weight graph is constructed, and fault prediction is performed by combining reinforcement learning and graph neural networks, thus achieving cross-version compatibility and deep coupling of dynamic and static data.

Benefits of technology

It achieves adaptive alignment of features across versions, improves the accuracy of fault prediction and the dynamic adaptability of control strategies, reduces the cost of manual annotation, ensures the efficient reuse of historical data in version iterations, and enhances the real-time performance and accuracy of power grid fault prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020247A_ABST
    Figure CN122020247A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid fault prediction method and system based on a power grid fusion terminal, and the method comprises the steps: obtaining a data feature set adaptive to a current version based on a data set of a historical version of the power grid fusion terminal and a data feature space of the current version; and obtaining a migration control strategy based on the data feature set adapted to the current version and the version upgrading strategy. The problem of data version compatibility of the power grid fusion terminal is solved. And fusing the static attribute data and the dynamic time sequence data into a space-time weight map based on the power grid topology, and performing fault prediction on the power grid based on the space-time weight map, thereby solving the problem of dynamic and static data deep coupling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a method and system for predicting power grid faults based on a power grid convergence terminal. Background Technology

[0002] As smart grids rapidly evolve towards digitalization and intelligence, grid convergence terminals, as core nodes for data acquisition and control, require frequent software version iterations to adapt to new equipment access and functional upgrades. However, version iterations lead to a mismatch between historical data and the feature space of new versions, and the spatiotemporal heterogeneity of dynamic and static data makes deep integration difficult, resulting in risks such as decreased fault prediction accuracy and control strategy failure. Traditional methods rely on static feature mapping tables or fixed-weight knowledge graphs, which cannot dynamically adapt to changes in grid topology and data semantic drift, making it difficult to meet the stringent requirements of new power systems for real-time performance, accuracy, and scalability. Therefore, constructing a cross-version compatible, deeply coupled collaborative architecture for dynamic and static data has become crucial to overcoming the technical bottlenecks of grid convergence terminals. Summary of the Invention

[0003] In view of the above problems, this invention proposes a power grid fault prediction method and system based on a power grid convergence terminal to solve the problems of cross-version compatibility and deep coupling of dynamic and static data in the power grid fault prediction process.

[0004] One technical solution of the present invention is:

[0005] A grid fault prediction method based on a grid convergence terminal, the method comprising: A data feature set adapted to the current version is obtained based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version. A migration control strategy is obtained based on the data feature set adapted to the current version and the version upgrade strategy. The data feature set adapted to the current version is divided into static attribute data and dynamic time-series data; Based on the power grid topology, the static attribute data and dynamic time-series data are fused into a spatiotemporal weighted graph; Fault prediction of the power grid is performed based on the spatiotemporal weighted graph.

[0006] Furthermore, the process of obtaining a data feature set adapted to the current version based on the historical version dataset of the power grid convergence terminal and the data feature space of the current version, and obtaining a migration control strategy based on the data feature set adapted to the current version and the version upgrade strategy, includes: Based on the feature vectors of historical versions of the power grid convergence terminal dataset and the data feature space of the current version, a semantic difference report between historical and current versions is obtained. Based on the semantic difference report, the feature vectors of the historical version of the dataset are processed so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version.

[0007] Furthermore, the semantic difference report between the historical and current versions of the dataset based on the feature vectors of the historical versions of the power grid convergence terminal dataset and the data feature space of the current version is obtained, including: The contrastive learning network is trained by using the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. The similarity matrix is ​​obtained by calculating the similarity between the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. Based on the similarity matrix, semantic drift features and dimensional change features of the feature vectors of historical versions of the dataset and the feature vectors of the current version of the dataset feature space are obtained.

[0008] Furthermore, the feature vector processing of the historical version of the dataset based on the semantic difference report, so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version, includes: A reinforcement learning-trained feature mapping model is used to minimize the reconstruction error in the current version's feature space and map the semantic drift features to the current version's data feature space. The dimension of the dimensional change feature is expanded by a generative adversarial network to be the same as the dimension of the data feature space of the current version. A policy transfer engine is built based on reinforcement learning, which obtains the appropriate policy by using the current version features of historical policy execution results; The adaptation strategy parameters are fine-tuned through transfer learning.

[0009] Furthermore, the fusion of the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology includes: The static data feature vector is obtained by encoding the static attribute data; The temporal features of the dynamic time series data are extracted by a long short-term memory network, and the statistical features of the dynamic time series data are statistically analyzed by a sliding window. The temporal features and statistical features are then concatenated to form a dynamic data feature vector. Based on the power grid topology, with the power grid fusion terminal as the node and the static data feature vector as the initial attribute of the node, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph.

[0010] Furthermore, the fault prediction of the power grid based on the spatiotemporal weighted graph includes: Node features are propagated through graph neural networks, and neighbor information is aggregated. The attention mechanism dynamically adjusts node importance and outputs a fault probability prediction. Faulty devices are located based on the edge weights and node features of the spatiotemporal weighted graph.

[0011] Furthermore, the policy transfer engine built based on reinforcement learning obtains the adapted policy by using the current version features of historical policy execution results, including: Merge the historical and new dimensions of the data feature set adapted to the current version to construct a new state space. Map the data feature set adapted to the current version to the new state space through a lightweight mapping network. Construct an action space based on the data feature set adapted to the current version. Reinforcement learning outputs the historical state action distribution and the new state action distribution based on a two-branch structure, and uses the policy gradient method to update the network parameters, with the optimization objective of maximizing the cumulative reward.

[0012] Furthermore, the static data feature vector obtained by encoding the static attribute data includes: Perform one-hot encoding on the static attribute data; Iterate through the static attribute data, count all unique categories, construct a category set, and determine the dimensions of the category set; Construct an encoding matrix based on the set of categories; The continuous attribute data in the encoding matrix are normalized. Static data feature vectors are generated by concatenating the data.

[0013] Furthermore, based on the power grid topology, with the power grid fusion terminal as the node and the static data feature vector as the initial node attribute, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph, including: Discrete static features are encoded or embedded using one-hot encoding, continuous features are normalized, and all features are concatenated. Spatial weights are constructed based on the initial edge weights calculated from the spatial distance between devices. Dynamic feature similarity is quantified by dynamic time warping algorithm, and dynamic weights are obtained by dynamically adjusting edge weights. A spatiotemporal weight graph is constructed by linearly weighting and fusing spatial and dynamic weights.

[0014] Based on the above-mentioned power grid prediction method, the present invention also provides a power grid fault prediction system based on a power grid convergence terminal, the system comprising: The cross-version data processing module is used to obtain a data feature set adapted to the current version based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version, and to obtain a migration control strategy based on the data feature set adapted to the current version and the version upgrade strategy. The data classification module is used to divide the data feature set adapted to the current version into static attribute data and dynamic time-series data; The data fusion module is used to fuse the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology; The fault prediction module is used to predict power grid faults based on the spatiotemporal weighted graph.

[0015] The power grid fault prediction method and system based on a power grid fusion terminal provided in this invention obtains a data feature set adapted to the current version based on the dataset of historical versions of the power grid fusion terminal and the data feature space of the current version. A migration control strategy is obtained based on the adapted data feature set and the version upgrade strategy, thus solving the data version compatibility problem of the power grid fusion terminal. Furthermore, the static attribute data and dynamic time-series data are fused into a spatiotemporal weighted graph based on the power grid topology, and fault prediction of the power grid is performed based on the spatiotemporal weighted graph, thus solving the problem of deep coupling between dynamic and static data.

[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0018] Figure 1 A detailed flowchart of the power grid fault prediction method based on a power grid convergence terminal provided in an embodiment of the present invention is shown.

[0019] Figure 2 A block diagram of a power grid fault prediction system based on a power grid fusion terminal provided in an embodiment of the present invention is shown. Detailed Implementation

[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0021] As a core node for data acquisition and control, the power grid convergence terminal requires frequent software version iterations to adapt to the access of new equipment and functional upgrades. However, version iterations lead to a mismatch between historical data and the feature space of the new version, and dynamic and static data are difficult to deeply integrate due to spatiotemporal heterogeneity, resulting in risks such as decreased fault prediction accuracy and control strategy failure. Traditional methods rely on static feature mapping tables or fixed-weight knowledge graphs, which cannot dynamically adapt to changes in power grid topology and data semantic drift, making it difficult to meet the stringent requirements of new power systems for real-time performance, accuracy, and scalability. Therefore, constructing a cross-version compatible, deeply coupled dynamic and static data collaborative architecture has become the key to overcoming the technical bottlenecks of the power grid convergence terminal. It faces the following two major challenges:

[0022] 1. The compatibility challenges of version iterations are deepening. When the power grid convergence terminal software is upgraded, the new version may introduce new feature dimensions (such as new sensor data), adjust feature semantics (such as changes in voltage threshold calculation logic), or optimize data structures (such as changes in time-series data sampling frequency), resulting in non-linear semantic drift between historical data and the feature space of the new version. Traditional feature mapping tables achieve data alignment through manually defined rules or linear transformations, but they cannot capture complex semantic relationships (such as the interaction between equipment status and environmental factors), and require frequent updates to mapping rules to adapt to version iterations, resulting in high maintenance costs. In addition, version upgrades may cause control strategy failures (such as protection setting mismatches). Traditional methods lack strategy migration mechanisms, requiring manual reconfiguration, which can easily lead to power grid accidents due to operational delays.

[0023] 2. The challenge of coupling static and dynamic data deepens. Grid convergence terminal data includes static attributes (such as equipment model and rated parameters) and dynamic data (such as real-time voltage, current, and temperature), exhibiting spatiotemporal heterogeneity: static attributes remain stable over the long term, but their correlation with dynamic data changes over time (e.g., threshold drift due to equipment aging); dynamic data is affected by spatial distribution (e.g., adjacent equipment failures may trigger cascading reactions). Traditional knowledge graphs construct equipment associations using static edge weights, failing to dynamically adjust weights to reflect spatiotemporal data changes, leading to biases in fault propagation path analysis. Furthermore, knowledge graphs lack temporal modeling capabilities, making it difficult to capture the trend characteristics of dynamic data (such as voltage fluctuation cycles), limiting the accuracy of fault prediction and condition assessment.

[0024] To address the aforementioned issues, the technical solution of this invention provides a power grid fault prediction method and system based on a power grid fusion terminal. This method obtains a data feature set adapted to the current version based on the datasets of historical versions of the power grid fusion terminal and the data feature space of the current version. A migration control strategy is then obtained based on the adapted data feature set and a version upgrade strategy, thus resolving the data version compatibility problem of the power grid fusion terminal. Furthermore, based on the power grid topology, the static attribute data and dynamic time-series data are fused into a spatiotemporal weighted graph. Fault prediction of the power grid is then performed based on this spatiotemporal weighted graph, resolving the problem of deep coupling between static and dynamic data.

[0025] Based on the above technical background and ideas, the specific implementation of the present invention includes the following:

[0026] Example 1:

[0027] refer to Figure 1 The power grid fault prediction method based on a power grid convergence terminal provided in this embodiment includes: S1, obtain a data feature set adapted to the current version based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version, and obtain a migration control strategy based on the data feature set adapted to the current version and the version upgrade strategy; S2, the data feature set adapted to the current version is divided into static attribute data and dynamic time series data; S3, based on the power grid topology, the static attribute data and dynamic time series data are fused into a spatiotemporal weighted graph; S4. Based on the spatiotemporal weighted graph, perform fault prediction on the power grid.

[0028] In step S1 of this embodiment, the historical version of the dataset includes at least feature vectors, labels, version identifiers, and other data, while the current version's data feature space includes at least newly added feature dimensions and semantic change descriptions, and the version upgrade strategy includes at least protection values ​​and logical rules.

[0029] The process involves obtaining a data feature set adapted to the current version based on the historical version dataset of the power grid convergence terminal and the data feature space of the current version, and then obtaining a migration control strategy based on the adapted data feature set and the version upgrade strategy, including: Based on the feature vectors of historical versions of the power grid convergence terminal dataset and the data feature space of the current version, a semantic difference report between historical and current versions is obtained. Based on the semantic difference report, the feature vectors of the historical version of the dataset are processed so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version.

[0030] The semantic difference report between the historical and current versions of the dataset based on the feature vectors of the historical version of the power grid convergence terminal and the data feature space of the current version includes: The contrastive learning network is trained by using the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. The similarity matrix is ​​obtained by calculating the similarity between the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. Based on the similarity matrix, semantic drift features and dimensional change features of the feature vectors of historical versions of the dataset and the feature vectors of the current version of the dataset feature space are obtained.

[0031] Specifically, the following steps can be used to achieve this: By using contrastive learning (such as Siamese networks) to calculate the similarity matrix between historical and current version feature vectors, data preparation and pairing are first performed. For unlabeled scenarios, all possible sample pairs are generated. ,common Yes, for each pair of samples, it is marked as "unknown" (similarity will be automatically learned through comparative learning later). For labeled scenarios, known matching sample pairs (such as historical and new version features of the same device) are used as positive samples, and randomly sampled non-matching sample pairs (such as features of different devices) are used as negative samples.

[0032] In this embodiment, the Siamese network structure design includes: A branch network design is adopted, with two branches sharing weights, processing historical and new version features respectively. The structure of each branch is as follows: Fully connected layer (FC) → Batch normalization (BN) → ReLU activation → Dimensionality reduction layer (e.g., ...) (Dimensions decreased to 64).

[0033] The similarity calculation layer includes concatenating the output features of the two branches. (History) and (New version) Calculates similarity scores using cosine similarity or Euclidean distance: (1); The loss function for the Siamese network structure is: (2); The Siamese network architecture uses the Adam optimizer with a learning rate of 1e-3 and a batch size of 32-128. The size is adjusted based on convergence performance, typically requiring 50-200 training epochs.

[0034] During the similarity matrix generation process, for all sample pairs Calculate using a trained Siamese network Constructing a matrix The rows correspond to historical samples, and the columns correspond to new version samples.

[0035] In this embodiment, identifying semantic drift features (dimensions with similarity below a threshold) and newly added feature dimensions can specifically be: (1) Dimensional similarity aggregation For each historical feature dimension Calculate its average similarity with all new version feature dimensions: (3); For each new version feature dimension Calculate its average similarity with all historical feature dimensions: (4); (2) Semantic drift feature recognition Threshold setting: Statistical analysis of all The distribution (e.g., 95th percentile) is used to set a threshold. (e.g., 0.7); if Then determine This is a semantic drift feature.

[0036] Verification and Classification: Based on the semantic change documentation, classify drift features (such as "change in meaning", "change in unit", "change in data distribution"); for features without documentation, mark them as "requires manual verification"; (3) New feature dimension recognition Comparison of the number of dimensions: If The new version has added dimensions; matching by feature name (e.g.) \ (or similarity matrix) The newly added dimension is identified by identifying columns with zero values ​​(no historical correspondence).

[0037] Business application speculation: Based on the new version of the business requirements document, analyze the purpose of the newly added features (such as "power factor" for optimizing scheduling); for features without description, calculate their correlation with historical features (such as Pearson correlation coefficient) and speculate on the historical dimensions that they may replace.

[0038] In this embodiment, the step of processing the feature vectors of the historical version of the dataset based on the semantic difference report, so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version, includes: A reinforcement learning-trained feature mapping model is used to minimize the reconstruction error in the current version's feature space and map the semantic drift features to the current version's data feature space. The dimension of the dimensional change feature is expanded by a generative adversarial network to be the same as the dimension of the data feature space of the current version. A policy transfer engine is built based on reinforcement learning, which obtains the appropriate policy by using the current version features of historical policy execution results;

[0039] The adaptation strategy parameters are fine-tuned through transfer learning.

[0040] The reinforcement learning-based policy transfer engine, which obtains the adapted policy through the current version features of historical policy execution results, includes: Merge the historical and new dimensions of the data feature set adapted to the current version to construct a new state space. Map the data feature set adapted to the current version to the new state space through a lightweight mapping network. Construct an action space based on the data feature set adapted to the current version.

[0041] Reinforcement learning outputs the historical state action distribution and the new state action distribution based on a two-branch structure, and uses the policy gradient method to update the network parameters, with the optimization objective of maximizing the cumulative reward.

[0042] Specifically, for drift features, reinforcement learning is used to train the feature mapping model, with the goal of minimizing the reconstruction error in the new version of the feature space; the specific environment and agent design adopts the following methodological framework:

[0043] environment: State space: Current historical features and intermediate results after mapping ; Action space: The direction of neural network parameter updates (e.g., the step size of gradient descent). and direction ); Transition probability: Update model parameters based on actions to generate new mapping results.

[0044] Intelligent agent: Policy Network: Input State Output action (e.g., parameter update amount); Optional structures: Deep Deterministic Policy Gradient (DDPG) or Proximal Policy Optimization (PPO), suitable for continuous action spaces.

[0045] Reward function design: Basic Rewards: (5); Unlabeled scene rewards: Using the similarity matrix Find the most similar new version sample The reward is: (6).

[0046] Training process: Initialization: Randomly initialize the mapping model and policy network parameters; Iterative optimization: For each historical sample Generate the current mapping result Obtain from similarity matrix or labeled data Calculate rewards And update the policy network (e.g., via the Actor-Critic structure of DDPG); Based on the action output by the policy network (renew (like Repeat until convergence (e.g., the reward stabilizes or the maximum number of rounds is reached).

[0047] Output mapping model: Save the trained model This is used to transfer historical features to the new version space.

[0048] In the above steps, expanding the dimension of the dimensional change feature to be the same as the dimension of the current version of the data feature space by a generative adversarial network includes the following steps: For the new features, synthetic data is generated using a generative adversarial network (GAN) to expand the historical dataset to match the new version dimensions.

[0049] Data preprocessing includes:

[0050] Feature alignment: and Alignment is performed by sample (e.g., matching by device ID); for samples that cannot be matched, the Siamese network similarity matrix is ​​used. Find the most similar pair.

[0051] Added dimension markers: for each new version sample Extract the new dimension values Constructing a real set of newly added features .

[0052] In this embodiment, the GAN structure design includes: Generator (G): Input data: historical features (dimension) ) + Random noise ; The structure is: Fully connected layer → Batch normalization → ReLU → Output layer (dimensions) ); The output data is: newly synthesized features .

[0053] Discriminator (D): Input data: the spliced ​​sample (Real or composite); The structure is: fully connected layer → LeakyReLU → output layer (Sigmoid activation, output probability) ); The output data is the probability that the sample is the real data.

[0054] In adversarial training, the loss function used is: Discriminator loss: (7); Optimizer: Adam, learning rates 2e-4 (D) and 1e-4 (G), batch size 64~128.

[0055] Training rounds: Alternately train D and G until the discriminator can no longer distinguish between real and synthetic samples (e.g., accuracy close to 50%).

[0056] Synthetic data generation and augmentation include: For each historical sample ,generate A newly added synthetic feature (such as ): (8); Expanding the historical dataset: (9); The final dimension is defined as follows: and All dimension.

[0057] In this embodiment, a policy transfer engine is built based on reinforcement learning. It takes historical policy execution results and new version features as input and outputs an adapted policy. The specific method is as follows:

[0058] Environment modeling and state alignment:

[0059] New state space definition: Merging historical state dimensions With new dimensions Construct a new state space For newly added states that cannot be directly observed, fill with zeros or initialize based on business rules (e.g., the default state of a newly added device is "off").

[0060] Define the state mapping function: Train a lightweight mapping network The process involves transforming historical states into a new space; the optimization objective is to minimize the semantic similarity difference between the mapped state and the new state (e.g., ...). ,in (The most similar sample in the new state).

[0061] Motion space expansion and adaptation:

[0062] Added motion handling: If the new version's motion space Includes new actions Define action extension functions ; on historical actions If there is no corresponding action in the new version, it will be mapped to the most similar action (e.g., by matching the similarity of action effects); for new actions, they will be initialized as random exploration or assigned based on business rules (e.g., the default threshold for new protection actions is the historical average).

[0063] Reinforcement learning policy transfer engine design: Policy network architecture: It adopts a two-branch structure, with the historical branch input mapping to the historical state. Output action distribution New branch input new state Output action distribution Shared underlying feature extraction layers (such as fully connected layers or LSTM) capture common patterns between states.

[0064] Reward function design: Basic Rewards: (10); (11);

[0065] The specific training process includes:

[0066] Pre-training phase: using historical data The policy network is trained with the optimization objective of maximizing cumulative reward. ( (This is a discount factor); freeze historical branch parameters and only update the random initial weights of new branches.

[0067] Transfer training phase: Collect interaction data in the new version environment (or simulation environment) Jointly optimize historical and new branches, with rewards as follows: Update network parameters using policy gradient methods (such as PPO) until the policy converges in the new version.

[0068] The output adaptation strategy is as follows: save the trained dual-branch policy network, and select the corresponding branch output action according to the input state type (historical or new version) during deployment.

[0069] Based on the above steps, it is also necessary to fine-tune the policy parameters through transfer learning to ensure that the upgraded protection settings and logic rules are compatible with the new version. Specifically, this includes: Constraint and rule coding, including: protection setpoint constraints, will Transformed into linear constraints of the policy output space (e.g.) For nonlinear constraints (such as dynamic thresholds), a neural network is used for approximation, and a loss function is incorporated. Logical rule encoding is used to... Transform into a logical expression (such as...) ); rules can be incorporated into training objectives using differentiable logic (such as neural symbolic systems) or reward shaping.

[0070] Design a fine-tuning policy network, including: loss function design: where the main task loss maximizes the cumulative reward. (12); The constraint loss is: (13); (14); Optimization methods: Use mini-batch gradient descent (e.g., Adam), set the learning rate to 1 / 10 of the pre-training phase (e.g., 1e-5); only update the last layer or specific layers of the policy network (e.g., constant correlation layers) to avoid catastrophic forgetting.

[0071] Rule validation and iterative correction include: Simulation verification: Run the fine-tuned strategy in the new version simulation environment. Record all protection setting exceedances and logical rule conflict events; if the verification passes (e.g., the number of exceedances < threshold), then deploy; otherwise, proceed to the next step.

[0072] Iterative correction: Adjust the constraint loss weights based on the verification results (e.g., increase the weights). Alternatively, use rule encoding methods; fine-tune the policy network until all constraints are met.

[0073] The output compatibility strategy is to save the final fine-tuned strategy. This ensures that the new version maintains the effective pattern of the historical strategy while strictly adhering to the protection setpoints and logic rules.

[0074] In step S2, the data feature set adapted to the current version is divided into static attribute data and dynamic time-series data. The static attribute data includes static data such as device model, rated parameters, and spatial location, while the dynamic time-series data includes data such as voltage, current, and temperature containing timestamps.

[0075] In step S3, the fusion of the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology includes: The static data feature vector is obtained by encoding the static attribute data; The temporal features of the dynamic time series data are extracted by a long short-term memory network, and the statistical features of the dynamic time series data are statistically analyzed by a sliding window. The temporal features and statistical features are then concatenated to form a dynamic data feature vector. Based on the power grid topology, with the power grid fusion terminal as the node and the static data feature vector as the initial attribute of the node, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph.

[0076] In this embodiment, the power grid topology can be data such as line connection relationships and equipment hierarchy.

[0077] The static data feature vector obtained by encoding the static attribute data includes: Perform one-hot encoding on the static attribute data; Iterate through the static attribute data, count all unique categories, construct a category set, and determine the dimensions of the category set; Construct an encoding matrix based on the set of categories; The continuous attribute data in the encoding matrix are normalized.

[0078] Static data feature vectors are generated by concatenating the data.

[0079] Specifically, the following steps are included: Count the number of categories: Traversal Count all unique categories and construct a category set. Determine the encoding dimensions (e.g., 3 equipment models) ).

[0080] Initialize the encoding matrix: Create an all-zero matrix The number of rows is the number of samples. The number of columns is the number of categories. .

[0081] Fill in the encoded values: for each sample Find its category in Index in (e.g., "Type B" corresponds to) );Will Set it to 1, and keep the rest at 0.

[0082] Handling unknown categories: If a category not seen in the training set appears in the test set (such as "Type D"), it can be handled by ignoring the sample (suitable for strict scenarios), assigning an all-zero vector (requires the model to be robust), or dynamically expanding the encoding dimension (requires retraining the model).

[0083] Normalization of continuous attributes (such as rated voltage) includes: Calculate statistics, including: calculate the minimum value of an attribute column. ; Calculate the maximum value .

[0084] Handling constant attributes (optional), if (If the rated voltage of all equipment is 220V), then directly assign the value to the midpoint of the interval (e.g.) Alternatively, retain the original value (the model must be able to handle constant features).

[0085] For each sample Linear normalization to [0,1], using the following formula: (15); Zoom to target range Optional): If scaling is required Further applications: (16); By concatenating features, a static feature vector is generated: If there is only one continuous attribute (such as rated voltage), then: (17); If there are multiple consecutive attributes (such as rated voltage and rated current), then: (18); For dynamic time-series data, the specific method used is to extract time-series features through a Long Short-Term Memory (LSTM) network to capture data trends and periodicity. The specific steps include: Data preprocessing: Normalization / standardization: Normalize time-series data according to feature dimensions (e.g., Min-Max or Z-score) to avoid the impact of numerical scale differences on training. Sequence padding: If sequence lengths are inconsistent (e.g., different runtimes on different devices), pad with zeros or truncate to a fixed length. .

[0086] Construct an LSTM model with the following parameters: Hidden layer dimension (h): typically 32-256, which needs to be adjusted using a validation set. Number of layers: 1-3 layers. Deeper LSTMs can capture more complex patterns, but may overfit. Follow the LSTM with a fully connected layer and train the model using a time-series prediction task (such as predicting the next time value) or a classification task (such as equipment fault detection). For unsupervised feature extraction, directly use a pre-trained LSTM (e.g., pre-trained on large-scale time-series data) to extract features; no task-driven approach is required.

[0087] The final time step features are: ( (Capture the final state of the sequence).

[0088] Global average pooling: ( (Balance information across all time steps).

[0089] Furthermore, feature representation is enhanced by incorporating sliding window statistics (such as mean and variance), including: Sliding window calculation of statistics: for each feature dimension ( ), calculate the following statistics within the window: mean, variance, maximum / minimum, and slope; Align time steps: If the sliding window step size Time step of statistical features It needs to be aligned to the original length through interpolation or repeated padding. .

[0090] Feature concatenation: The sliding window statistical features are concatenated with the LSTM features to form enhanced dynamic features. (19); In the above steps, if a fixed dimension is required, it can be... Perform global pooling (such as mean) before concatenating.

[0091] In this embodiment, based on the power grid topology, with the power grid fusion terminal as the node and the static data feature vector as the initial node attribute, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph, including: Discrete static features are encoded or embedded using one-hot encoding, continuous features are normalized, and all features are concatenated. Spatial weights are constructed based on the initial edge weights calculated from the spatial distance between devices. Dynamic feature similarity is quantified by dynamic time warping algorithm, and dynamic weights are obtained by dynamically adjusting edge weights. A spatiotemporal weight graph is constructed by linearly weighting and fusing spatial and dynamic weights.

[0092] The specific method is as follows: input static feature vector, dynamic feature vector and power grid topology, take the device as node, and the static feature vector as the initial attribute of the node; Equipment encoding involves one-hot encoding or embedding of discrete static features (such as equipment type); and normalization (Min-Max or Z-score) of continuous features (such as coordinates and rated power). All features are then concatenated to obtain... .

[0093] Node initialization, each device Corresponding to a node in the graph Its initial properties are For example: if the device has 3D static features (type, power, coordinates), then (One-hot encoding + normalized continuous value).

[0094] Edge weight allocation specifically includes: Spatial weights are calculated based on the spatial distance between devices (e.g., Euclidean distance); Euclidean distances are also calculated based on the geographical location of the devices (e.g., latitude and longitude) or topological location (e.g., circuit connections). Device location coordinates are extracted. (If there is no physical location, the coordinates after dimensionality reduction using static features can be used instead.) Calculate the Euclidean distance between any two devices: (20); Convert distance to similarity (e.g., using a Gaussian kernel function): (twenty one); :equipment and Spatial weights (similarity) between them; :equipment and Spatial distance between them (such as Euclidean distance); The bandwidth parameter of the Gaussian kernel controls the rate at which the weights decay with distance; Dynamic weights are applied by quantifying dynamic feature similarity using the Dynamic Time Warping (DTW) algorithm, and dynamically adjusting edge weights for each pair of devices. Calculate its dynamic feature sequence and DTW distance: (twenty two); Normalize the DTW distance to [0,1] (divide by the maximum possible distance) and convert it to similarity: (twenty three); Obtain the comprehensive weights, fuse the spatial and dynamic weights, and generate the final edge weight matrix. Specifically, spatial and dynamic weights can be linearly weighted and fused. (twenty four); In step S4, the fault prediction of the power grid based on the spatiotemporal weight map includes: Node features are propagated through graph neural networks, and neighbor information is aggregated. The attention mechanism dynamically adjusts node importance and outputs a fault probability prediction. Faulty devices are located based on the edge weights and node features of the spatiotemporal weighted graph.

[0095] Specifically, this could involve inputting a spatiotemporal weighted graph and historical fault labels, propagating node features through a graph neural network (GNN), and aggregating neighbor information.

[0096] Adjacency matrix normalization, edge weight matrix Perform symmetric normalization to avoid numerical instability: (25); Random walk normalization can also be used:

[0097] GNN layer propagation, this embodiment takes GCN as an example: the first Layer propagation formula: (26); In the initial layer, Static features Concatenate the dynamic characteristic mean (or other statistics).

[0098] Multiple layers superimposed, repeated propagation Next, multi-hop neighbor information is aggregated step by step at each layer (e.g., a 2-layer GCN can capture 2-hop neighbors).

[0099] By dynamically adjusting node importance using an attention mechanism, a fault probability prediction is output, including: Attention coefficient calculation, taking GAT as an example: For each pair of nodes Calculate attention score : (27); For nodes All neighbors The attention score is normalized using Softmax, with the following formula: (28); Weighted aggregation of neighbor information, nodes The updated embedding is a weighted sum of the neighbors, and the formula is: (29); Multi-headed attention will The outputs of each attention head are concatenated or averaged. Fault probability prediction is performed by embedding the final node. The failure probability is output through a fully connected layer and a sigmoid function: (30); The loss function is set as either cross-entropy loss (if fault labels are added) or weighted loss (if fault samples are sparse).

[0100] Faulty devices (such as high-probability nodes or nodes connected by critical edges) are located based on edge weights and node features, including: Faulty equipment screening includes: Direct method: Selecting the probability of failure Equipment: (31); Alternatively, one could consider the impact on neighbors (such as equipment). (average probability of neighboring faults) (32); Key edge location and edge weight selection And the edge where both ends of the device have a high probability of failure: (33); Achieve visualization by highlighting within the graph structure. Analyze the fault propagation path.

[0101] The specific comprehensive positioning strategy adopted is: Prioritize high-probability nodes and directly select devices with high-probability nodes as the initial fault point; Critical edge association analysis shows that if a device is connected to multiple high-probability nodes through multiple critical edges, it is more likely to be a source of failure. Subgraph extraction: Extract subgraphs containing high-probability nodes and key edges, and use community detection algorithms (such as Louvain) to locate faulty clusters.

[0102] Example 2:

[0103] refer to Figure 2 Based on the above-mentioned power grid prediction method, the present invention also provides a power grid fault prediction system based on a power grid convergence terminal, the system comprising: The cross-version data processing module is used to obtain a data feature set adapted to the current version based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version, and to obtain a migration control strategy based on the data feature set adapted to the current version and the version upgrade strategy. The data classification module is used to divide the data feature set adapted to the current version into static attribute data and dynamic time-series data; The data fusion module is used to fuse the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology; The fault prediction module is used to predict power grid faults based on the spatiotemporal weighted graph.

[0104] The specific implementation method of this embodiment is the same as that of Embodiment 1, and will not be repeated here. Please refer to the description of Embodiment 1 for details.

[0105] The methods and systems described above demonstrate significant advantages in technological advancement and application effectiveness compared to existing technologies. Cross-version feature adaptive alignment overcomes the limitations of existing technologies that rely on manually preset rules for feature mapping. It innovatively employs a dynamic semantic alignment network, automatically capturing semantic shifts in the feature space during software version upgrades through an unsupervised learning mechanism. This achieves adaptive, high-precision alignment of cross-version features, significantly reducing manual annotation costs and greatly improving version compatibility, ensuring efficient reuse of historical data in version iterations. Dynamic and static data fusion addresses the spatiotemporal heterogeneity problem that existing technologies have failed to effectively solve. It constructs a spatiotemporal weighted adaptive graph neural network, deeply coupling static device attributes with dynamic time-series data. Through dynamic time warping algorithms and spatial weight allocation mechanisms, it achieves accurate modeling of data correlations, improving fault prediction accuracy and response speed.

[0106] Those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting power grid faults based on a power grid convergence terminal, characterized in that, The method includes: A data feature set adapted to the current version is obtained based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version. A migration control strategy is obtained based on the data feature set adapted to the current version and the version upgrade strategy. The data feature set adapted to the current version is divided into static attribute data and dynamic time-series data; Based on the power grid topology, the static attribute data and dynamic time-series data are fused into a spatiotemporal weighted graph; Fault prediction of the power grid is performed based on the spatiotemporal weighted graph.

2. The grid fault prediction method based on a grid convergence terminal according to claim 1, characterized in that: The process involves obtaining a data feature set adapted to the current version based on the historical version dataset of the power grid convergence terminal and the data feature space of the current version, and then obtaining a migration control strategy based on the adapted data feature set and the version upgrade strategy, including: Based on the feature vectors of historical versions of the power grid convergence terminal dataset and the data feature space of the current version, a semantic difference report between historical and current versions is obtained. Based on the semantic difference report, the feature vectors of the historical version of the dataset are processed so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version.

3. The grid fault prediction method based on a grid convergence terminal according to claim 2, characterized in that: The semantic difference report between the historical and current versions of the dataset based on the feature vectors of the historical version of the power grid convergence terminal dataset and the data feature space of the current version is obtained, including: The contrastive learning network is trained by using the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. The similarity matrix is ​​obtained by calculating the similarity between the feature vectors of the historical version of the dataset and the feature vectors of the current version of the dataset. Based on the similarity matrix, semantic drift features and dimensional change features of the feature vectors of historical versions of the dataset and the feature vectors of the current version of the dataset feature space are obtained.

4. The grid fault prediction method based on a grid convergence terminal according to claim 2, characterized in that: The step of processing the feature vectors of the historical version of the dataset based on the semantic difference report, so that the feature vectors of the historical version of the dataset are mapped to the data feature space of the current version and have the same dimension as the data feature space of the current version, includes: A reinforcement learning-trained feature mapping model is used to minimize the reconstruction error in the current version's feature space and map the semantic drift features to the current version's data feature space. The dimension of the dimensional change feature is expanded by a generative adversarial network to be the same as the dimension of the data feature space of the current version. A policy transfer engine is built based on reinforcement learning, which obtains the appropriate policy by using the current version features of historical policy execution results; The adaptation strategy parameters are fine-tuned through transfer learning.

5. The grid fault prediction method based on a grid convergence terminal according to claim 1, characterized in that: The process of fusing the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology includes: The static data feature vector is obtained by encoding the static attribute data; The temporal features of the dynamic time series data are extracted by a long short-term memory network, and the statistical features of the dynamic time series data are statistically analyzed by a sliding window. The temporal features and statistical features are then concatenated to form a dynamic data feature vector. Based on the power grid topology, with the power grid fusion terminal as the node and the static data feature vector as the initial attribute of the node, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph.

6. The power grid fault prediction method based on a power grid convergence terminal according to claim 1, characterized in that: The fault prediction of the power grid based on the spatiotemporal weighted graph includes: Node features are propagated through graph neural networks, and neighbor information is aggregated. The attention mechanism dynamically adjusts node importance and outputs a fault probability prediction. Faulty devices are located based on the edge weights and node features of the spatiotemporal weighted graph.

7. The grid fault prediction method based on a grid convergence terminal according to claim 4, characterized in that: The policy transfer engine built based on reinforcement learning obtains the adapted policy by using the current version features of historical policy execution results, including: Merge the historical and new dimensions of the data feature set adapted to the current version to construct a new state space. Map the data feature set adapted to the current version to the new state space through a lightweight mapping network. Construct an action space based on the data feature set adapted to the current version. Reinforcement learning outputs the historical state action distribution and the new state action distribution based on a two-branch structure, and uses the policy gradient method to update the network parameters, with the optimization objective of maximizing the cumulative reward.

8. The grid fault prediction method based on a grid convergence terminal according to claim 5, characterized in that: The static data feature vector obtained by encoding the static attribute data includes: Perform one-hot encoding on the static attribute data; Traverse the static attribute data, count all unique categories, construct a category set, and determine the dimensions of the category set; Construct an encoding matrix based on the set of categories; The continuous attribute data in the encoding matrix are normalized. Static data feature vectors are generated by concatenating the data.

9. A grid fault prediction method based on a grid convergence terminal according to claim 5, characterized in that: Based on the power grid topology, using the power grid fusion terminal as a node and the static data feature vector as the initial node attribute, spatial weights and dynamic weights are set, and the spatial weights and dynamic weights are fused to construct a spatiotemporal weight graph, including: Discrete static features are encoded or embedded using one-hot encoding, continuous features are normalized, and all features are concatenated. Spatial weights are constructed based on the initial edge weights calculated from the spatial distance between devices. Dynamic feature similarity is quantified by dynamic time warping algorithm, and dynamic weights are obtained by dynamically adjusting edge weights. A spatiotemporal weight graph is constructed by linearly weighting and fusing spatial and dynamic weights.

10. A power grid fault prediction system based on a power grid convergence terminal, characterized in that: The system includes: The cross-version data processing module is used to obtain a data feature set adapted to the current version based on the dataset of the historical version of the power grid convergence terminal and the data feature space of the current version, and to obtain a migration control strategy based on the data feature set adapted to the current version and the version upgrade strategy. The data classification module is used to divide the data feature set adapted to the current version into static attribute data and dynamic time-series data; The data fusion module is used to fuse the static attribute data and dynamic time-series data into a spatiotemporal weighted graph based on the power grid topology; The fault prediction module is used to predict power grid faults based on the spatiotemporal weighted graph.