Photovoltaic output prediction method and device, equipment and storage medium
By combining the combined model of time convolution network, long and short-term memory network and attention mechanism network, the problem of inaccurate existing photovoltaic output prediction methods in complex scenarios is solved, the accuracy of photovoltaic output prediction is improved, and the complex and changeable environment is adapted to photovoltaic power fluctuation scenario.
Patent Information
- Application Number
- CN202411173396.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-11-29
AI Technical Summary
The existing photovoltaic output prediction methods are inaccurate in complex scenarios, making it difficult to adapt to photovoltaic power fluctuations, resulting in inaccurate predictions.
Using a combined model of time convolution network, long and short-term memory network and attention mechanism network, the weather prediction data of the day to be predicted matches the historical weather data, determine a training subset of similar days, and input the weather prediction data into the target prediction model. To obtain photovoltaic output prediction data.
It improves the accuracy of photovoltaic output prediction, can better adapt to complex and variable photovoltaic power fluctuation scenarios, and enhances prediction accuracy.
Smart Images

Figure CN119047643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a photovoltaic output prediction method, device, equipment and storage medium. Background Art
[0002] As the global energy crisis and environmental problems become increasingly serious, the development and utilization of distributed renewable energy has become an important research direction. Among them, the output characteristics of distributed renewable energy are one of the key factors affecting its access to the power grid and its operation effect. Whether the output of distributed renewable energy units can be accurately predicted will have a significant impact on the safe and stable operation of the system.
[0003] In current research, the modeling of distributed renewable energy output characteristics includes data-driven methods. Data-driven methods can improve the error distribution characteristics and effectively improve the quality of interval probability prediction by fitting the model itself. Data-driven methods include machine learning methods, etc. Machine learning methods can directly mine the change rules from meteorological, photovoltaic output historical data and NWP data for prediction, and are the main method and research hotspot for photovoltaic output prediction.
[0004] However, existing data-driven methods mostly use a single model, which can only solve prediction problems in specific scenarios and is difficult to adapt to complex and changeable photovoltaic power fluctuation scenarios, resulting in inaccurate photovoltaic output predictions. Summary of the invention
[0005] The present invention provides a photovoltaic output prediction method, device, equipment and storage medium to solve the problem of inaccurate photovoltaic output prediction in complex scenarios.
[0006] In a first aspect, the present invention provides a photovoltaic output prediction method, comprising:
[0007] Get the weather forecast data for the day to be predicted;
[0008] Matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data;
[0009] The weather forecast data is input into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output forecast data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
[0010] In a second aspect, the present invention provides a photovoltaic output prediction device, comprising:
[0011] A data acquisition module is used to obtain weather forecast data for the day to be predicted;
[0012] A training subset determination module, used for matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data;
[0013] The photovoltaic output prediction module is used to input the weather forecast data into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output prediction data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
[0014] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0015] at least one processor;
[0016] and a memory communicatively coupled to the at least one processor;
[0017] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the photovoltaic output prediction method of the first aspect.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the photovoltaic output prediction method of the first aspect when executed.
[0019] The photovoltaic output prediction scheme provided by the present invention obtains weather forecast data for the day to be predicted, matches the weather forecast data with historical weather data to determine a similar day training subset from multiple training subsets of the historical weather data, and inputs the weather forecast data into a target prediction model corresponding to the similar day training subset to obtain photovoltaic output prediction data for the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network, and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model. By adopting the above technical scheme, the weather forecast data for the day to be predicted and the historical weather data are matched to determine a combined model corresponding to the similar day training subset that matches the weather forecast data, i.e., a target prediction model. The target prediction model can better adapt to complex and changeable photovoltaic power fluctuation scenarios and improve the accuracy of photovoltaic output prediction.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a photovoltaic output prediction method provided according to the first embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a network structure of a temporal convolutional network provided according to the first embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of a network structure of a long short-term memory network provided according to the first embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a network structure of an attention mechanism network provided according to Embodiment 1 of the present invention;
[0026] Figure 5 is a flow chart of a photovoltaic output prediction method provided according to Embodiment 2 of the present invention;
[0027] Figure 6 is a schematic diagram of a network structure of a target prediction model provided according to Embodiment 2 of the present invention;
[0028] Figure 7 is a schematic diagram of the structure of a photovoltaic output prediction device provided according to Embodiment 3 of the present invention;
[0029] Figure 8 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 A flowchart of a photovoltaic output prediction method is provided for Embodiment 1 of the present invention. This embodiment is applicable to situations where photovoltaic output is predicted. The method can be executed by a photovoltaic output prediction device. The photovoltaic output prediction device can be implemented in the form of hardware and / or software. The photovoltaic output prediction device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.
[0034] like Figure 1 As shown, a photovoltaic output prediction method provided by the first embodiment of the present invention specifically includes the following steps:
[0035] S101, obtaining weather forecast data for the day to be predicted.
[0036] In this embodiment, weather forecast data of the day to be predicted can be obtained from relevant websites, etc. The day to be predicted is a future day.
[0037] S102: Match the weather forecast data and the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data.
[0038] In this embodiment, the historical weather data may be a set of multiple training subsets. The weather forecast data and the historical weather data may be matched to determine a similar day training subset that matches the weather forecast data of the day to be predicted from the multiple training subsets.
[0039] S103. Input the weather forecast data into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output forecast data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
[0040] Specifically, TCN (Temporal Convolutional Network) can be used for time series data processing. Temporal convolutional network is a neural network model that uses causal convolution and dilated convolution. It can adapt to the temporal nature of time series data and provide a field of view for time series modeling. TCN has the advantages of feature extraction, avoiding common defects of recursive models and parallel computing. Figure 2 This is a schematic diagram of the network structure of a temporal convolutional network. Figure 2 As shown in the figure, the value at time t only depends on the value at time t-1 and before. The difference from the traditional convolutional neural network is that the causal convolution in the time series convolutional network cannot see future data. It is a unidirectional structure, not a bidirectional one. In other words, there must be a cause before there can be a consequence. It is a strict time constraint model that conforms to the deduction process of photovoltaic output prediction. Secondly, unlike traditional convolution, the dilated convolution in the time series convolutional network allows the input to be sampled at intervals during the convolution, and the sampling rate is determined by Figure 2 d control in. Figure 2 The d=1 of the bottom layer means that each point is sampled during the input process, and the d=2 of the middle layer means that every 2 points are sampled as input during the input process. Generally speaking, the higher the level, the larger the value of d. Therefore, the dilated convolution makes the size of the effective window grow exponentially with the number of layers. In this way, the convolutional network can use fewer layers to obtain a large receptive field, thereby enabling the model to obtain sufficiently long data features during training.
[0041] Figure 3 The figure is a schematic diagram of the network structure of a long short-term memory network. As an improved model of recurrent neural network (RNN), the long short-term memory network (LSTM) solves the problem of gradient disappearance or explosion during long-term sequence training of RNN by introducing gated units. Figure 3 As shown, the gating unit of the long short-term memory network contains a forget gate f t , input gate i t , output gate o t The forget gate is responsible for determining the unit state C at the previous moment. t-1 The input gate is responsible for updating the current cell state Ct , determine the current input X t , keep to C t The output gate is responsible for determining the hidden state vector h at the next moment t , so that the long short-term memory network can better analyze the interdependence before and after the time series data. The long short-term memory network can better analyze the interdependence before and after the time series data. However, the long short-term memory network has gradient problems and long model training time problems. Combining the temporal convolutional network and the long short-term memory network can give full play to their respective advantages and solve the above problems.
[0042] Figure 4 The following is a schematic diagram of the network structure of an attention mechanism network. The attention mechanism (ME) is a simulation of the human brain's attention allocation form. Its essence is to change the weight of the features in the hidden layer. The attention mechanism network can reasonably screen out a small number of key features from a large number of features, and assign more weight to them, reduce the weight of non-key features, and thus highlight the impact of key features. This mechanism breaks the limitation of the traditional encoder-decoder structure that relies on internal fixed-length vectors during encoding and decoding. By calculating the correlation score between the hidden layer vector of the input sequence and the output, the attention weight of the hidden layer vector is obtained, which helps the model extract key information from the input according to the size of the attention weight and reduce the impact of irrelevant parts. When the long short-term memory network predicts photovoltaic power, the meteorological factors at each moment in the input data have different impacts on the current photovoltaic power, but the long short-term memory network still encodes and decodes the input sequence into a fixed-length hidden vector and assigns the same weight. When the input sequence is relatively long, the hidden vectors with the same weight make the model have no discrimination for the input sequence, making it difficult to retain key information, causing the model to ignore key timing information, resulting in reduced prediction accuracy. Combining the long short-term memory network with the attention mechanism network can solve this problem. The attention mechanism network calculates the correlation score between the hidden layer vector of the input sequence and the output, assigns different attention weights to the meteorological data, and highlights the key influencing factors, thereby solving the problem that the model is difficult to retain key information when the input sequence is long. Therefore, the prediction model obtained by combining the temporal convolutional network, the long short-term memory network and the attention mechanism network can further improve the accuracy of photovoltaic power prediction.
[0043] In this embodiment, the prediction model can be trained in advance using the training subsets. Different training subsets have different weather data, and the prediction models corresponding to different training subsets are also different. The weather prediction data can be input into the target prediction model corresponding to the similar day training subset, and the target prediction model can output the photovoltaic output prediction data for the day to be predicted.
[0044] The photovoltaic output prediction method provided by the embodiment of the present invention obtains weather forecast data for the day to be predicted, matches the weather forecast data with historical weather data to determine a similar day training subset from multiple training subsets of the historical weather data, and inputs the weather forecast data into a target prediction model corresponding to the similar day training subset to obtain photovoltaic output prediction data for the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network, and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model. The technical solution of the embodiment of the present invention matches the weather forecast data for the day to be predicted with historical weather data to determine a combined model corresponding to the similar day training subset that matches the weather forecast data, i.e., a target prediction model, which can better adapt to complex and changeable photovoltaic power fluctuation scenarios and improve the accuracy of photovoltaic output prediction.
[0045] Embodiment 2
[0046] Figure 5 This is a flow chart of a photovoltaic output prediction method provided in the second embodiment of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for predicting photovoltaic output is given.
[0047] Optionally, the step of inputting the weather forecast data into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output forecast data for the day to be predicted includes: inputting the weather forecast data into the temporal convolutional network of the target prediction model corresponding to the similar day training subset to obtain the first data to be processed; inputting the first data to be processed into the long short-term memory network of the target prediction model to obtain the second data to be processed; inputting the second data to be processed into the attention mechanism network of the target prediction model to obtain the photovoltaic output forecast data for the day to be predicted. The advantage of this setting is that the photovoltaic output is predicted using the target prediction model including TCN, LSTM and Attention, which can give play to the advantages of each network, avoid the defects of single model prediction, and improve the model prediction accuracy.
[0048] like Figure 5 As shown, a photovoltaic output prediction method provided by the second embodiment of the present invention specifically includes the following steps:
[0049] S201. Obtain weather forecast data for the day to be predicted.
[0050] S202: Match the weather forecast data and the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data.
[0051] S203: Input the weather forecast data into the temporal convolutional network of the target prediction model corresponding to the similar day training subset to obtain first data to be processed.
[0052] For example, Figure 6 Figure 1 is a schematic diagram of the network structure of a target prediction model. Figure 6 As shown, the weather forecast data x0, x1, x2, ..., x t-2 、x t-1 、x t Input the time convolutional network of the target prediction model to obtain the first data to be processed (h t-1 , x t ).
[0053] Optionally, a method for determining a prediction model includes: obtaining historical data of numerical weather forecast (NWP), and determining key weather indicators from the historical NWP data; clustering the key weather indicators using a Kmeans++ algorithm to obtain training subsets under multiple different weather conditions; and training an initial prediction model using the training subsets and actual photovoltaic power to obtain a prediction model, wherein the actual photovoltaic power is the power actually emitted by the photovoltaic on the date corresponding to the key weather indicators in the training subset of similar days.
[0054] Specifically, key weather indicators can be understood as indicators with strong correlation in NWP historical data. The Kmeans++ algorithm is an unsupervised clustering algorithm. Its idea is: for a given sample set, the sample set is divided into K clusters according to the distance between the samples, so that the points in the cluster are as closely connected as possible, and the distance between the clusters is as large as possible. The Kmeans++ algorithm is used to divide the photovoltaic daily output into major categories so that the data in the same major category have similarity. The Kmeans++ algorithm is an optimization of the Kmeans algorithm. Compared with the Kmeans algorithm, the selection of the initial point is less random and more reasonable. The Kmeans++ algorithm can be used to cluster the key weather indicators while considering the shape of the photovoltaic daily output curve to obtain training subsets under different weather types. By using the Kmeans++ clustering algorithm to classify key weather indicators, it helps to highlight key features, thereby making the model training more targeted, effectively improving the prediction accuracy, and at the same time improving the model training speed.
[0055] The process of clustering key weather indicators using the Kmeans++ algorithm includes:
[0056] (1) Randomly select a data point from the input key weather indicators as the first cluster center;
[0057] (2) For each data point xi in the key weather indicator, calculate its distance D(x) to the nearest cluster center among the selected cluster centers;
[0058] (3) Select a new data point as the new cluster center. The selection principle is: the point with larger D(x) has a higher probability of being selected as the cluster center;
[0059] (4) Repeat steps b and c until k cluster centroids are selected;
[0060] (5) Use these k centroids as the initial centroids to execute the standard K-Means algorithm process.
[0061] K-means algorithm, the process is as follows:
[0062] 1) First determine the number of key weather indicator clusters k;
[0063] 2) Randomly select k data from the key weather indicators as the initial centroid;
[0064] 3) Calculate the distance from each data point in the key weather indicator to each centroid, and classify the data into the category to which the centroid with the smallest distance belongs;
[0065] 4) Recalculate the centroid according to the clustering results. When the centroid calculated this time is exactly the same as the previous centroid (or converges), stop the iteration;
[0066] Otherwise update the centroid and continue with steps 2), 3) and 4).
[0067] The number of clusters k can be determined by using the Elbow Method, so that the distance within the cluster is as small as possible and the distance between clusters is as large as possible.
[0068] Optionally, determining the key weather indicators from the NWP historical data includes: determining a distance correlation coefficient DCC of each weather indicator in the NWP historical data, and eliminating weather indicators corresponding to DCCs that are less than a preset threshold to obtain key weather indicators.
[0069] Specifically, DCC takes into account the nonlinear correlation between variables, which can be used to represent the correlation of various weather indicators in NWP. Weather indicators corresponding to DCCs that are less than a preset threshold can be eliminated to obtain key weather indicators. The process of determining the distance correlation coefficient DCC of each weather indicator in NWP historical data includes:
[0070]
[0071] Among them, dcov(u,v) is used to describe the independence between two weather indicators u and v. When dcorr(u,v) = 0, it means that the two weather indicators u and v are independent; the larger the dcorr(u,v), the stronger the correlation between u and v. Assume {(u i ,v i ),i=1,2,…n} is a random sample of the population (u,v). Among them, and They are:
[0072]
[0073]
[0074]
[0075] Optionally, before using the training subset and the photovoltaic actual power to train the initial prediction model to obtain the prediction model, it also includes: using the 3-sigma criterion to eliminate outliers on the initial photovoltaic actual power to obtain an elimination result, and using linear interpolation to fill in missing data in the elimination result to obtain the photovoltaic actual power.
[0076] Specifically, the 3-sigma criterion can be used to identify abnormal photovoltaic data in the initial photovoltaic actual power, and the abnormal data can be deleted to obtain a removal processing result. Then, the linear interpolation method is used to fill in the missing data in the removal processing result to obtain the photovoltaic actual power.
[0077] Optionally, the use of the training subset and the actual photovoltaic power to train the initial prediction model to obtain the prediction model includes: iteratively optimizing the initial prediction model by using the training subset to obtain the prediction model, wherein the average absolute error between the output of the prediction model and the actual photovoltaic power is less than a preset value.
[0078] Specifically, the model parameters may be iteratively optimized to minimize the mean absolute error between the predicted power and the actual power.
[0079] S204: Input the first data to be processed into the long short-term memory network of the target prediction model to obtain second data to be processed.
[0080] For example, Figure 6 As shown, the first data to be processed (h t-1 , x t ) is input into the long short-term memory network of the target prediction model to obtain the second data to be processed h t .
[0081] S205. Input the second data to be processed into the attention mechanism network of the target prediction model to obtain the photovoltaic output prediction data of the day to be predicted.
[0082] Optionally, the photovoltaic output prediction data includes photovoltaic prediction power with a preset time resolution. Figure 6 As shown, the second data to be processed h t Input the attention mechanism network of the target prediction model to obtain the photovoltaic prediction power y0, y1, ..., y n+1 ,y n When n = 23, y0, y1, ..., y n+1 ,y n Indicates the 24-hour photovoltaic forecast power.
[0083] The photovoltaic output prediction method provided in the embodiment of the present invention uses a combined model target prediction model including TCN, LSTM and Attention to predict photovoltaic output, which can give full play to the advantages of each network, avoid the defects of single model prediction, and improve the model prediction accuracy. At the same time, this method also has good scalability and can be applied to other distributed new energy outputs.
[0084] Embodiment 3
[0085] Figure 7 This is a schematic diagram of the structure of a photovoltaic output prediction device provided by Embodiment 3 of the present invention. Figure 7 As shown, the device includes: a data acquisition module 301, a training subset determination module 302 and a photovoltaic output prediction module 303, wherein:
[0086] A data acquisition module is used to obtain weather forecast data for the day to be predicted;
[0087] A training subset determination module, used for matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data;
[0088] The photovoltaic output prediction module is used to input the weather forecast data into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output prediction data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
[0089] The photovoltaic output prediction device provided by the embodiment of the present invention matches the weather forecast data of the day to be predicted with the historical weather data to determine a combined model corresponding to a similar day training subset matching the weather forecast data, i.e., a target prediction model. The target prediction model can better adapt to the complex and changeable photovoltaic power fluctuation scenarios and improve the accuracy of photovoltaic output prediction.
[0090] Optionally, the photovoltaic output prediction module includes:
[0091] Inputting the weather forecast data into the temporal convolutional network of the target prediction model corresponding to the similar day training subset to obtain first data to be processed;
[0092] Inputting the first data to be processed into the long short-term memory network of the target prediction model to obtain second data to be processed;
[0093] The second data to be processed is input into the attention mechanism network of the target prediction model to obtain the photovoltaic output prediction data of the day to be predicted.
[0094] Optionally, a method for determining a prediction model includes: obtaining historical data of numerical weather forecast (NWP), and determining key weather indicators from the historical NWP data; clustering the key weather indicators using a Kmeans++ algorithm to obtain training subsets under multiple different weather conditions; and training an initial prediction model using the training subsets and actual photovoltaic power to obtain a prediction model, wherein the actual photovoltaic power is the power actually emitted by the photovoltaic on the date corresponding to the key weather indicators in the training subset of similar days.
[0095] Furthermore, determining the key weather indicators from the NWP historical data includes: determining a distance correlation coefficient DCC of each weather indicator in the NWP historical data, and eliminating weather indicators corresponding to DCCs that are less than a preset threshold to obtain key weather indicators.
[0096] Furthermore, before using the training subset and the photovoltaic actual power to train the initial prediction model to obtain the prediction model, it also includes: using the 3-sigma criterion to eliminate outliers on the initial photovoltaic actual power to obtain an elimination result, and using linear interpolation to fill in the missing data in the elimination result to obtain the photovoltaic actual power.
[0097] Furthermore, the using the training subset and the actual photovoltaic power to train the initial prediction model to obtain the prediction model includes:
[0098] The initial prediction model is iteratively optimized by using the training subset to obtain a prediction model, wherein the average absolute error between the output of the prediction model and the actual photovoltaic power is less than a preset value.
[0099] Optionally, the photovoltaic output prediction data includes photovoltaic predicted power with a preset time resolution.
[0100] The photovoltaic output prediction device provided in the embodiment of the present invention can execute the photovoltaic output prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0101] Embodiment 4
[0102] Figure 8 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0103] like Figure 8 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0104] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0105] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a photovoltaic output prediction method.
[0106] In some embodiments, the photovoltaic output prediction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the photovoltaic output prediction method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the photovoltaic output prediction method in any other appropriate manner (e.g., by means of firmware).
[0107] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0109] The computer device provided above can be used to execute the photovoltaic output prediction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0110] Embodiment 5
[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a photovoltaic output prediction method, the method comprising:
[0112] Get the weather forecast data for the day to be predicted;
[0113] Matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data;
[0114] The weather forecast data is input into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output forecast data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] The computer device provided above can be used to execute the photovoltaic output prediction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0117] It is worth noting that in the embodiment of the above-mentioned photovoltaic output prediction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0118] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A photovoltaic output prediction method, characterized in that: include: Get the weather forecast data for the day to be predicted; Matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data; The weather forecast data is input into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output forecast data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
2. The method according to claim 1, characterized in that: The step of inputting the weather forecast data into the target forecast model corresponding to the similar day training subset to obtain the photovoltaic output forecast data for the day to be forecasted includes: Inputting the weather forecast data into the temporal convolutional network of the target prediction model corresponding to the similar day training subset to obtain first data to be processed; Inputting the first data to be processed into the long short-term memory network of the target prediction model to obtain second data to be processed; The second data to be processed is input into the attention mechanism network of the target prediction model to obtain the photovoltaic output prediction data of the day to be predicted.
3. The method according to claim 1, characterized in that: The prediction model is determined by: Obtaining numerical weather forecast (NWP) historical data, and determining key weather indicators from the NWP historical data; The key weather indicators are clustered using the Kmeans++ algorithm to obtain a plurality of training subsets under different weather conditions; The initial prediction model is trained using the training subset and the actual photovoltaic power to obtain a prediction model, wherein the actual photovoltaic power is the power actually emitted by the photovoltaic power on the date corresponding to the key weather indicator in the similar day training subset.
4. The method according to claim 3, characterized in that Determining key weather indicators from the NWP historical data includes: The distance correlation coefficient DCC of each weather indicator in the NWP historical data is determined, and the weather indicators corresponding to the DCC that are less than a preset threshold are eliminated to obtain key weather indicators.
5. The method according to claim 3, characterized in that: Before the initial prediction model is trained using the training subset and the actual photovoltaic power to obtain the prediction model, the method further includes: The initial photovoltaic actual power is subjected to outlier elimination processing by using the 3-sigma criterion to obtain an elimination processing result, and the missing data in the elimination processing result is filled by using a linear interpolation method to obtain the photovoltaic actual power.
6. The method according to claim 3 or 5, characterized in that: The using the training subset and the actual photovoltaic power to train the initial prediction model to obtain the prediction model includes: The initial prediction model is iteratively optimized by using the training subset to obtain a prediction model, wherein the average absolute error between the output of the prediction model and the actual photovoltaic power is less than a preset value.
7. The method according to claim 1, characterized in that The photovoltaic output prediction data includes photovoltaic predicted power with a preset time resolution.
8. A photovoltaic output prediction device, characterized in that: include: A data acquisition module is used to obtain weather forecast data for the day to be predicted; A training subset determination module, used for matching the weather forecast data with the historical weather data to determine a similar day training subset from a plurality of training subsets of the historical weather data; The photovoltaic output prediction module is used to input the weather forecast data into the target prediction model corresponding to the similar day training subset to obtain the photovoltaic output prediction data of the day to be predicted, wherein the target prediction model includes a temporal convolutional network, a long short-term memory network and an attention mechanism network, and the similar day training subset is the training sample data corresponding to the target prediction model.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the photovoltaic output prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the photovoltaic output prediction method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Method and system for predicting distributed photovoltaic output in changeable weather
CN120892843A
