New energy management anomaly analysis method and device based on deep learning, and medium

By performing abnormal simulation and data balance processing on historical photovoltaic power generation data, and using deep learning models for feature extraction and abnormal detection, the problems of data sample imbalance and insufficient feature extraction in the existing technology are solved, and the accuracy of new energy anomaly analysis is improved.

CN120068950APending Publication Date: 2025-05-30SHENZHEN POLYTECHNIC

Patent Information

Application Number
CN202411736073.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing new energy anomaly analysis technology ignores the balance of data positive and negative example samples and the importance of time-series data feature extraction during data training, resulting in the impact of the accuracy of anomaly analysis.

Method used

By acquiring historical photovoltaic power generation data and environmental data, performing abnormal simulation processing, building a balanced data set, and using an autoencoder and convolutional neural network combined with gate cycle units, an abnormality analysis model is built, feature extraction and abnormality detection are carried out.

Benefits of technology

While ensuring the balance of the positive and negative examples of data, the timing data characteristics are effectively extracted, which improves the accuracy and efficiency of the abnormal analysis model for photovoltaic power generation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068950A_ABST
    Figure CN120068950A_ABST
Patent Text Reader

Abstract

The invention discloses a new energy management anomaly analysis method and device based on deep learning and a medium, and relates to the technical field of new energy anomaly analysis, and the method comprises the following steps: obtaining historical photovoltaic power generation data and first environment data, carrying out the anomaly simulation processing of the historical photovoltaic power generation data, and constructing first photovoltaic data; performing data balance processing on the first photovoltaic data; performing feature extraction processing based on an auto-encoder to obtain environment feature data; constructing an anomaly analysis model based on the convolutional neural network and the gate circulation unit; performing anomaly analysis on the new energy photovoltaic power generation data by using the anomaly analysis model; the method is used for solving the problem that when an existing new energy anomaly analysis technology uses a data training algorithm or model, the importance of balance of positive and negative samples of data and time sequence data feature extraction is neglected, and therefore the accuracy of anomaly analysis of the finally obtained algorithm or model on data is affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of new energy anomaly analysis, and specifically to a new energy management anomaly analysis method, device and medium based on deep learning. Background Technique

[0002] New energy generally refers to renewable energy developed and utilized on the basis of new technologies, including solar energy, biomass energy, wind energy, geothermal energy, etc. Among them, photovoltaic power generation that directly converts solar energy into electrical energy using solar cells is an important part of the new energy field. Now many families sell the excess electrical energy produced by installing photovoltaic panel arrays to the power grid in exchange for benefits. However, some users can tamper with the normal counting of the power generation meter through a series of means to obtain additional benefits for themselves; therefore, it is of great significance to perform anomaly analysis and detection on the data of photovoltaic power generation.

[0003] Existing new energy anomaly analysis technologies usually collect corresponding data, preprocess the data, and then use appropriate anomaly detection algorithms or deep learning models, such as distance-based methods, clustering-based methods, and neural network-based methods; extract the features contained in the data and analyze the data; however, existing anomaly analysis and detection technologies often focus on the optimization of detection algorithms and the innovation of model structures in order to improve the accuracy of analysis, while ignoring the importance of the balance of positive and negative example samples and the extraction of time series data features during algorithm and model training; for example, in the patent application with the publication number CN116089846A, a new energy settlement data anomaly detection and warning method based on data clustering is disclosed. This solution collects settlement data in historical periods, establishes an algorithm to extract data features, and then analyzes and clusters the data, while ignoring the balance of positive and negative example samples in the collected historical period data, resulting in incomplete extraction of data features, and thus affecting the accuracy of anomaly detection; therefore, existing new energy anomaly analysis technologies ignore the importance of the balance of positive and negative example samples and the extraction of time series data features when using data to train algorithms or models, thereby affecting the accuracy of the final obtained algorithm or model for anomaly analysis of data. Summary of the Invention

[0004] The present invention aims to solve at least one of the technical problems in the existing technology to some extent. By obtaining historical photovoltaic power generation data and environmental data, constructing first photovoltaic data; performing data balancing processing on the first photovoltaic data, performing feature extraction processing based on an autoencoder, and constructing an anomaly analysis model based on a convolutional neural network and a gated recurrent unit; using the anomaly analysis model to perform anomaly analysis on the power generation data of new energy photovoltaic; to solve the problem that existing new energy anomaly analysis technologies ignore the importance of the balance of positive and negative example samples and the extraction of time series data features when using data to train algorithms or models, thereby affecting the accuracy of the final obtained algorithm or model for anomaly analysis of data.

[0005] To achieve the above object, in a first aspect, the present application provides a new energy management anomaly analysis method based on deep learning, which includes the following steps:

[0006] Obtain historical photovoltaic power generation data and first environmental data, perform anomaly simulation processing on the historical photovoltaic power generation data, and construct first photovoltaic data;

[0007] Perform data balancing processing on the first photovoltaic data to obtain second anomaly data, second normal data, and second environmental data;

[0008] Based on an autoencoder, perform feature extraction processing on the second environmental data to obtain environmental feature data;

