Power grid abnormal risk early warning method and device, electronic equipment and storage medium

By using wavelet transform and LSTM network model to extract the multi-scale time-frequency domain characteristics of power grid operation, construct system health assessment indicators and reconstruct error distribution, the problem of low accuracy of power grid abnormality risk warning in traditional methods is solved, and more efficient power grid abnormality risk identification and warning is achieved.

CN120638633APending Publication Date: 2025-09-12POWER DISPATCHING CONTROL CENT OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510746418.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Traditional linear statistical methods are difficult to process and analyze power grid operation monitoring data, resulting in low accuracy of power grid abnormal risk warnings.

Method used

The wavelet transform method is used to extract the multi-scale time-frequency domain characteristics of power grid operation. Combined with the LSTM network model, the system health assessment index is constructed and the error distribution is reconstructed to calculate the power grid anomaly score for risk warning.

Benefits of technology

It improves the accuracy of power grid abnormality risk warning, can better process massive power grid operation status monitoring data, and timely identify and warn of potential abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120638633A_ABST
    Figure CN120638633A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid abnormal risk early warning method and device, electronic equipment and a storage medium, and belongs to the technical field of abnormal early warning, and the method comprises the steps: decomposing the operation state monitoring data of a power grid into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamic state in a preset power grid operation period; inputting the feature vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs operation state prediction data corresponding to the feature vector; and according to the operation state monitoring data and the operation state prediction data, calculating a power grid abnormity score reflecting the power grid abnormity possibility, and when the power grid abnormity score is greater than a preset score threshold value, determining that the power grid has an abnormity risk and carrying out corresponding risk early warning. The problems that in the prior art, power grid operation monitoring data are difficult to process and analyze, and the accuracy rate of risk early warning is low can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of abnormality early warning technology, and in particular to a power grid abnormality risk early warning method, device, electronic equipment and storage medium. Background Art

[0002] As modern power systems continue to expand in scale and complexity, the operating environment of large power grids is becoming increasingly complex, exposing them to a variety of potential operational risks, such as voltage instability, frequency fluctuations, and power imbalances. These risks can not only cause local system instability but can even lead to cascading failures across the entire network, causing significant economic and social losses. Therefore, timely early warning of abnormal grid risks is essential to prevent further losses.

[0003] Traditional power grid anomaly detection methods are mostly based on simple statistical models. While these methods are somewhat practical when the grid is small, their limitations become increasingly significant as grid complexity increases. Traditional methods often assume that system operating states vary linearly, making it difficult to capture the complex nonlinear dynamics of grid operation, particularly the randomness and volatility introduced by distributed energy resources. Modern power grid operation monitoring generates massive amounts of high-dimensional and heterogeneous data, making it difficult for traditional linear statistical methods to process and analyze this data, resulting in low risk warning accuracy. Summary of the Invention

[0004] The present invention provides a power grid abnormality risk warning method, device, electronic equipment and storage medium, which can solve the problem in the existing technology that traditional linear statistical methods are difficult to process and analyze power grid operation monitoring data and the accuracy of risk warning is low.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for warning of power grid abnormality risks, comprising:

[0006] Acquire power grid operation status monitoring data; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status;

[0007] Decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition;

[0008] Inputting the characteristic vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the characteristic vector according to the characteristic vector;

[0009] Calculating a power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data, and comparing the power grid anomaly score with a preset score threshold; when the power grid anomaly score is greater than the score threshold, determining that a power grid anomaly risk exists and issuing a corresponding risk warning;

[0010] The power grid operation state prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation state monitoring data as input and operation state prediction data corresponding to the historical feature vectors as output.

[0011] As a preferred solution, the operation status monitoring data is decomposed into corresponding multi-scale time-frequency domain features, and a feature vector characterizing the power dynamics within a preset power grid operation cycle is constructed based on the decomposed multi-scale time-frequency domain features, including:

[0012] Performing a continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients;

[0013] Based on the decomposition coefficients, statistical characteristics characterizing the operating state of the power grid are calculated, and then based on the statistical characteristics and a preset power grid operating cycle, a characteristic vector characterizing the power dynamics within the power grid operating cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

[0014] As a preferred solution, after performing continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, the method further includes:

