Unbalanced data processing method, system and equipment for power distribution network and medium
By constructing multidimensional conditional vectors and hybrid adjacency matrices, combined with spatiotemporal graph convolutional networks and adaptive class balance loss functions, the problems of data missingness and class imbalance in distribution network fault diagnosis are solved, improving the accuracy and robustness of fault diagnosis and meeting the requirements of high-reliability intelligent operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU POWER GRID CO LTD
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-10
AI Technical Summary
Existing power distribution network fault diagnosis technologies are limited by inappropriate repair methods for low-quality missing data and category imbalance handling strategies that ignore power physical constraints. This results in distorted fault characteristics, high model false negative rates, and weak generalization ability, making it difficult to support the actual needs of highly reliable intelligent operation and maintenance.
By constructing multidimensional conditional vectors to fill missing values, combining the physical connection topology and geographic correlation matrix of the distribution network to generate a hybrid adjacency matrix, using a spatiotemporal graph convolutional network for data processing, and employing an adaptive class-balanced loss function for model training, the accuracy and robustness of fault diagnosis are improved.
It effectively improves the accuracy and robustness of fault diagnosis in power distribution networks under scenarios with missing data and extreme class imbalance, and ensures the physical semantic consistency of data and the generalization ability of the model.
Smart Images

Figure CN121834580A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system automation technology, and in particular to a method, system, device and medium for processing imbalance data in power distribution networks. Background Technology
[0002] With the development of smart grids, the distribution network, as a key link connecting the main grid and users, relies heavily on the mining of its operational data to improve power supply reliability. However, in the actual application of fault diagnosis, two core challenges seriously hinder the implementation of the technology.
[0003] The first problem is low data quality and severe data gaps. Data sources for power distribution networks are highly complex, including electrical quantities from SCADA systems, equipment ledgers from PMS systems, and external meteorological data. Due to potential sensor malfunctions, packet loss during communication, or equipment being under maintenance or out of service, the raw data often contains numerous missing values. Existing processing methods often employ global mean filling or simple linear interpolation, but these approaches ignore the strong "time-weather-geographic" coupling characteristics of power distribution network loads. For example, the baseline leakage current during thunderstorms is much higher than on sunny days. Directly using the annual average to fill in missing data for thunderstorm days artificially smooths out abnormal signs before a fault occurs, distorting the physical meaning of the data.
[0004] The second challenge is extreme class imbalance. Distribution network faults are typical low-probability events, with the ratio of normal samples to fault samples often reaching 1000:1 or even higher. Traditional deep learning models (such as CNNs and RNNs) aim to minimize global error. During training, they are dominated by a large number of normal samples, thus "ignoring" the scarce fault samples and resulting in a high false negative rate. Although some solutions attempt to use the SMOTE algorithm to generate artificial fault samples in the feature space, power systems must strictly adhere to Kirchhoff's laws and network topology constraints. Blindly synthesized data often violates physical laws—for example, generating fault currents without corresponding voltage drops. This "physically unexplainable" noise severely interferes with model training, thus reducing generalization ability. Summary of the Invention
[0005] In view of the aforementioned existing problems, the present invention is proposed.
[0006] Therefore, this invention provides a method, system, device, and medium for processing distribution network imbalance data to address the problems of current distribution network fault diagnosis technology being limited by inappropriate repair methods for low-quality missing data and category imbalance processing strategies that ignore power physical constraints, resulting in distorted fault characteristics, high model false negative rates, weak generalization ability, and difficulty in supporting the actual needs of high-reliability intelligent operation and maintenance.
[0007] 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 processing distribution network imbalance data, comprising: Acquire multi-source heterogeneous historical operation data of the power distribution network; clean the data and perform time alignment on data with different sampling frequencies to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values; Based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset, a multidimensional condition vector is constructed; homogeneous samples are retrieved from the historical database according to the multidimensional condition vector, and the missing values are filled with the mean of the retrieved homogeneous samples, and the complete dataset is output. Based on the physical connection topology of the power distribution network and the geographical coordinates of each monitoring node, a physical connection matrix and a geographical correlation matrix are constructed respectively, and then weighted and fused into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure. The complete dataset is used as node features, mapped onto the graph topology, and input into the spatiotemporal graph convolutional network; A fault diagnosis network model is constructed, which includes the spatiotemporal graph convolutional network and the classification output layer, and the network model is trained using an adaptive class balance loss function based on the number of effective samples. The power distribution network operation data to be diagnosed is input into the fault diagnosis network model, and the corresponding fault diagnosis results are output.
[0008] In a preferred embodiment of the power distribution network imbalance data processing method of the present invention, the cleaning includes: Set a sliding time window; Calculate the median and absolute median difference based on the data within the sliding time window; The outlier threshold is determined based on the median, absolute median difference, and preset sensitivity coefficient; and data points exceeding the threshold are removed.
[0009] In a preferred embodiment of the distribution network imbalance data processing method described in this invention, the construction of the multidimensional condition vector includes: The timestamp is parsed into a calendar attribute, and the corresponding date type is determined based on the calendar attribute. The date type includes weekdays, weekends, and public holidays. Map meteorological data to discrete weather types; Continuous temperature values are divided into temperature level indexes according to fixed interval step sizes.
[0010] The beneficial effect of this preferred technical solution is that by converting timestamps, meteorological data, and temperature values into structured date types, discrete weather types, and temperature level indexes, respectively, a multi-dimensional condition vector strongly correlated with the operating status of the power distribution network is constructed, providing a highly discriminative retrieval basis for subsequent missing value filling based on environmental context.
[0011] As a preferred embodiment of the distribution network imbalance data processing method of the present invention, the step of retrieving homogeneous samples from the historical database according to the multidimensional condition vector and filling missing values with the mean of the retrieved homogeneous samples includes: When the number of perfectly matched samples is insufficient, the condition constraints are relaxed in turn, the temperature range restriction is removed, and homogeneous samples are re-searched in the historical database based on the relaxed conditions. If the number of samples obtained after the re-search is still insufficient, the weather type restriction will be further removed, and a homogeneous sample search will be performed again. If, after successively removing the temperature range restriction and the weather type restriction, it is still impossible to obtain historical samples that meet the minimum quantity requirement, then the mean of the observations of spatially adjacent nodes in the graph topology at the same time is used to fill the gap.
[0012] In a preferred embodiment of the power distribution network imbalance data processing method of the present invention, the construction of the geographic correlation matrix includes: Calculate the geographic Euclidean distance between any two monitoring nodes; If the geographical Euclidean distance is less than the preset influence radius, a non-zero weight is assigned based on the distance. If the geographic Euclidean distance is not less than the preset influence radius, then the corresponding matrix element is assigned a value of zero.
[0013] As a preferred embodiment of the distribution network imbalance data processing method described in this invention, the spatiotemporal graph convolutional network includes multiple cascaded spatiotemporal convolutional blocks, each spatiotemporal convolutional block containing a spatial graph convolutional layer and a temporal convolutional layer, wherein the spatial graph convolutional layer aggregates information of multi-hop neighbor nodes based on a normalized Laplacian matrix.
[0014] As a preferred embodiment of the distribution network imbalance data processing method described in this invention, the construction of the adaptive category balance loss function based on the number of effective samples includes: For each category, the number of valid samples is calculated based on the total number of true samples for that category in the training set; And generate the corresponding category weights based on the number of valid samples.
[0015] The beneficial effect of this preferred technical solution is that by dynamically calculating the number of effective samples based on the total number of real samples in each category and generating corresponding loss weights, the model can automatically increase its attention to rare fault categories during training, thereby alleviating diagnostic bias caused by extreme sample imbalance.
[0016] Secondly, the present invention provides a power distribution network imbalance data processing system, comprising: The multi-source data access and pre-alignment module is used to acquire multi-source heterogeneous historical operation data of the distribution network; clean the data and perform time alignment on data with different sampling frequencies to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values. The environment-aware missing value filling module is used to construct a multi-dimensional condition vector based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset; retrieve homogeneous samples in the historical database according to the multi-dimensional condition vector, and fill the missing values with the mean of the retrieved homogeneous samples to output the complete dataset. The hybrid graph topology construction module is used to construct a physical connection matrix and a geographic correlation matrix based on the physical connection topology of the power distribution network and the geographic coordinates of each monitoring node, and then weighted and fused them into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure. The spatiotemporal feature encoding module is used to map the complete dataset as node features onto the graph topology and input it into the spatiotemporal graph convolutional network. An adaptive balanced training module is used to construct a fault diagnosis network model that includes the spatiotemporal graph convolutional network and a classification output layer, and to train the network model using an adaptive class balance loss function based on the number of effective samples. The online fault diagnosis reasoning module is used to input the distribution network operation data to be diagnosed into the fault diagnosis network model and output the corresponding fault diagnosis results.
[0017] Thirdly, the present invention provides an electronic device, comprising: Memory, used to store programs; A processor is configured to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the power distribution network imbalance data processing method.
[0018] Fourthly, the present invention provides a computer-readable storage medium, comprising: when the program is executed by a processor, the steps of implementing the power distribution network imbalance data processing method.
[0019] The beneficial effects of this invention are as follows: By constructing a multi-dimensional conditional vector that integrates date type, weather type, and temperature range, and combining hierarchical conditional relaxation and spatial proximity-based fill strategies, this invention achieves accurate environmental awareness-based filling of missing data in the distribution network, effectively preserving the physical semantic consistency of the original operational data; by combining the physical connection topology of the distribution network with the geographical coordinates of monitoring nodes, a weighted fusion is generated to form a hybrid adjacency matrix and normalized to form a graph topology structure, achieving unified modeling of electrical coupling and spatial correlation, and improving the graph neural network's ability to characterize fault propagation paths; by introducing an adaptive class balance loss function based on the number of effective samples, the loss weights of each class are dynamically adjusted during model training, enabling learning reinforcement of rare fault samples, significantly improving the fault diagnosis accuracy and robustness in extreme class imbalance scenarios. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. 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. Wherein: Figure 1 This is a basic flowchart of a distribution network imbalance data processing method provided in one embodiment of the present invention. Detailed Implementation
[0021] 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.
[0022] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for processing distribution network imbalance data is provided, comprising: S100: Acquire multi-source heterogeneous historical operation data of the distribution network; clean the data and perform time alignment on data with different sampling frequencies to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values; S200: Based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset, construct a multidimensional condition vector; retrieve homogeneous samples in the historical database according to the multidimensional condition vector, and fill the missing values with the mean of the retrieved homogeneous samples to output the complete dataset; S300: Based on the physical connection topology of the distribution network and the geographical coordinates of each monitoring node, a physical connection matrix and a geographical correlation matrix are constructed respectively, and then weighted and fused into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure; S400: The complete dataset is used as node features, mapped onto the graph topology, and input into the spatiotemporal graph convolutional network; S500: Construct a fault diagnosis network model that includes the spatiotemporal graph convolutional network and the classification output layer, and train the network model using an adaptive class balance loss function based on the number of effective samples; S600: Input the distribution network operation data to be diagnosed into the fault diagnosis network model and output the corresponding fault diagnosis results.
[0023] It should be noted that current power distribution network fault diagnosis technologies face a series of challenges during operation, including inconsistent sampling frequencies of multi-source monitoring equipment, communication interruptions, or sensor malfunctions leading to a large amount of missing and noisy operational data, which seriously affects the reliability of feature extraction. Secondly, the operating status of the power distribution network is significantly affected by external environmental factors such as date type, weather conditions, and temperature changes, while existing methods generally ignore such contextual information, making it difficult to achieve physical and reasonable filling of missing values. Traditional graph models rely only on electrical connection topology and do not integrate spatial relationships such as geographical proximity, resulting in insufficient modeling of fault propagation mechanisms. In actual operation, fault samples are extremely scarce and the categories are severely imbalanced, causing the diagnostic model to be biased towards normal states and lacking the ability to identify rare but high-risk faults, making it difficult to meet the real-time diagnostic requirements of high-reliability power supply.
[0024] Therefore, to address the problems mentioned above, current distribution network fault diagnosis technologies are limited by inappropriate repair methods for low-quality missing data and class imbalance handling strategies that ignore power physical constraints, resulting in distorted fault characteristics, high model false negative rates, and weak generalization capabilities, making it difficult to support the actual needs of high-reliability intelligent operation and maintenance. Through steps S100-S600, multi-level missing value filling based on environmental perception, graph topology modeling with physical-geographic fusion, and an adaptive loss function based on the number of effective samples, the accuracy and robustness of fault diagnosis in distribution networks under scenarios with missing data, heterogeneous sampling, and extreme class imbalance are effectively improved.
[0025] Example 2, this is an embodiment of the present invention, which provides a method for processing distribution network imbalance data based on the previous embodiment, including: In this embodiment of the application, the cleaning in step S100 includes: Set a sliding time window; Calculate the median based on the data within the sliding time window. and absolute median ; The outlier threshold is determined based on the median, absolute median difference, and preset sensitivity coefficient; and data points exceeding the threshold are removed.
[0026] In this embodiment of the application, the outlier identification mechanism in step S100 includes defining a sliding time window containing historical data from the past 24 hours for each data point to be detected, calculating the median and median absolute deviation of the data within the window to construct dynamic upper and lower limits, and determining that the current data point exceeds the range of the upper and lower limits as sensor noise and marking it as a null value to be filled in later.
[0027] In an optional implementation, the outlier identification mechanism in step S100 can also perform seasonal-trend decomposition on the electrical quantity time series to separate the residual components, and then apply the improved 3σ criterion to the residual components to determine outliers. Points exceeding the mean ± 3 times the standard deviation are marked as outliers, and multivariate linkage analysis is combined to distinguish noise from real faults.
[0028] In an optional implementation, the outlier identification mechanism in step S100 can also construct a feature vector from the multidimensional electrical quantities (such as three-phase current, voltage, active power and reactive power) at each moment, input it into the pre-trained isolated forest model for unsupervised anomaly scoring, and the samples with scores exceeding the threshold are identified as outliers. Furthermore, the sensor noise and real faults are further distinguished by combining the multivariate collaborative change characteristics.
[0029] It should be noted that, among the outliers identified in this invention, univariate mutations caused by random sensor interference will be considered invalid data and removed, while outliers accompanied by multiple electrical quantity synchronization anomalies will be considered potential fault characteristics and retained. Outliers determined to be invalid will be set as missing values, to be processed subsequently by a dynamic filling mechanism based on environmental conditions.
[0030] In a preferred embodiment, the sliding window length Based on 24 hours of historical data (with a time granularity of 15 minutes), it can fully capture the daily periodic characteristics of the distribution network load, while avoiding the introduction of non-stationary noise due to excessively long windows.
[0031] In this embodiment, time alignment in step S100 includes downsampling multiple statistics from high-frequency SCADA electrical quantity data within a unified time window and upsampling low-frequency meteorological data using a linear interpolation method to construct a consistent time reference. Time alignment uses a preset system reference heartbeat ΔT = 15 min as the unified time granularity.
[0032] In this embodiment of the application, for meteorological data with a low update frequency (such as once per hour), the value of t at non-hourly times is... Calculated through linear interpolation: in, and Less than and greater than respectively The two most recent hourly moments, , These are the meteorological observation values at the corresponding time. For discrete meteorological variables (such as weather type), nearest neighbor interpolation is used to avoid generating intermediate states that have no physical meaning.
[0033] In this embodiment of the application, the outlier determination threshold is determined according to the following formula: in, The preset sensitivity coefficient; Data points outside the range [Lower, Upper] are identified as noise and removed.
[0034] In a preferred embodiment This value can effectively distinguish between sensor noise and actual fault abrupt changes in the context of tidal load in the distribution network.
[0035] In this embodiment of the application, the data includes at least SCADA electrical quantities, meteorological data, and time information; the SCADA electrical quantities include three-phase current ( ), three-phase voltage ( Active power (P), reactive power (Q), sampling frequency (i.e., one point per second), typically aggregated into a 15-minute snapshot at the transport layer. Meteorological data includes temperature, humidity, rainfall, wind speed, and weather warning levels. The update frequency is usually once per hour. The training set uses full historical data from the past 24 months.
[0036] In this embodiment of the application, the construction of the multidimensional condition vector in step S200 includes: The timestamp is parsed into a calendar attribute, and the corresponding date type is determined based on the calendar attribute. The date type includes weekdays, weekends, and public holidays. Map meteorological data to discrete weather types; The continuous temperature values are divided into temperature level indexes according to a fixed interval step size. Preferably, the temperature quantization interval is [−10, 45]℃, and it is evenly divided into 11 levels with a step size of 5℃.
[0037] In this embodiment of the application, the condition vector is represented as: in, For date type variables, discretize them into weekdays, weekends, or public holidays based on calendar attributes; The weather type variable is discretized into sunny, cloudy, rainy, snowy, or thunderstorm. Temperature is a discretized variable, which is an index of intervals into which continuous temperature data is divided according to a preset step size. For example, when the temperature belongs to [15, 20)℃, =5.
[0038] In this embodiment of the application, step S200, which involves retrieving homogeneous samples from the historical database according to the multidimensional condition vector and filling missing values with the mean of the retrieved homogeneous samples, includes: When the number of perfectly matched samples is insufficient, the condition constraints are relaxed in turn, the temperature range restriction is removed, and homogeneous samples are re-searched in the historical database based on the relaxed conditions. If the number of samples obtained after the re-search is still insufficient, the weather type restriction will be further removed, and a homogeneous sample search will be performed again. If, after successively removing the temperature range restriction and the weather type restriction, it is still impossible to obtain historical samples that meet the minimum quantity requirement, then the mean of the observations of spatially adjacent nodes in the graph topology at the same time is used to fill the gap.
[0039] In this embodiment of the application, the missing value filling strategy in step S200 is implemented through a multi-level hash index, which includes constructing a four-dimensional matching key based on date type, weather, temperature and spatial grid, gradually relaxing the conditions in historical data (first ignoring temperature, then ignoring weather) to search for similar scenarios, and filling with the mean of the samples if enough samples are found, otherwise backing up to the current value of the spatially adjacent node for fallback filling.
[0040] In an optional implementation, the missing value filling strategy in step S200 can also utilize a spatiotemporal generative adversarial network, using complete historical spatiotemporal segments as training data. The generator synthesizes reasonable electrical quantity values for the missing locations based on currently observed neighboring nodes and time context, while the discriminator ensures that the generated data conforms to the spatiotemporal distribution characteristics of the real power distribution network.
[0041] In an optional implementation, the missing value filling strategy in step S200 can also organize the electrical quantity data of the entire distribution network monitoring area on a unified time axis into a node-time matrix, and use the approximate low-rank characteristics caused by its inherent spatiotemporal correlation to globally and collaboratively fill in the missing items through nuclear norm minimization or iterative soft thresholding algorithm.
[0042] In this embodiment, step S200 involves constructing a multidimensional condition vector based on the timestamp corresponding to each missing record in the spatiotemporally aligned dataset; retrieving homogeneous samples from the historical database according to the multidimensional condition vector, and filling the missing values with the mean of the retrieved homogeneous samples; when the number of retrieved homogeneous samples is insufficient, a condition relaxation strategy is initiated, sequentially relaxing the environmental constraints in the multidimensional condition vector to perform multi-level degradation retrieval; if the condition relaxation strategy still cannot obtain historical samples that meet the minimum quantity requirement, the mean of the observations of spatially adjacent nodes in the graph topology at the same time is used to fill the missing values, and a complete dataset is output.
[0043] In this embodiment, a multidimensional condition vector (including date type, weather type, and temperature level) is constructed; homogeneous samples are retrieved from the historical database according to the vector and filled with its mean; when there are insufficient samples, a condition relaxation strategy is initiated to relax environmental constraints such as temperature and weather in turn to perform multi-level downgrade retrieval; if there are still not enough samples, the mean of the observation values of spatially neighboring nodes in the graph topology is used to fill the sample.
[0044] In this embodiment, the specific levels of the condition relaxation strategy include setting a minimum sample size threshold. And then, by successively removing the temperature discretization variable from the condition vector... and weather type variables To broaden the search criteria, if enough samples still cannot be found, the mean of spatially neighboring nodes is used to fill the gaps. Spatially neighboring nodes refer to the nodes directly connected to the current node in the graph topology.
[0045] In this embodiment of the application, the minimum sample size threshold The value is set to 15. This value is based on statistical analysis of historical distribution network operation data: when the number of homogeneous samples is less than 15, the 95% confidence interval width of the mean estimate exceeds 10% of the measured value, indicating that the filling result is unreliable; while when the number of samples reaches or exceeds 15, the estimation error is significantly reduced, and the filled value has good physical consistency. Therefore, It was determined to be the preferred configuration to ensure both filling quality and algorithm efficiency.
[0046] In this embodiment of the application, the construction of the geographic correlation matrix in step S300 includes: Calculate the geographic Euclidean distance between any two monitoring nodes. ; If the geographical Euclidean distance Smaller than the preset radius of influence Then, a non-zero weight is assigned based on the distance. In this embodiment of the application, the construction of the geographic correlation matrix in step S300 includes calculating the Euclidean distance between each pair of monitoring nodes based on the latitude and longitude coordinates of each node. If the distance is less than 500 meters, a non-zero weight is assigned to it using a Gaussian kernel function (the closer the distance, the greater the weight). Otherwise, it is set to zero, thereby characterizing the spatial attenuation relationship of the impact of local meteorological disasters (such as thunderstorms).
[0047] In an optional implementation, the construction of the geographic correlation matrix in step S300 can also be based on the spatial distance between each monitoring node, and the connection weight is assigned in the form of inverse distance weight (IDW). That is, the weight decreases smoothly as the distance increases and no hard cutoff threshold is set, so as to continuously characterize the geographic correlation between nodes in a soft decay manner.
[0048] In an optional implementation, the construction of the geographic correlation matrix in step S300 can also generate a Delaunay triangulation (or Voronoi diagram) based on the spatial coordinates of each monitoring node. Only nodes that are directly connected (or share Voronoi edges) in the triangulation are assigned non-zero adjacency weights, while the weights between other nodes are set to zero, thereby constructing a sparse and topologically adaptive geographic correlation matrix based on geometric adjacency relationships.
[0049] If the geographic Euclidean distance is not less than the preset influence radius, then the corresponding matrix element is assigned a value of zero.
[0050] Specifically, the elements of the geographic relevance matrix are defined as follows: in, To preset the radius of influence, Scale parameters for controlling spatial decay rate. Preset influence radius. , This is consistent with the spatial impact characteristics of local meteorological disasters such as thunderstorms.
[0051] In this embodiment of the application, the hybrid adjacency matrix The element is defined as: in, If and only if node With nodes A direct electrical connection exists; otherwise, the value is 0. If the Euclidean distance between nodes If the value is less than the preset radius of influence ϵ, otherwise it is 0; For fusion weighting coefficients; In a preferred embodiment, α=0.8 to highlight the dominant role of electrical connections in fault propagation path modeling, while preserving the auxiliary characterization ability of geographical proximity for local meteorological disturbances (such as lightning strikes and fog).
[0052] In this embodiment of the application, the normalization process includes: Adding a self-loop to A yields Calculate its degree matrix Output a symmetric normalized matrix. As the final graph topology.
[0053] In this embodiment of the application, the spatiotemporal graph convolutional network (ST-GCN) in step S400 includes multiple cascaded spatiotemporal convolutional blocks. Each spatiotemporal convolutional block contains a spatial graph convolutional layer and a temporal convolutional layer, wherein the spatial graph convolutional layer aggregates information of multi-hop neighbor nodes based on the normalized Laplacian matrix.
[0054] In this embodiment of the application, the temporal convolutional layer in step S400 extracts local temporal features in the form of a standard 2D-CNN by applying a one-dimensional convolutional kernel (the time axis covers nine 15-minute steps, totaling 2.25 hours) to the independent time series of each node, and uses ReLU activation and Dropout regularization to prevent overfitting.
[0055] In an alternative implementation, the temporal convolutional layer in step S400 may also employ a multi-layer one-dimensional causal convolution stack, with the dilation rate set layer by layer (e.g., 1, 2, 4), to expand the receptive field to several hours without using future information, and to preserve the original temporal characteristics through residual connections, so as to capture the long-range evolution dependency of distribution network faults.
[0056] In an optional implementation, the temporal convolutional layer in step S400 can also calculate self-attention weights for the input time series of each node, dynamically model the dependency relationship between any two moments, and extract global temporal features through multi-head attention and feedforward networks, thereby focusing on the historical moment that is most discriminative for fault prediction.
[0057] In this embodiment, the spatial graph convolutional layer is based on a normalized Laplacian matrix and uses a K-order Chebyshev polynomial approximation to achieve multi-hop neighbor information aggregation. Its output is represented as follows: in, For the normalized graph Laplacian matrix, For the first Chebyshev polynomials The input node feature matrix, This is the learnable parameter matrix for the corresponding order.
[0058] In a preferred embodiment It corresponds to a 3-hop neighborhood and can cover the electrical propagation range of a typical 10kV distribution network feeder, ensuring effective aggregation of fault characteristics while avoiding the introduction of noise interference from irrelevant remote nodes.
[0059] In this embodiment of the application, the construction of the adaptive class balance loss function based on the number of effective samples in step S500 includes: For each category, the number of valid samples is calculated based on the total number of true samples for that category in the training set; And generate the corresponding category weights based on the number of valid samples.
[0060] In this embodiment of the application, the adaptive class balance loss function is denoted as... Its expression is: in, For the true label of the sample, For categories in the training set The total number of real samples, The model predicts that the sample belongs to the true label. The probability, To focus parameters, , The hyperparameter for controlling the saturation rate of the effective sample number, and its value range is [value range missing]. .
[0061] In this embodiment of the application, the number of valid samples can be calculated using the following formula: in, The total number of samples in a certain category. The degree of overlap between samples was measured.
[0062] In this embodiment of the application, the category weights are adjusted based on the number of valid samples, and the calculation formula is as follows: Combination The definition can be further written as: Wherein, β=0.9999, this value is suitable for high-frequency sampling scenarios in distribution networks (such as SCADA data acquisition per second), which can effectively suppress the dominant role of a large number of redundant samples in normal conditions on gradient updates, while retaining the learning weights of rare fault samples.
[0063] Example 3 is an embodiment of the present invention. This embodiment differs from the first embodiment in that it provides a power distribution network imbalance data processing system.
[0064] It should be noted that the technical solution of the distribution network imbalance data processing system is based on the same concept as the technical solution of the aforementioned distribution network imbalance data processing method. For details not described in detail in this embodiment, please refer to the description of the technical solution of the aforementioned distribution network imbalance data processing method.
[0065] This embodiment of a power distribution network imbalance data processing system includes: The multi-source data access and pre-alignment module is used to acquire multi-source heterogeneous historical operation data of the distribution network; clean the data and perform time alignment on data with different sampling frequencies to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values. The environment-aware missing value filling module is used to construct a multi-dimensional condition vector based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset; retrieve homogeneous samples in the historical database according to the multi-dimensional condition vector, and fill the missing values with the mean of the retrieved homogeneous samples to output the complete dataset. The hybrid graph topology construction module is used to construct a physical connection matrix and a geographic correlation matrix based on the physical connection topology of the power distribution network and the geographic coordinates of each monitoring node, and then weighted and fused them into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure. The spatiotemporal feature encoding module is used to map the complete dataset as node features onto the graph topology and input it into the spatiotemporal graph convolutional network. An adaptive balanced training module is used to construct a fault diagnosis network model that includes the spatiotemporal graph convolutional network and a classification output layer, and to train the network model using an adaptive class balance loss function based on the number of effective samples. The online fault diagnosis reasoning module is used to input the distribution network operation data to be diagnosed into the fault diagnosis network model and output the corresponding fault diagnosis results.
[0066] This embodiment also provides an electronic device applicable to a power distribution network imbalance data processing method, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a data processing method for power distribution network imbalance as described in the above embodiments.
[0067] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a distribution network imbalance data processing method as proposed in the above embodiments.
[0068] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for processing unbalanced distribution network data proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0069] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0070] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not 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.
Claims
1. A method for processing imbalance data in a power distribution network, characterized in that, include: Acquire historical operational data of the multi-source heterogeneous distribution network; The data is cleaned, and data from different sampling frequencies are time-aligned to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values. Based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset, a multidimensional condition vector is constructed. Retrieve homogeneous samples from the historical database according to the multidimensional condition vector, fill missing values with the mean of the retrieved homogeneous samples, and output the complete dataset. Based on the physical connection topology of the power distribution network and the geographical coordinates of each monitoring node, a physical connection matrix and a geographical correlation matrix are constructed respectively, and then weighted and fused into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure. The complete dataset is used as node features, mapped onto the graph topology, and input into the spatiotemporal graph convolutional network; A fault diagnosis network model is constructed, which includes the spatiotemporal graph convolutional network and the classification output layer, and the network model is trained using an adaptive class balance loss function based on the number of effective samples. The power distribution network operation data to be diagnosed is input into the fault diagnosis network model, and the corresponding fault diagnosis results are output.
2. The distribution network imbalance data processing method as described in claim 1, characterized in that: The cleaning includes: Set a sliding time window; Calculate the median and absolute median difference based on the data within the sliding time window; The outlier threshold is determined based on the median, absolute median difference, and preset sensitivity coefficient; and data points exceeding the threshold are removed.
3. The distribution network imbalance data processing method as described in claim 1 or 2, characterized in that: The construction of the multidimensional condition vector includes: The timestamp is parsed into a calendar attribute, and the corresponding date type is determined based on the calendar attribute. The date type includes weekdays, weekends, and public holidays. Map meteorological data to discrete weather types; Continuous temperature values are divided into temperature level indexes according to fixed interval step sizes.
4. The distribution network imbalance data processing method as described in claim 3, characterized in that: The step of retrieving homogeneous samples from the historical database according to the multidimensional condition vector, and filling missing values with the mean of the retrieved homogeneous samples, includes: When the number of perfectly matched samples is insufficient, the condition constraints are relaxed in turn, the temperature range restriction is removed, and homogeneous samples are re-searched in the historical database based on the relaxed conditions. If the number of samples obtained after the re-search is still insufficient, the weather type restriction will be further removed, and a homogeneous sample search will be performed again. If, after successively removing the temperature range restriction and the weather type restriction, it is still impossible to obtain historical samples that meet the minimum quantity requirement, then the mean of the observations of spatially adjacent nodes in the graph topology at the same time is used to fill the gap.
5. The distribution network imbalance data processing method as described in claim 4, characterized in that: The construction of the geographic relevance matrix includes: Calculate the geographic Euclidean distance between any two monitoring nodes; If the geographical Euclidean distance is less than the preset influence radius, a non-zero weight is assigned based on the distance. If the geographic Euclidean distance is not less than the preset influence radius, then the corresponding matrix element is assigned a value of zero.
6. The distribution network imbalance data processing method as described in claim 5, characterized in that: The spatiotemporal graph convolutional network includes multiple cascaded spatiotemporal convolutional blocks. Each spatiotemporal convolutional block contains a spatial graph convolutional layer and a temporal convolutional layer, wherein the spatial graph convolutional layer aggregates information of multi-hop neighbor nodes based on a normalized Laplacian matrix.
7. The distribution network imbalance data processing method as described in claim 6, characterized in that: The construction of the adaptive class balance loss function based on the number of effective samples includes: For each category, the number of valid samples is calculated based on the total number of true samples for that category in the training set; And generate the corresponding category weights based on the number of valid samples.
8. A distribution network imbalance data processing system, using the method described in any one of claims 1-7, characterized in that, include: The multi-source data access and pre-alignment module is used to acquire multi-source heterogeneous historical operating data of the distribution network; The data is cleaned, and data from different sampling frequencies are time-aligned to generate a spatiotemporally aligned dataset with a unified timestamp and retaining missing values. The environment-aware missing value filling module is used to construct a multi-dimensional condition vector based on the timestamp corresponding to each missing record in the spatiotemporal aligned dataset. Retrieve homogeneous samples from the historical database according to the multidimensional condition vector, fill missing values with the mean of the retrieved homogeneous samples, and output the complete dataset. The hybrid graph topology construction module is used to construct a physical connection matrix and a geographic correlation matrix based on the physical connection topology of the power distribution network and the geographic coordinates of each monitoring node, and then weighted and fused them into a hybrid adjacency matrix; the hybrid adjacency matrix is normalized to form a graph topology structure. The spatiotemporal feature encoding module is used to map the complete dataset as node features onto the graph topology and input it into the spatiotemporal graph convolutional network. An adaptive balanced training module is used to construct a fault diagnosis network model that includes the spatiotemporal graph convolutional network and a classification output layer, and to train the network model using an adaptive class balance loss function based on the number of effective samples. The online fault diagnosis reasoning module is used to input the distribution network operation data to be diagnosed into the fault diagnosis network model and output the corresponding fault diagnosis results.
9. An electronic device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the steps of the method as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.