Power grid fault early warning method and device, storage medium and computer equipment
The early warning model optimized by deep noise reduction autoencoder and sparrow search algorithm solves the problem of insufficient utilization of meteorological data in traditional power grid fault early warning technology, realizes high accuracy and high timeliness of power grid fault early warning, and enhances the power grid's risk resistance capability.
Patent Information
- Application Number
- CN202510747525.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-11-04
AI Technical Summary
Traditional power grid fault early warning technologies have failed to fully explore the complex intrinsic relationship between meteorological conditions and power grid faults, resulting in insufficient accuracy and timeliness of early warnings and an inability to effectively respond to power grid faults caused by extreme weather.
A deep noise-reducing autoencoder combined with a sparrow search algorithm is used to optimize the early warning model. The sparrow population is initialized and the individual positions are updated by using Logistic chaotic mapping. Fault features are trained using power grid operation information and environmental information, and the fault type, probability and location are determined by combining the logistic regression function.
It improves the accuracy and timeliness of power grid fault early warning, enhances the power grid's ability to withstand risks in complex environments, and provides efficient and reliable operation assurance for smart grids.
Smart Images

Figure CN120892913A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power systems, and in particular to a power grid fault early warning method and device, a storage medium and computer equipment. BACKGROUND
[0002] In the process of the vigorous development of the current power industry, the continuous expansion of the scale of the power grid and the increasing complexity of the structure have significantly increased the potential risks and harm of power grid faults. Meteorological factors, such as gale, rainstorm, thunder and lightning, snow and cold, and other extreme weather conditions, have become one of the key inducements for power grid faults, posing a serious challenge to the safe and stable operation of the power grid.
[0003] Traditional power grid fault early warning technology has obvious limitations in dealing with the influence of meteorological factors. Most traditional methods fail to fully explore the complex and profound internal relationship between meteorological conditions and power grid faults, often simply incorporating meteorological data as auxiliary information into the early warning model, and cannot effectively use key information in the meteorological data to improve the accuracy and timeliness of fault early warning. SUMMARY
[0004] Therefore, the present application provides a power grid fault early warning method, device, storage medium and computer equipment, which can accurately and early warn of power grid faults, minimize the probability of power grid faults and the economic losses and social impacts that may be caused, and escort the safe and stable operation of the power system.
[0005] According to one aspect of the present application, a power grid fault early warning method is provided, comprising:
[0006] obtaining power grid operation information, environmental information and accuracy labels of historical fault early warning events output by a fault early warning model as training data, wherein the power grid operation information includes electrical parameters and device operation and maintenance parameters;
[0007] training a deep denoising autoencoder based on the training data, and optimizing model parameters of the deep denoising autoencoder using a sparrow search algorithm to obtain an optimized early warning model, wherein the sparrow population of the sparrow search algorithm is initialized using a Logistic chaotic mapping, and individual positions are updated based on an inertia weight;
[0008] inputting target power grid operation information and its corresponding target environmental information into the optimized early warning model to obtain power grid fault features;
[0009] determining a power grid fault early warning result based on the power grid fault features.
[0010] Optionally, the power grid fault early warning method further comprises:
[0011] The power grid fault early warning method further comprises:
[0012] The training data is preprocessed;
[0013] The preprocessed training data is divided into a training set, a validation set and a test set based on a preset ratio;
[0014] A mask matrix with the same dimension as the training set is generated, wherein each element m of the mask matrix is 0 and 1-m is 1;
[0015] The mask matrix and the training set are multiplied element by element.
[0016] Optionally, the preprocessing of the training data comprises:
[0017] The training data is compared with a preset abnormal range, and the training data exceeding the preset abnormal range is deleted, wherein the preset abnormal range is determined based on the mean and standard deviation of the training data; and / or,
[0018] The training data is denoised using a wavelet transform algorithm; and / or,
[0019] The training data is normalized.
[0020] Optionally, the training of the deep denoising autoencoder based on the training data comprises:
[0021] The number of feature dimensions of the training data is used as the number of input layer nodes;
[0022] The number of hidden layer nodes is configured in a decreasing relationship based on a preset number of hidden layers and the number of input layer nodes;
[0023] The network architecture of the deep denoising autoencoder is established based on the number of input layer nodes and the number of hidden layer nodes, wherein the model architecture comprises an input layer, multiple hidden layers and an output layer;
[0024] The training set in the training data is input from the input layer and trained through the multiple hidden layers in sequence to obtain reconstructed data;
[0025] The mean square error of the reconstructed data is calculated;
[0026] The model parameters of the network architecture are adjusted based on the gradient information of the mean square error using a backpropagation algorithm;
[0027] The validation set in the training data is input into the network architecture to calculate a validation error, until the validation error does not decrease in consecutive multiple training periods, to obtain an initial denoising model;
[0028] predicting a test set in the training data based on the initial denoising model, calculating an evaluation index;
[0029] if the evaluation index meets a preset condition, outputting the deep denoising self-encoder.
[0030] Optionally, the model parameters of the deep denoising self-encoder are optimized by using the sparrow search algorithm, including:
[0031] the model parameters of the deep denoising self-encoder are taken as individuals in the sparrow population, and the sparrow population is initialized by using a Logistic chaotic mapping;
[0032] an initial fitness value of each individual in the sparrow population is calculated based on a fitness function, and a neighborhood position range is determined, wherein the fitness function is a fault early warning accuracy of the deep denoising self-encoder;
[0033] positions of discoverers and followers in the sparrow population are updated based on an inertia weight, wherein the inertia weight is determined based on an iteration number;
[0034] candidate model parameters are solved based on the position of the follower, and the candidate model parameters are evaluated by using the fitness function until a target model parameter is output after an iteration condition is met.
[0035] Optionally, an inertia weight calculation formula is represented as:
[0036]
[0037] In the formula, ω max and ω min are a preset maximum value and a preset minimum value of the inertia weight respectively, t is a current iteration number, and T max is a maximum iteration number;
[0038] A Logistic chaotic mapping formula is represented as:
[0039] x n+1 = μ × x n × (1-x n );
[0040] In the formula, μ is a chaotic variable, x is an individual in the sparrow population, and n is the number of individuals;
[0041] A discoverer position update formula is represented as:
[0042]
[0043] In the formula, i is the individual number of the sparrow, t is the current iteration number, a is a constant, R2 is a random number uniformly distributed in the interval [0, 1], ST is a warning value, Q is a random number subject to a normal distribution, and L is a search direction.
[0044] The position updating formula of the follower is:
[0045]
[0046] The elements in A are generated by the following formula:
[0047]
[0048] In the formula, X worst,t is the worst individual position in the current iteration, X p,t+1 is the optimal individual position in the discoverer, and R3 is a random number uniformly distributed in the interval [0, 1].
[0049] Optionally, the warning result includes a fault type, a fault occurrence probability, and a fault position, where the fault type is a fault type whose fault warning accuracy is greater than a preset accuracy, the fault occurrence probability is a probability of occurrence of the fault type, and the fault position is a position of the fault type.
[0050] The power grid fault feature is input into a classifier, and a decision function is solved by the classifier to obtain a decision value;
[0051] The fault type is obtained based on matching of the decision value;
[0052] The decision value is brought into a logistic regression function to determine the fault occurrence probability;
[0053] The confidence degree of the fault type is calculated based on the decision value;
[0054] A positioning strategy associated with the fault type and the confidence degree is determined;
[0055] Positioning data is obtained based on the positioning strategy, and a fault distance is calculated based on the positioning data;
[0056] The logistic regression function is represented as:
[0057]
[0058] In the formula, P is the occurrence probability, d is the decision value, and β is an adjustment parameter.
[0059] According to another aspect of the present application, a power grid fault warning device is provided, which includes:
[0060] The acquisition module is configured to acquire power grid operation information, environment information, and an accuracy label of a historical fault early warning event output by a fault early warning model as training data, wherein the power grid operation information includes electrical parameters and device operation and maintenance parameters.
[0061] The training module is configured to train a deep denoising autoencoder based on the training data, and optimize model parameters of the deep denoising autoencoder by using a sparrow search algorithm to obtain an optimized early warning model, wherein a sparrow population of the sparrow search algorithm is initialized by using a Logistic chaotic mapping, and individual positions are updated based on an inertia weight.
[0062] The early warning module is configured to input target power grid operation information and corresponding target environment information into the optimized early warning model to obtain power grid fault features, and determine an early warning result of a power grid fault based on the power grid fault features.
[0063] Optionally, the power grid fault early warning device further includes:
[0064] The data processing module is configured to pre-process the training data, divide the pre-processed training data into a training set, a validation set, and a test set based on a preset ratio, generate a mask matrix with the same dimension as the training set, wherein each element m of the mask matrix is 0 and 1-m is 1, and perform element multiplication processing on the mask matrix and the training set.
[0065] Optionally, the data processing module is specifically configured to compare the training data with a preset abnormal range, and delete the training data that exceeds the preset abnormal range, wherein the preset abnormal range is determined based on a mean value and a standard deviation of the training data.
[0066] Optionally, the data processing module is specifically configured to perform denoising processing on the training data by using a wavelet transform algorithm.
[0067] Optionally, the data processing module is specifically configured to perform normalization processing on the training data.
[0068] Optionally, the training module includes:
[0069] The architecture establishing module is configured to set the number of feature dimensions of the training data as the number of input layer nodes, configure the number of hidden layer nodes in a decreasing relationship based on a preset number of hidden layers and the number of input layer nodes, and establish a network architecture of the deep denoising autoencoder based on the number of input layer nodes and the number of hidden layer nodes, wherein the model architecture is composed of an input layer, a plurality of hidden layers, and an output layer.
[0070] a learning module, configured to input a training set in the training data into an input layer and sequentially train through multiple hidden layers to obtain reconstruction data, and calculate a mean square error of the reconstruction data;
[0071] a first optimization module, configured to adjust model parameters of the network architecture based on gradient information of the mean square error by using a back propagation algorithm;
[0072] a verification module, configured to input a verification set in the training data into the network architecture to calculate a verification error, until the verification error does not decrease in continuous multiple training periods, to obtain an initial denoising model, and based on the initial denoising model, to predict a test set in the training data and calculate an evaluation index, and if the evaluation index meets a preset condition, to output the deep denoising autoencoder.
[0073] Optionally, the training module comprises:
[0074] a second optimization module, configured to take the model parameters of the deep denoising autoencoder as individuals in the sparrow population, and initialize the sparrow population by using a Logistic chaotic mapping;
[0075] calculate an initial fitness value of each individual in the sparrow population based on a fitness function, and determine a neighborhood position range, wherein the fitness function is a fault early warning accuracy of the deep denoising autoencoder;
[0076] update positions of discoverers and followers in the sparrow population based on an inertia weight, wherein the inertia weight is determined based on an iteration number;
[0077] solve candidate model parameters based on the position of the follower, and evaluate the candidate model parameters by using the fitness function, until a target model parameter is output after meeting an iteration condition.
[0078] Optionally, the early warning result comprises a fault type, a fault occurrence probability and a fault position, wherein the fault type is obtained by matching a decision value obtained by solving a decision function through a classifier, the fault occurrence probability is determined by inputting the decision value into a logistic regression function, and the fault position is determined by calculating a fault distance based on positioning data obtained based on a positioning strategy associated with the fault type and a confidence degree of the fault type.
[0079] wherein the logistic regression function is represented as:
[0080]
[0081] In the formula, P is a probability of occurrence, d is a decision value, and β is an adjustment parameter.
[0082] According to another aspect of the present application, a readable storage medium is provided, which stores a program or instructions, and the program or instructions are executed by a processor to implement the steps of the power grid fault early warning method.
[0083] According to another aspect of the present application, a computer device is provided, which includes a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, and the processor implements the steps of the power grid fault early warning method when executing the program.
[0084] By the above technical solution, the powerful feature extraction and denoising ability of the deep denoising autoencoder and the parameter optimization ability of the sparrow search algorithm based on the improved Logistic mapping and adaptive inertia weight are combined, the key influence of the power grid system on the power grid operation state under different environmental conditions is fully considered, and the exploration ability and convergence speed of the algorithm are improved, the model parameters are efficiently optimized in the complex search space, and the optimized early warning model is constructed. The optimized early warning model can accurately identify potential faults or abnormal states in advance, which helps to take targeted preventive measures in time, improves the anti-risk ability of the power grid under complex environments, and the model can adapt to different operating environments, thereby enhancing the robustness, and further providing solid technical support and guarantee for efficient and reliable operation of the smart grid.
[0085] The above description is only a summary of the technical solutions of the present application, in order to more clearly understand the technical means of the present application, the specific embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0086] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0087] Figure 1 A flowchart of a power grid fault early warning method provided by an embodiment of the present application is shown;
[0088] Figure 2 A structural block diagram of a power grid fault early warning device provided by an embodiment of the present application is shown;
[0089] Figure 3 An electronic structural schematic diagram of a computer device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0090] Hereinafter, the application will be described in detail with reference to the drawings and examples. It should be noted that the examples in the application and the features in the examples can be combined with each other without conflict.
[0091] The embodiments of the application are described in detail below, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary only, and are used only for explanation of the application, and cannot be interpreted as a limitation of the application.
[0092] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the use of the phrase "comprise" in the specification of the application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we say that an element is "connected" or "joined" to another element, it can be directly connected or joined to the other element, or there can be intermediate elements. In addition, "connected" or "joined" used herein can include wireless connection or wireless connection. The phrase "and / or" used herein includes all or any single unit and all combinations of the associated listed items.
[0093] Now, exemplary embodiments according to the application will be described in more detail with reference to the drawings. However, these exemplary embodiments can be implemented in various different forms, and should not be interpreted as being limited only to the embodiments set forth herein. It should be understood that these embodiments are provided in order to make the disclosure of the application complete and complete, and to adequately convey the ideas of these exemplary embodiments to those skilled in the art.
[0094] In the present embodiment, a power grid fault early warning method is provided, which can be applied to a terminal, can be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server can be configured as a stand-alone physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; the software can be an application that implements the power grid fault early warning method, but is not limited to the above forms.
[0095] As shown in Figure 1 The power grid fault early warning method comprises:
[0096] Step 110: Obtain the power grid operation information, environmental information, and accuracy labels of historical fault warning events output by the fault warning model as training data.
[0097] Among them, the fault early warning model is a traditional deep neural network model constructed using a fault early warning dataset of power distribution systems under meteorological disasters.
[0098] Specifically, power grid operation information includes electrical parameters and equipment maintenance parameters. Electrical parameters reflect the power grid's operating status and load level, and include parameters such as voltage, current, active power, reactive power, and power factor. Equipment maintenance parameters assess the health status of power grid equipment, including line temperature, equipment vibration, and insulator leakage current. Environmental information includes meteorological information, topographic information, and seasonal information that may affect power grid safety. Meteorological information can be obtained by sending data requests to meteorological monitoring agencies through the system; meteorological information includes meteorological elements such as temperature, relative humidity, wind speed, wind direction, precipitation, lightning activity intensity, and lightning frequency. Topographic information includes terrain type (such as mountains, rivers, and hills), soil type, and vegetation cover.
[0099] In one embodiment, after step 110, the power grid fault early warning method further includes: preprocessing the training data; dividing the preprocessed training data into a training set, a validation set, and a test set based on a preset ratio; generating a mask matrix with the same dimension as the training set; and performing element-wise multiplication of the mask matrix with the training set.
[0100] The preset ratios can be set reasonably according to the model training requirements. For example, the training set, validation set, and test set can be divided into three groups at a ratio of 70%, 15%, and 15%, respectively. In the mask matrix, each element m% is 0 and 1-m% is 1. m is a natural number less than 100 and can be set reasonably according to the model accuracy requirements. For example, m is set to 30, meaning that each input data point has a 30% probability of being randomly set to 0.
[0101] In this embodiment, cleaning, denoising, normalizing, or standardizing the training data can improve its quality, ensure all training data are on the same scale, enhance its usability and stability, reduce unnecessary noise interference to the model, and improve the model's training performance while accelerating its convergence speed. Furthermore, a random deactivation mechanism is introduced with a certain probability m, so that each training data point has a certain probability of being randomly set to zero. This allows for the random retention or discarding of certain features, forcing the model to learn robust features of the data. This enables the model to adapt to different data distributions or feature sets, thereby improving the model's adaptability and generalization ability to noise interference.
[0102] In actual application scenarios, the pre-processing of the training data can be realized in the following manner:
[0103] Manner one, compare the training data with the preset abnormal range, and delete the training data exceeding the preset abnormal range.
[0104] The preset abnormal range is determined based on the mean and the standard deviation of the training data, for example, the mean ± the standard deviation, the mean ± 2 times the standard deviation, or the mean ± 3 times the standard deviation.
[0105] In this embodiment, the abnormal data that does not conform to the normal distribution rule is detected and removed based on the mean and the standard deviation, so as to reduce the noise in the data and improve the accuracy of subsequent analysis and modeling.
[0106] For example, for each voltage data sequence {U i}, the mean and the standard deviation σ U are calculated first, and if a data point U j satisfies: the data point is determined as abnormal data and is deleted.
[0107] Manner two, the wavelet transform algorithm is used to perform noise reduction processing on the training data.
[0108] In this embodiment, the time and frequency information is captured through wavelet transform, which can well maintain the main features of the signal, avoid signal distortion caused by noise removal, and thus achieve the purpose of effectively identifying and suppressing noise, especially when the noise and the signal have different frequency characteristics, the denoising effect is more obvious.
[0109] For example, taking the Daubechies wavelet basis function as an example, the appropriate decomposition layer is selected according to the frequency characteristics of the data, for example, for current data containing high-frequency noise, 5 layers of decomposition can be selected. The original data is decomposed at multiple scales to obtain sub-band signals of different frequencies, and the high-frequency sub-band signals are processed by using a soft threshold or a hard threshold to remove noise, and finally the denoised signal is obtained through reconstruction.
[0110] Manner three, the training data is normalized.
[0111] In this embodiment, the training data of different dimensions and different ranges is mapped to the interval [0, 1] through normalization, which reduces the bias of the model to a specific feature scale and speeds up the convergence process.
[0112] Step 120, training the deep denoising autoencoder based on the training data, and optimizing the model parameters of the deep denoising autoencoder by using the sparrow search algorithm to obtain an optimized early warning model.
[0113] The sparrow population of the sparrow search algorithm (SSA) is initialized by using a Logistic chaotic mapping. The deep denoising autoencoder (DAE) is an unsupervised learning model.
[0114] Specifically, the model parameters include weight and bias parameters of the model, etc.
[0115] In this embodiment, the deep denoising autoencoder is used as the model basic framework, which can enable the optimization early warning model to automatically learn and extract representative feature information from complex training data sets, effectively filter noise interference in the data, improve data feature extraction and noise suppression effect, and significantly improve the quality and usability of the data. Moreover, the Logistic chaotic mapping enhances the diversity of the sparrow algorithm population, expands the search range of the model parameters, and enhances the global search ability of the sparrow algorithm. Thus, when dealing with complex high-dimensional and nonlinear optimization problems such as power grid fault early warning, the global optimal solution of the model parameters can be quickly found, meeting the stringent requirements of modern power systems for high precision and high reliability of fault early warning.
[0116] In an embodiment, the deep denoising autoencoder is trained based on the training data in step 120, specifically including:
[0117] Step 121-1: The number of feature dimensions of the training data is used as the number of input layer nodes.
[0118] Step 121-2: Based on the preset number of hidden layers and the number of input layer nodes, the number of hidden layer nodes is configured in a decreasing relationship.
[0119] For example, the power grid operation data packet has 8 electrical quantity parameters and 6 device operation and maintenance parameters, and the meteorological information contains 7 characteristics, so the number of input layer nodes is 21. If the number of hidden layers is set to 3, the number of hidden layer nodes can be set to 12, 8, and 4, respectively.
[0120] Step 121-3: Based on the number of input layer nodes and the number of hidden layer nodes, the network architecture of the deep denoising autoencoder is established.
[0121] The model architecture is composed of an input layer, multiple hidden layers, and an output layer.
[0122] In this embodiment, the number of input layer nodes is configured to be consistent with the feature dimension, so that the network input matches the actual features of the data, allowing the network to fully utilize the information contained in the training data. The number of hidden layer nodes is configured in a decreasing relationship based on the preset number of hidden layers and the number of input layer nodes, and the network architecture is reasonably configured based on the number of input layer nodes and the number of hidden layer nodes. In this way, as the number of hidden layer nodes decreases, the complexity of the model also gradually decreases, allowing the model network to automatically learn different levels of feature representation, gradually transitioning from specific power grid operation features and environmental features to more abstract and representative features, preventing the model from overfitting the training data and improving the feature extraction ability and generalization ability of the model.
[0123] Step 121-4, the training set in the training data is input from the input layer and trained through the multiple hidden layers in sequence to obtain reconstructed data.
[0124] It is worth mentioning that in the case of limited resources or data set data larger than a specified value, a small batch gradient descent algorithm can be used to input the training set, thereby introducing randomness, reducing memory usage, and helping to jump out of a local optimal solution. For example, a portion of samples are randomly selected from the training set for training calculation each time.
[0125] Step 121-5, the mean square error of the reconstructed data is calculated.
[0126] Step 121-6, the model parameters of the network architecture are adjusted based on the gradient information of the mean square error using the back propagation algorithm.
[0127] Step 121-7, the validation set in the training data is input into the network architecture to calculate the validation error until the validation error does not decrease in consecutive multiple training periods, obtaining an initial denoising model.
[0128] In this embodiment, by calculating the mean square error of the reconstructed data, the reconstruction effect of the input data by the deep denoising autoencoder can be quantitatively evaluated. The model parameters of the network architecture are preliminarily adjusted using the gradient information of the mean square error, so that the mean square error of the model gradually decreases, thereby allowing the model to be optimized in the direction of better reconstructing the data. The validation error is calculated using the validation set, and when the validation error no longer decreases in consecutive multiple training periods, it indicates that the model has reached an optimal state to a certain extent, and further training may cause the model to overfit the training data, resulting in poor performance on new unseen data. At this time, the training is stopped, and an initial denoising model with a good balance between accuracy and generalization ability on the validation set can be obtained, improving the generalization ability of the model.
[0129] For example, the input data is x, and the hidden layer representation is obtained after encoding:
[0130] h = f θ(x);
[0131] where θ is the encoding parameter, f θ is the encoding function, which is defined as:
[0132] h = σ(W1x + b1) ;
[0133] where W1 is the weight matrix from the input layer to the first hidden layer, with dimension 12 x 21 (corresponding to 12 nodes in the first hidden layer and 21 nodes in the input layer), b1 is the bias vector of the first hidden layer, with dimension 12, and σ is the activation function, which can be the ReLU function, i.e., σ(z) = max(0, z).
[0134] After decoding, the reconstructed data is obtained
[0135]
[0136] where θ' is the decoding parameter, g θ ' is the decoding function, which is defined as:
[0137]
[0138] where W2 is the weight matrix from the last hidden layer to the output layer, with dimension 21 x 4 (corresponding to 21 nodes in the output layer and 4 nodes in the last hidden layer), b2 is the bias vector of the output layer, with dimension 21, and σ' is the activation function, which can be the Sigmoid function, i.e., to ensure that the output value is in the interval [0, 1] and matches the range of the normalized data. The reconstruction error function uses the mean square error formula:
[0139]
[0140] where N is the number of samples.
[0141] The update formulas for the weights W1 and W2 are as follows:
[0142]
[0143] where η is the learning rate, which can be in the range of 0.001-0.1. b1 and b2 are the bias vectors.
[0144] When the validation set loss value does not decrease for 10 consecutive training periods, it is determined that the model training converges, the training is stopped, and the trained initial denoising model is properly saved.
[0145] Step 121-8, based on the initial denoising model, the test set in the training data is predicted, and the evaluation index is calculated.
[0146] Step 121-9, if the evaluation index meets the preset condition, output the deep denoising autoencoder.
[0147] The preset condition can be that the model prediction accuracy is greater than a specified value or the number of iterations reaches a specified number, and the embodiments of the present application are not limited.
[0148] In this embodiment, the test set in the training data is used for prediction and the evaluation index is calculated, which can objectively evaluate the performance of the initial denoising model on unseen data. Through specific evaluation indexes such as accuracy, recall rate, F1 value, root mean square error, etc., the prediction accuracy of the model on the test data, the recognition ability of different categories and the overall performance can be comprehensively understood. When the evaluation index meets the preset condition, the deep denoising autoencoder is output, which ensures that the output deep denoising autoencoder reaches a certain level in performance and is more likely to produce accurate and reliable results.
[0149] In an embodiment, in step 120, the sparrow search algorithm is used to optimize the model parameters of the deep denoising autoencoder, which specifically includes the following steps:
[0150] Step 122-1, the model parameters of the deep denoising autoencoder are taken as individuals in the sparrow population, and the sparrow population is initialized by using Logistic chaotic mapping.
[0151] The Logistic chaotic mapping formula is represented as:
[0152] x n+1 =μ×x n ×(1-x n );
[0153] In the formula, μ is a chaotic variable, x is an individual in the sparrow population, and n is the number of individuals.
[0154] The set of deep denoising autoencoder model parameters is θ={θ1, θ2, …, θ M}. Wherein M is the total number of parameters, which is coded as an individual in the improved sparrow search algorithm. Each individual represents a specific combination of model parameters, and the dimension of the individual is exactly matched with the total number of model parameters.
[0155] In this embodiment, the population is initialized by Logistic chaotic mapping, which can make the initial population uniformly distributed in the solution space, improve the initial search efficiency and population diversity of the algorithm, make the sparrow search algorithm closer to the area where the optimal solution is located in the early search, avoid the algorithm falling into local optimal solution too early, and thus reduce the convergence time of the algorithm and improve the search efficiency.
[0156] Initializing the sparrow population specifically generates an initial individual X0=(x01 x 02 , ..., x 0D ), where D is the individual dimension, i.e., the total number of model parameters. When the model parameters of the deep denoising autoencoder are considered as individuals in a sparrow population, then D = M. Then, according to the Logistic mapping formula, the i-th chaotic variable is c. i Mapping to the search space yields individual X i =(x i1 x i2 , ..., x iD If x ij =lb j +c i ×(ub j -lb j In the formula, lb j and ub j These are the lower and upper bounds of the j-th dimension variable, respectively, thus constructing the other individuals in the initial population.
[0157] Step 122-2: Calculate the initial fitness value of each individual in the sparrow population based on the fitness function, and determine the neighborhood location range.
[0158] The fitness function represents the fault prediction accuracy of the deep denoising autoencoder. Fault prediction accuracy is the ratio of the number of historical fault prediction events with accuracy labels across all training data to the total amount of test data. That is, the number of accurately predicted samples N. c With the total number of samples N t The business.
[0159] In this embodiment, a suitable fitness function is constructed, and the initial fitness function value of each individual in the sparrow population is calculated accordingly. The individual with the highest fitness value is then selected as the optimal individual, and its location information is obtained. Based on this location information, combined with the search progress and the current solution, the neighborhood size is adaptively adjusted. When the algorithm gets stuck in a local optimum, by adaptively expanding the neighborhood, the algorithm can explore a wider area, thus having the opportunity to escape the current local optimum and continue searching for a better solution. Alternatively, when approaching the optimal solution, shrinking the neighborhood allows the algorithm to perform a more detailed search of the current local area, helping to discover better solutions within that local area. This enables more targeted exploration of areas where better solutions may exist, reducing the number of invalid searches and saving computation time and resources.
[0160] Specifically, the neighborhood range adjustment formula is expressed as:
[0161]
[0162] Where r0 is the initial neighborhood range, f is the fitness value of the individual, and f maxThe maximum fitness value in the current population.
[0163] For example, for the elite individuals with fitness values in the top 30%, a smaller neighborhood range, such as r = 0.2r0, is used for fine search to deeply mine the vicinity of the elite solutions; for the poor individuals with fitness values in the last 30%, a larger neighborhood range, such as r = 1.5r0, is used for extensive search to help them quickly jump out of the local optimum trap.
[0164] Step 122-3, based on the inertia weight, the positions of the sparrow discoverer and the sparrow follower in the sparrow population are updated.
[0165] wherein the inertia weight is determined based on the iteration number. The inertia weight calculation formula is represented as:
[0166]
[0167] In the formula, ω max and ω min are respectively a preset maximum value and a minimum value of the inertia weight, t is the current iteration number, and T max is the maximum iteration number.
[0168] For example, ω max = 0.9, ω min = 0.4, t is the current iteration number, and T max is the maximum iteration number. In the initial stage of the algorithm (the first 20% of the iteration number), a larger inertia weight, such as ω = 0.8, is given to the individual to have a strong global search ability and to be able to quickly explore the potential elite solution area in a wide solution space; with the progress of the iteration process, in the middle stage of the algorithm (the middle 60% of the iteration number), the inertia weight gradually decreases, such as linearly to 0.6, so that the individual gradually strengthens the local search ability while maintaining a certain global search ability; in the later stage of the algorithm (the last 20% of the iteration number), the inertia weight is further reduced to close to ω min , such as 0.45, so that the individual focuses on local fine search and improves the convergence accuracy.
[0169] The position update formula of the discoverer is represented as:
[0170]
[0171] In the formula, a is a constant, the value range can be between 0.1 and 1, for example, 0.3, 0.5, R2 is a random number uniformly distributed in the interval [0, 1], ST is a warning value, the value range is between 0.5 and 1, for example 0.4, 0.6, Q is a random number subject to normal distribution, L is a 1-dimensional vector of all 1s, indicating the search direction. When R2≥ST, it means that the chirp value of the sparrow individual encountering danger exceeds the safety warning value, at this time the finder needs to guide the follower to transfer the position and find another safe place to search for food; when R2<ST, it means that the chirp value of the sparrow individual encountering danger is less than the safety warning value, at this time the sparrow group searches the environment around the sparrow group, and the finder can continue to expand the search range and search for food outward.
[0172] The position update formula of the follower is:
[0173]
[0174] A + =A T (AA T ) 1 ;
[0175] A is an n x D matrix whose elements are all 1 or 1, and the elements in A are generated by the following formula:
[0176]
[0177] In the formula, X worst,t is the worst individual position in the current iteration, X p,t+1 is the optimal individual position in the finder, and R3 is a random number uniformly distributed in the interval [0, 1].
[0178] In the improved sparrow search algorithm, the update formula of the kth-dimensional parameter at the t+1th iteration is:
[0179] x i,k,t+1 =ωx i,k,t +c1r1(pbest i,k -x i,k,t )+c2r2(gbest k -x i,k,t );
[0180] In the formula, k represents the parameter dimension, c1 and c2 are learning factors, the value range is between 1.5 and 2.5, r1 and r2 are random numbers uniformly distributed in the interval [0, 1], pbest i,k is the historical optimal position of individual i in the kth dimension, and gbest k is the global optimal position in the kth dimension.
[0181] In this embodiment, the "discoverer-follower" optimization process is guided by dynamic inertia weight, which enables the discoverer to explore the solution space more extensively in the early stage of the search, enhances global exploration, avoids falling into local optimum, and prevents invalid random search of a large number of individuals with chaotic initialization in the later stage, so as to gradually focus on the potential optimal area and achieve fine local development, thereby improving the convergence accuracy. The same applies to the follower. Thus, the global exploration and local development capabilities of the algorithm are significantly improved, premature convergence is avoided, and the convergence speed is accelerated.
[0182] Step 122-4, based on the position of the follower, the candidate model parameters are solved and evaluated by the fitness function, and the target model parameters are output after meeting the iteration condition.
[0183] In this embodiment, through the iterative evolution process of the algorithm, the dynamic adjustment mechanism of the discoverer and the follower position and the fitness value unchanged update, the individual that makes the fitness function value reach the maximum is finally accurately locked, so that the algorithm can balance global search and local search in different search stages, significantly improve search efficiency and convergence accuracy, and ensure that the algorithm can efficiently and accurately approach the global optimal target model parameters, thereby enabling the model to exhibit excellent performance in power grid fault warning tasks.
[0184] It can be understood that after the target model parameters are determined by the sparrow search algorithm, the initial denoising model can be directly optimized and evaluated by the target model parameters and the data in the test set to output the final optimized warning model. Alternatively, the already trained deep denoising autoencoder is constantly updated by the target model parameters, and the final optimized warning model is output.
[0185] Step 130, input the target power grid operation information and its corresponding target environment information into the optimized warning model to obtain the power grid fault feature.
[0186] Among them, the power grid fault feature is a highly abstract feature representation of the warning result.
[0187] Step 140, determine the warning result of the power grid fault based on the power grid fault feature.
[0188] Among them, the warning result includes the fault type, fault occurrence probability and fault location whose fault warning accuracy is greater than the preset accuracy.
[0189] The power grid fault early warning method provided by the embodiment of the application combines the powerful feature extraction and noise reduction capability of the deep denoising autoencoder with the parameter optimization capability of the sparrow search algorithm improved based on the Logistic mapping and adaptive inertia weight, fully considers the key influence of the power grid system in different environmental conditions on the power grid operation state, and improves the exploration capability and convergence speed of the algorithm, efficiently optimizes the model parameters in a complex search space, and constructs an optimized early warning model. The optimized early warning model can identify potential faults or abnormal states in advance and accurately, helps to take targeted preventive measures in time, improves the anti-risk capability of the power grid in a complex environment, and the model can adapt to different operating environments, thereby enhancing the robustness thereof, and providing solid technical support and guarantee for efficient and reliable operation of the smart grid.
[0190] In an embodiment, for the fault type, step 140 specifically comprises: inputting the power grid fault feature into a classifier, obtaining a decision value by solving a decision function of the classifier, and obtaining the fault type based on matching of the decision value.
[0191] The decision function of the classifier is expressed as:
[0192]
[0193] In the formula, N s is the number of support vectors, α i is the Lagrange multiplier, y i is a sample class label, and K(x i , x) is a kernel function. The kernel function can be a radial basis kernel function, a Laplace kernel function, a polynomial kernel function, a Sigmoid kernel function, etc., which is not specifically limited in the embodiment of the application.
[0194] In this embodiment, the abstract power grid fault feature is quantified by using the classifier, the automatic matching of the fault type is realized, the fault type early warning is determined, the subjectivity of manual threshold setting is avoided, and the fault recognition difficulty is reduced.
[0195] It can be understood that multi-classification is supported by the combination logic (such as “one-to-many” or “one-to-one”) of the decision value. For example, a binary classifier is trained for each fault type, and the target class is regarded as a positive class (+1) and the rest are negative classes (-1). For example, decision value > 0 → short circuit (positive class); decision value ≤ 0 → normal (negative class).
[0196] In an embodiment, for the fault occurrence probability, step 140 specifically comprises: inputting the power grid fault feature into a classifier, obtaining a decision value by solving a decision function of the classifier, and determining the fault occurrence probability by inputting the decision value into a logistic regression function.
[0197] For example, the decision value obtained after support vector machine classification is d = f(x), and the probability P of fault occurrence can be calculated by a logic function:
[0198]
[0199] In the formula, P is the probability of occurrence, d is the decision value, and β is an adjustment parameter, which is in the range of 0.5-5, for example, 1, 2, 3.5.
[0200] In an embodiment, for fault location, the distance between the fault occurrence point and the target point can be used to represent, and step 140 specifically comprises: inputting the power grid fault feature into a classifier, obtaining a decision value by the classifier, calculating the confidence of the fault type based on the decision value, determining a positioning strategy associated with the fault type and the confidence, obtaining positioning data based on the positioning strategy, and calculating the fault distance based on the positioning data.
[0201] In this embodiment, the decision value of the quantized power grid fault feature is used to calculate the confidence of the fault type, and the positioning strategy (such as impedance method / traveling wave method / machine learning positioning model) dynamically adapted to the fault type and the confidence is used. The fault point position is located by using the appropriate positioning strategy. Thus, the positioning efficiency is optimized by adapting to different fault features. Thus, the possible fault location is accurately inferred in combination with the fault type information, and the probability information of fault occurrence is accurately obtained according to the confidence or probability estimation value output by the classifier, so as to provide comprehensive, accurate and valuable decision basis for relevant personnel, so that they can take corresponding prevention and treatment measures in time and effectively, and ensure the safe and stable operation of the power grid.
[0202] For example, an optimized and improved algorithm based on the impedance method. Let the line impedance be Z = R + jX; R is the resistance, and X is the reactance.
[0203] According to the measured voltage U f and current I f at the time of fault, the distance L from the fault point to the measurement end is calculated as: Z line is the unit length impedance of the line, and L total is the total length of the line.
[0204] It should be noted that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0205] Further, as Figure 2As shown, as a specific implementation of the power grid fault early warning method, the embodiment of the application provides a power grid fault early warning device 200, which comprises an acquisition module 201, a training module 202 and an early warning module 203.
[0206] The acquisition module 201 is configured to acquire power grid operation information, environmental information and accuracy labels of historical fault early warning events output by the fault early warning model as training data, wherein the power grid operation information comprises electrical parameters and equipment operation and maintenance parameters.
[0207] The training module 202 is configured to train the deep denoising autoencoder based on the training data, and optimize the model parameters of the deep denoising autoencoder by using the sparrow search algorithm to obtain an optimized early warning model, wherein the sparrow population of the sparrow search algorithm is initialized by using Logistic chaotic mapping, and the individual position is updated based on an inertia weight.
[0208] The early warning module 203 is configured to input target power grid operation information and corresponding target environmental information into the optimized early warning model to obtain power grid fault features, and determine an early warning result of the power grid fault based on the power grid fault features.
[0209] Further, the power grid fault early warning device 200 further comprises:
[0210] A data processing module (not shown in the figure) is configured to pre-process the training data, divide the pre-processed training data into a training set, a validation set and a test set based on a preset proportion, generate a mask matrix with the same dimension as the training set, wherein each element m% in the mask matrix is 0 and 1-m% is 1, and perform element multiplication processing on the mask matrix and the training set.
[0211] Further, the data processing module is specifically configured to compare the training data with a preset abnormal range, and delete the training data that exceeds the preset abnormal range, wherein the preset abnormal range is determined based on the mean and standard deviation of the training data.
[0212] Further, the data processing module is specifically configured to perform denoising processing on the training data by using a wavelet transform algorithm.
[0213] Further, the data processing module is specifically configured to perform normalization processing on the training data.
[0214] Further, the training module 202 comprises:
[0215] An architecture establishing module (not shown in the figure) is configured to take the number of feature dimensions of the training data as the number of input layer nodes, and configure the number of hidden layer nodes in a decreasing relationship based on a preset number of hidden layers and the number of input layer nodes, and establish the network architecture of the deep denoising autoencoder based on the number of input layer nodes and the number of hidden layer nodes, wherein the model architecture is composed of an input layer, a plurality of hidden layers and an output layer;
[0216] A learning module (not shown in the figure) is configured to input a training set in the training data into the input layer and sequentially train through the plurality of hidden layers to obtain reconstructed data, and calculate the mean square error of the reconstructed data.
[0217] A first optimization module (not shown in the figure) is configured to adjust the model parameters of the network architecture based on the gradient information of the mean square error by using a back propagation algorithm.
[0218] A verification module (not shown in the figure) is configured to input a validation set in the training data into the network architecture to calculate a validation error, until the validation error does not decrease in a plurality of consecutive training cycles, to obtain an initial denoising model, and predict a test set in the training data based on the initial denoising model to calculate an evaluation index, and if the evaluation index meets a preset condition, output the deep denoising autoencoder.
[0219] Further, the training module 202 comprises:
[0220] A second optimization module (not shown in the figure) is configured to take the model parameters of the deep denoising autoencoder as individuals in a sparrow population, and initialize the sparrow population by using a Logistic chaotic mapping, calculate an initial fitness value of each individual in the sparrow population based on a fitness function, and determine a neighborhood position range, wherein the fitness function is the fault early warning accuracy of the deep denoising autoencoder, update the positions of the discoverers and followers in the sparrow population based on an inertia weight, wherein the inertia weight is determined based on the number of iterations, solve candidate model parameters based on the positions of the followers, and evaluate the candidate model parameters by using the fitness function until the target model parameters are output after meeting an iteration condition.
[0221] Further, the early warning result comprises a fault type, a fault occurrence probability and a fault position with the fault early warning accuracy being greater than a preset accuracy, and the early warning module 203 is specifically configured to input the power grid fault features into a classifier, solve a decision function by using the classifier to obtain a decision value, obtain the fault type based on the matching of the decision value, determine the fault occurrence probability by using the decision value into a logistic regression function, calculate the confidence of the fault type based on the decision value, determine a positioning strategy associated with the fault type and the confidence, obtain positioning data based on the positioning strategy, and calculate the fault distance based on the positioning data.
[0222] The logistic regression function is represented as:
[0223]
[0224] wherein P is a probability of occurrence, d is a decision value, and β is an adjustment parameter.
[0225] The specific limitations of the power grid fault early warning device can refer to the limitations of the power grid fault early warning method in the above, and will not be repeated here. Each module in the above power grid fault early warning device can be realized by software, hardware and a combination thereof in whole or in part. The above each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operation corresponding to each module by the processor.
[0226] Based on the above method as shown in Figure 1 , accordingly, the embodiment of the present application also provides a readable storage medium, which stores a computer program, and the program is executed by a processor to realize the power grid fault early warning method as shown in Figure 1 .
[0227] Based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the power grid fault early warning method described in each implementation scenario of the present application.
[0228] Based on the above method as shown in Figure 1 , and Figure 2 the virtual device embodiment, in order to achieve the above purpose, as shown in Figure 3 , the embodiment of the present application also provides a computer device, which comprises a processor 301 and a memory 302, and the memory 302 stores a program or instruction which can be run on the processor 301, and the program or instruction is executed by the processor 301 to realize the power grid fault early warning method as shown in Figure 1 .
[0229] The memory 302 can be used to store software programs and various data. The memory 302 can mainly include a first storage area storing programs or instructions, and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 302 can include a volatile memory or a non-volatile memory, or the memory 302 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 302 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0230] The processor 301 can include one or more processing units; optionally, the processor 301 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 301.
[0231] The computer device can specifically be a personal computer, a server, a network device, and the like.
[0232] Optionally, the computer device can further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface can include a display screen, an input unit such as a keyboard, and the like. Optionally, the user interface can further include a USB interface, a card reader interface, and the like. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), and the like.
[0233] Those skilled in the art can understand that the computer device structure provided by the embodiment does not constitute a limitation on the computer device, and can include more or fewer components, or combine certain components, or different component arrangements.
[0234] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware platforms, or can be realized by hardware to obtain the historical fault early warning events of the power grid operation information, the environmental information and the accuracy label of the fault early warning model output as training data, wherein the power grid operation information includes electrical parameters and device operation and maintenance parameters; training the deep denoising autoencoder based on the training data, and optimizing the model parameters of the deep denoising autoencoder by using the sparrow search algorithm to obtain an optimized early warning model, wherein the sparrow population of the sparrow search algorithm is initialized by using Logistic chaotic mapping, and the individual position is updated based on the inertia weight; inputting the target power grid operation information and the corresponding target environmental information into the optimized early warning model to obtain power grid fault features; and determining the early warning result of the power grid fault based on the power grid fault features. In the present application, the powerful feature extraction and denoising capability of the deep denoising autoencoder and the parameter optimization capability of the sparrow search algorithm based on the Logistic mapping and the adaptive inertia weight are combined, the key influence of the power grid system on the power grid operation state under different environmental conditions is fully considered, and the exploration capability and convergence speed of the algorithm are improved, so as to efficiently optimize the model parameters in a complex search space, so as to construct an optimized early warning model. The optimized early warning model can identify potential faults or abnormal states in advance and accurately, which helps to take targeted preventive measures in time, improves the anti-risk capability of the power grid under complex environment, and the model can adapt to different operating environments, thereby enhancing its robustness, and further providing solid technical support and guarantee for efficient and reliable operation of the smart grid.
[0235] Those skilled in the art can understand that the modules or flows in the drawings are not necessarily required for implementing the present application. Those skilled in the art can understand that the modules in the devices in the implementation scenarios can be distributed in the devices in the implementation scenarios according to the description of the implementation scenarios, or can be changed to be located in one or more devices different from the implementation scenarios. The modules in the above implementation scenarios can be combined into one module, or can be further split into multiple sub-modules.
[0236] The above application numbers are only for description, and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only some specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be thought of by those skilled in the art should fall within the protection scope of the present application.
Claims
1. A method for early warning of power grid faults, characterized in that, include: The power grid operation information, environmental information, and accuracy labels of historical fault warning events output by the fault warning model are obtained as training data. The power grid operation information includes electrical parameters and equipment operation and maintenance parameters. A deep denoising autoencoder is trained based on the training data, and the model parameters of the deep denoising autoencoder are optimized using a sparrow search algorithm to obtain an optimized early warning model. The sparrow population of the sparrow search algorithm is initialized using a Logistic chaotic mapping and the individual positions are updated based on inertial weights. The target power grid operation information and its corresponding target environment information are input into the optimized early warning model to obtain power grid fault characteristics; The early warning result of the power grid fault is determined based on the characteristics of the power grid fault.
2. The power grid fault early warning method according to claim 1, characterized in that, The power grid fault early warning method also includes: The training data is preprocessed; The preprocessed training data is divided into a training set, a validation set, and a test set based on a preset ratio. Generate a mask matrix with the same dimensions as the training set, wherein each element m% is 0 and 1-m% is 1 in the mask matrix; The mask matrix is then element-wise multiplied with the training set.
3. The power grid fault early warning method according to claim 2, characterized in that, The preprocessing of the training data includes: Compare the training data with a preset anomaly range, and delete the training data that exceeds the preset anomaly range, wherein the preset anomaly range is determined based on the mean and standard deviation of the training data; and / or, The training data is denoised using a wavelet transform algorithm; and / or, The training data is then normalized.
4. The power grid fault early warning method according to claim 1, characterized in that, The training of the deep denoising autoencoder based on training data includes: The number of feature dimensions in the training data is used as the number of input layer nodes; The number of hidden layer nodes is configured in a decreasing relationship based on the preset number of hidden layers and the number of input layer nodes; The network architecture of the deep denoising autoencoder is established based on the number of input layer nodes and the number of hidden layer nodes, wherein the model architecture consists of an input layer, multiple hidden layers and an output layer; The training set in the training data is input into the input layer and trained sequentially through multiple hidden layers to obtain the reconstructed data; Calculate the mean square error of the reconstructed data; The backpropagation algorithm is used to adjust the model parameters of the network architecture based on the gradient information of the mean square error; The validation set from the training data is input into the network architecture to calculate the validation error until the validation error does not decrease in multiple consecutive training cycles, thus obtaining the initial noise reduction model. Based on the initial noise reduction model, the test set in the training data is predicted, and the evaluation index is calculated; If the evaluation index meets the preset conditions, the depth noise reduction autoencoder is output.
5. The power grid fault early warning method according to claim 1, characterized in that, The optimization of the model parameters of the deep denoising autoencoder using the sparrow search algorithm includes: The model parameters of the deep denoising autoencoder are used as individuals in the sparrow population, and the sparrow population is initialized using Logistic chaotic mapping. The initial fitness value of each individual in the sparrow population is calculated based on the fitness function, and the neighborhood location range is determined. The fitness function is the fault warning accuracy of the deep noise reduction autoencoder. The positions of the discoverers and followers in the sparrow population are updated based on inertia weights, wherein the inertia weights are determined based on the number of iterations. Candidate model parameters are solved based on the positions of the followers, and the candidate model parameters are evaluated using the fitness function until the iteration conditions are met, at which point the target model parameters are output.
6. The power grid fault early warning method according to claim 5, characterized in that, The formula for calculating inertia weight is as follows: In the formula, ω max and ω min These are the preset maximum and minimum inertia weights, respectively, where t is the current iteration number, and T is the maximum and minimum inertia weights. max This represents the maximum number of iterations. The Logistic chaotic mapping formula is expressed as: x n+1 =μ×x n ×(1-x n ); In the formula, μ is a chaotic variable, x is an individual in the sparrow population, and n is the number of individuals; The formula for updating the discoverer's location is expressed as: In the formula, i is the individual sparrow number, t is the current iteration number, α is a constant, R2 is a random number uniformly distributed in the interval [0,1], ST is the warning value, Q is a random number following a normal distribution, and L is the search direction; The formula for updating the position of followers is: The elements in A are generated by the following formula: In the formula, X worst,t X represents the position of the worst individual in the current iteration. p,t+1 R3 represents the optimal individual position among the discoverers, and R3 is a random number uniformly distributed in the interval [0,1].
7. The power grid fault early warning method according to any one of claims 1 to 6, characterized in that, The early warning results include fault types with a fault warning accuracy rate greater than a preset accuracy rate, fault occurrence probability, and fault location. The early warning results for determining power grid faults based on the power grid fault characteristics include: The power grid fault characteristics are input into a classifier, and the decision function is solved by the classifier to obtain the decision value; The fault type is obtained based on the matching of the decision values; The decision value is then substituted into a logistic regression function to determine the probability of the fault occurring. Calculate the confidence level of the fault type based on the decision value; Determine the localization strategy associated with the fault type and the confidence level; Location data is obtained based on the location strategy, and the fault distance is calculated based on the location data; The logistic regression function is expressed as: In the formula, P is the probability of occurrence, d is the decision value, and β is the adjustment parameter.
8. A power grid fault early warning device, characterized in that, include: The acquisition module is used to acquire power grid operation information, environmental information, and accuracy labels of historical fault warning events output by the fault warning model as training data. The power grid operation information includes electrical parameters and equipment operation and maintenance parameters. The training module is used to train a deep denoising autoencoder based on the training data, and to optimize the model parameters of the deep denoising autoencoder using a sparrow search algorithm to obtain an optimized early warning model. The sparrow population of the sparrow search algorithm is initialized using a Logistic chaotic mapping and the individual positions are updated based on inertial weights. The early warning module is used to input the target power grid operation information and its corresponding target environment information into the optimized early warning model to obtain power grid fault characteristics; and, The early warning result of the power grid fault is determined based on the characteristics of the power grid fault.
9. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the power grid fault early warning method as described in any one of claims 1 to 7.
10. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the power grid fault early warning method as described in any one of claims 1 to 7.