Weather classification-based adaptive TimeXer model photovoltaic power prediction method and system

Through the adaptive TimeXer model, the use of weather classification information to dynamically correlate photovoltaic power prediction, the problem of low photovoltaic power prediction accuracy in the existing technology is solved, and more accurate photovoltaic power prediction and long-sequence prediction effects are achieved.

CN120297480APending Publication Date: 2025-07-11HUANENG NEW ENERGY (SHANDONG) CO LTD +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510366130.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing technology cannot effectively use weather classification information to guide the photovoltaic power prediction model, resulting in unsatisfactory prediction accuracy and it is difficult to accurately capture the changing patterns of photovoltaic power under different weather conditions.

Method used

Adaptive TimeXer model based on weather classification is adopted, time marks and meteorological factors are generated through PatchEmbed and VariateEmbed projections, and weather types and power fluctuations are dynamically correlated with endogenous self-attention and cross-attention mechanisms, and multi-time scale characteristics are processed in combination with Fourier hybrid layer to generate accurate photovoltaic power prediction results.

Benefits of technology

It improves the accuracy of photovoltaic power prediction, dynamically captures fluctuation patterns in different weather modes, reduces the computational complexity, and enhances the robustness of long-sequence prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120297480A_ABST
    Figure CN120297480A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive TimeXer model photovoltaic power prediction method and system based on weather typing, and belongs to the technical field of photovoltaic power generation, and the method comprises the steps: dividing a historical photovoltaic power sequence into time patches, carrying out PatchEmbedded projection on the time patches to generate time stamps, and generating learnable global stamps; the method comprises the following steps: carrying out standardization processing on meteorological data, carrying out clustering to generate a weather classification label, converting the weather classification label into a discrete variable label, and carrying out Variate Embedded projection on the standardized continuous meteorological data to generate a continuous meteorological factor; performing endogenous self-attention calculation on learnable global marks, continuous meteorological factors and discrete variable marks to obtain attention weights among the time marks, aggregating the continuous meteorological factors and the discrete variable marks by using the attention weights among the time marks through cross attention processing, and inputting multi-scale feature marks into a feedforward network to obtain a multi-scale feature mark; and adjusting the frequency domain of the predicted value by using a Fourier mixing layer to obtain a final prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic power generation, and particularly relates to a photovoltaic power prediction method and system based on an adaptive TimeXer model with weather typing. Background Art

[0002] With the continuous expansion of the scale of photovoltaic power generation, photovoltaic power generation has become the core of energy transformation and an important method for addressing climate change. However, the inherent randomness and volatility of photovoltaic power generation may affect the reliability and security of the power system, posing a huge challenge to the stable and reliable operation of the power system. Accurate photovoltaic power prediction technology can provide a basis for the dispatching and spinning reserve of the power system and is the foundation of renewable energy consumption and the core of dispatching operation. Weather typing is a systematic method for classifying weather based on meteorological elements. Its core lies in transforming complex meteorological information into interpretable patterns through a data-driven approach, thus supporting scientific decision-making in fields such as meteorological forecasting, energy management, and agricultural planning.

[0003] The existing technology only simply splices the weather typing results with other meteorological data through static feature fusion and does not adaptively select weather features relevant to the current prediction through a dynamic mechanism. In addition, most models only focus on hourly or daily data and lack co-modeling of multi-time scales such as the daily variation and seasonal trend of weather typing. Single-time scale modeling is difficult to capture the power fluctuation law under complex weather patterns. The existing methods directly input the weather typing results as static labels into the model, and the loose coupling between weather typing and the prediction model does not fully exploit the dynamic association between weather types and power sequences. For example, traditional methods only splice the weather type as an additional feature and do not explicitly model the impact of the weather type on power fluctuations through an attention mechanism. In addition, when the existing models process multi-source exogenous variables including weather typing, directly splicing meteorological data and weather labels leads to an explosion in the input dimension, and the curse of dimensionality increases the computational complexity, resulting in inefficient processing of exogenous variables. There is also no distinction between the macroscopic semantics of weather typing, such as the overall lighting characteristics of "sunny days" and the fine-grained meteorological factors, such as the hourly variation of irradiance. Feature redundancy leads to low model learning efficiency. Traditional models have insufficient modeling ability for the periodic changes of weather patterns, such as day-night alternation and season conversion, when dealing with long sequences such as across days and across seasons. The limitations of long sequence prediction lead to the accumulation of prediction errors over time.