[0009] Based on a convolutional neural network and a gated recurrent unit, use the second anomaly data, second normal data, and environmental feature data to construct an anomaly analysis model;

[0010] Use the anomaly analysis model to perform anomaly analysis on the power generation data of new energy photovoltaic.

[0011] Further, obtaining historical photovoltaic power generation data and first environmental data includes the following sub-steps:

[0012] Obtain historical photovoltaic power generation data: Obtain the power generation of a normally operating photovoltaic device at a first time interval within a first time period, mark it as historical photovoltaic power generation data, and represent the historical photovoltaic power generation data as Mi, where i represents the moment of data acquisition, the first time period is A, and the first time interval is v;

[0013] Obtain first environmental data: The first environmental data includes solar radiation data and environmental temperature data. Obtain the solar radiation intensity at a first time interval within a first time period, mark it as solar radiation data, and obtain the environmental temperature at a first time interval within a first time period, mark it as environmental temperature data. The acquisition moments of the solar radiation data and environmental temperature data correspond to the acquisition moments of the historical photovoltaic power generation data.

[0014] Further, performing anomaly simulation processing on the historical photovoltaic power generation data and constructing first photovoltaic data includes the following sub-steps:

[0015] Perform constant increment anomaly simulation: Calculate the constant increment anomaly value f1(Mi) of the historical photovoltaic power generation data Mi through the constant increment anomaly formula to obtain constant increment anomaly data; the constant increment anomaly formula is as follows f1(Mi) = (1 + α1)Mi, where α1 is a fixed coefficient, and the value range is [0, 1];

[0016] Perform variable-increment anomaly simulation: Calculate the variable-increment anomaly value f2(Mi) of the historical photovoltaic power generation data Mi through the variable-increment anomaly formula to obtain variable-increment anomaly data; the variable-increment anomaly formula is as follows f2(Mi) = (1 + α2)Mi, where α2 is a random value within the range of [0, 1];

[0017] Perform small-increment anomaly simulation: Calculate the small-increment anomaly value f3(Mi) of the historical photovoltaic power generation data Mi through the small-increment anomaly formula to obtain small-increment anomaly data; the small-increment anomaly formula is as follows f3(Mi) = β + Mi, where β is the power generation;

[0018] Perform discontinuous-increment anomaly simulation: Calculate the discontinuous-increment anomaly value f4(Mi) of the historical photovoltaic power generation data Mi through the discontinuous-increment anomaly formula to obtain discontinuous-increment anomaly data; the discontinuous-increment anomaly formula is as follows where β is the power generation, i1 is the time lower limit, and i2 is the time upper limit;

[0019] Mark the constant-increment anomaly data, variable-increment anomaly data, small-increment anomaly data, and discontinuous-increment anomaly data as the first anomaly data;

[0020] Mark the historical photovoltaic power generation data as the first normal data, and mark the first anomaly data, first normal data, and the first environmental data at the corresponding time as the first photovoltaic data.

[0021] Further, perform data balancing processing on the first photovoltaic data to obtain the second photovoltaic data, including the following sub-steps:

[0022] Obtain the data volume Y of the first anomaly data and the data volume Z of the first normal data based on the first photovoltaic data;

[0023] If Y:Z is not equal to 1:1, select the one with the smaller data volume from the first anomaly data and the first normal data and mark it as the unbalanced sample data; denoted as M2i; Combine the unbalanced sample data and the environmental temperature data at the corresponding time in the form of 3 channels into a tensor of size n1*n2*3, denoted as Ph = (M2i, Ii, Ti), and input Ph into the WGAN network for training. After completing the training, obtain the WGAN balance network;

[0024] Sample k noise vectors from the standard uniform distribution, input the k noise vectors into the WGAN balance network to generate k tensors of n1*n2*3, and add the generated k tensors of n1*n2*3 to the corresponding data in the first photovoltaic data to make Y:Z = 1:1; After completion, obtain the second normal data, second anomaly data, and second environmental data.

[0025] Further, the feature extraction process of the second environmental data based on the autoencoder to obtain the environmental feature data includes the following sub-steps:

[0026] Arrange the solar radiation intensity and temperature in the second environmental data into one-dimensional vectors according to the collection time respectively. The one-dimensional vector of the solar radiation intensity is expressed as (I1, I2,..., Iu), and the one-dimensional vector of the temperature is expressed as (T1, T2,..., Tu), where u represents the last u-th data; set the sliding window length as L, and convert the one-dimensional vectors of the solar radiation intensity and the temperature into combined vectors of (u - L) * L by sliding forward one data each time; represent the combined vector of the solar radiation intensity as RI, and represent the combined vector of the temperature as RT;

[0027] Input RI and RT into the autoencoder for training respectively, and mark the trained autoencoder as the feature extractor; input RI and RT into the feature extractor respectively to obtain the feature data HI of RI and the feature data HT of RT, and mark HI and HT as the environmental feature data.

[0028] Further, based on the convolutional neural network and the gated recurrent unit, constructing an anomaly analysis model using the second photovoltaic data and the environmental feature data includes the following sub-steps:

[0029] Establish an initial model: The initial model includes a hybrid learning network and a fully connected layer; the hybrid learning network includes 3 layers of one-dimensional convolutional neural networks and 1 layer of gated recurrent units; the fully connected layer includes 2 layers of fully connected neurons.

[0030] Further, training the initial model using the second photovoltaic data and the environmental feature data to obtain the anomaly analysis model includes the following sub-steps:

[0031] Train the hybrid learning network: Set the parameters of 3 layers of one-dimensional convolutional neural networks and 1 layer of gated recurrent units, and represent the second normal data and the second abnormal data as one-dimensional vectors; input them into the hybrid learning network in batches according to the first time period; use binary cross-entropy as the loss function to train the hybrid learning network;

[0032] Train the fully connected layer: Concatenate the output result of the hybrid learning network and the environmental feature data into a one-dimensional vector, expressed as (M3, HI, HT), where M3 is the output result of the hybrid learning network, and use binary cross-entropy as the loss function to train the fully connected layer;

[0033] Mark the trained hybrid learning network and the fully connected layer as the anomaly analysis model.

[0034] Further, using the anomaly analysis model to perform anomaly analysis on the power generation data of new energy photovoltaic includes the following sub-steps:

[0035] Obtain the power generation data Mi of the new energy photovoltaic device to be detected within a certain period of time, as well as the solar radiation data and environmental temperature data at the corresponding time. Input the solar radiation data and environmental temperature data into the feature extractor for feature extraction to obtain the feature data HI of solar radiation and the feature data HT of environmental temperature. Input Mi, HI, and HT into the anomaly analysis model to obtain the probability P of the power generation data Mi being abnormal, where 0 < P < 1; when P > 0.5, mark that the power generation of the new energy photovoltaic device in this period is abnormal.

[0036] In a second aspect, the present application provides an electronic device, including a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the above method are run.

[0037] In a third aspect, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are run.

[0038] Advantages of the present invention: The present invention first obtains historical photovoltaic power generation data and first environmental data, performs anomaly simulation processing on the historical photovoltaic power generation data to construct first photovoltaic data; then performs data balancing processing on the first photovoltaic data to obtain second abnormal data, second normal data, and second environmental data; then performs feature extraction processing on the second environmental data based on an autoencoder to obtain environmental feature data; then constructs an anomaly analysis model based on a convolutional neural network and a gated recurrent unit using the second abnormal data, second normal data, and environmental feature data; finally, uses the anomaly analysis model to perform anomaly analysis on the power generation data of new energy photovoltaics; while ensuring the balance of positive and negative example samples of the data, feature extraction is performed on the time series data, ensuring the accuracy of the finally obtained anomaly analysis model for performing anomaly analysis on photovoltaic power generation data;

[0039] The present invention simulates abnormal photovoltaic power generation data through anomaly simulation processing. Since a large amount of data is required for model training, it takes a long time to obtain a sufficient amount of data only by device collection, and the collected data cannot accurately distinguish whether it is abnormal. Through anomaly simulation, a sufficient amount of data can be obtained in a short time, ensuring the efficiency of anomaly analysis and enabling the model to be repeatedly trained; performs data balancing processing on the first photovoltaic data; the quality of the data will directly affect the accuracy of the model; a high-quality data set requires that the proportions of various types of data be as balanced as possible; the data sets actually collected are often imbalanced; and data balancing processing is performed to reduce the adverse impact of the imbalanced data set on the analysis result and further improve the accuracy of the model; performs feature extraction processing on the environmental data because photovoltaic power generation is greatly affected by weather conditions, and combining the features of the environmental data can further improve the accuracy of the model. Description of the Drawings

[0040] Figure 1 is the step flowchart of the method of the present invention;

[0041] Figure 2 is the schematic diagram of the combined vector of the solar radiation intensity of the present invention;

[0042] Figure 3 is the structural diagram of the autoencoder of the present invention;

[0043] Figure 4 is the schematic structural diagram of the initial model of the present invention;

[0044] Figure 5 is the schematic structural diagram of the electronic device of the present invention. Specific embodiments

[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0046] Embodiment 1, please refer to Figure 1 As shown, the present application provides a new energy management anomaly analysis method based on deep learning, including the following steps:

[0047] Step S1, obtain historical photovoltaic power generation data and first environmental data, perform anomaly simulation processing on the historical photovoltaic power generation data, and construct first photovoltaic data; Step S1 includes the following sub-steps:

[0048] Step S101, obtain historical photovoltaic power generation data: obtain the power generation of a normally operating photovoltaic device at a first time interval within a first time period, and mark it as historical photovoltaic power generation data; Step S102, represent the historical photovoltaic power generation data as Mi, where i represents the moment of data acquisition, the first time period is, and the first time interval is v; In this embodiment, the first time period A is 7 days, that is, 168 hours, and the first time interval v is 1 hour;