[0015] performing hard threshold processing on the high-frequency wavelet detail coefficient, comparing the high-frequency wavelet detail coefficient with a preset threshold, setting the high-frequency wavelet detail coefficient to zero when the high-frequency wavelet detail coefficient is less than the threshold, and maintaining the high-frequency wavelet detail coefficient unchanged when the high-frequency wavelet detail coefficient is not less than the threshold;

[0016] The high-frequency wavelet detail coefficients after hard threshold processing are subjected to inverse wavelet transform to reconstruct the denoised operating status monitoring data.

[0017] As a preferred solution, the calculating of a power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data includes:

[0018] Obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators, and power grid operation environment adaptability indicators;

[0019] Calculating a reconstruction error between the denoised operating state monitoring data and the operating state prediction data, and constructing a probability density function corresponding to the reconstruction error based on a distribution characteristic of a normal reconstruction error under normal operating conditions of the power grid;

[0020] According to the probability density function, the indicator abnormality score corresponding to each of the system health assessment indicators is calculated, and then the power grid abnormality score reflecting the possibility of power grid abnormality is calculated based on the indicator abnormality score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

[0021] Based on the above embodiment, another embodiment of the present invention provides a power grid abnormality risk warning device, comprising: an operation status monitoring data acquisition module, a feature vector construction module, an operation status prediction data prediction module, and a power grid abnormality risk warning module;

[0022] The operation status monitoring data acquisition module is used to acquire the operation status monitoring data of the power grid; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status;

[0023] The feature vector construction module is used to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and construct a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition;

[0024] The operation state prediction data prediction module is used to input the feature vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the feature vector based on the feature vector; wherein the power grid operation state prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation state monitoring data as input and operation state prediction data corresponding to the historical feature vectors as output;

[0025] The power grid abnormality risk warning module is used to calculate a power grid abnormality score reflecting the possibility of power grid abnormality based on the operating status monitoring data and the operating status prediction data, and compare the power grid abnormality score with a preset score threshold. When the power grid abnormality score is greater than the score threshold, it is determined that there is an abnormality risk in the power grid and a corresponding risk warning is issued.

[0026] As a preferred solution, the operation status monitoring data is decomposed into corresponding multi-scale time-frequency domain features, and a feature vector characterizing the power dynamics within a preset power grid operation cycle is constructed based on the decomposed multi-scale time-frequency domain features, including:

[0027] Performing a continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients;

[0028] Based on the decomposition coefficients, statistical characteristics characterizing the operating state of the power grid are calculated, and then based on the statistical characteristics and a preset power grid operating cycle, a characteristic vector characterizing the power dynamics within the power grid operating cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

[0029] As a preferred solution, after performing continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, the method further includes:

[0030] performing hard threshold processing on the high-frequency wavelet detail coefficient, comparing the high-frequency wavelet detail coefficient with a preset threshold, setting the high-frequency wavelet detail coefficient to zero when the high-frequency wavelet detail coefficient is less than the threshold, and maintaining the high-frequency wavelet detail coefficient unchanged when the high-frequency wavelet detail coefficient is not less than the threshold;

[0031] The high-frequency wavelet detail coefficients after hard threshold processing are subjected to inverse wavelet transform to reconstruct the denoised operating status monitoring data.

[0032] As a preferred solution, the calculating of a power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data includes:

[0033] Obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators, and power grid operation environment adaptability indicators;

[0034] Calculating a reconstruction error between the denoised operating state monitoring data and the operating state prediction data, and constructing a probability density function corresponding to the reconstruction error based on a distribution characteristic of a normal reconstruction error under normal operating conditions of the power grid;

[0035] According to the probability density function, the indicator abnormality score corresponding to each of the system health assessment indicators is calculated, and then the power grid abnormality score reflecting the possibility of power grid abnormality is calculated based on the indicator abnormality score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

[0036] Based on the above embodiments, another embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the power grid abnormality risk warning method described in the above invention embodiment is implemented.

[0037] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the power grid abnormality risk warning method described in the above invention embodiment.

[0038] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0039] The present invention provides a power grid abnormality risk warning method, which obtains power grid operation status monitoring data; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status; decomposing the operation status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition; inputting the feature vector into a preset power grid operation status prediction model, so that the power grid operation status prediction model predicts and outputs the operation status prediction data corresponding to the feature vector based on the feature vector; calculating a power grid abnormality score reflecting the possibility of power grid abnormality based on the operation status monitoring data and the operation status prediction data, and comparing the power grid abnormality score with a preset score threshold; when the power grid abnormality score is greater than the score threshold, it is determined that the power grid has an abnormal risk and a corresponding risk warning is issued; wherein the power grid operation status prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation status monitoring data as input and operation status prediction data corresponding to the historical feature vectors as output.

