Fluctuation early warning method and equipment of power grid and storage medium
By preprocessing and feature extraction of power grid operation data, periodic fluctuation characteristics are constructed, future fluctuation intensity is predicted and fluctuation state is identified, the problems of low accuracy of long-term fluctuation warnings and noise interference in the existing technology are solved, and higher warning accuracy and grid stability are achieved.
Patent Information
- Application Number
- CN202411909853.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art has problems of low accuracy and noise interference when dealing with long-term fluctuations of the power grid, resulting in low warning accuracy.
By preprocessing the power grid operation data, extracting features using a variational autoencoder, decomposing singular values, constructing periodic fluctuations characteristics, and predicting future fluctuations intensity and identifying fluctuations based on these characteristics. If abnormal, early warning operations will be performed.
It improves the accuracy of early warning of long-term fluctuations in the power grid, can accurately identify and predict long-term fluctuations trends, and maintain stable operation of the power grid.
Smart Images

Figure CN119720039A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a power grid fluctuation early warning method, device and storage medium. Background Art
[0002] With the development of smart grid technology, the scale of new energy access continues to expand, and the uncertainty of dynamic load changes, power generation fluctuations and market-based transactions continues to expand, resulting in intensified fluctuations in load and power.
[0003] Periodic fluctuations are often slow and lasting, especially long-period fluctuations that are difficult to control. Once the fluctuations exceed the controllable range, they will bring about serious chain reactions and affect the normal operation of the power grid. Once long-period fluctuations develop to a dangerous level.
[0004] At present, most of the methods for early warning of power grid fluctuations use time series analysis methods, such as autoregressive moving average model or Fourier analysis. However, time series analysis methods have significant limitations in dealing with long-term fluctuations in the power grid. First, time series analysis methods are mostly based on linear models. The accuracy of linear models in capturing the characteristics of long-term fluctuations caused by the nonlinear characteristics of the power grid is low; secondly, the power grid data contains a large amount of noise signals, which will interfere with the fluctuation components and affect the accuracy of the early warning. Summary of the invention
[0005] In view of this, the present invention provides a power grid fluctuation early warning method, device and storage medium, so as to improve the accuracy of early warning of long-term power grid fluctuation.
[0006] A first aspect of the present invention provides a power grid fluctuation early warning method, comprising:
[0007] When a variety of operation data are collected from the power grid at various time points, preprocessing the operation data;
[0008] Extract features from the running data using a variational autoencoder to obtain a target latent variable;
[0009] Performing singular value decomposition on the target latent variable to obtain periodic characteristic features of the power grid;
[0010] constructing a periodic fluctuation feature based on the periodic feature;
[0011] Predicting the fluctuation intensity of the power grid at various time points in the future based on the periodic fluctuation characteristics;
[0012] identifying a future fluctuation state of the power grid according to the fluctuation intensity;
[0013] If the fluctuation state is abnormal, an early warning operation is performed on the power grid.
[0014] A second aspect of the present invention provides a power grid fluctuation warning device, comprising:
[0015] A preprocessing module, used to preprocess the operation data when collecting various operation data from the power grid at various time points;
[0016] A latent variable extraction module, used for extracting features from the operating data using a variational autoencoder to obtain a target latent variable;
[0017] A singular value decomposition module, used for performing singular value decomposition on the target latent variable to obtain periodic characteristic features of the power grid;
[0018] A periodic fluctuation feature construction module, used to construct a periodic fluctuation feature based on the periodic feature;
[0019] A fluctuation intensity prediction module, used to predict the fluctuation intensity of the power grid at various time points in the future according to the periodic fluctuation characteristics;
[0020] A fluctuation state identification module, used for identifying the future fluctuation state of the power grid according to the fluctuation intensity;
[0021] The early warning operation execution module is used to execute an early warning operation on the power grid if the fluctuation state is abnormal.
[0022] A third aspect of the present invention provides an electronic device, the electronic device comprising:
[0023] at least one processor; and
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid fluctuation warning method as described in the first aspect above.
[0026] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the power grid fluctuation warning method as described in the first aspect above.
[0027] A fifth aspect of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for early warning of fluctuations in a power grid as described in the first aspect above is implemented.
[0028] In this embodiment, when a variety of operating data are collected from the power grid at various time points, the operating data are preprocessed; a variational autoencoder is used to extract features from the operating data to obtain target latent variables; singular value decomposition is performed on the target latent variables to obtain the periodic characteristic features of the power grid; a periodic fluctuation feature is constructed based on the periodic feature; the fluctuation intensity of the power grid at various time points in the future is predicted based on the periodic fluctuation feature; the fluctuation state of the power grid in the future is identified based on the fluctuation intensity; if the fluctuation state is abnormal, an early warning operation is performed on the power grid. This embodiment can make full use of the high-dimensional features of the power grid operation data, accurately identify and predict long-period fluctuation trends while removing noise interference, so as to improve the accuracy of the early warning, thereby maintaining the stable operation of the power grid.
[0029] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 This is a flow chart of a power grid fluctuation early warning method provided in Embodiment 1 of the present invention.
[0032] Figure 2 It is a structural diagram of a power grid fluctuation warning device provided in Embodiment 2 of the present invention.
[0033] Figure 3 It is a structural schematic diagram of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can cover sequential implementations other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] See also Figure 1 , shows a flow chart of a power grid fluctuation warning method provided by the first embodiment of the present invention, the method can be executed by a power grid fluctuation warning device, the power grid fluctuation warning device can be implemented in the form of hardware and / or software, and the power grid fluctuation warning device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0038] Step 101: When a variety of operation data are collected from the power grid at various time points, the operation data are pre-processed.
[0039] In this embodiment, various operation data such as current value, voltage value, etc. can be continuously collected from the power grid at multiple time points according to the preset sampling period Δt to obtain time-series-related operation data (ie, time-series data) in the power grid.
[0040] In general, the original running data can be expressed in matrix form: X = [x ij ] m×n ; where X represents the set of running data, x ij represents the operating data at the i-th time point and the j-th observed variable (ie, the type of operating data), m represents the number of time points, and n represents the number of observed variables.
[0041] In this embodiment, one or more pre-processing steps may be performed on the operation data to improve the quality of the operation data.
[0042] In a specific implementation, whether the operation data is valid is identified based on a numerical range of the operation data, etc., so that the operation data is filtered to remove invalid operation data and retain valid operation data.
[0043] If the filtering is completed, the removed running data is filled by interpolation. For example, the mean of the adjacent running data is inserted into the removed running data. At this time, the running data is represented as X'=[x' ij ] m×n , where X' represents the set of interpolated running data, x' ij Indicates the running data after insertion.
[0044] If the filling is completed, the mean and standard deviation of the running data are calculated, and the running range is constructed based on the mean and standard deviation of the running data, where the running range is expressed as [μ j -λσ j ,μ j +λσ j ], λ is a hyperparameter, such as 1, 2, 3, etc., μ j is the average value of the running data under the jth observed variable, σ j is the standard deviation of the running data under the jth observed variable.
[0045] Each operating data is compared with the operating range. If a certain operating data is outside the operating range, the operating data is determined to be abnormal data and is eliminated.
[0046] The operating data adjacent to the abnormal data are merged into new operating data to replace the abnormal data. At this time, the operating data is represented by X″=[x i ″ j ] m×n , where X″ represents the set of running data after removing abnormal data, x i ″ j Indicates the operating data after removing abnormal data.
[0047] Step 102: Use a variational autoencoder to extract features from the running data to obtain a target latent variable.
[0048] In this embodiment, a variational autoencoder (VAE) may be used to extract features from the operating data to obtain target latent variables.
[0049] Among them, the variational autoencoder can model the real data distribution from the training data, and use the learned model and distribution to generate and construct new data.
[0050] The dimension of the latent space of the variational autoencoder is set to p, and a time-varying distribution constraint is introduced in the latent space so that the distribution of the target latent variable can be dynamically adjusted over time.
[0051] In a specific implementation, a variational autoencoder is loaded; the variational autoencoder includes an encoder and a decoder.
[0052] In the encoder, the operating data X″ is encoded by parameterized probability distribution, and the high-dimensional operating data X″ is mapped to the low-dimensional space to obtain the original latent variables.
[0053] The original latent variable can be expressed as: Z = [z ik ] m×p , Z represents the set of original latent variables, m represents the number of time points, p represents the dimension, and z ik represents the kth original latent variable at the ith time point.
[0054] z ik The encoding process can be expressed as:
[0055]
[0056] Among them, q φ (z ik |x″ i ) is the approximate posterior distribution, represents normal distribution, μ ik and σ ik are the mean and standard deviation of the original latent variables, respectively, calculated by the encoder parameter φ, x″ i is the running data at the i-th time point.
[0057] When coding was completed, the means and standard deviations of the original latent variables were calculated using the time-varying distribution constraints.
[0058] The mean μ of the original latent variable ik and standard deviation σ ik It can be expressed as:
[0059] μ ik =f μ (t i θ μ ),σ ik =f σ (t i θ σ )
[0060] Among them, t i is the i-th time point, f μ and f σ For time point t i A differentiable function, θ μ and θ σ is the parameter vector of the function, which makes the distribution of the original latent variables adaptively capture the changing characteristics of the power grid fluctuation period over time.
[0061] The mean and standard deviation of the original latent variable are sampled using reparameterization to obtain candidate latent variables.
[0062] Candidate latent variable z ik The sampling process can be expressed as z ik :
[0063]
[0064] Among them, ∈ ik is a random noise of standard normal distribution, so that the candidate latent variable z ik Represents the long-term characteristics of power grid time series data.
[0065] In the decoder, for the candidate latent variable Z = [z ik ] m×p Perform decoding and reconstruction to obtain the target latent variable
[0066] The decoding process can be expressed as:
[0067]
[0068] Among them, g ψ is the decoder, ψ is the decoder parameter, The target latent variable value reconstructed under the j-th observed variable at the i-th time point is restored to the main features of the input candidate latent variable.
[0069] Furthermore, the error of the historical reconstruction target latent variable and the regularization term of the time-varying distribution constraint can be fused into a loss value, thereby optimizing the encoder, decoder and time-varying distribution constraint based on the loss value.
[0070] In the specific implementation, the loss function L(φ,θ μ ,θ σ ,ψ), including the error of reconstructing the target latent variable and the regularization term of the time-varying distribution constraint, the loss function is:
[0071]
[0072] Among them, D KL represents the Kullback-Leibler divergence (KL divergence), p(z ik |t i ) is the prior distribution, considering the time dependency, α is the trade-off parameter, and the minimization of the loss function aims to optimize the parameters of the encoder, decoder and time-varying distribution constraints so that the latent variables reflect the characteristics of long-term fluctuations in the power grid.
[0073] The optimized low-dimensional target latent variable Z optContains the key dynamic features of power grid operation data, and uses the dynamic characteristics of low-dimensional target latent variables to optimize the extraction effect of long-period fluctuation characteristics of the power grid. The low-dimensional target latent variables after optimization are:
[0074]
[0075] Among them, z ik is the kth low-dimensional target latent variable at the i-th time point after optimization, f μ (t i θ μ ) is about time t i The mean function of μ , f σ (t i θ σ ) is about time t i The standard deviation function of σ , Represents random noise from a standard normal distribution.
[0076] Step 103: Perform singular value decomposition on the target latent variable to obtain the periodic characteristic features of the power grid.
[0077] In this embodiment, a singular spectrum analysis is performed on the low-dimensional target latent variables, and the target latent variables are processed by singular value decomposition to separate the periodic components and trend components of the power grid, thereby obtaining periodic features and trend features.
[0078] In this embodiment, the period feature is used and the trend feature is ignored.
[0079] In the specific implementation, the target latent variable Z opt Constructed as the continuation matrix H.
[0080] The extension matrix H can be expressed as:
[0081]
[0082] Wherein, L is the length of the extension matrix, K=m-L+1, and H is a K×L dimensional matrix used for characteristic pattern extraction in singular spectrum analysis.
[0083] Perform singular value decomposition on the extension matrix to obtain singular values, left singular vectors and right singular vectors.
[0084] The process of singular value decomposition can be expressed as:
[0085]
[0086] Among them, H∈R K×L is the extension matrix of the target latent variable, u r ∈RK and v r ∈R L are the rth left and right singular vectors, respectively, describing the characteristic mode of power grid fluctuations, σ r is the rth singular value, reflecting the relative intensity of long-period fluctuations in the power grid.
[0087] Based on the extension matrix, the left singular vector and the right singular vector are used to update the singular values.
[0088] Specifically, the principal components of the long-period fluctuations of the power grid are extracted from the diagonal matrix Σ of the singular values, and the long-period fluctuation characteristics of the power grid time series data are deeply captured through the left singular vector and the right singular vector, so that σ r Reflects the amplitude and intensity of long-term fluctuations:
[0089]
[0090] Among them, λ r is the rth eigenvalue of the continuation matrix H, describing the energy of the rth frequency component, u ir and v jr are the component values of the singular vector in the i-th row and j-th column of the continuation matrix respectively.
[0091] If the update is completed, on the one hand, the singular values, left singular vectors and right singular vectors containing the grid periodic components are used to generate periodic features, and on the other hand, the singular values, left singular vectors and right singular vectors containing the grid trend components are used to generate trend features.
[0092] Specifically, the periodic component (i.e., periodic feature) C and the trend component (i.e., trend feature) T are defined in the form of a matrix, and the reconstruction process of the two can be expressed as:
[0093]
[0094] Among them, R is the index set of singular values containing periodic components, T is the index set of singular values containing trend components, and the symbol The outer product operation of the vector is represented, so that the periodic feature C contains the long periodic characteristics of the power grid operation data, and the trend feature T contains the long-term trend change characteristics of the power grid operation data.
[0095] Step 104: construct periodic fluctuation characteristics based on periodic characteristics and trend characteristics.
[0096] In this embodiment, the long-term periodic fluctuation characteristics of the power grid operation data can be constructed based on the periodic characteristics and trend characteristics.
[0097] In a specific implementation, in the periodic feature, the main frequency of the period is calculated based on the ratio of the singular values, so that the main frequency of the period is positively correlated with the ratio of the singular values.
[0098] Exemplarily, the main frequency can be expressed as:
[0099]
[0100] Among them, f r is the main frequency, σ r is the rth singular value, corresponding to the frequency component intensity of the continuation matrix H, and R is the index set of singular values in the periodic feature.
[0101] If the main frequency is less than the preset frequency threshold (i.e. f r <f c , f c is the frequency threshold for distinguishing long periods from short periods, singular values, left singular vectors, and right singular vectors are used to reconstruct the periodic fluctuation characteristics and filter out short periods and noise interference.
[0102] Periodic fluctuation characteristics C long It can be expressed as:
[0103]
[0104] Among them, R long To satisfy the long-period condition (i.e. f r <f c ) is the index set of the singular values of r and v r are the left and right singular vectors respectively.
[0105] Step 105: predict the fluctuation intensity of the power grid at various time points in the future based on the periodic fluctuation characteristics.
[0106] In this embodiment, a fluctuation prediction model can be constructed based on the long-period fluctuation component (ie, the periodic fluctuation characteristics) to predict the long-period fluctuation intensity of the power grid operation data in the future time period.
[0107] In the specific implementation, the time series feature F is extracted from the periodic fluctuation feature, which is expressed as Among them, time series features Including the fluctuation intensity f at each time point i .
[0108] Load fluctuation prediction model; the fluctuation prediction model is an autoregressive integrated moving average model, which can be used to capture the long-term fluctuation trend of the power grid.
[0109] The time series characteristics are input into the fluctuation prediction model to calculate the fluctuation intensity of the power grid at various time points in the future.
[0110] The fluctuation intensity at each time point can be expressed as:
[0111]
[0112] in, is the fluctuation intensity at the t+kth time point, φ0 is a constant term, φ j and θ l are the parameters of the volatility prediction model, p and q represent the order of the autoregressive term and the moving average term respectively, ∈ t is a random error.
[0113] Then, the fluctuation intensity at multiple time points can form a long-term fluctuation trend curve. T is the prediction time length.
[0114] Step 106: Identify the future fluctuation state of the power grid according to the fluctuation intensity.
[0115] In this embodiment, the fluctuation intensity at multiple time points represents the long-term fluctuation trend of the power grid, which can be used to identify the fluctuation state of the power grid in the future, that is, whether the long-term fluctuation of the power grid is normal or abnormal.
[0116] In a specific implementation, the average value of the fluctuation intensity at each time point is calculated to obtain the average fluctuation value.
[0117] Take the absolute value of the difference between the fluctuation intensity at the current time point and the average fluctuation value to get the absolute fluctuation amplitude.
[0118] The absolute value of the degree to which the fluctuation intensity at the current time point deviates from the fluctuation intensity at the previous time point is taken as the fluctuation change rate.
[0119] If the absolute fluctuation amplitude is greater than a preset first threshold or the fluctuation change rate is greater than a preset second threshold, it is determined that the future fluctuation state of the power grid is abnormal.
[0120] This process can be expressed as:
[0121]
[0122] in, is the fluctuation intensity at the t+kth time point, is the fluctuation intensity at the t+k-1th time point, is the average fluctuation value, δ is the first threshold, γ is the second threshold, Indicates the rate of change of fluctuation.
[0123] Step 107: If the fluctuation state is abnormal, a warning operation is performed on the power grid.
[0124] When the long-term fluctuation state of the power grid is detected to be abnormal, an abnormal identification signal S can be generated. abnormal =1, and trigger the early warning signal module to issue an early warning notification, and the generated early warning signal S abnormal Send to the monitoring system and record the time point t+k of the abnormal period and the corresponding abnormal fluctuation intensity
[0125] When the long-term fluctuation state of the power grid is detected to be normal, a normal identification signal S is generated. abnormal =0, the early warning signal module maintains standby status and continues to monitor the long-term fluctuation trend of the power grid.
[0126] In this embodiment, when a variety of operating data are collected from the power grid at various time points, the operating data are preprocessed; a variational autoencoder is used to extract features from the operating data to obtain target latent variables; singular value decomposition is performed on the target latent variables to obtain the periodic characteristic features of the power grid; a periodic fluctuation feature is constructed based on the periodic feature; the fluctuation intensity of the power grid at various time points in the future is predicted based on the periodic fluctuation feature; the fluctuation state of the power grid in the future is identified based on the fluctuation intensity; if the fluctuation state is abnormal, an early warning operation is performed on the power grid. This embodiment can make full use of the high-dimensional features of the power grid operation data, accurately identify and predict long-period fluctuation trends while removing noise interference, so as to improve the accuracy of the early warning, thereby maintaining the stable operation of the power grid.
[0127] Embodiment 2
[0128] See also Figure 2 , shows a schematic diagram of the structure of a power grid fluctuation warning device provided by Embodiment 2 of the present invention. Figure 2 As shown, the device comprises:
[0129] The preprocessing module 201 is used to preprocess the operation data when collecting various operation data from the power grid at various time points;
[0130] A latent variable extraction module 202 is used to extract features from the operating data using a variational autoencoder to obtain a target latent variable;
[0131] A singular value decomposition module 203 is used to perform singular value decomposition on the target latent variable to obtain periodic characteristic features of the power grid;
[0132] A periodic fluctuation feature construction module 204, configured to construct a periodic fluctuation feature based on the periodic feature;
[0133] The fluctuation intensity prediction module 205 is used to predict the fluctuation intensity of the power grid at various time points in the future according to the periodic fluctuation characteristics;
[0134] A fluctuation state identification module 206, configured to identify the future fluctuation state of the power grid according to the fluctuation intensity;
[0135] The early warning operation execution module 207 is used to execute an early warning operation on the power grid if the fluctuation state is abnormal.
[0136] In one embodiment of the present invention, the preprocessing module 201 is further used for:
[0137] filtering the operation data to remove invalid operation data and retain valid operation data;
[0138] If filtering is completed, the removed running data is filled in by interpolation;
[0139] If the filling is completed, the mean and standard deviation of the operating data are calculated, and the operating range is constructed based on the mean and standard deviation of the operating data;
[0140] If the operating data is outside the operating range, determining that the operating data is abnormal data;
[0141] The operating data adjacent to the abnormal data are merged into new operating data to replace the abnormal data.
[0142] In one embodiment of the present invention, the latent variable extraction module 202 is further used for:
[0143] Loading a variational autoencoder; the variational autoencoder includes an encoder and a decoder;
[0144] In the encoder, the operation data is encoded by probability distribution to obtain original latent variables;
[0145] calculating the mean and standard deviation of the original latent variable using a time-varying distribution constraint;
[0146] Using reparameterization to sample the mean and standard deviation of the original latent variable to obtain a candidate latent variable;
[0147] In the decoder, the candidate latent variables are decoded and reconstructed to obtain target latent variables.
[0148] In one embodiment of the present invention, the latent variable extraction module 202 is further used for:
[0149] Fusion the error of the target latent variable reconstructed from history and the regularization term of the time-varying distribution constraint into a loss value;
[0150] The encoder, the decoder and the time-varying distribution constraint are optimized according to the loss value.
[0151] In one embodiment of the present invention, the singular value decomposition module 203 is further used for:
[0152] constructing the target latent variable as a continuation matrix;
[0153] Performing singular value decomposition on the extension matrix to obtain singular values, left singular vectors and right singular vectors;
[0154] Based on the extension matrix, using the left singular vector and the right singular vector to update the singular value;
[0155] If the update is completed, the singular value, the left singular vector and the right singular vector containing the power grid periodic component are used to generate a periodic feature;
[0156] A trend signature is generated using the singular values, the left singular vectors, and the right singular vectors that include the power grid trend component.
[0157] In one embodiment of the present invention, the periodic fluctuation feature construction module 204 is further used for:
[0158] In the periodic feature, the main frequency of the period is calculated based on the ratio of the singular values; the main frequency is positively correlated with the ratio of the singular values;
[0159] If the main frequency is less than a preset frequency threshold, the singular values, the left singular vectors and the right singular vectors are used to reconstruct periodic fluctuation characteristics.
[0160] In one embodiment of the present invention, the fluctuation intensity prediction module 205 is further used for:
[0161] Extracting time series features from the periodic fluctuation features; the time series features include the fluctuation intensity at each time point;
[0162] Loading a volatility prediction model; the volatility prediction model is an autoregressive integrated moving average model;
[0163] The time series characteristics are input into the fluctuation prediction model to calculate the fluctuation intensity of the power grid at various future time points.
[0164] In one embodiment of the present invention, the fluctuation state identification module 206 is further used for:
[0165] Calculating an average value for each of the fluctuation intensities to obtain an average fluctuation value;
[0166] Taking the absolute value of the difference between the fluctuation intensity at the current time point and the average fluctuation value to obtain the absolute fluctuation amplitude;
[0167] The absolute value of the degree to which the fluctuation intensity at the current time point deviates from the fluctuation intensity at the previous time point is taken as the fluctuation change rate;
[0168] If the absolute fluctuation amplitude is greater than a preset first threshold or the fluctuation change rate is greater than a preset second threshold, it is determined that the future fluctuation state of the power grid is abnormal.
[0169] The power grid fluctuation warning device provided in the embodiment of the present invention can execute the power grid fluctuation warning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the power grid fluctuation warning method.
[0170] Embodiment 3
[0171] See also Figure 3 , showing a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0172] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0173] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0174] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a fluctuation warning method for a power grid.
[0175] In some embodiments, the power grid fluctuation warning method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power grid fluctuation warning method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the power grid fluctuation warning method in any other appropriate manner (for example, by means of firmware).
[0176] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0177] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0178] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0179] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0180] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0181] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0182] Embodiment 4
[0183] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method for early warning of fluctuations in a power grid as provided in any embodiment of the present invention is implemented.
[0184] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0185] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0186] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A power grid fluctuation early warning method, characterized in that: include: When a variety of operation data are collected from the power grid at various time points, preprocessing the operation data; Extract features from the running data using a variational autoencoder to obtain a target latent variable; Performing singular value decomposition on the target latent variable to obtain periodic characteristic features of the power grid; Constructing a periodic fluctuation feature based on the periodic feature; Predicting the fluctuation intensity of the power grid at various time points in the future based on the periodic fluctuation characteristics; identifying a future fluctuation state of the power grid according to the fluctuation intensity; If the fluctuation state is abnormal, an early warning operation is performed on the power grid.
2. The method according to claim 1, characterized in that The preprocessing of the operation data includes: filtering the operation data to remove invalid operation data and retain valid operation data; If filtering is completed, the removed running data is filled in by interpolation; If the filling is completed, the mean and standard deviation of the operating data are calculated, and the operating range is constructed based on the mean and standard deviation of the operating data; If the operating data is outside the operating range, determining that the operating data is abnormal data; The operating data adjacent to the abnormal data are merged into new operating data to replace the abnormal data.
3. The method according to claim 1, characterized in that The use of a variational autoencoder to extract features from the operating data to obtain a target latent variable includes: Loading a variational autoencoder; the variational autoencoder includes an encoder and a decoder; In the encoder, the operation data is encoded by probability distribution to obtain original latent variables; calculating the mean and standard deviation of the original latent variable using a time-varying distribution constraint; Using reparameterization to sample the mean and standard deviation of the original latent variable to obtain a candidate latent variable; In the decoder, the candidate latent variables are decoded and reconstructed to obtain target latent variables.
4. The method according to claim 3, characterized in that The method of extracting features from the operating data using a variational autoencoder to obtain a target latent variable further includes: Fusion the error of the target latent variable reconstructed from history and the regularization term of the time-varying distribution constraint into a loss value; The encoder, the decoder and the time-varying distribution constraint are optimized according to the loss value.
5. The method according to claim 1, characterized in that The step of performing singular value decomposition on the target latent variable to obtain periodic characteristic features of the power grid includes: constructing the target latent variable as a continuation matrix; Performing singular value decomposition on the extension matrix to obtain singular values, left singular vectors and right singular vectors; Based on the extension matrix, using the left singular vector and the right singular vector to update the singular value; If the update is completed, the singular value, the left singular vector and the right singular vector containing the power grid periodic component are used to generate a periodic feature; A trend signature is generated using the singular values, the left singular vectors, and the right singular vectors that include the power grid trend component.
6. The method according to claim 5, characterized in that The step of constructing a periodic fluctuation feature based on the periodic feature includes: In the periodic feature, the main frequency of the period is calculated based on the ratio of the singular values; the main frequency is positively correlated with the ratio of the singular values; If the main frequency is less than a preset frequency threshold, the singular values, the left singular vectors and the right singular vectors are used to reconstruct periodic fluctuation characteristics.
7. The method according to any one of claims 1 to 6, characterized in that The predicting the fluctuation intensity of the power grid at various future time points based on the periodic fluctuation characteristics includes: Extracting time series features from the periodic fluctuation features; the time series features include the fluctuation intensity at each time point; Loading a volatility prediction model; the volatility prediction model is an autoregressive integrated moving average model; The time series characteristics are input into the fluctuation prediction model to calculate the fluctuation intensity of the power grid at various future time points.
8. The method according to claim 7, characterized in that The identifying the future fluctuation state of the power grid according to the fluctuation intensity includes: Calculating an average value for each of the fluctuation intensities to obtain an average fluctuation value; Taking the absolute value of the difference between the fluctuation intensity at the current time point and the average fluctuation value to obtain the absolute fluctuation amplitude; The absolute value of the degree to which the fluctuation intensity at the current time point deviates from the fluctuation intensity at the previous time point is taken as the fluctuation change rate; If the absolute fluctuation amplitude is greater than a preset first threshold or the fluctuation change rate is greater than a preset second threshold, it is determined that the future fluctuation state of the power grid is abnormal.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid fluctuation warning method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for early warning of fluctuations in a power grid according to any one of claims 1 to 8 is implemented.