RTU data reconstruction method and device based on generative adversarial network and medium

Through generative adversarial network and wavelet transformation technology, the problem of missing high-frequency details in power grid data reconstruction is solved, efficient data upscaling and improvement of accuracy is achieved, and the problem of low data accuracy in the existing technology is solved.

CN119295765APending Publication Date: 2025-01-10CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411416400.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing technology lacks high-frequency details in power grid data reconstruction. Interpolation methods lead to loss of high-frequency information, high calculation cost of modeling methods, and deep learning optimization process affects the degree of detail restoration, resulting in low accuracy of electrical reconstruction data.

Method used

Using the RTU data reconstruction method based on a generative adversarial network, the power grid data is encoded and up-frequency reconstruction through the generator model and discriminator model, the data storage space is reduced by binary images, key features are extracted, and the system can be transformed and details are used. Enhanced wavelet residual network to restore high-frequency details.

Benefits of technology

Without increasing the computing burden, the resolution and accuracy of power grid data are significantly improved, the key information of the data is retained, the high-frequency details are restored, and the data visualization and analysis capabilities are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295765A_ABST
    Figure CN119295765A_ABST
Patent Text Reader

Abstract

The invention discloses an RTU data reconstruction method and device based on a generative adversarial network, and a medium. The method comprises the following steps: obtaining power grid data from a power grid monitoring point; encoding the power grid data into a channel and an image matrix of the binary image according to the parameter type to obtain an RTU electrical image; performing frequency raising reconstruction processing on the RTU electrical image by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established according to the generator model and the discriminator model. According to the RTU data reconstruction method and device based on the generative adversarial network and the medium, data compression is achieved by encoding power grid data into a binary image, meanwhile, key information of the data is reserved, high-frequency details in the power grid data can be remarkably improved by optimizing frequency-raising reconstruction processing of a data reconstruction model, and the data reconstruction efficiency is improved. The problem that electrical reconstruction data lacks high-frequency details can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system dispatching automation, and in particular to an RTU data reconstruction method, device and medium based on a generative adversarial network. Background Art

[0002] In order to cope with the security and stability challenges faced by the power grid, WAMS based on the Global Position System (GPS) has been gradually established. Its high-precision measurement data is widely used in damping control, temporary stability and voltage stability analysis, decoupling control, etc. At present, the remote terminal unit (RTU) is mainly used to collect and analyze various types of power grid data for quantitative analysis. The system transmits the obtained data through a remote transmission device, but the errors of the transmission device and the errors generated in each link during the transmission process make the real-time accuracy of the voltage phase angle poor, resulting in low accuracy. The existing technology is mainly based on interpolation, modeling and deep learning, and uses image super-resolution reconstruction methods to up-construct power grid data.

[0003] However, in the process of image enlargement, the high-frequency information in the original low-resolution image has been lost by the interpolation method, and the interpolation method cannot restore this information out of thin air, resulting in low restoration of high-frequency details. In order to improve the restoration of high-frequency details, modeling methods often require higher computing costs and more complex algorithms, which may be limited by hardware resources in practical applications. Moreover, the optimization process of deep learning may also affect the restoration of high-frequency details, so the current electrical reconstruction data lacks high-frequency details. Summary of the invention

[0004] The present invention provides an RTU data reconstruction method, device and medium based on a generative adversarial network to solve the problem that electrical reconstruction data lacks high-frequency details.

[0005] Obtaining grid data from grid monitoring points;

[0006] Encoding the power grid data into channels and image matrices of a binary image according to parameter types to obtain an RTU electrical image;

[0007] The RTU electrical image is up-converted and reconstructed by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

[0008] In the present invention, since binary images only contain two pixel values, 0 and 1, encoding power grid data into the channels and matrices of binary images can greatly reduce data storage space; and binary images are simple and convenient for various image processing and analysis operations, which helps to extract key features of power grid data and facilitate subsequent data processing and analysis. By optimizing the data reconstruction model to perform frequency upscaling and reconstruction processing on RTU electrical images, the resolution and accuracy of the data can be improved without increasing too much computational burden. The optimized data reconstruction model is established based on the generator model and the discriminator model, which means that the model can adapt to different data characteristics and task requirements through continuous learning and optimization. The generator model can generate electrical images with richer high-frequency details by extracting and reconstructing features of the input electrical images; the discriminator model can distinguish the true and false electrical images generated by the generator model, and calculate the differences between them and the real electrical images. These feedback information will be used to optimize the parameters and structure of the generator model to improve the accuracy of the generated data and the richness of high-frequency details. Through adversarial training between the generator model and the discriminator model, the two can promote and optimize each other, thereby ensuring that the optimized data reconstruction model shows better performance and effects in practical applications.

[0009] Compared with the prior art, the present invention encodes the power grid data into a binary image, achieves data compression, and retains the key information of the data. Moreover, by optimizing the upscaling reconstruction processing of the data reconstruction model, it can significantly enhance the high-frequency details in the power grid data, thereby solving the problem of lack of high-frequency details in electrical reconstruction data.

[0010] As a preferred solution, the power grid data is encoded into the channel and image matrix of the binary image according to the parameter type to obtain the RTU electrical image, specifically:

[0011] Setting a sliding window on the PMU data in the power grid data;

[0012] By controlling the sliding window to slide, the PMU data sequence in the sliding window is mapped to the RTU data point corresponding to the same time period in the power grid data to obtain associated data;

[0013] constructing a high-resolution binary image based on the low-resolution binary image in the associated data to obtain processed first power grid data;

[0014] According to the electrical parameter type, the first power grid data is encoded into a channel or an image matrix of a binary image to obtain the RTU electrical image.

[0015] This preferred solution can ensure the accurate correspondence between PMU data and RTU data in the same time period by setting a sliding window and sliding in the window, thereby improving the synchronization and correlation between the data. Since high-resolution data has higher precision and accuracy in visualization, feature extraction and pattern recognition, processing low-resolution power grid data by constructing a high-resolution binary image can significantly improve the resolution of the data and help to more deeply understand the operating status of the electrical system. Encoding power grid data into the channels and image matrices of binary images not only achieves data compression and storage optimization, but also facilitates subsequent data processing and analysis.

[0016] As a preferred solution, a high-resolution binary image is constructed based on the low-resolution binary image in the associated data to obtain the processed first power grid data, specifically:

[0017] Setting the values ​​of a plurality of pixel values ​​in the associated data, and converting the plurality of pixel values ​​into a plurality of components of an image according to the set values ​​to obtain a complete binary image;

[0018] Based on the pixel values ​​of the low-resolution binary image in the binary image, the low-resolution binary image is converted into a high-resolution binary image by interpolation to obtain the processed first power grid data.

[0019] In this preferred embodiment, since binary images only contain black and white colors, they can clearly show the boundaries, shapes and distribution characteristics of data. Therefore, converting power grid data into binary images can present the data in a more intuitive and easier to understand form.

[0020] As a preferred solution, according to the electrical parameter type, the first power grid data is encoded into a channel or image matrix of a binary image to obtain the RTU electrical image, specifically:

[0021] If the electrical parameter type of the first power grid data is a single channel, the RTU data corresponding to the low-resolution binary image in the first power grid data is encoded in time sequence to the black part of the preset channel, and the PMU data corresponding to the high-resolution binary image in the first power grid data is encoded to the black part of the preset channel after rearrangement, so as to obtain the RTU electrical image;