[0004] The existing technology cannot effectively use weather typing information to guide the modeling and prediction of photovoltaic power prediction models, resulting in unsatisfactory prediction accuracy. Therefore, there is an urgent need for a photovoltaic power prediction method based on an adaptive TimeXer model with weather typing to improve the accuracy of photovoltaic power prediction and effectively capture the power fluctuation law under different weather patterns. Summary of the Invention

[0005] The object of the present invention is to solve the problem that it is impossible to effectively utilize weather classification information to guide the modeling and prediction of a photovoltaic power prediction model and it is difficult to accurately capture the variation law of photovoltaic power under different weather conditions, and a photovoltaic power prediction method and system based on an adaptive TimeXer model with weather classification are proposed.

[0006] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a photovoltaic power prediction method based on an adaptive TimeXer model with weather classification, including the following steps: Divide the historical photovoltaic power sequence into time patches, generate time tokens through PatchEmbed projection for the time patches, and generate learnable global tokens using the time tokens; Perform standardization processing on meteorological data to obtain standardized continuous meteorological data, perform clustering on the standardized continuous meteorological data to generate weather classification labels, convert the weather classification labels into discrete variable tokens, and at the same time perform VariateEmbed projection on the standardized continuous meteorological data to generate continuous meteorological factors; Perform endogenous self-attention calculation on the learnable global tokens, continuous meteorological factors, and discrete variable tokens to obtain the attention weights between the time tokens, and use the attention weights between the time tokens to aggregate the continuous meteorological factors and discrete variable tokens through cross-attention processing to obtain multi-scale feature tokens; Input the multi-scale feature tokens into a feed-forward network to generate a prediction value, and use a Fourier mixing layer to adjust the frequency domain of the prediction value to obtain the final prediction result.

[0007] Further, the meteorological data includes irradiance, temperature, humidity, cloud cover, and visibility; the weather classification labels include sunny, cloudy, rainy, and extreme weather.

[0008] Further, the standardization processing uses a sliding window, and the clustering uses the K-mean++ algorithm.

[0009] Further, the conversion of the weather classification labels into discrete variable tokens includes performing One-hot encoding on the weather classification labels and then inputting them into an embedding layer.

[0010] Further, when performing cross-attention processing, the variable tokens of the weather classification labels are independent of other meteorological data, interact with the endogenous global tokens through a learnable weight matrix, and output the enhanced features of the weather classification on the power sequence.

[0011] Furthermore, the rule for adaptively adjusting the length of the time patch is as follows: the patch length is dynamically set according to the periodic characteristics of the weather classification label. The first preset length is used on sunny days, and the second preset length less than the first preset length is used on cloudy or extreme weather days.

[0012] Furthermore, the Fourier hybrid layer converts the time series to the frequency domain through fast Fourier transform, and uses a filterable network to separate high-frequency noise and low-frequency periodic signals, retaining the 24-hour periodic signal driven by weather for long-sequence prediction.

[0013] In a second aspect, the present invention provides a photovoltaic power prediction system based on an adaptive TimeXer model with weather classification, including: A time marking generation module, configured to divide the historical photovoltaic power sequence into time patches, generate time marks through PatchEmbed projection for the time patches, and generate a learnable global mark using the time marks; A clustering weather classification label module, configured to perform normalization processing on meteorological data to obtain normalized continuous meteorological data, perform clustering on the normalized continuous meteorological data to generate weather classification labels, convert the weather classification labels into discrete variable marks, and at the same time perform VariateEmbed projection on the normalized continuous meteorological data to generate continuous meteorological factors; A multi-scale feature mark aggregation module, configured to perform endogenous self-attention calculation on the learnable global mark, continuous meteorological factors, and discrete variable marks to obtain the attention weights between the time marks, and aggregate the continuous meteorological factors and discrete variable marks through cross-attention processing using the attention weights between the time marks to obtain multi-scale feature marks; A module for obtaining the prediction result, configured to input the multi-scale feature marks into a feed-forward network to generate a predicted value, and adjust the frequency domain of the predicted value using the Fourier hybrid layer to obtain the final prediction result.

[0014] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the photovoltaic power prediction method based on the adaptive TimeXer model with weather classification is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the photovoltaic power prediction method based on the adaptive TimeXer model with weather classification is implemented.