[0049] Step S103, obtain first environmental data: The first environmental data includes solar radiation data and environmental temperature data. Obtain the solar radiation intensity at a first time interval within a first time period, and mark it as solar radiation data; The solar radiation intensity is a physical quantity describing the strength of solar radiation, referring to the solar radiation energy received per unit area perpendicular to the direction of the sun's rays per unit time, usually in watts per square meter (W / m 2)in units; during a day, the solar altitude angle is the largest and the solar radiation intensity is the strongest at noon; it is weaker in the morning and evening; and there is none at night, so the photovoltaic equipment cannot generate electricity at night;

[0050] Step S104, obtain the ambient temperature at the first time interval within the first time period, and mark it as ambient temperature data. The acquisition moments of the solar radiation data and the ambient temperature data correspond to the acquisition moment of the historical photovoltaic power generation data. In this embodiment, the unit of the ambient temperature is degree Celsius (°C);

[0051] In the specific implementation process, the power generation amount obtained at the first time interval refers to the total power generation amount within the time interval from the previous sampling moment to the current sampling moment. Obtaining the solar radiation intensity and the ambient temperature at the first time interval refers to the average radiation intensity and the average temperature within the time interval from the previous sampling moment to the current sampling moment. For example, if the first time interval v is 1 hour and the collection starts at 0 o'clock, then the power generation amount obtained at 8 o'clock refers to the total power generation amount within the one-hour period from 7 o'clock to 8 o'clock; the radiation intensity obtained at 8 o'clock refers to the average radiation intensity within the one-hour period from 7 o'clock to 8 o'clock, and the ambient temperature obtained at 8 o'clock refers to the average air temperature within the one-hour period from 7 o'clock to 8 o'clock.

[0052] Step S105, perform abnormal simulation processing on the historical photovoltaic power generation data to construct the first photovoltaic data. Step S105 includes the following sub-steps:

[0053] Step S1051, perform constant increment abnormal simulation: calculate the constant increment abnormal value f1(Mi) of the historical photovoltaic power generation data Mi through the constant increment abnormal formula to obtain the constant increment abnormal data. The constant increment abnormal formula is as follows: f1(Mi) = (1 + α1)Mi, where α1 is a fixed coefficient, and the value range is [0, 1]. The constant increment abnormal simulation is that bad users report a value higher than the true power generation amount by a fixed proportional coefficient at the sampling moment. Among them, α is the coefficient controlling the amplification ratio. In the real environment, in order to balance the bad income and the risk of being detected by the system, the value of α will not be too large. Therefore, in this embodiment, α takes 1.1, 1.2, 1.32, and 1.5, and Mi is evenly divided into 4 parts, and the constant increment abnormal simulation is performed respectively when α takes 1.1, 1.2, 1.32, and 1.5;

[0054] Step S1052, perform variable-increment anomaly simulation: Calculate the variable-increment anomaly value f2(Mi) for the historical photovoltaic power generation data Mi through the variable-increment anomaly formula to obtain variable-increment anomaly data; the variable-increment anomaly formula is as follows: f2(Mi) = (1 + α2)Mi, where α2 is a random value within the range [0, 1]; the variable-increment anomaly simulates that a bad user reports a value higher than the dynamic proportional coefficient of the true power generation at each sampling moment, where α2 can be a random variable subject to a certain distribution. In this embodiment, α2 is set as a random value within [0, 1] that follows the standard normal distribution and the standard uniform distribution. Divide Mi into two equal parts and perform variable-increment anomaly simulation when α2 follows the standard normal distribution and the standard uniform distribution.

[0055] Step S1053, perform small-increment anomaly simulation: Calculate the small-increment anomaly value f3(Mi) for the historical photovoltaic power generation data Mi through the small-increment anomaly formula to obtain small-increment anomaly data; the small-increment anomaly formula is as follows: f3(Mi) = β + Mi, where β is the power generation; the small-increment anomaly simulates that a bad user reports the power generation at each moment equal to the sum of the true power generation and the minimum increment β. β can be a fixed value or a certain specific value multiplied by a fixed proportional coefficient; in this embodiment, β is set as 0.2 times the highest power generation per hour of the previous day. For example, if the highest power generation of the previous day is from 13:00 to 14:00 and the power generation is 3 kwh, then today's β is 0.2 * 3 = 0.6 kwh.

[0056] Step S1054, perform discontinuous-increment anomaly simulation: Calculate the discontinuous-increment anomaly value f4(Mi) for the historical photovoltaic power generation data Mi through the discontinuous-increment anomaly formula to obtain discontinuous-increment anomaly data; the discontinuous-increment anomaly formula is as follows where β is the power generation, i1 is the time lower limit, and i2 is the time upper limit; the discontinuous-increment anomaly simulates that a bad user reports the power generation equal to the sum of the true power generation and the minimum increment β within a fixed time period. For example, in this embodiment, i1 is set as 10:00 and i2 is set as 14:00, that is, the power generation reported by the bad user from 10:00 to 14:00 every day is abnormal data, and the power generation reported in other time periods is normal data.

[0057] Step S1055, mark the constant-increment anomaly data, variable-increment anomaly data, small-increment anomaly data, and discontinuous-increment anomaly data as first anomaly data.

[0058] Step S1056, mark the historical photovoltaic power generation data as first normal data, and mark the first anomaly data, first normal data, and the corresponding first environmental data at the corresponding moments as first photovoltaic data.