[0022] If the electrical parameter type of the first power grid data is multi-channel, the first power grid data is encoded into image matrices of different channels to obtain the RTU electrical image.

[0023] This preferred solution encodes the first power grid data according to the electrical parameter type, which can achieve optimized storage and transmission of data; each channel only stores data related to the channel, reducing unnecessary redundancy and repetition, thereby saving storage space and improving transmission efficiency. In addition, each channel in the image matrix can be represented in different ways, which makes the visualization of the data richer and more intuitive.

[0024] As a preferred solution, the RTU electrical image is up-constructed by optimizing the data reconstruction model to obtain reconstructed RTU data, specifically:

[0025] Based on the generator model, the PMU data image in the RTU electrical image is decomposed into a low-frequency sub-image and a high-frequency sub-image by means of a stationary wavelet transform;

[0026] Training and detail reconstruction of the low-frequency sub-image and the high-frequency sub-image to obtain low-frequency information and high-frequency information under different weights;

[0027] The low-frequency information and the high-frequency information are adjusted and trained according to the loss function of the generator model to obtain the reconstructed RTU data.

[0028] In this preferred embodiment, the wavelet transform provides multi-scale analysis capabilities. The data is processed by means of a stationary wavelet transform. The resulting low-frequency sub-image reflects the overall structure and general outline of the image, while the high-frequency sub-image contains the details and edge information of the image. This multi-scale processing method enables the model to understand and reconstruct the power grid data more comprehensively. Training and detail reconstruction of low-frequency sub-images and high-frequency sub-images separately helps to restore detailed information in the image and reduce information loss during the reconstruction process. By adjusting and training the low-frequency information and high-frequency information according to the loss function of the generator model, the model parameters can be adaptively optimized, thereby improving the accuracy and reliability of the reconstructed data.

[0029] As a preferred solution, the low-frequency sub-image and the high-frequency sub-image are trained and detailed reconstructed to obtain low-frequency information and high-frequency information under different weights, specifically:

[0030] Based on the generator model, shallow features of the low-frequency sub-image and the high-frequency sub-image are extracted through a convolution layer, and deep features of the low-frequency sub-image and the high-frequency sub-image are extracted through a low-frequency sub-network and a high-frequency sub-network to obtain a feature set;

[0031] Based on the residual dense block, the initial high-frequency features of the low-frequency sub-image and the high-frequency sub-image are extracted, and the detail information of the initial high-frequency features is enhanced through a preset DE mechanism to obtain high-frequency features;

[0032] Based on the adjacency memory mechanism, the feature set is transferred to the current layer where the residual dense block is located, and feature extraction and fusion are performed on the feature set and the high-frequency features to obtain feature representation;

[0033] In combination with the feature representation, a convolution operation is performed on the shallow features and the deep features to obtain the low-frequency information and high-frequency information under different weights.

[0034] As a preferred solution, in combination with the feature representation, a convolution operation is performed on the shallow features and the deep features to obtain the low-frequency information and high-frequency information under different weights, specifically:

[0035] Performing upsampling and convolution operations on the low-frequency sub-image and the high-frequency sub-image through the low-frequency sub-network of the generator model to obtain a first output result;

[0036] Based on the high-frequency sub-network of the generator model, upsampling and convolution operations are performed on the shallow features and the deep features to obtain a second output result;

[0037] The low-frequency information and high-frequency information under different weights are generated according to the feature representation, the first output result and the second output result.

[0038] This preferred solution uses upsampling to enable the low-frequency sub-network and the high-frequency sub-network to enlarge the size of the low-frequency sub-image and the high-frequency sub-image to the target resolution, which helps to improve the clarity and detail of the image while retaining important information of the image.

[0039] As a preferred solution, the optimized data reconstruction model is established based on the generator model and the discriminator model, specifically:

[0040] Based on the generator model, the PMU data image in the preset RTU electrical image is decomposed into a low-frequency image and a high-frequency image by means of a stationary wavelet transform;

[0041] Training and reconstructing details of the low-frequency image and the high-frequency image to obtain an output result;

[0042] Calculate the data error of the output result by using the discriminator model to obtain an error value;

[0043] The generator model is optimized based on the error value to obtain the optimized data reconstruction model composed of the optimized generator model and discriminator model.

[0044] This preferred solution introduces stationary wavelet transform, so that the model can effectively suppress noise and interference when processing image data, thereby improving the robustness of the model. The discriminator model optimizes the generator model by distinguishing the truth or falsity of the output results and calculating the error and feeding it back to the generator model. This optimization method based on discriminator feedback can significantly improve the optimization efficiency and accelerate the convergence speed of the model. In addition, this process improves the quality and accuracy of data reconstruction by continuously optimizing the generator model.

[0045] The present invention also provides an RTU data reconstruction device based on a generative adversarial network, comprising a data module, an image module and a reconstruction module;

[0046] Wherein, the data module is used to obtain power grid data from power grid monitoring points;

[0047] The image module is used to encode the power grid data into channels and image matrices of a binary image according to parameter types to obtain an RTU electrical image;

[0048] The reconstruction module is used to perform up-conversion reconstruction processing on the RTU electrical image by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

[0049] The present application also provides a storage medium, on which a computer program is stored. The computer program is called and executed by a computer to implement the RTU data reconstruction method based on a generative adversarial network as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flowchart of an RTU data reconstruction method based on a generative adversarial network provided in an embodiment of the present application;

[0051] Figure 2 It is a sequence 2-point mapping algorithm diagram provided in an embodiment of the present application;

[0052] Figure 3 is a structural diagram of a low-resolution binary image provided in an embodiment of the present application;

[0053] Figure 4 is a corresponding relationship diagram between low-resolution and high-resolution binary images provided in an embodiment of the present application;

[0054] Figure 5 is a structural diagram of a high-resolution binary image provided in an embodiment of the present application;

[0055] Figure 6 is a flow chart of a data image construction method provided in an embodiment of the present application;

[0056] Figure 7 It is a structural diagram of a generator provided in an embodiment of the present application;

[0057] Figure 8 It is a diagram of the architecture mechanism provided by the embodiment of the present application;

[0058] Fig. 9 is a discriminant network structure diagram provided in an embodiment of the present application;

[0059] Fig.10 It is a structural schematic diagram of an RTU data reconstruction device based on a generative adversarial network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] In the description of the present application, it should be understood that the terms "first", "second" and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first", "second" and "third" may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, "several" means two or more.

[0062] An RTU data reconstruction method based on a generative adversarial network provided in an embodiment of the present application is mainly used in situations where the power grid data of a power system needs to be reconstructed and the lack of high-frequency details is avoided.

[0063] Embodiment 1:

[0064] See also Figure 1 , the embodiment of the present application provides an RTU data reconstruction method based on a generative adversarial network, including S1 to S3, and the specific implementation steps are as follows:

[0065] S1. Obtain grid data from grid monitoring points.

[0066] Step S1 of the embodiment of the present application is specifically as follows:

[0067] The WAMS (Wide Area Measurement System) and SCADA (Supervisory Control And Data Acquisition) systems at the power grid monitoring points measure and upload monitoring data in real time to obtain power grid data;