[0016] Compared with the prior art, the present invention has the following beneficial technical effects: The photovoltaic power prediction method based on weather classification of the adaptive TimeXer model proposed by the present invention dynamically correlates weather classification with power sequences. Through the cross-attention mechanism, the model can adaptively learn the non-linear relationship between weather types and power fluctuations, and identify power jump characteristics; efficiently process multi-source exogenous variables, decouple weather classification and meteorological data through variable-level embedding and attention mechanism, reduce redundant calculations, and retain key features at the same time; through multi-time scale analysis and Fourier mixing layer, the model can capture the periodic changes of weather patterns, reduce long-term prediction errors, and has the robustness of long-sequence prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure of the present invention in any way. Additionally, the shapes and proportional dimensions of the components in the drawings are only schematic and are used to assist in understanding the present invention, rather than specifically limiting the shapes and proportional dimensions of the components of the present invention. In the drawings: Figure 1 is a flowchart of the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model of the present invention.

[0018] Figure 2 is a structural diagram of the photovoltaic power prediction system based on weather classification of the adaptive TimeXer model of the present invention.

[0019] Figure 3 is a diagram of an electronic device for the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model of the present invention.

[0020] Figure 4 is the overall flowchart of the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model in the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0022] Embodiment 1 See Figure 1 , the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model includes the following steps: Divide the historical photovoltaic power sequence into time patches, perform PatchEmbed projection on the time patches to generate time tokens, and use the time tokens to generate learnable global tokens; the rule for adaptively adjusting the length of the time patches is: dynamically set the patch length according to the periodic characteristics of the weather classification labels, using the first preset length on sunny days and the second preset length less than the first preset length on cloudy or extreme weather days.

[0023] Perform normalization processing on the meteorological data to obtain the normalized continuous meteorological data, perform clustering on the normalized continuous meteorological data to generate weather classification labels, convert the weather classification labels into discrete variable tokens, and at the same time perform VariateEmbed projection on the normalized continuous meteorological data to generate continuous meteorological factors; the meteorological data includes irradiance, temperature, humidity, cloud cover, and visibility; the weather classification labels include sunny, cloudy, rainy, and extreme weather. Converting the weather classification labels into discrete variable tokens includes inputting the weather classification labels after One-hot encoding into the embedding layer. The normalization processing uses a sliding window, and the clustering uses the K-mean++ algorithm.

[0024] Perform endogenous self-attention calculation on the learnable global tokens, continuous meteorological factors, and discrete variable tokens to obtain the attention weights between the time tokens, and use the attention weights between the time tokens to aggregate the continuous meteorological factors and discrete variable tokens through cross-attention processing to obtain multi-scale feature tokens; during cross-attention processing, the variable tokens of the weather classification labels are independent of other meteorological data, interact with the endogenous global tokens through a learnable weight matrix, and output the enhanced features of the weather classification on the power sequence.

[0025] Input the multi-scale feature tokens into a feed-forward network to generate prediction values, and use the Fourier mixing layer to adjust the frequency domain of the prediction values to obtain the final prediction result. The Fourier mixing layer converts the time series to the frequency domain through the fast Fourier transform, and uses a filterable network to separate high-frequency noise and low-frequency periodic signals, retaining the 24-hour periodic signal driven by the weather for long-sequence prediction.

[0026] Embodiment 2 See Figure 2 , an adaptive TimeXer model photovoltaic power prediction system based on weather classification, including: A time token generation module, configured to divide the historical photovoltaic power sequence into time patches, perform PatchEmbed projection on the time patches to generate time tokens, and use the time tokens to generate learnable global tokens; The clustering weather classification label module is used to standardize meteorological data to obtain standardized continuous meteorological data, cluster the standardized continuous meteorological data to generate weather classification labels, convert the weather classification labels into discrete variable markers, and at the same time perform VariateEmbed projection on the standardized continuous meteorological data to generate continuous meteorological factors; The multi-scale feature marker aggregation module is used to perform endogenous self-attention calculation on learnable global markers, continuous meteorological factors, and discrete variable markers to obtain the attention weights between time markers, and use the attention weights between time markers to aggregate continuous meteorological factors and discrete variable markers through cross-attention processing to obtain multi-scale feature markers; The module for obtaining the prediction result is used to input the multi-scale feature markers into a feed-forward network to generate prediction values, and use a Fourier mixing layer to adjust the frequency domain of the prediction values to obtain the final prediction result.

