Power distribution network fault early warning method, system and device and storage medium
A multi-layer Stacking model with gradient boosting decision trees integrates weak classifiers to predict distribution network faults, improving accuracy and enabling timely early warnings, thus reducing power outages and economic losses.
Patent Information
- Application Number
- CN202411119561.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-27
AI Technical Summary
Current methods for predicting distribution network faults are inadequate, leading to delayed responses and increased power outages during peak demand periods, causing inconvenience and economic losses.
A multi-layer Stacking model using gradient boosting decision trees integrates weak classifiers like Logistics regression, Gaussian Naive Bayes, and Markov chain models to predict distribution network faults, incorporating power load and environmental data for accurate early warning.
The model enhances fault prediction accuracy, enabling timely early warnings and reducing power outages by optimizing data through feature extraction and ensemble learning techniques.
Smart Images

Figure CN119207045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distribution network state prediction, and in particular to a distribution network fault early warning method, system, equipment and storage medium. Background Art
[0002] The distribution network is the intermediate link between users and the power system. The power supply reliability of the distribution network is a very important factor in measuring the quality of power. Through the analysis and research of power supply reliability, we can find the relatively weak links in the distribution network, link it with the development of the local economy, and formulate measures to improve the reliability of power supply, so as to provide better power quality and create higher social benefits. During the peak summer period, the power consumption of residential users in the distribution area increased rapidly, and the power load reached the highest peak of the year. With the increase in social power consumption, the phenomenon of heavy overload and heavy three-phase imbalance of distribution transformers has become increasingly prominent. The frequent power outages of the distribution network caused by heavy overload and heavy three-phase imbalance have been increasingly valued by power grid managers. Frequent power outages in the distribution network have not only led to an increase in user complaints about power services, but also brought great inconvenience to residents' daily lives and even caused serious commercial economic losses.
[0003] When an accident occurs in the distribution network, the current work process is to receive calls from users in the power outage area, and then the emergency repair staff will go to the site for testing, understand the cause of the power outage based on the actual situation, and restore power after eliminating the power outage. However, this method cannot provide early warning of distribution network failures, making it difficult for distribution network operation and maintenance personnel to accurately and timely understand the operating status of the distribution network, and unable to respond and maintain quickly, which in turn leads to further escalation of distribution network failures.
[0004] It can be seen that how to predict the fault of the distribution network transformer in a timely and accurate manner has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The present invention provides a distribution network fault early warning method, system, device and storage medium to effectively evaluate the operating status of the distribution network transformer and predict the probability of fault occurrence, thereby achieving timely distribution network fault early warning.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a distribution network fault early warning method, comprising:
[0007] The acquired historical data set of transformer operation status of the distribution network is processed according to the minimum redundancy maximum correlation algorithm to obtain a dimensional feature label corresponding to the historical data set, wherein the dimensional feature label includes a power load feature label and an environmental information dimensional label;
[0008] Classify the historical data set according to the dimensional feature labels to obtain a balanced data set;
[0009] In the first training process, the balanced data set is input into each data model respectively, and a first target data model is determined based on the output result of each data model; wherein the data model includes at least a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model;
[0010] In the second training process, the balanced data set is input into a data model that meets the preset weight conditions for processing, and a second target data model is determined based on the output result of the corresponding data model;
[0011] In the third training process, the weak classifiers of each of the data models are integrated and optimized based on the Voting integrated strategy algorithm, and the balanced data set is input into the integrated and optimized weak classifier to determine the third target data model;
[0012] Based on the gradient boosting decision tree algorithm, the first target data model, the second target data model and the third target data model are optimized and integrated to obtain a fault prediction model;
[0013] According to the fault prediction result obtained by the fault prediction model, early warning information is sent to at least one power terminal, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
[0014] Furthermore, before the acquired historical data set of transformer operation status of the distribution network is processed according to the minimum redundancy maximum correlation algorithm, the method further includes:
[0015] Acquire operation data according to the operation status of the transformer of the distribution network and perform data cleaning to obtain an initial data set;
[0016] Decomposing the initial data set into a time series, obtaining first characteristics of trend, seasonality and residual components of the initial data set, and obtaining second characteristics of lag and rolling of the initial data set according to a time step;
[0017] The first feature and the second feature are amplified and integrated into the initial data set to obtain the historical data set.
[0018] Furthermore, the classifying process of the historical data set according to the dimensional feature labels to obtain a balanced data set includes:
[0019] Classifying the operating status of the historical data set according to the dimensional feature labels to obtain a data set to be balanced;
[0020] Based on the classification result of the running status, the to-be-balanced data set is balanced by using a K-means clustering algorithm to obtain the balanced data set.
[0021] Furthermore, in the first training process, the balanced data set is input into each data model respectively, and a first target data model is determined based on an output result of each data model, including:
[0022] Sampling the balanced data set to obtain a plurality of balanced subsets, and dividing the balanced subsets into a training set and a test set;
[0023] Input each of the training sets into each of the data models for training to obtain a trained data model, and input the test set into each of the trained data models for prediction to obtain a first prediction result;
[0024] The prediction accuracy of the first prediction result is evaluated to determine the corresponding first target data model.
[0025] Furthermore, in the second training process, the balanced data set is input into a data model that meets the preset weight condition for processing, and a second target data model is determined based on the output result of the corresponding data model, including:
[0026] Allocating weights to the weak classifiers of each of the data models, and selecting a data model that meets the preset weight conditions through the weight coefficient;
[0027] Inputting the balanced data set into a data model that meets preset weight conditions to obtain a second prediction result;
[0028] Whether the weight of the data model meets the first preset requirement is determined according to the second prediction result; if not, the weight value is adjusted, and the second training process is repeated until a data model that meets the first preset requirement is obtained.
[0029] Furthermore, in the third training process, the weak classifiers of each of the data models are integrated and optimized based on the Voting integrated strategy algorithm, and the balanced data set is input into the integrated and optimized weak classifier to determine the third target data model, including:
[0030] The balanced data set is respectively input into the Logistics regression model, the Gaussian Naive Bayes model and the Markov chain model for training to obtain a base model to be integrated;
[0031] The base models to be integrated are integrated by using a Voting integration strategy algorithm to construct an integrated model;
[0032] Inputting the balanced data set into the integrated model for testing to obtain a third prediction result;
[0033] Evaluate whether the third prediction result meets the second preset requirement; if not, adjust the Voting integration parameters and repeat the third training process until a third target data model that meets the second preset requirement is obtained.
[0034] Furthermore, the sending of early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model includes:
[0035] Inputting the real-time operation data of the distribution network into the fault prediction model to obtain the fault prediction result;
[0036] According to the fault prediction result, corresponding warning information is sent, and the warning information includes fault type information, duration information and countermeasure information.
[0037] Another embodiment of the present invention provides a distribution network fault early warning system, including:
[0038] A data preprocessing module, used to process the acquired historical data set of transformer operating status of the distribution network according to the minimum redundancy maximum correlation algorithm to obtain a dimensional feature label corresponding to the historical data set, wherein the dimensional feature label includes a power load feature label and an environmental information dimensional label;
[0039] A data optimization module, used for classifying the historical data set according to the dimensional feature labels to obtain a balanced data set;
[0040] A first training module, used for inputting the balanced data set into each data model respectively in a first training process, and determining a first target data model based on the output result of each data model; wherein the data model at least includes a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model;
[0041] A second training module is used for inputting the balanced data set into a data model that meets the preset weight condition for processing during a second training process, and determining a second target data model based on an output result of the corresponding data model;
[0042] A third training module is used to integrate and optimize the weak classifiers of each of the data models based on the Voting integrated strategy algorithm during the third training process, and input the balanced data set into the integrated and optimized weak classifiers to determine a third target data model;
[0043] A model optimization module, used for optimizing and integrating the first target data model, the second target data model and the third target data model based on a gradient boosting decision tree algorithm to obtain a fault prediction model;
[0044] The early warning module is used to send early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
[0045] Yet another embodiment of the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the distribution network fault early warning method as described above when executing the computer program.
[0046] Yet another embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the distribution network fault early warning method as described above is implemented.
[0047] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0048] (1) Multi-dimensional feature extraction is performed on the data set collected based on the historical load data of distribution transformers and the distribution network status gradient (normal, warning, abnormal, and severe abnormal), and the data set is screened and optimized so that the data set can better reflect the operating status of the distribution network and improve the accuracy of the prediction results.
[0049] (2) A multi-layer Stacking optimization model is constructed based on the distribution network operation data for prediction. That is, different types of weak classifiers with different prediction capabilities are constructed respectively, and a distribution network operation status level prediction model is constructed by combining weight allocation and Voting ensemble learning voting method. In order to prevent overfitting, the model is optimized by gradient boosting decision tree algorithm to improve the accuracy, robustness and reliability of distribution network equipment status analysis and judgment. The present invention can accurately predict the status of distribution network equipment during operation through multi-dimensional weak classifier integration technology, warn of the risk of power outage in the distribution network in advance, and formulate a more effective distribution network fault maintenance strategy, thereby reducing the occurrence of distribution network accidents and improving the economy and safety of the distribution network. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a distribution network fault early warning method in one embodiment of the present invention;
[0051] Figure 2 It is a structural block diagram of a distribution network fault early warning system in one embodiment of the present invention;
[0052] Figure 3 A block diagram of a computer device structure in one embodiment of the present invention; DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] In the description of this application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0055] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. The terms "vertical", "horizontal", "left", "right", "upper", "lower" and similar expressions used herein are only for illustrative purposes, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0056] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood by specific circumstances.
[0057] In order to overcome and solve the situation where regional distribution network equipment fails due to parameters such as status, technology and environment, this application proposes to evaluate and predict the operating status of the distribution network based on multi-dimensional weak classifiers and multi-layer Stacking models from the perspective of the operating status of the transformer, so as to grasp the operating status of the distribution network in real time, thereby realizing the early warning of the risk of power outages in the distribution network. Among them, the Stacking model, also known as stacked generalization, is a powerful model fusion technology. It generates the final prediction result by combining the prediction results of multiple basic classifiers (or primary learners). The Stacking model usually consists of two or more layers. The basic idea of the Stacking model is to fuse the prediction results of several single models through a model (also called a secondary learner or meta-learner), with the aim of reducing the generalization error of a single model and improving the overall prediction performance.
[0058] Weak classifier is a concept commonly used in the field of machine learning, especially in ensemble learning methods. Weak classifiers refer to those classifiers whose classification performance is only slightly better than random guessing when used alone. When these classifiers are used alone, their accuracy may not be high, and may even be lower than a certain threshold (such as 50% accuracy, which is equivalent to random guessing in a binary classification problem). However, when multiple weak classifiers are properly combined, they can form a strong classifier whose performance far exceeds that of any single weak classifier.
[0059] In view of the above problems, an embodiment of the present invention provides a distribution network fault early warning method. For details, see Figure 1 , Figure 1 The flowchart of the distribution network fault early warning method in one embodiment of the present invention is shown, which includes the following steps:
[0060] S1. Process the acquired historical data set of transformer operating status of the distribution network according to the minimum redundancy maximum correlation algorithm to obtain dimensional feature labels corresponding to the historical data set, wherein the dimensional feature labels include power load feature labels and environmental information dimensional labels.
[0061] In this embodiment, before the historical data set is processed, a data set acquisition process is also included, specifically:
[0062] First, the operation data is obtained according to the transformer operation status of the distribution network and the data is cleaned to obtain the initial data set. Among them, data cleaning includes missing value processing and outlier processing. Since the missing data accounts for a small part, the deletion method is used to directly discard the missing data; for abnormal data, the average value of the load data of the same nature is used to interpolate and replace the abnormal data.
[0063] Secondly, based on the time series decomposition of the initial data set, the first characteristics of the trend, seasonality and residual components of the initial data set are obtained, and the second characteristics of the lag and rolling of the initial data set are obtained according to the time step. It can be understood that, combined with the background characteristics of the distribution network data, its state parameters change significantly with the peak summer and extreme climate, that is, they have a strong time correlation.
[0064] Therefore, preferably, the STL decomposition method is used to decompose the cleaned transformer operation status data of the distribution network, including equipment historical load data, typhoon / thunderstorm and other meteorological data, and power grid operation status quantities such as voltage / current / three-phase imbalance, into trend, seasonality and residual components to obtain the first feature. STL (Standard Template Library) is an important part of the C++ standard library. It is a method commonly used in time series analysis, which can decompose time series into trend, seasonality and residual components, which helps to better understand the internal structure of the operation data and may improve the prediction accuracy of subsequent models.
[0065] Preferably, since the monitoring data is updated in real time, a time step is taken as one hour, and then the data series of the past three time steps and the data means within the three time steps are counted as the basis for describing the lag characteristics and rolling statistical characteristics of the initial data set of the distribution network, which is the second feature mentioned above, wherein the missing records caused by data lag sliding are directly deleted.
[0066] Finally, the first feature and the second feature are amplified and integrated into the initial data set to obtain the historical data set. It can be understood that the trend, seasonality, residual components, lag, and rolling features obtained through the above steps in the embodiment of the present invention are directly amplified and integrated into the initial data set as five new features, so as to effectively capture the different dimensions and patterns of the distribution network time series data, and lay the foundation for building an accurate prediction model.
[0067] The new data set obtained after feature expansion inevitably has the problems of high data correlation and high redundancy, and the minimum redundancy maximum correlation (mRMR) algorithm is a feature selection method commonly used to process high-dimensional data. Therefore, in some embodiments, the minimum redundancy maximum correlation algorithm is used to mine the characteristic information of distribution network equipment on the expanded historical data set to obtain dimensional feature labels corresponding to the historical data set. It can be understood that in this embodiment, the dimensional feature labels include power load feature labels and environmental information dimensional labels.
[0068] In some implementations, the processing of the above algorithm is described in detail, preferably:
[0069] First, the correlation degree I between the distribution network dimension features and the state labels is measured by mutual information, that is:
[0070]
[0071] Then, the maximum correlation of the data set is achieved according to the degree of correlation, which can be expressed by maximizing the mutual information between the feature and the target:
[0072]
[0073] Among them, D is the mutual information value between the feature and the category (whether it belongs to this state), c is the category of the distribution network dataset (whether it belongs to this state), and |S| is the number of feature sets.
[0074] Next, we achieve the minimum redundancy of the data set, which can be represented by minimizing the mutual information between features:
[0075]
[0076] Among them, R is the mutual information value between features.
[0077] Finally, the maximum correlation and minimum redundancy are considered comprehensively to optimize the data set, and the operator is defined as and
[0078]
[0079] As can be seen from the formula, these two optimization conditions are the information difference and information entropy feature selection algorithms. The information difference and information entropy of each feature are calculated, sorted, and selected to finally obtain the optimal state level feature subset. The corresponding dimensional feature label is obtained through the optimal state level feature subset.
[0080] The core idea of the minimum redundancy maximum correlation algorithm is to minimize the redundancy between features while ensuring that the features have a high correlation with the target variable (or output category). The purpose of this is to improve the prediction accuracy and generalization ability of the model.
[0081] S2. Classify the historical data set according to the dimensional feature labels to obtain a balanced data set.
[0082] The power load characteristic labels and environmental information dimension labels obtained in the above steps can reflect the transformer operating status of the distribution network. For example, the power load characteristics include the rate of change of the power load, which can reflect the speed of change of the transformer load over time, which is of great significance for monitoring the sudden increase or decrease of the load, and the environmental information dimension labels include the temperature and humidity of the transformer environment, weather conditions and other factors that may cause transformer fluctuations. It can be understood that these dimension labels are closely related to the operating status level of the transformer (normal, caution, abnormal, severe abnormality).
[0083] In this step, the historical data set is classified into operating states according to the dimensional feature labels to obtain a data set to be balanced.
[0084] Therefore, preferably, this embodiment uses Python in the integrated environment of Python to generate a feature data set D with normal state (y=1) and abnormal state (y=0), i.e. (attention, abnormality, severe abnormality) from the historical data set based on dimensional feature labels.
[0085] Considering that in the actual operation of the distribution network, most of the equipment is running in a normal state, which leads to a serious imbalance in the feature data set D. Therefore, it is necessary to balance the state level of the data set D through an algorithm.
[0086] It is understood that K-means clustering is a distance-based clustering algorithm, and K-means clustering undersampling is a data processing method that combines the K-means clustering algorithm and undersampling technology. It aims to solve the problem of imbalance between sample sets in classification problems, so as to improve the diversity of training samples and model performance.
[0087] Therefore, preferably, based on the classification result of the running status, the to-be-balanced data set is balanced by a K-means clustering algorithm to obtain the balanced data set.
[0088] In some embodiments, a calculation process is provided, specifically:
[0089] Preferably, 80% of the feature data set D can be selected as the training data set D1, and 20% can be selected as the test data set D2. The data set T0 with no power outages in the training data set D1 is clustered, and k cluster centroids are randomly selected as μ1, μ1, …, μ k ∈R n , set (x i ,y i )∈T0, calculate the cluster to which it belongs:
[0090]
[0091] in, is the data (x i ,y i ) belongs to the cluster;
[0092] For each cluster j, recalculate the centroid of the cluster, which is expressed by the following formula:
[0093]
[0094] Calculate the maximum moving distance of the cluster center d = max(||μ j ′-μ j ||2), if the maximum moving distance exceeds the threshold, update μ j =μ j ′, and then recalculate the maximum correlation minimum redundancy, and randomly undersample each cluster of the above clustering results according to the proportion α. The choice of α depends on the specific situation of the data set and the degree of imbalance between the target categories, and finally a balanced data set is obtained.
[0095] S3. In the first training process, the balanced data set is input into each data model respectively, and the first target data model is determined based on the output result of each data model, wherein the data model includes at least a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model.
[0096] The embodiment of the present invention aims to construct a three-expert model to predict the operating status of the distribution network, and this step is a process based on weak classifier integration.
[0097] Specifically, the first training process is the first target data model construction process. Preferably, a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model are selected as weak classifiers (base learners).
[0098] The following is a detailed description of the construction process of the first target data model:
[0099] First, the balanced data set is sampled to obtain a plurality of balanced subsets, and the balanced data set is divided into a training set and a test set. It can be understood that the embodiment of the present invention samples a plurality of subsets with replacement from the balanced data set: {D1, D2, D3…, D n}, each subset D j Contains 1 / 3 of the samples.
[0100] Secondly, each of the training sets is input into each of the data models for training to obtain a trained data model, and the test set is input into each of the trained data models for prediction to obtain a first prediction result.
[0101] It can be understood that in this embodiment, the training sets are selected to be input into different types of weak classifiers, for example, the training sets are input into the Logistics regression model for training. In some implementation processes, a specific implementation calculation process is provided to construct a Logistics regression model. The specific calculation process is shown as follows:
[0102] The first step is to define the conditional probability P(Y=1|x)=π(x), P(Y=0|x)=1-π(x) as the Logistic regression model;
[0103] The second step is to establish the likelihood function and log-likelihood function.
[0104] Among them, the likelihood function is the probability of observing data under given parameters:
[0105]
[0106] The log-likelihood function is the natural logarithm of the likelihood function, which is easier to handle:
[0107]
[0108] The third step is to find the maximum value of L(x) and obtain the estimated value of w, and transform the problem into an optimization problem with the log-likelihood function as the objective function. Preferably, the method that can be used in Logistics regression is the gradient descent method.
[0109] Step 4: According to the above formula, the probability prediction of equipment status level based on the Logistics regression model can be obtained. Assume that the maximum likelihood estimate of w is Then we can get the Logistics regression model:
[0110]
[0111] After the constructed Logistics regression model is obtained, the above training set is used for training to obtain a Bagging integration model, and the Bagging integration model is used to predict the operating status of the distribution network transformer to obtain the prediction result.
[0112] Furthermore, in this embodiment, the Gaussian Naive Bayes model and the Markov chain model are selected again as weak classifiers to construct the Bagging ensemble model. Similarly, the same construction, training and prediction process as the Logistics regression model is required to obtain different prediction results, and the prediction result output by the Logistics regression model is combined as the first prediction result.
[0113] Finally, the prediction accuracy of the first prediction result is evaluated to determine the corresponding first target data model.
[0114] It is understandable that since different weak classifiers have different prediction results, it is necessary to evaluate the accuracy of the data models integrated with different weak classifiers. The state level probability of each data model can be obtained by majority voting. After that, the Bagging model with the highest classification accuracy is selected, which is defined as the optimal Bagging homogeneous expert (one of the three expert models), that is, the first target data model.
[0115] S4. In the second training process, the balanced data set is input into a data model that meets the preset weight conditions for processing, and a second target data model is determined based on the output result of the corresponding data model.
[0116] Furthermore, although the optimal Bagging homogeneous expert obtained in the above steps can improve the robustness of the model and the accuracy of the model prediction results, it does not differentiate the selection of each weak classifier. Based on this, in an embodiment of the present invention, it is provided to give different weights to weak classifiers to construct another weak classifier integration model.
[0117] The embodiment of the present invention integrates the base model through the second training process, that is, the construction process of the second target data model, specifically:
[0118] First, weights are assigned to the weak classifiers of the data models, and the data models that meet the preset weight conditions are selected through the weight coefficients.
[0119] In the embodiment, it can be understood that the Boosting homogeneous expert is constructed by taking the Logistics weak classifier as an example. If N is the number of samples in the distribution network balance data set, M is the number of weak classifiers, and the mth weak classifier is B m(x), the final output is the optimal Boosting homogeneous expert composed of weak classifiers, that is, the second target data model.
[0120] The following is a detailed description of the integration process of the above-mentioned Boosting homogeneous experts:
[0121] The first step is to initialize the weight distribution of each network distribution data:
[0122] D m =(ω m,1 ,ω m,2 ,ω m,3 ,…ω m,N}
[0123] in, Weights are assigned to samples, D m Represents the sample weight allocation of the mth weak classifier.
[0124] The second step is to use the weight distribution D m The data set is used to obtain the weak classifier B m (x) is the device status classification result, and the weak classifier B m The error of (x) is defined as: Among them, y i is the equipment status classification result of the i-th sample.
[0125] The third step is to define the weak classifier B based on the above error. m Weight coefficient of (x):
[0126]
[0127] From the above formula, we can see that the basic principle of weight allocation for a weak classifier is: the more accurate the classification, the greater the weight.
[0128] At this time, the sample weight distribution of the data set needs to be updated:
[0129] D m+1 =(ω m+1,1 ,ω m+1,2 ,ω m+1,3 ,…ω m+1,N}
[0130] in, α m is a number between (0,1).
[0131] Finally, a Boosting homogeneous expert based on the Logistics regression model is constructed based on the weight coefficient:
[0132]
[0133] Secondly, the balanced data set is input into a data model that meets the preset weight conditions to obtain a second prediction result.
[0134] It can be understood that the embodiment of the present invention preferably uses the Logistics regression model and the Gaussian Naive Bayes model as weak classifiers to participate in the construction of the above-mentioned Boosting homogeneous expert. Therefore, the second prediction result here includes the output result of the data model based on Logistics regression and the output result of the data model based on Gaussian Naive Bayes. Similar to the first training process, it is necessary to evaluate the prediction accuracy based on these two different types of data models, and the data model with the highest prediction accuracy is preferably used as the optimal Boosting homogeneous expert, that is, one of the three expert models.
[0135] It is worth noting that in the process of machine learning or data modeling, evaluating model performance and adjusting model parameters based on the evaluation results is an iterative process, which aims to optimize the prediction ability of the model to meet specific preset requirements. Therefore, it can be understood that in this embodiment, it is necessary to determine whether the weight of the data model meets the first preset requirement based on the second prediction result. If not, the weight value is adjusted, and the second training process is repeated until a data model that meets the first preset requirement is obtained.
[0136] Different model parameters will also affect the prediction results of the model. In order to make the prediction results output by Boosting homogeneous experts more accurate, in some implementations, you can choose to divide the samples of the balanced data set to different degrees or change the weight value, or adjust the model parameters, including but not limited to the learning rate, number of iterations, regularization coefficient, network structure (such as the number of layers, the number of neurons), feature selection, etc.
[0137] Judging whether the first preset requirement is met refers to comparing the calculated index value with a preset threshold or range. If the evaluation result shows that the performance of the model does not meet the first preset requirement, then in this embodiment, it is preferred to change the weight ratio to adjust the parameters.
[0138] S5. In the third training process, the weak classifiers of each of the data models are integrated and optimized based on the Voting integrated strategy algorithm, and the balanced data set is input into the integrated and optimized weak classifier to determine the third target data model.
[0139] Voting ensemble strategy is a commonly used method in ensemble learning, which improves overall performance by combining the prediction results of multiple models. In classification tasks, the voting ensemble strategy is particularly effective because it can make full use of the advantages of different classifiers in feature extraction and classification decision-making, achieve complementarity between models and improve performance.
[0140] It can be understood that in this embodiment, the third training process is the third target data model integration process. With the excellent performance of the Voting integration strategy, the embodiment of the present invention will provide Voting integration voting to optimize the base learner, that is, the three different types of weak classifiers mentioned above, so as to construct a heterogeneous expert model based on Voting (one of the three expert models), that is, the third target data model.
[0141] The following is a detailed description of the above-mentioned Voting-based heterogeneous expert model construction process:
[0142] First, the balanced data set is respectively input into the Logistics regression model, the Gaussian Naive Bayes model and the Markov chain model for training to obtain a base model to be integrated.
[0143] The above process is similar to the weak classifier construction process of steps S3 and S4, and will not be repeated here.
[0144] Secondly, the base models to be integrated are integrated through the Voting integration strategy algorithm to construct an integrated model.
[0145] The voting integration strategy is mainly divided into two methods: hard voting and soft voting. Preferably, in this embodiment, the soft voting mechanism is selected to integrate the prediction results of the above-mentioned base model to be integrated. Soft voting can make full use of the judgment information of the classifier for different categories and can usually achieve better performance.
[0146] Specifically, each classifier outputs a prediction probability distribution. The final prediction result is the weighted average (or median, etc.) of the prediction probabilities of all classifiers. Usually, some measure of classifier performance (such as accuracy) is used as the weight. Suppose the probability that the three weak classifiers output the four device states of normal, attention, abnormal, and severe abnormal is p i (j), where j = 1, 2, 3, 4, i.e., the number of states; i = 1, 2, 3, i.e., the number of weak classifiers, then the final prediction result C can be described as:
[0147]
[0148] Among them, ω i The weight of each heterogeneous learner model can be an average value of 1 / N in this embodiment.
[0149] The operating state of the distribution network is predicted according to the above formula, and the balance data set is input into the integrated model for testing to obtain a third prediction result. Similarly, the third prediction result includes the prediction result of the integrated model based on the Logistics regression model, the Gaussian Naive Bayes model, and the Markov chain model.
[0150] Evaluate whether the third prediction result meets the second preset requirement; if not, adjust the Voting integration parameters and repeat the third training process until a third target data model that meets the second preset requirement is obtained.
[0151] Similar to the parameter adjustment process of the second training process in step S5, the purpose is to make the prediction accuracy of the constructed integrated model higher and the effect better. In some implementations of this step, the parameters of the weak classifiers can be adjusted, such as: cross-validation, random search or Bayesian optimization methods can be used to adjust the parameters of each weak classifier, or the Voting integrated parameters can be adjusted, such as: in soft voting, different weights are given according to the performance of the weak classifiers. Classifiers with better performance should be given greater weights so that they can play a greater role in the final decision.
[0152] It is understandable that it is necessary to determine whether the third prediction result meets the second preset requirement. In this step, determining whether the second preset requirement is met refers to whether the above-mentioned final prediction result meets the model prediction performance index requirement. According to the performance evaluation results of the integrated model, the selection of weak classifiers, parameter settings and voting strategies are continuously adjusted to seek the optimal solution for performance, thereby obtaining the third target data model, that is, the heterogeneous expert model based on voting.
[0153] S6. Optimize and integrate the first target data model, the second target data model and the third target data model based on a gradient boosting decision tree algorithm to obtain a fault prediction model.
[0154] For the three expert models obtained in the above steps: optimal Bagging homogeneous expert, optimal Boosting homogeneous expert and heterogeneous expert model based on Voting. In order to prevent overfitting and improve the robustness of the expert model, in some implementations, a gradient boosting decision tree algorithm is introduced for optimization.
[0155] Gradient boosting decision tree is an iterative decision tree algorithm that constructs a set of weak learners (usually decision trees) and accumulates the results of multiple decision trees as the final prediction output. The core idea is to combine multiple weak learners into a powerful prediction model. It can handle complex nonlinear relationships and high-dimensional data, and can usually achieve higher accuracy than a single decision tree or linear model in classification and regression tasks.
[0156] Therefore, preferably, in this embodiment, LightGBM is selected to optimize the model. LightGBM is an efficient implementation of the gradient boosting decision tree algorithm.
[0157] In some implementations, an optimization process for constructing a fault prediction model using the LightGBM algorithm is provided:
[0158] The mean square error is a commonly used loss function for evaluating the performance of regression models and is defined as:
[0159] L(y i ,F(x i ))
[0160] Among them, y i is the true value, F(x i ) is the model's predicted value for the i-th sample, and n is the total number of samples.
[0161] According to the above mean square error, iterative calculation is performed to obtain the residual equation. For the mth iteration, the residual is calculated as:
[0162]
[0163] Among them, F (m-1) is the predicted value of the device status in the m-1th iteration.
[0164] Construct a new decision tree h based on the residual m To fit the error
[0165]
[0166] Finally, the model can be updated as:
[0167] F (m) (x) = F (m-1) (x)+μh m (x)
[0168] Among them, μ is the learning rate, which can be adjusted according to actual conditions.
[0169] It is worth noting that in this embodiment, LightGBM has many significant advantages over the optimization process of other gradient boosting decision trees (such as XGBoost). It uses the histogram algorithm to make training faster and reduce memory consumption, and achieves higher accuracy of the model through efficient algorithm design and parameter tuning.
[0170] Specifically, the embodiment of the present invention implements the test by the above-mentioned technical means, including the test of the operation status of the distribution network based on the Logistic regression model. Please refer to Table 1 for some data tables:
[0171] Table 1 Logistic regression part of the test data set
[0172]
[0173]
[0174] Furthermore, the results of fault prediction using the fault prediction model are shown in Table 2:
[0175] Table 2 Partial prediction results of fault prediction model
[0176] Actual value {1,0,0,0} {1,0,0,0} {0,0,1,0} {0,1,0,0} {1,0,0,0} {0,1,0,0} {1,0,0,0} {0,0,0,1} {0,0,1,0} Predicted value {1,0,0,0} {1,0,0,0} {0,0,1,0} {0,1,0,0} {1,0,0,0} {0,1,0,0} {1,0,0,0} {0,0,1,0} {0,0,1,0} Actual value {1,0,0,0} {0,1,0,0} {1,0,0,0} {1,0,0,0} {0,1,0,0} {0,1,0,0} {0,0,1,0} {0,1,0,0} {0,1,0,0} Predicted value {1,0,0,0} {0,1,0,0} {1,0,0,0} {0,1,0,0} {0,1,0,0} {0,1,0,0} {0,0,1,0} {0,1,0,0} {0,1,0,0}
[0177] It can be seen from the contents of the above table that the embodiment of the present invention can accurately predict the fault conditions of the distribution network through the above data model.
[0178] S7. Sending early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
[0179] Since the present invention aims to construct fault prediction models to predict the operating status of the distribution network, when these models can accurately predict potential faults, timely conveying early warning information to relevant parties is a key step to ensure rapid response and reduce losses.
[0180] In this step, the real-time operation data of the distribution network is input into the fault prediction model to obtain the fault prediction result; according to the fault prediction result, corresponding warning information is sent, and the warning information includes fault type information, duration information and response measures information.
[0181] Specifically, based on the fault prediction results, clear and easy-to-understand warning information will be generated. The information should include the specific description, location, urgency, recommended response measures, etc. of the fault. Multiple warning information can also be prioritized according to the potential impact and urgency of the fault to ensure that the most urgent faults are handled first.
[0182] Clarify the recipients of early warning information, including power maintenance personnel terminals (such as dedicated apps on mobile phones and tablets or SMS receiving numbers) and power grid operation terminals (such as large screens in the control center, monitoring systems, etc.).
[0183] Furthermore, the power maintenance personnel can quickly arrive at the scene according to the early warning information to conduct fault investigation and repair work. After the fault is handled, the accuracy and timeliness of the early warning information are evaluated to optimize the fault prediction model and early warning process.
[0184] In summary, a distribution network fault early warning method provided by an embodiment of the present invention obtains a data set closely related to the power load and environmental information of the distribution network by performing redundant processing and state classification on the transformer operating status data of the distribution network; constructs an integrated prediction model based on a multidimensional weak classifier (Logistics regression, Gaussian naive Bayes and Markov chain) to obtain three expert models, namely, the optimal Bagging homogeneous expert, the optimal Boosting homogeneous expert and the heterogeneous expert based on Voting, so as to accurately predict the operating status of the distribution network and obtain the fault information of the distribution network, and optimizes the expert model using a gradient boosting decision tree algorithm, so as to effectively improve the accuracy, robustness and reliability of the analysis and judgment of the distribution network status, so as to grasp the operating status of the distribution network in real time, give early warning of various fault risks of the distribution network, reduce the occurrence of accidents and avoid economic losses, and improve the economy and safety of the distribution network.
[0185] An embodiment of the present invention provides a distribution network fault warning system. For details, see Figure 2 , Figure 2 The structure block diagram of the distribution network fault early warning system in one embodiment of the present invention is shown, including:
[0186] The data preprocessing module M1 is used to process the acquired historical data set of transformer operation status of the distribution network according to the minimum redundancy maximum correlation algorithm to obtain a dimensional feature label corresponding to the historical data set, wherein the dimensional feature label includes a power load feature label and an environmental information dimensional label;
[0187] A data optimization module M2 is used to classify the historical data set according to the dimensional feature labels to obtain a balanced data set;
[0188] A first training module M3 is used to input the balanced data set into each data model in a first training process, and determine a first target data model based on the output result of each data model; wherein the data model at least includes a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model;
[0189] A second training module M4 is used for inputting the balanced data set into a data model that meets the preset weight condition for processing during the second training process, and determining a second target data model based on the output result of the corresponding data model;
[0190] The third training module M5 is used to integrate and optimize the weak classifiers of each of the data models based on the Voting integrated strategy algorithm during the third training process, and input the balanced data set into the integrated and optimized weak classifiers to determine the third target data model;
[0191] A model optimization module M6 is used to optimize and integrate the first target data model, the second target data model and the third target data model based on a gradient boosting decision tree algorithm to obtain a fault prediction model;
[0192] The early warning module M7 is used to send early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
[0193] like Figure 3 As shown, the embodiment of the present invention further provides a computer device, Figure 3 A structural block diagram of a preferred embodiment of a computer device provided by the present invention, the computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the distribution network fault early warning method as described above when executing the computer program.
[0194] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0195] The processor may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.
[0196] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.
[0197] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 3 The structural block diagram is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine certain components, or different components. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0198] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to perform the steps in the distribution network fault early warning method of the above embodiment, for example Figure 1 Steps S1 to S7 described in .
[0199] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A distribution network fault early warning method, characterized in that: include: The acquired historical data set of transformer operation status of the distribution network is processed according to the minimum redundancy maximum correlation algorithm to obtain a dimensional feature label corresponding to the historical data set, wherein the dimensional feature label includes a power load feature label and an environmental information dimensional label; Classify the historical data set according to the dimensional feature labels to obtain a balanced data set; In the first training process, the balanced data set is input into each data model respectively, and a first target data model is determined based on the output result of each data model; wherein the data model includes at least a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model; In the second training process, the balanced data set is input into a data model that meets the preset weight conditions for processing, and a second target data model is determined based on the output result of the corresponding data model; In the third training process, the weak classifiers of each of the data models are integrated and optimized based on the Voting integrated strategy algorithm, and the balanced data set is input into the integrated and optimized weak classifier to determine the third target data model; Based on the gradient boosting decision tree algorithm, the first target data model, the second target data model and the third target data model are optimized and integrated to obtain a fault prediction model; According to the fault prediction result obtained by the fault prediction model, early warning information is sent to at least one power terminal, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
2. The distribution network fault early warning method according to claim 1, characterized in that: Before the acquired historical data set of transformer operation status of the distribution network is processed according to the minimum redundancy maximum correlation algorithm, the method further includes: Acquire operation data according to the operation status of the transformer of the distribution network and perform data cleaning to obtain an initial data set; Decomposing the initial data set into a time series, obtaining first characteristics of trend, seasonality and residual components of the initial data set, and obtaining second characteristics of lag and rolling of the initial data set according to a time step; The first feature and the second feature are amplified and integrated into the initial data set to obtain the historical data set.
3. The distribution network fault early warning method according to claim 1, characterized in that: The classifying process of the historical data set according to the dimensional feature labels to obtain a balanced data set includes: Classifying the operating status of the historical data set according to the dimensional feature labels to obtain a data set to be balanced; Based on the classification result of the running status, the to-be-balanced data set is balanced by using a K-means clustering algorithm to obtain the balanced data set.
4. The distribution network fault early warning method according to claim 1, characterized in that: In the first training process, the balanced data set is input into each data model respectively, and a first target data model is determined based on the output result of each data model, including: Sampling the balanced data set to obtain a plurality of balanced subsets, and dividing the balanced subsets into a training set and a test set; Input each of the training sets into each of the data models for training to obtain a trained data model, and input the test set into each of the trained data models for prediction to obtain a first prediction result; The prediction accuracy of the first prediction result is evaluated to determine the corresponding first target data model.
5. The distribution network fault early warning method according to claim 1, characterized in that: In the second training process, the balanced data set is input into a data model that meets the preset weight condition for processing, and a second target data model is determined based on the output result of the corresponding data model, including: Allocating weights to the weak classifiers of each of the data models, and selecting a data model that meets the preset weight conditions through the weight coefficient; Inputting the balanced data set into a data model that meets preset weight conditions to obtain a second prediction result; Whether the weight of the data model meets the first preset requirement is determined according to the second prediction result; if not, the weight value is adjusted, and the second training process is repeated until a data model that meets the first preset requirement is obtained.
6. The distribution network fault early warning method according to claim 1, characterized in that: In the third training process, based on the Voting integrated strategy algorithm, the weak classifiers of each of the data models are integrated and optimized, and the balanced data set is input into the integrated and optimized weak classifiers to determine the third target data model, including: The balanced data set is respectively input into the Logistics regression model, the Gaussian Naive Bayes model and the Markov chain model for training to obtain a base model to be integrated; The base models to be integrated are integrated by using a Voting integration strategy algorithm to construct an integrated model; Inputting the balanced data set into the integrated model for testing to obtain a third prediction result; Evaluate whether the third prediction result meets the second preset requirement; if not, adjust the Voting integration parameters and repeat the third training process until a third target data model that meets the second preset requirement is obtained.
7. The distribution network fault early warning method according to claim 1, characterized in that: The sending of early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model comprises: Inputting the real-time operation data of the distribution network into the fault prediction model to obtain the fault prediction result; According to the fault prediction result, corresponding warning information is sent, and the warning information includes fault type information, duration information and countermeasure information.
8. A distribution network fault early warning system, characterized in that: include: A data preprocessing module, used to process the acquired historical data set of transformer operating status of the distribution network according to the minimum redundancy maximum correlation algorithm to obtain a dimensional feature label corresponding to the historical data set, wherein the dimensional feature label includes a power load feature label and an environmental information dimensional label; A data optimization module, used for classifying the historical data set according to the dimensional feature labels to obtain a balanced data set; A first training module, used for inputting the balanced data set into each data model respectively in a first training process, and determining a first target data model based on the output result of each data model; wherein the data model at least includes a Logistics regression model, a Gaussian Naive Bayes model and a Markov chain model; A second training module is used for inputting the balanced data set into a data model that meets the preset weight condition for processing during a second training process, and determining a second target data model based on an output result of the corresponding data model; A third training module is used to integrate and optimize the weak classifiers of each of the data models based on the Voting integrated strategy algorithm during the third training process, and input the balanced data set into the integrated and optimized weak classifiers to determine a third target data model; A model optimization module, used for optimizing and integrating the first target data model, the second target data model and the third target data model based on a gradient boosting decision tree algorithm to obtain a fault prediction model; The early warning module is used to send early warning information to at least one power terminal according to the fault prediction result obtained by the fault prediction model, wherein the power terminal includes a power maintenance personnel terminal and a power grid operation terminal.
9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the distribution network fault early warning method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the distribution network fault early warning method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Flexible DC power distribution network fault prediction method, device, equipment and medium
CN119598422A
Biological instrument equipment fault prediction method and system
CN120217183A
Power distribution network fault prediction method and system based on electric power big data
CN121350576A
