New energy data frequency raising reconstruction method and device based on generative adversarial network, equipment, storage medium and program product
By converting new energy data into images and using generative adversarial networks for feature extraction and confrontation game, the problem of low accuracy of up-up reconstruction of new energy data in traditional technology is solved, and the reconstruction effect of high precision and high detail is achieved. Power grid data provides good technical support.
Patent Information
- Application Number
- CN202411055914.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-31
AI Technical Summary
The interpolation method in the electrical field in traditional technology has low accuracy in up-reconstruction of one-dimensional timing electrical data, lacks high-frequency details, and makes it difficult to achieve high-precision reconstruction of new energy data.
Using a generative adversarial network method, new energy data is converted into images, deep residual neural network and improved residual block structure are used for feature extraction, and high-resolution new Energy data reconstruction.
It improves the reconstruction accuracy and reconstruction details of new energy data, has higher generalization capabilities, and can achieve high-precision up-frequency reconstruction of different data sets under the same model parameters, providing better power grid data reconstruction support.
Smart Images

Figure CN119229252A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of regional power data transmission, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for upscaling and reconstructing new energy data based on a generative adversarial network. Background Art
[0002] As the scale of new energy power systems continues to grow, the power grid generates a large amount of high-frequency and low-frequency new energy data. Compared with low-frequency new energy data, high-frequency new energy data has richer multi-source heterogeneous characteristics, which can more clearly reflect the user's electricity consumption behavior and form a more accurate user portrait and labeling system. However, due to the limitations of communication and storage technology, high-frequency new energy data often needs to be up-constructed to restore data details before being converted into low-frequency new energy data.
[0003] In traditional technology, the electrical field often uses interpolation methods to reconstruct one-dimensional time series electrical data, but there are problems such as low reconstruction accuracy and lack of high-frequency details. Therefore, how to design a new energy data upscaling reconstruction method that reasonably considers multiple influencing factors and achieves high-precision reconstruction of new energy data is an important problem that needs to be solved in the current power system. Summary of the invention
[0004] Based on this, it is necessary to provide a new energy data upscaling reconstruction method, device, computer equipment, computer-readable storage medium and computer program product based on a generative adversarial network to address the above technical problems.
[0005] In a first aspect, the present application provides a new energy data upscaling reconstruction method based on a generative adversarial network, comprising:
[0006] Acquire new energy data to be processed, perform normalization processing and format conversion on the new energy data, and obtain a new energy image that meets pixel point conditions;
[0007] Using a generator in a generative adversarial network model to extract features of the new energy image, obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features;
[0008] Inputting the training data set into the generative adversarial network model for training, and using the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model;
[0009] The new energy data is input into the target generative adversarial network model for upscaling and reconstruction to obtain high-resolution target new energy data.
[0010] In one embodiment, before extracting features of the new energy image using the generator in the generative adversarial network model, the method further includes:
[0011] A deep residual neural network is used as an initial generator, and a residual block in the deep residual neural network is identified; a batch normalization layer in the residual block is removed to obtain a target residual block structure, and based on the target residual block structure, the generator is obtained.
[0012] In one embodiment, the generative adversarial network model includes the generator and the discriminator; the structure of the generator is: 1 first convolution layer, 1 first activation layer, 16 residual blocks with the same parameters, 1 second convolution layer, 2 combined upsampling layers and 1 third convolution layer are open-loop connected in sequence, and the 16 residual blocks and the second convolution layer constitute a combined residual block; wherein each residual block with the same parameters includes 2 hole convolution layers, 2 batch normalization layers and 2 second activation layers, and its structure is: 1 hole convolution layer, 1 batch normalization layer, 1 second activation layer, 1 hole convolution layer, 1 batch normalization layer The structure of the discriminator is as follows: 1 fifth convolutional layer, 1 fourth activation layer, 7 combination layers, 1 fully connected layer, 1 fifth activation layer, 1 fully connected layer and 1 fifth activation layer are open-loop connected in sequence; wherein, the structure of each combination layer is as follows: 1 sixth convolutional layer, 1 batch normalization layer and 1 sixth activation layer are open-loop connected in sequence.
[0013] In one embodiment, the loss function of the generator is:
[0014] Where: , , is the weighting coefficient, , , , The calculation formula is: , The calculation formula is: as well as The calculation formula is: .
[0015] In one embodiment, the loss function of the discriminator is:
[0016]
[0017] Each discriminator is fitted through a neural network and consists of 8 cascaded basic units, a linear regression unit, an activation unit, and a linear regression unit. Each basic unit consists of a cascaded convolutional layer, a batch normalization unit, and an activation unit.
[0018] In one embodiment, inputting the training data set into the generative adversarial network model for training, and using the validation data set to adjust the hyperparameters of the generative adversarial network model, includes:
[0019] The training data set is divided into several batches of training samples, the training samples are input into the generative adversarial network model in batch order, and the generative adversarial network model is trained in batches using a small batch gradient descent method; when the training of the generative adversarial network model is completed, the hyperparameters of the generative adversarial network model are adjusted using the validation data set until convergence is reached.
[0020] In a second aspect, the present application also provides a new energy data upscaling reconstruction device based on a generative adversarial network, comprising:
[0021] A data processing module is used to obtain new energy data to be processed, normalize and convert the new energy data to obtain a new energy image that meets pixel point conditions;
[0022] A feature extraction module, used to extract features of the new energy image using a generator in a generative adversarial network model to obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features;
[0023] A parameter adjustment module, used to input the training data set into the generative adversarial network model for training, and use the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model;
[0024] The up-conversion reconstruction module is used to input the new energy data into the target generative adversarial network model for up-conversion reconstruction to obtain high-resolution target new energy data.
[0025] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0026] The new energy data to be processed is obtained, and the new energy data is normalized and format converted to obtain a new energy image that meets the pixel point conditions; the generator in the generative adversarial network model is used to extract features of the new energy image to obtain new energy image features, and a training data set and a verification data set are obtained based on the new energy image features; the training data set is input into the generative adversarial network model for training, and the hyperparameters of the generative adversarial network model are adjusted using the verification data set to obtain a target generative adversarial network model; the new energy data is input into the target generative adversarial network model for upscaling reconstruction to obtain high-resolution target new energy data.
[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0028] The new energy data to be processed is obtained, and the new energy data is normalized and format converted to obtain a new energy image that meets the pixel point conditions; the generator in the generative adversarial network model is used to extract features of the new energy image to obtain new energy image features, and a training data set and a verification data set are obtained based on the new energy image features; the training data set is input into the generative adversarial network model for training, and the hyperparameters of the generative adversarial network model are adjusted using the verification data set to obtain a target generative adversarial network model; the new energy data is input into the target generative adversarial network model for upscaling reconstruction to obtain high-resolution target new energy data.
[0029] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0030] The new energy data to be processed is obtained, and the new energy data is normalized and format converted to obtain a new energy image that meets the pixel point conditions; the generator in the generative adversarial network model is used to extract features of the new energy image to obtain new energy image features, and a training data set and a verification data set are obtained based on the new energy image features; the training data set is input into the generative adversarial network model for training, and the hyperparameters of the generative adversarial network model are adjusted using the verification data set to obtain a target generative adversarial network model; the new energy data is input into the target generative adversarial network model for upscaling reconstruction to obtain high-resolution target new energy data.
[0031] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for upscaling and reconstruction of new energy data based on generative adversarial networks convert the time series new energy data into new energy images, and use the generator in the generative adversarial network model to extract features of the new energy images to obtain new energy image features. At the same time, the feature learning ability of the generator is improved by using a generator based on a deep residual network and an improved residual block structure, and the deep convolutional neural network is used as a discriminator to conduct an adversarial game between the two to achieve higher reconstruction accuracy. Finally, the training samples in the training data set are divided into several batches and sent to the generative adversarial neural network model for training in batches, and the hyperparameters are adjusted using the verification data set. Compared with the traditional reconstruction method, the method of this scheme has higher reconstruction accuracy and richer reconstruction details. It can achieve high-precision upscaling reconstruction for different data sets under the same model parameters, and the trained reconstruction model is generalizable to different data sets in the same geographical location, providing good technical support for the upscaling and reconstruction of power grid data. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] FIG1 is an application environment diagram of a new energy data upscaling reconstruction method based on a generative adversarial network in one embodiment;
[0034] Figure 2 1 is a flow chart of a method for upscaling and reconstructing new energy data based on a generative adversarial network in one embodiment;
[0035] Figure 3 It is a flowchart of a new energy data upscaling reconstruction method based on a generative adversarial network in a specific embodiment;
[0036] Figure 4 It is a structural block diagram of a new energy data upscaling and reconstruction device based on a generative adversarial network in one embodiment;
[0037] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The new energy data upscaling reconstruction method based on the generative adversarial network provided in the embodiment of the present application can be applied in the application environment shown in FIG1. In which, the terminal communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or it can be placed on the cloud or other network servers.
[0040] Specifically, the new energy data upscaling and reconstruction method based on a generative adversarial network provided in an embodiment of the present application can be executed by a server.
[0041] Exemplarily, the server obtains new energy data to be processed, normalizes and converts the format of the new energy data, and obtains a new energy image that meets the pixel point conditions; the server uses the generator in the generative adversarial network model to extract features of the new energy image to obtain new energy image features, and obtains a training data set and a verification data set based on the new energy image features; the server inputs the training data set into the generative adversarial network model for training, and uses the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model; the server inputs the new energy data into the target generative adversarial network model for upscaling and reconstruction to obtain high-resolution target new energy data.
[0042] In the application environment shown in FIG1 , the terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The server may be implemented as an independent server or a server data cluster consisting of multiple servers.
[0043] In one embodiment, Figure 2 As shown, a new energy data upscaling reconstruction method based on a generative adversarial network is provided, and the method is applied to the server in FIG1 as an example for explanation, including the following steps:
[0044] Step S201, obtaining new energy data to be processed, normalizing and formatting the new energy data, and obtaining a new energy image that meets pixel point conditions.
[0045] Among them, new energy data includes data such as active power, reactive power, voltage, current, frequency, power, wind speed, light intensity, wind direction, and temperature factors.
[0046] Among them, pixel is the basic unit in image processing and computer graphics, usually used to describe the smallest controllable element in a digital image. The pixel condition can be that the pixel value is between 0 and 255.
[0047] Specifically, the server obtains the new energy data to be processed, normalizes the new energy data, and converts the new energy data into a common new energy image with [0, 255] as pixel points.
[0048] Step S202, using the generator in the generative adversarial network model to extract features of the new energy image, obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features.
[0049] The generator usually refers to the part of the generative adversarial network model that is responsible for generating realistic images, audio, or other types of data.
[0050] Specifically, the server uses the generator in the generative adversarial network model to extract features of the new energy image, obtains the new energy image features, and divides the new energy image features into a training data set and a verification data set according to a preset ratio.
[0051] Step S203: input the training data set into the generative adversarial network model for training, and use the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model.
[0052] Among them, hyperparameters refer to important settings in the training process of machine learning models. They cannot be directly learned from training data and need to be set manually. Hyperparameters usually affect the training speed and quality of the model, as well as the complexity and capabilities of the model.
[0053] Specifically, the server divides the training data set into several batches of training samples, inputs the training samples into the generative adversarial network model in batch order, and uses the small batch gradient descent method to train the generative adversarial network model in batches; when the generative adversarial network model training is completed, the validation data set is used to adjust the hyperparameters of the generative adversarial network model until convergence is reached to obtain the target generative adversarial network model.
[0054] Step S204: input the new energy data into the target generative adversarial network model for upscaling reconstruction to obtain high-resolution target new energy data.
[0055] Specifically, the server inputs the new energy data into the target generative adversarial network model for upscaling reconstruction, and obtains high-resolution target new energy data output by the target generative adversarial network model.
[0056] The above-mentioned method for upscaling and reconstructing new energy data based on generative adversarial networks converts time-series new energy data into new energy images, and uses the generator in the generative adversarial network model to extract features of the new energy images to obtain new energy image features. At the same time, the feature learning ability of the generator is improved by using a generator based on a deep residual network and an improved residual block structure, and the deep convolutional neural network is used as a discriminator to conduct an adversarial game between the two to achieve higher reconstruction accuracy. Finally, the training samples in the training data set are divided into several batches and sent to the generative adversarial neural network model for training in batches, and the hyperparameters are adjusted using the validation data set. Compared with the traditional reconstruction method, the method of this scheme has higher reconstruction accuracy and richer reconstruction details. It can achieve high-precision upscaling reconstruction for different data sets under the same model parameters, and the trained reconstruction model is generalizable to different data sets in the same geographical location, providing good technical support for the upscaling reconstruction of power grid data.
[0057] In one embodiment, the advantages of advanced machine learning methods in image feature extraction are first used to convert new energy data into new energy images as network input. Assume that the "high-frequency new energy data set" has L sampling moments, and each sampling moment has n types of new energy data, including active power, reactive power, voltage, current, frequency, power factor, etc., then the high-frequency new energy data set can be represented as an L × n matrix, and the n channels of each new energy image correspond to the n types of new energy data.
[0058] Secondly, the constructed sample set includes existing high-resolution new energy images, low-resolution new energy images and reconstructed super-resolution images. Assume that the existing high-resolution new energy image set, low-resolution new energy image set and super-resolution new energy image set are , and , whose data units are , and ,in Representation Generator by is the generated sample obtained by input, It can also be expressed as ,in is the generator parameter. The input of the discriminator is the generated sample or the real sample, and the output is the probability that the input is judged to be a real sample, which is or ,in are the discriminator parameters, or Respectively represent the discriminator by or The output obtained for the input.
[0059] In one of the embodiments, this solution introduces a deep residual neural network with stronger learning ability as a generator. The residual block inside the deep residual neural network uses a residual jump structure, breaking the convention that the output of a certain layer of the deep neural network can only be used as input to the next layer, so that the output of a certain layer can cross several layers as the input of a subsequent layer, alleviating the gradient vanishing problem caused by the increase in the depth of the deep neural network, and can improve the feature learning ability and accuracy of the model by stacking multiple layers of residual blocks.
[0060] The original deep neural network is improved, and the batch normalization layer is removed from the residual block to save memory usage. Therefore, the residual block of the generator model removes the batch normalization layer, and only retains the convolution operation, activation function and residual jump structure; in order to improve the reconstruction accuracy and high-frequency detail restoration ability, the generator loss function is designed as a weighted combination of the following loss functions. Assume that the deep residual network has R residual blocks, each original residual block has 2 batch normalization layers, and the number, number of channels, length and width of the input feature map of each batch normalization layer are m, n, and , Each iteration needs to calculate the mean and standard deviation of each channel of each feature map of each residual block 2×R×m×n times, that is, the number of parameters that need to be optimized in the batch normalization layer is 4×R×m×n. Normalization is performed on each pixel, and a total of normalization calculations are required. Second-rate.
[0061] In one embodiment, in order to enable the generator to deceive the discriminator, the generative adversarial loss lGen takes into account the discriminant results:
[0062]
[0063] The actual loss is the mean square error (MSE) between the generated samples and the real samples, defined as , whose expression is:
[0064]
[0065] Where: w and h are the width and height of the matrix in each channel respectively; and are the values of the pixels with width w and height h in each channel matrix of the jth real sample and the generated sample respectively;
[0066] The mean square error of the pixel values at the corresponding positions of the real sample feature map and the generated sample feature map is defined as the perceptual loss For the low-dimensional feature-based method in this scheme, the perceptual loss uses the feature map For the high-dimensional feature-based method in this scheme, the perceptual loss uses the feature map Perform calculations;
[0067] The calculation formula is:
[0068]
[0069] Where: and are the values of the pixels with width w and height h in each channel matrix of the j-th real sample feature map and the generated sample feature map, respectively.
[0070] In summary, the generator loss function is:
[0071]
[0072] Where: , , is the weighting coefficient, which can be taken , , .
[0073] Preferably, the discriminator loss function is:
[0074] In order to enable the discriminator to distinguish true from false, the discriminant adversarial loss Taking the discrimination results into consideration, the calculation formula is as follows:
[0075]
[0076] In addition, the training samples in the training data set are divided into several batches and sent to the generative adversarial neural network model for training in batches. The hyperparameters of the model are adjusted with the validation data set until convergence. The model is trained in batches using the small batch gradient descent method to reduce the variance when updating parameters and achieve more stable convergence. At the same time, the Bayesian optimization method is used to optimize the model hyperparameters according to the validation data set.
[0077] In one embodiment, Figure 3 As shown, a new energy data upscaling reconstruction method based on a generative adversarial network in a specific embodiment is provided, which specifically includes the following steps:
[0078] Step S301, obtaining new energy data to be processed, normalizing and formatting the new energy data, and obtaining a new energy image that meets pixel point conditions.
[0079] Step S302, using the deep residual neural network as an initial generator, identifying the residual block in the deep residual neural network; removing the batch normalization layer in the residual block to obtain a target residual block structure, and obtaining a generator based on the target residual block structure.
[0080] Step S303, using the generator in the generative adversarial network model to extract features of the new energy image, obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features.
[0081] Step S304, divide the training data set into several batches of training samples, input the training samples into the generative adversarial network model in batch order, and use the small batch gradient descent method to train the generative adversarial network model in batches; when the generative adversarial network model training is completed, use the verification data set to adjust the hyperparameters of the generative adversarial network model until convergence is reached, and obtain the target generative adversarial network model.
[0082] Step S305 , inputting the new energy data into the target generative adversarial network model for upscaling reconstruction to obtain high-resolution target new energy data.
[0083] The beneficial effects brought by the above embodiments are as follows:
[0084] Compared with traditional reconstruction methods, the method in this scheme has higher reconstruction accuracy and richer reconstruction details. It can achieve high-precision upscaling reconstruction for different data sets under the same model parameters, and the trained reconstruction model is generalizable to different data sets in the same geographical location, providing good technical support for the upscaling reconstruction of power grid data.
[0085] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0086] Based on the same inventive concept, the embodiment of the present application also provides a new energy data upscaling reconstruction device based on a generative adversarial network for implementing the new energy data upscaling reconstruction method based on a generative adversarial network. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the new energy data upscaling reconstruction device based on a generative adversarial network provided below can refer to the limitations of the new energy data upscaling reconstruction method based on a generative adversarial network above, and will not be repeated here.
[0087] In an exemplary embodiment, Figure 4 As shown, a new energy data upscaling reconstruction device based on a generative adversarial network is provided, comprising:
[0088] The data processing module 401 is used to obtain the new energy data to be processed, normalize the new energy data and convert the format to obtain a new energy image that meets the pixel point conditions;
[0089] A feature extraction module 402 is used to extract features of the new energy image using the generator in the generative adversarial network model to obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features;
[0090] The parameter adjustment module 403 is used to input the training data set into the generative adversarial network model for training, and use the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model;
[0091] The up-conversion reconstruction module 404 is used to input the new energy data into the target generative adversarial network model for up-conversion reconstruction to obtain high-resolution target new energy data.
[0092] In one embodiment, the new energy data upscaling and reconstruction device based on the generative adversarial network also includes a generator generation module, which is used to use the deep residual neural network as the initial generator to identify the residual block in the deep residual neural network; remove the batch normalization layer in the residual block to obtain the target residual block structure, and obtain the generator based on the target residual block structure.
[0093] In one embodiment, the generative adversarial network model includes a generator and a discriminator; the structure of the generator is: 1 first convolution layer, 1 first activation layer, 16 residual blocks with the same parameters, 1 second convolution layer, 2 combined upsampling layers and 1 third convolution layer are open-loop connected in sequence, and the 16 residual blocks and the second convolution layer constitute a combined residual block; wherein each residual block with the same parameters includes 2 hole convolution layers, 2 batch normalization layers and 2 second activation layers, and its structure is: 1 hole convolution layer, 1 batch normalization layer, 1 second activation layer, 1 hole convolution layer, 1 batch normalization layer and 1 second activation layer is open-loop connected in sequence; each combined upsampling layer includes 1 fourth convolutional layer, 1 2x upsampled sub-pixel layer and 1 third activation layer, and its structure is: 1 fourth convolutional layer, 1 2x upsampled sub-pixel layer and 1 third activation layer are open-loop connected in sequence; the structure of the discriminator is: 1 fifth convolutional layer, 1 fourth activation layer, 7 combined layers, 1 fully connected layer, 1 fifth activation layer, 1 fully connected layer and 1 fifth activation layer are open-loop connected in sequence; among them, the structure of each combined layer is: 1 sixth convolutional layer, 1 batch normalization layer and 1 sixth activation layer are open-loop connected in sequence.
[0094] In one embodiment, the loss function of the generator is: , where: , , is the weighting coefficient, , , , The calculation formula is: , The calculation formula is: as well as The calculation formula is: .
[0095] In one embodiment, the loss function of the discriminator is: ,Each discriminator is fitted through a neural network, which consists of 8 cascaded basic units, linear regression units, activation units, and linear regression units. Each basic unit consists of a cascaded convolutional layer, a batch normalization unit, and an activation unit.
[0096] In one embodiment, the parameter adjustment module 403 is also used to divide the training data set into several batches of training samples, input the training samples into the generative adversarial network model in batch order, and use the small batch gradient descent method to train the generative adversarial network model in batches; when the training of the generative adversarial network model is completed, the hyperparameters of the generative adversarial network model are adjusted using the verification data set until convergence is reached.
[0097] Each module in the above-mentioned new energy data upscaling and reconstruction device based on generative adversarial network can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0098] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a new energy data upscaling reconstruction method based on a generative adversarial network is implemented.
[0099] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0100] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0102] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0104] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0105] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0106] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A new energy data upscaling reconstruction method based on a generative adversarial network, characterized in that: The method comprises: Acquire new energy data to be processed, perform normalization processing and format conversion on the new energy data, and obtain a new energy image that meets pixel point conditions; Using a generator in a generative adversarial network model to extract features of the new energy image, obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features; Inputting the training data set into the generative adversarial network model for training, and using the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model; The new energy data is input into the target generative adversarial network model for upscaling and reconstruction to obtain high-resolution target new energy data.
2. The method according to claim 1, characterized in that Before extracting features of the new energy image using the generator in the generative adversarial network model, the method further includes: Using a deep residual neural network as an initial generator, identifying a residual block in the deep residual neural network; The batch normalization layer in the residual block is removed to obtain a target residual block structure, and the generator is obtained based on the target residual block structure.
3. The method according to claim 2, characterized in that The generative adversarial network model includes the generator and the discriminator; The structure of the generator is: 1 first convolution layer, 1 first activation layer, 16 residual blocks with the same parameters, 1 second convolution layer, 2 combined upsampling layers and 1 third convolution layer are open-loop connected in sequence, and the 16 residual blocks and the second convolution layer form a combined residual block; Among them, each residual block with the same parameters includes 2 dilated convolutional layers, 2 batch normalization layers and 2 second activation layers, and its structure is: 1 dilated convolutional layer, 1 batch normalization layer, 1 second activation layer, 1 dilated convolutional layer, 1 batch normalization layer and 1 second activation layer are open-loop connected in sequence; Each combined upsampling layer includes a fourth convolution layer, a 2x upsampling sub-pixel layer and a third activation layer, and its structure is: a fourth convolution layer, a 2x upsampling sub-pixel layer and a third activation layer are open-loop connected in sequence; The structure of the discriminator is: 1 fifth convolutional layer, 1 fourth activation layer, 7 combination layers, 1 fully connected layer, 1 fifth activation layer, 1 fully connected layer and 1 fifth activation layer are open-loop connected in sequence; wherein, the structure of each combination layer is: 1 sixth convolutional layer, 1 batch normalization layer and 1 sixth activation layer are open-loop connected in sequence.
4. The method according to claim 3, characterized in that The loss function of the generator is: Where: , , is the weighting coefficient, , , , The calculation formula is: , The calculation formula is: as well as The calculation formula is: .
5. The method according to claim 3, characterized in that: The loss function of the discriminator is: Each discriminator is fitted through a neural network and consists of 8 cascaded basic units, a linear regression unit, an activation unit, and a linear regression unit. Each basic unit consists of a cascaded convolutional layer, a batch normalization unit, and an activation unit.
6. The method according to any one of claims 1 to 5, characterized in that: The step of inputting the training data set into the generative adversarial network model for training, and adjusting the hyperparameters of the generative adversarial network model using the verification data set, comprises: Dividing the training data set into several batches of training samples, inputting the training samples into the generative adversarial network model in batch order, and training the generative adversarial network model in batches using a mini-batch gradient descent method; When the training of the generative adversarial network model is completed, the hyperparameters of the generative adversarial network model are adjusted using the validation data set until convergence is achieved.
7. A new energy data upscaling and reconstruction device based on a generative adversarial network, characterized in that: The device comprises: A data processing module is used to obtain new energy data to be processed, normalize and convert the new energy data to obtain a new energy image that meets pixel point conditions; A feature extraction module, used to extract features of the new energy image using a generator in a generative adversarial network model to obtain new energy image features, and obtain a training data set and a verification data set based on the new energy image features; A parameter adjustment module, used to input the training data set into the generative adversarial network model for training, and use the verification data set to adjust the hyperparameters of the generative adversarial network model to obtain a target generative adversarial network model; The up-conversion reconstruction module is used to input the new energy data into the target generative adversarial network model for up-conversion reconstruction to obtain high-resolution target new energy data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.