[0068] The grid status data in the grid data consists of directly measured voltage and indirectly calculated power.

[0069] S2. Encode the power grid data into the channels and image matrix of the binary image according to the parameter type to obtain the RTU electrical image.

[0070] Step S2 of the embodiment of the present application includes S2.1 to S2.2; wherein S2.1 is a process of calculating the first power grid data, and S2.2 is a process of establishing an RTU electrical image based on the first power grid data, specifically:

[0071] S2.1. Set a sliding window H on a set of PMU data H in the power grid data. τ , and the sliding window H τ The length and sliding step of are both set to R; and the window can slide on the data H to obtain different PMU sequences;

[0072] Based on the sequential 2-point mapping algorithm with sliding window, by controlling the sliding window H τ Slide, slide the window H τ The PMU data sequence in is mapped to the RTU data point Lτ corresponding to the same time period in the power grid data to obtain the associated data;

[0073] If the pixel value x in the associated data ij The pixel coordinates are used to store RTU data, then the pixel value x ij Set to 0, otherwise the pixel value x ij Set to 255; for low-resolution binary images, x ij Represents the value of the i-th row in the j-th column of the image matrix for each channel;

[0074] In RGB color mode, the pixel value x will be set equal to 0 ij Convert to the black part of the binary image, otherwise, the pixel value x ij Convert the white part of the binary image to obtain a complete binary image;

[0075] Based on the pixel value of the low-resolution binary image in the binary image, the low-resolution binary image is converted into a high-resolution binary image by interpolation, deep learning or image processing to obtain processed first power grid data; wherein the resolution of the low-resolution binary image is S×S, and the resolution of the high-resolution binary image is (S×r)×(S×r);

[0076] Similarly, if the pixel value x in the associated data ij The pixel coordinates are used to store PMU data, then the r×r matrix x ij The values ​​in are all set equal to 0, so that the black parts of the high-resolution binary image correspond to the black parts of the low-resolution binary image.

[0077] To apply the embodiments of the present invention, please refer to Figures 2 to 5 , Figure 2 is a sequence 2-point mapping algorithm diagram provided by an embodiment of the present invention, Figure 3 is a structural diagram of a low-resolution binary image provided by an embodiment of the present invention, Figure 4 is a corresponding relationship diagram between low-resolution and high-resolution binary images provided by an embodiment of the present invention, Figure 5 is a structural diagram of a high-resolution binary image provided by an embodiment of the present invention;

[0078] in, Figure 2 Indicates that the sliding window H is controlled by a sequential 2-point mapping algorithm with a sliding window τ Slide to get the process of related data;

[0079] Figure 3 In RGB color mode, according to x ij The process of converting the value of a binary image into the black part or the white part of the binary image to obtain a binary image;

[0080] Figure 4 Represents the correspondence between the low-resolution binary image with a resolution of S×S and the high-resolution binary image with a resolution of (S×r)×(S×r);

[0081] Figure 5 Indicates that if the pixel value x in the associated data ij The pixel coordinates are used to store PMU data, then the r×r matrix x ij The process of setting the values ​​in to 0 so that the black part of the high-resolution binary image corresponds to the black part of the low-resolution binary image.

[0082] In this embodiment S2.1, since the binary image only contains black and white colors, it can clearly show the boundaries, shapes and distribution characteristics of the data, so the electrical data is converted into a binary image, so that the data can be presented in a more intuitive and easier to understand form. In addition, this embodiment S2.1 makes full use of the advantages of advanced machine learning methods in image feature extraction, and designs a general method for converting electrical data into electrical images as described above, which can effectively ensure the wide applicability of the present invention;

[0083] In addition, since the resolution of the low-resolution data image increases with the increase of the sub-pixel convolution layer in the subsequent optimized data reconstruction model, and the pixel coordinates of the high-resolution data image correspond to the pixel coordinates of the low-resolution data image, it is necessary to map the time series of the PMU data to the corresponding points of the RTU data recorded in the same period to establish the association between the PMU data and the RTU data.

[0084] S2.2. If the electrical parameter type of the first power grid data is single channel, the RTU data Lτ corresponding to the low-resolution binary image in the first power grid data is encoded into the black part of the red channel in time sequence;

[0085] The PMU data Hτ corresponding to the high-resolution binary image in the first power grid data is rearranged into an r×r matrix, and then the rearranged data Hτ is encoded into the black part of the red channel, and the data stored in the red channel is normalized and converted into the common range [0,255] of RGB pixel values ​​according to the conversion formula to obtain the RTU electrical image.

[0086] If the electrical parameter type of the first power grid data is multi-channel, the first power grid data is encoded into image matrices of different channels based on the pixel value of the blue channel calculated according to the pixel calculation formula to obtain the RTU electrical image; and when the electrical parameter type m>3, it is necessary to add additional (m-3) channels to store data. At this time, the blue channel is used to store other types of pre-processed data, and there is no need to calculate the pixel value of the blue channel according to the pixel calculation formula.

[0087] The conversion formula is:

[0088]

[0089] The pixel calculation formula is:

[0090] x pB =255-x pR

[0091] Among them, x ′ p is the original image matrix of the pth image, x p is the image matrix of normalized RGB pixel values;

[0092] x pR and x pB are the pixel values ​​in the red and blue channels of the p-th image, respectively.

[0093] To apply the embodiments of the present invention, please refer to Figure 6 , Figure 6 It is a flow chart of the data image construction method provided in an embodiment of the present invention, which shows the general process of establishing the RTU electrical image in the first embodiment of the present application.

[0094] In this embodiment S2.2, the first power grid data is encoded according to the electrical parameter type, which can achieve optimized storage and transmission of data; each channel only stores data related to the channel, reducing unnecessary redundancy and repetition, thereby saving storage space and improving transmission efficiency. In addition, each channel in the image matrix can be represented in different ways, which makes the visualization of the data richer and more intuitive.

[0095] Overall, this embodiment S2 can ensure the accurate correspondence between PMU data and RTU data in the same time period by setting a sliding window and sliding in the window, thereby improving the synchronization and correlation between the data. Since high-resolution data has higher precision and accuracy in visualization, feature extraction, and pattern recognition, processing low-resolution electrical data by constructing a high-resolution binary image can significantly improve the resolution of the data and help to more deeply understand the operating status of the electrical system. Encoding electrical data into the channels and image matrices of binary images not only achieves data compression and storage optimization, but also facilitates subsequent data processing and analysis.

[0096] S3. Upsampling and reconstructing the RTU electrical image by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

[0097] Step S3 of the embodiment of the present application includes S3.1 to S3.5; wherein S3.1 is a process of establishing a generator model, S3.2 is a process of establishing a discriminator model, S3.3 is a process of establishing an optimized data reconstruction model based on the generator model and the discriminator model, S3.4 is a process of obtaining feature representation based on the RTU electrical image, and S3.5 is a process of obtaining reconstructed RTU data based on the feature representation and according to the optimized data reconstruction model, specifically:

[0098] S3.1. The initial generator model based on the detail-enhanced wavelet residual network (DeWRNet) extracts shallow features of low-frequency images and high-frequency images through convolutional layers, and extracts deep features of low-frequency images and high-frequency images through low-frequency sub-networks and high-frequency sub-networks using SLRB (Shallow Low-Frequency Representation Block, a representation block for extracting shallow features of low-frequency images) and SHRDB (Shallow High-Resolution Detail Block, a shallow representation block for extracting high-frequency detail information in high-resolution images) respectively; and extracts high-frequency feature details through residual dense blocks based on L2HFT (Low-to-High Frequency Transformation) and DE mechanism (Detail Enhancement), and transfers the feature states of shallow features and deep features to the layer where the residual dense blocks are hidden for feature extraction, thereby realizing the adjacency memory mechanism;

[0099] The low-frequency sub-network is controlled to directly output the result of the last convolution operation through the upsampling block, and the high-frequency sub-network is controlled to combine the shallow features and the deep features through global residual learning and then output the result through the upsampling block and the last convolution operation to enrich the information in the initial generator model and obtain the generator model.

[0100] Among them, the loss function of the generator model is:

[0101] l G =λ1l Gen +λ2l MSE

[0102] For parameter l Gen and parameter l MSE have:

[0103]

[0104] Among them, λ1 and λ2 are weighting coefficients, which are empirical values; l is the side length of each channel of the electrical image.

[0105] l Gen It is against loss, is the low frequency electrical data, θ D and θ G are the discriminator model parameters and the generator model parameters, is to generate samples; Represents the output of the discriminator model, that is, the probability that the generated sample is judged as a real sample;

[0106] l MSE is the mean square error (MSE) between the generated samples and the real samples, i.e., the actual loss; w and h are the width and height of the matrix in the image channel, respectively; and are the values ​​of the pixels with width w and height h in each channel matrix of the j-th real sample and the generated sample, respectively, and m is the total number of samples.

[0107] To apply the embodiments of the present invention, please refer to Figures 7-8 , Figure 7 is a structural diagram of a generator provided in an embodiment of the present application, Figure 8 is a diagram of the architecture mechanism provided by the embodiment of the present application; wherein, Figure 7 Represents the specific structure of the above generator model, Figure 8 It represents the architecture of the low-frequency subnet block and the high-frequency subnet block in the above DeWRNet, L2HFT and DE mechanism;

[0108] like Figure 7 and Figure 8 As shown in Figure 1, the BN layer is removed from the network to avoid increasing computational complexity and thus improve network performance. And in order to adapt to parameter reduction, all residual blocks share the same parameters and are transmitted and reused in a recursive manner.

[0109] In this embodiment S3.1, the adversarial loss l is generated Gen By considering the discrimination results, the generator model can deceive the discriminator model; and, based on the adjacency memory mechanism, the feature set is passed to the current layer where the residual dense block is located, and the feature set and high-frequency features are fused. This feature fusion method helps to organically combine feature information at different levels and improve the representation ability of the model. The adjacency memory mechanism can also retain and transmit historical information to a certain extent, enhancing the model's long-term dependency modeling capabilities.

[0110] S3.2. Based on the fully convolutional neural network, the fully connected layers in the traditional convolutional neural network (CNN) are replaced with convolutional layers to eliminate the size limitation of the input image, thereby establishing a discriminator model; and the discriminator model uses the reconstructed image generated by the generator model and the corresponding PMU data image as input to achieve effective classification of real samples and generated samples;

[0111] Specifically, the discriminator model contains 5 convolutional layers, each with a convolution kernel size of 4×4, a step size of 2, and the number of filters is 64, 128, 256, and 512 respectively; except for the last layer, the other layers are followed by BN and nonlinear function activation LeakyReLU to avoid the "death" of ReLU neurons; the output uses the sigmoid function to facilitate probability analysis and normalize the discrimination results. This output represents the similarity between the input images, and the higher the score, the greater the similarity between the two.

[0112] Among them, the loss function of the discriminator model is:

[0113]

[0114] in, Represents the generated samples obtained by the discriminator model from the generator model The output, Represents the discriminator model about the jth real sample The output of , m is the total number of samples.

[0115] To apply the embodiments of the present invention, please refer to Fig. 9 , Fig. 9 It is a discriminant network structure diagram provided in an embodiment of the present application, which shows the specific structure of the discriminator model.

[0116] In this embodiment S3.2, the discriminant adversarial loss l D By considering the discrimination results, the discriminator model is able to distinguish true from false.

[0117] S3.3. Based on the generative adversarial networks (GAN), based on the generator model, the PMU data image in the preset RTU electrical image is decomposed into a low-frequency image and a high-frequency image by means of SWT (Stationary Wavelet Transform); wherein the generative network of the generator model is mainly composed of a low-frequency sub-network and a high-frequency sub-network, the low-frequency sub-network focuses on containing the necessary low-frequency image content, while the high-frequency sub-image focuses on restoring details;

[0118] The low-frequency image and high-frequency image are trained and detailed reconstruction is performed, and the high-frequency details are further restored and enhanced through the L2HFT and DE mechanisms to obtain the output results;

[0119] The discriminator model is used to compare the true and false output results and calculate the error value;

[0120] The generator model is optimized based on the error value, and through the adversarial game between the generator model and the discriminator model, the generation ability of the generator model and the discrimination ability of the discriminator model are improved simultaneously, thereby obtaining an optimized data reconstruction model composed of the optimized generator model and the discriminator model;

[0121] Among them, GAN is just a framework, and the internal algorithms, connection methods, loss functions, etc. of its generator and discriminator will have great differences in different technical issues.

[0122] Embodiments S3.1 to S3.3 introduce stationary wavelet transform, so that the model can effectively suppress noise and interference when processing image data, thereby improving the robustness of the model. The discriminator model optimizes the generator model by distinguishing the truth or falsity of the output results and calculating the error and feeding it back to the generator model. This optimization method based on discriminator feedback can significantly improve the optimization efficiency and accelerate the convergence speed of the model. In addition, this process improves the quality and accuracy of data reconstruction by continuously optimizing the generator model.

[0123] Moreover, the generator model is the core part of the optimized data reconstruction model. The image super-resolution performance depends to a large extent on the generator model. The L2HFT and DE mechanisms are used to solve the problem of overly smooth details, so that the image details can be further effectively enhanced while the data is correctly restored.

[0124] S3.4, a generator model based on an optimized data reconstruction model, decomposing the PMU data image in the RTU electrical image into a low-frequency sub-image and a high-frequency sub-image by means of a stationary wavelet transform;

[0125] Based on the generator model, shallow features of the low-frequency sub-image and the high-frequency sub-image are extracted through the convolution layer, and deep features of the low-frequency sub-image and the high-frequency sub-image are extracted through the low-frequency sub-network and the high-frequency sub-network to obtain a feature set;

[0126] Based on the residual dense block of the optimized data reconstruction model, the initial high-frequency features of the low-frequency sub-image and the high-frequency sub-image are extracted, and the detailed information of the initial high-frequency features is enhanced through the L2HFT and DE mechanisms to obtain high-frequency features;

[0127] Based on the adjacency memory mechanism, the feature set is passed to the current layer where the residual dense block is located, and the feature set and high-frequency features are extracted and fused to obtain feature representation.

[0128] S3.5, performing upsampling and convolution operations on the low-frequency sub-image and the high-frequency sub-image by optimizing the low-frequency sub-network of the generator model in the data reconstruction model to obtain a first output result;