[0059] In the specific implementation process, the performance of the deep learning model depends to a large extent on the quality of the dataset; the quality of the dataset directly affects the learning effect of the deep learning model; high-quality data can provide rich and diverse samples and accurate labels, helping the algorithm better understand the essence of the problem, thereby improving the accuracy of the model; the diversity of the dataset is crucial for the generalization ability of the model; diverse data can make the model perform better on unseen data and avoid overfitting; a dataset containing various scenarios and conditions can make the model more robust and adaptable to different actual application environments; however, in the real environment, the amount of abnormal data in photovoltaic power generation is much smaller than the amount of normal data because there is an obvious difference in the ratio of the number of bad users to honest users, and there will not be a large number of bad users tampering with the power generation in reality; so relying solely on the operation of photovoltaic equipment to obtain abnormal data cannot meet the needs of model training, so it is only possible to simulate the real new energy power generation environment and rely on the algorithm model to maliciously tamper with the power generation to generate abnormal data.

[0060] Step S2: Perform data balancing processing on the first photovoltaic data to obtain second abnormal data, second normal data, and second environmental data; Step S2 includes the following sub-steps:

[0061] Step S201: Obtain the data volume Y of the first abnormal data and the data volume Z of the first normal data based on the first photovoltaic data.

[0062] Step S202: If Y:Z is not equal to 1:1, select the data with the smaller data volume from the first abnormal data and the first normal data and mark it as unbalanced sample data; denoted as M2i; because abnormal simulation processing has been performed before and after four abnormal simulations, normally, the data volume Y of the first abnormal data is greater than the data volume Z of the first normal data.

[0063] Step S203: Combine the unbalanced sample data with the environmental temperature data at the corresponding moment in the form of 3 channels into a tensor of size n1*n2*3. In this embodiment, n1 is 7 and n2 is 24, that is, the power generation data, solar radiation intensity data, and environmental temperature data for 7 days, and the first time interval for obtaining data every day is 1 hour; a tensor is a mathematical object that can represent a multi-dimensional array. In the simplest form, a scalar (0th-order tensor) is a single value with only magnitude and no direction, a vector, i.e., a 1st-order tensor, is a one-dimensional array, a matrix, i.e., a 2nd-order tensor, is a two-dimensional array, and an n1*n2*3 tensor is composed of 3 two-dimensional arrays of n1*n2; denoted as Ph = (M2i, Ii, Ti), and input Ph into the WGAN network for training. After the training is completed, a WGAN balanced network is obtained.

[0064] Step S204: Sample k noise vectors from a standard uniform distribution, input the k noise vectors into the WGAN equilibrium network to generate k tensors of n1*n2*3, and add the generated k tensors of n1*n2*3 to the corresponding data in the first photovoltaic data so that Y:Z = 1:1; after completion, obtain the second normal data, the second abnormal data, and the second environmental data;

[0065] In the specific implementation process, because abnormal simulation processing has been carried out before and four types of abnormal simulations have been performed, under normal circumstances, the data volume Y of the first abnormal data is greater than the data volume Z of the first normal data; the WGAN mainly consists of a generator and a discriminator. Ph=(M2i, Ii, Ti) represents the sequence of input real data, and the input sequence contains 3-channel information, which is composed of power generation, solar radiation intensity, and environmental temperature respectively. The input sequence follows a certain unknown distribution; the noise vector input into the generator follows a certain continuous distribution, which is known and generally a uniform distribution or a Gaussian distribution. The task of the WGAN is to transform the noise vector sampled from the known distribution into Ph so that the generator can learn the distribution of the real data.

[0066] Step S3: Perform feature extraction processing on the second environmental data based on the autoencoder to obtain environmental feature data; Step S3 includes the following sub-steps:

[0067] Step S301: Arrange the solar radiation intensity and temperature in the second environmental data into one-dimensional vectors according to the collection time respectively. The one-dimensional vector of the solar radiation intensity is represented as (I1, I2,..., Iu), and the one-dimensional vector of the temperature is represented as (T1, T2,..., Tu), where u represents the last u-th data;

[0068] Step S302: Please refer to Figure 2 as shown; set the sliding window length to L. In this embodiment, the length L is 24; convert the one-dimensional vectors of the solar radiation intensity and the temperature into combined vectors of (u-L)*L by sliding forward one data each time; in this way, the data volume for training the autoencoder is increased and it is easier for the autoencoder to reconstruct; represent the combined vector of the solar radiation intensity as RI and the combined vector of the temperature as RT;

[0069] Step S303: Input RI and RT into the autoencoder for training respectively, and mark the trained autoencoder as the feature extractor;

[0070] Step S304: Input RI and RT into the feature extractor respectively to obtain the feature data HI of RI and the feature data HT of RT, and mark HI and HT as environmental feature data;

