Dynamic Prediction Method and System for Photovoltaic Power Generation Based on Information Text Feature Extraction
By dynamically adjusting the hyperparameters and information text feature extraction of Transformer, the accuracy of photovoltaic power generation prediction and computing resource consumption problems are solved, more efficient prediction and stronger adaptability are achieved, and smart grid scheduling is supported.
Patent Information
- Application Number
- CN202510550092.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing PV power generation prediction methods have shortcomings in accuracy and computing resource consumption, especially the standard Transformer model has challenges in hyperparameter selection and model generalization capabilities, which are difficult to adapt to complex environmental conditions.
Multi-layer perceptron (MLP) is used to dynamically adjust the hyperparameters of Transformer, combine information text feature extraction, data digest through model T5 and convert it into embedded vectors, and prediction is used by multi-head attention mechanism to enhance the adaptability and accuracy of the model.
It improves the accuracy and robustness of photovoltaic power generation prediction, reduces the consumption of computing resources, enhances the adaptability of the model under different climatic conditions, and supports smart grid scheduling and new energy management.
Smart Images

Figure CN120073723B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a dynamic prediction method, system, storage medium and computing device for photovoltaic power generation based on information text feature extraction. Background Art
[0002] Photovoltaic power generation, as a clean and renewable energy source, has been widely applied and developed in recent years. With the increasing global demand for sustainable energy, photovoltaic power generation has gradually become an important way to address the energy crisis and reduce carbon emissions. However, the photovoltaic power generation is affected by various factors, such as weather, seasonal changes, geographical location, environmental temperature, light intensity, etc. The complexity and uncertainty of these factors make it a key issue to accurately predict the photovoltaic power generation for power system dispatching, energy efficiency management and grid load balancing.
[0003] Currently, the prediction methods of photovoltaic power generation can be mainly divided into two categories: physical model-based methods and data-driven methods. Physical model-based methods rely on the physical characteristics of the photovoltaic system and the mathematical models of the external environment for prediction. These methods usually require accurate meteorological data and photovoltaic system parameters, and have weak adaptability to environmental changes, resulting in limited prediction accuracy. Data-driven methods, such as machine learning and deep learning methods, automatically learn the complex relationship between power generation and environmental factors by analyzing historical data, and have become the mainstream of photovoltaic power generation prediction in recent years.
[0004] The application of deep learning methods in photovoltaic power generation prediction mainly includes recurrent neural network (RNN), long short-term memory network (LSTM), Transformer, etc. Among them, the Transformer model shows excellent performance in time series modeling with its powerful self-attention mechanism. Compared with traditional RNN and LSTM, Transformer can simultaneously focus on the long-term and short-term dependencies of time series data, improving the accuracy and stability of prediction. However, the standard Transformer still faces some challenges in photovoltaic power generation prediction, such as the problem of hyperparameter selection and the optimization of model generalization ability.
[0005] To address these issues, this study introduces a hyperparameter prediction mechanism that dynamically adjusts the query, key, and value matrices of the Transformer through a multi-layer perceptron (MLP) to adapt to the photovoltaic power generation prediction task under different environmental conditions. This method can adaptively optimize the Transformer structure according to data characteristics and improve the model's prediction ability in complex environments. In addition, to further enhance the model's expressive power, we use text embedding as additional context information, enabling the model to make more accurate predictions by combining historical data with external information.
[0006] This study combines the Transformer prediction model with a hyperparameter adaptive adjustment strategy to improve the accuracy and robustness of photovoltaic power generation prediction. This method can not only effectively model the complex relationship between photovoltaic power generation and environmental factors but also enhance the model's adaptability under different climate conditions, providing more reliable technical support for smart grid scheduling and new energy management. Summary of the Invention
[0007] The first objective of the present invention is to overcome the disadvantages and deficiencies in the prior art and provide a dynamic prediction method for photovoltaic power generation based on information text feature extraction. By exploring the deeper relationship between meteorological conditions and power generation, this method dynamically adjusts the hyperparameter configuration of the prediction model, effectively solving the problems of low accuracy and high computational resource consumption in existing photovoltaic power generation predictions, and playing a key role in subsequent evaluations of the utilization rate of photovoltaic systems, diagnosis of photovoltaic power generation anomalies, and optimization of the usage methods of photovoltaic systems.
[0008] The second objective of the present invention is to provide a dynamic prediction system for photovoltaic power generation based on information text feature extraction.
[0009] The third objective of the present invention is to provide a storage medium.
[0010] The fourth objective of the present invention is to provide a computing device.
[0011] The first objective of the present invention is achieved through the following technical solutions: A dynamic prediction method for photovoltaic power generation based on information text feature extraction, including the following steps:
[0012] S1, Preprocess the power generation data and meteorological data recorded in the photovoltaic power generation system;
[0013] S2, Fine-tune the model T5 and train the model T5 using the existing power generation data and meteorological data;
[0014] S3, Use the fine-tuned model T5 in S2 to extract summaries from the power generation data and meteorological data in S1 and convert them into embedding vectors;
[0015] S4. Use a multi-layer perceptron (MLP) to recommend hyperparameter suggestions for the prediction model Transformer based on the embedded vectors in S3.
[0016] S5. The prediction model Transformer uses the hyperparameter suggestions in S4 for model training.
[0017] S6. Use the trained prediction model Transformer in S5 to predict future power generation based on the existing power generation data, meteorological data, and future meteorological data.
[0018] Furthermore, in S1, the specific situation of preprocessing the power generation data and meteorological data recorded in the photovoltaic power generation system is as follows:
[0019] a. Collect the power generation data and meteorological data recorded in the photovoltaic power generation system.
[0020] b. Identify the missing values and outliers recorded in a.
[0021] c. Mark and process the missing values and outliers identified in b. The processing method is to replace the missing values and outliers with the average of the values before and after them.
[0022] d. Standardize the timestamps recorded in c, and uniformly convert the time to Unix timestamps. The conversion formula is:
[0023] ;
[0024] where UTC is the local time zone.
[0025] e. Normalize the data in d, compress the data to a unified range, that is, within 0 to 1. The normalization calculation formula is:
[0026] ;
[0027] where is the data value to be normalized, is the data value in the maximum value of the column where the data value is located, is the data value in the minimum value of the column where it is located;
[0028] f. Convert the power generation data and meteorological data after the missing value and outlier processing in step c, the timestamp standardization in step d, and the numerical normalization in step e into a text format in natural language.
[0029] Further, in S2, the model T5 (Text-To-Text Transfer Transformer) is a general text processing model based on the Transformer architecture. By unifying various NLP tasks into the form of "text-to-text", it uses transfer learning to achieve multi-task processing in pre-training and fine-tuning.
[0030] Further, in S2, the specific situation of fine-tuning the model T5 using the existing power generation data and meteorological data to train the model T5 is as follows:
[0031] a. Collect power generation data and meteorological data related to photovoltaic power generation;
[0032] b. Use the data in a to fine-tune the model T5 and train the model T5 to extract a high-precision summary according to the text format of the power generation data and meteorological data.
[0033] Further, in S3, the specific situation of using the fine-tuned model T5 to extract a summary from the text format of the power generation data and meteorological data in step 1) and convert it into an embedding vector is as follows:
[0034] a. Use the fine-tuned model T5 to extract a summary from the power generation data and meteorological data in S1;
[0035] b. Split the summary extracted in a into sub-word units, that is , where represents the th sub-word unit in the text;
[0036] c. Use the tokenizer of the fine-tuned model T5 to convert the sub-word units in b into corresponding input IDs. The form of the Input IDs is: , where is the start token, is the separator token;
[0037] d. The encoder of the fine-tuned model T5 generates an embedding vector for each input ID in the Input IDs in c to obtain an embedding vector set , where is the embedding vector of the th sub-word unit, is the hidden layer dimension;
[0038] e. Perform average pooling on the embedding vectors of all sub-word units to obtain the embedding vector of the entire text. The calculation formula for average pooling is:
[0039] ;
[0040] where is the number of sub - word units;
[0041] f. Embed the entire text obtained in e v avg Combine with other meteorological features x to obtain an input vector where k is the dimension of the meteorological feature.
[0042] Furthermore, in S4, the prediction model Transformer is an architecture based on self - attention mechanism and feed - forward neural network, performing sequence - to - sequence mapping through an encoder - decoder structure, and using a multi - head attention mechanism to capture global dependencies; the multi - layer perceptron MLP is a feed - forward neural network composed of multiple fully - connected layers and non - linear activation functions.
[0043] Furthermore, in S4, the specific situation of using the multi - layer perceptron MLP to generate hyperparameter suggestions for the prediction model Transformer according to the embedding vector in S3 is as follows:
[0044] a. The multi - layer perceptron MLP generates dynamically adjusted parameters through forward propagation according to the embedding vector in S3 That is The calculation formula for the dynamically adjusted parameters is:
[0045] ;
[0046] where and are the weights and biases of the first layer, and are the weights and biases of the second layer, ReLU is the activation function, and Tanh restricts the output to be between [−1, 1];
[0047] b. Use the dynamically adjusted parameters in a to adjust the query weight matrix W Query in the prediction model Transformer, W Key the key weight matrix W Value and the value weight matrix
[0048] ;
[0049] c. Use the dynamically weighted matrix in b to calculate the query matrix Query the key matrix Key and the value matrix Value The matrix calculation formula is:
[0050] ;
[0051] Among them, X is the input feature matrix.
[0052] Furthermore, in S5, the specific situation where the prediction model Transformer uses the hyperparameter suggestions in S4 for model training is as follows:
[0053] a. Transformer uses the dynamic query matrix Query and the dynamic key matrix Key to calculate the dot product to obtain the attention scores. The calculation formula for the attention scores is:
[0054] ;
[0055] Among them, T represents the matrix transpose operation, and then the attention scores are normalized through the softmax function. The normalization formula is:
[0056] ;
[0057] b. Use the attention weights to perform weighted summation on the dynamic value matrix Value to obtain the final output. The calculation formula is
[0058] .
[0059] Furthermore, in S6, use the model trained in S5 to predict the future power generation according to the data collected in S1 and the future meteorological data.
[0060] The second object of the present invention is achieved through the following technical solutions: A photovoltaic power generation dynamic prediction system based on information text feature extraction, used to implement the above-mentioned photovoltaic power generation dynamic prediction method based on information feature extraction of this article, and it includes:
[0061] A data processing module, used to process the data values and data formats recorded in the photovoltaic power generation system;
[0062] A model fine-tuning module, used to fine-tune the model T5 and train the model T5 using the existing power generation data and meteorological data;
[0063] A summary extraction and embedding vector conversion module, used to fine-tune the model T5 to extract the summaries of the power generation data and meteorological data and perform embedding vector conversion;
[0064] A prediction model parameter recommendation module, used to recommend hyperparameter suggestions for the prediction model training by the multi-layer perceptron MLP;
[0065] A prediction model training module for training the prediction model Transformer using hyperparameter suggestions;
[0066] The third object of the present invention is achieved by the following technical solution: A storage medium stores a program, and when the program is executed by a processor, the dynamic prediction method of photovoltaic power generation amount based on the extraction of text information features described above is realized.
[0067] The fourth object of the present invention is achieved by the following technical solution: A computing device includes a device and a memory for storing a program executable by a processor. When the processor executes the program stored in the memory, the dynamic prediction method of photovoltaic power generation amount based on the extraction of text information features described above is realized.
[0068] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0069] 1. For the first time, the present invention considers from the perspective of extracting information feature summaries, uses the model T5 to perform high-precision summary extraction on power generation data and meteorological data, can capture the complex relationship between weather conditions and power generation, and improves the feature capture ability.
[0070] 2. For the first time, the present invention adopts the method of dynamically adjusting model parameters based on variable time-series data, automatically selects appropriate model training parameters according to power generation data and meteorological data in different time ranges, reduces ineffective searches, and improves the hyperparameter tuning efficiency.
[0071] 3. For the first time, the present invention fuses text summaries and numerical features, realizes the deep fusion of multi-modal data, improves the utilization value of data, enhances the ability to establish complex non-linear relationship models, and thus improves the prediction accuracy.
[0072] 4. For the first time, the present invention combines the fine-tuned model T5, enables the model with generalization ability to be better at solving the problems in photovoltaic power generation amount prediction, and enhances the adaptability of the prediction model.
[0073] 5. The present invention has a wide range of application spaces in the improvement and enhancement of the photovoltaic power generation amount prediction method, and has broad prospects in improving the prediction accuracy of photovoltaic power generation amount. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a schematic logic flow diagram of the method of the present invention;
[0075] Figure 2 It is an architecture diagram of the system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] The present invention will be further described below with reference to specific embodiments.
[0077] Such asFigure 1 As shown in Figure 1 , this embodiment discloses a dynamic prediction method for photovoltaic power generation based on information text feature extraction. First, the power generation data and meteorological data recorded in the photovoltaic power generation system are collected and preprocessed. Then, the existing dataset is used to fine-tune the model T5. After that, the model T5 extracts the summary of the preprocessed data and converts the summary into an embedding vector. Then, the multi-layer perceptron MLP recommends the dynamic hyperparameter suggestions of the prediction model according to the embedding vector. After that, the prediction model is trained with the hyperparameter suggestions and predicts the future power generation. It includes the following steps:
[0078] S1. The specific situations of preprocessing the power generation data and meteorological data recorded in the photovoltaic power generation system are as follows:
[0079] a. Collect the power generation data and meteorological data recorded in the photovoltaic power generation system;
[0080] b. Identify the missing values and outliers recorded in a;
[0081] c. Mark and process the missing values and outliers identified in b. The processing method is to replace the missing values and outliers with the average values of the previous and next values of the missing values and outliers;
[0082] d. Standardize the timestamps recorded in c, and uniformly convert the time to Unix timestamp. The conversion formula is:
[0083] ;
[0084] where UTC is the local time zone;
[0085] e. Normalize the data in d, and compress the data to a unified range, that is, within 0 to 1. The normalization calculation formula is:
[0086] ;
[0087] where is the data value to be normalized, is the maximum value in the column where the data value is located, is the minimum value in the column where the data value is located;
[0088] f. Convert the power generation data and meteorological data after the missing value and outlier processing in step c, the timestamp standardization in step d, and the numerical normalization in step e into the text format of natural language.
[0089] Adopting the above steps, taking the power generation data and meteorological data of the photovoltaic power station DFor example, after marking and smoothing missing values and outliers, unifying the timestamp format, and finally normalizing, the standardized data is obtained. D standard As shown, finally, the standardized data D standard is converted to text format. T .
[0090] S2. Fine-tune the model T5. Use the existing power generation data and meteorological data to train the model T5 to obtain a fine-tuned model T5 for photovoltaic power generation prediction. The model T5 (Text-To-Text Transfer Transformer) is a general text processing model based on the Transformer architecture. By unifying various NLP tasks into the form of "text-to-text", it uses transfer learning to achieve multi-task processing in pre-training and fine-tuning.
[0091] The specific situation of fine-tuning the model T5 using the existing power generation data and meteorological data is as follows:
[0092] a. Collect power generation data and meteorological data related to photovoltaic power generation.
[0093] b. Use the data in a to fine-tune the model T5 and train the model T5 to extract high-precision summaries from the text formats of power generation data and meteorological data.
[0094] By adopting the above steps, a fine-tuned model T5 for photovoltaic power generation prediction scenarios is obtained.
[0095] S3. The specific situation of using the fine-tuned model T5 to extract summaries from the text formats of power generation data and meteorological data in S1 and convert them into embedding vectors is as follows:
[0096] a. Use the fine-tuned model T5 to extract summaries from the power generation data and meteorological data in S1.
[0097] b. Split the summary extracted in a into sub-word units, that is , where represents the th sub-word unit in the text
[0098] c. Use the tokenizer of the fine-tuned model T5 to convert the sub-word units in b into corresponding input IDs. The form of Input IDs is: , where is the start token, is the separator token.
[0099] d. The encoder of the fine-tuned model T5 generates the embedding vectors of each input ID in the Input IDs in c, obtaining a set of embedding vectors , where is the embedding vector of the th sub-word unit, and is the hidden layer dimension;
[0100] e. Average pooling is performed on the embedding vectors of all sub-word units to obtain the embedding vector of the entire text. The calculation formula for average pooling is:
[0101] ;
[0102] where is the number of sub-word units;
[0103] f. The embedding vector of the entire text obtained in e v avg is combined with other meteorological features x to obtain the input vector , where k is the dimension of the meteorological feature.
[0104] Using the above steps, taking the text format T as an example, the fine-tuned model T5 extracts the summary from the text format T to obtain the summary T summary . Then, the summary T summary is segmented to obtain the segmented unit sub-word result as T summary ={ t 1, t 2, …, t n}. Then, the sub-word units are converted into the corresponding input IDs using the tokenizer of the fine-tuned model T5 to obtain Input IDs = { id 1, id 2, …, id n}. Then, the input IDs are converted into embedding vectors through the encoder of the fine-tuned model T5 to obtain H = { h 1, h 2, …, h n}. Then, pooling is performed on all the obtained embedding vectors, and finally, they are combined with the meteorological features to obtain the input vector .
[0105] S4. Use a multi-layer perceptron (MLP) to generate hyperparameter suggestions for the prediction model Transformer based on the embedded vectors in S3. The prediction model Transformer is an architecture based on the self-attention mechanism and the feed-forward neural network, which performs sequence-to-sequence mapping through an encoder-decoder structure and uses the multi-head attention mechanism to capture global dependencies. The multi-layer perceptron (MLP) is a feed-forward neural network composed of multiple fully connected layers and non-linear activation functions.
[0106] The specific situation of the multi-layer perceptron (MLP) generating hyperparameter suggestions for the prediction model Transformer based on the embedded vectors in S3 is as follows:
[0107] a. The multi-layer perceptron (MLP) generates dynamically adjusted parameters through forward propagation based on the embedded vectors in S3. That is , and the calculation formula for the dynamically adjusted parameters is:
[0108] ;
[0109] where and are the weights and biases of the first layer, and are the weights and biases of the second layer, ReLU is the activation function, and Tanh limits the output to the range of [−1, 1];
[0110] b. Use the dynamically adjusted parameters in a to adjust the query weight matrix W Query , key weight matrix W Key and value weight matrix W Value in the prediction model Transformer. The calculation formula for the dynamic adjustment of the weight matrix is:
[0111] ;
[0112] c. Use the dynamic weight matrix in b to calculate the query matrix Query , key matrix Key and value matrix Value . The matrix calculation formula is:
[0113] ;
[0114] where X is the input feature matrix.
[0115] By adopting the above steps, the multi-layer perceptron (MLP) generates dynamically adjusted parameters based on the embedded vectors v avg , and then the prediction model dynamically adjusts the parameters to dynamically adjust the query weight matrix W Query , the key weight matrix W Key and the value weight matrix W Value , and further calculates the query matrix Query , the key matrix Key and the value matrix Value according to the dynamically adjusted matrices.
[0116] 5) The specific situation of the prediction model Transformer using the hyperparameter suggestions in S4 for model training is as follows:
[0117] a. Transformer uses the dot product calculation of the dynamic query matrix Query and the dynamic key matrix Key in S4 to obtain the attention score, and the calculation formula of the attention score is:
[0118] ;
[0119] where, T represents the matrix transpose operation, and then the attention score is normalized through the softmax function, and the normalization formula is:
[0120] ;
[0121] b. Use the attention weights to perform weighted summation on the dynamic value matrix Value to obtain the final output, and the calculation formula is
[0122] .
[0123] Using the above steps, the prediction model Transformer calculates the dynamic attention score Attention Score according to the dynamic query matrix Query and the dynamic key matrix Key in S4, then normalizes it through softmax, and then performs weighted summation on the attention weights and the dynamic value matrix Value in S4 to obtain the final input Output.
[0124] S6. Use the model trained in S5 to predict the future power generation according to the data collected in S1 and the future meteorological data.
[0125] Using the above steps, predict the future power generation according to the existing power generation data, meteorological data, and future meteorological data to obtain the future power generation prediction result.
[0126] Embodiment 2
[0127] This embodiment discloses a photovoltaic power generation dynamic prediction system based on text information feature extraction, which is used to implement the photovoltaic power generation dynamic prediction method based on text information feature extraction described in Embodiment 1. As Figure 2 shown, this system includes the following functional modules:
[0128] A data processing module, which is used to process the data values and data formats recorded in the photovoltaic power generation system;
[0129] A model fine-tuning module, which is used to fine-tune the model T5 and train the model T5 using existing power generation data and meteorological data;
[0130] A summary extraction and embedding vector conversion module, which is used to fine-tune the model T5 to extract summaries of power generation data and meteorological data and perform embedding vector conversion;
[0131] A prediction model parameter recommendation module, which is used to recommend hyperparameter suggestions for training the prediction model by the multi-layer perceptron MLP;
[0132] A prediction model training module, which is used to train the prediction model Transformer using the hyperparameter suggestions;
[0133] Embodiment 3
[0134] This embodiment discloses a storage medium storing a program, which when executed by a processor, implements the photovoltaic power generation dynamic prediction method based on text information feature extraction described in Embodiment 1.
[0135] The storage medium in this embodiment can be a disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), a USB flash drive, a mobile hard disk, or other media.
[0136] Embodiment 4
[0137] This embodiment discloses a computing device, including a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, it implements the photovoltaic power generation dynamic prediction method based on text information feature extraction described in Embodiment 1.
[0138] The computing device described in this embodiment can be a desktop computer, a laptop computer, a smart phone, a PDA handheld terminal, a tablet computer, a programmable logic controller (PLC), or other terminal devices with processor functions.
[0139] In summary, this study proposes a brand-new photovoltaic power generation prediction method and system. For the first time, the fine-tuning model T5 is introduced to extract features from power generation data and meteorological data, and automatically generate summary texts to improve the accuracy of feature extraction. Based on the generated summary texts, this method can intelligently recommend the hyperparameter configuration of the prediction model, thereby reducing unnecessary consumption of computing resources, improving the training efficiency of the model, while enhancing its generalization ability and robustness. It can provide guidance for the prediction idea of photovoltaic power generation, improve the practical use value, and has the value of promotion and is worthy of promotion.
[0140] The above-described embodiments are only the preferred embodiments of the present invention and do not limit the scope of implementation of the present invention. Therefore, all changes made according to the shape and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A dynamic prediction method for photovoltaic power generation based on information text feature extraction, characterized in that, It includes the following steps: S1, preprocess the power generation data and meteorological data recorded in the photovoltaic power generation system; S2, fine-tune the model T5 and train the model T5 using the existing power generation data and meteorological data; S3, use the fine-tuned model T5 in S2 to extract the summary of the power generation data and meteorological data in S1 and convert it into an embedding vector; the specific situation is as follows: a. Use the fine-tuned model T5 to extract the summary of the power generation data and meteorological data in S1; b. Segment the abstract extracted in a into sub-word units, i.e., where , and represents the th sub-word unit in the text; c. Use the tokenizer of the fine-tuned model T5 to convert the subword units in b into corresponding input IDs. The form of the Input IDs is: , where is the start token, and is the separator token; d. The encoder of the fine-tuned model T5 generates the embedding vectors of each input ID in the Input IDs in c, obtaining a set of embedding vectors , where is the embedding vector of the -th sub-word unit, and is the hidden layer dimension; e. Perform average pooling on the embedding vectors of all sub-word units to obtain the embedding vector of the entire text. The calculation formula for average pooling is: ; wherein is the number of sub-word units; f. The embedding vectors of the entire text obtained in e v avg are combined with other meteorological features x to obtain an input vector , where k is the dimension of the meteorological feature; S4, use the multi-layer perceptron MLP to recommend hyperparameter suggestions for the prediction model Transformer according to the embedding vector in S3; the prediction model Transformer is an architecture based on the self-attention mechanism and the feed-forward neural network, which performs sequence-to-sequence mapping through the encoder-decoder structure and uses the multi-head attention mechanism to capture global dependencies; the multi-layer perceptron MLP is a feed-forward neural network composed of multiple fully connected layers and non-linear activation functions; the specific situation of using the multi-layer perceptron MLP to generate hyperparameter suggestions for the prediction model Transformer according to the embedding vector in S3 is as follows: a. The multi-layer perceptron MLP generates dynamically adjusted parameters through forward propagation based on the embedding vectors in S3 That is , the calculation formula for the dynamically adjusted parameters is: ; Among them, and are the weights and biases of the first layer, and are the weights and biases of the second layer, ReLU is the activation function, and Tanh limits the output between [−1, 1]; b. Adjust the query weight matrix in the prediction model Transformer using the dynamic adjustment parameters in a. W Query , the key weight matrix W Key and the value weight matrix W Value , and the calculation formula for dynamic adjustment of the weight matrix is: ; c. Calculate the query matrix using the dynamic weight matrix in b Query the key matrix Key and the value matrix Value , and the matrix calculation formula is: ; Among them, X is the input feature matrix; Using the above steps, the multi-layer perceptron MLP generates dynamically adjusted parameters based on the embedding vector v avg and then the prediction model uses the dynamically adjusted parameters to dynamically adjust the query weight matrix , the key weight matrix W Query , and the value weight matrix W Key , and further calculates the query matrix W Value , the key matrix Query , and the value matrix Key Value according to the dynamically adjusted matrices; S5, the prediction model Transformer uses the hyperparameter suggestions in S4 for model training; S6, use the trained prediction model Transformer in S5 to predict the future power generation according to the existing power generation data, meteorological data and future meteorological data.
2. The dynamic prediction method for photovoltaic power generation amount based on information text feature extraction according to claim 1, characterized in that: In S1, the specific situation of preprocessing the power generation data and meteorological data recorded in the photovoltaic power generation system is as follows: a. Collect the power generation data and meteorological data recorded in the photovoltaic power generation system; b. Identify the missing values and outliers recorded in a; c. Mark and process the missing values and outliers identified in b. The processing method is to replace the missing values and outliers with the average values of the previous and next values of the missing values and outliers; d. Standardize the timestamps recorded in c and uniformly convert the time to Unix timestamps. The conversion formula is: ; where UTC is the local time zone; e. Perform normalization processing on the data in d and compress the data to a unified range, that is, within 0 to 1. The calculation formula for normalization is: ; Among them, is the data value that needs to be normalized, is the data value which is the maximum value in the column where it is located, is the data value and is the minimum value in the column where it is located; f. Convert the power generation data and meteorological data after the missing value and outlier processing in step c, the timestamp standardization in step d, and the numerical normalization in step e into the text format of natural language.
3. The dynamic photovoltaic power generation prediction method based on information text feature extraction according to claim 1, characterized in that: In S2, the model T5, that is, Text-To-Text Transfer Transformer, is a general text processing model based on the Transformer architecture. By uniformly converting various NLP tasks into the form of "text-to-text", it uses transfer learning to achieve multi-task processing in pre-training and fine-tuning.
4. The dynamic prediction method of photovoltaic power generation amount based on information text feature extraction according to claim 1, wherein: In S1, the specific situation of fine-tuning the model T5 and training the model T5 using the existing power generation data and meteorological data is as follows: a. Collect power generation data and meteorological data related to photovoltaic power generation; b. Use the data in a to fine-tune the model T5, and train the model T5 to extract high-precision summaries according to the text formats of the power generation data and meteorological data.
5. The dynamic prediction method for photovoltaic power generation based on information text feature extraction according to claim 1, characterized in that: In S5, the specific situation of the prediction model Transformer using the hyperparameter suggestions in S4 for model training is as follows: a. The Transformer uses the dynamic query matrix in S4 Query and the dynamic key matrix Key to calculate the attention score through the dot product. The calculation formula for the attention score is as follows: ; where T represents the matrix transpose operation, and then the attention scores are normalized through the softmax function. The normalization formula is: ; b. Weight the dynamic value matrix using the attention weights Value and perform a weighted sum to obtain the final output. The calculation formula is 。 6. The dynamic prediction method of photovoltaic power generation amount based on information text feature extraction according to claim 1, characterized in that: In S6, use the model trained in S5 to predict the future power generation according to the data collected in S1 and the future meteorological data.
7. A dynamic prediction system for photovoltaic power generation based on information text feature extraction, characterized in that, For implementing the photovoltaic power generation dynamic prediction method based on information text feature extraction according to any one of claims 1 to 6, it includes: A data processing module for processing the data values and data formats recorded in the photovoltaic power generation system; A model fine-tuning module for fine-tuning the model T5 and training the model T5 using the existing power generation data and meteorological data; A summary extraction and embedding vector conversion module for fine-tuning the model T5 to extract summaries of the power generation data and meteorological data and perform embedding vector conversion; A prediction model parameter recommendation module for recommending hyperparameter suggestions for the training of the prediction model MLP; A prediction model training module for training the prediction model Transformer using the hyperparameter suggestions.
8. A storage medium stores a program, characterized in that, When the program is executed by the processor, it implements the photovoltaic power generation dynamic prediction method based on information text feature extraction according to any one of claims 1 to 6.
9. A computing device, comprising a processor and a memory for processor-executable programs, characterized in that, When the processor executes the program stored in the memory, it implements the photovoltaic power generation dynamic prediction method based on information text feature extraction according to any one of claims 1 to 6.
Citation Information
Patent Citations
Pre-training text abstract generation method based on neural topic memory
CN110737769A
Photovoltaic power generation power prediction method and system, and computer equipment
CN118316030A