[0040] The present invention introduces an LSTM network model as a power grid operation state prediction model, predicts the operation state prediction data corresponding to the characteristic vector, and then calculates a power grid anomaly score reflecting the possibility of power grid anomaly based on the operation state monitoring data and the operation state prediction data. Finally, based on the power grid anomaly score, it can be judged whether the power grid is abnormal and an early warning can be issued. Compared with the linear statistical method in the prior art, the present invention can better process massive power grid operation state monitoring data and improve the accuracy of power grid anomaly risk early warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of a method for early warning of power grid abnormality risks provided by one embodiment of the present invention;

[0042] Figure 2 It is the error loss curve on the training set and the validation set;

[0043] Figure 3 It is a curve chart of the changes of "threshold accuracy" and "threshold recall";

[0044] Figure 4 is a graph of the reconstruction error score;

[0045] Figure 5 The present invention provides a schematic structural diagram of a power grid abnormality risk early warning device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.

[0048] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0049] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0050] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0051] In the description of the embodiments of the present application, the terms "multiple" and "several" refer to more than two (including two). Similarly, "multiple groups" refer to more than two groups (including two groups), and "multiple pieces" refer to more than two pieces (including two pieces).

[0052] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.

[0053] Example 1

[0054] Please refer to Figure 1 To address the difficulties in processing and analyzing power grid operation monitoring data and the low accuracy of risk warnings in existing technologies, an embodiment of the present invention provides a flow chart of a power grid abnormality risk warning method. The present invention constructs an operating system health assessment index, uses a wavelet transform method to extract time-frequency domain features of power grid operation, introduces a ResNet-optimized LSTM network, and proposes an anomaly score reflecting the deviation of an indicator from a normal state based on the model's reconstruction error distribution. This method identifies large power grid operation anomalies and issues risk warnings, including the following specific steps:

[0055] S1. Acquire power grid operation status monitoring data; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status;

[0056] Specifically, we first obtain massive heterogeneous detection data of the power grid (i.e., operation status monitoring data), including voltage, current, frequency, power, equipment status and environmental data.

[0057] S2. Decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition;

[0058] Preferably, the operating status monitoring data is decomposed into corresponding multi-scale time-frequency domain features, and a feature vector characterizing the power dynamics within a preset power grid operation cycle is constructed based on the multi-scale time-frequency domain features obtained by decomposition, including: performing a continuous wavelet transform on the operating status monitoring data, decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the multi-scale time-frequency domain features obtained by decomposition to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients; according to the decomposition coefficients, statistical characteristics characterizing the power grid operating status are calculated, and then according to the statistical characteristics and the preset power grid operation cycle, a feature vector characterizing the power dynamics within the power grid operation cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

[0059] Preferably, after performing continuous wavelet transform on the operating status monitoring data, decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, it also includes: performing hard threshold processing on the high-frequency wavelet detail coefficients, comparing the high-frequency wavelet detail coefficients with a preset threshold, when the high-frequency wavelet detail coefficients are less than the threshold, setting the high-frequency wavelet detail coefficients to zero, and when the high-frequency wavelet detail coefficients are not less than the threshold, keeping the high-frequency wavelet detail coefficients unchanged; performing inverse wavelet transform on the high-frequency wavelet detail coefficients after hard threshold processing, and reconstructing the denoised operating status monitoring data.

[0060] Specifically, after obtaining massive heterogeneous detection data from the power grid, the wavelet transform method is used to implement noise reduction and feature extraction on the power grid operation monitoring data for massive heterogeneous monitoring data, extract multi-scale time-frequency domain characteristics of the power grid operation, and construct a feature vector representing the power dynamics within a preset power grid operation cycle based on the decomposed multi-scale time-frequency domain characteristics.

[0061] Among them, the wavelet transform method to extract the frequency domain characteristics of power grid operation specifically includes:

[0062] (1) Continuous wavelet transform: Wavelet transform is used to pre-process the massive monitoring data of power grid operation, extract the input feature data of LSTM network, and obtain the multi-scale time-frequency domain features of power grid operation data. a,b (t) can be obtained from its mother wavelet ψ(t) (predefined basis function) by transformation and scaling:

[0063]

[0064] where ψ a,b (t) is the scaled and shifted wavelet basis function, a and b are the scaling and shifting parameters respectively, and t is the time variable. Using this relationship, the continuous wavelet transform of the signal s(t) with a scale of a and a displacement of b is defined as:

[0065]

[0066] Where: C(a,b,s(t),ψ(t)) is the continuous wavelet transform function, is ψ a,b The complex conjugate of (t); <·> is the inner product.

[0067] (2) Discrete wavelet transform: DWT (discrete wavelet transform) is obtained by the following formula:

[0068]

[0069] where d j,k is the wavelet detail coefficient of level j and position k. However, for most signals s(t), its analytical solution is not available. Mallet developed a multiresolution signal decomposition technique, which is widely considered to be the standard method for calculating DWT. Given any signal s(t), the multiresolution decomposition at level t is defined as:

[0070]

[0071] Where: a M,k is the approximate coefficient of series M and position k; is the companion expansion function. Through this transformation, it can be decomposed into the level approximation coefficient A M (t) and the M-level wavelet detail coefficient sequence D j (t).

[0072] It can be seen that wavelet transform can decompose an input signal sequence into a series of coefficients a M,k and d j,kThe wavelet transform decomposes the signal into wavelet coefficients at different scales (different frequency bands). After wavelet decomposition, a threshold method is used to remove noise. The present invention uses a hard threshold method to process high-frequency wavelet coefficients. Coefficients less than the threshold are directly set to zero, while coefficients greater than the threshold remain unchanged. The processed wavelet coefficients at different scales (different frequency bands) are used to perform an inverse wavelet transform to reconstruct the denoised operating status monitoring data.

[0073] Selecting appropriate features to represent the input signal is the key to anomaly detection. The present invention selects a series of statistical features of the decomposition coefficients to construct the input feature vector of the LSTM network. The selected statistical features are: the maximum value of the coefficient max{s}, the minimum value of the coefficient min{s}, the mean value of the coefficient μ{s}=E(s), the standard deviation of the coefficient σ(s)=E[s-μ(s) 2 ] 1 / 2 , the energy of the coefficient ∑s 2 , where s represents the decomposition coefficient a M,k or d j,k .

[0074] For each cycle of the large power grid system operation, 32 (coefficients) × 5 (features) × 3 (phases) = 480 features can be calculated to form a feature vector, which serves as the input feature vector of the extreme learning machine below.

[0075] S3. Inputting the feature vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the feature vector based on the feature vector; wherein the power grid operation state prediction model is obtained by training a preset LSTM network model with the historical feature vector corresponding to the historical operation state monitoring data as input and the operation state prediction data corresponding to the historical feature vector as output;

[0076] Specifically, the above-mentioned feature vector is input into a pre-trained power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the feature vector. The present invention introduces a residual structure to optimize the long short-term memory network, improves the feature learning ability of the LSTM network, and enhances the quality of data generation and reconstruction.

[0077] LSTM networks are a special type of recurrent neural network with the advantages of high prediction accuracy and strong recursive capabilities, which can solve the long-term dependency problem of recurrent neural networks. Adding a "gate" structure to add or discard information can play a role in long-term memory. The formula for selecting information by the "gate" of the LSTM network is:

[0078]

[0079] Where g(x) is the selective output of the gate; W and b are trainable parameters, σ(x) is the activation function, i.e., the Sigmod function, and the output is the amount of selected information, ranging from 0 to 1.

[0080] The forward propagation expression of the LSTM network is:

[0081]

[0082] Where i t 、f t 、o t They are input gate, forget gate and output gate respectively; c t 、h t are the short-term memory and long-term memory at time t, σ and tanh are activation functions, b is the bias term, and W x and W h are the input and hidden state weight matrices, respectively.

[0083] During the forward propagation process, the input gate affects the information of the input data that is stored in the short-term memory; the forget gate affects the information that needs to be stored in the long-term memory, that is, the short-term memory information forgotten at the previous moment; the output gate affects the short-term memory information, that is, the information at the next moment.

[0084] After back propagation algorithm and cross loss function update parameters, the loss function expression is:

[0085]

[0086] Where y t 、 are the actual output and the predicted output respectively, and is the loss function.