[0071] In the specific implementation process, please refer toFigure 3 As shown in the figure, the autoencoder mainly consists of two parts: an encoder and a decoder. The encoder is mainly responsible for encoding and dimensionality reduction of the input high-dimensional features. After the features R of the original input enter the encoder network, they pass through fully connected neurons with gradually decreasing layers and finally output the low-dimensional hidden code H, completing the mapping relationship of R→H. The decoder is mainly responsible for re-decoding the hidden code H obtained by the encoder. The hidden code retains the effective features of the original input. After passing through the fully connected neurons with gradually increasing layers inside, it is finally decoded into R' with the same dimension as R, realizing the reconstruction of the original input data, and the mapping relationship is H→R'.

[0072] Step S4: Based on the convolutional neural network and the gated recurrent unit, an anomaly analysis model is constructed using the second abnormal data, the second normal data, and the environmental feature data. Step S4 includes the following sub-steps:

[0073] Step S401: Refer to Figure 4 As shown in the figure, an initial model is established. The initial model includes a hybrid learning network and a fully connected layer. The hybrid learning network includes 3 layers of one-dimensional convolutional neural networks and 1 layer of gated recurrent units. The fully connected layer includes 2 layers of fully connected neurons. The one-dimensional convolutional neural network slides the convolutional kernel directionally on the input data at a specific step size, and performs a convolutional operation each time it slides until the end of the input data. The gated recurrent unit is a special recurrent neural network, which is developed on the basis of the long short-term memory network. Its neuron structure is similar to that of the long short-term memory network and has a reset gate and an update gate, and is good at capturing some periodic time series features.

[0074] Step S402: Train the hybrid learning network. Refer to Table 1 shown below. Set the parameters of the 3 layers of one-dimensional convolutional neural networks and 1 layer of gated recurrent units, and represent the second normal data and the second abnormal data as 1-dimensional vectors. Input them into the hybrid learning network in batches according to the first time period. For example, in this embodiment, the first time period is 7 days, that is, the second normal data and the second abnormal data for 7 days are input into the hybrid learning network as a batch. Use binary cross-entropy as the loss function to train the hybrid learning network. The binary cross-entropy formula is as follows: where J represents binary cross-entropy; M i represents the second normal data and the second abnormal data input into the hybrid learning network, that is, the power generation; h t represents the output of the hybrid learning network at that moment.

[0075] Table 1 Hybrid learning network parameter setting table

[0076] Network layer type Number of neurons Activation function Input 24 Linear Conv1D 64 Relu Conv1D 32 Relu Conv1D 32 Relu GRU 32 Relu Output 1 Sigmoid

[0077] Step S403, training the fully connected layer: Concatenate the output result of the convolutional hybrid learning network and the environmental feature data into a one-dimensional vector, denoted as (M3, HI, HT), where M3 is the output result of the hybrid learning network. Use binary cross-entropy as the loss function to train the fully connected layer;

[0078] Step S404, mark the hybrid learning network and the fully connected layer that have completed training as the anomaly analysis model;

[0079] In the specific implementation process, when training the hybrid learning network and the fully connected layer, the error loss generated needs to be backpropagated through the loss function, and at the same time, the gradient of the network weight matrix is calculated to update the network parameters until the network finally converges to the optimal parameters to complete the training. New energy photovoltaic power generation has obvious intermittency and instability; it is vulnerable to external lighting and temperature conditions, etc., which makes the power generation volume prone to fluctuations; this kind of instability often causes misjudgment of traditional anomaly detection systems. Therefore, it is necessary to further combine the correlation between power generation data and relevant environmental data, and then reduce the false alarms of anomaly detection to improve the accuracy. Therefore, the powerful spatial feature learning ability of the convolutional neural network and the excellent time feature learning ability of the gated recurrent unit can be used for data anomaly analysis.

[0080] Step S5, use the anomaly analysis model to perform anomaly analysis on the power generation data of new energy photovoltaic; Step S5 includes the following sub-steps:

[0081] Step S501, obtain the power generation data Mi of the new energy photovoltaic device to be detected in a certain time period, as well as the solar radiation data and environmental temperature data corresponding to the time;

[0082] Step S502, input the solar radiation data and environmental temperature data into the feature extractor for feature extraction to obtain the feature data HI of solar radiation and the feature data HT of environmental temperature

[0083] Step S503, input Mi, HI, and HT into the anomaly analysis model to obtain the probability P that the power generation data Mi is abnormal, 0 < P < 1;

[0084] Step S504, when P > 0.5, mark that the power generation of the new energy photovoltaic device in this time period is abnormal; for example, output P = 0.6, which is greater than 0.5, then mark that the power generation of the new energy photovoltaic device in this time period is abnormal;

[0085] In the specific implementation process, the threshold for judging abnormal power generation can be set according to the actual situation. In this embodiment, it is 0.5. Multiple thresholds of different sizes can also be set to classify the abnormal power generation situation. For example, three-level thresholds are set as 0.4, 0.6, and 0.8. When the output probability P of the anomaly analysis model is less than or equal to 0.4, it is judged that the power generation data is normal. When 0.4 < P ≤ 0.6, it is judged that the power generation data is slightly abnormal. When 0.6 < P ≤ 0.8, it is judged that the power generation data is moderately abnormal. When 0.8 < P, it is judged that the power generation data is highly abnormal. The computer device can automatically judge the output probability P and generate relevant information according to the judgment result.