[0027] Embodiment III See Figure 3 , an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the photovoltaic power prediction method of the adaptive TimeXer model based on weather classification. The method includes the following steps: dividing the historical photovoltaic power sequence into time patches, performing PatchEmbed projection on the time patches to generate time markers, and generating learnable global markers using the time markers; standardizing meteorological data to obtain standardized continuous meteorological data, clustering the standardized continuous meteorological data to generate weather classification labels, converting the weather classification labels into discrete variable markers, and at the same time performing VariateEmbed projection on the standardized continuous meteorological data to generate continuous meteorological factors; performing endogenous self-attention calculation on learnable global markers, continuous meteorological factors, and discrete variable markers to obtain the attention weights between time markers, and using the attention weights between time markers to aggregate continuous meteorological factors and discrete variable markers through cross-attention processing to obtain multi-scale feature markers; inputting the multi-scale feature markers into a feed-forward network to generate prediction values, and using a Fourier mixing layer to adjust the frequency domain of the prediction values to obtain the final prediction result.

[0028] Embodiment IV A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model. The method includes the following steps: dividing the historical photovoltaic power sequence into time patches, performing PatchEmbed projection on the time patches to generate time tokens, and generating learnable global tokens using the time tokens; performing standardization processing on the meteorological data to obtain standardized continuous meteorological data, performing clustering on the standardized continuous meteorological data to generate weather classification labels, converting the weather classification labels into discrete variable tokens, and at the same time performing VariateEmbed projection on the standardized continuous meteorological data to generate continuous meteorological factors; performing endogenous self-attention calculation on the learnable global tokens, continuous meteorological factors, and discrete variable tokens to obtain the attention weights between the time tokens, and aggregating the continuous meteorological factors and discrete variable tokens through cross-attention processing using the attention weights between the time tokens to obtain multi-scale feature tokens; inputting the multi-scale feature tokens into a feed-forward network to generate prediction values, and adjusting the frequency domain of the prediction values using a Fourier mixing layer to obtain the final prediction result.

[0029] Embodiment Five Such as Figure 4 , the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model shows the entire process of photovoltaic power prediction, including data input, model construction, prediction output, etc.; TimeXer: An algorithm for time series prediction. By designing a unique embedding layer, it enables the standard Transformer to have the ability to process exogenous variables, and can capture the time dependence of endogenous variables and the correlation between exogenous variables and endogenous variables at the same time.

[0030] Transformer: A neural network structure based on the attention mechanism, originally used for natural language processing and widely used in time series prediction. Its core is the self-attention mechanism, which can process data in parallel and obtain global information of the sequence.

[0031] Endogenous Variables: In time series prediction, it refers to the target variable to be predicted, such as power data in photovoltaic power generation.

[0032] Exogenous Variables: Variables that provide valuable external information for predicting endogenous variables. These variables themselves do not need to be predicted. For example, meteorological data related to photovoltaic power generation (such as light intensity, temperature, humidity, etc.).

[0033] Self-Attention: A key mechanism in the Transformer model. By calculating the attention weights between elements at different positions in the input sequence, the model can focus on information at other positions in the sequence when processing an element at a certain position, thereby capturing the long-range dependencies in the sequence.

[0034] Cross-Attention: Used in TimeXer to capture the dependencies between endogenous and exogenous variables. Taking the endogenous variables as the query, and the exogenous variables as the key and value to establish the connection between the two.

[0035] WeatherTyping: Based on the characteristics of meteorological data (such as irradiance, temperature, cloud cover, etc.), the weather is divided into different types (such as sunny, cloudy, rainy) through clustering algorithms (such as K-mean++), providing additional context information for photovoltaic power prediction.

[0036] The multi-modal embedding based on weather typing includes endogenous variable processing and exogenous variable processing; endogenous variable processing includes dividing the photovoltaic power sequence into non-overlapping time patches, projecting them into temporal tokens through PatchEmbed, and introducing learnable global tokens to capture the overall trend of the sequence. Exogenous variable processing includes meteorological data embedding: projecting continuous meteorological factors such as irradiance and temperature into variable tokens through VariateEmbed. Weather typing embedding includes representing weather types (such as sunny, cloudy) as independent variable tokens through embedding vectors, and jointly inputting them into the cross-attention module with the variable tokens of other meteorological data.

[0037] The weather-aware attention mechanism includes endogenous self-attention and cross-attention enhancement; endogenous self-attention includes dynamically capturing the dependencies between patches through the self-attention mechanism when processing the temporal tokens of the power sequence, and aggregating the weather typing information through the global token. Cross-attention enhancement includes taking the endogenous global token as the query, and the variable tokens of exogenous variables (including weather typing and meteorological data) as the key and value, calculating the cross-attention weights, and strengthening the impact of weather types on power prediction.

