Power distribution network fault prediction method, system and equipment based on personalized region portrait, and medium
By combining personalized regional profiling and gated residual networks, the accuracy and generalization problems of existing distribution network fault prediction models in complex environments are solved, enabling accurate prediction of localized risks and improving the operation and maintenance efficiency and power supply reliability of the distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU POWER GRID CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-04-28
AI Technical Summary
Existing distribution network fault prediction models have low prediction accuracy and poor generalization ability when facing diverse and complex power grid environments. They are difficult to adapt to localized risk patterns and cannot meet the needs of modern distribution network lean operation and maintenance.
By constructing personalized regional profiles, clustering algorithms are used to divide distribution network lines into different regional categories. Combining static line attributes and semi-static environmental data, a sequence-to-sequence fault prediction model is trained. A gated residual network is used for context modulation, and dynamic operation data is integrated for fault prediction.
It improves the accuracy and generalization ability of distribution network fault prediction, can better adapt to localized risk patterns, meet the operation and maintenance needs of modern distribution networks, and ensure the stable operation of the power system and the reliability of power supply.
Smart Images

Figure CN121935718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system operation and maintenance technology, and in particular to a method, system, equipment and medium for predicting distribution network faults based on personalized regional profiles. Background Technology
[0002] As the final link in the power system, the distribution network directly serves a large number of electricity users, and its stability and reliability are crucial to social production and residents' lives. However, the current distribution network lines are widely distributed and operate in a complex and variable environment, often affected by factors such as severe weather, equipment aging, and external damage, leading to frequent faults.
[0003] Therefore, accurate prediction of power distribution network faults, early identification of high-risk lines, and implementation of preventative maintenance measures are key to improving power supply reliability and reducing operation and maintenance costs.
[0004] In recent years, with the development of artificial intelligence technology, using machine learning methods for power distribution network fault prediction has become a research hotspot. Existing technologies typically build prediction models based on parameter data such as historical fault data, equipment ledger data, and meteorological data. For example, some studies use recurrent neural network models such as Long Short-Term Memory (LSTM) networks or Gated Recurrent Units (GRUs) to capture the time-series dependencies of fault occurrence. These methods can only uncover the correlation between faults and dynamic operating parameters to a certain extent.
[0005] However, a significant limitation of existing fault prediction methods is that most of them train a uniform prediction model for the entire power grid or a large region. This approach ignores the significant heterogeneity of distribution networks across different geographical regions and environmental conditions. For example, lines in coastal areas are primarily threatened by typhoons and salt spray corrosion, while lines in inland mountainous areas may be more susceptible to icing and lightning strikes. Furthermore, the fault modes and causes of cable lines in urban centers and overhead lines in suburban and rural areas are quite different.
[0006] Furthermore, training a general model by mixing these line data with different characteristics together will only result in the model learning a rather vague fault mode, making it difficult to make accurate judgments on specific risks in specific areas.
[0007] Some existing methods attempt to use the static features of the power line as additional input to the model, simply concatenating them with time-series data before feeding them into the neural network. This simplistic feature fusion approach fails to effectively address the issue that the model's predictive logic should dynamically adjust based on the specific "scene" or "context" of the power line's location. In other words, a dynamic triggering factor (such as a Force 3 wind) has entirely different risk implications for an old overhead power line located in an open plain and a newly built cable line located in an urban complex. Existing models lack the ability to dynamically interpret risk signals in time-series data based on static context.
[0008] This context-independent prediction method leads to low prediction accuracy, poor generalization ability, and difficulty in adapting to localized risk patterns when facing diverse and complex power grid environments. As a result, it is impossible to meet the urgent needs of modern distribution network lean operation and maintenance. Summary of the Invention
[0009] In view of the aforementioned existing problems, the present invention is proposed.
[0010] Therefore, this invention provides a method, system, device, and medium for predicting distribution network faults based on personalized regional profiles, which can solve the problems of low prediction accuracy, poor generalization ability, and difficulty in adapting to localized risk patterns in existing distribution network fault prediction models.
[0011] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for predicting distribution network faults based on personalized regional profiles, comprising: Obtain historical operating data for multiple lines in the power distribution network; The historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data. Based on the static line attribute data and the semi-static environment data, a personalized regional profile is constructed for each line using a clustering algorithm; Based on the dynamic operating data and the personalized regional profile, a sequence-to-sequence fault prediction model is trained. The sequence-to-sequence fault prediction model includes an encoder and a decoder; Using the trained sequence-to-sequence fault prediction model, input the personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and output the fault probability of the target line within the future prediction time window.
[0012] As a preferred embodiment of the distribution network fault prediction method based on personalized regional profiles described in this invention, the step of constructing the personalized regional profile includes: For each line, a static feature vector is generated based on the line's static line attribute data and semi-static environment data; The static feature vectors of all lines are input into a clustering algorithm to divide the multiple lines into a preset number of regional categories, and each regional category corresponds to a regional profile identifier. The regional profile identifier of each route's region category is used as the personalized regional profile for that route.
[0013] As a preferred embodiment of the distribution network fault prediction method based on personalized regional profiles described in this invention, the step of training the sequence to form a sequence fault prediction model includes: The time series of dynamic running data of a certain training line within the backtracking time window is input into the encoder to obtain the encoder hidden state sequence; The personalized region profile of the training line is converted into a context embedding vector; The encoder hidden state sequence and the context embedding vector are input together into a gated residual network to generate a context-modulated key matrix and value matrix.
[0014] As a preferred embodiment of the power distribution network fault prediction method based on personalized regional profiles described in this invention, the decoder generates a query vector by linearly transforming the current hidden state during the prediction process. Attention weights are obtained by calculating the dot product similarity between the query vector and the context-modulated key matrix; The attention weights are applied to the context-modulated value matrix and then weighted and summed to obtain the context vector. The context vector is used as the input to the decoder at the current prediction time step to generate the fault probability at the current time step and the hidden state at the next time step. Repeat the decoder's prediction process until a complete sequence of failure probabilities for the future prediction time window is generated.
[0015] This preferred solution can make full use of the personalized regional profile information of the distribution network lines and combine it with dynamic operation data to predict faults.
[0016] As a preferred embodiment of the distribution network fault prediction method based on personalized regional profiles described in this invention, it further includes: The model parameters are optimized based on the loss between the fault probability sequence and the actual fault labels; The clustering algorithm is the K-means clustering algorithm; The preset number of region categories is determined by the minimum description length criterion; The goal of the minimum description length criterion is to minimize the total number of bits required to describe the data. The total number of bits includes the index cost used to encode cluster centers and the allocation relationship between lines and cluster centers, and the residual cost used to encode the deviation between each line and its respective cluster center; Both the encoder and the decoder are composed of gated loop units.
[0017] As a preferred embodiment of the distribution network fault prediction method based on personalized regional profiles described in this invention, the processing of the gated residual network includes: The first intermediate result is obtained by performing a first linear transformation on the main input data and the context embedding vector, and then adding them together. Apply the exponential linear unit activation function to the first intermediate result; A second linear transformation is performed on the main input data to obtain the second intermediate result; Multiply the activated first intermediate result element by element with the second intermediate result; The result of element-wise multiplication is passed through a dropout layer and then residually connected to the main input data. The result of the residual connection is then normalized to obtain the output of the gated residual network.
[0018] As a preferred embodiment of the distribution network fault prediction method based on personalized regional profiles described in this invention, in which: before using historical operating data for training, synthetic minority class oversampling technology is used to oversample the fault samples in the historical operating data so that the number of fault samples and the number of non-fault samples reach a set balance ratio. The static line attribute data includes the total line length, the proportion of cable length to the total line length, and the line's years of operation. The semi-static environmental data includes the regional characteristic type of the area where the line is located, the historical average icing thickness, and the standard deviation of the historical icing thickness. The dynamic operation data includes: data obtained by periodically encoding the time of day, date of week, and date of month; data obtained by uniquely encoding the weather conditions, wind direction, and wind force level; and data obtained by normalizing the average temperature and temperature difference.
[0019] Secondly, the present invention provides a power distribution network fault prediction system based on personalized regional profiles, comprising: The data acquisition module is used to acquire historical operating data of multiple lines in the distribution network; The historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data. The personalized regional profile acquisition module is used to construct a personalized regional profile for each line based on the static line attribute data and the semi-static environment data through a clustering algorithm. The model training module is used to train a sequence-to-sequence fault prediction model based on the dynamic running data and the personalized regional profile. The sequence-to-sequence fault prediction model includes an encoder and a decoder; The prediction module is used to take the trained sequence-to-sequence fault prediction model as input, the personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and output the fault probability of the target line within the future prediction time window.
[0020] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0021] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described above.
[0022] Compared with existing technologies, the beneficial effects of this invention are that it proposes a distribution network fault prediction method based on personalized regional profiles. At the methodological level, by constructing personalized regional profiles, it fully considers the heterogeneity of different geographical regions and environmental conditions within the distribution network. By clustering lines according to static line attribute data and semi-static environmental data, the model can accurately learn for different regional categories, avoiding the problem of general models learning fuzzy fault modes. This invention can effectively improve the accuracy and generalization ability of distribution network fault prediction, better adapt to localized risk patterns, meet the urgent needs of modern distribution network lean operation and maintenance, and provide strong technical support for ensuring the stable operation of the power system and improving power supply reliability. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 The present invention provides a flowchart of a method for predicting power distribution network faults based on personalized regional profiles, as an embodiment of the present invention.
[0025] Figure 2This is an internal structure diagram of an electronic device for a power distribution network fault prediction method based on personalized regional profiles, provided as an embodiment of the present invention. Detailed Implementation
[0026] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0027] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a method for predicting distribution network faults based on personalized regional profiles, including: This invention provides a method that can effectively solve the problems mentioned above. The following will describe in detail how to implement the distribution network fault prediction method based on personalized regional profiles, using multiple embodiments. Figure 1 A flowchart of a distribution network fault prediction method based on personalized regional profiles is shown, including: S101, acquire historical operating data of multiple lines in the distribution network; Historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data; In this embodiment of the invention, before using historical operating data for training, synthetic minority class oversampling technology is used to oversample fault samples in the historical operating data so that the number of fault samples and the number of non-fault samples reach a set balance ratio. Static line attribute data includes the total line length, the proportion of cable length to the total line length, and the line's years of operation; Semi-static environmental data includes the regional characteristics of the area where the line is located, the historical average icing thickness, and the standard deviation of the historical icing thickness; Dynamic operation data includes: data obtained by periodically encoding intraday time, intraweek date, and intramonth date; data obtained by uniquely encoding weather conditions, wind direction, and wind force level; and data obtained by normalizing average temperature and temperature difference.
[0028] S102, based on static line attribute data and semi-static environmental data, constructs a personalized regional profile for each line through a clustering algorithm; In an embodiment of the present invention, the step of constructing a personalized region profile includes: For each line, a static feature vector is generated based on the line's static line attribute data and semi-static environment data; The static feature vectors of all lines are input into a clustering algorithm to divide multiple lines into a preset number of regional categories, and each regional category corresponds to a regional profile identifier. The regional profile identifier of each route's region category is used as the personalized regional profile for that route.
[0029] In some embodiments, when constructing a personalized regional profile, static line attribute data and semi-static environmental data are first extracted for each distribution network line, and these data are combined to generate a static feature vector. For example, for the 10kV Liangzhu line, its static line attribute data includes a total line length of 14.615 kilometers, a low proportion of cable length to total line length, and a line service life of 8 years; the semi-static environmental data includes the line being located in a mountainous area under the jurisdiction of Jinshi Power Supply Station in Huaxi District, Guiyang City, a historical average icing thickness of 8.2 mm, and a standard deviation of historical icing thickness of 2.1 mm. These values, after standardization, constitute the static feature vector corresponding to the line.
[0030] In some embodiments, the static feature vectors of all lines are then uniformly input into the K-means clustering algorithm. The optimal number of clusters is automatically determined by the minimum description length criterion, thereby dividing all lines into several regional categories. For example, when clustering 2376 10kV distribution lines within the coverage area of a provincial power grid, the system automatically determines the optimal number of clusters to be 4, corresponding to four regional categories: "high icing risk mountainous areas," "coastal strong wind and salt spray areas," "urban high-load cable areas," and "plain old overhead areas." Each regional category corresponds to a unique regional profile identifier, namely ID0, ID1, ID2, and ID3.
[0031] In some embodiments, each line is further assigned a corresponding regional profile identifier based on its region category in the clustering results, serving as a personalized regional profile for that line. For example, the 10kV Liangzhu line is classified into category 3 during the clustering process due to its static feature vector, and is therefore labeled with regional profile identifier ID3, which is a "high-ice-risk mountainous area" profile. This profile identifier is used as a context embedding vector in the subsequent fault prediction model to guide the model to dynamically adjust its interpretation logic of risk signals in dynamic operating data.
[0032] The personalized regional profile here refers to category labels with clear risk semantics automatically generated by unsupervised clustering methods based on the long-term unchanging or slowly changing physical and environmental attributes of the line, used to characterize the typical fault causes of the operating environment of the line.
[0033] S103, based on dynamic operational data and personalized regional profiles, trains a sequence-to-sequence fault prediction model; In an embodiment of the present invention, the sequence-to-sequence fault prediction model includes an encoder and a decoder; In this embodiment of the invention, the steps of training a sequence-to-sequence fault prediction model include: The time series of dynamic running data of a certain training line within the backtracking time window is input into the encoder to obtain the encoder hidden state sequence; The personalized region profile of the training line is converted into a context embedding vector; The encoder hidden state sequence and context embedding vector are input together into a gated residual network to generate a context-modulated key matrix and value matrix.
[0034] In some embodiments, when training a distribution network fault prediction model based on personalized regional profiles, a training line is first selected, and dynamic operating data of that line within a backtracking time window is collected. For example, for the 10kV Liangzhu line, dynamic operating data for the past 72 hours can be obtained from the SCADA system, including hourly meteorological information such as temperature, humidity, and wind speed, as well as load information such as voltage, current, active power, and reactive power. After periodic encoding, one-hot encoding, and normalization, this data forms a time series tensor of shape (72, feature number).
[0035] In some embodiments, this time series tensor is input into an encoder consisting of multiple layers of bidirectional gated recurrent units (GRUs). The encoder reads the entire time series and progressively updates its internal state, ultimately outputting a series of hidden states that contain key information from the time series, but compressed into a more compact form. For example, the encoder might generate a sequence of hidden states of shape (72, hidden dimension), where each hidden state corresponds to a time step in the original time series.
[0036] In some embodiments, based on the previously determined personalized region profile, namely the "high-ice-risk mountainous area" identifier ID3 assigned to the 10kV Liangzhu line, it is transformed into a fixed-length context embedding vector through an embedding layer. This embedding vector is a learnable parameter that can gradually capture feature representations related to the region category during training.
[0037] In some embodiments, the hidden state sequence generated by the encoder is fed together with the context embedding vector into a gate control residual network (GRN). In this process, the context embedding vector serves not only as an additional input feature but also as a modulator of the main input data (i.e., the encoder hidden state sequence) to generate more refined and context-aware key and value matrices. For example, for each hidden state in the encoder hidden state sequence, the GRN adjusts it in conjunction with the context embedding vector so that the final key and value matrices reflect the risk patterns specific to that region's profile.
[0038] The gated residual network, by introducing a gating mechanism, allows contextual information to selectively influence the main data stream, thereby achieving a deep nonlinear transformation of historical operational data. This transformation aims to enhance key features associated with the current regional profile while suppressing irrelevant noise. This design enables the adaptive identification of unique fault precursor signals under different geographical regions and environmental conditions, even when using a unified model architecture.
[0039] In this embodiment of the invention, the processing procedure of the gated residual network includes: The first intermediate result is obtained by performing a first linear transformation on the main input data and the context embedding vector, and then adding them together. Apply the exponential linear unit activation function to the first intermediate result; A second linear transformation is performed on the main input data to obtain the second intermediate result; Multiply the activated first intermediate result element by element with the second intermediate result; The result of element-wise multiplication is passed through a dropout layer and then residually connected to the main input data. The result of the residual connection is then normalized to obtain the output of the gated residual network.
[0040] In some embodiments, when fusing the main input data and the context embedding vector in the gated residual network, a first linear transformation is performed on the main input data (i.e., each hidden state in the encoder's hidden state sequence). This transformation maps the original dimension to an intermediate dimension through a learnable weight matrix. Simultaneously, an independent linear transformation is also performed on the context embedding vector, projecting it to the same intermediate dimension space as the main input data after the first transformation. Subsequently, the two linearly transformed results are added element-wise to obtain the first intermediate result.
[0041] In some embodiments, an exponential linear unit (ELU) activation function is applied to the first intermediate result to introduce non-linear expressiveness and alleviate the gradient vanishing problem. For example, if an element in the first intermediate result is negative, the ELU maps it to a negative value close to zero but retaining the gradient; if it is positive, the original value is kept unchanged, thereby enhancing the model's sensitivity to dynamic features under different regional profiles.
[0042] In some embodiments, a second linear transformation is performed separately on the main input data. This transformation uses a different set of learnable parameters, and the output dimension is consistent with the aforementioned intermediate dimension, resulting in a second intermediate result. This step aims to preserve the original information paths in the main input data that are not modulated by context, serving as control signals for subsequent gating mechanisms.
[0043] In some embodiments, the first intermediate result after ELU activation is multiplied element-wise with the second intermediate result to form a gating mechanism: the second intermediate result acts as a gating weight, dynamically adjusting the intensity of the context-modulated features. For example, if the main input feature at a certain time step is considered important in a specific region profile, the corresponding gating weight is close to 1, retaining most of the modulated information; otherwise, irrelevant features are suppressed.
[0044] In some implementations, the result of element-wise multiplication is fed into a dropout layer to randomly zero out some neuron outputs, preventing overfitting. After the dropout operation, the result is residually concatenated with the original main input data, i.e., the two are directly added together, ensuring that key information from the original input is preserved even deep within the network.
[0045] In some embodiments, layer normalization is performed on the tensor after the residual connections to give it zero mean and unit variance in the feature dimension, improving training stability and accelerating convergence. This normalized tensor is the final output of the gated residual network for the current time step, used to generate context-aware key and value matrices.
[0046] Here, the main input data refers to a single hidden state vector in the encoder's hidden state sequence, and the context embedding vector refers to a fixed-dimensional vector obtained by mapping the personalized region profile identifier of the line through the embedding layer. The entire gated residual network achieves deep fusion of dynamic operation features and static region semantics through the above structure.
[0047] In an embodiment of the present invention, during the prediction process, the decoder generates a query vector by linearly transforming its current hidden state. Attention weights are obtained by calculating the dot product similarity between the query vector and the context-modulated key matrix. The attention weights are applied to the context-modulated value matrix and then weighted and summed to obtain the context vector. The context vector is used as input to the decoder at the current prediction time step to generate the failure probability at the current time step and the hidden state at the next time step. Repeat the decoder's prediction process until a complete sequence of failure probabilities for the future prediction time window is generated.
[0048] S104 uses a trained sequence-to-sequence fault prediction model, inputs a personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and outputs the fault probability of the target line within the future prediction time window.
[0049] In embodiments of the present invention, it further includes: The model parameters are optimized based on the loss between the fault probability sequence and the actual fault labels; The clustering algorithm is the K-means clustering algorithm; The preset number of region categories is determined by the minimum description length criterion; The goal of the minimum description length criterion is to minimize the total number of bits required to describe the data. The total number of bits includes the index cost used to encode cluster centers and the allocation relationship between lines and cluster centers, and the residual cost used to encode the deviation between each line and its respective cluster center; Both the encoder and decoder consist of gated loop units.
[0050] Example 2: Based on the above examples, a specific implementation of a distribution network fault prediction method based on personalized regional profiles can be designed as follows: The data sources required in this invention are extensive, mainly including power grid asset management systems, meteorological information systems, power grid geographic information systems, power grid dispatch automation systems, historical fault record systems, and special meteorological monitoring data, specifically: Power grid asset management systems (such as PMS) can provide static ledger information for lines, corresponding to fields in Table 1 such as line name, line code, municipal bureau, district / county bureau, power supply station, affiliated substation, line length (km), cable length (km), overhead length (km), whether it is a ring network, and commissioning date.
[0051] The meteorological information system can provide historical and real-time meteorological data related to the line's operating environment, including fields such as wind direction, wind force, weather, and temperature in Table 1. It also includes data such as humidity and rainfall, which are not fully shown in the appendix but are crucial in practical applications.
[0052] A Geographic Information System (GIS) for power grids can provide geospatial information about power lines, as well as environmental features along the lines, such as topography and vegetation cover. This information can be used to generate regional feature value fields, such as "rural", "urban", and "city".
[0053] The SCADA / DMS system can provide dynamic operating data for power lines, such as load information including voltage, current, and active / reactive power. Although not directly shown in the appendix data, this is an important component of the dynamic characteristics.
[0054] The historical fault record system can provide detailed information on historical fault events, including fault time, fault cause, and scope of impact, such as the running date (when the running status is "fault"), power outage event code, total number of affected distribution transformers, power outage duration (hours), number of households affected during the power outage, fault cause, and faulty equipment in Table 1.
[0055] Special meteorological monitoring data (such as online icing monitoring systems) can include detailed environmental monitoring data for specific regions (such as icy areas like Guizhou), corresponding to fields in Table 1 such as icing counties, minimum icing value, maximum icing value, icing table mean, and icing standard deviation.
[0056] Table 1 shows screenshots of the original data (the content is presented in three separate tables due to its large volume). Furthermore, after acquiring the raw data, feature engineering is required to transform it into structured features suitable for input to machine learning models. These features are then categorized into three types based on their stability: static features, semi-static features, and dynamic features. This classification forms the logical basis of the two-stage modeling method (first profiling, then predicting) of this invention. Static and semi-static features are used to construct stable, long-term regional profiles; dynamic features serve as input to time-series models to capture short-term risk fluctuations. Table 2 below shows examples of feature engineering and classification based on Table 1.
[0057] Table 2: Examples of Feature Engineering and Classification Furthermore, after feature engineering, the data needs to be preprocessed to meet the requirements of the model input.
[0058] Furthermore, for continuous numerical features such as Line_Length, Line_Age, and Temperature_Avg, their units and value ranges differ significantly. To eliminate the influence of units and prevent gradient instability during model training, a min-max normalization method is used to scale all numerical features to the [0,1] interval. The formula is as follows: in, The original value, and These are the minimum and maximum values of the feature in the training set, respectively.
[0059] Furthermore, data may be missing during actual collection. For numerical features, mean, median, or time-series-based interpolation methods can be used to fill in the missing data. For categorical features, they can be treated as an independent "unknown" category, or the most frequent category can be used for filling. In Table 1, the fault cause and faulty equipment fields of some fault records are empty (displayed as \0), which need to be specially handled or removed when constructing the fault type subdivision model.
[0060] Furthermore, the processed dynamic features are sorted according to line ID and timestamp to construct multiple independent time series. Each time series sample consists of a backtracking time window (e.g., data from the past 72 hours) and a prediction time window (e.g., labels for the next 24 hours). By sliding the window across the entire historical data, a large number of training samples can be generated.
[0061] It should be noted that, through the above steps, the original multi-source heterogeneous data is transformed into a structured and clean feature set, laying a solid foundation for the subsequent construction of personalized regional profiles and the training of fault prediction models.
[0062] Furthermore, the implementation process of the personalized regional profile generation module is described in detail. Its core task is to perform unsupervised clustering of all lines in the power grid based on the static and semi-static characteristics of the lines, thereby automatically discovering and defining regional profiles with different risk characteristics.
[0063] It's important to note that directly using traditional clustering algorithms, such as K-Means, presents a key technical challenge: the number of clusters, K, needs to be manually specified beforehand. The choice of K value has a significant impact on the clustering results. If K is too small, lines with significantly different characteristics may be incorrectly grouped into the same category, resulting in an overly coarse cluster profile that fails to reflect regional differences. If K is too large, the cluster profile will be too fragmented, leading to overfitting, loss of generalization ability, and difficulty in interpreting the business implications of the cluster profile. Relying on domain experts' experience to manually set the K value is not only highly subjective but also difficult to adapt to the actual conditions of different regional power grids, lacking scientific basis and adaptability.
[0064] Furthermore, to address the aforementioned issues, this embodiment employs an improved K-means clustering method, introducing the Minimum Description Length (MDL) criterion from information theory to automatically and objectively determine the optimal number of clusters. .
[0065] The core idea of the MDL principle is that the best model is the one that compresses the data most effectively, that is, describing the data with the shortest encoding length. In clustering problems, the total length describing the data consists of two parts: Model complexity cost (index cost) is the number of bits required to describe the clustering model itself. This cost is positively correlated with the K value; the more cluster centers there are, the longer the encoding required to describe the location of these centers and which center each data point belongs to.
[0066] Data fitting cost (residual cost) is the number of bits required to describe the difference between a data point and its cluster center, given a clustering model. This cost is negatively correlated with the K value; the more cluster centers there are, the closer the data points are to their centers, and the shorter the encoding required to describe this bias.
[0067] Therefore, the total description length It can be represented as: in, It's the cost of indexing. It is the residual cost. The goal of this method is to find a... , making Minimum. By iteratively calculating within a preset range of K values (e.g., from 2 to 20), the K value that minimizes the total description length is found, which is the optimal number of clusters.
[0068] Furthermore, all "static" and "semi-static" features are selected from Table 1, including Region_Type (after one-hot encoding), Line_Length, Cable_Ratio, Line_Age, Avg_Icing, Std_Icing, etc., to form a static feature vector for clustering.
[0069] Automatic K-value optimization: Define the search range for K, for example .
[0070] for For each K value, the standard K-means clustering algorithm is executed to obtain K cluster centers and the affiliation of each data point.
[0071] Furthermore, based on the clustering results, the corresponding total MDL cost is calculated. .
[0072] Compare the total cost corresponding to all K values and choose the one that makes K the most cost-effective. The smallest K value is used as the optimal number of clusters. .
[0073] Final clustering and profile generation: Furthermore, using a determined optimal number of clusters Then, the K-means clustering algorithm is performed again on the static feature vectors of all lines.
[0074] After the algorithm converges, we get Each cluster center is a stable cluster center, and each cluster center represents a prototype of a region profile.
[0075] Assign a unique region profile identifier (e.g., an integer 0, 1, 2, ...) to each cluster.
[0076] Furthermore, the cluster identifier assigned to each line is used as its "personalized regional profile" and stored in the line's file.
[0077] Furthermore, assuming that after performing the above algorithm on the dataset represented by Table 1, the optimal number of clusters is determined... By analyzing the central vector of each cluster, specific business meanings can be assigned to these four profiles.
[0078] It should be noted that, through this embodiment, the present invention not only scientifically classifies the routes, but more importantly, assigns each route a machine-readable "tag" with a clear risk connotation. This tag (profile ID) will serve as crucial "contextual" information in the next embodiment, guiding the predictive model to make more accurate judgments.
[0079] Furthermore, the core of this invention is a fault prediction model integrating a context-aware cross-attention mechanism, which details the internal structure and working principle of the context-aware fault prediction module. This module aims to solve the problem of how to deeply and effectively fuse static regional profile information with dynamic time-series data to achieve adaptive fault prediction.
[0080] First, consider a baseline model that does not incorporate the core improvements of this invention. This model employs a classic encoder-decoder architecture, where both the encoder and decoder consist of gated recurrent units (GRUs). The encoder is responsible for reading and compressing the input time-series data (such as weather and load data from the past 72 hours), generating a series of hidden states. The decoder, based on the encoder's final state, progressively generates a fault probability prediction for the next 24 hours.
[0081] Furthermore, to enable the model to utilize region profiling information, a common practice is to use the region profiling embedding vector along with the previous time step's prediction as input at each step of the decoder. However, this simple input concatenation method has a fundamental technical contradiction: Furthermore, to improve the prediction accuracy for specific regions, the model needs to learn the failure modes specific to that region. For example, in icy areas, the model should focus on the mode of "temperature close to zero degrees and humidity saturation".
[0082] To ensure the model's generalization ability and computational efficiency, a unified model must be used to process data from all regions, because training a separate model for each region is impractical.
[0083] It's important to note that when a unified model uses a conventional attention mechanism, the calculation of its attention weights relies solely on the similarity between the decoder's current state and all the encoder's hidden states. This process is independent of the regional profile of the cable line. This results in the model learning an "average" attention pattern across all regions, failing to "enhance" its focus on temperature and humidity changes for lines in icy areas, or on load surges for urban cable lines. This creates a technical contradiction between the model's generalization ability (unified structure) and its prediction specificity (personalized needs). The model either has strong generalization ability but is insensitive to local risks, or it is sensitive to local risks but cannot generalize.
[0084] Furthermore, to resolve the aforementioned technical contradictions, this invention proposes a novel context-aware cross-attention mechanism. Its core idea is to no longer treat the region profile as a regular input to the decoder, but rather as a "controller" or "modulator," dynamically altering the temporal information representation of the encoder output during the core attention calculation stage. In this way, when the decoder "sees" historical data, the content it "sees" has already been "preprocessed" by the region profile, thus achieving context-aware attention.
[0085] The implementation of this mechanism relies on a key component: the Gated Residual Network (GRN). A GRN is a neural network module that allows external context information to selectively act on the main data stream.
[0086] Furthermore, the forward propagation process of the fault prediction model integrating this mechanism is described in detail.
[0087] Define encoder input, a certain line goes Dynamic feature sequence at each time step ,in .
[0088] Determine the region profile ID, the profile identifier to which this line belongs, for example... .
[0089] Determine the decoder input, in the prediction of the first... When the time is a future time, the input is the previous time. Predicted probability .
[0090] The encoding stage is a dynamic feature sequence. The input is fed into a multi-layer bidirectional GRU encoder to obtain the forward and backward hidden states at each time step. These hidden states are then concatenated to obtain the final output hidden state sequence of the encoder. ,in .
[0091] The context embedding stage is to embed the region profile ID It is transformed into a dense context embedding vector through an embedding layer. This embedding vector is trainable; during training, it learns a numerical representation of the image for each region.
[0092] The specific steps of context-aware cross-attention computation are as follows in each prediction step of the decoder: A context vector needs to be calculated. .
[0093] The current hidden state of the decoder during the decoder query process. After a linear transformation, a query vector is generated. : in It is a trainable weight matrix.
[0094] Furthermore, GRN generates context-aware keys and values, a fundamental difference from standard attention mechanisms. The encoder outputs the entire sequence of hidden states. will be with context embedding vector The inputs are fed into two separate gated residual networks (GRNs) to generate context-aware key matrices. Sum matrix .
[0095] The computation process of a GRN is as follows, with its input being the main data stream. and context data : in, Indicates a fully connected layer. It is an exponential linear unit activation function. It is the Sigmoid activation function. This indicates element-wise multiplication.
[0096] Applying GRN: Then, the final key and value matrix is obtained through linear transformation: in and It is a trainable weight matrix.
[0097] Furthermore, the attention weights and context vector are computed: using the standard scaled dot product attention formula, but with context-modulated keys and values: in It is the attention weight vector, representing the region profile. In this context, the decoder at time We should pay attention to historical sequences Which parts of it?
[0098] Furthermore, the decoding stage will use the context vector obtained in the previous step. Compared with the predicted value at the previous moment The concatenation is used as input to the current time step decoder GRU to calculate the current hidden state. .
[0099] Furthermore, hide the decoder state. The failure probability at the current time step is obtained through a fully connected layer and a sigmoid activation function. .
[0100] Repeat this process until a sequence of failure probabilities for the entire prediction time window is generated.
[0101] Furthermore, the reason this context-aware cross-attention mechanism can resolve the technical contradiction is that it performs a deep non-linear interaction between the originally independent static profile information and dynamic temporal information, rather than a simple linear superposition. The gating structure in GRN ( Allow context vectors Dynamically control which time step information (from) It can pass. If the portrait This indicates that the current route is sensitive to wind. The GRN will learn during training to amplify hidden state components related to drastic wind changes while suppressing other irrelevant information. The GRN... The transformation is highly nonlinear, equivalent to changing according to the context. The original hidden state space is dynamically mapped to a new, more discriminative feature space. In this new space, fault precursor features relevant to the current region profile are amplified, while irrelevant noise is suppressed.
[0102] Ultimately, although the entire system uses a single unified prediction model, the internal information flow and feature representations are completely different for routes with different profiles. The model learns context embedding vectors. With the parameters of GRN, it learned how to execute different "analysis programs" based on different "instructions" (portrait IDs). This is like a versatile expert who, when faced with different types of patients (regional portraits), can automatically call upon different diagnostic knowledge (attention patterns) to analyze the condition (time series data).
[0103] It should be noted that, in this way, the present invention, without increasing the number of models and maintaining the simplicity of the system, endows the model with the ability to make adaptive predictions based on different regional profiles, thus perfectly resolving the aforementioned technical contradictions.
[0104] Furthermore, a training set is constructed using historical data and a sliding window method. For example, the backtracking window length is set to 72 hours, and the prediction window length is set to 24 hours. Dynamic features from hours 1 to 72 of the time-series data of a single route are extracted as model input. Simultaneously, fault labels from hour 73 to hour 96 were extracted as the target. Then the window slides forward one hour, capturing data from hour 2 to hour 73 as input for the next sample, and so on.
[0105] It's important to note that power distribution networks operate normally most of the time, with fault events being low-probability events. In actual full-scale operational data, the ratio of normal samples (labeled 0) to fault samples (labeled 1) can be several thousand to one or even higher. Training directly with such a highly imbalanced dataset will cause the model to tend to predict all samples as "fault-free," as this would achieve extremely high accuracy scores. However, the model will completely lose its ability to predict real-world faults, which is unacceptable in practical applications.
[0106] Furthermore, in order to address the data imbalance problem, this embodiment uses the Synthetic Minority Oversampling Technique (SMOTE) to process the training dataset before model training.
[0107] The basic process of the SMOTE algorithm is as follows: Based on the ratio of the majority class to the minority class in the original data, determine the number of new samples needed to synthesize for the minority class. For example, the goal is to achieve a positive to negative sample ratio of 1:1.
[0108] Furthermore, for each fault sample (minority class sample) In the feature space, find its The most recent similar (fault) sample (usually) ).
[0109] Furthermore, from this Randomly select a sample from its nearest neighbors. .
[0110] Furthermore, in the sample and On the line connecting the points, randomly select a point as the newly synthesized sample. : in It is a random number between 0 and 1.
[0111] Furthermore, repeat the above steps until the number of minority class samples reaches the preset target number.
[0112] Furthermore, through SMOTE, this invention does not simply replicate fault samples (which would lead to overfitting), but instead creates new, "reasonable" fault samples in the feature space that are similar to but not exactly the same as the original fault samples. This greatly enriches the model's learning of fault patterns, forcing the model to focus on features of the minority class, thereby significantly improving the ability to detect real faults.
[0113] Furthermore, the balanced training set processed by SMOTE is input into the context-aware fault prediction model of Example 3. The Adam optimizer is used with binary cross-entropy as the loss function, and multiple rounds of iterative training are performed. During training, a learning rate decay strategy is employed, and an early stopping mechanism is implemented to prevent overfitting.
[0114] Furthermore, for sequence prediction tasks, the total loss is a weighted sum of the losses at each time step within the prediction time window. Higher weights can be assigned to prediction steps closer to the current time.
[0115] Furthermore, given the inherent imbalance of data, in addition to accuracy, more attention should be paid to precision, recall, F1 score, and the area under the ROC curve. High recall means the model can successfully identify most real-world faults, which is crucial in fault warning scenarios.
[0116] The following example, using the 10kV Liangzhu line in Table 1, demonstrates a complete fault prediction reasoning process.
[0117] Step 1: Obtain route profile and context The query system shows that the 10kV Liangzhu line is located at the Guiyang Power Supply Bureau-Huaxi-Jinshi Power Supply Station, with a line length of 14.615km, an overhead length of 13.336km, and a low cable coverage rate. Based on the clustering results of Example 2, this line was assigned a profile ID3, namely "high icing risk mountainous area". The context embedding vector corresponding to profile ID3 was extracted from the model's embedding layer. .
[0118] Step 2: Prepare dynamic data input Dynamic operational data for the 10kV Liangzhu line within the 72 hours prior to the current time (e.g., 18:00 on January 9, 2021) was obtained from SCADA and meteorological systems, including temperature, humidity, wind force, wind direction, and load. This data underwent the same feature engineering and normalization processes as during training, resulting in a dataset with the shape (72, ...). Input time series tensor .
[0119] Step 3: Forward Propagation of the Model Will The input is fed into the encoder of the trained model to obtain the encoder hidden state sequence. Embed the context vector and The input is fed into a gated residual network (GRN) to generate a context-modulated key matrix. Sum matrix Initialize the decoder and begin hourly predictions for the next 24 hours.
[0120] Forecast for the first hour (19:00): The decoder generates a query vector based on its initial hidden state. .
[0121] calculate and Attention weights between and with Weighted summation to generate context vector .
[0122] Decoder GRU Receive The hidden state is updated with the start symbol (or the true value from the previous time step, which is usually the predicted value from the previous time step during inference), and the failure probability for the first hour is output. .
[0123] Prediction for the second hour (20:00): The decoder generates a query vector based on its hidden state at the previous time step (hour 1). .
[0124] calculate and Attention weights between and with Weighted summation to generate context vector .
[0125] Decoder GRU Receive The predicted probability at the previous time step Update its hidden state and output the failure probability in the second hour. .
[0126] This process continues until 24 probability values are generated. .
[0127] Furthermore, the system will generate a sequence of failure probabilities. Plot a risk curve. Assume the predicted probability is [probability] at the 9th hour (corresponding to actual time 03:00 on January 10, 2021). The alarm threshold was exceeded (e.g., 0.85). The system automatically triggered an alert, sending an alarm message to the operations and maintenance center. The message included: "Line Name: 10kV Liangzhu Line; Area Profile: High-risk mountainous area; Predicted High-Risk Period: 2021-01-10 03:00-05:00; Predicted Peak Fault Probability: 0.92." Based on this high-confidence alert, operations and maintenance personnel can arrange for inspection personnel or drones to conduct special inspections of the line in advance to check for dangerous signs such as icing or galloping, and then take measures (such as de-icing or adjusting operating modes) to avoid actual failures.
[0128] Example 3, referring to Figure 2 This embodiment also provides a power distribution network fault prediction system based on personalized regional profiles, including: The data acquisition module is used to acquire historical operating data of multiple lines in the distribution network; Historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data; The personalized regional profile acquisition module is used to construct a personalized regional profile for each line based on static line attribute data and semi-static environmental data through clustering algorithms. The model training module is used to train a sequence-to-sequence fault prediction model based on dynamic running data and personalized regional profiles. Sequence-to-sequence fault prediction models include encoders and decoders; The prediction module is used to take a trained sequence-to-sequence fault prediction model as input, along with the personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and output the fault probability of the target line within the future prediction time window.
[0129] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0130] This embodiment also provides an electronic device, which can be a terminal, and its internal structure diagram can be as follows: Figure 2As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a power distribution network fault prediction method based on personalized regional profiles. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the device's casing, or an external keyboard, touchpad, or mouse.
[0131] This embodiment also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps: Obtain historical operating data for multiple lines in the power distribution network; Historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data; Based on static line attribute data and semi-static environmental data, a personalized regional profile is constructed for each line using a clustering algorithm; Based on dynamic operational data and personalized regional profiles, a sequence-to-sequence fault prediction model is trained. Sequence-to-sequence fault prediction models include encoders and decoders; Using a trained sequence-to-sequence fault prediction model, the input is a personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window. The output is the fault probability of the target line within the future prediction time window.
[0132] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0133] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0134] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for predicting distribution network faults based on personalized regional profiles, characterized in that, include: Obtain historical operating data for multiple lines in the power distribution network; The historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data. Based on the static line attribute data and the semi-static environment data, a personalized regional profile is constructed for each line using a clustering algorithm; Based on the dynamic operating data and the personalized regional profile, a sequence-to-sequence fault prediction model is trained. The sequence-to-sequence fault prediction model includes an encoder and a decoder; Using the trained sequence-to-sequence fault prediction model, input the personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and output the fault probability of the target line within the future prediction time window.
2. The method for predicting distribution network faults based on personalized regional profiles as described in claim 1, characterized in that, The steps for constructing a personalized region profile include: For each line, a static feature vector is generated based on the line's static line attribute data and semi-static environment data; The static feature vectors of all lines are input into a clustering algorithm to divide the multiple lines into a preset number of regional categories, and each regional category corresponds to a regional profile identifier. The regional profile identifier of each route's region category is used as the personalized regional profile for that route.
3. The method for predicting distribution network faults based on personalized regional profiles as described in claim 2, characterized in that, The steps for training the sequence to develop the sequence fault prediction model include: The time series of dynamic running data of a training line within the backtracking time window is input into the encoder to obtain the encoder hidden state sequence; The personalized region profile of the training line is converted into a context embedding vector; The encoder hidden state sequence and the context embedding vector are input together into a gated residual network to generate a context-modulated key matrix and value matrix.
4. The method for predicting distribution network faults based on personalized regional profiles as described in claim 3, characterized in that, During the prediction process, the decoder generates a query vector by linearly transforming the current hidden state. Attention weights are obtained by calculating the dot product similarity between the query vector and the context-modulated key matrix; The attention weights are applied to the context-modulated value matrix and then weighted and summed to obtain the context vector. The context vector is used as the input to the decoder at the current prediction time step to generate the fault probability at the current time step and the hidden state at the next time step. Repeat the decoder's prediction process until a complete sequence of failure probabilities for the future prediction time window is generated.
5. The method for predicting distribution network faults based on personalized regional profiles as described in claim 4, characterized in that, Also includes: The model parameters are optimized based on the loss between the fault probability sequence and the actual fault labels; The clustering algorithm is the K-means clustering algorithm; The preset number of region categories is determined by the minimum description length criterion; The goal of the minimum description length criterion is to minimize the total number of bits required to describe the data. The total number of bits includes the index cost used to encode cluster centers and the allocation relationship between lines and cluster centers, and the residual cost used to encode the deviation between each line and its respective cluster center; Both the encoder and the decoder are composed of gated loop units.
6. The method for predicting distribution network faults based on personalized regional profiles as described in claim 5, characterized in that, The processing steps of the gated residual network include: The first intermediate result is obtained by performing a first linear transformation on the main input data and the context embedding vector, and then adding them together. Apply the exponential linear unit activation function to the first intermediate result; A second linear transformation is performed on the main input data to obtain the second intermediate result; Multiply the activated first intermediate result element by element with the second intermediate result; The result of element-wise multiplication is passed through a dropout layer and then residually connected to the main input data. The result of the residual connection is then normalized to obtain the output of the gated residual network.
7. The method for predicting distribution network faults based on personalized regional profiles as described in claim 6, characterized in that, Before using historical operational data for training, synthetic minority class oversampling technique is used to oversample fault samples in historical operational data so that the number of fault samples and the number of non-fault samples reach a set balance ratio. The static line attribute data includes the total line length, the proportion of cable length to the total line length, and the line's years of operation. The semi-static environmental data includes the regional characteristic type of the area where the line is located, the historical average icing thickness, and the standard deviation of the historical icing thickness. The dynamic operation data includes: data obtained by periodically encoding the time of day, date of week, and date of month; data obtained by uniquely encoding the weather conditions, wind direction, and wind force level; and data obtained by normalizing the average temperature and temperature difference.
8. A distribution network fault prediction system based on personalized regional profiles, using the method described in any one of claims 1 to 7, characterized in that, include: The data acquisition module is used to acquire historical operating data of multiple lines in the distribution network; The historical operational data includes static line attribute data, semi-static environment data, and dynamic operational data. The personalized regional profile acquisition module is used to construct a personalized regional profile for each line based on the static line attribute data and the semi-static environment data through a clustering algorithm. The model training module is used to train a sequence-to-sequence fault prediction model based on the dynamic running data and the personalized regional profile. The sequence-to-sequence fault prediction model includes an encoder and a decoder; The prediction module is used to take the trained sequence-to-sequence fault prediction model as input, the personalized regional profile of the target line and the dynamic operation data of the target line within the current backtracking time window, and output the fault probability of the target line within the future prediction time window.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the distribution network fault prediction method based on personalized regional profiles as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the distribution network fault prediction method based on personalized regional profiles as described in any one of claims 1 to 7.