[0086] Embodiment 2. Please refer to Figure 5 as shown in Figure 5 which illustrates a schematic structural diagram of an electronic device. The electronic device may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory stores computer-readable instructions. The processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in a new energy management anomaly analysis method based on deep learning are run to achieve the following functions: obtaining historical photovoltaic power generation data and first environmental data, performing anomaly simulation processing on the historical photovoltaic power generation data to construct first photovoltaic data; performing data balancing processing on the first photovoltaic data to obtain second abnormal data, second normal data, and second environmental data; performing feature extraction processing on the second environmental data based on an autoencoder to obtain environmental feature data; constructing an anomaly analysis model based on a convolutional neural network and a gated recurrent unit using the second abnormal data, the second normal data, and the environmental feature data; and performing anomaly analysis on the power generation data of the new energy photovoltaic using the anomaly analysis model.

[0087] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0088] Embodiment 3. The present application further provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned new energy management anomaly analysis method based on deep learning are run to implement the following functions: obtaining historical photovoltaic power generation data and first environmental data, performing anomaly simulation processing on the historical photovoltaic power generation data to construct first photovoltaic data; performing data balancing processing on the first photovoltaic data to obtain second anomaly data, second normal data, and second environmental data; performing feature extraction processing on the second environmental data based on an autoencoder to obtain environmental feature data; constructing an anomaly analysis model based on a convolutional neural network and a gated recurrent unit using the second anomaly data, second normal data, and environmental feature data; and performing anomaly analysis on the power generation data of the new energy photovoltaic using the anomaly analysis model.

[0089] Through the description of the above embodiments, the embodiments of the present invention can be provided as a method, a system, or a computer program product. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0090] In the embodiments provided by the present application, it should be understood that the disclosed system or method can be implemented in other ways. The above-described embodiments are merely illustrative. For example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some communication interfaces. The indirect coupling or communication connection of systems, modules, and units can be electrical, mechanical, or other forms.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A new energy management anomaly analysis method based on deep learning, characterized in that: The steps include: Acquire historical photovoltaic power generation data and first environmental data, perform abnormal simulation processing on the historical photovoltaic power generation data, and construct first photovoltaic data; Performing data balancing processing on the first photovoltaic data to obtain second abnormal data, second normal data and second environmental data; Performing feature extraction processing on the second environment data based on the autoencoder to obtain environment feature data; Based on a convolutional neural network and a gated recurrent unit, an abnormality analysis model is constructed using the second abnormal data, the second normal data and the environmental feature data; The anomaly analysis model is used to conduct an anomaly analysis on the power generation data of new energy photovoltaics.

2. According to claim 1, a new energy management anomaly analysis method based on deep learning is characterized in that: Acquiring historical photovoltaic power generation data and first environmental data includes the following sub-steps: Obtaining historical photovoltaic power generation data: obtaining power generation of photovoltaic equipment in normal operation at a first time interval within a first time period, marking the data as historical photovoltaic power generation data, and representing the historical photovoltaic power generation data as Mi, where i represents the time when the data is obtained, the first time period is A, and the first time interval is v; Obtain first environmental data: The first environmental data includes solar radiation data and ambient temperature data. The solar radiation intensity is obtained at a first time interval within a first time period and marked as solar radiation data. The ambient temperature is obtained at a first time interval within the first time period and marked as ambient temperature data. The time when the solar radiation data and the ambient temperature data are obtained corresponds to the time when the historical photovoltaic power generation data is obtained.

3. The new energy management anomaly analysis method based on deep learning according to claim 2 is characterized in that: Performing abnormal simulation processing on historical photovoltaic power generation data and constructing the first photovoltaic data includes the following sub-steps: Perform constant increment anomaly simulation: calculate the constant increment anomaly value f1(Mi) through the constant increment anomaly formula of the historical photovoltaic power generation data Mi to obtain the constant increment anomaly data; the constant increment anomaly formula is as follows f1(Mi) = (1+α1)Mi, where α1 is a fixed coefficient with a value range of [0, 1]; Perform variable increment anomaly simulation: calculate the variable increment anomaly value f2(Mi) through the variable increment anomaly formula of the historical photovoltaic power generation data Mi to obtain the variable increment anomaly data; the variable increment anomaly formula is as follows f2(Mi) = (1 + α2)Mi, where α2 is a random value in the range of [0, 1]; Perform small increment anomaly simulation: calculate the small increment anomaly value f3(Mi) using the small increment anomaly formula for the historical photovoltaic power generation data Mi to obtain the small increment anomaly data; the small increment anomaly formula is as follows f3(Mi) = β + Mi, where β is the power generation; Simulate intermittent increment anomaly: Calculate the intermittent increment anomaly value f4(Mi) using the intermittent increment anomaly formula for the historical photovoltaic power generation data Mi to obtain the intermittent increment anomaly data; the intermittent increment anomaly formula is as follows Where β is the power generation, i1 is the lower limit of time, and i2 is the upper limit of time; Marking the constant increment abnormal data, the variable increment abnormal data, the small increment abnormal data and the discontinuous increment abnormal data as the first abnormal data; The historical photovoltaic power generation data is marked as first normal data, and the first abnormal data, the first normal data, and the first environmental data at the corresponding moment are marked as first photovoltaic data.