[0087] Use ResNet to optimize the LSTM network, including:

[0088] The residual structure is introduced on the basis of the LSTM network, and the residual connection is defined by the following formula:

[0089] H t =F(x t )+x t ;

[0090] Among them, H t is the output of the residual unit, F(x t ) represents the LSTM network x t The transformation function of .

[0091] The introduction of residual connections can alleviate the vanishing gradient problem, ensure effective signal propagation in deep networks, and thus improve feature learning capabilities. The optimized LSTM network is used to train preprocessed power grid operation data, improving data generation and reconstruction quality by minimizing the following loss function:

[0092]

[0093] Among them, L is the loss function, y i is the true value, is the predicted value, ||·|| 2 is the Euclidean distance, is the regularization term, λ is the regularization parameter, and θ is the network parameter.

[0094] S4. Calculate a power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data, and compare the power grid anomaly score with a preset score threshold. When the power grid anomaly score is greater than the score threshold, determine that a power grid anomaly risk exists and issue a corresponding risk warning.

[0095] Preferably, the calculation of the power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data includes: obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators and power grid operation environment adaptability indicators; calculating the reconstruction error between the denoised operating status monitoring data and the operating status prediction data, and constructing a probability density function corresponding to the reconstruction error based on the distribution characteristics of the normal reconstruction error under the normal operating state of the power grid; calculating the indicator anomaly score corresponding to each of the system health assessment indicators based on the probability density function, and then calculating the power grid anomaly score reflecting the possibility of power grid anomaly based on the indicator anomaly score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

[0096] Specifically, starting from the large-scale power grid control and operation requirements, the system health evaluation indicators of power grid operation are constructed by comprehensively considering the types of system anomalies. The system health evaluation indicators specifically include:

[0097] a) Grid operation safety indicators, used to reflect the safety status of key grid equipment and systems;

[0098] b) Grid operation stability indicators, used to evaluate the dynamic response capability of the grid under disturbance conditions;

[0099] c) Grid operation economic indicators, used to measure the energy efficiency and economic benefits of grid operation;

[0100] d) Grid operating environment adaptability index, used to characterize the grid's ability to adapt to changes in the external environment.

[0101] The above key indicator system provides a comprehensive understanding of the grid's operating status. Promptly detecting anomalies in grid operating indicators is crucial for identifying safety risks during grid operation and implementing timely and appropriate measures to address high-risk events. These indicators are used to establish a baseline state, helping the LSTM identify normal grid operation modes, optimize anomaly score calculation, and provide additional information to improve the accuracy of anomaly detection.

[0102] Based on the reconstruction error distribution of the model, an abnormality score is proposed to reflect the deviation of the indicator from the normal state, identifying abnormal operation of the large power grid and issuing risk warnings. The reconstruction error is used to calculate the system operation abnormality score, identifying abnormal operation of the large power grid and issuing risk warnings, specifically including:

[0103] Use the optimized LSTM network to generate reconstructed data and build a data reconstruction model f(x;θ), where x is the input data and θ is the model parameter to generate reconstructed data

[0104]

[0105] Calculate the reconstruction error e and use the following formula to describe the definition of the reconstruction error:

[0106]

[0107] Among them, ||·|| 2 Represents the Euclidean distance, which is used to measure the difference between the original data and the reconstructed data.

[0108] Construct the distribution model P(e) of the reconstruction error and obtain its probability density function P(e) by statistically analyzing the reconstruction error distribution of historical normal data:

[0109]

[0110] Where μ is the mean of the reconstruction error and σ is the standard deviation of the reconstruction error, which are used to characterize the distribution characteristics of the error under normal operating conditions.

[0111] The anomaly score S(x) is defined based on the reconstruction error distribution, and the degree to which the data deviates from the normal state is quantified by the following formula:

[0112] S(x)=1-P(e);

[0113] The higher the anomaly score S(x), the greater the possibility of data anomaly. Based on the set threshold T, the anomaly scores are classified and the time series trend of the anomaly scores is used to predict the future risk level. The future risk value R(t+k) is estimated using the following formula:

[0114] R(t+k)=α·S(x t )+(1-α)·R(t+k-1);

[0115] Among them, α is the smoothing factor, S(x t ) is the current anomaly score, and R(t+k-1) is the risk level at the previous moment. For the multi-dimensional index data of large power grid operation, the comprehensive anomaly score S is calculated using the method of multiple reconstruction error fusion. total :

