Distribution network high-loss abnormality cause diagnosis method and system based on federal transfer learning, and medium
By employing federated transfer learning, combined with Bayesian hierarchical aggregation and pluggable patching strategies, this approach addresses multiple challenges in diagnosing high-loss anomalies in distribution networks. It enables accurate identification and rapid deployment of high-loss anomalies, thereby improving diagnostic accuracy and automation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID HUBEI ELECTRIC POWER RES INST
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-02
AI Technical Summary
In smart grids, the diagnosis of high-loss anomalies in distribution networks faces challenges such as spatial heterogeneity of data, scarcity of anomaly samples, privacy protection constraints, insufficient cross-regional model adaptability, lack of dynamic data adaptation capabilities, weak diagnosis of long-tail anomaly types, and insufficient automation. These issues result in low diagnostic accuracy, delayed response, and a conflict between privacy protection and model performance.
A federated transfer learning approach is adopted to divide the distribution network into regional clients. Data preprocessing and local training of a 1D-CNN+LSTM hybrid model are used. Model parameters are aggregated and dynamically updated by combining a Bayesian hierarchical aggregation center. A pluggable patch and fine-tuning training strategy are designed to achieve accurate identification of the causes of high loss anomalies.
It improves the diagnostic accuracy and adaptability of the model in different distribution network scenarios, enhances the ability to identify long-tail anomalies, meets data privacy compliance requirements, realizes efficient model collaboration and lightweight rapid deployment, and improves automation level and operation and maintenance efficiency.
Smart Images