[0129] Based on the high-frequency sub-network of the generator model, upsampling and convolution operations are performed on the shallow features and the deep features to obtain the second output result;

[0130] Generate low-frequency information and high-frequency information under different weights according to the feature representation, the first output result, and the second output result;

[0131] According to the loss function of the generator model, the low-frequency information and high-frequency information are adjusted and trained to obtain the reconstructed RTU data;

[0132] Among them, when determining which channels of the reconstructed data image are used to store data, for a single-channel constructed image, all pixel values ​​are obtained from the red channel, and the pixel values ​​are denormalized into reconstructed RTU data according to the data reconstruction expression. And, for multi-channel construction, the same conversion method is applied to the data stored in the other (m-1) channels.

[0133] The data reconstruction expression is:

[0134]

[0135] Among them, x ′ p ′ is the reconstructed data of the pth image, x ′ p is the original image matrix of the pth image, x p is the image matrix of normalized RGB pixel values.

[0136] In this embodiment S3.5, by upsampling, the low-frequency sub-network and the high-frequency sub-network can enlarge the size of the low-frequency sub-image and the high-frequency sub-image to the target resolution, which helps to improve the clarity and detail of the image while retaining important information of the image.

[0137] For embodiments S3.4 to S3.5 as a whole, wavelet transform provides multi-scale analysis capabilities. By processing data in the form of stationary wavelet transform, the resulting low-frequency sub-image reflects the overall structure and general outline of the image, while the high-frequency sub-image contains the details and edge information of the image. This multi-scale processing method enables the model to understand and reconstruct electrical data more comprehensively. Training and detail reconstruction of low-frequency sub-images and high-frequency sub-images separately helps to restore detailed information in the image and reduce information loss during reconstruction. By adjusting and training low-frequency information and high-frequency information according to the loss function of the generator model, the model parameters can be adaptively optimized, thereby improving the accuracy and reliability of the reconstructed data.

[0138] Overall, this embodiment has the following beneficial effects:

[0139] In the present invention, since binary images only contain two pixel values, 0 and 1, encoding electrical data into the channels and matrices of binary images can greatly reduce data storage space; and binary images are simple and convenient for various image processing and analysis operations, which helps to extract key features of electrical data and facilitate subsequent data processing and analysis. By optimizing the data reconstruction model to perform frequency upscaling and reconstruction processing on RTU electrical images, the resolution and accuracy of the data can be improved without increasing too much computational burden. The optimized data reconstruction model is established based on the generator model and the discriminator model, which means that the model can adapt to different data characteristics and task requirements through continuous learning and optimization. The generator model can generate electrical images with richer high-frequency details by extracting and reconstructing features of the input electrical images; the discriminator model can distinguish the true and false electrical images generated by the generator model, and calculate the differences between them and the real electrical images. These feedback information will be used to optimize the parameters and structure of the generator model to improve the accuracy of the generated data and the richness of high-frequency details. Through adversarial training between the generator model and the discriminator model, the two can promote and optimize each other, thereby ensuring that the optimized data reconstruction model shows better performance and effects in practical applications.

[0140] Moreover, by converting time series data into data images, the neural network method is used to efficiently extract data image features; the low-frequency and high-frequency of the data image are processed separately by using a generator model based on the detail enhanced wavelet residual network (DeWRNet), and the low-frequency and high-frequency sub-images are trained with different models. While reconstructing the high-frequency details, the low-frequency structure is also provided. The high-frequency details can be further restored and enhanced through the L2HFT and DE mechanisms; and the discriminator model is established based on a fully convolutional network, so pixel-level classification can be obtained to improve the discrimination accuracy, thereby improving the reconstruction accuracy and the ability to restore high-frequency details.

[0141] Embodiment 2:

[0142] See also Fig.10 , an embodiment of the present application provides an RTU data reconstruction device based on a generative adversarial network, comprising a data module 10, an image module 20 and a reconstruction module 30;

[0143] Wherein, the data module 10 is used to obtain power grid data from the power grid monitoring point;

[0144] An image module 20 is used to encode the power grid data into channels and image matrices of a binary image according to parameter types to obtain an RTU electrical image;

[0145] The reconstruction module 30 is used to perform up-conversion reconstruction processing on the RTU electrical image by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

[0146] In one embodiment, the data module 10 is specifically:

[0147] The WAMS (Wide Area Measurement System) and SCADA (Supervisory Control And Data Acquisition) systems at the power grid monitoring points measure and upload monitoring data in real time to obtain power grid data;

[0148] The grid status data in the grid data consists of directly measured voltage and indirectly calculated power.

[0149] In one embodiment, the image module 20 includes a first data unit and an image unit; wherein the first data unit is a process of calculating the first power grid data, and the image unit is a process of establishing the RTU electrical image based on the first power grid data, specifically:

[0150] The first data unit is used to set a sliding window H on a group of PMU data H in the power grid data. τ , and the sliding window H τ The length and sliding step of are both set to R; and the window can slide on the data H to obtain different PMU sequences;

[0151] The first data unit is also used for a sequential 2-point mapping algorithm based on a sliding window, by controlling the sliding window H τ Slide, slide the window H τ The PMU data sequence in is mapped to the RTU data point Lτ corresponding to the same time period in the power grid data to obtain the associated data;

[0152] The first data unit is also used if the pixel value x in the associated data ij The pixel coordinates are used to store RTU data, then the pixel value x ij Set to 0, otherwise the pixel value x ij Set to 255; for low-resolution binary images, x ij Represents the value of the i-th row in the j-th column of the image matrix for each channel;

[0153] The first data unit is also used to set the pixel value x equal to 0 in RGB color mode. ij Convert to the black part of the binary image, otherwise, the pixel value xij Convert the white part of the binary image to obtain a complete binary image;

[0154] The first data unit is further used to convert the low-resolution binary image into a high-resolution binary image by interpolation, deep learning or image processing based on the pixel value of the low-resolution binary image in the binary image, so as to obtain the processed first power grid data; wherein the resolution of the low-resolution binary image is S×S, and the resolution of the high-resolution binary image is (S×r)×(S×r);

[0155] The first data unit is also used in the same way. If the pixel value x in the associated data ij The pixel coordinates are used to store PMU data, then the r×r matrix x ij The values ​​in are all set equal to 0, so that the black parts of the high-resolution binary image correspond to the black parts of the low-resolution binary image.

[0156] To apply the embodiments of the present invention, please refer to Figures 2 to 5 , Figure 2 is a sequence 2-point mapping algorithm diagram provided by an embodiment of the present invention, Figure 3 is a structural diagram of a low-resolution binary image provided by an embodiment of the present invention, Figure 4 is a corresponding relationship diagram between low-resolution and high-resolution binary images provided by an embodiment of the present invention, Figure 5 is a structural diagram of a high-resolution binary image provided by an embodiment of the present invention;

[0157] in, Figure 2 Indicates that the sliding window H is controlled by a sequential 2-point mapping algorithm with a sliding window τ Slide to get the process of related data;

[0158] Figure 3 In RGB color mode, according to x ij The process of converting the value of a binary image into the black part or the white part of the binary image to obtain a binary image;