[0038] Multi-time scale decoupling includes adaptive patch length and Fourier mixing layer; the adaptive patch length dynamically adjusts the patch length according to the periodicity of weather typing (such as stable sunlight on sunny days vs. fluctuating sunlight on cloudy days). For example, longer patches are used for sunny days to capture the stable trend, and shorter patches are used for cloudy days to capture the high-frequency fluctuations.

[0039] The Fourier mixing layer includes introducing a Fourier transform layer in the encoder to convert the time series into the frequency domain, separating the weather-driven periodic signals (such as the 24-hour day-night cycle) from the random noise, and improving the prediction accuracy of long sequences.

[0040] The prediction process (combining weather classification) includes data preprocessing and embedding layer processing.

[0041] Data preprocessing involves partitioning the historical photovoltaic power data into patches to generate time stamps. Standardize the meteorological data (such as irradiance, temperature, humidity, cloud cover, visibility), and generate weather classification labels (such as sunny, cloudy, rainy, extreme weather) through a clustering algorithm (K-mean++).

[0042] The embedding layer processing includes endogenous variables, exogenous variables, attention calculation, and prediction output. The endogenous variables convert the time patches of the power sequence into time stamps through PatchEmbed and generate global stamps. The exogenous variables include continuous meteorological data and weather classification labels. The continuous meteorological data (such as irradiance) generates variable stamps through VariateEmbed. The weather classification labels are converted into discrete variable stamps through the embedding layer. The attention calculation includes endogenous self-attention and cross-attention. The endogenous self-attention captures the local fluctuations and global trends of the power sequence by calculating the attention weights between time stamps. The cross-attention calculates the contribution weights of weather types to power prediction by taking the endogenous global stamp as the query and the variable stamps of exogenous variables (including weather classification and meteorological data) as the keys and values. The prediction output transforms the fused stamps through a feed-forward network to generate the power prediction values for future time periods. The Fourier mixing layer is introduced to perform frequency domain adjustment on the prediction results to optimize the long-term prediction accuracy.

[0043] The embedding strategy in this embodiment can also adopt feature fusion (such as PCA dimensionality reduction) of the weather classification labels and meteorological data before embedding, instead of independent variable-level embedding. Use a graph neural network (GNN) to model the spatio-temporal relationship between weather classification and meteorological data, instead of the cross-attention mechanism. The weather classification-guided multi-modal embedding can also adopt embedding the weather classification results as independent variables into the TimeXer model, and learning the dynamic association between weather types and the spatio-temporal features of the photovoltaic power sequence through cross-attention weights. The spatio-temporal co-attention mechanism can also adopt introducing a weather-aware self-attention module in the encoder to capture the differential power fluctuation patterns under different weather modes by calculating the attention weights between weather types and power sequence patches. The adaptive long sequence prediction optimization can also adopt designing an adaptive patch length adjustment mechanism for the long-term fluctuations of weather-driven photovoltaic power, and combining the Fourier mixing layer to capture the weather-power coupling features at different time scales.

[0044] The multi-modal embedding method based on weather classification of the present invention embeds the weather classification results (categories such as sunny days and cloudy days obtained by K-means++ clustering) as independent variables into the TimeXer model, and dynamically associates the spatio-temporal characteristics of weather types and photovoltaic power sequences through cross-attention weight learning.

[0045] The self-attention mechanism for weather perception of the present invention protects the introduction of a weather perception self-attention module in the encoder of TimeXer, and realizes the differential capture of power fluctuation laws under different weather patterns by calculating the attention weights of weather types and power sequence patches.

[0046] The dynamic prediction method at multiple time scales of the present invention protects a technical solution for long-period fluctuations of weather-driven photovoltaic power, designing an adaptive patch length adjustment mechanism, and combining Fourier mixing layers to capture weather-power coupling characteristics at different time scales.

[0047] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, read-only optical discs, optical memories, etc.) containing computer-usable program codes.

[0048] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.

[0049] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.