Figure CN122133014A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grid technology, and in particular to a method, system and medium for diagnosing the causes of high loss anomalies in distribution networks based on federated transfer learning. Background Technology
[0002] In the context of smart grid construction, improving the operational efficiency of distribution networks has become a key aspect of the development of the energy internet. my country's distribution network has a wide coverage and complex operating environment, and abnormal line losses directly affect the economic efficiency and reliability of the power grid. High-loss anomalies, as a core pain point in distribution network operation, present multiple technical challenges in diagnosing their causes:
[0003] 1. Data spatial heterogeneity
[0004] my country's power distribution network exhibits significant regional variations. Regions with different climates, load characteristics, and equipment status show distinctly different distribution patterns in their operational data. For example, the eastern coastal areas exhibit consistently high load rates due to high load density, while the western regions may show intermittent fluctuations due to the integration of renewable energy sources. This spatial heterogeneity makes traditional centralized diagnostic models difficult to adapt to multi-regional scenarios.
[0005] 2. Scarcity of outlier samples
[0006] High-loss anomalies are low-probability events. In actual operation, the ratio of normal data to abnormal data is extremely high, and most abnormal samples are concentrated in a few typical causes (such as three-phase imbalance, equipment aging, etc.), forming a typical long-tail distribution. This sample imbalance makes the model's diagnostic ability for rare anomaly types significantly weaker than that for mainstream types.
[0007] 3. Privacy protection constraints
[0008] According to the Data Security Law and the power industry data classification and grading standards, distribution network operation data (such as equipment parameters and load curves) is sensitive information, and cross-regional data sharing requires strict de-identification and encryption. Traditional centralized modeling methods, which require centralized storage of raw data, are difficult to meet compliance requirements.
[0009] 1. Insufficient adaptability of cross-regional models
[0010] Existing federated learning schemes assume that data from each region follows an independent and identically distributed (IID) pattern. However, in reality, the causes of anomalies (such as load characteristics, equipment status, and the proportion of renewable energy access) vary significantly across different regions. This "one-size-fits-all" model aggregation strategy leads to "negative transfer" when applied across regions, resulting in decreased diagnostic accuracy.
[0011] 2. Lack of dynamic data adaptation capability
[0012] Existing technologies employ fixed-cycle parameter aggregation mechanisms (such as once a day), which cannot adapt to intraday fluctuations in distribution network load (such as load rate differences of up to 40% between morning and evening peak hours). Static aggregation strategies struggle to capture time-varying data characteristics, resulting in a delayed model response to sudden high-loss events.
[0013] 3. Weak diagnostic capabilities for long-tail anomalies
[0014] For anomaly types with small sample sizes (such as harmonic pollution and line losses caused by capacitor failure), existing solutions lack targeted optimization mechanisms, resulting in a significantly lower diagnostic recall rate compared to mainstream types (such as three-phase imbalance). This top-heavy diagnostic capability cannot meet the needs of comprehensive anomaly screening.
[0015] 4. The conflict between privacy protection and model performance
[0016] Traditional centralized methods require centralized storage of raw data, which violates the requirements of the Data Security Law; while existing federated learning schemes achieve data not leaving the domain, performance is lost due to the assumption of model homogeneity, forming a zero-sum game of "privacy protection - diagnostic accuracy".
[0017] 5. Insufficient level of automation
[0018] Solutions such as Bayesian networks require manual setting of prior parameters, while transfer learning solutions rely on a large amount of labeled data in the target domain. In actual deployment, high manpower costs are required for model optimization, making it difficult to scale up. Summary of the Invention
[0019] The purpose of this application is to provide a method, system, and medium for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning.
[0020] To achieve the above objectives, this application provides the following technical solution:
[0021] In a first aspect, embodiments of this application provide a method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning, comprising the following steps:
[0022] Client segmentation involves dividing the distribution network into N regions, with each region acting as a federated learning client to collect distribution network data from each region.
[0023] Data preprocessing: Through data preprocessing and feature engineering, a correlation analysis model between electrical characteristics and high-loss anomalies is established to provide high-quality input data for federated learning;
[0024] Local training: Each client uses a hybrid 1D-CNN+LSTM model for local training after data processing.
[0025] Bayesian hierarchical aggregation: The Bayesian hierarchical aggregation center is responsible for receiving model parameters or update information from clients in various regions, performing aggregation calculations to generate or update the global model, and taking into account the contributions and uncertainties of clients in various regions. By calculating weights, it reflects the importance of each client in the global model.
[0026] Migrate applications to accelerate the deployment of the global model to the target area client for diagnosis of the causes of high loss anomalies in the target area's distribution network.
[0027] The global model is deployed to the target area client at an accelerated pace to diagnose the causes of high loss anomalies in the target area's distribution network.
[0028] Model patch loading: For harmonic long-tail anomalies, a pluggable patch with a Fourier transform module is designed for the input layer; at the same time, based on the historical anomaly records of the target region, the Bayesian hierarchical aggregation center is connected to dynamically download and load the latest global model or patch to avoid retraining and save resources.
[0029] Fine-tuning training: The global model loaded is fine-tuned using local data on the client in the target region. The parameters are adjusted through further training to minimize the loss of local data. A method similar to federated training is used but with fewer iterations. The performance can be monitored during the process to adjust the training strategy and make the model more suitable for local conditions.
[0030] High-loss anomaly diagnosis: After model adaptation, multi-dimensional data of the distribution network is input, and the model infers and outputs the causes and corresponding probabilities of high-loss anomalies; then, it is verified through the test set, and finally the accurate identification and cause location of high-loss anomalies in the distribution network are achieved.
[0031] Data preprocessing specifically includes;
[0032] Data cleaning and repair: Noisy points were removed using anomaly detection based on the Local Outlier Factor (LOF), and missing values were filled using time-series linear interpolation to ensure data continuity.
[0033] Multidimensional feature construction: Based on basic electrical quantities, key derived features are constructed.
[0034] Three-phase imbalance: ,
[0035] in These represent the effective values of the currents in phases A, B, and C, respectively. The arithmetic mean of the three-phase currents Take the maximum absolute value of the deviation between the three-phase current and the average current. To calculate the three-phase current imbalance,
[0036] Load fluctuations: , Calculate the standard deviation of the active power sequence over a specified time period. This measures the absolute fluctuation of power, represents the average active power over the same time period, and represents the load fluctuation coefficient.
[0037] Feature selection: Features are quantized using the maximum mutual information coefficient (MIC). High-loss anomaly label Nonlinear correlation:
[0038] filter The features constitute the optimal feature subset ,
[0039] in This represents an input feature to be evaluated. The type label represents the high-loss anomaly. Representative will feature Label The grid into which the value range is divided. The maximum mutual information coefficient is calculated to be between [0,1].
[0040] MIC is a powerful measure of nonlinear correlation. It searches for the optimal grid partitioning and calculates the normalized value of mutual information under that partitioning. The closer the MIC value is to 1, the stronger the characteristic... Abnormal tags The stronger the correlation, the more likely it is that a threshold will be set. Select the feature subset most relevant to the diagnosis of high-risk abnormalities. This reduces data dimensionality, removes noise, and improves model efficiency and generalization ability.
[0041] Data normalization: Z-score normalization is performed locally on the client for the middle features: This eliminates the dimensions and provides stable input for local model training.
[0042] in It represents the specific numerical value of a feature at the original scale. This represents the average value of the feature on the current client's local training dataset. This represents the standard deviation of the feature on the current client's local training dataset. This represents the standardized feature value, i.e., the standard score.
[0043] After data processing, each client uses a hybrid 1D-CNN+LSTM model for local training.
[0044] Model input:
[0045] The input is of length Feature sequences ,
[0046] in This represents a complete input sample, and a sequence of electrical characteristics within a fixed time window. This represents the time step, which is the number of consecutive time points contained in a sample. Representative at the Feature vectors at each time point
[0047] 1D-CNN Local Feature Extraction: Extracting local features from sequences using one-dimensional convolution.
[0048] in This represents the operations of a one-dimensional convolutional neural network, including convolution, non-linear activation, and pooling operations. High-level feature maps representing the output of CNN layers.
[0049] LSTM temporal dependency modeling: The output is fed into the LSTM at time steps to capture long-term dependencies.
[0050] ,
[0051] in This represents the forward propagation process of the Long Short-Term Memory network. Represents the LSTM network at the last time step The hidden state encodes the contextual information of the entire input sequence.
[0052] Fully connected classification output: Mapping the LSTM output to the probability distribution of high-loss anomaly causes:
[0053] ,
[0054] in , This represents the weight matrix and bias vector of the fully connected layer. This represents the normalized exponential function, which transforms the output into a probability distribution. This represents the probability distribution vector predicted by the model, where each element corresponds to a confidence level for a high-loss anomaly cause.
[0055] Weighted loss function: To alleviate the imbalance problem of long-tailed samples, a weighted cross-entropy loss function is adopted.
[0056] ,
[0057] in The value represents the loss, measuring the difference between the model's prediction and the true label. Representing the Weights of class exceptions The one-hot encoding representing the true label, if the sample belongs to the first... The value is 1 if the condition is met, and 0 otherwise. The representative model predicts that the sample belongs to the first... The probability of a class
[0058] Training and Output: Each client optimizes the above loss through backpropagation, updates the local model parameters, and uploads the parameters to the Bayesian aggregation center. This hybrid structure takes into account both local features and long-term dependencies, providing a strong representational basis for subsequent federated aggregation and transfer diagnostics.
[0059] Bayesian hierarchical aggregation specifically refers to,
[0060] Global model parameters Parameters from each client The weighted average yields:
[0061] ,
[0062] Key weight formula:
[0063] Each client weight Calculated by the following formula:
[0064] ,
[0065] in The parameters represent the global model. No. Local model parameters for each client. No. The weight of each client in the aggregation, No. The lower the uncertainty of each client, the better. No. Local data sample size per client This represents the total data sample size across all clients, used for normalization based on data volume factors. Representing the The degree of difference between the local data distribution of each client and the overall global distribution. An adjustment parameter used to control data variance Sensitivity to the influence of weights
[0066] After training locally, each client, in addition to uploading the model parameters... Its uncertainty still needs to be assessed. and data distribution differences The aggregation center dynamically calculates the weight of each client in this round based on the above formula. Using a weighted average formula, all client parameters are aggregated to update the global model. ,
[0067] By quantifying the weights, the contribution of different regions determined by the amount of data and model determinism is automatically balanced with the risk determined by the differences in data distribution, making the generated global model more robust and regionally adaptable.
[0068] In the target region, the loaded global model is fine-tuned using local data on the client side. Further training is used to adjust parameters and minimize local data loss. A method similar to federated training is employed, but with fewer iterations. Performance can be monitored during the process to adjust the training strategy, making the model more adaptable to local conditions. The specific implementation process is as follows.
[0069] Data preparation
[0070] Using local data from the target region, the dataset is divided into training, validation, and test sets. Appropriate augmentation is applied to locally present long-tail anomaly samples to ensure the model maintains its ability to identify rare anomalies.
[0071] Model initialization and partial freezing
[0072] After loading the global model, the feature extraction layer is frozen, and only the final classification layer and pluggable patch modules configured for local regions, such as harmonic Fourier transform patches, are fine-tuned.
[0073] Lightweight iteration and early stop monitoring
[0074] The unfrozen portion is trained using a small learning rate. After each iteration, the performance is evaluated on the validation set. If the performance does not improve for several consecutive iterations, the process is automatically stopped early and the best model is retained.
[0075] Secondly, embodiments of this application provide a distribution network high loss anomaly cause diagnosis system based on federated transfer learning, including a memory and a processor. The memory includes a program for a distribution network high loss anomaly cause diagnosis method based on federated transfer learning. When the program for the distribution network high loss anomaly cause diagnosis method based on federated transfer learning is executed by the processor, it implements the steps of a distribution network high loss anomaly cause diagnosis method based on federated transfer learning as described above.
[0076] Thirdly, embodiments of this application provide a computer-readable storage medium storing program code, which, when executed by a processor, implements the steps of a method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning, as described above.
[0077] Compared with the prior art, the beneficial effects of the present invention are:
[0078] By dynamically balancing data differences across regions through a Bayesian hierarchical aggregation mechanism, the diagnostic accuracy and adaptability of the model in different power distribution network scenarios are effectively improved. The use of pluggable patches and targeted fine-tuning strategies significantly enhances the ability to identify the causes of long-tail anomalies with scarce samples. Under the premise of strictly meeting data privacy compliance requirements, efficient collaboration of model performance and lightweight rapid deployment are achieved, which greatly improves the automation level and operation and maintenance efficiency of high-loss anomaly diagnosis. Attached Figure Description
[0080] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0081] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0083] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0084] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0085] The terms “first,” “second,” etc., are used only to distinguish one entity or operation from another, and should not be construed as indicating or implying relative importance, nor as requiring or implying any such actual relationship or order between these entities or operations.
[0086] like Figure 1 As shown in the figure, this application provides a method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning, including the following steps:
[0087] Client segmentation involves dividing the distribution network into N regions, with each region acting as a federated learning client to collect distribution network data from each region.
[0088] Data preprocessing: Through data preprocessing and feature engineering, a correlation analysis model between electrical characteristics and high-loss anomalies is established to provide high-quality input data for federated learning;
[0089] Local training: Each client uses a hybrid 1D-CNN+LSTM model for local training after data processing.
[0090] Bayesian hierarchical aggregation: The Bayesian hierarchical aggregation center is responsible for receiving model parameters or update information from clients in various regions, performing aggregation calculations to generate or update the global model, and taking into account the contributions and uncertainties of clients in various regions. By calculating weights, it reflects the importance of each client in the global model.
[0091] Migrate applications to accelerate the deployment of the global model to the target area client for diagnosis of the causes of high loss anomalies in the target area's distribution network.
[0092] The global model is deployed to the target area client at an accelerated pace to diagnose the causes of high loss anomalies in the target area's distribution network.
[0093] Model patch loading: For harmonic long-tail anomalies, a pluggable patch with a Fourier transform module is designed for the input layer; at the same time, based on the historical anomaly records of the target region, the Bayesian hierarchical aggregation center is connected to dynamically download and load the latest global model or patch to avoid retraining and save resources.
[0094] Fine-tuning training: The global model loaded is fine-tuned using local data on the client in the target region. The parameters are adjusted through further training to minimize the loss of local data. A method similar to federated training is used but with fewer iterations. The performance can be monitored during the process to adjust the training strategy and make the model more suitable for local conditions.
[0095] High-loss anomaly diagnosis: After model adaptation, multi-dimensional data of the distribution network is input, and the model infers and outputs the causes and corresponding probabilities of high-loss anomalies; then, it is verified through the test set, and finally the accurate identification and cause location of high-loss anomalies in the distribution network are achieved.
[0096] Data preprocessing specifically includes;
[0097] Data cleaning and repair: Noisy points were removed using anomaly detection based on the Local Outlier Factor (LOF), and missing values were filled using time-series linear interpolation to ensure data continuity.
[0098] Multidimensional feature construction: Based on basic electrical quantities, key derived features are constructed.
[0099] Three-phase imbalance: ,
[0100] in These represent the effective values of the currents in phases A, B, and C, respectively. The arithmetic mean of the three-phase currents Take the maximum absolute value of the deviation between the three-phase current and the average current. To calculate the three-phase current imbalance,
[0101] Load fluctuations: ,
[0102] Calculate the standard deviation of the active power sequence over a specified time period to measure the absolute fluctuation of power. This represents the average active power over the same time period. Represents the load fluctuation coefficient.
[0103] Feature selection: Features are quantized using the maximum mutual information coefficient (MIC). High-loss anomaly label Nonlinear correlation:
[0104] ,
[0105] filter The features constitute the optimal feature subset ,
[0106] in This represents an input feature to be evaluated. The type label represents the high-loss anomaly. Representative will feature Label The grid into which the value range is divided. The maximum mutual information coefficient is calculated to be between [0,1].
[0107] MIC is a powerful measure of nonlinear correlation. It searches for the optimal grid partitioning and calculates the normalized value of mutual information under that partitioning. The closer the MIC value is to 1, the stronger the characteristic... Abnormal tags The stronger the correlation, the more likely it is that a threshold will be set. Select the feature subset most relevant to the diagnosis of high-risk abnormalities. This reduces data dimensionality, removes noise, and improves model efficiency and generalization ability.
[0108] Data normalization: Z-score normalization is performed locally on the client for the middle features: This eliminates the dimensions and provides stable input for local model training.
[0109] in It represents the specific numerical value of a feature at the original scale. This represents the average value of the feature on the current client's local training dataset. This represents the standard deviation of the feature on the current client's local training dataset. This represents the standardized feature value, i.e., the standard score.
[0110] After data processing, each client uses a hybrid 1D-CNN+LSTM model for local training.
[0111] Model input:
[0112] The input is of length Feature sequences ,
[0113] in This represents a complete input sample, and a sequence of electrical characteristics within a fixed time window. This represents the time step, which is the number of consecutive time points contained in a sample. Representative at the Feature vectors at each time point
[0114] 1D-CNN Local Feature Extraction: Extracting local features from sequences using one-dimensional convolution.
[0115] ,
[0116] in This represents the operations of a one-dimensional convolutional neural network, including convolution, non-linear activation, and pooling operations. High-level feature maps representing the output of CNN layers.
[0117] LSTM temporal dependency modeling: The output is fed into the LSTM at time steps to capture long-term dependencies.
[0118] ,
[0119] in This represents the forward propagation process of the Long Short-Term Memory network. Represents the LSTM network at the last time step The hidden state encodes the contextual information of the entire input sequence.
[0120] Fully connected classification output: Mapping the LSTM output to the probability distribution of high-loss anomaly causes:
[0121] ,
[0122] in , This represents the weight matrix and bias vector of the fully connected layer. This represents the normalized exponential function, which transforms the output into a probability distribution. This represents the probability distribution vector predicted by the model, where each element corresponds to a confidence level for a high-loss anomaly cause.
[0123] Weighted loss function: To alleviate the imbalance problem of long-tailed samples, a weighted cross-entropy loss function is adopted.
[0124] ,
[0125] in The value represents the loss, measuring the difference between the model's prediction and the true label. Representing the Weights of class exceptions The one-hot encoding representing the true label, if the sample belongs to the first... The value is 1 if the condition is met, and 0 otherwise. The representative model predicts that the sample belongs to the first... The probability of a class
[0126] Training and Output: Each client optimizes the above loss through backpropagation, updates the local model parameters, and uploads the parameters to the Bayesian aggregation center. This hybrid structure takes into account both local features and long-term dependencies, providing a strong representational basis for subsequent federated aggregation and transfer diagnostics.
[0127] Bayesian hierarchical aggregation specifically refers to,
[0128] Global model parameters Parameters from each client The weighted average yields:
[0129] ,
[0130] Key weight formula:
[0131] Each client weight Calculated by the following formula:
[0132] ,
[0133] in The parameters represent the global model. No. Local model parameters for each client. No. The weight of each client in the aggregation, No. The lower the uncertainty of each client, the better. No. Local data sample size per client This represents the total data sample size across all clients, used for normalization based on data volume factors. Representing the The degree of difference between the local data distribution of each client and the overall global distribution. An adjustment parameter used to control data variance Sensitivity to the influence of weights
[0134] After training locally, each client, in addition to uploading the model parameters... Its uncertainty still needs to be assessed. and data distribution differences The aggregation center dynamically calculates the weight of each client in this round based on the above formula. Using a weighted average formula, all client parameters are aggregated to update the global model. ,
[0135] By quantifying the weights, the contribution of different regions determined by the amount of data and model determinism is automatically balanced with the risk determined by the differences in data distribution, making the generated global model more robust and regionally adaptable.
[0136] In the target region, the loaded global model is fine-tuned using local data on the client side. Further training is used to adjust parameters and minimize local data loss. A method similar to federated training is employed, but with fewer iterations. Performance can be monitored during the process to adjust the training strategy, making the model more adaptable to local conditions. The specific implementation process is as follows.
[0137] Data preparation
[0138] Using local data from the target region, the dataset is divided into training, validation, and test sets. Appropriate augmentation is applied to locally present long-tail anomaly samples to ensure the model maintains its ability to identify rare anomalies.
[0139] Model initialization and partial freezing
[0140] After loading the global model, the feature extraction layer is frozen, and only the final classification layer and pluggable patch modules configured for local regions, such as harmonic Fourier transform patches, are fine-tuned.
[0141] Lightweight iteration and early stop monitoring
[0142] The unfrozen portion is trained using a small learning rate. After each iteration, the performance is evaluated on the validation set. If the performance does not improve for several consecutive iterations, the process is automatically stopped early and the best model is retained.
[0143] This application provides a distribution network high loss anomaly cause diagnosis system based on federated transfer learning, including a memory and a processor. The memory includes a program for a distribution network high loss anomaly cause diagnosis method based on federated transfer learning. When the program for the distribution network high loss anomaly cause diagnosis method based on federated transfer learning is executed by the processor, it implements the steps of a distribution network high loss anomaly cause diagnosis method based on federated transfer learning as described above.
[0144] This application provides a computer-readable storage medium storing program code. When executed by a processor, the program code implements the steps of a method for diagnosing high-loss anomalies in distribution networks based on federated transfer learning, as described above. Specific implementation examples:
[0146] Step 1: This project promotes lean operation and maintenance of high-loss distribution network diagnosis within a provincial power grid company. During implementation, it covers three typical scenarios: urban core distribution network areas, remote rural transformer areas, and dedicated distribution networks in industrial parks. A total of 12 federated clients were established (4 for each type of region), collecting six months of distribution network operation data (including 8 core characteristics such as distribution line load rate, transformer load rate, and three-phase imbalance), totaling 1.44 million data entries. Six types of high-loss anomalies were identified, with "three-phase imbalance" and "equipment aging" being high-frequency anomalies (72%), "harmonic pollution" and "capacitor faults" being long-tail anomalies (8%), and the remaining two being medium-frequency anomalies. The project utilizes existing application solutions such as "traditional centralized diagnosis methods" and "conventional federated learning diagnosis methods" commonly used in power grid operations. The method of this invention serves as the core solution adopted for project implementation, with a practical application verification period of 30 days.
[0147] Step 2: Cross-regional diagnostic accuracy verification
[0148] The existing solution 1 (traditional centralized method) requires centralized storage of raw data from 12 clients, but can only access 8 non-sensitive data clients (excluding 4 clients with sensitive device parameters). The actual average accuracy rate for cross-regional diagnosis is 78.3%. Among them, the accuracy rate in rural remote transformer areas is only 69.1% due to large differences in data distribution, while the accuracy rate in industrial park distribution networks is 82.5%, which cannot meet the needs of unified diagnosis in multiple regions.
[0149] Existing Solution 2 (conventional federated learning method): Although it achieves data not leaving the domain, it assumes that "data from each client is independent and identically distributed". The actual average accuracy of diagnosis for 12 clients is 81.5%; the accuracy difference between rural remote areas and urban core areas is 15.2 percentage points (90.3% in cities and 75.1% in rural areas). There is a significant "negative transfer" problem in the context of regional differences, and the adaptability is insufficient.
[0150] The solution of this invention (the core solution for project implementation) dynamically adjusts the weight of each client through a Bayesian hierarchical aggregation center (0.32 for urban clients, 0.28 for rural clients, and 0.4 for industrial parks). The actual average accuracy of diagnosis for 12 clients reaches 95.2%; the accuracy in remote rural areas is improved to 92.3%, and the difference with the core urban area (96.1%) is reduced to 3.8 percentage points, which is fully adapted to the differentiated scenarios in multiple regions.
[0151]
[0152] Step 3: Verification of the diagnostic effectiveness of long-tail anomalies
[0153] For two types of long-tailed anomalies, "harmonic pollution" and "capacitor failure," the recall rates of the three solutions were calculated (recall rate = number of correctly diagnosed long-tailed anomalies / total number of actual long-tailed anomalies). The results are as follows:
[0154] Existing Solution 1 (traditional centralized method): Due to the small number of long-tailed anomaly samples and insufficient model training, the actual average recall rate of the two types of anomalies is only 48.7%, of which the recall rate of "harmonic pollution" is only 39.2%, and a large number of long-tailed anomalies cannot be effectively identified.
[0155] Existing Solution 2 (conventional federated learning method): It does not have an optimization mechanism designed for long-tail anomalies. The actual average recall rate of the two types of anomalies is 52.3%, and the recall rate of "capacitor failure" is 55.1%. Compared with the existing Solution 1, there is no significant improvement, and it still cannot cover the needs of long-tail scenarios.
[0156] The solution of this invention (the core solution for project implementation) is to load a "harmonic feature patch" (adding a Fourier transform module to the input layer) and a "capacitor fault adaptation patch", which improves the actual average recall rate of two types of long-tail anomalies to 86.5%; among which, the recall rate of "harmonic pollution" is 83.7% and the recall rate of "capacitor fault" is 89.3%, which is 34.2 percentage points higher than the existing solution 2, achieving accurate diagnosis of all types of anomalies.
[0157]
[0158] Step 4: Verify deployment efficiency and resource consumption
[0159] Training time comparison: Existing solution 1 (traditional centralized) requires 48 hours / round for full data training, while existing solution 2 (conventional federated) requires 36 hours per round of aggregated training. The solution of this invention reduces the number of iterations during the fine-tuning stage (conventional federated requires 50 rounds of iteration, while this invention only requires 20 rounds), shortening the training time per round to 14 hours, saving 61.1% compared to existing solution 2, and significantly improving the efficiency of project implementation.
[0160] Computing resource consumption: The daily computing power consumption of the present invention per client is 2.8 GPUh, while that of the existing solution 2 is 6.3 GPUh, which reduces the computing power consumption of the present invention by 55.6%. Moreover, there is no need to manually set Bayesian prior parameters, and the end-to-end automated deployment reduces the manual optimization time from 8 person-days in the existing solution to 1 person-day, thereby reducing the project operation and maintenance costs.
[0161] Emergency response to sudden anomalies: During the verification period, a high-loss event of "capacitor failure" suddenly occurred in an industrial park. The existing solution 2 required 120 minutes from data acquisition to diagnostic output. Due to the dynamic aggregation strategy (real-time detection of data freshness and priority aggregation of abnormal data client parameters), the diagnostic output of the solution of this invention only takes 35 minutes, which improves the response speed by 70.8% and meets the emergency response needs of the power grid.
[0162] Step 5: Privacy Protection Compliance Verification
[0163] Data transmission volume: Existing scheme 1 requires the transmission of all raw data (12GB per day per client), and existing scheme 2 requires the transmission of all model parameters (2.5GB per day per client). The present invention only transmits the model update gradient and patch module (28MB per day per client). The data transmission volume is reduced by 99.77% compared to existing scheme 1 and by 98.88% compared to existing scheme 2, thus reducing data transmission risk.
[0164] Compliance: The data in this invention does not leave the domain at all and does not transmit any sensitive information (such as equipment parameters or user electricity load curves). It has been tested by a third-party compliance authority and fully complies with the requirements of the Data Security Law and the Power Industry Data Classification and Grading Standard. Existing Solution 1 failed the compliance test due to centralized storage of raw data and cannot be promoted in areas involving sensitive data.
[0165] This example, based on a real-world application scenario of a high-loss diagnosis project in a provincial power grid distribution network, addresses the practical problems of "significant differences in cross-regional distribution network data distribution, weak long-tail anomaly diagnosis, and difficulty in balancing privacy and performance." It verifies the core advantages of the method of this invention: the cross-regional diagnosis accuracy reaches 95.2%, the long-tail anomaly recall rate is improved to 86.5%, the deployment efficiency is improved by more than 61%, and it meets privacy compliance requirements. It is significantly superior to existing power grid application solutions and can support large-scale, precise diagnosis and maintenance of high-loss anomalies in distribution networks.
[0166]
[0167] By dynamically balancing data differences across regions through a Bayesian hierarchical aggregation mechanism, the diagnostic accuracy and adaptability of the model in different power distribution network scenarios are effectively improved. The use of pluggable patches and targeted fine-tuning strategies significantly enhances the ability to identify the causes of long-tail anomalies with scarce samples. Under the premise of strictly meeting data privacy compliance requirements, efficient collaboration of model performance and lightweight rapid deployment are achieved, which greatly improves the automation level and operation and maintenance efficiency of high-loss anomaly diagnosis.
[0168] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0169] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0170] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0171] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0172] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0173] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0174] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0175] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning, characterized in that, Includes the following steps: Client segmentation involves dividing the distribution network into N regions, with each region acting as a federated learning client to collect distribution network data from each region. Data preprocessing: Through data preprocessing and feature engineering, a correlation analysis model between electrical characteristics and high-loss anomalies is established to provide high-quality input data for federated learning; Local training: Each client uses a hybrid 1D-CNN+LSTM model for local training after data processing. Bayesian hierarchical aggregation: The Bayesian hierarchical aggregation center is responsible for receiving model parameters or update information from clients in various regions, performing aggregation calculations to generate or update the global model, and taking into account the contributions and uncertainties of clients in various regions. By calculating weights, it reflects the importance of each client in the global model. Migrate applications to accelerate the deployment of the global model to the target area client for diagnosis of the causes of high loss anomalies in the target area's distribution network.
2. The method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning according to claim 1, characterized in that, The global model is deployed to the target area client at an accelerated pace to diagnose the causes of high loss anomalies in the target area's distribution network. Model patch loading: For harmonic long-tail anomalies, a pluggable patch with a Fourier transform module is designed for the input layer; at the same time, based on the historical anomaly records of the target region, the Bayesian hierarchical aggregation center is connected to dynamically download and load the latest global model or patch to avoid retraining and save resources. Fine-tuning training: Fine-tuning the loaded global model on the target region client using local data, and minimizing local data loss by adjusting parameters through further training; It employs a federated training approach with fewer iterations, and allows for performance monitoring to adjust training strategies, making the model more adaptable to local conditions. High-loss anomaly diagnosis: After model adaptation, multi-dimensional data of the distribution network is input, and the model infers and outputs the causes and corresponding probabilities of high-loss anomalies; then, it is verified through the test set, and finally the accurate identification and cause location of high-loss anomalies in the distribution network are achieved.
3. The method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning according to claim 2, characterized in that, Data preprocessing specifically includes; Data cleaning and repair: Noisy points were removed using anomaly detection based on the Local Outlier Factor (LOF), and missing values were filled using time-series linear interpolation to ensure data continuity. Multidimensional feature construction: Based on basic electrical quantities, key derived features are constructed. Three-phase imbalance: , in These represent the effective values of the currents in phases A, B, and C, respectively. The arithmetic mean of the three-phase currents Take the maximum absolute value of the deviation between the three-phase current and the average current. To calculate the three-phase current imbalance, Load fluctuations: , Calculate the standard deviation of the active power sequence over a specified time period to measure the absolute fluctuation of power. This represents the average active power over the same time period. Represents the load fluctuation coefficient. Feature selection: Features are quantized using the maximum mutual information coefficient (MIC). High-loss anomaly label Nonlinear correlation: , filter The features constitute the optimal feature subset , in This represents an input feature to be evaluated. The type label represents the high-loss anomaly. Representative will feature Label The grid into which the value range is divided. The maximum mutual information coefficient is calculated to be between [0,1]. MIC is a powerful measure of nonlinear correlation. It searches for the optimal grid partitioning and calculates the normalized value of mutual information under that partitioning. The closer the MIC value is to 1, the stronger the characteristic... Abnormal tags The stronger the correlation, the more likely it is that a threshold will be set. Select the feature subset most relevant to the diagnosis of high-risk abnormalities. This reduces data dimensionality, removes noise, and improves model efficiency and generalization ability. Data normalization: Z-score normalization is performed locally on the client for the middle features: This eliminates the dimensions and provides stable input for local model training. in It represents the specific numerical value of a feature at the original scale. This represents the average value of the feature on the current client's local training dataset. This represents the standard deviation of the feature on the current client's local training dataset. This represents the standardized feature value, i.e., the standard score.
4. The method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning according to claim 2, characterized in that, After data processing, each client uses a hybrid 1D-CNN+LSTM model for local training. Model input: The input is of length Feature sequences , in This represents a complete input sample, and a sequence of electrical characteristics within a fixed time window. This represents the time step, which is the number of consecutive time points contained in a sample. Representative at the Feature vectors at each time point 1D-CNN Local Feature Extraction: Extracting local features from sequences using one-dimensional convolution. , in This represents the operations of a one-dimensional convolutional neural network, including convolution, non-linear activation, and pooling operations. High-level feature maps representing the output of CNN layers. LSTM temporal dependency modeling: The output is fed into the LSTM at time steps to capture long-term dependencies. , in This represents the forward propagation process of the Long Short-Term Memory network. Represents the LSTM network at the last time step The hidden state encodes the contextual information of the entire input sequence. Fully connected classification output: Mapping the LSTM output to the probability distribution of high-loss anomaly causes: , in , This represents the weight matrix and bias vector of the fully connected layer. This represents the normalized exponential function, which transforms the output into a probability distribution. This represents the probability distribution vector predicted by the model, where each element corresponds to a confidence level for a high-loss anomaly cause. Weighted loss function: To alleviate the imbalance problem of long-tailed samples, a weighted cross-entropy loss function is adopted. , in The value represents the loss, measuring the difference between the model's prediction and the true label. Representing the Weights of class exceptions The one-hot encoding representing the true label, if the sample belongs to the first... The value is 1 if the condition is met, and 0 otherwise. The representative model predicts that the sample belongs to the first... The probability of a class Training and Output: Each client optimizes the above loss through backpropagation, updates the local model parameters, and uploads the parameters to the Bayesian aggregation center. This hybrid structure takes into account both local features and long-term dependencies, providing a strong representational basis for subsequent federated aggregation and transfer diagnostics.
5. The method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning according to claim 2, characterized in that, Bayesian hierarchical aggregation specifically refers to, Global model parameters Parameters from each client The weighted average yields: , Key weight formula: Each client weight Calculated by the following formula: , in The parameters represent the global model. No. Local model parameters for each client. No. The weight of each client in the aggregation, No. The lower the uncertainty of each client, the better. No. Local data sample size per client This represents the total data sample size across all clients, used for normalization based on data volume factors. Representing the The degree of difference between the local data distribution of each client and the overall global distribution. An adjustment parameter used to control data variance Sensitivity to the influence of weights After training locally, each client, in addition to uploading the model parameters... Its uncertainty still needs to be assessed. and data distribution differences The aggregation center dynamically calculates the weight of each client in this round based on the above formula. Using a weighted average formula, all client parameters are aggregated to update the global model. , By quantifying the weights, the contribution of different regions determined by the amount of data and model determinism is automatically balanced with the risk determined by the differences in data distribution, making the generated global model more robust and regionally adaptable.
6. The method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning according to claim 2, characterized in that, In the target region, the loaded global model is fine-tuned using local data on the client side. Further training is used to adjust parameters and minimize local data loss. A method similar to federated training is employed, but with fewer iterations. Performance can be monitored during the process to adjust the training strategy, making the model more adaptable to local conditions. The specific implementation process is as follows. Data preparation Using local data from the target region, the dataset is divided into training, validation, and test sets. Appropriate augmentation is applied to locally present long-tail anomaly samples to ensure the model maintains its ability to identify rare anomalies. Model initialization and partial freezing After loading the global model, the feature extraction layer is frozen, and only the final classification layer and pluggable patch modules configured for local regions, such as harmonic Fourier transform patches, are fine-tuned. Lightweight iteration and early stop monitoring The unfrozen portion is trained using a small learning rate. After each iteration, the performance is evaluated on the validation set. If the performance does not improve for several consecutive iterations, the process is automatically stopped early and the best model is retained.
7. A distribution network high-loss anomaly diagnosis system based on federated transfer learning, characterized in that, The device includes a memory and a processor. The memory includes a program for a method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning. When the program for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning is executed by the processor, it implements the steps of the method for diagnosing the causes of high-loss anomalies in distribution networks based on any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which, when executed by a processor, implements the steps of a method for diagnosing the causes of high-loss anomalies in distribution networks based on federated transfer learning as described in any one of claims 1 to 6.