[0159] Figure 4 Represents the correspondence between the low-resolution binary image with a resolution of S×S and the high-resolution binary image with a resolution of (S×r)×(S×r);

[0160] Figure 5 Indicates that if the pixel value x in the associated data ij The pixel coordinates are used to store PMU data, then the r×r matrix x ij The process of setting the values ​​in to 0 so that the black part of the high-resolution binary image corresponds to the black part of the low-resolution binary image.

[0161] In the first data unit of this embodiment, since the binary image only contains black and white colors, it can clearly show the boundaries, shapes and distribution characteristics of the data, so converting the electrical data into a binary image can make the data appear in a more intuitive and easier to understand form. In addition, this embodiment S2.1 makes full use of the advantages of advanced machine learning methods in image feature extraction, and designs a general method for converting electrical data into electrical images as described above, which can effectively ensure the wide applicability of the present invention;

[0162] In addition, since the resolution of the low-resolution data image increases with the increase of the sub-pixel convolution layer in the subsequent optimized data reconstruction model, and the pixel coordinates of the high-resolution data image correspond to the pixel coordinates of the low-resolution data image, it is necessary to map the time series of the PMU data to the corresponding points of the RTU data recorded in the same period to establish the association between the PMU data and the RTU data.

[0163] An image unit, for encoding the RTU data Lτ corresponding to the low-resolution binary image in the first power grid data into the black part of the red channel in time sequence if the electrical parameter type of the first power grid data is a single channel;

[0164] The image unit is also used to rearrange the PMU data Hτ corresponding to the high-resolution binary image in the first power grid data into an r×r matrix, and then encode the rearranged data Hτ into the black part of the red channel, and convert the normalized data stored in the red channel into a common range of RGB pixel values ​​[0,255] according to a conversion formula to obtain an RTU electrical image.

[0165] The image unit is also used for encoding the first power grid data into image matrices of different channels based on the pixel value of the blue channel calculated according to the pixel calculation formula to obtain the RTU electrical image if the electrical parameter type of the first power grid data is multi-channel; and when the electrical parameter type m>3, it is necessary to add additional (m-3) channels to store data. At this time, the blue channel is used to store other types of pre-processed data, and there is no need to calculate the pixel value of the blue channel according to the pixel calculation formula.

[0166] The conversion formula is:

[0167]

[0168] The pixel calculation formula is:

[0169] x pB =255-x pR

[0170] Among them, x ′ p is the original image matrix of the pth image, xp is the image matrix of normalized RGB pixel values;

[0171] x pR and x pB are the pixel values ​​in the red and blue channels of the p-th image, respectively.

[0172] To apply the embodiments of the present invention, please refer to Figure 6 , Figure 6 It is a flow chart of the data image construction method provided in an embodiment of the present invention, which shows the general process of establishing the RTU electrical image in the second embodiment of the present application.

[0173] In this embodiment, the image unit encodes the first power grid data according to the electrical parameter type, which can achieve optimized storage and transmission of data; each channel only stores data related to the channel, reducing unnecessary redundancy and repetition, thereby saving storage space and improving transmission efficiency. In addition, each channel in the image matrix can be represented in different ways, which makes the visualization effect of the data richer and more intuitive.

[0174] Overall, the image module 20 of this embodiment can ensure the accurate correspondence between PMU data and RTU data in the same time period by setting a sliding window and sliding in the window, thereby improving the synchronization and correlation between the data. Since high-resolution data has higher precision and accuracy in visualization, feature extraction and pattern recognition, processing low-resolution electrical data by constructing a high-resolution binary image can significantly improve the resolution of the data and help to more deeply understand the operating status of the electrical system. Encoding electrical data into the channels and image matrices of the binary image not only realizes data compression and storage optimization, but also facilitates subsequent data processing and analysis.

[0175] In one embodiment, the reconstruction module 30 includes a generation unit, a discrimination unit, a model unit, a feature unit and a reconstruction unit; wherein the generation unit is a process of establishing a generator model, the discrimination unit is a process of establishing a discriminator model, the model unit is a process of establishing an optimized data reconstruction model based on the generator model and the discriminator model, the feature unit is a process of obtaining a feature representation based on an RTU electrical image, and the reconstruction unit is a process of obtaining reconstructed RTU data based on the feature representation and according to the optimized data reconstruction model, specifically:

[0176] A generation unit is used for extracting shallow features of low-frequency images and high-frequency images through convolutional layers based on an initial generator model of a detail-enhanced wavelet residual network (DeWRNet), and extracting deep features of low-frequency images and high-frequency images through a low-frequency sub-network and a high-frequency sub-network using SLRB (Shallow Low-Frequency Representation Block, a representation block for extracting shallow features of low-frequency images) and SHRDB (Shallow High-Resolution Detail Block, a shallow representation block for extracting high-frequency detail information in high-resolution images); and extracting high-frequency feature details and transferring the feature states of shallow features and deep features to the layer where the residual dense block is located for feature extraction through a residual dense block based on L2HFT (Low-to-High Frequency Transformation) and DE mechanism (Detail Enhancement), thereby realizing an adjacency memory mechanism;

[0177] The generation unit is also used to control the low-frequency sub-network to directly output the result of the last convolution operation through the upsampling block, and to control the high-frequency sub-network to combine the shallow features and the deep features through global residual learning and then output the result through the upsampling block and the last convolution operation, so as to enrich the information in the initial generator model and obtain the generator model.

[0178] Among them, the loss function of the generator model is:

[0179] l G =λ1l Gen +λ2l MSE

[0180] For parameter l Gen and parameter l MSE have:

[0181]

[0182] Among them, λ1 and λ2 are weighting coefficients, which are empirical values; l is the side length of each channel of the electrical image;

[0183] l Gen It is against loss, is the low frequency electrical data, θ D and θ G are the discriminator model parameters and the generator model parameters, is to generate samples; Represents the output of the discriminator model, that is, the probability that the generated sample is judged as a real sample;

[0184] l MSE is the mean square error (MSE) between the generated samples and the real samples, i.e., the actual loss; w and h are the width and height of the matrix in the image channel, respectively; and are the values ​​of the pixels with width w and height h in each channel matrix of the j-th real sample and the generated sample, respectively, and m is the total number of samples.

[0185] To apply the embodiments of the present invention, please refer to Figures 7-8 , Figure 7 is a structural diagram of a generator provided in an embodiment of the present application, Figure 8 is a diagram of the architecture mechanism provided by the embodiment of the present application; wherein, Figure 7 Represents the specific structure of the above generator model, Figure 8 It represents the architecture of the low-frequency subnet block and the high-frequency subnet block in the above DeWRNet, L2HFT and DE mechanism;

[0186] like Figure 7 and Figure 8 As shown in Figure 1, the BN layer is removed from the network to avoid increasing computational complexity and thus improve network performance. And in order to adapt to parameter reduction, all residual blocks share the same parameters and are transmitted and reused in a recursive manner.

[0187] In the generation unit of this embodiment, the generation adversarial loss l Gen By considering the discrimination results, the generator model can deceive the discriminator model; and, based on the adjacency memory mechanism, the feature set is passed to the current layer where the residual dense block is located, and the feature set and high-frequency features are fused. This feature fusion method helps to organically combine feature information at different levels and improve the representation ability of the model. The adjacency memory mechanism can also retain and transmit historical information to a certain extent, enhancing the model's long-term dependency modeling capabilities.