[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to generate a computer-implemented process, thereby providing instructions for implementing the steps specified in one process or a plurality of processes and / or boxes Figure 1 one process or a plurality of processes and / or boxes Figure 1 in one box or a plurality of boxes. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the specific implementation manners of the present invention can still be modified or equivalently replaced, and any modification or equivalent replacement without departing from the spirit and scope of the present invention should be covered within the protection scope of the present invention.

Claims

1. An adaptive TimeXer model photovoltaic power prediction method based on weather typing, characterized in that It includes the following steps: Divide the historical photovoltaic power sequence into time patches, perform PatchEmbed projection on the time patches to generate time tokens, and generate learnable global tokens using the time tokens; Perform normalization processing on the meteorological data to obtain normalized continuous meteorological data, perform clustering on the normalized continuous meteorological data to generate weather type labels, convert the weather type labels into discrete variable tokens, and at the same time perform VariateEmbed projection on the normalized continuous meteorological data to generate continuous meteorological factors; Perform endogenous self-attention calculation on the learnable global tokens, continuous meteorological factors, and discrete variable tokens to obtain the attention weights between the time tokens, and use the attention weights between the time tokens to aggregate the continuous meteorological factors and discrete variable tokens through cross-attention processing to obtain multi-scale feature tokens; Input the multi-scale feature tokens into a feed-forward network to generate prediction values, and use the Fourier mixing layer to adjust the frequency domain of the prediction values to obtain the final prediction result.

2. The photovoltaic power prediction method based on the weather-type-based adaptive TimeXer model according to claim 1, wherein The meteorological data includes irradiance, temperature, humidity, cloud cover, and visibility; the weather type labels include sunny, cloudy, rainy, and extreme weather.

3. The photovoltaic power prediction method based on the weather - type - based adaptive TimeXer model according to claim 1, wherein, The normalization processing uses a sliding window, and the clustering uses the K-mean++ algorithm.

4. The photovoltaic power prediction method based on weather - typed adaptive TimeXer model according to claim 1, wherein, The conversion of the weather type label into a discrete variable token includes performing One-hot encoding on the weather type label and then inputting it into an embedding layer.

5. The photovoltaic power prediction method based on the weather-typed adaptive TimeXer model according to claim 1, characterized in that During the cross-attention processing, the variable tokens of the weather type label are independent of other meteorological data, interact with the endogenous global tokens through a learnable weight matrix, and output the enhanced features of the weather type on the power sequence.

6. The photovoltaic power prediction method based on the weather-typed adaptive TimeXer model according to claim 1, characterized in that The adaptive adjustment rule for the length of the time patch is: Dynamically set the patch length according to the periodic characteristics of the weather type label, using the first preset length in sunny days, and the second preset length less than the first preset length in cloudy or extreme weather.

7. The photovoltaic power prediction method based on the weather-typed adaptive TimeXer model according to claim 1, wherein The Fourier mixing layer converts the time series to the frequency domain through the fast Fourier transform, and uses a filterable network to separate high-frequency noise and low-frequency periodic signals, retaining the 24-hour periodic signals driven by the weather for long-term sequence prediction.

8. An adaptive TimeXer model photovoltaic power prediction system based on weather typing, characterized in that It includes: A time token generation module, which is used to divide the historical photovoltaic power sequence into time patches, perform PatchEmbed projection on the time patches to generate time tokens, and generate learnable global tokens using the time tokens; A clustering weather type label module, which is used to perform normalization processing on the meteorological data to obtain normalized continuous meteorological data, perform clustering on the normalized continuous meteorological data to generate weather type labels, convert the weather type labels into discrete variable tokens, and at the same time perform VariateEmbed projection on the normalized continuous meteorological data to generate continuous meteorological factors; A multi-scale feature token aggregation module, which is used to perform endogenous self-attention calculation on the learnable global tokens, continuous meteorological factors, and discrete variable tokens to obtain the attention weights between the time tokens, and use the attention weights between the time tokens to aggregate the continuous meteorological factors and discrete variable tokens through cross-attention processing to obtain multi-scale feature tokens; The module for obtaining prediction results is used to input the multi-scale feature labels into a feed-forward network to generate prediction values, and use a Fourier mixing layer to adjust the frequency domain of the prediction values to obtain the final prediction results.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the photovoltaic power prediction method based on weather classification of the adaptive TimeXer model according to any one of claims 1-7.

Citation Information

Cited By

  • Deep learning photovoltaic power generation long-term prediction method fusing domain knowledge

    CN120879570A

  • A deep learning photovoltaic power generation long-term prediction method fusing domain knowledge

    CN120879570B

  • Renewable energy extreme drought monthly scene joint generation method

    CN121682466A

  • Joint generation method for monthly extreme drought scenarios of renewable energy

    CN121682466B