[0116]

[0117] Among them, S i is the abnormal score of the i-th indicator, w i is the corresponding weight, and N is the number of indicators.

[0118] Adaptive threshold method is used to set the abnormal threshold T according to the distribution of historical data and system security and health indicators. When the comprehensive abnormal score S total When it is greater than the abnormal threshold, the system determines it as abnormal and issues an early warning, i.e. S total When >T, the system abnormality determines that the power grid has abnormal risk.

[0119] In a specific embodiment, historical operating data of a provincial power grid involving a multidimensional indicator system is selected as important basic data for verifying the effectiveness of the indicator anomaly identification and warning model. Specifically, the data source covers the operating data from July to September 2024. To ensure the scientificity and practicality of the model, these data are reasonably divided into training set, validation set and test set. The main purpose of the training set is to fully train the model to learn and master various data features; the validation set is used to calculate the distribution parameters of the reconstruction error and further evaluate the performance of the model on unseen data; the test set is used to select the optimal threshold η and detect the actual effect of the model in identifying abnormal indicators through simulated operation.

[0120] During the model training process, please refer to Figure 2, which is the error loss curve for the training set and validation set. As can be seen from the curve, as the number of training rounds gradually increases, the training error shows a significant downward trend. This indicates that the model can effectively capture the inherent laws of the multidimensional indicator sequence and accurately reconstruct the data through learning. However, as the number of training rounds increases, the error curve on the validation set tends to stabilize or even increase after a period of time. This may be a sign that the model is beginning to overfit, that is, the model performs well on the training set, but its generalization ability on new data is reduced. To avoid the negative impact of overfitting on model performance, this study adopted an early stopping method.

[0121] Based on the test set, the accuracy and recall rate are used to evaluate the anomaly recognition model and determine the optimal decision threshold.

[0122] Accuracy P A :

[0123]

[0124] Where: TP is the number of correctly detected abnormal samples; FP is the number of incorrect detections of normal data; TN is the number of correct detections in normal samples; FN is the number of incorrect detections in abnormal samples.

[0125] Recall R:

[0126]

[0127] Please refer to Figure 3 , is the change curve of “threshold accuracy” and “threshold recall rate”, Figure 3 The results shown show that the optimal threshold for historical data is η=22.29. Figure 4 , is the reconstruction error score curve. After setting the optimal threshold η = 22.29, we performed anomaly recognition on the indicator data and obtained the following Figure 4 The abnormal operation identification results shown in the figure are as follows. Figure 4 Based on the identification results, when the anomaly score of an indicator exceeds the set threshold η, the model can accurately identify potential anomalies in power grid operation. At this point, the system automatically triggers an alert mechanism, promptly sending an alarm notification to dispatchers, reminding them to pay attention to the grid's operating status and take appropriate control measures. This timely early warning mechanism effectively improves power grid security and prevents further deterioration of anomalies, providing important support for ensuring stable grid operation. Dispatchers can also respond quickly to the alert information and take necessary adjustments and optimization measures to ensure the normal operation of the grid.

[0128] It can be seen that the present invention provides a power grid abnormality risk warning method. The present invention introduces an LSTM network model and uses it as a power grid operation status prediction model to predict the operation status prediction data corresponding to the characteristic vector, and then calculates the power grid abnormality score reflecting the possibility of power grid abnormality based on the operation status monitoring data and the operation status prediction data. Finally, based on the power grid abnormality score, it can be judged whether the power grid is abnormal and an early warning can be issued. Compared with the linear statistical method of the prior art, the present invention can better process massive power grid operation status monitoring data and improve the accuracy of power grid abnormality risk warning.

[0129] Example 2

[0130] Please refer to Figure 5 , is a schematic structural diagram of a power grid abnormality risk warning device provided by an embodiment of the present invention, the device comprising: an operation status monitoring data acquisition module, a feature vector construction module, an operation status prediction data prediction module, and a power grid abnormality risk warning module;

[0131] The operation status monitoring data acquisition module is used to acquire the operation status monitoring data of the power grid; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status;

[0132] The feature vector construction module is used to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and construct a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition;

[0133] The operation state prediction data prediction module is used to input the feature vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the feature vector based on the feature vector; wherein the power grid operation state prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation state monitoring data as input and operation state prediction data corresponding to the historical feature vectors as output;