4. The new energy management anomaly analysis method based on deep learning according to claim 3 is characterized in that: Performing data balancing processing on the first photovoltaic data to obtain the second photovoltaic data includes the following sub-steps: Acquire a data volume Y of first abnormal data and a data volume Z of first normal data based on the first photovoltaic data; If Y:Z is not equal to 1:1, select the data with less amount from the first abnormal data and the first normal data and mark it as unbalanced sample data; denoted as M2i; combine the unbalanced sample data and the ambient temperature data at the corresponding time in the form of 3 channels into a tensor of size n1*n2*3, denoted as Ph=(M2i, Ii, Ti), input Ph into the WGAN network for training, and obtain the WGAN balanced network after the training is completed; K noise vectors are obtained by sampling from the standard uniform distribution, and the k noise vectors are input into the WGAN balancing network to generate k n1*n2*3 tensors. The generated k n1*n2*3 tensors are added to the corresponding data in the first photovoltaic data so that Y:Z=1:1; after completion, the second normal data, the second abnormal data and the second environmental data are obtained.

5. The new energy management anomaly analysis method based on deep learning according to claim 4 is characterized in that: Performing feature extraction processing on the second environment data based on the autoencoder to obtain environment feature data includes the following sub-steps: The solar radiation intensity and temperature in the second environment data are arranged into one-dimensional vectors according to the collection time, the one-dimensional vector of solar radiation intensity is represented as (I1, I2, ..., Iu), and the one-dimensional vector of temperature is represented as (T1, T2, ..., Tu), where u represents the last u-th data; the sliding window length is set to L, and the one-dimensional vector of solar radiation intensity and the one-dimensional vector of temperature are converted into a combination vector of (uL)*L by sliding forward one data each time; the combination vector of solar radiation intensity is represented as RI, and the combination vector of temperature is represented as RT; RI and RT are respectively input into the autoencoder for training, and the trained autoencoder is marked as a feature extractor; RI and RT are respectively input into the feature extractor to obtain feature data HI of RI and feature data HT of RT, and HI and HT are marked as environmental feature data.

6. The new energy management anomaly analysis method based on deep learning according to claim 5 is characterized in that: Based on the convolutional neural network and the gate recurrent unit, the abnormal analysis model is constructed using the second photovoltaic data and the environmental characteristic data, including the following sub-steps: Establish the initial model: The initial model includes a hybrid learning network and a fully connected layer; the hybrid learning network includes 3 layers of one-dimensional convolutional neural networks and 1 layer of gated recurrent units; the fully connected layer includes 2 layers of fully connected neurons.

7. The new energy management anomaly analysis method based on deep learning according to claim 6 is characterized in that: Using the second photovoltaic data and environmental characteristic data to train the initial model to obtain the abnormal analysis model includes the following sub-steps: Training the hybrid learning network: setting the parameters of a 3-layer one-dimensional convolutional neural network and a 1-layer gated recurrent unit, representing the second normal data and the second abnormal data as a 1-dimensional vector; inputting the hybrid learning network in batches according to the first time period; using the binary cross entropy as the loss function to train the hybrid learning network; Training the fully connected layer: concatenate the output of the volume hybrid learning network and the environmental feature data into a 1-dimensional vector, expressed as (M3, HI, HT), where M3 is the output of the hybrid learning network. Use the binary cross entropy as the loss function to train the fully connected layer. The trained hybrid learning network and the fully connected layer are marked as anomaly analysis models.

8. The new energy management anomaly analysis method based on deep learning according to claim 7 is characterized in that: The use of anomaly analysis models to analyze the power generation data of new energy photovoltaics includes the following sub-steps: Obtain the power generation data Mi of the new energy photovoltaic device to be detected in a certain period of time, as well as the solar radiation data and ambient temperature data corresponding to the time. Input the solar radiation data and ambient temperature data into the feature extractor for feature extraction to obtain the feature data HI of solar radiation and the feature data HT of ambient temperature. Input Mi, HI, and HT into the anomaly analysis model to obtain the probability P of the power generation data Mi being abnormal, where 0 < P < 1; when P > 0.5, mark that the power generation of the new energy photovoltaic device in this period is abnormal.

9. An electronic device, characterized in that: It includes a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1-8 are run.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps in the method according to any one of claims 1-8 are run.

Citation Information

Patent Citations

  • New energy settlement data anomaly detection and early warning method based on data clustering

    CN116089846A

  • Photovoltaic power generation power short-term prediction method and system based on improved LOF

    CN117458480A

  • Anomaly-Transform photovoltaic power generation anomaly detection method

    CN117972419A

Cited By

  • Photovoltaic power utilization simulation and detection system, method and equipment and storage medium

    CN121887123A

  • Photovoltaic power consumption simulation and testing systems, methods, equipment and storage media

    CN121887123B