[0188] The discriminant unit is used to replace the fully connected layer in the traditional convolutional neural network (CNN) with the convolutional layer based on the fully convolutional neural network to eliminate the size limit of the input image, thereby establishing a discriminator model; and the discriminator model uses the reconstructed image generated by the generator model and the corresponding PMU data image as input to achieve effective classification of real samples and generated samples;

[0189] Specifically, the discriminator model contains 5 convolutional layers, each with a convolution kernel size of 4×4, a step size of 2, and the number of filters is 64, 128, 256, and 512 respectively; except for the last layer, the other layers are followed by BN and nonlinear function activation LeakyReLU to avoid the "death" of ReLU neurons; the output uses the sigmoid function to facilitate probability analysis and normalize the discrimination results. This output represents the similarity between the input images, and the higher the score, the greater the similarity between the two.

[0190] Among them, the loss function of the discriminator model is:

[0191]

[0192] in, Represents the generated samples obtained by the discriminator model from the generator model The output, Represents the discriminator model about the jth real sample The output of , m is the total number of samples.

[0193] To apply the embodiments of the present invention, please refer to Fig. 9 , Fig. 9 It is a discriminant network structure diagram provided in an embodiment of the present application, which shows the specific structure of the discriminator model.

[0194] In the discriminant unit of this embodiment, the discriminant adversarial loss l D By considering the discrimination results, the discriminator model is able to distinguish true from false.

[0195] The model unit is used to decompose the PMU data image in the preset RTU electrical image into a low-frequency image and a high-frequency image based on a generator model based on a generative adversarial network (GAN) by means of an SWT (Stationary Wavelet Transform); wherein the generation network of the generator model is mainly composed of a low-frequency sub-network and a high-frequency sub-network, the low-frequency sub-network focuses on containing necessary low-frequency image content, and the high-frequency sub-image focuses on restoring details;

[0196] The model unit is also used to train and reconstruct the details of low-frequency images and high-frequency images, and further restore and enhance the high-frequency details through L2HFT and DE mechanisms to obtain output results;

[0197] The model unit is also used to compare the true and false output results through the discriminator model and calculate the error value;

[0198] The model unit is further used to optimize the generator model based on the error value, and through the adversarial game between the generator model and the discriminator model, the generation ability of the generator model and the discrimination ability of the discriminator model are improved synchronously, thereby obtaining an optimized data reconstruction model composed of the optimized generator model and the discriminator model;

[0199] Among them, GAN is just a framework, and the internal algorithms, connection methods, loss functions, etc. of its generator and discriminator will have great differences in different technical issues.

[0200] The generation unit, the discrimination unit and the model unit of the embodiment introduce a stationary wavelet transform, so that the model can effectively suppress noise and interference when processing image data, thereby improving the robustness of the model. The discriminator model distinguishes the truth or falsity of the output result, and calculates the error and feeds it back to the generator model, thereby optimizing the generator model. This optimization method based on the discriminator feedback can significantly improve the optimization efficiency and accelerate the convergence speed of the model. In addition, this process improves the quality and accuracy of data reconstruction by continuously optimizing the generator model.

[0201] Moreover, the generator model is the core part of the optimized data reconstruction model. The image super-resolution performance depends to a large extent on the generator model. The L2HFT and DE mechanisms are used to solve the problem of overly smooth details, so that the image details can be further effectively enhanced while the data is correctly restored.

[0202] A feature unit is used for a generator model based on an optimized data reconstruction model, and decomposes a PMU data image in an RTU electrical image into a low-frequency sub-image and a high-frequency sub-image by means of a stationary wavelet transform;

[0203] The feature unit is also used to extract shallow features of the low-frequency sub-image and the high-frequency sub-image through the convolution layer based on the generator model, and to extract deep features of the low-frequency sub-image and the high-frequency sub-image through the low-frequency sub-network and the high-frequency sub-network to obtain a feature set;

[0204] The feature unit is also used to extract the initial high-frequency features of the low-frequency sub-image and the high-frequency sub-image based on the residual dense block of the optimized data reconstruction model, and enhance the detail information of the initial high-frequency features through the L2HFT and DE mechanisms to obtain high-frequency features;

[0205] The feature unit is also used to transfer the feature set to the current layer where the residual dense block is located based on the adjacency memory mechanism, extract and fuse the feature set and high-frequency features, and obtain feature representation.

[0206] A reconstruction unit, configured to perform upsampling and convolution operations on the low-frequency sub-image and the high-frequency sub-image by optimizing the low-frequency sub-network of the generator model in the data reconstruction model to obtain a first output result;

[0207] The reconstruction unit is also used to perform upsampling and convolution operations on shallow features and deep features based on the high-frequency sub-network of the generator model to obtain a second output result;

[0208] The reconstruction unit is further used to generate low-frequency information and high-frequency information under different weights according to the feature representation, the first output result and the second output result;

[0209] The reconstruction unit is also used to adjust and train the low-frequency information and the high-frequency information according to the loss function of the generator model to obtain the reconstructed RTU data;

[0210] Among them, when determining which channels of the reconstructed data image are used to store data, for a single-channel constructed image, all pixel values ​​are obtained from the red channel, and the pixel values ​​are denormalized into reconstructed RTU data according to the data reconstruction expression. And, for multi-channel construction, the same conversion method is applied to the data stored in the other (m-1) channels.

[0211] The data reconstruction expression is:

[0212]

[0213] Among them, x ′ p ′ is the reconstructed data of the pth image, x ′ p is the original image matrix of the pth image, x p is the image matrix of normalized RGB pixel values.

[0214] The reconstruction unit of this embodiment upsamples so that the low-frequency sub-network and the high-frequency sub-network can enlarge the size of the low-frequency sub-image and the high-frequency sub-image to the target resolution, which helps to improve the clarity and detail of the image while retaining important information of the image.

[0215] For the feature unit and reconstruction unit of the embodiment as a whole, the wavelet transform provides a multi-scale analysis capability. The data is processed by a stationary wavelet transform. The resulting low-frequency sub-image reflects the overall structure and general outline of the image, while the high-frequency sub-image contains the details and edge information of the image. This multi-scale processing method enables the model to understand and reconstruct electrical data more comprehensively. Training and detail reconstruction of low-frequency sub-images and high-frequency sub-images separately helps to restore detail information in the image and reduce information loss during the reconstruction process. By adjusting and training the low-frequency information and high-frequency information according to the loss function of the generator model, the model parameters can be adaptively optimized, thereby improving the accuracy and reliability of the reconstructed data.

[0216] Overall, this embodiment has the following beneficial effects:

[0217] In the present invention, since binary images only contain two pixel values, 0 and 1, encoding electrical data into the channels and matrices of binary images can greatly reduce data storage space; and binary images are simple and convenient for various image processing and analysis operations, which helps to extract key features of electrical data and facilitate subsequent data processing and analysis. By optimizing the data reconstruction model to perform frequency upscaling and reconstruction processing on RTU electrical images, the resolution and accuracy of the data can be improved without increasing too much computational burden. The optimized data reconstruction model is established based on the generator model and the discriminator model, which means that the model can adapt to different data characteristics and task requirements through continuous learning and optimization. The generator model can generate electrical images with richer high-frequency details by extracting and reconstructing features of the input electrical images; the discriminator model can distinguish the true and false electrical images generated by the generator model, and calculate the differences between them and the real electrical images. These feedback information will be used to optimize the parameters and structure of the generator model to improve the accuracy of the generated data and the richness of high-frequency details. Through adversarial training between the generator model and the discriminator model, the two can promote and optimize each other, thereby ensuring that the optimized data reconstruction model shows better performance and effects in practical applications.

[0218] Moreover, by converting time series data into data images, the neural network method is used to efficiently extract data image features; the low-frequency and high-frequency of the data image are processed separately by using a generator model based on the detail enhanced wavelet residual network (DeWRNet), and the low-frequency and high-frequency sub-images are trained with different models. While reconstructing the high-frequency details, the low-frequency structure is also provided. The high-frequency details can be further restored and enhanced through the L2HFT and DE mechanisms; and the discriminator model is established based on a fully convolutional network, so pixel-level classification can be obtained to improve the discrimination accuracy, thereby improving the reconstruction accuracy and the ability to restore high-frequency details.

[0219] Embodiment three:

[0220] An embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the RTU data reconstruction method based on a generative adversarial network;

[0221] Wherein, the RTU data reconstruction method based on the generative adversarial network, if implemented in the form of a software functional unit and used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

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

Claims

1. A RTU data reconstruction method based on a generative adversarial network, characterized in that: include: Obtaining grid data from grid monitoring points; Encoding the power grid data into channels and image matrices of a binary image according to parameter types to obtain an RTU electrical image; The RTU electrical image is up-converted and reconstructed by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

2. The RTU data reconstruction method based on a generative adversarial network according to claim 1, characterized in that: The power grid data is encoded into the channels and image matrix of the binary image according to the parameter type to obtain the RTU electrical image, specifically: Setting a sliding window on the PMU data in the power grid data; By controlling the sliding window to slide, the PMU data sequence in the sliding window is mapped to the RTU data point corresponding to the same time period in the power grid data to obtain associated data; constructing a high-resolution binary image based on the low-resolution binary image in the associated data to obtain processed first power grid data; According to the electrical parameter type, the first power grid data is encoded into a channel or an image matrix of a binary image to obtain the RTU electrical image.

3. The RTU data reconstruction method based on a generative adversarial network according to claim 2, characterized in that: Constructing a high-resolution binary image based on the low-resolution binary image in the associated data to obtain the processed first power grid data is specifically: Setting the values ​​of a plurality of pixel values ​​in the associated data, and converting the plurality of pixel values ​​into a plurality of components of an image according to the set values ​​to obtain a complete binary image; Based on the pixel values ​​of the low-resolution binary image in the binary image, the low-resolution binary image is converted into a high-resolution binary image by interpolation to obtain the processed first power grid data.

4. The RTU data reconstruction method based on a generative adversarial network according to claim 2, characterized in that: According to the electrical parameter type, the first power grid data is encoded into a channel or an image matrix of a binary image to obtain the RTU electrical image, specifically: If the electrical parameter type of the first power grid data is a single channel, the RTU data corresponding to the low-resolution binary image in the first power grid data is encoded in time sequence to the black part of the preset channel, and the PMU data corresponding to the high-resolution binary image in the first power grid data is encoded to the black part of the preset channel after rearrangement, so as to obtain the RTU electrical image; If the electrical parameter type of the first power grid data is multi-channel, the first power grid data is encoded into image matrices of different channels to obtain the RTU electrical image.

5. The RTU data reconstruction method based on a generative adversarial network according to claim 1, characterized in that: The RTU electrical image is up-constructed by optimizing the data reconstruction model to obtain reconstructed RTU data, specifically: Based on the generator model, the PMU data image in the RTU electrical image is decomposed into a low-frequency sub-image and a high-frequency sub-image by means of a stationary wavelet transform; Training and detail reconstruction of the low-frequency sub-image and the high-frequency sub-image to obtain low-frequency information and high-frequency information under different weights; The low-frequency information and the high-frequency information are adjusted and trained according to the loss function of the generator model to obtain the reconstructed RTU data.

6. The RTU data reconstruction method based on a generative adversarial network according to claim 5, characterized in that: The low-frequency sub-image and the high-frequency sub-image are trained and detailedly reconstructed to obtain low-frequency information and high-frequency information under different weights, specifically: Based on the generator model, shallow features of the low-frequency sub-image and the high-frequency sub-image are extracted through a convolution layer, and deep features of the low-frequency sub-image and the high-frequency sub-image are extracted through a low-frequency sub-network and a high-frequency sub-network to obtain a feature set; Based on the residual dense block, the initial high-frequency features of the low-frequency sub-image and the high-frequency sub-image are extracted, and the detail information of the initial high-frequency features is enhanced through a preset DE mechanism to obtain high-frequency features; Based on the adjacency memory mechanism, the feature set is transferred to the current layer where the residual dense block is located, and feature extraction and fusion are performed on the feature set and the high-frequency features to obtain feature representation; In combination with the feature representation, a convolution operation is performed on the shallow features and the deep features to obtain the low-frequency information and high-frequency information under different weights.

7. The RTU data reconstruction method based on a generative adversarial network according to claim 6, characterized in that: In combination with the feature representation, a convolution operation is performed on the shallow features and the deep features to obtain the low-frequency information and high-frequency information under different weights, specifically: Performing upsampling and convolution operations on the low-frequency sub-image and the high-frequency sub-image through the low-frequency sub-network of the generator model to obtain a first output result; Based on the high-frequency sub-network of the generator model, upsampling and convolution operations are performed on the shallow features and the deep features to obtain a second output result; The low-frequency information and high-frequency information under different weights are generated according to the feature representation, the first output result and the second output result.

8. The RTU data reconstruction method based on a generative adversarial network according to claim 1, characterized in that: The optimized data reconstruction model is established based on the generator model and the discriminator model, specifically: Based on the generator model, the PMU data image in the preset RTU electrical image is decomposed into a low-frequency image and a high-frequency image by means of a stationary wavelet transform; Training and reconstructing details of the low-frequency image and the high-frequency image to obtain an output result; Calculate the data error of the output result by using the discriminator model to obtain an error value; The generator model is optimized based on the error value to obtain the optimized data reconstruction model composed of the optimized generator model and discriminator model.

9. An RTU data reconstruction device based on a generative adversarial network, characterized in that: It includes data module, image module and reconstruction module; Wherein, the data module is used to obtain power grid data from power grid monitoring points; The image module is used to encode the power grid data into channels and image matrices of a binary image according to parameter types to obtain an RTU electrical image; The reconstruction module is used to perform up-conversion reconstruction processing on the RTU electrical image by optimizing the data reconstruction model to obtain reconstructed RTU data; wherein the optimized data reconstruction model is established based on the generator model and the discriminator model.

10. A storage medium, characterized in that: The storage medium stores a computer program, which is called and executed by a computer to implement an RTU data reconstruction method based on a generative adversarial network as described in any one of claims 1 to 8 above.

Citation Information

Cited By

  • Power system missing data reconstruction method and system based on physical deviation correction

    CN121808207A