[0134] The power grid abnormality risk warning module is used to calculate a power grid abnormality score reflecting the possibility of power grid abnormality based on the operating status monitoring data and the operating status prediction data, and compare the power grid abnormality score with a preset score threshold. When the power grid abnormality score is greater than the score threshold, it is determined that there is an abnormality risk in the power grid and a corresponding risk warning is issued.

[0135] Preferably, the decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition, includes:

[0136] Performing a continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients;

[0137] Based on the decomposition coefficients, statistical characteristics characterizing the operating state of the power grid are calculated, and then based on the statistical characteristics and a preset power grid operating cycle, a characteristic vector characterizing the power dynamics within the power grid operating cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

[0138] Preferably, after performing continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, the method further includes:

[0139] performing hard threshold processing on the high-frequency wavelet detail coefficient, comparing the high-frequency wavelet detail coefficient with a preset threshold, setting the high-frequency wavelet detail coefficient to zero when the high-frequency wavelet detail coefficient is less than the threshold, and maintaining the high-frequency wavelet detail coefficient unchanged when the high-frequency wavelet detail coefficient is not less than the threshold;

[0140] The high-frequency wavelet detail coefficients after hard threshold processing are subjected to inverse wavelet transform to reconstruct the denoised operating status monitoring data.

[0141] Preferably, the calculating, based on the operating status monitoring data and the operating status prediction data, a power grid anomaly score reflecting the possibility of power grid anomaly, includes:

[0142] Obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators, and power grid operation environment adaptability indicators;

[0143] Calculating a reconstruction error between the denoised operating state monitoring data and the operating state prediction data, and constructing a probability density function corresponding to the reconstruction error based on a distribution characteristic of a normal reconstruction error under normal operating conditions of the power grid;

[0144] According to the probability density function, the indicator abnormality score corresponding to each of the system health assessment indicators is calculated, and then the power grid abnormality score reflecting the possibility of power grid abnormality is calculated based on the indicator abnormality score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

[0145] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive effort.

[0146] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0147] Example 3

[0148] Accordingly, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the power grid abnormality risk warning method described in the above-mentioned embodiment of the invention.

[0149] The electronic device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The device may include, but is not limited to, a processor and a memory.

[0150] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (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 any conventional processor, etc. The processor is the control center of the device and connects various parts of the entire device using various interfaces and lines.

[0151] Example 4

[0152] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the power grid abnormality risk warning method described in the above-mentioned embodiment of the invention.

[0153] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0154] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. The computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0155] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A power grid abnormality risk early warning method, characterized in that: include: Acquire power grid operation status monitoring data; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status; Decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition; Inputting the characteristic vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the characteristic vector according to the characteristic vector; Calculating a power grid anomaly score reflecting the possibility of power grid anomaly based on the operating status monitoring data and the operating status prediction data, and comparing the power grid anomaly score with a preset score threshold; when the power grid anomaly score is greater than the score threshold, determining that a power grid anomaly risk exists and issuing a corresponding risk warning; The power grid operation state prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation state monitoring data as input and operation state prediction data corresponding to the historical feature vectors as output.

2. The power grid abnormality risk early warning method according to claim 1, characterized in that: Decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition, includes: Performing a continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients; Based on the decomposition coefficients, statistical characteristics characterizing the operating state of the power grid are calculated, and then based on the statistical characteristics and a preset power grid operating cycle, a characteristic vector characterizing the power dynamics within the power grid operating cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

3. The power grid abnormality risk early warning method according to claim 2, characterized in that: After performing continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, the method further includes: performing hard threshold processing on the high-frequency wavelet detail coefficient, comparing the high-frequency wavelet detail coefficient with a preset threshold, setting the high-frequency wavelet detail coefficient to zero when the high-frequency wavelet detail coefficient is less than the threshold, and maintaining the high-frequency wavelet detail coefficient unchanged when the high-frequency wavelet detail coefficient is not less than the threshold; The high-frequency wavelet detail coefficients after hard threshold processing are subjected to inverse wavelet transform to reconstruct the denoised operating status monitoring data.

4. The power grid abnormality risk early warning method according to claim 3, characterized in that: The calculating, based on the operating status monitoring data and the operating status prediction data, a power grid anomaly score reflecting the possibility of power grid anomaly, includes: Obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators, and power grid operation environment adaptability indicators; Calculating a reconstruction error between the denoised operating state monitoring data and the operating state prediction data, and constructing a probability density function corresponding to the reconstruction error based on a distribution characteristic of a normal reconstruction error under normal operating conditions of the power grid; According to the probability density function, the indicator abnormality score corresponding to each of the system health assessment indicators is calculated, and then the power grid abnormality score reflecting the possibility of power grid abnormality is calculated based on the indicator abnormality score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

5. A power grid abnormality risk early warning device, characterized in that: include: Operation status monitoring data acquisition module, feature vector construction module, operation status prediction data prediction module and power grid abnormality risk early warning module; The operation status monitoring data acquisition module is used to acquire the operation status monitoring data of the power grid; wherein the operation status monitoring data includes: voltage, current, frequency, power and equipment status; The feature vector construction module is used to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and construct a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition; The operation state prediction data prediction module is used to input the feature vector into a preset power grid operation state prediction model, so that the power grid operation state prediction model predicts and outputs the operation state prediction data corresponding to the feature vector based on the feature vector; wherein the power grid operation state prediction model is obtained by training a preset LSTM network model with historical feature vectors corresponding to historical operation state monitoring data as input and operation state prediction data corresponding to the historical feature vectors as output; The power grid abnormality risk warning module is used to calculate a power grid abnormality score reflecting the possibility of power grid abnormality based on the operating status monitoring data and the operating status prediction data, and compare the power grid abnormality score with a preset score threshold. When the power grid abnormality score is greater than the score threshold, it is determined that there is an abnormality risk in the power grid and a corresponding risk warning is issued.

6. The power grid abnormality risk early warning device according to claim 5, characterized in that: Decomposing the operating status monitoring data into corresponding multi-scale time-frequency domain features, and constructing a feature vector representing the power dynamics within a preset power grid operation cycle based on the multi-scale time-frequency domain features obtained by the decomposition, includes: Performing a continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing a discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients; wherein the decomposition coefficients include: low-frequency approximation coefficients and high-frequency wavelet detail coefficients; Based on the decomposition coefficients, statistical characteristics characterizing the operating state of the power grid are calculated, and then based on the statistical characteristics and a preset power grid operating cycle, a characteristic vector characterizing the power dynamics within the power grid operating cycle is constructed; wherein the statistical characteristics include: maximum value, minimum value, mean value, standard deviation and energy.

7. The power grid abnormality risk early warning device according to claim 6, characterized in that: After performing continuous wavelet transform on the operating status monitoring data to decompose the operating status monitoring data into corresponding multi-scale time-frequency domain features, and performing discrete wavelet transform on the decomposed multi-scale time-frequency domain features to obtain corresponding decomposition coefficients, the method further includes: performing hard threshold processing on the high-frequency wavelet detail coefficient, comparing the high-frequency wavelet detail coefficient with a preset threshold, setting the high-frequency wavelet detail coefficient to zero when the high-frequency wavelet detail coefficient is less than the threshold, and maintaining the high-frequency wavelet detail coefficient unchanged when the high-frequency wavelet detail coefficient is not less than the threshold; The high-frequency wavelet detail coefficients after hard threshold processing are subjected to inverse wavelet transform to reconstruct the denoised operating status monitoring data.

8. The power grid abnormality risk early warning device according to claim 7, characterized in that: The calculating, based on the operating status monitoring data and the operating status prediction data, a power grid anomaly score reflecting the possibility of power grid anomaly, includes: Obtaining preset system health assessment indicators; wherein the system health assessment indicators include: power grid operation safety indicators, power grid operation stability indicators, power grid operation economic indicators, and power grid operation environment adaptability indicators; Calculating a reconstruction error between the denoised operating state monitoring data and the operating state prediction data, and constructing a probability density function corresponding to the reconstruction error based on a distribution characteristic of a normal reconstruction error under normal operating conditions of the power grid; According to the probability density function, the indicator abnormality score corresponding to each of the system health assessment indicators is calculated, and then the power grid abnormality score reflecting the possibility of power grid abnormality is calculated based on the indicator abnormality score corresponding to each of the system health assessment indicators and the weight corresponding to each system health assessment indicator.

9. An electronic 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 method for early warning of abnormal risk of a power grid according to any one of claims 1 to 4 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the power grid abnormality risk early warning method according to any one of claims 1 to 4.